/* 1. CULTURAL COLOR PALETTE & GLOBAL STYLES */
:root {
    /* Primary Cultural Colors */
    --midnight-black: #1a1a1a;
    --madder-red: #a52a2a;      /* Traditional Blaan Tabih Red */
    --deep-madder: #7d1f1f;     /* Darker shade for borders/contrast */
    --abaca-cream: #f5f5dc;     /* Natural Abaca Fiber tone */
    --soft-abaca: #fdfdf5;      /* Lighter cream for subtle card backgrounds */
    --accent-gold: #c5a059;     /* Traditional Brasswork gold */
    --white: #ffffff;
    
    /* Traditional Beadwork Palette (Complete 5-color set) */
    --bead-red: #d94343;        /* Vibrant bead red */
    --bead-yellow: #f1c40f;     /* Vibrant bead yellow */
    --bead-blue: #2980b9;       /* Traditional bead blue */
    --bead-white: #dbf1fa;      /* Shell/Takmon sequins */
    --bead-black: #242526;      /* Charcoal black */

    /* UI & Text Utility */
    --text-main: #2d2d2d;       /* Darker than --text-gray for better accessibility */
    --text-gray: #4a4a4a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--abaca-cream);
    color: var(--text-main);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* --- Blaan BEADWORK UTILITIES --- */

/* Mimics a traditional row of beads (Black-Red-Yellow-White-Blue) */
.beadwork-strip {
    height: 8px;
    width: 100%;
    background: linear-gradient(to right, 
        var(--bead-black) 20%, 
        var(--bead-red) 20% 40%, 
        var(--bead-yellow) 40% 60%, 
        var(--bead-white) 60% 80%, 
        var(--bead-blue) 80%);
    border: none;
}

.beadwork-border-top {
    border-top: 8px solid;
    border-image: linear-gradient(to right, 
        var(--bead-black) 20%, 
        var(--bead-red) 20% 40%, 
        var(--bead-yellow) 40% 60%, 
        var(--bead-white) 60% 80%, 
        var(--bead-blue) 80%) 1;
}

/* 2. BRANDED HEADER & LOGO */
header {
    position: sticky;
    top: 0;
    background: rgba(245, 245, 220, 0.95); /* Light Theme Header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    z-index: 1000;
    overflow: visible;
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, 
        var(--bead-black) 20%, 
        var(--bead-red) 20% 40%, 
        var(--bead-yellow) 40% 60%, 
        var(--bead-white) 60% 80%, 
        var(--bead-blue) 80%) 1;
    transition: background 0.4s ease;
}

.branding .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main); /* Dark text for light header */
    transition: color 0.4s ease;
}

#main-logo {
    height: 60px;
    width: auto;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

.name-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.school-name {
    font-weight: 700;
    letter-spacing: 1px;
}

.school-sub {
    color: var(--accent-gold);
    letter-spacing: 2px;
    text-align: center;
}

/* 3. NAVIGATION & MOBILE TOGGLE */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links:not(.magic-nav) .list {
    margin-left: 18px;
}

.nav-links:not(.magic-nav) .icon {
    display: none; /* Hide icons in classic mode */
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.user-greeting {
    display: flex;
    align-items: center;
    padding-right: 15px;
    border-right: 2px solid rgba(0, 0, 0, 0.1);
}

.user-greeting .user-name {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--madder-red); /* Changed from gold for better contrast on light */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* --- MAGIC NAV STYLES (Enabled by .magic-nav class) --- */
.nav-links.magic-nav {
    position: relative;
    height: 70px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.nav-links.magic-nav ul {
    position: relative;
    display: flex;
    width: auto;
}

.nav-links.magic-nav ul li {
    position: relative;
    width: 80px;
    height: 70px;
    z-index: 1;
}

.nav-links.magic-nav ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.nav-links.magic-nav ul li a .icon {
    position: relative;
    display: block;
    line-height: 75px;
    font-size: 1.5em;
    transition: 0.5s;
    color: var(--text-main);
}

.nav-links.magic-nav ul li.active a .icon {
    transform: translateY(-28px);
    color: var(--white);
}

.nav-links.magic-nav ul li a .text {
    position: absolute;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.6em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: 0.5s;
    opacity: 0;
    transform: translateY(40px);
}

.nav-links.magic-nav ul li.active a .text {
    opacity: 1;
    transform: translateY(22px);
    color: var(--white);
}

.nav-links.magic-nav .indicator {
    position: absolute;
    top: -5px;
    width: 80px;
    height: 80px;
    background: var(--madder-red);
    border-radius: 50%;
    border: 6px solid rgba(245, 245, 220, 1); /* Matches light header bg */
    transition: 0.5s;
    display: block;
}

.nav-links:not(.magic-nav) .indicator {
    display: none;
}

.nav-links.magic-nav .indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-right-radius: 20px;
    box-shadow: 1px -10px 0 0 rgba(245, 245, 220, 1);
}

.nav-links.magic-nav .indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-left-radius: 20px;
    box-shadow: -1px -10px 0 0 rgba(245, 245, 220, 1);
}

/* Precise translations for 7 items in magic mode */
.nav-links.magic-nav ul li:nth-child(1).active ~ .indicator { transform: translateX(calc(80px * 0)); }
.nav-links.magic-nav ul li:nth-child(2).active ~ .indicator { transform: translateX(calc(80px * 1)); }
.nav-links.magic-nav ul li:nth-child(3).active ~ .indicator { transform: translateX(calc(80px * 2)); }
.nav-links.magic-nav ul li:nth-child(4).active ~ .indicator { transform: translateX(calc(80px * 3)); }
.nav-links.magic-nav ul li:nth-child(5).active ~ .indicator { transform: translateX(calc(80px * 4)); }
.nav-links.magic-nav ul li:nth-child(6).active ~ .indicator { transform: translateX(calc(80px * 5)); }
.nav-links.magic-nav ul li:nth-child(7).active ~ .indicator { transform: translateX(calc(80px * 6)); }

.nav-links:not(.magic-nav) a:hover, .nav-links:not(.magic-nav) a.active {
    color: var(--accent-gold);
}

.btn-enroll {
    border: 2px solid var(--madder-red);
    padding: 8px 10px;
    border-radius: 2px;
    margin-left: 30px !important;
}

.btn-enroll:hover {
    background: var(--madder-red);
    color: var(--white) !important;
}

/* Hide Mobile Elements on Desktop */
.nav-toggle { position: absolute; opacity: 0; }
.nav-toggle-label { display: none; }

/* 4. HERO SECTION (VISUAL IDENTITY) */
.hero {
    height: 85vh;
    background: radial-gradient(circle, rgba(165, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.9) 100%), 
                url('../images/beadwork-hero-texture.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-overlay { 
    max-width: 800px; 
    padding: 40px; 
    background: rgba(0, 0, 0, 0.3); /* Subtle dark box for text pop */
    -webkit-backdrop-filter: blur(2px); /* Safari/iOS support */
    backdrop-filter: blur(2px); /* Soft focus on the background behind text */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 { 
    margin-bottom: 15px; 
    text-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    color: var(--bead-white);
}

.hero p {
    margin-bottom: 30px;
    color: var(--abaca-cream);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.btn {
    background: var(--madder-red);
    color: var(--white);
    padding: 15px 40px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--madder-red);
    color: var(--madder-red);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: var(--madder-red);
    color: var(--white);
}

.hero .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--midnight-black);
}

/* 5. CONTENT GRID & CARDS */
.section-container, .content-section { padding: 80px 10%; text-align: center; background: var(--white); }

.section-title, .accent-title { 
    color: var(--madder-red); 
    margin-bottom: 10px; 
    padding-top: 10px; 
    padding-bottom: 10px;
    letter-spacing: 1px;
}

.section-subtitle { color: var(--text-gray); margin-bottom: 30px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card {
    background: var(--soft-abaca);
    padding: 40px;
    border-bottom: 6px solid var(--madder-red);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(0px); background-color: var(--soft-abaca); border-bottom-color: var(--accent-gold); }

.card-icon { font-size: 3rem; margin-bottom: 20px; }

/* Curriculum Tiers (Dual-Path Content) */
.curriculum-tier {
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

.tier-title {
    font-size: 1.8rem;
    color: var(--madder-red);
    margin-bottom: 10px;
    border-left: 5px solid var(--accent-gold);
    padding-left: 15px;
    text-transform: uppercase;
}

.tier-desc {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-style: italic;
    padding-left: 20px;
}

.theme-shs .tier-title {
    color: var(--bead-blue);
}

/* 8. CALENDAR PAGE */
.calendar-container {
    margin-top: 40px;
    border: 4px solid var(--accent-gold);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calendar-footer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Alternating Beadwork Colors for Icons in Grids */
.grid .card:nth-child(3n+1) .card-icon { color: var(--bead-red); }
.grid .card:nth-child(3n+2) .card-icon { color: var(--bead-yellow); }
.grid .card:nth-child(3n+3) .card-icon { color: var(--bead-blue); }

/* 6. FOOTER */
footer {
    background: var(--soft-abaca); /* Light theme footer */
    color: var(--text-main);
    padding: 60px 10% 20px;
    border-top: 8px solid;
    border-image: linear-gradient(to right, 
        var(--bead-black) 20%, 
        var(--bead-red) 20% 40%, 
        var(--bead-yellow) 40% 60%, 
        var(--bead-white) 60% 80%, 
        var(--bead-blue) 80%) 1;
    transition: background 0.4s ease, color 0.4s ease;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.map-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent-gold);
    line-height: 0;
}
footer h4, footer h5 {
    color: var(--madder-red); /* Darker heading for light mode */
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Responsive fix for the map */
@media screen and (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-nav ul { list-style: none; }
.footer-nav a { color: var(--text-main); text-decoration: none; display: block; margin-bottom: 10px; }

.footer-bottom { border-top: 1px solid rgba(0, 0, 0, 0.1); padding-top: 20px; font-size: 0.8rem; opacity: 0.8; text-align: center; }


/* 7. RESPONSIVE DESIGN (MOBILE/TABLET) */
@media screen and (max-width: 1100px) {
    header {
        flex-wrap: wrap;
        position: relative;
        z-index: 1000;
    }
    .branding {
        z-index: 100;
    }
    .user-greeting {
        z-index: 100;
        margin-left: auto;
    }

    .nav-toggle-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px; /* Increased from 40px for better accessibility */
        height: 44px; /* Increased from 40px */
        cursor: pointer;
        position: relative;
        z-index: 10001;
        order: 99;
        margin-left: 10px; /* Added spacing from user greeting */
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: var(--madder-red); /* Changed from white for visibility on light header */
        height: 3px; /* Slightly thicker for better visibility */
        width: 30px;
        border-radius: 2px;
        position: relative;
        transition: 0.3s;
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
        left: 0;
        background: var(--madder-red); /* Consistent branding */
        height: 3px;
        width: 30px;
        border-radius: 2px;
        transition: 0.3s;
    }

    .nav-toggle-label span::before { top: -10px; }
    .nav-toggle-label span::after { bottom: -10px; }
    
    /* Transform to X when checked */
    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent !important;
    }
    .nav-toggle:checked ~ .nav-toggle-label span::before {
        transform: rotate(45deg);
        top: 0;
        background: var(--madder-red) !important;
    }
    .nav-toggle:checked ~ .nav-toggle-label span::after {
        transform: rotate(-45deg);
        bottom: 0;
        background: var(--madder-red) !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: #0f0f0f !important;
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.4s ease;
        visibility: hidden;
    }

    .nav-links.magic-nav {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--abaca-cream) !important; /* Default to Light Mode Background */
        z-index: 9999;
        display: none !important;
        opacity: 0;
        visibility: hidden;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important; /* Changed from flex-start to center */
        padding: 20px;
        overflow-y: auto !important;
        transition: background 0.4s ease, opacity 0.4s ease;
    }

    /* Dark Mode background for the mobile overlay */
    body.dark-mode .nav-links.magic-nav {
        background: #0f0f0f !important;
    }

    .nav-toggle:checked ~ .nav-links.magic-nav {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Grid layout for mobile menu */
    .nav-links.magic-nav ul {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important; /* Increased from 10px to 20px */
        width: 100% !important;
        max-width: 320px;
        margin: 0 auto !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .nav-links.magic-nav ul li {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .nav-links a { 
        margin: 0; 
        padding: 12px 8px;
        font-size: 1rem; 
        width: 100%;
        text-align: center;
        color: var(--text-main) !important; /* Adapt to light mode text */
        text-decoration: none;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.05); /* Darker cards for light background */
        border-radius: 8px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        opacity: 0;
        transition: background 0.3s, color 0.3s;
    }

    /* Dark Mode link styles */
    body.dark-mode .nav-links a {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a .icon {
        display: block !important;
        font-size: 1.4rem !important;
        line-height: 1 !important; /* Reset large line-height from desktop */
        margin-bottom: 8px; /* Increased spacing */
        color: var(--madder-red) !important; /* Use madder-red for light mode icons */
        transform: none !important; /* Disable magic nav float on mobile */
    }

    body.dark-mode .nav-links a .icon {
        color: var(--accent-gold) !important; /* Gold icons for dark mode */
    }

    .nav-links a .text {
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        font-size: 0.65rem !important;
        letter-spacing: 1px;
        color: inherit !important; /* Inherit color from parent 'a' tag (var(--text-main) in light mode) */
    }

    .nav-links.active a,
    .nav-toggle:checked ~ .nav-links a {
        opacity: 1 !important;
        animation: linkFadeIn 0.4s ease forwards;
    }

    @keyframes linkFadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Staggered animation for grid items */
    .nav-links.magic-nav ul li:nth-child(1) a { animation-delay: 0.1s; }
    .nav-links.magic-nav ul li:nth-child(2) a { animation-delay: 0.15s; }
    .nav-links.magic-nav ul li:nth-child(3) a { animation-delay: 0.2s; }
    .nav-links.magic-nav ul li:nth-child(4) a { animation-delay: 0.25s; }
    .nav-links.magic-nav ul li:nth-child(5) a { animation-delay: 0.3s; }
    .nav-links.magic-nav ul li:nth-child(6) a { animation-delay: 0.35s; }
    .nav-links.magic-nav ul li:nth-child(7) a { animation-delay: 0.4s; }

    /* Indicator is not needed in 2-column mobile grid */
    .nav-links.magic-nav .indicator {
        display: none !important;
    }

    /* Theme toggle inside mobile menu */
    .nav-links .theme-toggle {
        margin-top: 25px !important;
        font-size: 1.8rem;
        cursor: pointer;
        opacity: 0;
        display: flex !important;
        color: var(--text-main) !important;
        justify-content: center;
        align-items: center;
        width: 45px !important;
        height: 45px !important;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 50%;
        border: 1px solid rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, background 0.3s ease;
    }

    .nav-links .theme-toggle:active {
        transform: scale(0.9);
        background: rgba(0, 0, 0, 0.15);
    }

    /* Ensure theme toggle remains visible and styled correctly in dark mode */
    body.dark-mode .nav-links .theme-toggle {
        background: rgba(255, 255, 255, 0.1);
        color: #ffcc00 !important; /* Golden sun color for dark mode */
        border-color: rgba(255, 255, 255, 0.3);
    }

    /* Mobile hamburger icon color sync */
    body.dark-mode .nav-toggle-label span,
    body.dark-mode .nav-toggle-label span::before,
    body.dark-mode .nav-toggle-label span::after {
        background: var(--white);
    }

    .nav-links.active .theme-toggle,
    .nav-toggle:checked ~ .nav-links .theme-toggle {
        opacity: 1 !important;
        animation: linkFadeIn 0.4s ease forwards;
        animation-delay: 0.5s;
    }
    
    .hero h1 { font-size: 2.5rem; }
}

/* Container to align icons side-by-side */
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-social h5 {
    margin-bottom: 15px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.social-links a {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1);
}

/* General style for all social icons */
.social-icon.fb, .social-icon.yt {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

.social-icon:hover {
    filter: brightness(1.2);
}

/* Specific styling if you want different borders or shadows */
.fb {
    border-radius: 8px; /* Facebook often uses rounded squares */
}

.yt {
    border-radius: 50%; /* YouTube icons are often circular */
}

/* --- DUMU (ABOUT) PAGE SPECIFIC STYLES --- */

/* --- UNIFIED PAGE BANNER STYLE --- */
.page-banner {
    background: linear-gradient(rgba(165, 42, 42, 0.8), rgba(26, 26, 26, 0.8)), 
                url('../images/beadwork-hero-texture.webp');
    background-size: cover;
    background-position: center;
    padding: 80px 10%;
    text-align: center;
    color: var(--white);
    border-bottom: 5px solid var(--accent-gold);
}

.page-banner h1 { 
    font-size: 3rem; 
    margin-bottom: 10px; 
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-banner p {
    font-size: 1.1rem;
    color: var(--abaca-cream);
    max-width: 800px;
    margin: 0 auto;
}

/* Side-by-side content layout */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-grid p, .scroll-content p, .compliance-card p {
    text-align: justify;
}

/* Featured Image Styling */
.featured-img {
    width: 100%;
    border-radius: 4px;
    border: 8px solid var(--abaca-cream);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Vision & Mission Cards */
.vm-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 80px 5%;
    background: var(--abaca-cream);
}

.vm-card {
    background: var(--white);
    padding: 40px;
    border-top: 5px solid var(--madder-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.highlight-card {
    border-top: 5px solid var(--accent-gold); /* Gold for Mandate/Values */
}

.vm-card h3 { margin-bottom: 20px;
    color: var(--midnight-black);
    border-bottom: 2px solid var(--abaca-cream);
    padding-bottom: 10px;
}
.vm-card p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* Core Values List */
.core-values {
    margin-top: 20px;
    padding: 15px;
    background: var(--abaca-cream);
    border-radius: 4px;
}

.core-values ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.core-values li {
    font-family: 'Montserrat', sans-serif;
    color: var(--madder-red);
    font-size: 0.85rem;
}

/* Mission List */
.mission-list {
    list-style: none;
    padding: 0;
}

.mission-list li {
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 3px solid var(--accent-gold);
}
/* Responsive adjustments for About Page */
@media screen and (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .vm-section { flex-direction: column; }
}

/* Optimization for 18 Personnel */
.grid {
    display: grid;
    /* This tells the browser: "Fit as many 250px cards as you can in one row" */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 25px; /* Slightly tighter gap for large groups */
    margin-top: 40px;
}

.teacher-item {
    padding: 10px 15px; /* Reduced padding to keep cards compact */
    transition: all 0.3s ease;
}

.teacher-image-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--abaca-cream);
    outline: 2px solid var(--accent-gold);
}

.teacher-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.teacher-item h3 {
    margin-top: 15px;
    margin-bottom: 5px;
}

.name-link:hover {
    color: var(--madder-red);
    text-decoration: underline; /* Optional: standard web behavior for links */
    text-underline-offset: 3px;
}

/* --- GNARÈ (ACADEMICS) PAGE STYLES --- */

.intro-text {
    max-width: 800px;
    margin: 0 auto 50px;
}

/* Styled Academic List */
.academic-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    text-align: left;
}

.academic-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--abaca-cream);
    font-size: 0.9rem;
    color: var(--text-gray);
}

.academic-list li::before {
    content: "•";
    color: var(--madder-red);
    font-weight: bold;
    margin-right: 10px;
}

/* Download Section */
.download-section {
    background: var(--midnight-black);
    padding: 10px 4%;
    color: var(--white);
    text-align: center;
}

.download-box {
    border: 2px dashed var(--accent-gold);
    padding: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.download-box h3 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}

/* --- ENROLLMENT PAGE STYLES --- */

.requirements-section {
    background: var(--white);
    padding: 80px 10%;
}

.req-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--abaca-cream);
    padding: 50px;
    border-radius: 8px;
    border-left: 10px solid var(--madder-red);
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: left;
}

.req-item {
    display: flex;
    align-items: flex-start;
}

.req-item .check {
    color: var(--madder-red);
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 15px;
    line-height: 1;
}

.req-item h4 {
    margin-bottom: 5px;
    color: var(--midnight-black);
}

.req-item p {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* --- CAREER & COLLEGE PORTAL STYLES --- */
.institution-grid, .scholarship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.institution-grid .card, .scholarship-grid .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 30px;
}

.institution-grid .card h3, .scholarship-grid .card h3 {
    font-size: 1.1rem;
    margin: 15px 0 10px;
    line-height: 1.4;
}

.institution-grid .card p, .scholarship-grid .card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.institution-grid .card .btn-small {
    width: 100%;
    text-decoration: none;
    border-radius: 4px;
}

.scholarship-category {
    margin-top: 50px;
}

.scholarship-grid .card {
    background: var(--white);
    border-top: 4px solid var(--accent-gold);
}

.scholarship-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Specific beadwork colors for the portal icons */
.institution-grid .card:nth-child(4n+1) .card-icon, .scholarship-grid .card:nth-child(4n+1) .card-icon { color: var(--bead-red); }
.institution-grid .card:nth-child(4n+2) .card-icon, .scholarship-grid .card:nth-child(4n+2) .card-icon { color: var(--bead-yellow); }
.institution-grid .card:nth-child(4n+3) .card-icon, .scholarship-grid .card:nth-child(4n+3) .card-icon { color: var(--bead-blue); }
.institution-grid .card:nth-child(4n+4) .card-icon, .scholarship-grid .card:nth-child(4n+4) .card-icon { color: var(--bead-white); text-shadow: 0 0 2px var(--bead-black); }

/* --- T'LOGAN (COMMUNITY) PAGE STYLES --- */

/* SLT Card Image Styling */
.slt-image-box {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    border-bottom: 3px solid var(--accent-gold);
}

.slt-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slt-card h3 {
    color: var(--madder-red);
    margin-bottom: 10px;
}

/* Elders' Wisdom Section */
.elders-section {
    background: var(--midnight-black);
    color: var(--white);
    padding: 100px 10%;
    text-align: center;
}

.elders-content {
    max-width: 800px;
    margin: 0 auto;
}

.quote-box {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid var(--accent-gold);
    position: relative;
}

.quote-box p {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--abaca-cream);
}

.quote-box span {
    display: block;
    margin-top: 15px;
    color: var(--accent-gold);
    font-weight: 700;
}

/* Small CTA for Community Cards */
.btn-small {
    padding: 10px 20px;
    font-size: 0.8rem;
    margin-top: 15px;
    background: var(--abaca-cream);
    color: var(--madder-red);
    border: 1px solid var(--madder-red);
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--madder-red);
    color: var(--white);
    transform: translateX(5px); /* Subtle "arrow" push effect */
}

/* --- SLT WEAVING PAGE STYLES --- */

/* Step-by-Step Timeline */
.step-container {
    max-width: 900px;
    margin: 50px auto;
    position: relative;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
}

.step-number {
    font-weight: 700;
    color: var(--abaca-cream);
    text-shadow: 2px 2px var(--madder-red);
    flex: 0 0 100px;
}

.step-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex: 1;
    border-left: 5px solid var(--accent-gold);
}

.text-right { border-left: none; border-right: 5px solid var(--accent-gold); text-align: right; }

/* Gallery Styling */
.gallery-section { padding: 80px 10%; background: var(--midnight-black); color: white; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
    transition: transform 0.3s;
}

.gallery-item img:hover { transform: scale(1.05); }

@media screen and (max-width: 768px) {
    .step-item { flex-direction: column; text-align: center; }
    .text-right { text-align: center; border-right: none; border-left: 5px solid var(--accent-gold); }
}

/* --- 3-COLUMN COMPLIANCE SECTION --- */

.compliance-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr; /* Mandate & Mission get more width */
    gap: 20px;
    padding: 80px 5%;
    background: var(--abaca-cream);
    align-items: stretch;
}

.compliance-card {
    background: var(--white);
    padding: 30px;
    border-top: 5px solid var(--madder-red);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Specific Column Styling */
.mandate-col { border-top-color: var(--accent-gold); }

.compliance-middle-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.values-box { border-top-color: var(--accent-gold); flex: 0.8; }
.vision-box { flex: 1.2; }

/* Content Styling */
.compliance-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--midnight-black);
    border-bottom: 2px solid var(--abaca-cream);
    padding-bottom: 8px;
}

.compliance-card p {
    font-size: 0.88rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* --- CORE VALUES FLIP CARDS --- */
.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    perspective: 1000px;
    margin-top: 5px;
}

.flip-card {
    background-color: transparent;
    width: 100%;
    height: 65px; /* Compact height to fit the values-box */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 6px;
}

.flip-card-front {
    background-color: var(--soft-abaca);
    color: var(--madder-red);
    border: 1px solid var(--madder-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.flip-card-front img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 4px;
}

.flip-card-front span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

.flip-card-back {
    background-color: var(--madder-red);
    color: var(--white);
    transform: rotateY(180deg);
    border: 1px solid var(--deep-madder);
}

.flip-card-back p {
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 0;
    color: var(--white) !important;
    text-align: center;
    font-weight: 400;
}

.mission-list {
    list-style: none;
    padding: 0;
}

.mission-list li, .mission-col p {
    font-size: 0.85rem;
    margin-bottom: 10px;
    padding: 10px 20px 10px 0;
    text-align: justify;
    border: none;
}

/* Responsive Fix */
@media screen and (max-width: 1024px) {
    .compliance-section {
        grid-template-columns: 1fr; /* Stacks on tablets/phones */
    }
}

/* --- TIGHTEN SECTION GAPS --- */

.compliance-section {
    padding-bottom: 30px; /* Reduced from 80px */
}

/* Apply this to the Personnel section directly below it */
.section-container {
    padding-top: 30px; /* Reduced from 80px */
}

/* Optional: If you want to remove the gap entirely */
.no-gap-bottom { padding-bottom: 0 !important; }
.no-gap-top { padding-top: 0 !important; }

/* --- SPECIAL LAYOUT FOR SCHOOL HEAD --- */

.admin-grid {
    display: grid;
    /* Forces 3 equal columns on desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px;
}

/* Responsive Fix for Admin Grid */
@media screen and (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- ENHANCED SCHOOL HEAD FEATURE --- */

.school-head-feature {
    grid-column: 1 / -1; /* Spans the full width of the grid */
    padding: 50px;
    background: var(--white);
    border-top: 8px solid var(--accent-gold);
    margin-bottom: 50px;
}

.head-flex-container {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
}

/* Enlarged Image Container for Head */
.head-image-box {
    flex: 1;
    text-align: center;
    max-width: 350px;
}

.head-image-box .teacher-image-container {
    width: 250px; /* Max size for prominence */
    height: 250px;
    margin: 0 auto 20px;
    outline: 4px solid var(--accent-gold);
}

.head-image-box h3 {
    margin-bottom: 5px;
}

/* Message Box Styling */
.head-message-box {
    flex: 2;
    border-left: 2px solid var(--abaca-cream);
    padding-left: 40px;
}

.message-title {
    color: var(--madder-red);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.message-content p {
    text-align: justify;
    margin-bottom: 20px;
    color: var(--text-gray);
}

.signature {
    color: var(--accent-gold);
}

/* Responsive Fix for Mobile */
@media screen and (max-width: 992px) {
    .school-head-feature {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    .head-flex-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    .head-message-box {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--abaca-cream);
        padding-top: 30px;
    }
}

/* Even smaller screens (Phones/Android) */
@media screen and (max-width: 480px) {
    .head-image-box .teacher-image-container {
        width: 180px;
        height: 180px;
    }
    .message-title {
        font-size: 1.2rem;
    }
    .message-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
    .teacher-item h3 {
        font-size: 1rem;
    }
    .teacher-item .faculty-bio {
        font-size: 0.85rem;
    }
    .admin-grid {
        gap: 15px;
    }
}

/* --- LEARNING CENTER PROMO STYLES --- */

.promo-section {
    padding: 80px 10%;
    background-color: var(--abaca-cream);
}

.promo-container {
    background: linear-gradient(rgba(165, 42, 42, 0.8), rgba(26, 26, 26, 0.9)), 
                url('../images/beadwork-hero-texture.webp');
    background-size: cover;
    background-position: center;
    padding: 60px;
    border-radius: 15px;
    text-align: center;
    color: var(--white);
    border: 3px solid var(--accent-gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    -webkit-backdrop-filter: blur(3px); /* Safari/iOS support */
    backdrop-filter: blur(3px); /* Adds a modern soft-focus effect */
}

.badge {
    background: var(--madder-red);
    color: white;
    padding: 5px 15px;
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 20px;
}

.promo-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.promo-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.btn-gold {
    background-color: var(--accent-gold);
    color: var(--midnight-black);
}

.btn-gold:hover {
    background-color: var(--white);
    color: var(--madder-red);
}

/* --- PUBLIC SERVICE COMMITMENTS STYLES --- */

.public-service-section .policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.policy-card {
    background: var(--white, #ffffff);
    border: 1px solid rgba(165, 42, 42, 0.14);
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 10px 24px rgba(26, 26, 26, 0.06);
    overflow: hidden;
}

.policy-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    padding: 1.2rem;
}

.policy-summary::-webkit-details-marker {
    display: none;
}

.policy-summary h3 {
    margin: 0;
    color: var(--madder-red, #a52a2a);
    font-size: 1.02rem;
    line-height: 1.5;
}

.accordion-toggle {
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--madder-red, #a52a2a);
    transition: transform 0.25s ease;
}

.policy-card[open] .accordion-toggle {
    transform: rotate(45deg);
}

.policy-text {
    margin: 0;
    padding: 0 1.2rem 1.2rem;
    color: var(--text-main, #2d2d2d);
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-line;
}

.policy-card[open] .policy-text {
    border-top: 1px solid rgba(165, 42, 42, 0.12);
}

/* --- FOOTER QUICK LINKS REFINEMENT --- */

.footer-nav ul {
    list-style: none;
    padding: 0;
}

.footer-nav li {
    margin-bottom: -15px; /* Adds space for easier finger-tapping on mobile */
}

.footer-nav a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-block;
    border-bottom: 1px solid transparent;
}

.footer-nav a:hover {
    color: var(--madder-red) !important;
    font-weight: 900;
    /* transform: translateX(0px);  Subtle "nudge" effect on hover */
}

/* --- TRANSPARENCY BOARD STYLES --- */

.transparency-card {
    border-top: 5px solid var(--accent-gold);
    text-align: center;
}

.transparency-notice {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    border-left: 10px solid var(--madder-red);
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

/* --- AI FAQ BOT STYLES --- */
.faq-bot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10001;
    font-family: 'Open Sans', sans-serif;
    transition: bottom 0.4s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Footer Awareness: Lift buttons when near footer */
body.at-footer .faq-bot-container {
    bottom: 100px;
}

body.at-footer #backToTop {
    bottom: 180px;
}

.faq-bot-dismiss {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: var(--midnight-black);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.faq-bot-container:hover .faq-bot-dismiss {
    opacity: 1;
    visibility: visible;
}

.faq-bot-dismiss:hover {
    background: var(--madder-red);
    color: var(--white);
    transform: scale(1.1);
}

@media screen and (max-width: 480px) {
    .faq-bot-dismiss {
        opacity: 1;
        visibility: visible;
        top: -35px; /* Position it above the toggle on mobile */
        right: 0;
        background: rgba(0,0,0,0.5);
        border-color: rgba(255,255,255,0.3);
    }
}

/* --- STUDENT LIFE GALLERY STYLES --- */
.gallery-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-card:hover {
    transform: scale(1.02);
}
.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 4px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.faq-bot-toggle {
    width: 65px;
    height: 65px;
    background: var(--madder-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid var(--accent-gold);
}

.faq-bot-toggle:hover {
    transform: scale(1.1);
}

.faq-bot-toggle .bot-icon {
    font-size: 2rem;
    color: var(--white);
}

.faq-bot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    display: none; /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--abaca-cream);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.faq-bot-header {
    background: var(--midnight-black);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, 
        var(--bead-black) 20%, 
        var(--bead-red) 20% 40%, 
        var(--bead-yellow) 40% 60%, 
        var(--bead-white) 60% 80%, 
        var(--bead-blue) 80%) 1;
}

.faq-bot-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.faq-bot-close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.faq-bot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--soft-abaca);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bot-message {
    background: var(--white);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid var(--abaca-cream);
}

.user-message {
    background: var(--madder-red);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* --- CHATBOT TYPING INDICATOR --- */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: var(--white);
    border-radius: 15px;
    align-self: flex-start;
    border: 1px solid var(--abaca-cream);
    margin-bottom: 15px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-gray);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- CHATBOT MESSAGE LINKS --- */
.message-links {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bot-link {
    display: block;
    background: var(--abaca-cream);
    color: var(--madder-red);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--accent-gold);
    text-align: center;
    transition: all 0.2s ease;
}

.bot-link:hover {
    background: var(--madder-red);
    color: var(--white);
    transform: translateX(5px);
}

.faq-bot-input-area {
    padding: 15px;
    background: var(--white);
    border-top: 1px solid var(--abaca-cream);
    display: flex;
    gap: 10px;
}

.faq-bot-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--abaca-cream);
    border-radius: 25px;
    outline: none;
    font-size: 0.9rem;
}

.faq-bot-send {
    background: var(--accent-gold);
    color: var(--midnight-black);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}

.faq-bot-send:hover {
    background: var(--madder-red);
    color: var(--white);
}

/* Suggested chips for quick interaction */
.faq-suggestions {
    padding: 0 15px 15px;
    background: var(--soft-abaca);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    background: var(--white);
    border: 1px solid var(--accent-gold);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: var(--accent-gold);
    color: var(--white);
}

@media screen and (max-width: 480px) {
    .faq-bot-window {
        width: 100%;
        height: 85vh; /* Optimal height for mobile */
        right: 0;
        bottom: 0;
        left: 0;
        position: fixed;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
        animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Hide back-to-top when chatbot is open on mobile to clear the view */
    body.chatbot-open #backToTop {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none;
        transform: translateY(20px);
    }
}

.transparency-notice h3 {
    color: var(--madder-red);
    margin-bottom: 15px;
}

/* --- BACK TO TOP BUTTON --- */
#backToTop {
    position: fixed;
    bottom: 110px; /* Above the FAQ bot toggle */
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--midnight-black);
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.4s ease;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--madder-red);
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-5px) scale(1.1);
}

/* Tooltip for Back to Top */
#backToTop::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: var(--midnight-black);
    color: var(--accent-gold);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    border: 1px solid var(--accent-gold);
}

#backToTop:hover::after {
    opacity: 1;
    visibility: visible;
    right: 70px;
}

/* --- CAREER PORTAL STYLES --- */
.timeline-container {
    border-left: 4px solid var(--madder-red);
    margin: 20px 0;
    padding-left: 20px;
}
.timeline-item {
    margin-bottom: 30px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--bead-yellow);
    border: 2px solid var(--madder-red);
    border-radius: 50%;
}
.scholarship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.alumni-card {
    background: var(--soft-abaca);
    padding: 25px;
    border-radius: 8px;
    border-bottom: 4px solid var(--bead-blue);
    text-align: center;
}
.alumni-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
}
.tag {
    display: inline-block;
    background: var(--madder-red);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

/* --- STUDENT LIFE GALLERY STYLES --- */
.gallery-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-card:hover {
    transform: scale(1.02);
}
.gallery-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 4px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}
.tab-btn {
    padding: 10px 25px;
    border: 2px solid var(--madder-red);
    background: transparent;
    color: var(--madder-red);
    font-weight: 700;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
}
.tab-btn.active {
    background: var(--madder-red);
    color: white;
}

/* --- Blaan DICTIONARY STYLES --- */
.dictionary-search-panel {
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 25px;
    background: var(--white);
    border-radius: 12px;
    border-left: 6px solid var(--accent-gold);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    text-align: left;
}

.dictionary-search-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--midnight-black);
    margin-bottom: 12px;
}

.dictionary-search-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.dictionary-search-input {
    flex: 1 1 320px;
    padding: 14px 16px;
    border: 2px solid var(--abaca-cream);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--midnight-black);
}

.dictionary-search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.2);
}

.dictionary-results-count {
    font-size: 0.95rem;
    color: var(--text-gray);
}

.dictionary-contribution-panel {
    max-width: 900px;
    margin: 20px auto 24px;
    padding: 22px 26px;
    background: var(--soft-abaca);
    border-radius: 12px;
    border-left: 5px solid var(--accent-gold);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    text-align: left;
}

.dictionary-contribution-panel .section-title {
    font-size: clamp(1.4rem, 2vw, 2rem);
    margin-bottom: 8px;
}

.dictionary-contribution-copy {
    color: var(--text-gray);
    line-height: 1.7;
    margin: 0 0 16px;
}

.dictionary-contribution-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dictionary-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
}

.dictionary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}
.dict-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.dict-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--madder-red);
}
.dict-word-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.audio-btn {
    background: var(--abaca-cream);
    color: var(--madder-red);
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    padding: 0;
    line-height: 1;
}
.audio-btn:hover {
    background: var(--madder-red);
    color: var(--white);
    transform: scale(1.1);
}
.dict-word {
    color: var(--madder-red);
    margin-bottom: 5px;
}
.dict-pronunciation {
    color: var(--text-gray);
    margin-bottom: 15px;
}
.dict-meaning {
    line-height: 1.5;
}

.dict-card.is-hidden {
    display: none;
}

.dict-contributor {
    margin-top: 14px;
    font-size: 0.76rem;
    color: var(--text-gray);
}

.dictionary-empty-state {
    display: none;
    margin-top: 25px;
    padding: 18px 20px;
    background: var(--soft-abaca);
    border-radius: 8px;
    border-left: 5px solid var(--madder-red);
    color: var(--text-main);
    text-align: left;
}

.dictionary-empty-state.visible {
    display: block;
}

.faculty-intro {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.faculty-bio {
    margin-top: 12px;
    font-size: 0.92rem;
    color: var(--text-gray);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.download-card {
    text-align: left;
}

.download-card .card-icon {
    margin-bottom: 15px;
}

.download-card p {
    margin-bottom: 18px;
}

.download-meta {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--abaca-cream);
    color: var(--madder-red);
}

.download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-hint {
    max-width: 800px;
    margin: 20px auto 0;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .dictionary-search-panel {
        padding: 20px;
    }

    .dictionary-search-row {
        align-items: stretch;
    }

    .dictionary-results-count {
        width: 100%;
    }
}

/* --- AI FAQ BOT STYLES --- */

.bg-light { background-color: var(--abaca-cream); }

.quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.quote-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    position: relative;
    border-bottom: 5px solid var(--accent-gold);
}

.quote-text p {
    font-style: italic;
    font-size: 1rem;
    color: var(--midnight-black);
    margin-bottom: 20px;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quote-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--madder-red);
    object-fit: cover;
}

.quote-author h5 { margin: 0; color: var(--madder-red); }
.quote-author span { font-size: 0.8rem; color: var(--text-gray); }

.calendar-actions {
    margin-top: 30px;
}

.btn-gold {
    background-color: var(--accent-gold);
    color: var(--midnight-black);
    padding: 15px 40px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

/* --- CONTACT PAGE STYLES --- */

.success-content {
    max-width: 600px;
    margin: 50px auto;
    padding: 60px 40px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 8px solid var(--bead-blue);
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 25px;
}

.success-content p {
    margin-bottom: 35px;
    color: var(--text-gray);
    line-height: 1.8;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.success-actions .btn {
    padding: 12px 25px;
    font-size: 0.9rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    border-left: 5px solid var(--accent-gold);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateX(10px);
}

.info-item .icon {
    font-size: 2rem;
    color: var(--madder-red);
    background: var(--abaca-cream);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item h4 {
    color: var(--midnight-black);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Contact Card & Form */
.contact-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    border-bottom: 8px solid var(--madder-red);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.contact-card h3 {
    margin-bottom: 30px;
    color: var(--midnight-black);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--abaca-cream);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--midnight-black);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--abaca-cream);
    border-radius: 6px;
    font-family: inherit;
    font-size: var(--fs-base);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.2);
}

/* --- SPLIT EXPERIENCE (JHS/SHS) UTILITIES --- */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.split-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    padding: 40px;
    background: var(--soft-abaca);
    border-radius: 15px;
    text-align: center;
}

.split-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.split-card.jhs { border-top: 12px solid var(--bead-red); }
.split-card.shs { border-top: 12px solid var(--bead-blue); }

.split-card h2 { 
    color: var(--midnight-black); 
    margin-bottom: 10px; 
    font-size: 2rem;
}

.split-card p { 
    color: var(--text-gray); 
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.split-icon { 
    font-size: 5rem; 
    margin-bottom: 25px; 
}

@media screen and (max-width: 768px) {
    .split-grid { grid-template-columns: 1fr; }
    .split-card { min-height: 280px; }
}

/* --- ENROLLMENT MODULE (SY 2026-2027) --- */
.enroll-module {
    background: var(--white);
    border-radius: 16px;
    padding: 35px;
    border: 1px solid var(--abaca-cream);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.enroll-module::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #1e4fa3, #2d7ef7);
}

.enroll-module-header p {
    margin-top: 8px;
    color: var(--text-gray);
}

.enroll-progress {
    margin-top: 25px;
    margin-bottom: 25px;
}

.enroll-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(30, 79, 163, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.enroll-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1e4fa3, #2d7ef7);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.enroll-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.enroll-step-indicator, .old-step-indicator {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(30, 79, 163, 0.12);
    color: #1e4fa3;
    border: 2px solid rgba(30, 79, 163, 0.2);
}

.enroll-step-indicator.active, .old-step-indicator.active {
    background: #1e4fa3;
    color: var(--white);
    border-color: #1e4fa3;
}

.enroll-form {
    margin-top: 10px;
}

.enroll-step, .old-step {
    display: none;
}

.enroll-step.active, .old-step.active {
    display: block;
}

.enroll-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.enroll-error {
    background: rgba(165, 42, 42, 0.08);
    color: var(--madder-red);
    border: 1px solid rgba(165, 42, 42, 0.25);
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

.enroll-review {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--abaca-cream);
}

.enroll-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-top: 10px;
}

.enroll-review-item {
    background: var(--soft-abaca);
    border: 1px solid var(--abaca-cream);
    border-radius: 10px;
    padding: 12px 14px;
}

.enroll-review-item span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 6px;
    font-weight: 700;
}

.enroll-review-item strong {
    color: var(--midnight-black);
    font-size: 0.95rem;
}

.enroll-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.enroll-actions .btn {
    min-width: 140px;
}

/* Dual Button Group */
.enroll-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.enroll-btn-group .btn {
    flex: 1;
    min-width: 180px;
    margin-top: 0 !important;
}

/* Outline Button Style */
.btn-outline {
    background: transparent !important;
    border: 2px solid var(--bead-blue);
    color: var(--bead-blue);
}

.theme-jhs .btn-outline {
    border-color: var(--bead-red);
    color: var(--bead-red);
}

.btn-outline:hover {
    background: var(--bead-blue) !important;
    color: var(--white) !important;
}

.theme-jhs .btn-outline:hover {
    background: var(--bead-red) !important;
    color: var(--white) !important;
}

.enroll-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 24px;
}

.enroll-modal[hidden] {
    display: none;
}

.enroll-modal-content {
    width: 100%;
    max-width: 520px;
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--abaca-cream);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
}

.enroll-modal-content p {
    margin: 12px 0 20px;
    color: var(--text-gray);
}

@media screen and (max-width: 768px) {
    .enroll-module {
        padding: 26px 18px;
    }
    .enroll-grid {
        grid-template-columns: 1fr;
    }
    .enroll-review-grid {
        grid-template-columns: 1fr;
    }
    .enroll-actions {
        flex-direction: column;
    }
    .enroll-actions .btn {
        width: 100%;
    }
}

/* --- THEME OVERRIDES (JHS/SHS) --- */
.theme-jhs .page-banner { border-bottom-color: var(--bead-red); }
.theme-jhs .section-title, .theme-jhs .accent-title { color: var(--bead-red); }
.theme-jhs .card { border-bottom-color: var(--bead-red); }
.theme-jhs .req-container { border-left-color: var(--bead-red); }
.theme-jhs .req-item .check { color: var(--bead-red); }

.theme-shs .page-banner { border-bottom-color: var(--bead-blue); }
.theme-shs .section-title, .theme-shs .accent-title { color: var(--bead-blue); }
.theme-shs .card { border-bottom-color: var(--bead-blue); }
.theme-shs .req-container { border-left-color: var(--bead-blue); }
.theme-shs .req-item .check { color: var(--bead-blue); }
.theme-shs .btn:not(.btn-enroll) { background: var(--bead-blue); }
.theme-shs .btn:not(.btn-enroll):hover { background: var(--midnight-black); }

/* --- FINAL RESPONSIVE ADJUSTMENTS --- */
.enroll-address-section {
    background: rgba(30, 79, 163, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(30, 79, 163, 0.1);
}

.enroll-address-section .accent-title {
    color: var(--bead-blue);
    font-weight: 700;
}

.theme-jhs .enroll-address-section .accent-title {
    color: var(--bead-red);
}

@media screen and (max-width: 768px) {
    /* Section Padding */
    .section-container, .content-section, .page-banner, .promo-section, .gallery-section {
        padding: 60px 5%;
    }

    /* Page Banners */
    .page-banner h1 { font-size: 2.2rem; }
    .page-banner p { font-size: 1rem; }

    /* Cards */
    .card, .transparency-notice, .contact-card {
        padding: 30px 20px;
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-item {
        padding: 15px;
    }

    .info-item .icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    /* Promo Section */
    .promo-container {
        padding: 40px 20px;
    }
    .promo-content h2 { font-size: 1.8rem; }
    .promo-content p { font-size: 1rem; }

    /* Headings */
    .section-title, .accent-title { font-size: 2rem; }
}

@media screen and (max-width: 480px) {
    /* Extra Small Screens */
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }
    
    .page-banner h1 { font-size: 1.8rem; }
    
    .section-title, .accent-title { font-size: 1.7rem; }
    
    .btn { padding: 12px 25px; font-size: 0.9rem; width: 100%; text-align: center; }
    
    .contact-card {
        padding: 25px 15px;
    }

    .contact-card h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .info-item .icon {
        margin: 0 auto;
    }

.footer-grid { padding: 40px 5%; }
}

/* --- UTILITY CLASSES FOR INLINE STYLES --- */
.no-border { border: 0 !important; }
.mt-1 { margin-top: 1rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mt-3 { margin-top: 3rem !important; }
.mt-4 { margin-top: 4rem !important; }

.italic-gray { 
    font-style: italic; 
    color: var(--text-gray); 
}

.opacity-8 { opacity: 0.8; }

.btn-bead-red { 
    background: var(--bead-red) !important; 
    color: white !important; 
    border: none !important; 
}

.btn-bead-blue { 
    background: var(--bead-blue) !important; 
    color: white !important; 
    border: none !important; 
}

.banner-shs { 
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../assets/images/student.webp') !important; 
    background-size: cover !important; 
    background-position: center !important; 
}

.banner-community { 
    background: linear-gradient(rgba(165,42,42,0.6), rgba(26,26,26,0.8)), url('../assets/images/school-community.webp') !important; 
}

.calendar-link {
    color: var(--madder-red);
    font-weight: bold;
}

.section-yellow-border {
    border-top: 5px solid var(--bead-yellow);
}

.section-blue-border {
    border-top: 5px solid var(--bead-blue);
}

.tour-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--midnight-black), #333);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.tour-placeholder p {
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-gold);
}

.tour-placeholder span {
    font-size: 1rem;
    opacity: 0.8;
}

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-gold);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
}

/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal {
    position: relative;
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal-top { transform: translateY(-50px); }
.reveal-bottom { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delay classes for staggered effects */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Mobile reveal adjustments */
@media screen and (max-width: 768px) {
    .reveal-left { transform: translateX(-30px); }
    .reveal-right { transform: translateX(30px); }
}

/* --- DARK MODE TOGGLE & THEME --- */
@media screen and (max-width: 768px) {
    .faq-bot-container {
        bottom: 20px;
        right: 20px;
    }
    .faq-bot-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 75px;
        right: 0;
    }
    .faq-bot-toggle {
        width: 55px;
        height: 55px;
    }
    .faq-bot-toggle .bot-icon {
        font-size: 1.5rem;
    }
    .message {
        max-width: 90%;
        font-size: 0.85rem;
    }
}

:root {
    /* Define dark mode colors as variables */
    --bg-dark: #0f0f0f;         /* Deeper black for better contrast */
    --card-dark: #1a1a1a;       /* Darker card background */
    --text-dark: #f0f0f0;       /* Brighter text for readability */
    --text-gray-dark: #b0b0b0;  /* Better contrast for secondary text */
}

/* --- DARK MODE GLOBAL OVERRIDES --- */
body.dark-mode header {
    background: rgba(26, 26, 26, 0.98);
}

body.dark-mode .branding .logo-link,
body.dark-mode .nav-links a,
body.dark-mode .nav-links.magic-nav ul li a .icon,
body.dark-mode .nav-links.magic-nav ul li a .text {
    color: var(--white) !important;
}

body.dark-mode .user-greeting {
    border-right-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .user-greeting .user-name {
    color: var(--accent-gold) !important;
}

body.dark-mode .nav-links.magic-nav .indicator {
    border-color: rgba(26, 26, 26, 1);
}

body.dark-mode .nav-links.magic-nav .indicator::before,
body.dark-mode .nav-links.magic-nav .indicator::after {
    box-shadow: 1px -10px 0 0 rgba(26, 26, 26, 1);
}

body.dark-mode .nav-links.magic-nav .indicator::after {
    box-shadow: -1px -10px 0 0 rgba(26, 26, 26, 1);
}

body.dark-mode footer {
    background: var(--midnight-black);
    color: var(--abaca-cream);
}

body.dark-mode footer h4, body.dark-mode footer h5 {
    color: var(--accent-gold) !important;
}

body.dark-mode .footer-nav a {
    color: var(--abaca-cream) !important;
}

body.dark-mode .footer-bottom {
    border-top-color: #333;
    color: var(--abaca-cream) !important;
    opacity: 0.7;
}

body.dark-mode .visitor-counter {
    color: var(--accent-gold);
}

html.dark-mode body,
body.dark-mode {
    background-color: var(--midnight-black);
    color: var(--text-dark);
}

html.dark-mode .section-container,
html.dark-mode main,
html.dark-mode .bg-light,
html.dark-mode .content-section,
html.dark-mode .compliance-section,
html.dark-mode .page-banner,
html.dark-mode .vm-section,
html.dark-mode .requirements-section,
body.dark-mode .section-container,
body.dark-mode main,
body.dark-mode .bg-light,
body.dark-mode .content-section,
body.dark-mode .compliance-section,
body.dark-mode .page-banner,
body.dark-mode .vm-section,
body.dark-mode .requirements-section {
    background-color: var(--bg-dark) !important;
}

body.dark-mode .card,
body.dark-mode .vm-card,
body.dark-mode .split-card,
body.dark-mode .alumni-card,
body.dark-mode .dict-card,
body.dark-mode .dictionary-search-panel,
body.dark-mode .info-item,
body.dark-mode .contact-card,
body.dark-mode .success-content,
body.dark-mode .compliance-card,
body.dark-mode .flip-card-front,
body.dark-mode .req-container,
body.dark-mode .step-content,
body.dark-mode .quote-card,
body.dark-mode .transparency-notice,
body.dark-mode .portal-card,
body.dark-mode .portal-help,
body.dark-mode .portal-option,
body.dark-mode .promo-section {
    background-color: var(--card-dark) !important;
    color: var(--text-dark) !important;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body.dark-mode .promo-container {
    background: linear-gradient(rgba(15, 15, 15, 0.94), rgba(25, 25, 25, 0.98));
    border-color: var(--accent-gold);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

body.dark-mode .promo-content h2,
body.dark-mode .promo-content .badge {
    color: var(--accent-gold) !important;
}

body.dark-mode .promo-content p,
body.dark-mode .promo-content .btn-gold {
    color: var(--text-dark) !important;
}

body.dark-mode .portal-subtitle,
body.dark-mode .portal-help p,
body.dark-mode .portal-option-meta,
body.dark-mode .policy-text {
    color: var(--text-dark) !important;
}

body.dark-mode .policy-card {
    background-color: var(--card-dark) !important;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body.dark-mode .policy-card h3 {
    color: var(--accent-gold) !important;
}

body.dark-mode .portal-badge {
    background: rgba(255, 207, 71, 0.16);
    color: var(--accent-gold) !important;
}

body.dark-mode .section-title,
body.dark-mode .accent-title,
body.dark-mode .message-title,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .split-card h2 {
    color: var(--accent-gold) !important; /* Gold titles look great in dark mode */
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode .text-block p,
body.dark-mode .compliance-card p,
body.dark-mode .scroll-content p,
body.dark-mode .section-subtitle,
body.dark-mode .tier-desc,
body.dark-mode .dict-pronunciation,
body.dark-mode .italic-gray,
body.dark-mode .split-card p,
body.dark-mode .calendar-footer,
body.dark-mode .academic-list li,
body.dark-mode .req-item p,
body.dark-mode .message-content p,
body.dark-mode .quote-author span,
body.dark-mode .info-item p,
body.dark-mode .success-content p,
body.dark-mode .dictionary-results-count,
body.dark-mode .faculty-bio,
body.dark-mode .download-hint {
    color: var(--text-dark) !important;
}

body.dark-mode .section-subtitle,
body.dark-mode .tier-desc,
body.dark-mode .dict-pronunciation,
body.dark-mode .italic-gray,
body.dark-mode .footer-bottom {
    color: var(--text-gray-dark) !important;
}

body.dark-mode strong {
    color: var(--white) !important; /* Make strong text pop as pure white */
}

body.dark-mode .footer-bottom,
body.dark-mode .footer-social a {
    color: var(--text-gray-dark);
}

body.dark-mode .beadwork-strip {
    opacity: 0.9;
}

body.dark-mode .teacher-image-container,
body.dark-mode .featured-img {
    border-color: var(--card-dark);
    outline-color: var(--accent-gold);
}

body.dark-mode .form-group input, 
body.dark-mode .form-group select, 
body.dark-mode .form-group textarea,
body.dark-mode .dictionary-search-input {
    background-color: var(--bg-dark);
    border-color: #333;
    color: var(--text-dark);
}

body.dark-mode .form-group label {
    color: var(--accent-gold);
}

body.dark-mode .dictionary-search-label,
body.dark-mode .download-meta {
    color: var(--accent-gold) !important;
}

body.dark-mode .dictionary-empty-state {
    background-color: var(--card-dark);
    color: var(--text-dark);
    border-color: var(--madder-red);
}

/* --- ADMIN DASHBOARD DARK MODE OVERRIDES --- */
body.dark-mode .bg-white {
    background-color: var(--card-dark) !important;
}

body.dark-mode #sync-photos-btn {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-gray-dark) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #btn-close-results {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-dark) !important;
}

body.dark-mode #btn-close-results:hover {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

body.dark-mode #last-scanned-card .bg-blue-100 {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

body.dark-mode #live-clock,
body.dark-mode #clock-time,
body.dark-mode #clock-ampm,
body.dark-mode #live-date {
    color: var(--accent-gold) !important;
}

body.dark-mode .bg-gray-50,
body.dark-mode .bg-gray-100,
body.dark-mode .bg-blue-50,
body.dark-mode .bg-purple-50,
body.dark-mode .bg-green-50,
body.dark-mode .bg-amber-50,
body.dark-mode .bg-orange-50,
body.dark-mode .bg-red-50 {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

body.dark-mode .bg-emerald-50 {
    background-color: rgba(72, 187, 120, 0.12) !important;
}

body.dark-mode .bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.12) !important;
}

body.dark-mode .text-emerald-700 {
    color: #b7f0bb !important;
}

body.dark-mode .text-amber-700 {
    color: #ffe4a1 !important;
}

body.dark-mode .bg-gradient-to-b.from-white.to-gray-50 {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

body.dark-mode .text-gray-900,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-600 {
    color: var(--text-dark) !important;
}

body.dark-mode .text-gray-500,
body.dark-mode .text-gray-400,
body.dark-mode .text-gray-300 {
    color: var(--text-gray-dark) !important;
}

body.dark-mode .border-gray-100,
body.dark-mode .border-gray-200,
body.dark-mode .divide-gray-100 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .border-blue-100,
body.dark-mode .border-blue-200 {
    border-color: rgba(41, 128, 185, 0.5) !important;
}

body.dark-mode .border-purple-100,
body.dark-mode .border-purple-200 {
    border-color: rgba(155, 89, 182, 0.5) !important;
}

body.dark-mode .border-green-100,
body.dark-mode .border-green-200 {
    border-color: rgba(39, 174, 96, 0.5) !important;
}

body.dark-mode .border-amber-100,
body.dark-mode .border-amber-200 {
    border-color: rgba(241, 196, 15, 0.5) !important;
}

body.dark-mode .border-orange-100,
body.dark-mode .border-orange-200 {
    border-color: rgba(230, 126, 34, 0.5) !important;
}

body.dark-mode .border-red-100,
body.dark-mode .border-red-200 {
    border-color: rgba(217, 67, 67, 0.5) !important;
}

body.dark-mode .hover\:bg-gray-50:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .text-blue-600,
body.dark-mode .text-blue-700,
body.dark-mode .text-blue-800,
body.dark-mode .text-blue-900,
body.dark-mode .text-green-900,
body.dark-mode .text-amber-900,
body.dark-mode .text-orange-900,
body.dark-mode .text-red-600,
body.dark-mode .text-red-700,
body.dark-mode .text-red-800,
body.dark-mode .text-red-900 {
    color: var(--white) !important;
}

body.dark-mode .text-blue-600:hover,
body.dark-mode .text-blue-700:hover,
body.dark-mode .text-blue-800:hover {
    color: var(--white) !important;
}

body.dark-mode .bg-deped-red {
    background-color: var(--deep-madder) !important;
}

body.dark-mode .bg-deped-blue,
body.dark-mode .bg-blue-600 {
    background-color: var(--madder-red) !important;
    color: var(--white) !important;
}

body.dark-mode .bg-blue-50\/50,
body.dark-mode .bg-green-50\/50,
body.dark-mode .bg-amber-50\/50,
body.dark-mode .bg-orange-50\/50,
body.dark-mode .bg-blue-400\/30 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .text-blue-100,
body.dark-mode .text-blue-200,
body.dark-mode .text-blue-400,
body.dark-mode .text-blue-500 {
    color: var(--text-gray-dark) !important;
}

body.dark-mode select,
body.dark-mode input[type="text"],
body.dark-mode input[type="search"],
body.dark-mode input[type="date"] {
    background-color: var(--bg-dark) !important;
    color: var(--text-dark) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Fix for inline-styled sub-cards and privacy notices in id-gen and dashboard */
body.dark-mode div[style*="background: var(--soft-abaca)"],
body.dark-mode div[style*="background: var(--white)"],
body.dark-mode div[style*="background-color: var(--soft-abaca)"],
body.dark-mode div[style*="background-color: var(--white)"] {
    background-color: var(--bg-dark) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .form-section {
    background-color: var(--card-dark) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35) !important;
}

body.dark-mode div[style*="background: var(--white)"] p,
body.dark-mode div[style*="background-color: var(--white)"] p,
body.dark-mode footer p[style*="color: var(--text-main)"],
body.dark-mode footer p[style*="color: var(--text-gray)"] {
    color: var(--text-dark) !important;
}

body.dark-mode footer h4[style*="color: var(--madder-red)"] {
    color: var(--accent-gold) !important;
}

body.dark-mode .step-number {
    color: var(--card-dark);
    text-shadow: 2px 2px var(--accent-gold);
}

body.dark-mode .btn-small {
    background: var(--card-dark);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

body.dark-mode .btn-small:hover {
    background: var(--accent-gold);
    color: var(--midnight-black);
}

/* --- EARLY BIRDS SECTION DARK MODE --- */
body.dark-mode .early-birds-panel {
    --early-ink: var(--text-dark);
    --early-muted: var(--text-gray-dark);
    --early-coral: #ff8a7a;
    background: linear-gradient(135deg, #1e293b 0%, var(--card-dark) 45%, #172554 100%);
    border-color: rgba(197, 160, 89, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .early-birds-kicker {
    color: var(--accent-gold);
}

body.dark-mode .early-birds-heading h3 {
    color: var(--text-dark);
}

body.dark-mode .early-birds-badge {
    background: var(--accent-gold);
    color: var(--midnight-black);
}

body.dark-mode .early-birds-tab {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-gray-dark);
}

body.dark-mode .early-birds-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dark);
}

body.dark-mode .early-birds-tab.is-active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--midnight-black);
}

body.dark-mode .early-birds-date-filter label {
    color: var(--text-gray-dark);
}

body.dark-mode .early-birds-date-filter input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-dark);
}

body.dark-mode .early-bird-row {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .early-bird-row:nth-child(1) {
    background: linear-gradient(100deg, rgba(197, 160, 89, 0.35), rgba(255, 255, 255, 0.04));
    border-color: rgba(197, 160, 89, 0.6);
}

body.dark-mode .early-bird-row:nth-child(2) {
    background: linear-gradient(100deg, rgba(148, 163, 184, 0.25), rgba(255, 255, 255, 0.04));
    border-color: rgba(148, 163, 184, 0.45);
}

body.dark-mode .early-bird-row:nth-child(3) {
    background: linear-gradient(100deg, rgba(217, 119, 6, 0.22), rgba(255, 255, 255, 0.04));
    border-color: rgba(217, 119, 6, 0.45);
}

body.dark-mode .early-bird-rank {
    color: var(--accent-gold);
}

body.dark-mode .early-bird-photo-frame {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .early-bird-photo-placeholder {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-gray-dark);
}

body.dark-mode .early-bird-name {
    color: var(--text-dark);
}

body.dark-mode .early-bird-meta {
    color: var(--text-gray-dark);
}

body.dark-mode .early-bird-time {
    color: #5eead4;
}

body.dark-mode .early-birds-empty {
    color: var(--text-gray-dark);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--white);
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}

.theme-toggle:hover {
    color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(-15deg);
}

/* Tooltip for Theme Toggle */
.theme-toggle {
    position: relative;
}

/* --- ANNOUNCEMENT BANNER (GLASSMORPHIC) --- */
.announcement-banner {
    position: relative;
    background: var(--bead-blue);/*  rgba(148, 21, 21, 0.95); Nearly solid black for maximum readability */
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--white);
    padding: 5px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
    font-weight: 600;
    z-index: 998;
    border: 2px solid var(--accent-gold);
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: slideDown 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Shimmer Effect */
.announcement-banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 4s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes slideDown {
    from { 
        transform: translateY(-20px); 
        opacity: 0;
    }
    to { 
        transform: translateY(0); 
        opacity: 1;
    }
}

.announcement-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    text-align: center;
}

.announcement-text {
    line-height: 1.4;
    font-size: var(--fs-base);
    color: var(--white); /* Pure white text */
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.announcement-btn {
    background: var(--midnight-black);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.announcement-btn:hover {
    background: var(--madder-red);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
}

.announcement-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    margin-left: 55px;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

@media screen and (max-width: 900px) {
    .announcement-banner {
        flex-direction: column;
        padding: 5px;
        gap: 5px;
    }
    .announcement-content {
        flex-direction: column;
        gap: 5px;
    }
    .announcement-close {
        position: absolute;
        top: 10px;
        right: 10px;
        margin-left: 0;
    }
}

/* --- ADMIN & ID GENERATOR STYLES --- */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(165, 42, 42, 0.4) 0%, rgba(26, 26, 26, 0.9) 100%);
}
.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    border-bottom: 8px solid var(--madder-red);
}
.login-card h2 {
    margin-bottom: 20px;
}
.login-logo {
    height: 80px;
    margin-bottom: 20px;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.login-form input {
    padding: 12px 15px;
    border: 2px solid var(--abaca-cream);
    border-radius: 6px;
    font-size: var(--fs-base);
}
.login-form input:focus {
    outline: none;
    border-color: var(--accent-gold);
}
.error-msg {
    color: var(--madder-red);
    font-size: var(--fs-sm);
    margin-top: 10px;
}
.login-links {
    margin-top: 20px;
    border-top: 1px solid var(--abaca-cream);
    padding-top: 15px;
}
.back-link {
    text-decoration: none;
    color: var(--text-gray);
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: all 0.3s ease;
}
.back-link:hover {
    color: var(--madder-red);
    text-decoration: underline;
}

.id-gen-container {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}
.gen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.form-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 5px solid var(--accent-gold);
}
.preview-section {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.id-preview-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--abaca-cream);
}
.webcam-box {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3/4;
    background: #eee;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 2px dashed var(--accent-gold);
}
#webcam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#processing-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
#processing-overlay p {
    margin-top: 10px;
}
#captured-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.signature-actions {
    align-items: stretch;
}

.signature-actions .btn {
    flex: 1 1 180px;
    min-width: 0;
    margin: 0;
    text-align: center;
}
.bg-remove-toggle {
    margin-top: 10px;
}
.form-row-three {
    display: grid;
    grid-template-columns: 1fr 0.4fr 1fr;
    gap: 15px;
}
.btn-full {
    width: 100%;
}
.preview-box {
    width: 100%;
    text-align: center;
}
.preview-label {
    margin-bottom: 5px;
    font-weight: 600;
}
.address-manual {
    display: none;
    margin-top: 10px;
}

/* ID Type Toggle Styles */
.id-type-toggle-container {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px;
}

.id-type-toggle {
    display: flex;
    background: var(--soft-abaca);
    padding: 5px;
    border-radius: 50px;
    position: relative;
    width: 300px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.id-type-toggle input[type="radio"] {
    display: none;
}

.id-type-toggle label {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    z-index: 2;
    font-weight: 600;
    transition: color 0.3s;
    color: var(--text-main);
    margin: 0;
}

.id-type-toggle input[type="radio"]:checked + label {
    color: var(--white);
}

.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: var(--madder-red);
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

#type-personnel:checked ~ .toggle-slider {
    transform: translateX(100%);
}

/* Personnel Signature Box */
.signature-upload-box {
    width: 100%;
    height: 150px;
    background: var(--soft-abaca);
    border: 2px dashed var(--accent-gold);
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.signature-upload-box img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.placeholder-box i {
    font-size: 2rem;
}

.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Spinner and Enhancements */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--text-main);
}
.checkbox-container input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Cropper Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}
.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
}
#editor-image {
    max-width: 100%;
}
.cropper-container-box {
    width: 100%;
    height: 450px;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.editor-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 15px;
    background: var(--soft-abaca);
    border-radius: 8px;
}
.editor-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}
.rotate-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    max-width: 300px;
}
.rotate-slider {
    width: 100%;
}

@media (max-width: 992px) {
    .gen-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gen-grid > * {
        min-width: 0;
    }

    .preview-section {
        position: static;
    }

    .form-row-three,
    .form-row-two {
        grid-template-columns: minmax(0, 1fr);
    }

    .id-gen-container .form-group input,
    .id-gen-container .form-group select,
    .id-gen-container .form-group textarea {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .id-gen-container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .form-section {
        padding: 20px 16px;
    }

    .id-type-toggle {
        width: min(100%, 300px);
    }

    .preview-section {
        width: 100%;
    }

    .id-gen-container .btn-group {
        width: 100%;
    }

    .signature-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .signature-actions .btn {
        width: 100%;
        min-height: 46px;
        padding: 12px 14px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

.theme-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -45px;
    right: 0;
    background: var(--midnight-black);
    color: var(--accent-gold);
    padding: 5px 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    border: 1px solid var(--accent-gold);
    z-index: 1000;
}

.theme-toggle:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
}

@media screen and (max-width: 1024px) {
    .theme-toggle {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* ==================== CALENDAR COMPARISON INFOGRAPHIC STYLES ==================== */

/* Signature Draw Modal */
.sig-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    overflow: auto;
}
.sig-modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 3px solid var(--accent-gold);
}
.sig-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--soft-abaca);
}
.sig-modal-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--madder-red);
    margin: 0;
}
.sig-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.3s;
}
.sig-modal-close:hover {
    color: var(--madder-red);
}
.sig-canvas-container {
    width: 100%;
    height: 200px;
    background: var(--white);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
#sig-draw-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
}
.sig-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.sig-capture-container {
    width: 100%;
    height: 250px;
    background: #222;
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}
#sig-webcam-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
#sig-webcam-capture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.calendar-comparison-wrapper {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.comparison-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.comparison-header h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.comparison-side {
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.comparison-side:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.left-side {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
}

.right-side {
    background: linear-gradient(135deg, #e8f5e9 0%, #fff3e0 100%);
    border: 2px solid #4caf50;
}

.side-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.icon {
    width: 30px;
    height: 30px;
}

.calendar-icon {
    color: #2196f3;
}

.graduation-icon {
    color: #ff9800;
}

.arrow-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e74c3c;
}

.side-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-quarter {
    padding: 1rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-quarter::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
}

.q1::before {
    background: #2196f3;
}

.q2::before {
    background: #1976d2;
}

.q3::before {
    background: #1565c0;
}

.q4::before {
    background: #0d47a1;
}

.quarter-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 0.3rem;
}

.quarter-content {
    font-size: 0.9rem;
    color: #546e7a;
}

.arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    margin-top: 0.5rem;
}

.arrow-icon, .arrow-text {
    width: 100%;
    height: 40px;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

.timeline-term {
    padding: 1rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-term::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
}

.term1::before {
    background: linear-gradient(to bottom, #4caf50, #8bc34a);
}

.term2::before {
    background: linear-gradient(to bottom, #ff9800, #ffeb3b);
}

.term3::before {
    background: linear-gradient(to bottom, #f44336, #ff9800);
}

.term-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.term1 .term-label {
    color: #4caf50;
}

.term2 .term-label {
    color: #ff9800;
}

.term3 .term-label {
    color: #f44336;
}

.term-content {
    font-size: 0.9rem;
    color: #546e7a;
    margin-bottom: 0.8rem;
}

.enrichment-block {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    padding: 0.8rem;
    border-radius: 6px;
    margin-top: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

.enrichment-label {
    font-weight: 700;
    color: white;
    font-size: 0.85rem;
}

.enrichment-duration {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.comparison-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid #ecf0f1;
}

.footer-note {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 1024px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .comparison-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .calendar-comparison-wrapper {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .comparison-header h2 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .comparison-side {
        padding: 1.2rem;
    }
    
    .side-header h3 {
        font-size: 1.1rem;
    }
    
    .quarter-label,
    .term-label {
        font-size: 1rem;
    }
    
    .enrichment-block {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .comparison-header h2 {
        font-size: 1.4rem;
    }
    
    .icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    .icon {
        width: 25px;
        height: 25px;
    }
    
    .timeline-quarter,
    .timeline-term {
        padding: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .enrichment-block {
        animation: none;
    }
    
    .comparison-side:hover {
        transform: none;
    }
}

@media print {
    body {
        background: white;
    }
    
    .calendar-comparison-container {
        box-shadow: none;
    }
    
    .enrichment-block {
        animation: none;
    }
}

/* ==================== DARK MODE STYLES FOR CALENDAR COMPARISON ==================== */

body.dark-mode .calendar-comparison-wrapper {
    background: var(--card-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .comparison-header h2 {
    color: var(--accent-gold);
}

body.dark-mode .subtitle {
    color: var(--text-gray-dark);
}

body.dark-mode .comparison-side {
    background: var(--card-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .left-side {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-color: #1976d2;
}

body.dark-mode .right-side {
    background: linear-gradient(135deg, #1b5e20 0%, #e65100 100%);
    border-color: #66bb6a;
}

body.dark-mode .icon-wrapper {
    background: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .side-header h3 {
    color: var(--text-dark);
}

body.dark-mode .timeline-quarter,
body.dark-mode .timeline-term {
    background: var(--card-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .quarter-label {
    color: #64b5f6;
}

body.dark-mode .quarter-content,
body.dark-mode .term-content {
    color: var(--text-gray-dark);
}

body.dark-mode .term1 .term-label {
    color: #81c784;
}

body.dark-mode .term2 .term-label {
    color: #ffb74d;
}

body.dark-mode .term3 .term-label {
    color: #e57373;
}

body.dark-mode .enrichment-block {
    background: linear-gradient(135deg, #c62828 0%, #f57f17 100%);
}

body.dark-mode .comparison-footer {
    border-top-color: #333;
}

body.dark-mode .footer-note {
    color: var(--text-gray-dark);
}

body.dark-mode .arrow-text {
    color: #e57373;
}

body.dark-mode .calendar-container {
    background: var(--card-dark);
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body.dark-mode .calendar-container iframe {
    filter: invert(0.9) hue-rotate(180deg) contrast(0.9);
}

body.dark-mode .calendar-footer {
    color: var(--text-gray-dark);
}

/* --- VISITOR COUNTER STYLES --- */
.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main); /* Dark color for light mode */
}

.footer-bottom .visitor-counter {
    margin-top: 15px;
    color: inherit; /* Inherit dark color from parent in light mode */
}

.visitor-counter i {
    color: var(--madder-red); /* Madder red for light mode */
    font-size: 0.9rem;
}

#visitor-count {
    color: var(--madder-red);
    font-weight: 700;
}

body.dark-mode .visitor-counter {
    color: var(--text-gray-dark);
}

body.dark-mode #visitor-count {
    color: var(--bead-yellow);
}

