/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    font-size: 18px; /* Base font increased */
}

h1, h2, h3, h4, .nav-links {
    font-family: 'Montserrat', sans-serif;
}

/* --- Header --- */
header {
    background-color: #002b5c; /* Dark Blue */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px; /* Wider container */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.nav-logo {
    height: 100px; /* Larger logo */
    border-radius: 50%;
    border: 2px solid #a32029;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 16px; /* Increased */
    text-transform: uppercase;
    position: relative;
    transition: 0.3s;
}

nav a.active::before {
    content: "▼";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: #a32029;
    font-size: 12px;
}

nav a:hover {
    color: #ccc;
}

.social-icon {
    background-color: #a32029;
    color: white;
    width: 40px; /* Larger icon */
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 18px;
}

/* --- Hero --- */
.hero-section {
    width: 100%;
    height: 600px; /* Taller hero */
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* --- Red Banner Overlap --- */
.overlap-container {
    max-width: 1200px;
    margin: -120px auto 0; 
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.red-banner {
    background-color: #a32029;
    color: white;
    display: flex;
    align-items: center;
    padding: 30px 50px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.banner-logo img {
    height: 160px; /* Larger Seal */
    width: 160px;
    border-radius: 50%;
    border: 4px solid white;
    margin-right: 50px;
}

.banner-text h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.banner-text .thin-text {
    font-weight: 300;
}

.banner-text p {
    font-style: italic;
    font-size: 18px;
}

/* --- Main Content --- */
.content-wrapper {
    max-width: 1000px;
    margin: 80px auto 120px;
    text-align: center;
    padding: 0 20px;
}

.welcome-title {
    font-size: 60px; /* Larger */
    color: #002b5c;
    font-weight: 800;
    margin-bottom: 15px;
}

.title-underline {
    width: 80px;
    height: 5px;
    background-color: #a32029;
    margin: 0 auto 40px;
}

.text-block h3 {
    font-weight: 400;
    color: #3b6e8f; 
    font-size: 28px; /* Larger */
    margin-bottom: 10px;
}

.photo-link {
    display: block;
    font-weight: 800;
    color: #000;
    font-size: 24px; /* Larger */
    text-decoration: none;
    margin: 30px 0;
}

.photo-link:hover {
    text-decoration: underline;
}

.mission-text {
    color: #555;
    line-height: 1.8;
    font-size: 18px; /* Larger */
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

/* --- Footer --- */
footer {
    background-color: #002b5c;
    color: white;
    padding: 80px 0;
    border-top: 6px solid #a32029;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    padding: 0 30px;
}

/* Footer Col 1 */
.info-col p {
    font-size: 15px; /* Larger */
    line-height: 1.6;
    margin-top: 15px;
    opacity: 0.9;
}

.info-col h4 {
    font-size: 16px;
    font-weight: 700;
}

/* Footer Col 2 */
.contact-details {
    text-align: left;
}

.contact-details h2 {
    font-size: 48px; /* Larger */
    font-weight: 800;
}

.contact-details h2 .light {
    font-weight: 300;
}

.red-dash {
    width: 50px;
    height: 4px;
    background-color: #a32029;
    margin: 15px 0 25px;
}

.contact-details h4 {
    font-size: 18px;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 16px; /* Larger */
}

.contact-item i {
    margin-right: 15px;
    margin-top: 4px;
    color: white;
    font-size: 20px;
}

.contact-item a {
    color: white;
    text-decoration: none;
}

/* Footer Col 3 (Form) */
.form-col form {
    display: flex;
    flex-direction: column;
}

.form-col label {
    font-size: 14px; /* Larger */
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 15px;
}

.form-col label:first-child {
    margin-top: 0;
}

.form-col input, 
.form-col textarea {
    padding: 12px;
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 16px;
    width: 100%;
}

.form-col button {
    margin-top: 20px;
    background-color: #a32029;
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 16px;
    width: 120px;
    transition: background 0.3s;
}

.form-col button:hover {
    background-color: #821920;
}

/* --- Responsive Mobile Styles --- */
@media (max-width: 1024px) {
    .banner-text h1 {
        font-size: 32px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .contact-details {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .contact-item {
        justify-content: center;
    }
    .red-dash {
        margin: 15px auto;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    nav ul {
        margin: 20px 0;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .overlap-container {
        margin-top: 0;
    }

    .red-banner {
        flex-direction: column;
        text-align: center;
        margin-top: -60px;
    }

    .banner-logo img {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .form-col button {
        width: 100%;
    }
}

/* =========================================
   ABOUT PAGE SPECIFIC STYLES
   ========================================= */

/* Page Hero (with text overlay) */
.page-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.page-hero .hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Slight dark tint for readability */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-overlay h1 {
    color: white;
    font-size: 80px; /* Very Large */
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

/* General Section Styles */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-block {
    margin-bottom: 100px;
}

.section-title {
    font-size: 48px;
    color: #333; /* Light/Thin part color default */
    font-weight: 300; /* Default to thin */
    margin-bottom: 10px;
}

.section-title .bold-blue {
    color: #002b5c;
    font-weight: 800;
}

.title-underline-left {
    width: 80px;
    height: 5px;
    background-color: #a32029;
    margin-bottom: 40px;
}

.title-underline-center {
    width: 80px;
    height: 5px;
    background-color: #a32029;
    margin: 0 auto 60px;
}

.center-header {
    text-align: center;
}

/* History Section Text */
.history-section p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #444;
}

/* Trustees List */
.trustee-card {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.trustee-img {
    flex: 0 0 250px; /* Fixed width for image container */
}

.trustee-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.trustee-info {
    flex: 1;
}

.trustee-info h3 {
    color: #002b5c;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.trustee-role {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.trustee-info p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #444;
}

/* School Section */
.school-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.school-logo {
    flex: 0 0 300px;
    text-align: center;
}

.school-logo img {
    max-width: 100%;
    height: auto;
}

.school-text {
    flex: 1;
}

.school-text p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #444;
}

/* Responsive Styles for About Page */
@media (max-width: 900px) {
    .page-hero {
        height: 300px;
    }
    
    .hero-overlay h1 {
        font-size: 50px;
    }

    .trustee-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .trustee-img {
        flex: 0 0 auto;
        width: 250px;
        margin-bottom: 20px;
    }

    .school-content {
        flex-direction: column;
        text-align: center;
    }
    
    .title-underline-left {
        margin: 0 auto 30px; /* Center align underlines on mobile */
    }
    
    .section-title {
        text-align: center;
    }
}

/* =========================================
   DONATE PAGE SPECIFIC STYLES
   ========================================= */

/* Message Section Layout */
.message-container {
    display: flex;
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.chart-col {
    flex: 0 0 35%; /* Pie chart takes about 35% width */
}

.chart-col img {
    width: 100%;
    height: auto;
}

.text-col {
    flex: 1;
    text-align: right; /* Text aligns right per screenshot */
}

.text-col p {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.signature-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 30px 0;
}

.sig-title {
    font-style: italic;
    margin-bottom: 10px;
    color: #333;
}

.sig-img {
    height: 80px;
    width: auto;
}

.small-italic {
    font-size: 14px !important;
    font-style: italic;
    color: #666;
    margin-top: 40px;
}

/* Donation Options (2 Columns) */
.donation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px; /* Wide gap between options */
    text-align: center;
    margin-top: 100px;
    margin-bottom: 100px;
}

.blue-title {
    color: #002b5c;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.donate-card p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555;
    min-height: 60px; /* Aligns buttons if text length differs slightly */
}

/* Red Donate Button Style */
.btn-donate {
    display: inline-block;
    background-color: #a32029;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
    border-bottom: 4px solid #7a151b; /* Subtle 3D effect matching style */
}

.btn-donate:hover {
    background-color: #821920;
    border-bottom-color: #5e0f13;
}

/* Flyer / Goal Section */
.flyer-container {
    text-align: center;
    margin-top: 40px;
}

.flyer-container img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Responsive Styles for Donate Page */
@media (max-width: 900px) {
    .message-container {
        flex-direction: column;
        text-align: center;
    }

    .chart-col {
        flex: 0 0 auto;
        width: 80%;
    }

    .text-col {
        text-align: center;
    }

    .signature-block {
        align-items: center;
    }

    .donation-options {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .donate-card p {
        min-height: auto;
    }
}

/* =========================================
   EVENTS PAGE & LIGHTBOX STYLES
   ========================================= */

.event-block {
    margin-bottom: 60px;
}

.event-desc {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 40px;
}

.event-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 60px 0;
}

/* Photo Grid (Masonry feel) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 250px; /* Fixed height for uniformity */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images fill the square without stretching */
    display: block;
}

/* Video Trigger Styling */
.video-trigger .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(163, 32, 41, 0.9); /* Red Brand Color */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    border: 3px solid white;
    transition: transform 0.2s;
}

.video-trigger:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Highlight Photo (Single large photo) */
.highlight-photo {
    text-align: center;
    margin-bottom: 40px;
}

.highlight-photo img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.3s;
}

.highlight-photo img:hover {
    transform: scale(1.01);
}

.highlight-photo .caption {
    margin-top: 10px;
    font-style: italic;
    color: #666;
    font-size: 16px;
}

/* --- LIGHTBOX STYLES --- */
.lightbox {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Responsive Image inside Lightbox */
#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
    border: 4px solid white;
    border-radius: 4px;
}

/* Video Iframe inside Lightbox */
#lightbox-video {
    width: 80vw;
    height: 45vw; /* 16:9 Aspect Ratio calculation */
    max-width: 1000px;
    max-height: 562px;
    border: 4px solid white;
}

/* Close Button */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.close-lightbox:hover {
    color: #a32029;
}

/* Mobile Adjustments for Events */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }
    
    .gallery-item {
        height: auto; /* Allow natural height on mobile */
    }
    
    #lightbox-video {
        width: 95vw;
        height: 53vw;
    }
    
    .close-lightbox {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}

/* --- LIGHTBOX NAVIGATION STYLES --- */

/* The Navigation Arrows */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 50px;
    cursor: pointer;
    z-index: 10001;
    padding: 20px;
    transition: color 0.3s, transform 0.3s;
    user-select: none; /* Prevents highlighting text when clicking fast */
}

.lb-nav:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.2);
}

.lb-prev {
    left: 20px;
}

.lb-next {
    right: 20px;
}

/* Hide nav buttons when viewing video or single images */
.lb-nav.hidden {
    display: none !important;
}

/* Mobile adjustments for arrows */
@media (max-width: 768px) {
    .lb-nav {
        font-size: 30px;
        padding: 10px;
    }
    .lb-prev { left: 5px; }
    .lb-next { right: 5px; }
}

/* =========================================
   MOBILE SCROLL-AWAY HEADER
   ========================================= */

@media (max-width: 900px) {
    
    /* 1. Set up the Two-Row Layout */
    .header-container {
        flex-wrap: wrap; /* Allows items to break onto new lines */
        justify-content: space-between; /* Pushes Logo left, Social right */
        align-items: center;
        padding: 10px 20px;
    }

    /* 2. Order the items: Row 1 = Logo & Social, Row 2 = Nav */
    .logo-area {
        order: 1;
        transition: all 0.4s ease; /* Smooth fade out */
        max-height: 120px; /* Allow full height initially */
        opacity: 1;
        overflow: hidden;
    }

    .social-area {
        order: 2;
        transition: all 0.4s ease;
        max-height: 120px;
        opacity: 1;
        overflow: hidden;
    }

    nav {
        order: 3;
        width: 100%; /* Force it to take the full next line */
        margin-top: 15px; /* Spacing between Logo and Nav */
        text-align: center;
        transition: margin 0.4s ease;
    }

    nav ul {
        justify-content: center;
        gap: 20px;
        margin: 0;
    }

    /* 3. The "Shrunk" State (Applied via JS) */
    header.mobile-shrink .logo-area,
    header.mobile-shrink .social-area {
        max-height: 0; /* Shrink height to 0 */
        opacity: 0;    /* Fade out */
        margin: 0;     /* Remove margin */
    }

    header.mobile-shrink nav {
        margin-top: 0; /* Remove gap so Nav touches top */
        padding-bottom: 5px;
    }
    
    header.mobile-shrink {
        padding: 5px 0; /* Shrink the main container padding */
    }
}