:root {
    --primary-color: #1f4d44;
    --secondary-color: #f68132;
    /* Orange Color */
    --text-dark: #333;
    --text-light: #777;
    --bg-light: #f7f9f8;
    --white: #ffffff;
    --border-light: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--primary-color);
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.8rem;
}

section {
    padding: 60px 0;
    position: relative;
}

.section-subtitle {
    display: block;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #d86f26;
}

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

.btn-secondary:hover {
    background-color: #153831;
}

/* --- FINAL CORRECTED: Header --- */
.top-bar {
    background-color: var(--bg-light);
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-info i {
    color: var(--secondary-color);
}

.top-bar-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-links a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar-social a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 15px;
}

.main-header {
    padding: 15px 0 0;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.logo-container {
    flex-shrink: 0;
}

.logo-container img {
    display: block;
    max-height: 100px;
    height: auto;
}

.school-info {
    text-align: left;
}

.main-branch-info {
    flex-grow: 1;
    text-align: left;
}

.main-branch-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 5px 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-branch-info p {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin: 0 0 5px 0;
    line-height: 1.5;
}

.thaiyur-branch-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
    min-width: 240px;
}

.thaiyur-branch-info>i {
    font-size: 1.3rem;
    color: var(--secondary-color);
    padding-top: 5px;
}

.thaiyur-branch-info strong {
    font-size: 1rem;
    color: var(--primary-color);
    display: block;
}

.thaiyur-branch-info span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.thaiyur-branch-info span i {
    font-size: 0.9em;
    color: var(--secondary-color);
    margin-right: 5px;
}


/* --- Navigation Bar --- */
.nav-bar-wrapper {
    background-color: var(--primary-color);
    margin-top: 15px;
}

.main-nav {
    position: relative;
    background-color: #1f4d44 !important;
}

/* Needed for mobile menu positioning */
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    padding: 12px 15px;
    display: block;
    font-size: 16px;
}

.main-nav a.active {
    color: var(--secondary-color);
    font-weight: 700;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* Dropdown Menu */
.main-nav li {
    position: relative;
}

.submenu {
    display: none !important;
    /* Force hide with !important */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #343a40;
    list-style: none;
    padding: 10px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 220px;
    z-index: 10;
    border-top: 3px solid var(--secondary-color);
}

.main-nav li:hover>.submenu {
    display: block !important;
    /* Force show on hover with !important */
}

.submenu li {
    width: 100%;
}

.submenu a {
    display: block;
    padding: 8px 20px;
    color: var(--white);
    white-space: nowrap;
}

.submenu a:hover {
    background-color: #495057;
}

.main-nav .has-submenu>a::after {
    content: ' \f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7em;
    margin-left: 5px;
}

/* --- RESPONSIVE HAMBURGER MENU --- */
.nav-toggle {
    display: none;
    position: fixed;
    right: 15px;
    top: 15px;
    z-index: 1001;
    /* Higher than the menu */
    background-color: var(--secondary-color);
    width: 45px;
    height: 45px;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
    outline: none;
}

.hamburger {
    display: block;
    position: relative;
    width: 20px;
    height: 2px;
    /* thinner bar */
    background: var(--white);
    border-radius: 2px;
    transition: all 0.25s ease-in-out;
    margin: 9px auto;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    /* thinner bar */
    background: var(--white);
    border-radius: 2px;
    transition: all 0.25s ease-in-out;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* Hamburger animation on open */
.nav-open .hamburger,
body.nav-open .hamburger {
    background: transparent;
}

.nav-open .hamburger::before,
body.nav-open .hamburger::before {
    top: 50%;
    transform: rotate(45deg);
    margin-top: -1px;
}

.nav-open .hamburger::after,
body.nav-open .hamburger::after {
    top: 50%;
    transform: rotate(-45deg);
    margin-top: -1px;
    bottom: auto;
}


/* (The rest of the CSS from hero onwards is unchanged) */
.hero {
    color: var(--white);
    padding: 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    height: 450px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 300%;
    height: 100%;
    display: flex;
    transition: transform 1s ease-in-out;
    z-index: 0;
}

.slide {
    width: 33.333%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    position: relative;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    z-index: 2;
    max-width: 600px;
}

.slide-content .section-subtitle {
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-size: 15px;
}

.slide-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.slider-arrow.prev {
    left: 30px;
}

.slider-arrow.next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--white);
}

.admissions-banner {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    white-space: nowrap;
    overflow: hidden;
}

.scrolling-text-container {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
}

.scrolling-text-container span {
    font-size: 1.1rem;
    font-weight: 500;
    margin-right: 50px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

#welcome-section {
    background-color: var(--bg-light);
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: left;
    gap: 50px;
}

.welcome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-text h2 {
    text-align: left;
    margin-bottom: 10px;
}

.welcome-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

#programs {
    background-color: var(--white);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.program-card {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Academic pages: disable decorative arc to avoid extra white space */
#igcse-foundations .program-card::after,
#primary-foundations .program-card::after {
    content: none;
}

.program-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.program-card h3 {
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.program-card .age-group {
    background-color: #fef4d8;
    color: #c7951a;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.program-card .read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    position: relative;
    z-index: 2;
}

#why-us {
    background-color: var(--bg-light);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 35px 30px;
    border-radius: 20px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(31, 77, 68, 0.1);
}

.feature-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--secondary-color);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

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

#gallery {
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-button-wrapper {
    text-align: center;
    margin-top: 40px;
}

#igcse-advantages {
    background-color: var(--bg-light);
}

.igcse-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.igcse-image img {
    width: 100%;
    border-radius: 20px;
}

.igcse-content p {
    color: var(--text-light);
}

#award-winners {
    background-color: var(--white);
    padding: 0;
}

.award-slider-main-wrapper {
    background-color: var(--primary-color);
    padding: 60px;
    border-radius: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.award-text-section h2 {
    color: var(--white);
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-align: left;
}

.award-text-section p {
    color: #cddbdb;
    font-size: 1rem;
    margin-bottom: 30px;
    text-align: left;
}

.award-tag {
    display: inline-block;
    background-color: var(--white);
    color: var(--secondary-color);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.award-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 10px 30px;
}

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

.award-nav {
    display: flex;
    gap: 15px;
}

.award-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    border: none;
}

.award-arrow:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.award-image-viewport {
    overflow: hidden;
    border-radius: 20px;
}

.award-image-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.award-image-container img {
    width: 50%;
    flex-shrink: 0;
    display: block;
}

#blog {
    background-color: var(--bg-light);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 25px;
}

.post-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.post-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-category {
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
}

footer {
    background-color: var(--primary-color);
    color: #cddbdb;
    padding: 80px 0 20px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.footer-social a {
    color: var(--primary-color);
    background-color: var(--white);
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cddbdb;
    text-decoration: none;
    font-size: 0.9rem;
}

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

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.contact-info i {
    color: var(--secondary-color);
    font-size: 1.1rem;
    padding-top: 4px;
}

.footer-bottom {
    border-top: 1px solid #3a635b;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #cddbdb;
    text-decoration: none;
    margin-left: 15px;
}

.footer-bottom a:hover {
    color: var(--white);
}

@media (min-width: 991px) {
    #igcse-foundations .program-image,
    #igcse-curriculum .program-image, #igcse-achievers .program-image, #ial-curriculum .program-image {
        grid-column: 2 / 3;
    }

}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .main-branch-info h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .header-top-row {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 10px 0;
    }

    .main-branch-info,
    .thaiyur-branch-info {
        text-align: center;
        width: 100%;
    }

    .main-branch-info h2 {
        font-size: 1.5rem;
    }

    .main-branch-info p {
        font-size: 0.8rem;
    }

    .thaiyur-branch-info {
        justify-content: center;
        gap: 15px;
        font-size: 0.9rem;
    }

    /* Mobile Navigation Controls */
    .nav-toggle {
        display: block;
    }

    /* Disable hover behavior on mobile */
    .main-nav li:hover>.submenu {
        display: none !important;
    }

    /* Show submenu when parent has submenu-open class */
    .has-submenu.submenu-open>.submenu {
        display: block !important;
    }

    /* Also support pages that use submenu-active */
    .has-submenu.submenu-active>.submenu {
        display: block !important;
    }

    /* Mobile menu styling */
    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        padding: 12px 0;
        color: var(--white);
    }

    /* Mobile submenu indicators */
    .has-submenu>a::after {
        content: '+';
        margin-left: 5px;
    }

    .has-submenu.submenu-open>a::after {
        content: '-';
    }

    /* Section adjustments */
    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 2rem;
    }

    .programs-grid,
    .posts-grid,
    .gallery-grid,
    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .welcome-grid,
    .igcse-grid,
    .award-slider-main-wrapper {
        grid-template-columns: 1fr;
    }

    .welcome-text h2,
    .igcse-content .section-title,
    .award-text-section h2,
    .award-text-section p {
        text-align: left;
    }

    .award-slider-main-wrapper {
        padding: 40px;
    }

    .award-actions {
        justify-content: center;
    }

    .igcse-image,
    .award-image-viewport {
        margin-bottom: 30px;
        order: -1;
    }

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

    /* Hero section adjustments */
    .hero {
        padding: 80px 0;
    }

    .hero-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-bar-info {
        justify-content: center;
        flex-wrap: wrap;
    }

    .top-bar-right {
        flex-direction: column;
        gap: 10px;
    }

    .top-bar-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .top-bar-links a {
        font-size: 0.8rem;
        margin: 5px;
    }

    /* Hero section */
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .slider-arrow {
        display: none;
    }

    /* Grid adjustments */
    .programs-grid,
    .posts-grid,
    .gallery-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Award section */
    .award-slider-main-wrapper {
        padding: 30px 20px;
    }

    .award-slider-main-wrapper h2 {
        font-size: 2rem;
    }

    /* Footer adjustments */
    footer {
        padding: 60px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .footer-social {
        justify-content: center;
        margin-bottom: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-bottom a {
        margin: 0 8px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0;
    }

    /* Header adjustments */
    .logo-container img {
        max-height: 80px;
    }

    .main-branch-info h2 {
        font-size: 1.3rem;
    }

    /* Hero section */
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    /* Feature cards */
    .feature-card {
        padding: 25px 20px;
    }

    .feature-card .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    /* Gallery */
    .gallery-item img {
        height: 200px;
    }

    /* Blog posts */
    .post-content {
        padding: 20px 15px;
    }

    .post-content h3 {
        font-size: 1.1rem;
    }
}

/* Responsive Styles - Mobile Menu Improvements */
@media (max-width: 992px) {

    /* Mobile Menu - Off-canvas style */
    .main-nav {
        position: fixed;
        top: 0;
        right: -260px;
        /* was -300px */
        width: 250px;
        /* was 280px */
        height: 100vh;
        background-color: var(--primary-color);
        z-index: 1000;
        padding: 50px 16px 16px;
        /* was 60px 20px 20px */
        overflow-y: auto;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    body.nav-open .main-nav,
    .main-nav.nav-open {
        right: 0;
    }

    .main-nav ul {
        display: block !important;
        /* Always display the menu list */
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav ul li a {
        padding: 12px 0;
        color: #fff;
        display: block;
        font-size: 16px;
    }

    .nav-toggle {
        display: block;
        position: fixed;
        right: 15px;
        top: 15px;
        z-index: 1001;
        background-color: var(--secondary-color);
        width: 30px;
        /* reduced from 36px */
        height: 30px;
        /* reduced from 36px */
        border-radius: 4px;
        padding: 6px;
        /* reduced from 8px */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        border: none;
        outline: none;
    }

    body.nav-open {
        overflow: hidden;
    }

    /* Mobile menu overlay */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Submenu styling for mobile */
    .has-submenu .submenu {
        position: static;
        width: 100%;
    }
}

/* Additional responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .top-bar {
        display: none;
        /* Hide top bar on mobile */
    }

    .main-header {
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-bottom: 10px;
    }

    .school-info,
    .branch-info {
        text-align: left;
        margin-top: 5px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .welcome-grid,
    .programs-grid,
    .features-grid,
    .gallery-grid,
    .igcse-grid,
    .posts-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .welcome-image {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .program-card,
    .feature-card,
    .post-card {
        margin-bottom: 20px;
    }

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

    .footer-bottom p {
        margin-bottom: 10px;
    }
}

/* Management Page Styles */
.management-banner {
    /* background-image: linear-gradient(rgba(31, 77, 68, 0.8), rgba(31, 77, 68, 0.8)), url('../img/header2.jpg'); */
        background-image: linear-gradient(rgba(31, 77, 68, 0.26), rgba(31, 77, 68, 0.26)), url('../img/slide1.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    color: var(--white);
}

.management-banner h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    display: inline-block;
}

.management-banner h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.management-banner p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.6;
}

/* Director's Message Section */
.message-section {
    padding: 80px 0;
    background-color: var(--white);
}

.message-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
}

.message-content h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.message-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.message-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 16px;
}

.signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 28px;
    color: var(--primary-color);
    margin-top: 30px;
}

.message-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Vision & Mission Section */
.vision-mission {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.vision-card,
.mission-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vision-card:hover,
.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.vision-card h3,
.mission-card h3 {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.vision-card h3 i,
.mission-card h3 i {
    color: var(--secondary-color);
    font-size: 28px;
}

.vision-card p,
.mission-card p {
    line-height: 1.8;
    color: var(--text-dark);
}

/* Management Team Section */
.management-team {
    padding: 80px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.team-member-image {
    height: 250px;
    overflow: hidden;
}

.team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .team-member-image img {
    transform: scale(1.05);
}

.team-member-info {
    padding: 25px;
}

.team-member-info h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 5px;
}

.team-member-info .designation {
    display: block;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 16px;
}

.team-member-info p {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 15px;
}

/* Responsive Styles for Management Page */
@media (max-width: 992px) {
    .message-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .message-image {
        order: -1;
    }

    .vision-mission-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .management-banner {
        padding: 60px 0;
    }

    .management-banner h1 {
        font-size: 32px;
    }

    .management-banner p {
        font-size: 16px;
    }

    .message-section,
    .vision-mission,
    .management-team {
        padding: 50px 0;
    }

    .message-content h2 {
        font-size: 28px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .team-member-image {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .management-banner {
        padding: 40px 0;
    }

    .management-banner h1 {
        font-size: 28px;
    }

    .management-banner p {
        font-size: 14px;
    }

    .message-content h2 {
        font-size: 24px;
    }

    .signature {
        font-size: 24px;
    }

    .team-member-info {
        padding: 20px;
    }

    .team-member-info h3 {
        font-size: 20px;
    }
}

/* Page Banner Styles */
.page-banner {
    background-image: url('../img/header3.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 100px 0;
    text-align: center;
    color: #fff;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 77, 68, 0.26);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.page-banner h1 {
    font-size: 42px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    color: #fff;
}

.page-banner h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.page-banner p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
}

/* Responsive Styles for Rules Page */
@media (max-width: 992px) {
    .page-banner {
        padding: 60px 0;
    }

    .page-banner h1 {
        font-size: 32px;
    }

    .page-banner p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .page-banner {
        padding: 40px 0;
    }

    .page-banner h1 {
        font-size: 28px;
    }

    .page-banner p {
        font-size: 14px;
    }

    .admission-rules h2 {
        font-size: 20px;
    }

    .admission-rules h3 {
        font-size: 16px;
    }
}

.content-wrapper {
    margin: 0 auto;
}

.content-wrapper p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.content-wrapper strong {
    color: var(--primary-color);
}

.rules-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.rules-list li {
    margin-bottom: 15px;
    line-height: 1.6;
}

.rules-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.rules-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.note-box {
    background-color: #fff8e1;
    border-left: 4px solid var(--secondary-color);
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 4px;
}

.note-box p {
    margin: 0;
    font-style: italic;
}

.note-box strong {
    color: var(--secondary-color);
}

/* Animation for rules cards */
.rules-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rules-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Gallery Section Styles */
.gallery-section {
    padding: 60px 0;
    background-color: var(--white);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.section-intro h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-intro h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

.section-intro p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 25px;
    background-color: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* Gallery Year Section */
.gallery-year-section {
    margin-bottom: 60px;
}

.year-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.year-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Gallery Category */
.gallery-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--secondary-color);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-link {
    display: block;
    text-decoration: none;
    color: var(--white);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-caption h5 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--white);
}

.gallery-caption p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Gallery Hub Styles */
.gallery-hub-section {
    padding: 60px 0;
    background-color: var(--white);
}

.gallery-years-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.year-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.year-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.year-card a {
    text-decoration: none;
    color: var(--text-dark);
}

.year-card-inner {
    display: flex;
    flex-direction: column;
}

.year-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.year-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.year-card:hover .year-thumbnail img {
    transform: scale(1.1);
}

.year-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 77, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.year-overlay i {
    font-size: 40px;
    color: var(--white);
}

.year-card:hover .year-overlay {
    opacity: 1;
}

.year-info {
    padding: 20px;
    background-color: var(--white);
}

.year-info h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.year-info p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.view-gallery {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.view-gallery i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.year-card:hover .view-gallery {
    color: var(--primary-color);
}

.year-card:hover .view-gallery i {
    transform: translateX(5px);
}

/* Responsive Styles for Gallery */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-years-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-years-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-banner h1 {
        font-size: 36px;
    }

    .page-banner p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .gallery-tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 8px 20px;
        font-size: 14px;
    }

    .year-title {
        font-size: 24px;
    }

    .category-title {
        font-size: 20px;
    }

    .gallery-caption h5 {
        font-size: 16px;
    }

    .gallery-caption p {
        font-size: 12px;
    }
}

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

    .gallery-years-grid {
        grid-template-columns: 1fr;
    }

    .page-banner {
        padding: 60px 0;
    }

    .page-banner h1 {
        font-size: 28px;
    }

    .page-banner p {
        font-size: 14px;
    }

    .section-intro h2 {
        font-size: 26px;
    }

    .section-intro p {
        font-size: 14px;
    }
}

/* Academic Page Styles */
.academic-banner {
    /* background-image: linear-gradient(rgba(31, 77, 68, 0.65), rgba(31, 77, 68, 0.65)), url('../img/header3.jpg'); */
    background-image: linear-gradient(rgba(31, 77, 68, 0.26), rgba(31, 77, 68, 0.26)), url('../img/academics.jpg');
    background-size: cover;
    background-position: center 35%;
    padding: 100px 0 110px;
    min-height: 320px;
    display: grid;
    place-content: center;
    text-align: center;
    color: var(--white);
}

.academic-banner h1 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.academic-banner h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.academic-banner p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.65;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Academic Intro Section */
#academic-intro {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.section-subtitle {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #666;
    max-width: 900px;
    margin: 0 auto;
}

#igcse-foundations,
#primary-foundations {
    padding: 60px 0;
}

#igcse-foundations {
    background: white;
}

#primary-foundations {
    background: #f8f9fa;
}

.academic-program-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: start;
}

.academic-program-grid.reverse {
    grid-template-columns: 0.95fr 1.05fr;
}

/* IGCSE: heading as its own row; paragraph + image on next row; image wider; tighter row gap */
#igcse-foundations .academic-program-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px 36px;
}

#igcse-foundations .program-content {
    display: contents;
}

#igcse-foundations .program-title {
    grid-column: 1 / -1;
}

#igcse-foundations .program-description {
    grid-column: 1 / 2;
}



/* IGCSE Curriculum (Grades 9 & 10): match Foundations layout exactly */
#igcse-curriculum .academic-program-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px 36px;
}

#igcse-curriculum .program-content {
    display: contents;
}

#igcse-curriculum .program-title {
    grid-column: 1 / -1;
}

#igcse-curriculum .program-description {
    grid-column: 1 / 2;
}

#igcse-curriculum .program-image {
    grid-column: 2 / 3;
}

/* Primary: mirror layout but reversed columns (image left, text right) */
#primary-foundations .program-content {
    /* display: contents; */
}

#primary-foundations .program-title {
    grid-column: 1 / -1;
}

#primary-foundations .academic-program-grid,
#primary-foundations .academic-program-grid.reverse {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px 36px;
}

#primary-foundations .academic-program-grid:not(.reverse)>.program-image {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    margin-top: 0;
    align-self: stretch;
}

#primary-foundations .program-description {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

#primary-foundations .curriculum-highlights {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
}

#primary-foundations .achievement-section {
    grid-column: 1 / -1;
    grid-row: 4 / 5;
    margin-top: 12px;
}

/* Make feature list start on a new full-width row */
.program-features {
    grid-column: 1 / -1;
    margin-top: 20px;
}

/* Highlighted Celebrating Excellence section */
#celebrating-excellence {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe9c9 100%);
}

#celebrating-excellence .excellence-spotlight {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(16, 34, 55, 0.08);
    padding: 26px 28px;
}

#celebrating-excellence .spotlight-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #ffb74d;
    color: #6a3d00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 16px rgba(255, 183, 77, 0.45);
}

#celebrating-excellence h2 {
    margin: 0 0 6px;
    color: #b35a00;
    font-size: 1.8rem;
    font-weight: 700;
}

#celebrating-excellence p {
    margin: 0;
    color: #5a5a5a;
    line-height: 1.7;
}

.responsiveGrid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.responsiveGrid .program-image {
    flex: 0 0 50%;
    max-width: 50%;
}

.responsiveGrid > div {
    flex: 1 1 300px;
    min-width: 0;
}

@media (max-width: 900px) {
    .responsiveGrid {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .responsiveGrid .program-image {
        max-width: 100%;
        margin: 0 auto;
    }
    
    #celebrating-excellence .excellence-spotlight {
        grid-template-columns: 1fr;
    }
}

/* When the spotlight card is used inside Primary's grey section */
#primary-foundations .achievement-section .excellence-spotlight {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(16, 34, 55, 0.08);
    padding: 18px 22px;
    margin-top: 16px;
}

#primary-foundations .achievement-section .spotlight-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #ffb74d;
    color: #6a3d00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 16px rgba(255, 183, 77, 0.45);
}

#primary-foundations .achievement-section .excellence-spotlight h4 {
    margin: 0 0 6px;
    color: #b35a00;
    font-size: 1.4rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    #primary-foundations .achievement-section .excellence-spotlight {
        grid-template-columns: 1fr;
    }
}

/* Results reflect list styling */
#primary-foundations .achievement-section .results-reflect {
    margin: 8px 0 16px;
}

#primary-foundations .achievement-section .results-reflect h5 {
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 600;
}

#primary-foundations .achievement-section .results-reflect .result-points {
    list-style: none !important;
    margin: 0;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

#primary-foundations .achievement-section .results-reflect .result-points li {
    list-style: none !important;
    margin: 0;
    padding-left: 0;
    color: #374151;
}

@media (min-width: 768px) {
    #primary-foundations .achievement-section .results-reflect .result-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.program-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 18px;
    font-weight: 700;
    white-space: nowrap;
    /* keep in a single line on desktop */
}

@media (max-width: 992px) {
    .program-title {
        white-space: normal;
    }
}

.program-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 24px;
}

.program-features h4,
.curriculum-highlights h4,
.achievement-section h4,
.results-highlight h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 20px;
}

@media (max-width: 1200px) {
    .feature-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .feature-list,
    #igcse-curriculum .academic-program-grid,
    #igcse-achievers .academic-program-grid,
    #ial-curriculum .academic-program-grid {
        grid-template-columns: 1fr !important;
    }
}

.feature-item {
    display: flex;
    gap: 14px;
    text-align: left;
    align-items: flex-start;
    background: #f9fbfd;
    border: 1px solid #eaf0f6;
    border-radius: 10px;
    padding: 14px 14px 14px 12px;
}

.feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #e8f5f2;
    color: #0e826a;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.feature-text h5 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-text p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.curriculum-list {
    list-style: none;
    padding: 0;
}

.curriculum-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: #666;
    line-height: 1.6;
}

.curriculum-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 12px;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.exam-subjects {
    margin: 30px 0;
}

.exam-subjects h5 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.subject-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subject-tag {
    background: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.program-image {
    width: 100%;
}

.program-image img {
    width: 100%;
    height: 386px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(16, 34, 55, 0.10);
    display: block;
    margin: 0;
    /* remove default gaps */
    border: 0;
    /* ensure no extra border adds space */
}

/* Slightly lower the right-side image and reduce the white space below it */
.academic-program-grid:not(.reverse) .program-image {
    margin-top: 16px;
}

@media (min-width: 1200px) {

    /* Slightly larger image at desktop */
    #igcse-foundations .program-image img {
        height: 400px;
    }
}

/* Primary image should stretch to match right-side content height on desktop */
@media (min-width: 993px) {
    #primary-foundations .program-image {
        align-self: stretch;
    }

    #primary-foundations .program-image img {
        height: 100%;
        min-height: 320px;
    }
}

@media (max-width: 992px) {
    .program-image img {
        height: 260px;
    }
}

@media (max-width: 576px) {
    .program-image img {
        height: 220px;
    }
}

#academic-excellence {
    padding: 80px 0;
    background: linear-gradient(135deg, #1f4d44 0%, #25695e 100%);
    color: white;
}

#academic-excellence .section-title {
    color: white;
    text-align: center;
    margin-bottom: 60px;
}

.excellence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.excellence-card {
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, background 0.3s ease;
}

.excellence-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
}

.excellence-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.excellence-card p {
    line-height: 1.6;
    opacity: 0.9;
}

/* Academic section specific card styling */
#igcse-foundations .program-card,
#primary-foundations .program-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 28px 28px 24px;
    margin: 16px 0 32px;
    text-align: left;
    /* override global center alignment */
    overflow: visible;
    /* avoid clipping of shadows */
}

#igcse-foundations .program-card::after,
#primary-foundations .program-card::after {
    display: none;
    /* remove decorative white arc from homepage cards */
}

/* Academic Levels Container */
.academic-levels-container {
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.academic-level-block {
    display: flex;
    gap: 28px;
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-wrap: wrap;
    /* allow full-width intro above columns */
    align-items: flex-start;
}

.academic-level-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.academic-level-block:nth-child(even) {
    flex-direction: row-reverse;
}

.academic-image {
    flex: 0 0 40%;
    width: 100%;
    height: 320px;
    /* Consistent image height across sections */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.academic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.academic-level-block:hover .academic-image img {
    transform: scale(1.05);
}

.academic-content {
    flex: 1;
}

.academic-content h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.academic-intro p {
    margin: 6px 0 12px;
    line-height: 1.75;
}

.academic-content p {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--text-dark);
}

.academic-content h4 {
    color: var(--secondary-color);
    font-size: 18px;
    margin-top: 10px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Full-width intro inside academic-level-block */
.academic-intro {
    flex: 0 0 100%;
    margin-bottom: 16px;
}

/* Two-column row inside each academic block */
.academic-row {
    display: grid;
    grid-template-columns: 0.35fr 0.65fr;
    gap: 32px;
    width: 100%;
    align-items: start;
}

/* Stack on tablets/phones */
@media (max-width: 992px) {
    .academic-row {
        grid-template-columns: 1fr;
    }
}

/* Feature points without bullets */
.feature-points {
    display: grid;
    gap: 10px;
}

.feature-points .point {
    position: relative;
    padding-left: 18px;
    margin: 0;
    line-height: 1.7;
    color: var(--text-dark);
}

.feature-points .point::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary-color);
    opacity: 0.8;
}

/* Remove icon bullets for cleaner look */
.icon-bullet {
    display: none;
}

.curriculum-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.curriculum-list li {
    margin: 0;
    padding: 12px 0 12px 30px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Academic Highlight Section */
.academic-highlight-section {
    padding: 40px 0;
}

.highlight-box {
    background-color: var(--bg-light);
    border-left: 6px solid var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.highlight-box h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.highlight-box p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: var(--text-dark);
}

.highlight-box ul {
    list-style-type: disc;
    padding-left: 20px;
}

.highlight-box ul li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Specific styles for IGCSE Curriculum Block */
.igcse-curriculum-block .academic-image {
    flex: 0 0 40%;
    max-width: 450px;
}

.igcse-curriculum-block .academic-content {
    flex: 1;
}

/* IGCSE Curriculum Section Styles */
.full-width-heading {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.curriculum-flex-container {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.curriculum-content {
    flex: 1;
}

.curriculum-content p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: var(--text-dark);
}

.curriculum-image {
    flex: 0 0 40%;
    max-width: 450px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.curriculum-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.full-width-curriculum {
    width: 100%;
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Responsive styles */
@media (max-width: 768px) {
    .full-width-heading {
        font-size: 22px;
        white-space: normal;
    }

    .curriculum-flex-container {
        flex-direction: column;
        gap: 20px;
    }

    .curriculum-image {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Year Gallery Page Styles */
.year-gallery-section {
    padding: 60px 0;
    background-color: var(--white);
}

.back-to-galleries {
    margin-top: 20px;
}

.back-to-galleries a {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-galleries a i {
    margin-right: 8px;
}

.back-to-galleries a:hover {
    color: var(--secondary-color);
}

/* Lightbox customization */
.lb-data .lb-caption {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.lb-data .lb-details {
    width: 90%;
    text-align: center;
}

.lb-data .lb-number {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* News Hub Styles */
.news-hub-section {
    padding: 60px 0;
    background-color: var(--white);
}

.news-years-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-card a {
    text-decoration: none;
    color: var(--text-dark);
}

.news-card-inner {
    display: flex;
    flex-direction: column;
}

.news-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumbnail img {
    transform: scale(1.1);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover .news-overlay {
    opacity: 1;
}

.news-overlay i {
    color: var(--white);
    font-size: 40px;
}

.news-info {
    padding: 20px;
    background-color: var(--white);
}

.news-info h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.news-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

.view-news {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.view-news i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.news-card:hover .view-news {
    color: var(--primary-color);
}

.news-card:hover .view-news i {
    transform: translateX(5px);
}

/* Year News Section Styles */
.year-news-section {
    padding: 60px 0;
}

.news-item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-light);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.news-content {
    margin-bottom: 20px;
}

.news-content p {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-image {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-image img {
    width: 100%;
    height: auto;
    display: block;
}

.back-to-news {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-news i {
    margin-right: 10px;
}

.back-to-news:hover {
    color: var(--primary-color);
}

/* Responsive Styles for News */
@media (max-width: 1200px) {
    .news-years-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .news-years-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-years-grid {
        grid-template-columns: 1fr;
    }

    .news-title {
        font-size: 20px;
    }
}