/* Brand Colors */
:root {
    --primary-blue: #003f88;
    --secondary-blue: #00509e;
    --accent-yellow: #ffcc00;
}

/* General */
body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f7fa;
}

/* Header */
.header {
    background-color: var(--primary-blue);
    padding: 15px 0;
}

.logo {
    width: 90px;
}

/* School levels */
.school-levels {
    color: var(--accent-yellow);
}

/* Navigation */
.nav-section {
    background-color: var(--secondary-blue);
}

.navbar .nav-link {
    color: white;
    font-weight: 500;
    padding: 14px 18px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background-color: var(--accent-yellow);
    color: var(--primary-blue);
}

@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--secondary-blue); /* optional, matches navbar */
        padding: 15px 20px; /* adds spacing inside collapsed menu */
        border-radius: 8px; /* slightly rounded edges */
        margin-top: 10px; /* space from toggle button */
    }

    .navbar-nav .nav-link {
        padding: 10px 0; /* more vertical spacing for mobile links */
    }
     /* Nav items spacing */
    .navbar-nav {
        width: 100%;
    }

     /* Nav link spacing */
    .navbar-nav .nav-link {
        padding: 12px 20px;   /* THIS is the key fix */
        margin: 4px 0;
        border-radius: 6px;
        text-align: left;
    }

     /* Optional hover effect */
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
}

/* Hero */
.hero-section {
    background-color: white;
    padding: 80px 0;
}

.hero-section h2 {
    color: var(--primary-blue);
}

.hero-section {
    background: url('images/school-hero.jpg') center/cover no-repeat;
    background-color:#0d47a1;
    height: 60vh;
}

/* Footer Section */
.footer-section {
    background-color: var(--primary-blue);
    color: white;
}

/* Footer Logo */
.footer-logo {
    width: 130px;
    height: auto;
}

/* Footer Titles */
.footer-title {
    color: var(--accent-yellow);
    margin-bottom: 15px;
}

/* Footer Text */
.footer-text {
    font-size: 14px;
    line-height: 1.7;
}

/* Footer Links */
.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-yellow);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
    padding-top: 15px;
    font-size: 13px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 767px) {
    .footer-logo {
        width: 100px; /* Slightly smaller logo on mobile */
    }
    .footer-section .footer-text,
    .footer-section .footer-links {
        text-align: center; /* Center text on small screens */
    }
}

@media (max-width: 991px) {
    /* Collapsed menu container */
    .navbar-collapse {
        background-color: var(--primary-blue);
        padding: 15px 20px;
        border-radius: 10px;
        margin-top: 12px;
        overflow: hidden; /* ensures animation is smooth */
        max-height: 0;    /* start hidden */
        transition: max-height 0.5s ease-in-out;
    }

    /* When shown */
    .navbar-collapse.show {
        max-height: 500px; /* enough to show all items */
    }

    /* Mobile nav items */
    .navbar-nav {
        width: 100%;
    }

    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.2); /* divider */
    }

    .navbar-nav .nav-link {
        padding: 12px 20px;
        margin: 0;
        border-radius: 6px;
        text-align: left;
        display: flex;
        align-items: center;
        color: white;
    }

    .navbar-nav .nav-link:hover {
        background-color: rgba(255,255,255,0.15);
        transition: background 0.3s;
    }

    /* Icon spacing */
    .navbar-nav .nav-link i {
        min-width: 20px;
    }
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.sticky-top nav {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* subtle separation */
}

/* Mobile dropdown with icons & dividers */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: #0d47a1; /* deep sea blue */
        padding: 15px 20px;
        border-radius: 10px;
        margin-top: 5px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.5s ease-in-out;
    }

    .navbar-collapse.show {
        max-height: 500px;
    }

    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .navbar-nav .nav-link {
        padding: 12px 20px;
        margin: 0;
        border-radius: 6px;
        text-align: left;
        display: flex;
        align-items: center;
        color: white;
    }

    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transition: background 0.3s;
    }

    .navbar-nav .nav-link i {
        min-width: 20px;
    }
}

/* ================= GALLERY STYLING ================= */

.gallery-item {
    position: relative;
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 71, 161, 0.75); /* school blue */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Modal image fix */
#galleryModalImage {
    max-height: 80vh;
    object-fit: contain;
}

/* Mobile optimization */
@media (max-width: 576px) {
    .gallery-item img {
        height: 200px;
    }
}

/* ===== Modal navigation arrows ===== */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fff;
    background: rgba(13, 71, 161, 0.6);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(13, 71, 161, 0.9);
}

.gallery-nav.prev {
    left: 15px;
}

.gallery-nav.next {
    right: 15px;
}

/* ===== Masonry Gallery Layout ===== */
.gallery-masonry {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (max-width: 992px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .gallery-masonry {
        column-count: 1;
    }
}

.gallery-column {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}


/* ===== Gallery Filter Animation ===== */
.gallery-column {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #0d47a1;
    color: #fff;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


/*  */
.gallery-masonry {
    display: grid;
    gap: 1rem;
}

/* Large screens: 3 items */
@media (min-width: 992px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium screens: 2 items */
@media (min-width: 768px) and (max-width: 991px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small screens: 1 item */
@media (max-width: 767px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
    }
}
