/* CSS VARIABLES */
:root {
    --max-width: 1200px;
    --nav-height: 100px;
    --brand-color: #25646b;
    --brand-hover: #1b4a4f;
    --highlight-bg: rgba(37, 100, 107, 0.08);
    --accent-teal: #25646b;
    --accent-teal-bg: rgba(37, 100, 107, 0.12);
    --accent-gold: #cba755;
    --accent-gold-bg: rgba(203, 167, 85, 0.15);
    --accent-sage: #73a38b;
    --accent-sage-bg: rgba(115, 163, 139, 0.15);
    --accent-emerald: #2e7d32;
    --accent-emerald-bg: rgba(46, 125, 50, 0.14);
    --text-main: #2d3436;
    --text-muted: #555555;
    --white: #ffffff;
    --bg-main: #f3f6f5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --input-bg: #f1f3f5;
    --input-focus-bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.dark-theme {
    --brand-color: #38a3a5;
    --brand-hover: #57cc99;
    --highlight-bg: rgba(56, 163, 165, 0.15);
    --accent-teal: #38a3a5;
    --accent-teal-bg: rgba(56, 163, 165, 0.20);
    --accent-gold: #e5bd68;
    --accent-gold-bg: rgba(229, 189, 104, 0.22);
    --accent-sage: #8ec4a8;
    --accent-sage-bg: rgba(142, 196, 168, 0.22);
    --accent-emerald: #57cc99;
    --accent-emerald-bg: rgba(87, 204, 153, 0.22);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --bg-main: #0b1315;
    --bg-card: #142124;
    --bg-header: #142124;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: #1e2e31;
    --input-focus-bg: #142124;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    width: 38px;
    height: 38px;
}

.theme-toggle-btn:hover {
    background-color: var(--highlight-bg);
    transform: scale(1.05);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Toggle icons depending on current theme */
.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.dark-theme .sun-icon {
    display: block;
}

.dark-theme .moon-icon {
    display: none;
}

/* Mobile Theme Switcher Styles */
.mobile-theme-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-theme-switch .theme-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-color);
}

.mobile-theme-btn {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-color);
    background-color: var(--input-bg);
}

.mobile-theme-btn .mode-text-light {
    display: none;
}

.mobile-theme-btn .mode-text-dark {
    display: inline;
}

.dark-theme .mobile-theme-btn .mode-text-light {
    display: inline;
}

.dark-theme .mobile-theme-btn .mode-text-dark {
    display: none;
}

/* --- RESET & GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: ambientFadeIn 0.5s ease-out both;
}

@keyframes ambientFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 25px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.home-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    padding: 20px 20px;
    gap: 20px;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: clip;
}

/* --- NAVIGATION --- */
#navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

nav {
    background: var(--bg-card);
    height: var(--nav-height);
    box-shadow: var(--shadow);
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-flex {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-left, .nav-right { 
    flex: 1; 
    display: flex; 
    align-items: center; 
}

.nav-right { 
    justify-content: flex-end; 
    gap: 25px; 
}

.nav-center {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    height: 100%;
    padding: 0 10px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    padding: 12px 14px;
    text-decoration: none;
    color: var(--brand-color);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.has-dropdown .nav-link::after {
    content: '▾';
    margin-left: 6px;
    font-size: 0.8rem;
    opacity: 0.5;
}

.nav-item:hover .nav-link {
    background-color: var(--highlight-bg);
    transform: translateY(-2px);
}

/* --- DROPDOWN MENU --- */
.dropdown-menu {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    min-width: 220px;
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--brand-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background-color: var(--highlight-bg);
}

/* --- SEARCH & LANG --- */
.search-bar {
    background: var(--input-bg);
    color: var(--text-main);
    border: 2px solid transparent;
    padding: 10px 16px;
    border-radius: 30px;
    outline: none;
    width: 140px;
    font-weight: 600;
    transition: all 0.3s;
}

.search-bar:focus { 
    border-color: var(--brand-color); 
    width: 180px; 
    background: var(--input-focus-bg); 
}

.lang-switch { 
    font-size: 0.85rem; 
    font-weight: 800; 
    color: var(--brand-color); 
    white-space: nowrap; 
}

.lang-switch a { 
    text-decoration: none; 
    color: inherit; 
    opacity: 0.5; 
}

.lang-switch .active { 
    opacity: 1; 
}

/* --- MAIN PAGE CONTENT --- */
/* Hero (Home Page) */
.hero { 
    text-align: center; 
    padding: 120px 0; 
}

.hero h1 { 
    font-size: 3.5rem; 
    color: var(--brand-color); 
    margin-bottom: 20px; 
}

/* Sub-Page Content */
.page-header {
    background-color: var(--bg-header);
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    color: var(--brand-color);
    font-size: 2.5rem;
    font-weight: 800;
}

.page-content {
    padding: 80px 0;
    flex: 1;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-main);
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-grid > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.sidebar-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color); /* Strict enforcement: no green top border */
    align-self: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* --- FOOTER --- */
footer {
    background-color: var(--brand-color);
    color: var(--white);
    padding: 60px 0 30px 0;
    margin-top: auto;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 2.5fr 1fr 1fr 2fr; 
    gap: 40px; 
    margin-bottom: 40px; 
}

.footer-logo h2 { font-size: 1.6rem; margin-bottom: 15px; }
.footer-logo .footer-tagline { font-size: 0.95rem; opacity: 0.8; max-width: 320px; margin-bottom: 20px; }

/* Footer Contact Info */
.footer-contact {
    margin-top: 25px;
    margin-bottom: 20px;
}

.footer-contact h4 {
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    opacity: 0.95;
    font-weight: 700;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.4;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-item a:hover {
    opacity: 1;
    text-decoration: underline;
}

.contact-icon-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.9;
}

.footer-links h4 { 
    margin-bottom: 20px; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1.5px; 
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }

.footer-links ul li a { 
    color: var(--white); 
    text-decoration: none; 
    opacity: 0.7; 
    font-size: 0.95rem; 
}

.footer-links ul li a:hover { opacity: 1; }

/* Footer Social & Map Styles */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--white);
    color: var(--brand-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

.footer-map {
    display: flex;
    flex-direction: column;
}

.footer-map h4 {
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
}

.map-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 30px; 
    text-align: center; 
    font-size: 0.85rem; 
    opacity: 0.5; 
}

/* --- RESPONSIVE QUERIES --- */

/* Logo styling */
.logo-img {
    height: 60px;
    max-width: 100%;
    object-fit: contain;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.hamburger-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--brand-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation when active */
.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Drawer Styles */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: var(--bg-card);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1005;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 90px 24px 24px 24px;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    display: none; /* Hide redundant drawer header since hamburger turns into an 'X' and handles toggling */
}

.close-btn {
    display: none; /* Hide redundant &times; close button */
}

.drawer-content {
    overflow-y: auto;
    flex: 1;
}

.mobile-search {
    margin-bottom: 30px;
}

.mobile-search .search-bar {
    width: 100%;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-link {
    display: block;
    text-decoration: none;
    color: var(--brand-color);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-has-submenu {
    border-bottom: 1px solid var(--border-color);
}

.mobile-submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--brand-color);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 10px 0;
    cursor: pointer;
    text-align: left;
}

.mobile-submenu-toggle .arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.mobile-has-submenu.active .mobile-submenu-toggle .arrow {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding-left: 20px;
    display: none;
    margin-bottom: 10px;
}

.mobile-has-submenu.active .mobile-submenu {
    display: block;
}

.mobile-submenu li a {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.mobile-submenu li a:hover {
    color: var(--brand-color);
}

.mobile-lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-top: 20px;
    color: var(--brand-color);
}

.mobile-lang-switch a {
    text-decoration: none;
    color: inherit;
    opacity: 0.5;
}

.mobile-lang-switch a.active {
    opacity: 1;
}

.mobile-lang-switch .lang-label {
    font-weight: 500;
    color: var(--text-muted);
}

/* Hide elements earlier to prevent layout breaking */
@media (max-width: 1180px) {
    #navbar {
        position: relative;
    }
    .nav-center { 
        display: none; 
    }
    .nav-right .search-container {
        display: none;
    }
    #theme-toggle-btn {
        display: none;
    }
    .hamburger-btn {
        display: flex;
    }
}

/* Stack footer grid and content grid on tablet/mobile */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    .footer-logo .footer-tagline {
        margin: 0 auto 20px auto;
    }
    .contact-item {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom {
        padding-top: 20px;
    }
}

/* Stack content grid and sidebar on mobile */
@media (max-width: 1000px) {
    .content-grid { 
        grid-template-columns: 1fr; 
    }
}

/* --- UNDER CONSTRUCTION STYLES --- */

/* Centers the hero content vertically between nav and footer */
main.container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1; /* This ensures it pushes the footer down */
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Extra large responsive text */
    color: var(--brand-color);
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.8;
}

.construction-tag {
    display: inline-block;
    background-color: var(--highlight-bg);
    color: var(--brand-color);
    padding: 8px 24px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 30px;
    border: 2px solid var(--brand-color);
}

.construction-line {
    width: 60px;
    height: 4px;
    background-color: var(--brand-color);
    margin: 40px auto 0;
    border-radius: 2px;
    opacity: 0.3;
}

/* =========================================
   BOARD MEMBERS LIST STYLES
   ========================================= */

.member-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between each member */
    margin-top: 15px;
}

.member-card {
    display: flex;
    align-items: center;
    background-color: var(--bg-card); /* Very light gray background */
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow); /* Optional subtle shadow */
}

/* The Circular Crop Profile Picture */
.member-photo {
    width: 90px;             /* Size of the circle */
    height: 90px;            /* Must match width */
    border-radius: 50%;      /* Makes it a circle */
    object-fit: cover;       /* Prevents image distortion/stretching */
    margin-right: 25px;      /* Space between picture and text */
    /* Optional: Add a colored border to match your brand */
    /* border: 3px solid #0056b3; */ 
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    color: var(--text-main);
}

.member-position {
    margin: 0;
    font-size: 1rem;
    color: var(--text-muted); /* Subdued color for the position */
    font-weight: 500;
    font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .member-card {
        flex-direction: column;
        text-align: center;
    }
    .member-photo {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* =========================================
   NEWS PAGE STYLES
   ========================================= */

.news-list, .events-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.news-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card.has-image {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.news-thumbnail-container {
    flex: 0 0 220px;
    width: 220px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
}

.news-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-thumbnail-img {
    transform: scale(1.05);
}

.news-content-wrapper {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .news-card.has-image {
        flex-direction: column;
        gap: 20px;
    }
    .news-thumbnail-container {
        width: 100%;
        height: 180px;
        flex: none;
    }
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.news-tag {
    background-color: var(--highlight-bg);
    color: var(--brand-color);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-date {
    color: var(--text-muted);
    font-weight: 500;
}

.news-title {
    font-size: 1.6rem;
    color: var(--brand-color);
    margin-top: 5px;
    margin-bottom: 12px;
    font-weight: 800;
}

.news-summary {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.news-expanded-content {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.7;
    border-top: 1px dashed var(--border-color);
    margin-top: 15px;
    padding-top: 10px;
}

.news-readmore-btn {
    background: transparent;
    border: none;
    color: var(--brand-color);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 15px;
    display: inline-block;
    transition: color 0.2s ease;
}

.news-readmore-btn:hover {
    color: #1a474c;
    text-decoration: underline;
}

.news-loading, .news-empty, .news-error {
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

/* =========================================
   PROGRAM PAGE STYLES
   ========================================= */

.program-hero-wrapper {
    width: 100%;
    max-height: 380px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.program-hero-img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

.signup-submit-btn {
    background-color: var(--brand-color);
    color: var(--white);
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
}

.signup-submit-btn:hover {
    background-color: #1a474c;
}

.signup-submit-btn:active {
    transform: scale(0.98);
}

.signup-success-box {
    background-color: #e6fcf5;
    border: 1px solid #c3fae8;
    color: #0ca678;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 15px;
}

/* =========================================
   PAGINATION STYLES
   ========================================= */

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding: 15px 0;
}

.pagination-btn {
    background-color: var(--white);
    color: var(--brand-color);
    border: 1px solid var(--brand-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--brand-color);
    color: var(--white);
}

.pagination-btn:disabled {
    border-color: #eaeaea;
    color: #999;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.pagination-info {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

/* =========================================
   INTERACTIVE SEARCH OVERLAY STYLES
   ========================================= */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-overlay.active {
    display: flex;
}

.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.search-overlay-card {
    position: relative;
    width: 90%;
    max-width: 700px;
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 10;
    overflow: hidden;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    animation: searchSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes searchSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-overlay-header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
    background-color: var(--bg-card);
}

.search-icon-svg {
    width: 22px;
    height: 22px;
    color: #888;
}

#overlay-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.15rem;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
}

.search-overlay-close-btn {
    border: none;
    background: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.search-overlay-close-btn:hover {
    color: var(--brand-color);
}

.search-overlay-results {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    background-color: var(--bg-main);
}

.search-placeholder-text {
    text-align: center;
    color: #777;
    font-size: 1rem;
    padding: 40px 0;
}

.search-loading, .search-error, .search-no-results {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.search-no-results p {
    font-size: 1rem;
    margin-top: 8px;
}

.search-summary-info {
    font-size: 0.85rem;
    color: #777;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-group {
    margin-bottom: 30px;
}

.search-group:last-child {
    margin-bottom: 10px;
}

.search-group-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--brand-color);
    border-bottom: 2px solid var(--brand-color);
    padding-bottom: 6px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-group-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    display: block;
    padding: 15px 18px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    position: relative;
}

.search-result-item:hover {
    border-color: var(--brand-color);
    background-color: var(--highlight-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.result-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.result-snippet {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.45;
    margin-bottom: 6px;
}

.result-type-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-program {
    background-color: #e3f2fd;
    color: #1565c0;
}

.type-event {
    background-color: #efebe9;
    color: #4e342e;
}

.type-news {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.search-highlight {
    background-color: rgba(254, 240, 138, 0.6);
    color: inherit;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* =========================================
   HOMEPAGE CUSTOM DESIGN STYLES
   ========================================= */

.home-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    padding: 50px 60px;
    margin-top: 10px;
    margin-bottom: 30px;
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.home-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero-subtitle {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-color);
    margin-bottom: 12px;
}

.home-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--brand-color);
    line-height: 1.2;
    margin-bottom: 20px;
}

.home-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 580px;
}

.btn-group {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--brand-color);
    color: var(--white);
    border: 2px solid var(--brand-color);
    box-shadow: 0 4px 12px rgba(37, 100, 107, 0.2);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 100, 107, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--brand-color);
    border: 2px solid var(--brand-color);
}

.btn-secondary:hover {
    background-color: var(--highlight-bg);
    transform: translateY(-2px);
}

.home-hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.home-hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: 100%;
}

.home-hero-image-wrapper:hover {
    transform: translateY(-5px);
}

.home-hero-image-wrapper.hero-logo-card {
    background: linear-gradient(145deg, #ffffff 0%, #f4f9f9 100%);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px 35px;
    min-height: 320px;
}

.home-hero-logo-placeholder {
    max-width: 88%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(37, 100, 107, 0.1));
}

.home-hero-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.home-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.home-section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--brand-color);
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
}

.home-section-subtitle {
    font-size: 1.05rem;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Highlights Grid styling */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.highlight-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.highlight-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-color);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.highlight-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--highlight-bg);
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.highlight-card:hover .highlight-icon-wrapper {
    background-color: var(--brand-color);
    color: var(--white);
}

.highlight-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.highlight-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--brand-color);
}

.highlight-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* About Split styling */
.about-split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.about-split-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.about-split-text h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    color: var(--brand-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-split-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Partners & Sponsors Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 15px;
}

.partner-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px 20px;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.partner-logo-card:hover {
    border-color: var(--brand-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.partner-logo-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.partner-badge-icon {
    font-size: 1.8rem;
    color: var(--brand-color);
    display: flex;
    align-items: center;
}

.partner-badge-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.partner-status {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--brand-color);
    background-color: var(--highlight-bg);
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-top: 8px;
    display: inline-block;
}

.partner-status.potential {
    color: #b45309;
    background-color: #fef3c7;
}

/* Join CTA banner */
.join-banner {
    background-color: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px;
    text-align: center;
    box-shadow: var(--shadow);
}

.join-banner h3 {
    font-size: 1.8rem;
    color: var(--brand-color);
    margin-bottom: 15px;
}

.join-banner p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Responsive Overrides */
@media (max-width: 990px) {
    .home-hero {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 40px 30px;
    }
    .home-hero-text {
        align-items: center;
    }
    .home-hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .about-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-split-image {
        order: -1;
        height: 320px;
    }
}

@media (max-width: 576px) {
    .home-hero {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .home-section {
        padding: 60px 0;
    }
    .join-banner {
        padding: 40px 24px;
    }
}

/* =========================================
   HORIZONTAL SCROLLABLE GALLERY HERO
   ========================================= */
.gallery-showcase {
    position: relative;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 30px;
}

.gallery-container-wrapper {
    position: relative;
    width: 100%;
}

.gallery-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-color) rgba(0, 0, 0, 0.05);
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar styling */
.gallery-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--brand-color);
    border-radius: 10px;
}

.gallery-card {
    flex: 0 0 320px;
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: linear-gradient(145deg, #ffffff 0%, #edf7f8 100%);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(37, 100, 107, 0.18);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card img.gallery-card-placeholder-logo {
    width: 70%;
    height: auto;
    max-height: 55px;
    object-fit: contain;
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-card:hover img.gallery-card-placeholder-logo {
    transform: translateX(-50%) scale(1.05);
    opacity: 1;
}

.gallery-card:hover img:not(.gallery-card-placeholder-logo) {
    transform: scale(1.04);
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(23, 68, 73, 0.96) 0%, rgba(23, 68, 73, 0.72) 48%, rgba(23, 68, 73, 0) 85%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    color: var(--white);
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 800;
    background-color: var(--brand-color);
    color: #ffffff;
    padding: 3px 9px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.gallery-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #ffffff !important;
}

/* Gallery Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: bold;
}

.gallery-nav-btn:hover {
    background-color: var(--brand-color);
    color: #ffffff;
    border-color: var(--brand-color);
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav-btn.prev {
    left: -15px;
}

.gallery-nav-btn.next {
    right: -15px;
}

@media (max-width: 768px) {
    .gallery-nav-btn {
        display: none;
    }
    .gallery-card {
        flex: 0 0 270px;
    }
}

/* Partners Compact Auto-Scrolling Section */
.partners-section {
    margin-top: 25px;
    margin-bottom: 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
}

.partners-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.partners-title-block {
    text-align: center;
}

.partners-subtitle {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--brand-color);
    display: block;
    margin-bottom: 2px;
}

.partners-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.partners-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 8px 0;
    display: flex;
    /* Edge fading mask */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 24px;
    width: max-content;
    animation: partners-scroll 25s linear infinite;
}

.partners-slider:hover .partners-track {
    animation-play-state: paused;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 16px;
    height: 48px;
    min-width: 150px;
    transition: all 0.25s ease;
}

.partner-item:hover {
    transform: translateY(-2px);
    border-color: var(--brand-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.partner-item img {
    height: 30px;
    max-width: 130px;
    object-fit: contain;
    filter: grayscale(100%) opacity(70%);
    transition: all 0.25s ease;
}

.partner-item:hover img {
    filter: grayscale(0%) opacity(100%);
}

@keyframes partners-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .partners-section {
        padding: 16px 20px;
    }
    .partners-title {
        font-size: 1.2rem;
    }
    .partner-item {
        padding: 5px 12px;
        height: 42px;
        min-width: 120px;
    }
    .partner-item img {
        height: 24px;
    }
    .partners-track {
        gap: 16px;
    }
}

/* Get Involved Feature Cards & Vector Badges */
.get-involved-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.get-involved-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 100, 107, 0.25);
}

.dark-theme .get-involved-card:hover {
    border-color: rgba(56, 163, 165, 0.35);
}

.involved-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.get-involved-card:hover .involved-icon-badge {
    transform: scale(1.1);
}

.involved-icon-badge.teal {
    background: var(--accent-teal-bg);
    color: var(--accent-teal);
    border: 1px solid rgba(37, 100, 107, 0.18);
}

.involved-icon-badge.gold {
    background: var(--accent-gold-bg);
    color: var(--accent-gold);
    border: 1px solid rgba(203, 167, 85, 0.25);
}

.involved-icon-badge.sage {
    background: var(--accent-sage-bg);
    color: var(--accent-sage);
    border: 1px solid rgba(115, 163, 139, 0.25);
}

.involved-icon-badge.emerald {
    background: var(--accent-emerald-bg);
    color: var(--accent-emerald);
    border: 1px solid rgba(46, 125, 50, 0.22);
}

.involved-icon-badge svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

