/*
Theme Name: Mount Litera Zee School Theme (Rebuilt)
Theme URI: https://mountliteraschool.in
Author: Rudraksh Educational Trust
Author URI: https://mountliteraschool.in
Description: A custom premium theme re-built from scratch with full assets.
Version: 1.0.0
Text Domain: mlzz-theme
*/

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    /* Colors */
    --color-primary: #01245c;
    --color-primary-dark: #001840;
    --color-primary-dark: #001840;
    --color-accent: #47a737;
    /* New Site Green */
    --color-accent-hover: #368528;
    /* New Darker Green */
    --color-footer-accent: #9dcc31;
    /* Original Footer Green */
    --color-secondary: #483a81;
    --color-light: #c2e7f5;
    --color-light-bg: #f4f9fc;
    --color-white: #ffffff;
    --color-text: #1a1a2e;
    --color-text-light: #6e6e80;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 4rem;
    /* 64px */
    --spacing-xl: 8rem;
    /* 128px */

    /* Layout */
    --container-width: 1200px;
    --header-height: 95px;
    /* Balanced height for permanent navbar */

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* =========================================
   2. RESET & BASE
   ========================================= */


/* =========================================
   2. RESET & BASE
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    font-weight: 600;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* =========================================
   3. UTILITIES
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section {
    padding: var(--spacing-lg) 0;
}

.text-accent {
    color: var(--color-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.75rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
}

.btn--secondary {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    margin-left: 1rem;
}

.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* =========================================
   4. HEADER
   ========================================= */
/* =========================================
   4. HEADER
   ========================================= */
/* =========================================
   4. HEADER
   ========================================= */
/* Admin Bar Fix */
.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .header {
        top: 46px;
    }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
}



.header__container {
    width: 100%;
    max-width: 100%;
    padding: 0 4rem;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    transition: all 0.4s ease;
}



.header__logo {
    height: 80px;
    display: flex;
    align-items: center;
    padding-top: 0;
    margin-top: 0;
    transition: all 0.4s ease;
}



.header__logo img {
    height: 100%;
    width: auto;
    transition: all 0.4s ease;
}

.header__menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin-top: 0px;
}

.header__link {
    font-weight: 500;
    color: var(--color-primary);
    position: relative;
}

.header__link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.header__link:hover::after {
    width: 100%;
}

.header__cta {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
}

.header__cta:hover {
    background-color: var(--color-accent-hover);
}

.header__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.header__toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: 0.3s;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 7rem);
    padding-bottom: var(--spacing-lg);
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8)), url('assets/images/gallery/IMG_5205.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.hero__blob--1 {
    width: 500px;
    height: 500px;
    background-color: var(--color-light);
    top: -100px;
    right: -100px;
}

.hero__blob--2 {
    width: 300px;
    height: 300px;
    background-color: rgba(157, 204, 49, 0.2);
    bottom: 0;
    left: 10%;
}

.hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
}

.hero__subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    max-width: 450px;
}

.hero__image-wrapper {
    position: relative;
    /* Removed old wrapper styles in favor of collage */
}

/* New Hero Collage */
.hero__collage {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__img-main-wrapper {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 450px;
}

.hero__img-main {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(1, 36, 92, 0.15));
    transform: scale(1.1);
    /* Make child prominent */
    transition: transform 0.5s ease;
}


/* Hover effect removed as per request */
/* .hero__collage:hover .hero__img-main {
    transform: scale(1.15) rotate(1deg);
} */

.hero__card {
    position: absolute;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.hero__card--1 {
    width: 180px;
    height: 120px;
    bottom: 40px;
    left: 0;
    overflow: hidden;
    border: 4px solid var(--color-white);
    transform: rotate(-5deg);
}

.hero__card--1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.hero__card--badge {
    top: 60px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    text-align: center;
    color: var(--color-primary);
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation-delay: 1s;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.85rem;
}

/* Animation Keyframes */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-15px) rotate(-3deg);
    }
}

@keyframes badge-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.badge-bounce {
    animation: badge-bounce 5s ease-in-out infinite;
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .hero__collage {
        height: auto;
        margin-top: 2rem;
    }

    .hero__card--1 {
        width: 120px;
        height: 80px;
        bottom: 0;
    }

    .hero__card--badge {
        right: 0;
        top: 20px;
        padding: 0.8rem;
    }
}

/* Floating Icon setup */
.hero__floating-icon {
    position: absolute;
    width: 120px;
    bottom: 10%;
    right: 5%;
    opacity: 0.1;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* =========================================
   6. ABOUT SECTION
   ========================================= */
.about__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about__visual {
    position: relative;
}

.about__card {
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

/* Hover effect removed */
/* .about__card:hover {
    transform: rotate(0deg) scale(1.02);
} */

.about__img {
    border-radius: var(--radius-sm);
    width: 100%;
}

.section-subtitle {
    color: var(--color-accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.section-text {
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.about__badges {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.about__badge {
    height: 40px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.about__badge:hover {
    opacity: 1;
}

/* =========================================
   6.1. NOTICE BOARD (Full Width Section)
   ========================================= */
.notice-section {
    background-color: var(--color-light-bg);
    padding: 3rem 0;
}

.notice-board {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.notice-board__header {
    background: var(--color-primary);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-white);
}

.notice-board__title {
    font-size: 1.5rem;
    margin: 0;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notice-board__link {
    font-size: 0.95rem;
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: underline;
}

.notice-board__link:hover {
    color: var(--color-white);
}

.notice-board__list {
    padding: 1rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notice-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #eee;
    /* Boxed notices */
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    background: #fff;
}

.notice-item:hover {
    background-color: #fcfcfc;
    border-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.notice-item:last-child {
    border-bottom: 1px solid #eee;
    /* Reset from previous style */
}

.notice-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-light-bg);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    min-width: 60px;
    height: 60px;
    color: var(--color-primary);
    border: 1px solid rgba(1, 36, 92, 0.1);
}

.notice-date .d {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.notice-date .m {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.notice-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.notice-content a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    text-decoration: none;
}

.notice-content a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.notice-tag {
    font-size: 0.7rem;
    background: #eee;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    font-weight: 600;
    margin-top: 0.25rem;
}

.notice-tag.new {
    background: var(--color-accent);
    color: var(--color-white);
}

/* =========================================
   6.2. ABOUT SECTION (continued)
   ========================================= */
/* =========================================
   6.3. TOPPERS SECTION
   ========================================= */
.toppers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns on desktop */
    gap: 2rem;
    padding: 1rem 0;
}

.topper-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    position: relative;
    padding-top: 2rem;
}

.topper-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.topper-img-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--color-light-bg);
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background-color: #f0f0f5;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
    background-size: 50%;
    background-position: center;
    background-repeat: no-repeat;
}

.topper-info {
    padding: 0 1.5rem 2rem;
}

.topper-name {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.topper-class {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.topper-score {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(157, 204, 49, 0.3);
}

@media (max-width: 900px) {
    .toppers-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet/mobile landscape */
    }
}

@media (max-width: 600px) {
    .toppers-grid {
        grid-template-columns: 1fr;
        /* 1 column on small mobile */
    }
}

/* =========================================
   6.4. MANAGEMENT SECTION
   ========================================= */
.management {
    background-color: var(--color-white);
}

.management__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.management__content {
    order: 1;
}

.management__visual {
    order: 2;
    display: flex;
    justify-content: center;
}

.management__logo-wrapper {
    width: 100%;
    max-width: 350px;
    padding: 2rem;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.management__logo-wrapper:hover {
    transform: scale(1.02);
}

.management__logo {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 900px) {
    .management__container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .management__content {
        order: 2;
    }

    .management__visual {
        order: 1;
        margin-bottom: 2rem;
    }

    .management__logo-wrapper {
        max-width: 250px;
        margin: 0 auto;
    }
}

/* =========================================
   7. ACADEMICS SECTION
   ========================================= */
.academics {
    background-color: var(--color-light-bg);
}

.center-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.academics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Increased min-width for better card look */
    gap: 2rem;
}

.academic-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

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

.academic-card__image-container {
    padding: 1.5rem;
    /* Increased padding */
    background: radial-gradient(circle at center, #f8fbfd 0%, #ffffff 80%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 220px;
}

.academic-card__img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    /* Soft shadow for cutouts */
}

.academic-card:hover .academic-card__img {
    transform: scale(1.08);
}

.academic-card__content {
    padding: 1.5rem;
}

.academic-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.academic-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* =========================================
   8. EXPERIENCE (SCROLL)
   ========================================= */
/* =========================================
   8. EXPERIENCE (VISUAL HIGHLIGHTS)
   ========================================= */
.experience {
    position: relative;
    overflow: hidden;
    background-color: #fcfdfe;
    /* Subtle separation */
    padding-bottom: 4rem;
    /* Add breathing room */
}

.experience__bg-decoration {
    position: absolute;
    top: -50px;
    right: -100px;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
    /* Optimize for parallax */
}

.experience__bg-decoration img {
    width: 600px;
    transform: rotate(15deg);
    /* Initial rotation handled in JS or preserved here */
}


/* Gallery Wrapper for Arrows */
.gallery-wrapper {
    position: relative;
    width: 100%;
    margin-top: 3rem;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--color-white);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-primary);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.gallery-nav:hover {
    background: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav--prev {
    left: 2rem;
}

.gallery-nav--next {
    right: 2rem;
}

.gallery-hint {
    position: absolute;
    top: -2rem;
    right: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    animation: fadePulse 3s infinite;
}

@keyframes fadePulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Adjust original margin since wrapper handles it */
.scrolling-gallery {
    margin-top: 0;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.scrolling-gallery::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.scrolling-gallery__track {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 0 2rem;
    width: max-content;
    /* Ensure track grows */
}

.gallery-item {
    position: relative;
    width: 350px;
    height: 450px;
    /* Taller for premium look */
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    scroll-snap-align: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

/* Mobile Scroll Behavior - already handled by generic class now */
@media (max-width: 768px) {
    .gallery-item {
        width: 280px;
        height: 350px;
    }
}

.gallery-item__img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-item__img {
    transform: scale(1.1);
}

.cover-fit {
    object-fit: cover;
}

.fit-contain {
    object-fit: contain;
    background: #f4f4f4;
    /* Fallback for transparency */
}

.gallery-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(1, 36, 92, 0.9), transparent);
    color: white;
    font-weight: 600;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item__overlay {
    transform: translateY(0);
}

/* =========================================
   Facilities Grid
   ========================================= */
.facilities__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Forced 3 columns as per static design likelihood */
    gap: 1.5rem;
    margin-top: 2rem;
}

.facility-item {
    background-color: var(--color-light-bg);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    color: var(--color-primary);
    border: 1px solid rgba(1, 36, 92, 0.05);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.facility-item i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
}

.facility-item:hover {
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--color-accent);
}

.facility-item:hover i {
    transform: scale(1.1);
    color: var(--color-accent);
}

/* =========================================
   9. CTA & FOOTER (Redesigned)
   ========================================= */
.cta {
    padding: var(--spacing-lg) 0;
}

.cta__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cta__card {
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

/* Info Card Style */
.cta__card--info {
    background-color: var(--color-white);
    border: 1px solid #e1e1e1;
    color: var(--color-text);
}

.cta__card--info .cta__card-title {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cta__card--info .cta__icon-wrapper {
    background-color: var(--color-light-bg);
    color: var(--color-primary);
}

.cta__contact-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cta__contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--color-primary);
    transition: 0.2s;
}

.cta__contact-link:hover {
    color: var(--color-accent);
    transform: translateX(5px);
}

/* Action Card Style */
.cta__card--action {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    box-shadow: 0 10px 30px rgba(1, 36, 92, 0.3);
}

.cta__card--action .cta__card-title {
    color: var(--color-white);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta__card--action .cta__icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
}

.cta__card-bg {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 200px;
    opacity: 0.05;
    pointer-events: none;
    transform: rotate(15deg);
}

/* Common Card Elements */
.cta__icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.cta__map-container {
    margin-top: 1.5rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cta__card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn--white {
    background-color: var(--color-white);
    color: var(--color-primary);
    font-weight: 600;
    border: none;
}

.btn--white:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn--pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@media (max-width: 900px) {
    .cta__grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
    background-color: #001220;
    /* Deep premium navy */
    color: var(--color-white);
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
    background-color: #030b1c;
    /* Deep Navy/Black from wireframe */
    color: var(--color-white);
    padding: 5rem 0 3rem;
    position: relative;
    font-size: 1.1rem;
    /* Increased from 0.9rem */
}

.footer__container {
    width: 95%;
    /* Use almost full width */
    max-width: 1800px;
    /* Cap at large screens but significantly wider than 1200px */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.2fr 1fr;
    /* Increased first col for logos */
    gap: 5rem;
    /* Increased from 3rem */
    align-items: start;
}

/* Col 1: Brand & Identity */
.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align for the tagline */
    text-align: left;
    width: fit-content;
    /* Constrain width to content (logos) so tagline wraps */
    max-width: 550px;
    /* Increased to fit wider logos */
}

.footer__brand-row {
    display: flex;
    align-items: flex-end;
    /* Align bottom, decoupling heights */
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Brand Widget - Shared Style for School & Trust */
.footer__brand-widget {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    width: auto;
    /* Let flex item size naturally or fix if needed */
}

/* Modifier: Clean Widget (No Frame) */
.footer__brand-widget--clean {
    background: none;
    border: none;
    padding: 0;
}

.footer__brand-widget--clean .brand-widget-card {
    width: 280px;
    /* Slightly larger */
    height: 240px;
    /* Larger size to balance with the framed widget */
    /* Increased to match total height of Trust Box */
}

.brand-widget-header {
    font-size: 0.85rem;
    /* Increased */
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    min-height: 20px;
    /* Ensure line height even if text is &nbsp; */
}

.brand-widget-card {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    width: 200px;
    /* Increased */
    /* Fixed width for symmetry */
    height: 180px;
    /* Increased */
    /* Fixed height for symmetry */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.footer__brand-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.footer__tagline {
    font-size: 1.1rem;
    /* Increased */
    color: #a0a0b0;
    line-height: 1.6;
    width: 100%;
    /* Match parent width (which is fit to logos) */
    margin-top: 1rem;
}

/* General Columns */
.footer__col {
    display: flex;
    flex-direction: column;
}

.footer__heading {
    color: var(--color-accent);
    font-size: 1.3rem;
    /* Increased from 1rem */
    text-transform: uppercase;
    /* MATCH WIREFRAME */
    margin-bottom: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Navigation Links */
.footer__nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    /* Increased gap */
}

.footer__nav-list a {
    color: #a0a0b0;
    transition: color 0.3s;
    font-size: 1.1rem;
}

.footer__nav-list a:hover {
    color: var(--color-accent);
}

/* Contact Info */
.footer__contact-info ul li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    color: #a0a0b0;
}

.footer__contact-info i {
    color: var(--color-accent);
    /* Green Icons */
    margin-top: 4px;
}

.footer__contact-info a {
    color: #a0a0b0;
    transition: color 0.3s;
}

.footer__contact-info a:hover {
    color: var(--color-white);
}

/* Social Icons */
.footer__social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 55px;
    /* A little bigger */
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.4rem;
}

.social-icon:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

/* Bottom Bar */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
    background-color: #020815;
    /* Slightly darker */
}

/* Responsive */
@media (max-width: 900px) {
    .footer__container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer__brand {
        grid-column: 1 / -1;
        margin-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .footer__container {
        grid-template-columns: 1fr;
    }

    .footer__brand {
        align-items: flex-start;
        text-align: left;
    }

    .footer__trust-box {
        align-items: flex-start;
    }
}

/* =========================================
   10. ANIMATIONS
   ========================================= */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Delay modifiers */
[style*="--delay"] {
    transition-delay: var(--delay);
}

/* =========================================
   11. RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .header__toggle {
        display: flex;
    }

    .header__menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .header__menu.active {
        right: 0;
    }

    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }

    .hero__text-group {
        order: 2;
    }

    .hero__visual {
        order: 1;
        max-width: 80%;
        margin: 0 auto 2rem;
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .about__container {
        grid-template-columns: 1fr;
    }

    .cta__card {
        flex-direction: column;
        text-align: center;
    }

    .cta__content {
        max-width: 100%;
    }

    .footer__container {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEW CSS CAROUSEL GALLERY
   ========================================= */

.carousel {
    display: block;
    text-align: left;
    position: relative;
    margin-bottom: 22px;
}

.carousel>input {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

/* Slide Logic */
.carousel>input:nth-of-type(6):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: -500%;
}

.carousel>input:nth-of-type(5):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: -400%;
}

.carousel>input:nth-of-type(4):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: -300%;
}

.carousel>input:nth-of-type(3):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: -200%;
}

.carousel>input:nth-of-type(2):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: -100%;
}

.carousel>input:nth-of-type(1):checked~.carousel__slides .carousel__slide:first-of-type {
    margin-left: 0%;
}

/* Active Thumbnail Highlight */
.carousel>input:nth-of-type(1):checked~.carousel__thumbnails li:nth-of-type(1) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel>input:nth-of-type(2):checked~.carousel__thumbnails li:nth-of-type(2) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel>input:nth-of-type(3):checked~.carousel__thumbnails li:nth-of-type(3) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel>input:nth-of-type(4):checked~.carousel__thumbnails li:nth-of-type(4) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel>input:nth-of-type(5):checked~.carousel__thumbnails li:nth-of-type(5) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel>input:nth-of-type(6):checked~.carousel__thumbnails li:nth-of-type(6) {
    box-shadow: 0px 0px 0px 5px rgba(1, 36, 92, 0.5);
}

.carousel__slides {
    position: relative;
    z-index: 1;
    padding: 0;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    display: flex;
}

.carousel__slide {
    position: relative;
    display: block;
    flex: 1 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: all 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth transition */
    vertical-align: top;
    box-sizing: border-box;
    white-space: normal;
}

.carousel__slide figure {
    display: flex;
    margin: 0;
}

.carousel__slide div {
    position: relative;
    width: 100%;
}

/* Aspect Ratio 3:2 */
.carousel__slide div:before {
    display: block;
    content: "";
    width: 100%;
    padding-top: 66.67%;
    /* (2 / 3) * 100% */
}

.carousel__slide img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: var(--radius-md);
    /* Keep theme styling */
    box-shadow: var(--shadow-md);
}

.carousel__slide figcaption {
    align-self: flex-end;
    padding: 20px 20px 0 20px;
    flex: 0 0 auto;
    width: 25%;
    min-width: 200px;
}

.carousel__slide .credit {
    margin-top: 1rem;
    color: rgba(0, 0, 0, 0.5);
    display: block;
}

.carousel__thumbnails {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    margin: 20px -10px 0;
    /* Adjusted top margin */
}

.carousel__thumbnails li {
    flex: 1 1 auto;
    max-width: calc((100% / 6) - 20px);
    margin: 0 10px;
    transition: all 300ms ease-in-out;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.carousel__thumbnails label {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    /* Aspect Ratio 1:1 */
    cursor: pointer;
}

.carousel__thumbnails label:hover img {
    box-shadow: 0px 0px 0px 3px rgba(1, 36, 92, 0.25);
    /* Theme color */
    transform: scale(1.05);
    /* Added hover effect */
}

.carousel__thumbnails img {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 300ms ease-in-out;
}

/* =========================================
   7. GALLERY (Flickity)
   ========================================= */
.gallery {
    background: #EEE;
    margin: 0 auto 40px;
    padding-bottom: 40px;
    /* Space for dots */
    max-width: 1000px;
    width: 90%;
}

/* Position dots */
.flickity-page-dots {
    bottom: 10px;
}

.flickity-viewport {
    transition: height 0.2s;
}

.gallery-cell {
    width: 100%;
    height: 500px;
    margin-right: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    counter-increment: gallery-cell;
}

.gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Caption overlay */
.gallery-cell figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-cell:hover figcaption {
    opacity: 1;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-cell {
        height: 300px;
    }
}

/* Thumbnail Navigator */
.gallery-nav {
    margin: 20px auto 0;
    max-width: 1000px;
    width: 90%;
    padding-bottom: 20px;
}

.gallery-nav-cell {
    width: 120px;
    height: 80px;
    margin-right: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.gallery-nav-cell.is-nav-selected {
    opacity: 1;
    border: 2px solid var(--color-primary);
}

.gallery-nav-cell:hover {
    opacity: 0.8;
}

.gallery-nav-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -------------------------------------------------------------------------- */
/*                               Modal Styles                                 */
/* -------------------------------------------------------------------------- */

.modal {
    display: none;
}

.modal.is-open {
    display: block;
}

.modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(1, 36, 92, 0.6);
    /* Primary color with opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
    padding: 1rem;
    animation: fadeIn 0.3s ease-in;
}

.modal__container {
    background-color: var(--color-white);
    padding: 0;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    box-sizing: border-box;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #eee;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal__header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 4px solid var(--color-accent);
}

.modal__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.modal__close {
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.modal__close::before,
.modal__close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background-color: var(--color-white);
    transform: rotate(45deg);
}

.modal__close::after {
    transform: rotate(-45deg);
}

.modal__content {
    padding: 2rem;
}

/* Form Grid Layout */
.admission-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5eb;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--color-light-bg);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cbd2d9;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(1, 36, 92, 0.1);
}

.form-group input[readonly] {
    background-color: #e9ecef;
    color: var(--color-text-light);
    cursor: default;
    border-color: #dee2e6;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 0.5rem 0;
}

.radio-group.wrap {
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-group label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
    color: var(--color-text);
    font-family: var(--font-body);
}

.radio-group input[type="radio"] {
    accent-color: var(--color-accent);
    width: 1.1em;
    height: 1.1em;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

/* Status Message */
.form-status {
    grid-column: 1 / -1;
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.form-status.success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.form-status.error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.form-actions {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.form-actions .btn {
    width: auto;
    padding: 1rem 3rem;
    font-size: 1rem;
    letter-spacing: 0.5px;
    background: var(--color-primary);
    border: none;
    box-shadow: var(--shadow-md);
    min-width: 200px;
}

.form-actions .btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 600px) {
    .admission-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal__container {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* -------------------------------------------------------------------------- */
/*                            Initial Popup Styles                            */
/* -------------------------------------------------------------------------- */

.initial-popup__container {
    background: transparent;
    box-shadow: none;
    max-width: 800px;
    width: auto;
    padding: 0;
    overflow: visible;
    /* Allow close button to hang outside if needed */
}

.initial-popup__content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.initial-popup__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    z-index: 100;
}

.initial-popup__close:hover {
    background: white;
    transform: rotate(90deg);
}

.initial-popup__close::before,
.initial-popup__close::after {
    background-color: #333;
}

/* Inline RET Icon */
.ret-icon {
    display: inline-block;
    height: 1.5em;
    vertical-align: middle;
    margin-left: 0.2rem;
    margin-bottom: 0.2rem;
    width: auto;
}

/* Footer Logo Resizing */
/* Footer Logo Resizing & Alignment */
/* Footer Logo Resizing & Alignment */
/* Footer Logo Resizing & Alignment */
/* Footer Logo Resizing & Alignment */
/* Footer Logo Resizing & Alignment */
.footer__logos-container {
    display: flex;
    gap: 2rem;
    /* Increased gap */
    align-items: flex-start;
    margin-bottom: 2rem;
    width: 100%;
    /* Ensure full width usage */
}





/* Text Sizing Updates */
.section-text {
    font-size: 1.25rem;
    /* Increased from base */
    line-height: 1.7;
}

.gallery-cell figcaption {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Hero Section Resizing */
.hero__title {
    font-size: 4rem;
}

.hero__description {
    font-size: 1.5rem;
    max-width: 600px;
    /* Increased to accommodate larger text */
}

.hero__actions .btn {
    padding: 1rem 2.5rem;
    font-size: 1.25rem;
}

/* Adjust Hero Image for Banner */
.hero__img-main {
    transform: none;
    /* Remove scaling */
    filter: none;
    /* Remove drop shadow if needed, or keep it subtle */
    max-width: 100%;
    margin-top: 2rem;
    /* Add some spacing if needed */
}

/* Hide floating elements if they clash with banner */
.hero__card {
    display: none;
}

/* About Section Responsiveness */
@media (max-width: 900px) {
    .about__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about__badges {
        justify-content: center;
    }

    .about__notices {
        margin-top: 2rem;
    }
}

/* Facilities Image Hover Refinement */
.facility-item {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.facility-hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15; /* Replaced 0 with 0.15 for slight visibility */
    transition: all 0.4s ease;
    filter: grayscale(40%) brightness(0.9);
    z-index: -2;
}

.facility-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0.1; /* Slight overlay by default */
    transition: all 0.4s ease;
    z-index: -1;
}

.facility-item:hover .facility-hover-img {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
}

.facility-item:hover::before {
    opacity: 1;
}

.facility-item:hover {
    color: var(--color-white) !important;
    border-color: transparent;
    transform: translateY(-5px);
}

.facility-item:hover i {
    color: var(--color-white) !important;
    transform: scale(1.1);
}

.facility-item span {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   MOBILE OPTIMIZATION (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* ── 1. Global Resets & Consistent Padding ── */
    body { overflow-x: hidden !important; }

    .section, .hero, .footer {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .container {
        width: 100% !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    /* ── 2. Header & Logo ── */
    .header {
        height: var(--header-height) !important;
        background: #ffffff !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.08) !important;
        backdrop-filter: none !important;
    }

    .header.scrolled {
        height: var(--header-height) !important;
    }

    .header__container {
        padding: 0 1rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .header__logo {
        height: 50px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .header.scrolled .header__logo {
        height: 50px !important;
        margin: 0 !important;
    }

    .header__logo img {
        height: 100% !important;
        width: auto !important;
        max-width: 150px !important;
    }

    /* ── Hamburger Toggle (simple 3-line / X) ── */
    .header__toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        padding: 8px !important;
        position: fixed !important;
        top: 20px !important;
        right: 16px !important;
        z-index: 9999 !important;
    }

    .header__toggle span {
        display: block !important;
        width: 24px !important;
        height: 2px !important;
        background-color: var(--color-primary) !important;
        border-radius: 2px !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
    }

    /* ── Plain Full-Screen Mobile Menu ── */
    .header__menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0 !important;
        display: none !important;
        z-index: 1050 !important;
        box-shadow: none !important;
    }

    .header__menu.active {
        display: flex !important;
    }

    .header__menu li {
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .header__menu li:last-child {
        border-bottom: none !important;
    }

    .header__menu li a {
        display: block !important;
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
        font-weight: 500 !important;
        color: var(--color-text) !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Remove CTA button styling in mobile menu */
    .header__cta {
        background: none !important;
        color: var(--color-accent) !important;
        padding: 1rem 2rem !important;
        border-radius: 0 !important;
        font-weight: 600 !important;
    }

    /* Member's Area link in mobile menu */
    .header__menu .btn--secondary {
        background: none !important;
        border: none !important;
        color: var(--color-primary) !important;
        padding: 1rem 2rem !important;
        border-radius: 0 !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }

    /* ── 3. Hero Section ── */
    .hero {
        padding-top: calc(var(--header-height) + 1.5rem) !important;
        text-align: center !important;
        min-height: auto !important;
    }

    .hero__content {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .hero__title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .hero__description {
        font-size: 0.95rem !important;
        margin: 0 auto 1.5rem !important;
    }

    /* Hero buttons - proper gap */
    .hero__actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 16px !important;
        padding: 0 1rem !important;
    }

    .hero__actions .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem 2rem !important;
    }

    .hero__actions .btn--secondary {
        margin-left: 0 !important;
    }

    /* Hero banner image - BIGGER on mobile */
    .hero__collage {
        height: auto !important;
        margin-top: 1.5rem !important;
        width: 100% !important;
    }

    .hero__img-main-wrapper {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .hero__img-main {
        width: 95% !important;
        max-width: none !important;
        height: auto !important;
    }

    .hero__visual {
        max-width: 100% !important;
        margin: 0 !important;
    }

    .hero__card { display: none !important; }

    /* ── 4. About Section ── */
    .about__container {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    /* Badges SAME LINE on mobile */
    .about__badges {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.5rem !important;
        flex-wrap: nowrap !important;
    }

    .about__content .about__badges img.about__badge {
        width: 100px !important;
        max-width: 100px !important;
        height: auto !important;
        margin: 0 !important;
        display: inline-block !important;
    }

    /* ── 5. Grids (1 Column) ── */
    .academics__grid,
    .toppers-grid,
    .about__notices {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* ── 6. Facilities (2 Columns) ── */
    .facilities__grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        padding: 0 !important;
    }

    .facility-item {
        padding: 1.2rem 0.8rem !important;
        min-height: 130px !important;
    }

    .facility-item i { font-size: 1.5rem !important; }
    .facility-item span { font-size: 0.85rem !important; line-height: 1.3 !important; }

    /* ── 7. CTA / Visit Campus Card ── */
    .cta__grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .cta__card {
        padding: 1.5rem !important;
        text-align: left !important;
    }

    .cta__card--info {
        border-radius: var(--radius-md) !important;
    }

    .cta__card-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .cta__icon-wrapper {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    .cta__card-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }

    .cta__card-text {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }

    .cta__contact-list {
        width: 100% !important;
        margin-top: 1rem !important;
        gap: 0.5rem !important;
    }

    .cta__contact-link {
        font-size: 0.9rem !important;
    }

    .cta__map-container {
        margin-top: 1rem !important;
        border-radius: 8px !important;
    }

    .cta__map-container iframe {
        width: 100% !important;
        height: 180px !important;
    }

    /* Action card (Enquire) */
    .cta__card--action {
        text-align: center !important;
        padding: 2rem 1.5rem !important;
    }

    .cta__card--action .cta__card-content {
        align-items: center !important;
    }

    .cta__card-bg {
        display: none !important;
    }

    /* ── 8. Footer ── */
    .footer__container {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer__col {
        width: 100% !important;
        align-items: center !important;
    }

    /* Footer Brand Row */
    .footer__brand {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .footer__brand-row {
        flex-direction: column !important;
        gap: 2rem !important;
        align-items: center !important;
    }

    .footer__brand-widget {
        width: 100% !important;
        align-items: center !important;
    }

    .brand-widget-card {
        width: 180px !important;
        height: 150px !important;
        min-height: auto !important;
        padding: 1rem !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .footer__brand-widget--clean .brand-widget-card {
        width: 180px !important;
        height: 150px !important;
    }

    .brand-widget-header {
        text-align: center !important;
        width: 100% !important;
    }

    .footer__tagline {
        text-align: center !important;
    }

    /* Quick Links */
    .footer__nav-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    /* Social Icons - properly centered */
    .footer__social-icons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    /* Contact Info - icons aligned, block centered */
    .footer__contact-info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .footer__contact-info ul {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: fit-content !important;
        margin: 0 auto !important;
        text-align: left !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .footer__contact-info li {
        display: flex !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 1rem !important;
    }

    .footer__contact-info i {
        min-width: 18px !important;
        text-align: center !important;
        margin-top: 3px !important;
    }

    .footer__bottom {
        text-align: center !important;
        padding: 1.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* ── 9. Section Headings ── */
    .section__header {
        text-align: center !important;
        margin-bottom: 2rem !important;
    }

    .section__title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .section__subtitle {
        font-size: 0.9rem !important;
    }

    /* ── 10. Gallery ── */
    .carousel__slides {
        border-radius: 8px !important;
    }

    /* ── 11. Toppers ── */
    .toppers-grid {
        padding: 0 !important;
    }
}