@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0ea5e9; /* Sky Blue */
    --primary-hover: #0284c7;
    --primary-light: #f0f9ff;
    --secondary: #0c4a6e; /* Deep Ocean Blue */
    --dark: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --light: var(--bg-light);
    --border: var(--border-color);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px -2px rgba(14, 165, 233, 0.08), 0 2px 8px -1px rgba(14, 165, 233, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(14, 165, 233, 0.12), 0 8px 10px -6px rgba(14, 165, 233, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Theme colors - Light Theme (default) */
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --bg-light: #f8fafc;
    --bg-sky: #f0f9ff;
    --text-main: #334155;
    --text-heading: #0f172a;
    --border-color: #e2e8f0;
}

html[data-theme="dark"],
html[data-bs-theme="dark"] {
    /* Theme colors - Dark Theme */
    --bg-body: #0a0f1d; /* Rich dark navy background */
    --bg-card: #141b2d; /* Premium slate dark card */
    --bg-light: #0f1524;
    --bg-sky: #172237;
    --text-main: #cbd5e1;
    --text-heading: #ffffff;
    --border-color: #243049;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

    /* Accents & Text overrides for legibility */
    --primary-light: rgba(14, 165, 233, 0.15);
    --slate-800: #e2e8f0;
    --slate-700: #cbd5e1;
    --slate-500: #94a3b8;

    /* Bootstrap 5 Native Theme Variables Overrides */
    --bs-primary: #38bdf8;
    --bs-primary-rgb: 56, 189, 248;
    --bs-info: #22d3ee;
    --bs-info-rgb: 34, 211, 238;
    --bs-body-bg: var(--bg-body);
    --bs-body-color: var(--text-main);
    --bs-card-bg: var(--bg-card);
    --bs-card-color: var(--text-main);
    --bs-secondary-color: #94a3b8;
    --bs-border-color: var(--border-color);
}

/* Dark mode class utility overrides to prevent layout breaks from hardcoded light-mode classes */
html[data-bs-theme="dark"] .bg-white {
    background-color: var(--bg-body) !important;
}

html[data-bs-theme="dark"] .card.bg-white,
html[data-bs-theme="dark"] .card .bg-white,
html[data-bs-theme="dark"] .card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

html[data-bs-theme="dark"] .bg-light {
    background-color: var(--bg-light) !important;
}

html[data-bs-theme="dark"] .text-dark:not(.badge):not(.btn-warning):not(.bg-warning):not(.badge *) {
    color: var(--text-heading) !important;
}

html[data-bs-theme="dark"] .text-muted {
    color: var(--slate-500) !important;
}

html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

/* Base Accessibility Scaling - Default is comfortable for elderly */
html {
    scroll-behavior: smooth;
    font-size: 18px; /* High legibility default */
    transition: font-size 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main); /* Dark slate for high contrast */
    line-height: 1.8; /* Generous spacing for easy reading */
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navbar */
header {
    background-color: var(--bg-body);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
}

#mainNavbar {
    background-color: transparent !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background-color: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--slate-500);
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.btn-contact {
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.55rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.btn-contact:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Accessibility: Text Resizer Widget & Dark Mode Toggle */
.accessibility-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.resizer-panel {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: var(--bg-light);
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
}

.resizer-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-right: 0.25rem;
}

.btn-resize {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-resize:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Theme Toggle Button */
.btn-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(15deg);
}

html[data-theme="dark"] .btn-theme-toggle:hover,
html[data-bs-theme="dark"] .btn-theme-toggle:hover {
    background-color: var(--bg-sky);
}

.btn-theme-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* Toggle icon display based on active theme */
html[data-theme="dark"] .btn-theme-toggle .sun-icon,
html[data-bs-theme="dark"] .btn-theme-toggle .sun-icon {
    display: block;
}
html[data-theme="dark"] .btn-theme-toggle .moon-icon,
html[data-bs-theme="dark"] .btn-theme-toggle .moon-icon {
    display: none;
}
html:not([data-theme="dark"]) .btn-theme-toggle .sun-icon,
html:not([data-bs-theme="dark"]) .btn-theme-toggle .sun-icon {
    display: none;
}
html:not([data-theme="dark"]) .btn-theme-toggle .moon-icon,
html:not([data-bs-theme="dark"]) .btn-theme-toggle .moon-icon {
    display: block;
}

/* Hero Slider */
.hero-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    background-color: var(--secondary);
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
}

.hero-bg-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    opacity: 0.95;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 750px;
    color: #ffffff;
    transform: translateY(30px);
    transition: transform 0.8s ease;
}

.hero-slide.active .hero-content {
    transform: translateY(0);
}

.hero-tag {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1.25rem;
}

.hero-content h2 {
    font-size: 2.75rem;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1.25rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn-hero {
    background-color: var(--primary);
    color: #ffffff;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4);
}

.btn-hero:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(14, 165, 233, 0.6);
}

/* Sections Base Styling */
section {
    padding: 5rem 0;
}

.section-bg-light {
    background-color: var(--light);
}

.section-bg-sky {
    background-color: var(--primary-light);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3.5rem auto;
}

.section-tag {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.25rem;
    color: var(--secondary);
    line-height: 1.3;
}

.section-header p {
    color: var(--slate-500);
    margin-top: 0.75rem;
    font-size: 1.05rem;
}

/* Welcome / Sejarah Section */
.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.welcome-image-wrapper {
    position: relative;
}

.welcome-img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    background-color: var(--primary-light);
    overflow: hidden;
    border: 3px solid #ffffff;
}

.welcome-img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    transition: var(--transition);
}

.welcome-img img:hover {
    transform: scale(1.03);
}

.welcome-card-badge {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    background-color: var(--secondary);
    color: #ffffff;
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-card-badge span.num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary);
}

.welcome-card-badge span.text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.welcome-content p {
    color: var(--slate-700);
    margin-bottom: 1.5rem;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-icon {
    width: 26px;
    height: 26px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.feature-item span {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Tabs: Schedules & Agendas */
.tabs-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate-500);
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.tab-btn.active {
    color: #ffffff;
    background-color: var(--primary);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-pane.active {
    display: block;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
}

.schedule-card:hover {
    transform: translateY(-2px);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.schedule-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
}

.schedule-meta {
    font-size: 0.9rem;
    color: var(--slate-500);
    display: flex;
    gap: 1.5rem;
}

.schedule-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.schedule-place {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modernized Card Designs */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.news-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--primary-light);
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-card-img img {
    transform: scale(1.04);
}

.news-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--secondary);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.news-card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-date {
    font-size: 0.85rem;
    color: var(--slate-500);
    margin-bottom: 0.5rem;
    display: block;
}

.news-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--secondary);
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-summary {
    color: var(--slate-700);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-card-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-readmore {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-hover);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-readmore:hover {
    color: var(--secondary);
    gap: 0.4rem;
}

/* Warta & Pengumuman Cards */
.warta-card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.warta-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.warta-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 165, 233, 0.1);
}

.warta-info {
    flex-grow: 1;
    margin-left: 1.25rem;
}

.warta-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.2rem;
}

.warta-meta {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.btn-download {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.btn-download:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Social Share Widget Panel */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.5rem;
}

.share-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    color: #ffffff;
    transition: var(--transition);
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-share-fb { background-color: #1877f2; }
.btn-share-wa { background-color: #25d366; }
.btn-share-copy { background-color: #64748b; }

/* Pelayan Cards */
.pelayan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem 2rem;
    margin-bottom: 3rem;
}

.pelayan-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pelayan-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.pelayan-avatar-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
    background-color: var(--slate-100);
}

.pelayan-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pelayan-card:hover .pelayan-avatar {
    transform: scale(1.06);
}

.pelayan-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(var(--bs-primary-rgb), 0.12) 100%);
    color: var(--primary);
    font-size: 2.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.pelayan-info {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    justify-content: space-between;
    gap: 0.75rem;
}

.pelayan-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    line-height: 1.4;
}

.pelayan-role-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 0.45rem 1.25rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
}

.pelayan-card:hover .pelayan-role-badge {
    background-color: var(--primary);
    color: #ffffff;
}

/* Unified Profile Banner */
.profile-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 4.5rem 3.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.profile-banner h2 {
    color: #ffffff;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.profile-banner p {
    font-size: 1.15rem;
    line-height: 1.9;
    max-width: 850px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.95;
}

.profile-btn-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn-white {
    background-color: #ffffff;
    color: var(--primary-hover);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.btn-white:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Contact Cards & Map Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
}

.contact-card-info {
    background-color: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-title {
    font-size: 1.8rem;
    color: var(--secondary);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.contact-item-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.contact-item-content p {
    font-size: 0.95rem;
    color: var(--slate-700);
}

.map-wrapper {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid #ffffff;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer Section */
footer {
    background-color: var(--secondary);
    color: rgba(255, 255, 255, 0.85);
    padding: 5rem 0 2.5rem 0;
    border-top: 5px solid var(--primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-about h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

/* Video & Photo Gallery items */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.gallery-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.gallery-media {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.gallery-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(14, 165, 233, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    transition: var(--transition);
}

.gallery-card:hover .gallery-play-btn {
    background-color: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--secondary);
}

.gallery-meta {
    font-size: 0.85rem;
    color: var(--slate-500);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-wrapper {
    position: relative;
    width: 90%;
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-body {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Documents / Archives */
.search-box-wrapper {
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.btn-search {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.8rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-search:hover {
    background-color: var(--primary-hover);
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.doc-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.doc-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-info {
    flex-grow: 1;
    margin-right: 2rem;
}

.doc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.35rem;
}

.doc-desc {
    color: var(--slate-700);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.doc-meta {
    font-size: 0.85rem;
    color: var(--slate-500);
}

/* Detail News Reader page */
.news-detail-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-header {
    margin-bottom: 2rem;
}

.news-detail-category {
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.news-detail-title {
    font-size: 2.25rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.news-detail-meta {
    font-size: 0.9rem;
    color: var(--slate-500);
    display: flex;
    gap: 1.5rem;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 1.25rem;
}

.news-detail-main-img {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 3px solid #ffffff;
}

.news-detail-main-img img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.news-detail-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--slate-800);
    margin-bottom: 3.5rem;
}

.news-detail-body p {
    margin-bottom: 1.75rem;
}

.news-detail-gallery {
    margin-top: 3.5rem;
    border-top: 1.5px solid var(--border);
    padding-top: 2.25rem;
}

.news-detail-gallery h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.news-detail-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.news-detail-gallery-img {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.news-detail-gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-detail-gallery-img img:hover {
    transform: scale(1.04);
    border-color: var(--primary);
}

/* Ulang Tahun Section */
.birthday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.birthday-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.birthday-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.birthday-avatar {
    width: 54px;
    height: 54px;
    background-color: #fef2f2;
    color: #f43f5e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.birthday-info h4 {
    font-size: 1.05rem;
    color: var(--secondary);
    font-weight: 700;
}

.birthday-info p {
    font-size: 0.85rem;
    color: var(--slate-500);
}

/* Tab panes for sejarah, visi, misi inside unified profile page */
.profile-content-box {
    margin-top: 3.5rem;
}

.profile-card {
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

.profile-card-title {
    font-size: 1.75rem;
    color: var(--secondary);
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.75rem;
}

/* Dynamic slider prev/next tweaks & missing components styling */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.slider-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    color: #ffffff;
}

.slider-prev {
    left: 2rem;
}

.slider-next {
    right: 2rem;
}

.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    width: 26px;
    border-radius: 9999px;
    background-color: var(--primary);
}

/* Button Outline Component */
.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
    transition: var(--transition);
    cursor: pointer;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
    transform: translateY(-2px);
}

/* Pagination Component */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3.5rem;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.pagination-item.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}

/* Utility & Layout components */
.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--slate-500);
    background-color: var(--bg-light);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    font-size: 0.95rem;
    width: 100%;
}

/* Visi & Misi Grid */
.visimisi-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
}

/* Responsive Queries */
@media (max-width: 992px) {
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .welcome-image-wrapper {
        max-width: 500px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px; /* slightly smaller on phones */
    }

    .navbar {
        padding: 1rem 0;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--bg-body);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 1.5rem;
        transition: var(--transition);
        z-index: 999;
        box-shadow: var(--shadow-lg);
        border-bottom: 2px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-container {
        height: 420px;
    }

    .tabs-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .schedule-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .schedule-place {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-banner {
        padding: 3rem 1.5rem;
    }

    .profile-btn-group {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .btn-white, .btn-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }

    .visimisi-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .slider-prev {
        left: 0.75rem;
    }

    .slider-next {
        right: 0.75rem;
    }
}

/* ==========================================
   BOOTSTRAP 5 CUSTOM UTILITIES & HOVER STATES
   ========================================== */

.schedule-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.schedule-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
}

.news-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent !important;
}
.news-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary) !important;
}

.warta-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color) !important;
}
.warta-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--primary) !important;
}

.birthday-card-hover:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.img-zoom {
    transition: transform 0.5s ease;
}
.news-card-hover:hover .img-zoom {
    transform: scale(1.05);
}

.title-hover {
    transition: color 0.2s ease;
}
.title-hover:hover {
    color: var(--primary) !important;
}

.hover-shift {
    transition: gap 0.2s ease;
}
.hover-shift:hover {
    gap: 0.5rem !important;
}

.hover-bg-primary:hover {
    background-color: var(--primary) !important;
    color: white !important;
}

.hover-bg-success:hover {
    background-color: #198754 !important; /* bs success */
    color: white !important;
}

.nav-foot-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.nav-foot-link:hover {
    color: white !important;
    padding-left: 5px;
}

/* Fix navbar dropdown toggle */
.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
@media (min-width: 992px) {
    html.has-custom-cursor,
    html.has-custom-cursor body,
    html.has-custom-cursor a,
    html.has-custom-cursor button,
    html.has-custom-cursor input,
    html.has-custom-cursor select,
    html.has-custom-cursor textarea,
    html.has-custom-cursor .carousel-control-prev,
    html.has-custom-cursor .carousel-control-next {
        cursor: none !important; /* Hide default cursor ONLY when custom cursor is active */
    }
}

.custom-cursor,
.custom-cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0; /* Fade in once mouse moves */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.custom-cursor-follower {
    width: 35px;
    height: 35px;
    border: 1.5px solid var(--primary);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Link/Button hover state */
.custom-cursor-follower.hover {
    width: 55px;
    height: 55px;
    background-color: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(0.5);
}

/* Carousel/Slider drag hover state */
.custom-cursor-follower.drag {
    width: 75px;
    height: 75px;
    background-color: rgba(15, 23, 42, 0.85); /* Dark background */
    border-color: rgba(15, 23, 42, 0.85);
}
html[data-theme="dark"] .custom-cursor-follower.drag,
html[data-bs-theme="dark"] .custom-cursor-follower.drag {
    background-color: rgba(255, 255, 255, 0.85);
}

.custom-cursor-follower.drag::after {
    content: "< >";
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-left: 4px;
}
html[data-theme="dark"] .custom-cursor-follower.drag::after,
html[data-bs-theme="dark"] .custom-cursor-follower.drag::after {
    color: var(--dark);
}

.custom-cursor.drag {
    opacity: 0; /* Hide inner dot */
}

/* Hide custom cursor completely on mobile/touch */
@media (max-width: 991px) {
    .custom-cursor,
    .custom-cursor-follower {
        display: none !important;
    }
}
