:root {
    --bg-dark: #000000;
    /* TEXT */
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;

    /* BUTTON */
    --button-text-color: #FFFFFF;
    --button-gradient: linear-gradient(135deg, rgba(255, 95, 74, 0.986) 0%, rgb(248, 162, 151) 100%);

    /* CARD BG COLOR */
    --gradient-card: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(74, 74, 74, 0.6) 100%);

    /* HOME IMAGE SLIDER */
    --maxw: 1400px;
}

::selection {
    background: #d67063;
    color: white;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    scroll-behavior: smooth;
    color: var(--text-primary);
    background-color: var(--bg-dark);
}

/* CONTAINER AND TYPOGRAPHY */
.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2rem 0.5rem;
}

h1 {
    font-size: 3.5rem;
    line-height: 1;
    color: var(--text-primary);
    margin: 0 0 1rem 0;

}

h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    letter-spacing: 3px;

}

h3 {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    letter-spacing: 2px;
}

p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

a {
    text-decoration: none;
    color: inherit;
}

b {
    letter-spacing: 1px;
}


main {
    background-color: rgba(0, 5, 82, 0.164);
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    overflow-x: hidden;
}

/* HEADING */
.gallery {
    margin-top: 90px;
    position: relative;
    height: 380px;
    background: url('/images/school-image-1.JPG') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}

.gallery-inner {
    position: relative;
    z-index: 1;
    color: var(--text-primary);
    padding: 0 .5rem;
    opacity: 0;
    transform: translateY(100px);
    transition: all 2s ease;
    will-change: transform, opacity;
    filter: blur(4px);
}

.gallery-inner .subtitle {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* GALLERY OPTIONS */
.gallery-heading {
    margin: auto;
}

.gallery-options {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    transform: translateY(100px);
    transition: all 2s ease;
    will-change: transform, opacity;
    filter: blur(4px);
}

.animation-show {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.gallery-options a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    background-color: rgb(41, 41, 41);
    border-radius: 30px;
    text-decoration: none;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-image: initial;
    transition: all 0.2s ease-in-out;
}

.gallery-options a:hover {
    background: var(--button-gradient);
    transform: translateY(-2px);
    box-shadow: rgba(226, 74, 74, 0.808) 0px 4px 15px;
}

.gallery-options a.active {
    box-shadow: rgba(226, 74, 74, 0.808) 0px 4px 15px;
    background: var(--button-gradient);
}

.gallery-card-group {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--gradient-card);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.group-heading {
    margin-bottom: 1rem;
    font-size: 1.6rem;
    color: var(--text-primary);
    border-left: 3px solid var(--text-primary);
    padding-left: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* IMAGE GRID */
.group-images,
.gallery-section.all {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
}

/* GALLERY CARD */
.gallery-image-card {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-image-card img {
    width: 100%;
    height: 100%;
    background-size: cover;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.gallery-card-inner-text {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(74, 74, 74, 0.6) 100%);
    color: #FFFFFF;
    padding: 0.75rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(10px);
}

.gallery-image-card:hover .gallery-card-inner-text {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card-inner-text h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}




/* VIDEO SECTION */
.gallery-section.video {
    display: none;
    background: var(--gradient-card);
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    max-width: var(--maxw);
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Individual video card */
.sixth-section-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sixth-section-card:hover {
    transform: translateY(-5px);
}

.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* POPUP */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.popup-container {
    position: relative;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 5rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.popup-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* keeps aspect ratio */
    border-radius: 6px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
}

.close-btn img {
    width: 100%;
    height: 100%;
}

/* RESPONSIVE GRID */
@media (max-width: 1200px) {
    .gallery-section.video {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 900px) {

    .gallery-heading {
        margin-inline: 30px;
    }

    .group-images,
    .gallery-section.all {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .gallery-image-card {
        height: 150px;
    }

    .group-images,
    .gallery-section.all {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .gallery-heading {
        margin-inline: 20px;
    }

    .group-images,
    .gallery-section.all {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .gallery-image-card {
        height: 120px;
    }

    .gallery-section.video {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 400px) {

    .gallery-heading {
        margin-inline: 10px;
    }

    .gallery-image-card {
        height: 200px;
    }

    .group-heading {
        font-size: 1.4rem;
    }

    .gallery-options a {
        font-size: 14px;
    }

    .video-embed {
        padding-bottom: 50%;
        /* slightly taller videos on mobile */
    }
}


/* RESPONSIVENESS */
@media (max-width: 1000px) {
    .gallery-section {
        column-count: 2;
    }

    .popup-container {
        max-width: 700px;
        height: 550px;
        padding: 0.5rem;
    }

    .gallery-options {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


@media (max-width: 800px) {
    body {
        line-height: 1.4;
    }

    .container {
        padding: 1rem .5rem;
    }

    h1 {
        font-size: 3rem;
        line-height: 1;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: .75rem;
    }

    h3 {
        font-size: 1.2rem;
        margin-bottom: .5rem;
    }

    p {
        font-size: 1rem;
    }

    .curriculum-container .card {
        padding: 1rem;
    }
}

@media (max-width: 700px) {
    .gallery {
        margin-top: 70px;
    }

    .gallery-section {
        column-count: 1;
    }
}

@media (max-width: 500px) {
    .curriculum-container .card {
        padding: .7rem;
    }

    .academics-inner .subtitle {
        font-size: 1rem;
    }

    body {
        line-height: 1.3;
    }

    h1 {
        font-size: 2rem;
        line-height: 1;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1rem;
    }

    .btn {
        padding: .5rem .8rem;
        border-radius: 10px;
    }
}


@media (max-width: 400px) {
    body {
        line-height: 1.3;
    }

    h1 {
        font-size: 1.5rem;
        line-height: 1;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    p {
        font-size: 1rem;
    }

    .gallery-heading {
        margin-inline: 10px;
    }

    .gallery-image-card {
        height: 200px;
    }

    .group-heading {
        font-size: 1.4rem;
    }

    .gallery-options a {
        font-size: 14px;
    }

    .video-embed {
        padding-bottom: 50%;
    }
}



.loadMoreBtn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.7rem 1.2rem;
    background: var(--button-gradient);
    color: var(--button-text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}