/* ==========================================================================
   DESIGN SYSTEM & GLOBAL STYLES - MASJID JAMI' SUNGAI BANAR
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --primary-dark: #022c22;
    --primary: #064e3b;
    --primary-medium: #047857;
    --primary-light: #10b981;
    --primary-pale: #ecfdf5;
    
    --accent: #d97706;
    --accent-dark: #b45309;
    --accent-light: #f59e0b;
    --accent-pale: #fffbeb;
    
    --neutral-black: #111827;
    --neutral-dark: #1f2937;
    --neutral-gray: #4b5563;
    --neutral-medium: #d1d5db;
    --neutral-light: #f9fafb;
    --neutral-white: #ffffff;
    
    --info: #0284c7;
    --info-pale: #e0f2fe;
    --warning: #ea580c;
    --warning-pale: #ffedd5;
    --danger: #dc2626;
    --danger-pale: #fee2e2;

    /* Styling Helpers */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 40px -15px rgba(4, 78, 59, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-bg-dark: rgba(6, 78, 59, 0.85);
    --glass-border-dark: rgba(255, 255, 255, 0.15);
    
    --container-max: 1280px;
}

/* ==========================================================================
   CSS RESETS & GLOBAL SETUP
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--neutral-light);
    color: var(--neutral-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.25;
}

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

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    transition: var(--transition-fast);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-medium);
    border-radius: var(--radius-full);
    border: 2px solid var(--neutral-light);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Heading Styling */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.section-header p {
    color: var(--neutral-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-medium) 100%);
    color: var(--neutral-white);
    box-shadow: 0 4px 14px 0 rgba(6, 78, 89, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-medium) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(6, 78, 89, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--neutral-white);
    box-shadow: 0 4px 14px 0 rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(217, 119, 6, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--neutral-white);
    transform: translateY(-2px);
}

/* ==========================================================================
   ANNOUNCEMENT MARQUEE
   ========================================================================== */

.announcement-marquee {
    background-color: var(--primary-dark);
    border-bottom: 2px solid var(--accent);
    color: var(--neutral-white);
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.6rem 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

.marquee-label {
    position: absolute;
    left: 0;
    background: var(--accent);
    color: var(--neutral-white);
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    margin-right: 4rem;
}

.marquee-bullet {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-right: 0.8rem;
    display: inline-block;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: var(--transition-normal);
}

.brand img:hover {
    transform: rotate(10deg);
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-dark);
}

.brand-text p {
    font-size: 0.7rem;
    color: var(--accent-dark);
    font-weight: 600;
    text-transform: uppercase;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--neutral-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-medium);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary-medium);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links li.active a {
    color: var(--primary-medium);
}

.nav-links li.active a::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 24px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--primary-dark);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
    position: relative;
    height: calc(100vh - 110px);
    min-height: 600px;
    background: url('../assets/masjid_side.jpg') no-repeat center center / cover;
    display: flex;
    align-items: center;
    color: var(--neutral-white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(2, 44, 34, 0.9) 0%, rgba(2, 44, 34, 0.4) 60%, rgba(17, 24, 39, 0.3) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h2 {
    color: var(--accent-light);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-text h1 {
    color: var(--neutral-white);
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-text p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    max-width: 600px;
    animation: fadeInUp 1.2s ease-out;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1.4s ease-out;
}

/* Prayer Card in Hero */
.hero-prayer-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: zoomIn 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-light);
    font-weight: 700;
    margin-bottom: 1rem;
}

.widget-time {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--neutral-white);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.widget-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--neutral-white);
    margin-bottom: 1rem;
}

.widget-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 1.5rem 0;
}

.widget-countdown {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.timer-segment {
    background: rgba(4, 120, 87, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    min-width: 48px;
}

.timer-val {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
}

.timer-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    gap: 0.5rem;
}

.scroll-mouse {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-light);
    border-radius: var(--radius-full);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollScroll 1.5s infinite;
}

@keyframes scrollScroll {
    0% { opacity: 1; transform: translate3d(-50%, 0, 0); }
    100% { opacity: 0; transform: translate3d(-50%, 10px, 0); }
}

/* ==========================================================================
   JADWAL SALAT
   ========================================================================== */

.prayer-section {
    background: var(--neutral-white);
    position: relative;
    z-index: 5;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.prayer-card {
    background: var(--neutral-light);
    border: 1px solid var(--neutral-medium);
    border-radius: var(--radius-md);
    padding: 1.2rem 0.8rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-medium);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.prayer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(6, 78, 59, 0.2);
}

.prayer-card:hover::before {
    transform: scaleX(1);
}

.prayer-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.7rem auto;
    color: var(--primary-medium);
    background: var(--primary-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.prayer-card:hover .prayer-icon {
    background: var(--primary-medium);
    color: var(--neutral-white);
    transform: rotate(360deg);
}

.prayer-card h3 {
    font-size: 1.05rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--neutral-dark);
    margin-bottom: 0.3rem;
}

.prayer-time {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: var(--font-body);
    margin-bottom: 0.1rem;
}

/* Active Prayer Card highlight */
.prayer-card.active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-color: var(--accent);
    color: var(--neutral-white);
    box-shadow: 0 10px 25px rgba(6, 78, 59, 0.3);
}

.prayer-card.active::before {
    transform: scaleX(1);
    background: var(--accent);
}

.prayer-card.active h3 {
    color: var(--accent-light);
}

.prayer-card.active .prayer-time {
    color: var(--neutral-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.prayer-card.active .prayer-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prayer-card.active:hover .prayer-icon {
    background: var(--accent);
    color: var(--neutral-white);
}

.prayer-info-bar {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--neutral-light);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--neutral-medium);
    font-size: 0.9rem;
    color: var(--neutral-gray);
    flex-wrap: wrap;
    gap: 1rem;
}

.calc-method-badge {
    background: var(--primary-pale);
    color: var(--primary-medium);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
}

/* ==========================================================================
   SEJARAH (HISTORY) TIMELINE
   ========================================================================== */

.sejarah-section {
    background: var(--neutral-light);
}

.sejarah-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.sejarah-content h3 {
    font-size: 1.8rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}

.sejarah-content p {
    color: var(--neutral-gray);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.sejarah-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.meta-box {
    background: var(--neutral-white);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent);
}

.meta-box h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neutral-gray);
    margin-bottom: 0.25rem;
}

.meta-box p {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0;
}

.sejarah-visuals {
    position: relative;
}

.timeline-card {
    background: var(--neutral-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    position: relative;
}

.timeline-img-container {
    height: 320px;
    overflow: hidden;
    position: relative;
}

.timeline-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.timeline-card:hover .timeline-img-container img {
    transform: scale(1.08);
}

.timeline-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--accent);
    color: var(--neutral-white);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
}

.timeline-desc {
    padding: 2rem;
}

.timeline-desc h4 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.timeline-desc p {
    color: var(--neutral-gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ==========================================================================
   BERITA TERKINI (LATEST NEWS)
   ========================================================================== */

.berita-section {
    background: var(--neutral-white);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

.news-card {
    background: var(--neutral-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-medium);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(6, 78, 59, 0.15);
}

.news-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

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

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

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-medium);
    color: var(--neutral-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.news-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.8rem;
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-body h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    transition: var(--transition-fast);
}

.news-card:hover .news-body h3 {
    color: var(--primary-medium);
}

.news-body p {
    color: var(--neutral-gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    margin-top: auto;
    border-top: 1px solid var(--neutral-medium);
    padding-top: 1.2rem;
}

.read-more-link {
    color: var(--primary-medium);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.read-more-link svg {
    transition: var(--transition-fast);
}

.news-card:hover .read-more-link svg {
    transform: translateX(5px);
}

/* ==========================================================================
   VISI & MISI
   ========================================================================== */

.visi-misi-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--neutral-white);
    position: relative;
}

.visi-misi-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/banner.png') no-repeat center center / cover;
    opacity: 0.08;
    z-index: 1;
}

.visi-misi-section .container {
    position: relative;
    z-index: 2;
}

.visi-misi-section .section-header h2 {
    color: var(--neutral-white);
}

.visi-misi-section .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.visi-misi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.vm-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.vm-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.vm-icon {
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: var(--neutral-white);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.vm-card h3 {
    color: var(--accent-light);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.visi-text {
    font-size: 1.25rem;
    line-height: 1.6;
    font-family: var(--font-heading);
    text-align: center;
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
}

.misi-list {
    list-style: none;
}

.misi-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
}

.misi-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-light);
    font-weight: 700;
}

/* ==========================================================================
   STRUKTUR ORGANISASI
   ========================================================================== */

.organisasi-section {
    background: var(--neutral-light);
    overflow-x: auto;
}

/* Family Tree CSS implementation */
.org-chart-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    min-width: 900px; /* Enforces readable layout when scrolling horizontal on small devices */
}

.org-tree, .org-tree ul, .org-tree li {
    list-style-type: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-tree ul {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.org-tree li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

/* Connector Lines */
.org-tree li::before, .org-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid var(--neutral-medium);
    width: 50%;
    height: 2rem;
    z-index: 1;
}

.org-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--neutral-medium);
}

.org-tree li:only-child::after, .org-tree li:only-child::before {
    display: none;
}

.org-tree li:only-child {
    padding-top: 0;
}

.org-tree li:first-child::before, .org-tree li:last-child::after {
    border: 0 none;
}

.org-tree li:last-child::before {
    border-right: 2px solid var(--neutral-medium);
    border-radius: 0 5px 0 0;
}

.org-tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

.org-tree ul::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    border-left: 2px solid var(--neutral-medium);
    width: 0;
    height: 2rem;
}

/* Org Card styles */
.org-node {
    background: var(--neutral-white);
    border: 2px solid var(--neutral-medium);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    width: 210px;
    z-index: 5;
    position: relative;
    transition: var(--transition-normal);
}

.org-node:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-medium);
}

.org-node .node-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 0.4rem;
}

.org-node .node-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
}

.org-node .node-responsibility {
    font-size: 0.75rem;
    color: var(--neutral-gray);
    border-top: 1px dashed var(--neutral-medium);
    margin-top: 0.4rem;
    padding-top: 0.4rem;
}

/* Visual color categories based on roles */
.org-node.level-1 {
    border-color: var(--accent);
    background: var(--accent-pale);
}

.org-node.level-1 .node-role {
    color: var(--accent-dark);
}

.org-node.level-2 {
    border-color: var(--primary);
    background: var(--primary-pale);
}

.org-node.level-2 .node-role {
    color: var(--primary);
}

/* ==========================================================================
   YOUTUBE EMBED & MEDIA GALLERY & SOCIAL MEDIA
   ========================================================================== */

.media-section {
    background: var(--neutral-white);
}

.media-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
}

.video-container {
    background: var(--neutral-black);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.social-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.social-card {
    background: var(--neutral-light);
    border: 1px solid var(--neutral-medium);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.social-card:hover {
    transform: translateX(6px);
    border-color: var(--primary-medium);
    box-shadow: var(--shadow-md);
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    color: var(--neutral-white);
    font-size: 1.3rem;
}

.social-icon.youtube {
    background: #ff0000;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.email {
    background: var(--primary);
}

.social-details h4 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--neutral-dark);
}

.social-details p {
    font-size: 0.85rem;
    color: var(--neutral-gray);
    margin-bottom: 0.2rem;
}

.social-details a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-medium);
}

.address-box {
    background: var(--primary-pale);
    border: 1px dashed var(--primary-medium);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
}

.address-box h4 {
    color: var(--primary-dark);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.address-box p {
    font-size: 0.9rem;
    color: var(--neutral-dark);
    line-height: 1.5;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: linear-gradient(135deg, var(--neutral-black) 0%, var(--primary-dark) 100%);
    color: var(--neutral-white);
    padding: 4rem 0 2rem 0;
    border-top: 4px solid var(--accent);
}

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

.footer-brand h3 {
    color: var(--neutral-white);
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-heading);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.footer-brand-logo img {
    height: 40px;
}

.footer-brand-logo h4 {
    color: var(--neutral-white);
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.footer-links h4, .footer-contact h4 {
    color: var(--accent-light);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

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

.footer-links a:hover {
    color: var(--accent-light);
    padding-left: 4px;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a:hover {
    color: var(--accent-light);
}

/* ==========================================================================
   MODAL DIALOG POPUPS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-normal);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--neutral-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--neutral-medium);
    transform: translateY(30px);
    transition: var(--transition-normal);
    position: relative;
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 32px;
    height: 32px;
    background: var(--neutral-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-dark);
    font-weight: 700;
    z-index: 10;
}

.modal-close:hover {
    background: var(--danger-pale);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-img-wrapper {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content-wrapper {
    padding: 2.5rem;
}

.modal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.modal-category {
    background: var(--primary-pale);
    color: var(--primary-medium);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.modal-date {
    font-size: 0.85rem;
    color: var(--accent-dark);
    font-weight: 600;
}

.modal-content-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.modal-body-text {
    font-size: 1.05rem;
    color: var(--neutral-dark);
    line-height: 1.7;
    text-align: justify;
    white-space: pre-line; /* Preserves administrative paragraph breaks from dashboard text */
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero {
        height: auto;
        padding: 6rem 0;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-prayer-widget {
        max-width: 420px;
        margin: 0 auto;
    }
    
    .sejarah-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Navbar styling on Mobile */
    .nav-links {
        position: fixed;
        top: 96px; /* Below marquee + header ordinary height */
        left: -100%;
        width: 100%;
        height: calc(100vh - 96px);
        background: var(--neutral-white);
        flex-direction: column;
        align-items: center;
        padding: 4rem 2rem;
        gap: 2.5rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        z-index: 98;
    }
    
    .nav-links.open {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .prayer-info-bar {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .visi-misi-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .widget-time {
        font-size: 3rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .vm-card {
        padding: 2rem;
    }
}

/* ==========================================================================
   GALERI FOTO SECTION & LIGHTBOX MODAL
   ========================================================================== */

.gallery-section {
    background: var(--neutral-white);
}

/* Premium Banner Slider */
.gallery-slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    max-width: 960px; /* Wider spacious layout */
    margin: 3rem auto 0 auto;
    padding: 0 1rem;
}

.gallery-slider-container {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    border: 2px solid rgba(245, 158, 11, 0.25); /* Premium light gold accent */
    background: var(--primary-dark);
    touch-action: pan-y; /* Allow vertical scroll, handle horizontal swipe via JS */
}

.gallery-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

/* Individual Slide Card */
.gallery-slide-card {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    background: var(--primary-dark);
}

.gallery-slide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-slide-card:hover img {
    transform: scale(1.05); /* Soft, subtle zoom on hover */
}

/* Elegant Widescreen Overlay with solid text legibility */
.gallery-slide-card .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(2, 44, 34, 0.95) 0%, rgba(2, 44, 34, 0.4) 60%, rgba(2, 44, 34, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    opacity: 1; /* Always visible for gorgeous visual look */
    transition: background 0.3s ease;
}

.gallery-slide-card:hover .gallery-overlay {
    background: linear-gradient(to top, rgba(2, 44, 34, 0.98) 0%, rgba(2, 44, 34, 0.5) 60%, rgba(2, 44, 34, 0) 100%);
}

.gallery-slide-card .gallery-overlay h3 {
    color: var(--accent-light);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    transition: var(--transition-normal);
}

.gallery-slide-card .gallery-overlay p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.5;
    max-width: 80%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-normal);
}

/* Carousel Control Buttons */
.carousel-control-btn {
    background: var(--neutral-white);
    border: 1px solid var(--neutral-medium);
    color: var(--primary-dark);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    z-index: 10;
    flex-shrink: 0;
}

.carousel-control-btn:hover {
    background: var(--primary);
    color: var(--neutral-white);
    border-color: var(--primary);
    box-shadow: var(--shadow-premium);
    transform: scale(1.1);
}

.carousel-control-btn:active {
    transform: scale(0.95);
}

/* Modern Slider Pagination Dots */
.gallery-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(6, 78, 59, 0.25);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.slider-dot:hover {
    background-color: rgba(6, 78, 59, 0.6);
}

.slider-dot.active {
    width: 24px; /* Transitions to horizontal capsule pill */
    border-radius: 4px;
    background-color: #f59e0b; /* Bright golden accent for active slide */
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* Responsive adjustment for Widescreen Banner Slider */
@media (max-width: 1024px) {
    .gallery-slider-wrapper {
        max-width: 100%;
        gap: 1rem;
    }
    .gallery-slider-container {
        height: 360px;
    }
}

@media (max-width: 768px) {
    .gallery-slider-wrapper {
        flex-direction: column-reverse; /* Put side buttons at the bottom under the slider, or hide them and rely on touch swipe */
        gap: 1rem;
    }
    .gallery-slider-container {
        height: 280px;
    }
    .carousel-control-btn {
        display: none !important; /* Hide side arrows on mobile, completely swipe-reliant and saves space */
    }
    .gallery-slide-card .gallery-overlay {
        padding: 1.5rem;
    }
    .gallery-slide-card .gallery-overlay h3 {
        font-size: 1.2rem;
    }
    .gallery-slide-card .gallery-overlay p {
        font-size: 0.85rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .gallery-slider-container {
        height: 220px;
    }
}

/* Lightbox Premium Modal */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(2, 44, 34, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10002;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-light);
    transform: scale(1.1);
}

.lightbox-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 1000px;
    position: relative;
    gap: 1.5rem;
}

.lightbox-media-box {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
}

.lightbox-media-box img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

.lightbox-info {
    padding: 1.8rem;
    background-color: rgba(2, 44, 34, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.lightbox-info h3 {
    color: var(--accent-light);
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
}

.lightbox-info p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.lightbox-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10001;
    outline: none;
}

.lightbox-nav:hover {
    background: var(--accent);
    color: var(--neutral-white);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-content-wrapper {
        width: 95%;
        gap: 0.5rem;
    }
    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .lightbox-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }
    .lightbox-info {
        padding: 1.2rem;
    }
    .lightbox-info h3 {
        font-size: 1.1rem;
    }
    .lightbox-info p {
        font-size: 0.85rem;
    }
}

/* TV Mode Shortcut Button */
.tv-mode-shortcut-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-medium) 100%);
    color: var(--neutral-white) !important;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(6, 78, 59, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tv-mode-shortcut-btn:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    box-shadow: 0 6px 15px rgba(217, 119, 6, 0.35);
    transform: translateY(-2px);
    color: var(--neutral-white) !important;
}
