/* ============================================================
   MMSB - Milton Margai School for the Blind
   Combined Stylesheet (index + about + new pages)
   ============================================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
    --primary: #1a5f4a;
    --primary-light: #238b6a;
    --primary-dark: #0d3d2f;
    --accent: #d4a853;
    --accent-light: #e8c77b;
    --bg-color: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #777777;
    --border-color: rgba(0,0,0,0.08);
    --card-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 20px 50px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
    --bg-color: #0f1419;
    --bg-secondary: #1a2332;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --border-color: rgba(255,255,255,0.1);
    --card-shadow: 0 10px 40px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 20px 50px rgba(0,0,0,0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

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

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ==================== NAVBAR ==================== */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar.scrolled,
.navbar.navbar-inner {
    background: var(--bg-secondary);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 0.75rem 0;
}

[data-theme="dark"] .navbar.scrolled,
[data-theme="dark"] .navbar.navbar-inner {
    background: var(--bg-secondary);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

.navbar-brand img {
    height: 50px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text .main-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

[data-theme="dark"] .brand-text .main-name {
    color: var(--text-primary);
}

.brand-text .sub-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem !important;
    color: var(--text-primary) !important;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

[data-theme="dark"] .navbar-nav .nav-link::after {
    background: var(--accent);
}

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

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover {
    color: var(--accent) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-color);
}

.theme-toggle .bi-moon-fill {
    display: none;
}

[data-theme="dark"] .theme-toggle .bi-sun-fill {
    display: none;
}

[data-theme="dark"] .theme-toggle .bi-moon-fill {
    display: inline;
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==================== BUTTONS ==================== */
.btn-primary-custom {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(26, 95, 74, 0.35);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

[data-theme="dark"] .btn-outline-custom {
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="dark"] .btn-outline-custom:hover {
    background: var(--accent);
    color: var(--bg-color);
}

.btn-accent-custom {
    background: var(--accent);
    border: 2px solid var(--accent);
    color: var(--primary-dark);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accent-custom:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 168, 83, 0.35);
    color: var(--primary-dark);
}

/* ==================== HERO SECTION (Home) ==================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    background: linear-gradient(135deg, rgba(26, 95, 74, 0.03) 0%, rgba(212, 168, 83, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, rgba(26, 95, 74, 0.08) 0%, rgba(212, 168, 83, 0.05) 100%);
}

.hero-image-container {
    position: relative;
    margin-bottom: 3rem;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

@media (min-width: 992px) {
    .hero-image {
        height: 500px;
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 95, 74, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .hero-badge {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

[data-theme="dark"] .hero-title .highlight {
    color: var(--accent);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== PAGE HERO / BANNER (Inner Pages) ==================== */
.page-hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, rgba(26, 95, 74, 0.06) 0%, rgba(212, 168, 83, 0.04) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, rgba(26, 95, 74, 0.12) 0%, rgba(212, 168, 83, 0.06) 100%);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(26, 95, 74, 0.04);
    pointer-events: none;
}

.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 95, 74, 0.1);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .page-hero-badge {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-hero h1 .highlight {
    color: var(--primary);
}

[data-theme="dark"] .page-hero h1 .highlight {
    color: var(--accent);
}

.page-hero p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb-nav {
    padding: 0;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.breadcrumb-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

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

[data-theme="dark"] .breadcrumb-nav a:hover {
    color: var(--accent);
}

.breadcrumb-nav span {
    color: var(--text-muted);
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-nav .current {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

[data-theme="dark"] .breadcrumb-nav .current {
    color: var(--accent);
}

/* ==================== SECTION STYLES ==================== */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 95, 74, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .section-badge {
    background: rgba(212, 168, 83, 0.15);
    color: var(--accent);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.8;
}

.section-description.centered {
    margin: 0 auto;
}

/* ==================== HIGHLIGHTS SECTION (Home) ==================== */
.highlights-section {
    background: var(--bg-secondary);
}

.highlight-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

[data-theme="dark"] .highlight-card {
    background: var(--bg-secondary);
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.highlight-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
}

.highlight-card:hover .highlight-icon {
    transform: scale(1.1) rotate(5deg);
}

.highlight-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.highlight-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* ==================== HEADMASTER SECTION ==================== */
.headmaster-section {
    background: var(--bg-color);
    position: relative;
}

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

.headmaster-image {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    object-fit: cover;
}

.headmaster-content {
    padding-left: 2rem;
}

@media (max-width: 991px) {
    .headmaster-content {
        padding-left: 0;
        margin-top: 2rem;
    }
}

.headmaster-quote {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

[data-theme="dark"] .headmaster-quote {
    border-left-color: var(--accent);
}

.headmaster-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.headmaster-role {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.vision-box,
.achievement-box {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.75rem;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .vision-box,
[data-theme="dark"] .achievement-box {
    background: rgba(26, 35, 50, 0.5);
}

.vision-box-title,
.achievement-box-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="dark"] .vision-box-title,
[data-theme="dark"] .achievement-box-title {
    color: var(--accent);
}

.vision-box p,
.achievement-box p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ==================== OUR SCHOOL SECTION (Home) ==================== */
.school-section {
    background: var(--bg-secondary);
}

.school-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

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

.school-image-wrapper:hover img {
    transform: scale(1.05);
}

.school-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 95, 74, 0.85) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.school-image-wrapper:hover .school-image-overlay {
    opacity: 1;
}

.school-image-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* ==================== HISTORY SECTION (About) ==================== */
.history-section {
    background: var(--bg-secondary);
}

.history-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.history-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.9;
}

.history-text p {
    margin-bottom: 1.25rem;
}

.history-quote {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    font-style: italic;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
    margin: 2rem 0;
}

[data-theme="dark"] .history-quote {
    border-left-color: var(--accent);
}

.history-quote footer {
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

/* ==================== FOUNDING FATHER CARD (About) ==================== */
.founder-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

[data-theme="dark"] .founder-card {
    background: var(--bg-secondary);
}

.founder-card img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid #1d5b41;
    padding: 20px
    
    /* THE FIX: */
    object-fit: contain; 
    /* Changing this to 40% or 50% pushes the image down to create head space */
    object-position: center 50%; 
    
    margin-bottom: 1.5rem; /* Adds a nice gap between photo and name */
}

[data-theme="dark"] .founder-card img {
    border-color: var(--accent);
}

.founder-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.founder-card .role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .founder-card .role {
    color: var(--accent);
}

.founder-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== FIRST PUPILS SECTION (About) ==================== */
.pupils-section {
    background: var(--bg-color);
}

.pupil-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

[data-theme="dark"] .pupil-card {
    background: var(--bg-secondary);
}

.pupil-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.pupil-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
}

.pupil-card:hover .pupil-icon {
    transform: scale(1.1);
}

.pupil-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.pupil-card .pupil-detail {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .pupil-card .pupil-detail {
    color: var(--accent);
}

.pupil-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* ==================== TIMELINE (About) ==================== */
.timeline-section {
    background: var(--bg-color);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    z-index: 1;
}

[data-theme="dark"] .timeline-item::before {
    border-color: var(--bg-color);
}

.timeline-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    max-width: 100%;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    box-shadow: var(--card-shadow);
}

.timeline-year {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .timeline-year {
    color: var(--accent);
}

.timeline-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-right: 0;
        padding-left: 55px;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(even) {
        padding-left: 55px;
    }

    .timeline-item::before {
        left: 20px;
    }
}

/* ==================== ANNIVERSARY SECTION (About) ==================== */
.anniversary-section {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.anniversary-banner {
    width: 100%;
    /* Remove fixed height to prevent cropping logo and text */
    height: auto; 
    display: block;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.anniversary-overlay-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 3rem;
    /* Reduced negative margin so it doesn't cover the "Coming Soon" text */
    margin-top: -40px; 
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .anniversary-overlay-card {
    background: var(--bg-secondary);
}

/* Ensure the banner container has extra breathing room at the bottom */
.anniversary-banner-container {
    margin-bottom: 20px;
}

.anniversary-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .anniversary-number {
    color: var(--accent);
}

.anniversary-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.anniversary-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.milestone-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

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

.milestone-stat .number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

[data-theme="dark"] .milestone-stat .number {
    color: var(--accent);
}

.milestone-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* Mobile Adjustment: On small screens, remove the overlap entirely 
   to ensure all banner text is visible */
@media (max-width: 768px) {
    .anniversary-overlay-card {
        margin-top: 20px;
        padding: 2rem 1.5rem;
    }
}

/* ==================== GENERIC CONTENT CARD ==================== */
.content-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

[data-theme="dark"] .content-card {
    background: var(--bg-secondary);
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.content-card .card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.content-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.content-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.content-card .card-meta {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .content-card .card-meta {
    color: var(--accent);
}

/* ==================== STAFF / BOARD CARD ==================== */
.person-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

.person-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.person-card .person-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.25rem;
}

.person-card .person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.person-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.person-card .person-role {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .person-card .person-role {
    color: var(--accent);
}

.person-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}

/* ==================== NOTICEBOARD CARD ==================== */
.notice-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.notice-card:hover {
    box-shadow: var(--card-shadow);
}

.notice-card .notice-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.notice-card .notice-category.event {
    background: rgba(26, 95, 74, 0.1);
    color: var(--primary);
}

.notice-card .notice-category.update {
    background: rgba(212, 168, 83, 0.15);
    color: #b8860b;
}

.notice-card .notice-category.improvement {
    background: rgba(35, 139, 106, 0.1);
    color: var(--primary-light);
}

[data-theme="dark"] .notice-card .notice-category.update {
    color: var(--accent);
}

.notice-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.notice-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.notice-card .notice-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* ==================== SIDEBAR ==================== */
.sidebar-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.sidebar-card .quick-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-card .quick-link:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

[data-theme="dark"] .sidebar-card .quick-link:hover {
    color: var(--accent);
}

/* ==================== DONATION FORM ==================== */
.donation-form-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.donation-form-card .form-control,
.donation-form-card .form-select {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.donation-form-card .form-control:focus,
.donation-form-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.15);
}

[data-theme="dark"] .donation-form-card .form-control:focus,
[data-theme="dark"] .donation-form-card .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

.donation-form-card label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ==================== CONTACT FORM ==================== */
.contact-form-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
}

.contact-form-card .form-control {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-form-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.15);
}

[data-theme="dark"] .contact-form-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

/* ==================== IMPACT / CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.cta-section .btn-accent-custom {
    color: var(--primary-dark);
}

/* ==================== ANNOUNCEMENT POPUP ==================== */
.ann-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1080;
}

.ann-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3,10,12,0.45);
    backdrop-filter: blur(2px);
}

.ann-card {
    position: relative;
    max-width: 540px;
    width: 92%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1.2rem 1.25rem;
    box-shadow: 0 18px 40px rgba(2,6,10,0.18);
    transform: translateY(12px) scale(.98);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.ann-card.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ann-close {
    position: absolute;
    right: .6rem;
    top: .45rem;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
}

.ann-content h3 {
    margin: 0 0 .35rem;
    font-size: 1.25rem;
}

.ann-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ann-actions {
    display: flex;
    gap: .6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ann-actions .btn-outline-custom {
    background: transparent;
}

@media (prefers-reduced-motion: reduce) {
    .ann-card {
        transition: none;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 0 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-brand img {
    height: 50px;
    width: auto;
    filter: none;
}

.footer-brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-description {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

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

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-contact-item i {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

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

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(26, 95, 74, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

/* ==================== ANIMATIONS ==================== */
[data-aos] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== TESTIMONIAL CARD ==================== */
.testimonial-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.15;
    position: absolute;
    top: 0.5rem;
    left: 1.25rem;
    line-height: 1;
}

[data-theme="dark"] .testimonial-card::before {
    color: var(--accent);
}

.testimonial-card p {
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.testimonial-card .testimonial-author {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.testimonial-card .testimonial-detail {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== GOVERNANCE ORG CHART ==================== */
.org-structure-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.org-structure-card .org-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(26, 95, 74, 0.08);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.35rem;
}

[data-theme="dark"] .org-structure-card .org-item {
    background: rgba(212, 168, 83, 0.12);
    color: var(--accent);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--bg-secondary);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
        box-shadow: var(--card-shadow);
    }

    .hero-section {
        padding: 120px 0 60px;
    }

    .page-hero {
        padding: 130px 0 60px;
    }

    .section {
        padding: 70px 0;
    }

    .anniversary-banner {
        height: 250px;
    }

    .anniversary-overlay-card {
        margin-top: -40px;
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        justify-content: center;
    }

    .milestone-stats {
        gap: 1.5rem;
    }

    .anniversary-banner {
        height: 200px;
    }
}

/* ==================== GALLERY MODERN STYLES ==================== */

/* Filter Buttons */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--bs-primary); /* Or your specific brand green #1a5f4a */
    color: white;
    border-color: var(--bs-primary);
    box-shadow: 0 4px 15px rgba(26, 95, 74, 0.2);
}

/* Gallery Card & Wrapper */
.gallery-card-wrapper {
    background: transparent; /* Changed from white to keep it seamless */
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image Container - The "Frame" */
.gallery-img-container {
    position: relative;
    width: 100%;
    height: 350px; /* Set a consistent height for the row */
    background: var(--bg-secondary); /* Matches your section background */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 15px;
}

.gallery-img-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* CRITICAL: This prevents cropping entirely */
    transition: transform 0.5s ease;
}

/* Hover Effect - Subtle zoom that doesn't break containment */
.gallery-img-container:hover img {
    transform: scale(1.03);
}

/* Overlay Fix */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 95, 74, 0.2); /* Very light tint on hover */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
}

.gallery-img-container:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    background: white;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Video Wrapper */
.gallery-video-wrapper {
    border-radius: 20px;
    overflow: hidden;
}

.video-fallback {
    background: #222;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease;
}

.video-fallback i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.video-fallback:hover {
    background: #000;
    color: var(--bs-primary);
}

/* Lightbox Adjustments */
#lightboxImage {
    max-height: 85vh;
    width: auto;
    border: 5px solid white;
}

/* Styling for the pupil profile images */
.pupil-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensures image doesn't bleed out of the circle */
    width: 80px;  /* Adjust this to match your existing .pupil-icon size */
    height: 80px; /* Adjust this to match your existing .pupil-icon size */
    border-radius: 50%;
    background-color: var(--primary-light, #f0f0f0); /* Fallback background */
    margin: 0 auto 1.5rem;
}

.pupil-profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps aspect ratio while filling the circle */
    z-index: 2; /* Sits on top of the icon */
}

.pupil-icon i {
    z-index: 1; /* Sits behind the image */
    font-size: 2rem;
}

.testimonial-img-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.testimonial-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color); /* Matches your brand color */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-img {
    transform: scale(1.05);
}

.testimonial-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.bio-full-text {
        text-align: left;
        font-size: 0.9rem;
        line-height: 1.6;
        color: var(--text-secondary);
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px dashed rgba(26, 95, 74, 0.2);
}
.bio-section-title {
        color: var(--primary);
        font-weight: 700;
        font-size: 0.95rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
}
.btn-read-more {
        background: transparent;
        color: var(--primary);
        border: 1px solid var(--primary);
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        transition: all 0.3s ease;
        margin-top: 10px;
}
.btn-read-more:hover {
        background: var(--primary);
        color: white;
}
.btn-read-more:not(.collapsed) {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--primary);
}