/* ============================================================
   TABLE OF CONTENTS
   1. Custom Properties (Design Tokens)
   2. Reset & Base
   3. Flash Notification Bar
   4. Hero Carousel Layout
   5. About Section (.hpage-sec-0_12)
   6. Facilities Section (#hpage-sec-2)
   7. Achievements Section (#achievements-sec)
   8. Popup / Lightbox
   9. Tick List
   10. Stats Grid
   11. Enroll Section
   12. Media Breakpoints
   ============================================================ */

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
    --color-primary: #1B5B35;
    --color-primary-light: #3D7155;
    --color-primary-bg: rgba(0, 77, 18, 0.814);
    --color-accent: #D94444;
    --color-surface: #ffffff;
    --color-section-bg: #F6F8F9;
    --color-overlay: rgba(0, 0, 0, 0.5);
    --color-text: #000000;
    --color-text-muted: #333333;
    --color-text-subtle: #A6A6A8;
    --color-text-faint: #999899;
    --color-enroll-bg: #016F3A;

    --spacing-xs: 0.4rem;
    --spacing-sm: 0.6rem;
    --spacing-md: 1rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 5rem;

    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-pill: 35px;

    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.15);
    --shadow-popup: 0 4px 24px rgba(0, 0, 0, 0.18);
    --font-base: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-base) !important;
    color: var(--color-text);
}

/* ============================================================
   3. FLASH NOTIFICATION BAR
   ============================================================ */
#flashnotify {
    display: grid;
    grid-template-columns: 90% 10%;
    width: 100%;
    background-color: var(--color-surface);
}

marquee {
    padding: 0.8%;
    width: 100%;
}

#SeeAll-div-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

#see-all-btn {
    width: 100px;
    padding: 5px;
    background-color: var(--color-accent);
    border: none;
    border-radius: var(--radius-pill);
    color: white;
    cursor: pointer;
}

/* ============================================================
   4. HERO CAROUSEL LAYOUT
   ============================================================ */
.hpage-sec-1 {
    width: 100%;
    overflow: hidden;
}

/* 5:2 aspect ratio — scales perfectly on every screen, no fixed heights needed */
#carousel-div {
    width: 100%;
    aspect-ratio: 5 / 2;
}

.custom-css-carousel,
.carousel-inner-div,
.carousel-item {
    width: 100%;
    height: 100%;
}

.carousel-item img.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ============================================================
   5. ABOUT SECTION
   ============================================================ */
.hpage-sec-0_12 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: var(--spacing-2xl) var(--spacing-lg);
    background-color: var(--color-surface);
    gap: 2rem;
}

.left-hpage-sec-0_12 {
    padding-left: 10%;
}

.L-HP-S-0_12-p1,
.L-HP-S-0_12-h2 {
    color: var(--color-primary-light);
    font-weight: 700;
}

.L-HP-S-0_12-p2 {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================================
   6. FACILITIES SECTION
   ============================================================ */
#hpage-sec-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-xl) var(--spacing-md);
    background-color: var(--color-section-bg);
}

#Faclities-p {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary-bg);
    margin-bottom: 0.5rem;
}

#Faclities-p span {
    color: var(--color-text);
}

#Faclities-p+p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--color-text-subtle);
    text-align: center;
}

.facilities-card-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1200px;
}

.card-facilities {
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 380px;
}

.card-facilities img {
    width: 100%;
    height: 60%;
    object-fit: cover;
}

.card-facilities div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
}

.card-facilities div h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-light);
}

.card-facilities p {
    color: var(--color-text-faint);
    font-size: 0.9rem;
}

/* ============================================================
   7. ACHIEVEMENTS SECTION
   ============================================================ */
#achievements-sec {
    background-color: var(--color-primary);
    padding: var(--spacing-xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: 35% 1fr;
    gap: 2rem;
    align-items: center;
}

#achievements-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: white;
}

#achievements-sec h4 {
    font-size: 2rem;
    font-weight: 700;
}

.achievements-btn {
    align-self: flex-start;
    color: var(--color-primary);
    background-color: var(--color-surface);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.achievements-btn:hover {
    background-color: #f0f0f0;
    color: var(--color-primary);
    text-decoration: none;
}

#achieve-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.card-achieve-stat {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.bg-stats {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.actual-stat-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.actual-stat-content h1 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 800;
    margin: 0;
}

.actual-stat-content p {
    font-size: clamp(0.7rem, 1.2vw, 0.95rem);
    margin: 0;
}

/* ============================================================
   8. POPUP / LIGHTBOX
   ============================================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-overlay);
    z-index: 9999;
}

.popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-popup);
}

.popup-content img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem; /* Large 'X' for desktop */
    color: black;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   9. TICK LIST
   ============================================================ */
.tick {
    list-style: none;
    font-size: 1rem;
    line-height: 2.5;
    display: flex;
    align-items: center;
}

.tick::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../../images/home/circle-check-filled.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 12px;
    flex-shrink: 0;
}

/* ============================================================
   10. STATS GRID
   ============================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.5rem;
}

.stat-card h1 {
    font-size: 1.8rem;
    color: var(--color-primary);
    font-weight: 700;
}

/* ============================================================
   11. ENROLL SECTION
   ============================================================ */
#enroll-sec {
    background-color: var(--color-enroll-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    color: white;
}

#enroll-now-btn {
    background-color: #FDFDFD;
    color: #1D593C;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   12. MEDIA BREAKPOINTS
   ============================================================ */

/* --- Large tablets / small laptops (≤1200px) --- */
@media (max-width: 1200px) {
    /* Carousel: aspect-ratio: 5/2 is self-scaling — no override needed */

    .hpage-sec-0_12 {
        grid-template-columns: 1fr;
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    .left-hpage-sec-0_12 {
        padding-left: 0;
    }

    #achievements-sec {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .achievements-btn {
        align-self: center;
    }

 .popup-close {
        top: 10px;
        right: 15px;
        font-size: 1.8rem;
        width: 30px;
        height: 30px;
    }
}

/* --- Tablets portrait (≤900px) --- */
@media (max-width: 900px) {
    .popup-close {
        top: 8px;
        right: 12px;
        font-size: 1.5rem;
        width: 26px;
        height: 26px;
    }

    #achieve-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 480px;
        margin: 0 auto;
        gap: 0.75rem;
    }

    .actual-stat-content h1 {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .actual-stat-content p {
        font-size: clamp(0.75rem, 2vw, 0.95rem);
    }

    .facilities-card-group {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* --- Mobile landscape / large phones (≤768px) --- */
@media (max-width: 768px) {

    .popup-close {
        top: 6px;
        right: 10px;
        font-size: 1.3rem;
        width: 24px;
        height: 24px;
    }

    /* Notification bar */
    #flashnotify {
        grid-template-columns: 80% 20%;
    }

    #see-all-btn {
        width: 80px;
        font-size: 0.78rem;
    }

    /* About */
    .hpage-sec-0_12 {
        padding: var(--spacing-lg) var(--spacing-md);
        gap: 1.5rem;
    }

    .stats {
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card h1 {
        font-size: 1.5rem;
    }

    /* Facilities */
    #Faclities-p {
        font-size: 1.7rem;
        text-align: center;
    }

    .card-facilities {
        height: 340px;
    }

    /* Achievements */
    #achievements-sec {
        padding: var(--spacing-lg) var(--spacing-md);
        gap: 1.5rem;
    }

    #achievements-sec h4 {
        font-size: 1.6rem;
    }

    /* Enroll */
    #enroll-sec {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    #enroll-sec h4 {
        font-size: 1rem;
    }
}

/* --- Mobile portrait (≤480px) --- */
@media (max-width: 480px) {
    .popup-close {
        top: 5px;
        right: 8px;
        font-size: 16px; /* Your requested 16px size for small screens */
        width: 20px;
        height: 20px;
    }

    /* Notification bar */
    #flashnotify {
        grid-template-columns: 75% 25%;
    }

    marquee {
        font-size: 0.82rem;
    }

    #see-all-btn {
        width: 70px;
        font-size: 0.72rem;
        padding: 4px;
    }

    /* About */
    .hpage-sec-0_12 {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .L-HP-S-0_12-p1 {
        font-size: 0.9rem;
    }

    .L-HP-S-0_12-h2 {
        font-size: 1.3rem;
    }

    .L-HP-S-0_12-p2 {
        font-size: 0.88rem;
    }

    .tick {
        font-size: 0.88rem;
        line-height: 2.2;
    }

    .stats {
        gap: 0.75rem;
    }

    .stat-card h1 {
        font-size: 1.3rem;
    }

    .stat-card p {
        font-size: 0.8rem;
    }

    .stat-icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    /* Facilities */
    #Faclities-p {
        font-size: 1.4rem;
    }

    #Faclities-p+p {
        font-size: 0.9rem;
    }

    .facilities-card-group {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-facilities {
        height: 300px;
    }

    /* Achievements */
    #achievements-sec h4 {
        font-size: 1.4rem;
    }

    #achievements-sec p {
        font-size: 0.88rem;
    }

    #achieve-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .actual-stat-content h1 {
        font-size: clamp(1.1rem, 6vw, 1.5rem);
    }

    .actual-stat-content p {
        font-size: clamp(0.65rem, 2.5vw, 0.85rem);
    }

    /* Enroll */
    #enroll-sec h4 {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    #enroll-now-btn {
        width: 100%;
        padding: 12px;
    }
}

/* --- Very small phones: iPhone SE, Galaxy A series (≤360px) --- */
@media (max-width: 360px) {
    .stat-card h1 {
        font-size: 1.1rem;
    }

    .stat-card p {
        font-size: 0.72rem;
    }

    #achievements-sec h4 {
        font-size: 1.2rem;
    }

    .card-facilities {
        height: 260px;
    }

    .L-HP-S-0_12-h2 {
        font-size: 1.15rem;
    }
}