/* public_html/assets/css/style.css */

/* =========================================
   1. CSS VARIABLES (Theming Engine)
========================================= */
:root {
    /* Light Theme (Default) */
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --primary-color: #26B9FF; /* Legacy brand blue */
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-color: #0f172a; 
    --surface-color: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-color: #38bdf8; 
    --nav-bg: rgba(15, 23, 42, 0.95);
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
}

/* =========================================
   2. BASE RESET & ACCESSIBILITY
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Make all paragraphs perfectly justified */
p {
    text-align: justify;
}

/* =========================================
   3. HEADER & NAVIGATION
========================================= */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 1rem;       
    padding-inline: 5%;        
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Premium Logo Typography */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    line-height: 1.1;
}

.brand-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Desktop Navigation */
.primary-nav .nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Premium Navigation Links */
.primary-nav a, 
.dropdown-trigger {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    position: relative; /* Crucial for hover trick */
    transition: color 0.3s ease;
}

/* Sliding Underline Hover Trick */
.primary-nav a::after,
.dropdown-trigger::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.primary-nav a:hover::after,
.dropdown-trigger:hover::after,
.dropdown-trigger[aria-expanded="true"]::after {
    width: 100%;
}

.primary-nav a:hover, 
.dropdown-trigger:hover,
.utility-btn:hover {
    color: var(--primary-color);
}

/* Animated Caret (Dropdown Arrow) */
.caret {
    transition: transform 0.3s ease;
}

.dropdown-trigger[aria-expanded="true"] .caret {
    transform: rotate(180deg); 
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0; 
    background-color: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    min-width: 200px;
    list-style: none;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-trigger[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Remove ::after line specifically for dropdown items */
.dropdown-menu a::after {
    display: none;
}

/* Utility Buttons */
.header-utilities {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.utility-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Mobile Responsive Navigation */
.mobile-toggle {
    display: none; 
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--nav-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        display: none; 
    }

    .primary-nav.is-open {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

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

    .dropdown-menu {
        position: static; 
        box-shadow: none;
        border: none;
        border-inline-start: 2px solid var(--primary-color);
        padding-inline-start: 1rem;
        display: none; 
    }

    .dropdown-trigger[aria-expanded="true"] + .dropdown-menu {
        display: block;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   4. LAYOUT UTILITIES & TYPOGRAPHY
========================================= */
.section-padding {
    padding: 5rem 0; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto; 
}

.grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .grid-half {
        grid-template-columns: 1fr; 
        gap: 2rem;
        text-align: center;
    }
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.title-underline {
    height: 3px;
    width: 60px;
    background-color: var(--primary-color);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .title-underline {
        margin: 0 auto 1.5rem auto; 
    }
}

.about-preview p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-muted); 
}

.rounded-image {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.shadow-large {
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
}

/* =========================================
   5. HERO SECTION
========================================= */
.hero-section {
    position: relative;
    min-height: 85vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.85));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
    color: #ffffff; 
}

.hero-art {
    max-width: 120px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255,255,255,0.2);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-family: 'Playfair Display', serif; 
    line-height: 1.2;
    margin-bottom: 1rem;
}

.text-highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
    
    /* THE CENTERING TRICK */
    display: block !important;
    width: 100%;
    text-align: center !important;
    margin: 0 auto 2rem auto; /* Keeps it centered but leaves 2rem space at the bottom */
}
/* Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap; 
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: var(--bg-color);
}

/* =========================================
   6. SCROLL ANIMATION CLASSES
========================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }
.delay-4 { transition-delay: 0.7s; }

/* =========================================
   7. BISHOP MESSAGE & NEWS SECTIONS
========================================= */
.bg-surface {
    background-color: var(--surface-color); 
}

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

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.subtitle {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.border-accent {
    border-bottom: 5px solid var(--primary-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.news-date {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.news-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.news-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1; 
}

.news-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--text-main);
}

/* =========================================
   8. MAIN FOOTER
========================================= */
.site-footer {
    background-color: #0f172a; 
    color: #f1f5f9;
    padding-top: 5rem;
    margin-top: 4rem;
    border-top: 4px solid var(--primary-color);
}

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

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; 
        text-align: center;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .footer-logo {
        justify-content: center;
    }
}

.footer-about {
    color: #94a3b8;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li, .footer-contact li {
    margin-bottom: 0.75rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links a, .footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--primary-color);
    padding-left: 5px; 
}

.social-links {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .social-links {
        justify-content: center;
    }
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    background-color: #020617; 
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #64748b;
}

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

@media (max-width: 768px) {
    .bottom-flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
/* =========================================
   9. INTERIOR PAGES (History, Worship, etc.)
========================================= */

/* The shorter header for sub-pages */
.page-header {
    position: relative;
    padding: 6rem 0; /* Shorter than the homepage hero */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
}

.relative { position: relative; }
.z-10 { z-index: 10; }

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--primary-color);
    
    /* THE CENTERING TRICK */
    display: block !important;
    width: 100%;
    text-align: center !important;
    margin: 0 auto;
}

/* Constrain the width of reading text so it looks like a premium article */
.article-container {
    max-width: 800px;
    margin: 0 auto;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}
/* =========================================
   10. WORSHIP TIMINGS (Schedule Layout)
========================================= */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.schedule-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.schedule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 1.5rem;
    text-align: center;
}

.card-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0;
}

.card-body {
    padding: 2rem;
}

.timing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timing-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.timing-list li:last-child {
    border-bottom: none;
}

.service-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.05rem;
}

.service-time {
    background-color: var(--surface-color);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.schedule-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    line-height: 1.5;
}
/* =========================================
   11. FORMER VICARS (Grid Layout)
========================================= */
.mb-5 {
    margin-bottom: 3rem;
}

.vicar-grid {
    display: grid;
    /* This automatically creates as many columns as will fit on the screen */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.vicar-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.vicar-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; /* Keeps all portrait photos exactly the same size! */
    overflow: hidden;
    background-color: var(--surface-color); /* Acts as a placeholder color if no image */
}

.vicar-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the box without stretching */
    transition: transform 0.5s ease;
}

.vicar-card:hover .vicar-image {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

.vicar-info {
    padding: 1.5rem;
}

.vicar-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.vicar-years {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}
/* =========================================
   12. PREMIUM MOBILE HEADER OVERRIDES
========================================= */
@media (max-width: 768px) {
    
    /* 1. App-Style Reordering */
    .header-container {
        padding-inline: 1rem; /* Gives perfect edge spacing on phones */
    }

    .mobile-toggle {
        display: block;
        order: 1; /* Forces the Hamburger to the far left */
        margin-right: auto; /* Pushes the logo to the center */
    }

    .brand-logo {
        order: 2; /* Forces the Logo to the center */
        margin: 0 auto;
        gap: 8px; /* Tighter spacing between crest and text */
        position: absolute; /* The ultimate trick for perfect dead-center alignment */
        left: 50%;
        transform: translateX(-50%);
    }

    .header-utilities {
        order: 3; /* Forces the Icons to the far right */
        margin-left: auto; /* Pushes away from the center */
        gap: 0.5rem; /* Gives the icons breathing room */
    }

    /* 2. Refined Mobile Typography & Logo Size */
    .brand-logo img {
        width: 50px !important; /* Scales the 85px desktop logo down for mobile */
        height: 50px !important;
    }

    .brand-title {
        font-size: 1.1rem; /* Scales down the main name */
        line-height: 1;
    }

    .brand-subtitle {
        font-size: 0.55rem; /* Scales down the subtitle */
        letter-spacing: 1px;
    }
}
/* =========================================
   13. DESKTOP SPACING & PREMIUM GOOGLE TRANSLATE
========================================= */

/* Add breathing room between "Contact" and the Theme icon on Desktop */
@media (min-width: 769px) {
    .header-utilities {
        margin-left: 3rem; /* Pushes the icons away from the menu */
        border-left: 1px solid var(--border-color); /* Adds an elegant separator line */
        padding-left: 1.5rem;
    }
}

/* Premium Styling for Google Translate Dropdown */
#google_translate_element select {
    background-color: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

#google_translate_element select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Hide the ugly "Powered by Google" branding and top banner */
.goog-te-gadget {
    font-family: 'Montserrat', sans-serif !important;
    color: transparent !important; 
    font-size: 0 !important;
}
.goog-te-gadget .goog-logo-link {
    display: none !important;
}
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important; /* Prevents the screen from shifting down */
}
/* =========================================
   14. TRANSLATOR LAYOUT FIXES (Desktop & Mobile)
========================================= */

/* 1. Prevent Church Name from ever wrapping and breaking */
.brand-text {
    white-space: nowrap !important;
    min-width: max-content !important;
}

/* 2. Compact the Desktop Navigation to make room for the Translator */
.primary-nav .nav-list {
    gap: 1rem; /* Reduces gap slightly to fit the new widget */
}

/* Tighten navigation even more on smaller laptops/tablets */
@media (max-width: 1200px) and (min-width: 769px) {
    .primary-nav .nav-list {
        gap: 0.5rem;
    }
    .primary-nav a, .dropdown-trigger {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }
}

/* 3. Constrain the Google Translate Widget width */
#google_translate_element select {
    max-width: 140px; /* Prevents it from pushing layout out */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* 4. Fix Mobile Overlap (Safe Flexbox Centering) */
@media (max-width: 768px) {
    .brand-logo {
        position: static !important; /* Removes absolute positioning */
        transform: none !important;  /* Removes rigid alignment */
        flex-grow: 1;                /* Naturally takes the middle space */
        justify-content: center;     /* Safely centers within available space */
    }
    
    #google_translate_element select {
        max-width: 95px; /* Makes translator very compact on phones */
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }

    .header-utilities {
        gap: 0.25rem; /* Squeezes right-side icons a bit closer */
    }
}
/* =========================================
   15. DESKTOP OVERFLOW FIX (Laptops)
========================================= */

@media (min-width: 769px) {
    /* Change the hard-coded margin to 'auto' so it stops pushing off-screen */
    .header-utilities {
        margin-left: auto !important; 
        padding-left: 1rem !important;
    }
}

/* Compress the header elements specifically for laptops and standard monitors */
@media (max-width: 1300px) and (min-width: 769px) {
    .primary-nav .nav-list {
        gap: 0.5rem !important; /* Squeeze the menu items closer */
    }
    
    .primary-nav a, .dropdown-trigger {
        font-size: 0.7rem !important; /* Slightly smaller text */
        letter-spacing: 0.5px !important; /* Tighter letter spacing */
    }
    
    /* Safely scale down the logo text so it doesn't hog space */
    .brand-title {
        font-size: 1.1rem !important;
    }
    .brand-subtitle {
        font-size: 0.55rem !important;
    }
    
    .brand-logo img {
        width: 65px !important; /* Scale down from 85px to save room */
        height: 65px !important;
    }
    
    #google_translate_element select {
        max-width: 110px !important; /* Compress translator box */
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
    }
}
/* =========================================
   13. DEDICATED LANGUAGE BAR (Sub-Header)
========================================= */
.language-bar {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color); /* Separates it from the main nav */
    padding: 0.4rem 5%;
    display: flex;
    justify-content: flex-end; /* Pushes translator to the right */
    align-items: center;
    gap: 0.75rem;
}

.lang-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Premium Styling for Google Translate Dropdown */
#google_translate_element select {
    background-color: var(--bg-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    max-width: 160px;
}

#google_translate_element select:hover {
    border-color: var(--primary-color);
}

/* Hide the ugly Google branding */
.goog-te-gadget {
    font-family: 'Montserrat', sans-serif !important;
    color: transparent !important; 
    font-size: 0 !important;
}
.goog-te-gadget .goog-logo-link { display: none !important; }
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0px !important; }

/* =========================================
   14. RESTORE HEADER SPACING
========================================= */
@media (min-width: 769px) {
    /* Push the dark mode icon away from the menu */
    .header-utilities {
        margin-left: auto; 
        border-left: 1px solid var(--border-color); 
        padding-left: 1.5rem;
    }
    
    /* Give the main nav its spacious gap back */
    .primary-nav .nav-list {
        gap: 1.5rem; 
    }
    
    .brand-text {
        white-space: nowrap;
    }
}
/* =========================================
   16. MANAGING COMMITTEE (Roster Grid)
========================================= */
.committee-grid {
    display: grid;
    /* Automatically sizes the boxes perfectly for both mobile and desktop */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.committee-card {
    background-color: var(--bg-color);
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.committee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.committee-role {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.committee-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}
/* =========================================
   17. PREMIUM FORMS (Prayer & Contact)
========================================= */
.form-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* The glow effect when you click on a box to type */
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 185, 255, 0.15);
    background-color: var(--bg-color);
}

textarea.form-control {
    resize: vertical; /* Allows the user to make the box taller, but not wider */
    min-height: 120px;
}

/* Make placeholder text softer */
::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
/* =========================================
   18. OFFERINGS & DONATIONS
========================================= */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.fund-card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    border-top: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.fund-title {
    font-family: 'Playfair Display', serif;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.fund-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Secure Bank Details Card */
.payment-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.payment-header {
    background-color: var(--surface-color);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.payment-header h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.payment-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.payment-body {
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

@media (max-width: 768px) {
    .payment-body {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

.bank-details p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
}

.bank-details p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bank-details strong {
    color: var(--text-muted);
    display: inline-block;
    width: 140px;
}

.qr-code-section {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.qr-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.qr-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.payment-footer {
    background-color: rgba(38, 185, 255, 0.05); /* Slight blue tint */
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.payment-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}
/* =========================================
   19. PHOTO GALLERY
========================================= */
.gallery-grid {
    display: grid;
    /* Automatically creates columns based on screen size */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4 / 3; /* Keeps all thumbnails uniform */
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1); /* Smooth zoom effect */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1; /* Fades in the dark gradient and text */
}

.gallery-caption {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}
/* =========================================
   20. VIDEO GALLERY
========================================= */
.video-grid {
    display: grid;
    /* Forces the videos to stay large and cinematic */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.video-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* The magic trick for perfect 16:9 YouTube videos */
.responsive-video {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

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

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.video-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
/* =========================================
   21. UPCOMING EVENTS
========================================= */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-card {
    display: flex;
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

/* The Bold Date Block on the Left */
.event-date-box {
    background-color: var(--primary-color);
    color: #ffffff;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.event-month {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-day {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.2rem;
}

/* The Event Details on the Right */
.event-details {
    padding: 1.5rem 2rem;
    flex-grow: 1;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Little icons for time and location */
.event-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.event-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Make it look perfect on mobile phones! */
@media (max-width: 600px) {
    .event-card {
        flex-direction: column; /* Stacks the box instead of side-by-side */
    }
    .event-date-box {
        flex-direction: row;
        gap: 0.5rem;
        padding: 1rem;
        min-width: auto;
    }
    .event-month {
        font-size: 1.2rem;
    }
    .event-day {
        font-size: 1.2rem;
        margin-top: 0;
    }
    .event-details {
        padding: 1.5rem;
    }
}
/* =========================================
   22. MEMBER DIRECTORY TABLE
========================================= */
.table-wrapper {
    background-color: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow-x: auto; /* Makes the table scrollable on small phone screens! */
    max-width: 1000px;
    margin: 0 auto;
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px; /* Ensures the table doesn't squish too much on mobile */
}

.directory-table th {
    background-color: var(--surface-color);
    padding: 1.2rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.directory-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.directory-table td strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Removes the border on the very last row so it looks clean */
.directory-table tr:last-child td {
    border-bottom: none;
}

/* Beautiful highlight effect when hovering over a member's row */
.directory-table tbody tr:hover td {
    background-color: rgba(38, 185, 255, 0.05); /* Soft blue tint */
}

/* Clean status badge */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}
/* =========================================
   23. READ MORE / EXPANDABLE CONTENT (FIXED)
========================================= */
.read-more-content {
    display: none; 
}

.read-more-state {
    display: none;
}
/* Combined Rule: Ensures the button is visible, centered, and a pill shape */
.read-more-trigger {
    display: flex; /* Changed from inline-flex */
    align-items: center;
    justify-content: center;
    width: max-content; /* This allows margin: auto to center it perfectly */
    min-width: 220px;
    min-height: 50px;
    cursor: pointer;
    padding: 0.8rem 2rem;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    margin: 2rem auto; /* This centers the button on the page */
    transition: all 0.3s ease;
    text-align: center;
}

.read-more-trigger:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* THE MAGIC: This rule actually reveals the text when the button is clicked */
.read-more-state:checked ~ .read-more-content {
    display: block !important;
}

/* This adds the actual words into the button when CLOSED */
.read-more-state:not(:checked) ~ .read-more-trigger::before {
    content: "Read Full History";
    display: inline-block;
    width: 100%;
}

/* This adds the words into the button when OPENED */
.read-more-state:checked ~ .read-more-trigger::before {
    content: "Show Less History";
    display: inline-block;
    width: 100%;
}
/* =========================================
   24. MAGIC LIGHTBOX & IMAGE FLOATS
========================================= */
/* Magazine Layout Floats */
.float-right-img {
    float: right; 
    width: 45%; 
    margin: 0.5rem 0 1.5rem 2rem;
}
.float-left-img {
    float: left; 
    width: 45%; 
    margin: 0.5rem 2rem 1.5rem 0;
}
@media (max-width: 768px) {
    .float-right-img, .float-left-img {
        float: none; width: 100%; margin: 0 0 1.5rem 0; display: block;
    }
}

/* Hover & Zoom Effects */
.img-zoomable {
    cursor: zoom-in;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}
.img-zoomable:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* The Fullscreen Lightbox Overlay */
#magic-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
}
#magic-lightbox.active {
    opacity: 1; pointer-events: auto; cursor: zoom-out;
}
#magic-lightbox img {
    max-width: 90vw; max-height: 90vh;
    border-radius: 8px; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.8); transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
#magic-lightbox.active img {
    transform: scale(1);
}