/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile optimization for smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Header Styles */
.main-header {
    background: rgb(52, 119, 246);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    min-height: 80px;
}

.main-header .container {
    display: grid;
    grid-template-columns: 120px 1fr 117px;
    align-items: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .main-header .container {
        grid-template-columns: 120px 1fr auto;
        gap: 16px;
    }
}

.logo-space-left {
    width: 115px;
    height: 115px;
    background: rgba(255,255,255,0.1);
    border: 1.5px dashed rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
}

.logo-space-left img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Clickable logo link with hover/active animation */
.logo-space-left .logo-link {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.logo-space-left .logo-link:hover {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: inset 0 0 0 0 rgba(0,0,0,0), 0 8px 20px rgba(0,0,0,0.15);
}

.logo-space-left .logo-link:active {
    transform: scale(0.94);
}

.logo-space-left .logo-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 50%;
}



.logo-space-right {
    width: 112px;
    height: 112px;
    background: rgba(255,255,255,0.1);
    border: 1.5px dashed rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
}

.logo-space-right img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Match left logo interactive styles for right logo link */
.logo-space-right .logo-link {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.logo-space-right .logo-link:hover {
    transform: scale(1.06) rotate(3deg);
    box-shadow: inset 0 0 0 0 rgba(0,0,0,0), 0 8px 20px rgba(0,0,0,0.15);
}
.logo-space-right .logo-link:active {
    transform: scale(0.94);
}
.logo-space-right .logo-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 50%;
}

.main-nav {
     position: relative;
     justify-self: center;
 }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    justify-content: center;
    align-items: center; /* ensure all nav items align on the same baseline */
}

.main-nav a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 20px;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 80%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 1003;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
}

/* Hero Section */
.hero {
    height: 960px;
    width: 1379px;
    max-width: calc(100% - 60px);
    background: url('imag 1.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    margin: 100px auto 0;
    padding: 0;
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
}

/* Home Hero Section */
.home-hero-section {
    margin: 110px 50px 20px 50px;
    padding: 0;
    background: transparent;
}

.home-hero-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    max-width: 100%;
    object-fit: contain;
    background: transparent;
}

/* Mobile Hero Optimizations */
@media (max-width: 768px) {
    .hero {
        height: 70vh;
        max-width: calc(100% - 20px);
        margin: 80px auto 0;
        border-radius: 15px;
    }
    
    .home-hero-section {
        margin: 90px 16px 20px 16px;
    }
    
    .home-hero-image {
        border-radius: 15px;
    }
}

/* Mobile-only dropdown submenus inside hamburger */
@media (max-width: 900px) {
    /* Hide desktop mega dropdowns on mobile; use mobile submenus instead */
    .nav-dropdown-content { display: none !important; }
    /* Submenu visibility via [hidden] */
    .mobile-submenu[hidden] { display: none !important; }
    .mobile-submenu {
        display: block;
        list-style: none;
        margin: 8px 0 0 0;
        padding: 4px 0 8px 12px;
        border-left: 2px solid rgba(255,255,255,0.25);
    }
    .mobile-submenu li { margin: 6px 0; }
    .mobile-submenu li a {
        display: block;
        padding: 12px 16px;
        color: #fff;
        background: rgba(255,255,255,0.10);
        border: 1px solid rgba(255,255,255,0.20);
        border-radius: 12px;
        text-decoration: none;
        transition: transform .2s ease, background .2s ease;
    }
    .mobile-submenu li a:hover { background: rgba(255,255,255,0.20); transform: translateX(6px); }
}

@media (max-width: 480px) {
    .hero {
        height: 60vh;
        max-width: calc(100% - 16px);
        margin: 70px auto 0;
        border-radius: 12px;
    }
    
    .home-hero-section {
        margin: 80px 12px 16px 12px;
    }
    
    .home-hero-image {
        border-radius: 12px;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #3477f6;
    width: 100%;
    max-width: calc(100% - 60px);
}

.hero h1 {
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 6rem;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero h1 .subtitle-line {
    font-size: 2.8rem;
    font-weight: 600;
    opacity: 0.9;
    display: block;
    margin-top: 10px;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
    margin-top: 20px;
}

/* Intro Section */
.intro-section {
    padding: 20px 0 80px;
    background: white;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 500px;
    max-width: calc(100% - 60px);
    margin: 0 auto;
}

.intro-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    position: relative;
}

.intro-card.text-card {
    background: white;
    padding-right: 0;
    padding-left: 0;
    max-width: 100%;
}

.intro-card.image-card {
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 689px;
    height: 408px;
}

.intro-section:nth-of-type(3) .intro-card.image-card {
    width: 630px;
    height: 360px;
}

.intro-card.image-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
}

.intro-card.image-card .overlay-text {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 4rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.intro-card h2 {
    color: #3477f6;
    margin-bottom: 38px;
    font-size: 2.5rem;
    line-height: 1.2;
    white-space: nowrap;
}

.intro-section:nth-of-type(3) .intro-card h2 {
    color: #3b87f1;
    white-space: nowrap;
}

.intro-card p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
    font-size: 1.1rem;
    max-width: 100%;
}

/* Second Intro Section - EPIC */
.intro-section:nth-of-type(3) {
    padding-top: 10px;
    margin-top: 0 !important;
}

.intro-section:nth-of-type(3) .intro-grid {
    grid-template-columns: 1fr 1fr;
}

.intro-section:nth-of-type(3) .intro-card.text-card {
    order: 2;
}

.intro-section:nth-of-type(3) .intro-card.image-card {
    order: 1;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border: 2px solid #3477f6;
    position: relative;
    overflow: hidden;
    /* Mobile touch target optimization */
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.btn-primary {
    background: transparent;
    color: #3477f6;
    border: 2px solid #3477f6;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(52, 119, 246, 0.3);
}

.btn-primary:hover::before {
    left: 0;
}

.btn-text {
    color: #3477f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.btn-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3477f6;
    transition: width 0.3s ease;
}

.btn-text:hover {
    color: #5a9cff;
}

.btn-text:hover::after {
    width: 100%;
}

/* Programs Section */
.programs-section {
    padding: 20px 0 30px 0; /* Reduced top padding by 60px (from 80px to 20px) */
    background: #f8fafc;
}

.section-title {
    text-align: center;
    color: #3477f6;
    margin-bottom: 60px;
    font-size: 2.5rem;
    text-shadow: none;
    position: relative;
    z-index: 2;
}

/* Override for partners section title to be white */
.partners-section .section-title {
    color: white;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.program-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.program-image {
    height: 200px;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.program-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--image-url);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.program-content {
    padding: 25px;
}

.program-card h3 {
    color: #3477f6;
    margin-bottom: 15px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.program-card:hover h3 {
    color: #5a9cff;
}

.program-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
}

.modal-body {
    padding: 40px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

/* Stats Section */
.stats-section {
    padding: 80px 0;
    background: white;
    color: #333;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(52, 119, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(90, 156, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(52, 119, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(90, 156, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.stats-section:hover::before {
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(52, 119, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(90, 156, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(52, 119, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(90, 156, 255, 0.08) 0%, transparent 50%);
    transform: scale(1.1);
}

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

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(52, 119, 246, 0.6);
    border-radius: 50%;
    transition: all 0.3s ease;
    animation: particleFloat 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    background: rgba(90, 156, 255, 0.7);
    animation-duration: 8s;
    animation-delay: 1s;
}

.particle:nth-child(3n) {
    background: rgba(52, 119, 246, 0.5);
    animation-duration: 10s;
    animation-delay: 2s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) translateX(-5px);
        opacity: 0.7;
    }
    75% {
        transform: translateY(-20px) translateX(-15px);
        opacity: 0.9;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.6s ease-out;
}

.stat-item.ready-to-animate {
    opacity: 0;
    transform: translateY(50px);
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:nth-child(1).visible {
    transition-delay: 0.1s;
}

.stat-item:nth-child(2).visible {
    transition-delay: 0.2s;
}

.stat-item:nth-child(3).visible {
    transition-delay: 0.3s;
}

.stat-item:nth-child(4).visible {
    transition-delay: 0.4s;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-number.counting {
    animation: countUp 1.5s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Partners Section */
.partners-section {
    padding: 96px 0;
    background: linear-gradient(180deg, #0b2a6f 0%, #3477f6 100%);
    position: relative;
    overflow: hidden;
}

.partners-section .section-title {
    color: #ffffff;
}

.partners-section::before,
.partners-section::after {
    content: none;
}

.partners-marquee {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 3;
}

.partners-row {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 30px 60px rgba(15, 35, 95, 0.08);
    padding: 22px 0;
}

.partners-row::before,
.partners-row::after {
    content: '';
    position: absolute;
    top: 0;
    width: 140px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.partners-row::before {
    left: 0;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.partners-row::after {
    right: 0;
    background: linear-gradient(270deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 56px;
    animation: partners-scroll 28s linear infinite;
    will-change: transform;
}

.partners-row.reverse .partners-track {
    animation-direction: reverse;
}

.partners-row:hover .partners-track {
    animation-play-state: paused;
}

.partner-logo {
    flex: 0 0 auto;
    min-width: 150px;
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 244, 248, 0.9));
    box-shadow: inset 0 0 0 1px rgba(15, 35, 95, 0.05), 0 12px 25px rgba(13, 35, 95, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
    filter: none;
    opacity: 1;
}

.partner-logo img {
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partner-logo:hover {
    transform: scale(1.06);
    filter: none;
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(52, 119, 246, 0.2), 0 16px 32px rgba(15, 35, 95, 0.18);
}

@keyframes partners-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 992px) {
    .partners-row {
        border-radius: 40px;
        padding: 18px 0;
    }

    .partners-track {
        gap: 40px;
        animation-duration: 24s;
    }

    .partner-logo {
        min-width: 140px;
        height: 64px;
        padding: 0 18px;
    }

    .partner-logo img {
        max-height: 44px;
    }
}

@media (max-width: 600px) {
    .partners-section {
        padding: 64px 0;
    }

    .partners-marquee {
        gap: 18px;
    }

    .partners-row {
        border-radius: 28px;
        padding: 14px 0;
    }

    .partners-row::before,
    .partners-row::after {
        width: 80px;
    }

    .partners-track {
        gap: 28px;
        animation-duration: 20s;
    }

    .partner-logo {
        min-width: 120px;
        height: 56px;
        padding: 0 14px;
    }

    .partner-logo img {
        max-height: 38px;
    }
}

/* Footer */
.main-footer {
    background: white;
    color: #333;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
    align-items: start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-logos {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.footer-logo-item span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-end;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.links-row {
    display: flex;
    gap: 30px;
}

.links-row a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
}

.links-row a:hover {
    color: #3477f6;
    background: rgba(52, 119, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 119, 246, 0.2);
}

.footer-socials {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.footer-socials .social-icons {
    display: flex;
    gap: 15px;
    margin-top: 0;
}

.footer-socials .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(52, 119, 246, 0.1);
    border-radius: 50%;
    color: #3477f6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-socials .social-icons a:hover {
    background: rgba(52, 119, 246, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(52, 119, 246, 0.1);
    padding-top: 20px;
    text-align: center;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.legal-links a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    padding: 5px 10px;
    border-radius: 15px;
}

.legal-links a:hover {
    color: #3477f6;
    background: rgba(52, 119, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 119, 246, 0.2);
}

.footer-bottom p {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Hero Image */
@media (max-width: 1200px) {
    .hero-image img {
        max-height: 500px;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Ensure proper viewport scaling */
    html {
        font-size: 14px;
    }
    
    .mobile-nav-toggle {
        display: block;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: all 0.3s ease;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-nav-toggle:hover {
        background-color: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-50%) scale(1.05);
    }
    
    .main-header .container {
        grid-template-columns: 60px 1fr 60px;
        gap: 12px;
        position: relative;
        padding: 8px 16px;
        align-items: center;
    }
    
    .logo-space-left,
    .logo-space-right {
        width: 60px;
        height: 60px;
        display: flex;
        flex-shrink: 0;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(52, 119, 246, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        display: none;
        padding: 80px 20px 20px;
        z-index: 1001;
        min-height: 100vh;
    }
    
    .main-nav.active {
        display: block !important;
        animation: slideInFromTop 0.3s ease-out;
        z-index: 1001;
    }
    
    /* Add backdrop overlay for mobile nav - positioned behind nav items */
    .main-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    
    .main-nav.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Touch-friendly improvements */
    .btn {
        min-height: 48px;
        padding: 14px 28px;
        font-size: 16px;
        border-radius: 12px;
        letter-spacing: 0.5px;
    }
    
    .main-nav a {
        padding: 16px 20px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        border-radius: 12px;
        margin: 4px 0;
        font-size: 16px;
        font-weight: 600;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        position: relative;
        z-index: 1002;
        cursor: pointer;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(8px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        position: relative;
        z-index: 1002;
        margin-top: 20px;
    }
    
    /* Mobile navigation header with back button */
    .mobile-nav-header {
        position: relative;
        z-index: 1002;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-nav-header .mobile-back-btn {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        padding: 12px 20px;
        border-radius: 25px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        text-align: center;
    }
    
    .mobile-nav-header .mobile-back-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }
    
    .main-nav li {
        width: 100%;
        position: relative;
        z-index: 1002;
    }
    
    /* Ensure dropdown toggles are clickable */
    .nav-dropdown-toggle {
        position: relative;
        z-index: 1003;
        cursor: pointer;
        user-select: none;
    }
    
    /* Visual feedback for dropdown state */
    .nav-dropdown.active .nav-dropdown-toggle {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: translateX(8px);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero h1 {
        font-size: 3.2rem;
        line-height: 1.1;
        margin-bottom: 16px;
        padding: 0 20px;
    }
    
    .hero h1 .subtitle-line {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-top: 12px;
    }
    
    .hero-content {
        padding: 20px;
        max-width: 90%;
    }
    
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-top: 16px;
        padding: 0 10px;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .intro-card {
        padding: 40px 30px;
    }
    
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Programs Page Mobile Styles */
    .program-hero h1 {
        font-size: 2.5rem;
    }
    
    .program-description {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .hero-image {
        margin-top: 20px;
    }
    
    .hero-image img {
        max-height: 400px;
    }
    
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 10px;
    }
    
        .impact-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        min-height: auto;
        padding: 20px 0;
    }
    
    /* Mobile particle grid adjustments */
    .impact-section {
        overflow: hidden;
    }
    
    .stats-particles {
        opacity: 0.6;
    }

    .impact-center {
        width: auto;
        min-width: auto;
        order: 1;
    }

    .impact-left,
    .impact-right {
        position: static;
        transform: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .impact-left {
        order: 2;
    }

    .impact-right {
        order: 3;
    }


    
    .impact-left,
    .impact-right {
        order: 2;
    }
    
    .impact-center {
        order: 1;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    /* Optimize for very small screens */
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 12px;
        padding: 0 16px;
    }
    
    .hero h1 .subtitle-line {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-top: 8px;
    }
    
    .hero-content {
        padding: 16px;
        max-width: 95%;
    }
    
    .subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-top: 12px;
        padding: 0 8px;
    }
    
    .hero-image img {
        max-height: 300px;
    }
    
    .hero {
        height: 50vh;
    }
    
    .intro-card {
        padding: 30px 20px;
    }
    
    .program-content {
        padding: 20px;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 8px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    /* Programs Page Small Mobile Styles */
    .program-hero h1 {
        font-size: 2rem;
        padding: 0 10px;
    }
    
    .program-description {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 8px;
    }
    
    .highlight-card {
        padding: 20px 15px;
    }
    
    .highlight-card h3 {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .highlight-image {
        display: none;
    }
    
    .impact-number {
        font-size: 3rem;
    }
    
    .impact-image {
        width: 120px;
        height: 120px;
    }
    
    .project-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .project-card-image {
        flex: 0 0 120px;
        width: 100%;
    }
    
    .project-card-image img {
        width: 60px;
        height: 60px;
    }
    
    .project-card-content {
        padding: 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }

    .impact-content {
        min-height: auto;
        padding: 20px 0;
    }

    .impact-left,
    .impact-right {
        width: 100%;
        max-width: 350px;
        padding: 15px;
    }

    .impact-text {
        padding: 15px;
    }

    .impact-text p {
        font-size: 0.9rem;
    }
    
    .impact-connection-line {
        display: none;
    }
    
    /* Mobile particle grid optimization */
    .stats-particles {
        opacity: 0.7;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
    
    /* Reduce particle count on mobile for better performance */
    .particle:nth-child(n+25) {
        display: none;
    }
    
    /* Touch-friendly particle interactions */
    .impact-section {
        touch-action: pan-x pan-y;
    }
    
    /* Optimize particle animations for mobile */
    .particle {
        will-change: transform;
        transform: translateZ(0);
    }
}

/* Very small screen optimizations */
@media (max-width: 480px) {
    /* Further reduce particles for very small screens */
    .particle:nth-child(n+15) {
        display: none;
    }
    
    .stats-particles {
        opacity: 0.5;
    }
    
    .particle {
        width: 2px;
        height: 2px;
    }
    
    /* Disable particle interactions on very small screens for better performance */
    .impact-section {
        pointer-events: none;
    }
    
    .stats-particles {
        pointer-events: none;
    }
}

/* Programs Page Specific Styles */
.program-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f2ff 100%);
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

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

/* Mobile image optimizations */
@media (max-width: 768px) {
    .intro-card.image-card {
        width: 100%;
        height: auto;
        min-height: 250px;
        max-width: 100%;
    }
    
    .intro-section:nth-of-type(3) .intro-card.image-card {
        width: 100%;
        height: auto;
        min-height: 220px;
    }
    
    .hero-image img {
        max-height: 350px;
        width: 100%;
        object-fit: contain;
    }
}

/* Prevent layout shifts */
.highlight-image img,
.project-card-image img {
    aspect-ratio: 1;
    object-fit: cover;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Smooth scrolling for all devices */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent zoom on input focus for iOS and enhance mobile forms */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input {
        font-size: 16px;
        min-height: 48px;
        padding: 12px 16px;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    input[type="submit"],
    input[type="button"],
    button {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 16px;
        border-radius: 8px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    textarea {
        resize: vertical;
        min-height: 120px;
    }
}

.program-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.program-hero h1 {
    color: #3477f6;
    margin-bottom: 30px;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.program-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-image {
    margin-top: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    background: #f8f9fa;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: contain;
    object-position: center;
    border-radius: inherit;
}

/* Highlights Section */
.highlights-section {
    padding: 80px 0;
    background: white;
}

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

.highlight-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(52, 119, 246, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    padding: 30px 20px;
    position: relative;
    backdrop-filter: blur(10px);
}

.highlight-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(52, 119, 246, 0.2);
    border-color: rgba(52, 119, 246, 0.4);
    background: rgba(52, 119, 246, 0.1);
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3477f6, #5a9cff, #3477f6);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.highlight-card:hover::before {
    opacity: 1;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.highlight-image {
    display: none; /* Hide image containers */
}

.highlight-image img {
    display: none; /* Hide images */
}

.highlight-card h3 {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    position: relative;
    transition: all 0.3s ease;
}

.highlight-card:hover h3 {
    color: #3477f6;
    transform: translateY(-2px);
}

/* Impact Section */
.impact-section {
    padding: 80px 0;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.impact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(52, 119, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(90, 156, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(52, 119, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(90, 156, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.impact-section:hover::before {
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(52, 119, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(90, 156, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(52, 119, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(90, 156, 255, 0.08) 0%, transparent 50%);
    transform: scale(1.1);
}

.impact-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 400px;
    z-index: 2;
}

.impact-left,
.impact-right {
    position: absolute;
    text-align: center;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(52, 119, 246, 0.3);
    border: 2px solid rgba(255,255,255,0.2);
    width: 300px;
    z-index: 10;
    animation: textboxFloat 3s ease-in-out infinite;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.impact-left:hover,
.impact-right:hover {
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(52, 119, 246, 0.6);
    background: linear-gradient(135deg, #5a9cff 0%, #3477f6 100%);
    border: 2px solid rgba(255,255,255,0.8);
    filter: brightness(1.1);
}

@keyframes textboxFloat {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 8px 25px rgba(52, 119, 246, 0.3);
    }
    50% {
        transform: translateY(-50%) scale(1.02);
        box-shadow: 0 12px 35px rgba(52, 119, 246, 0.5);
    }
}

.impact-left {
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

.impact-right {
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
}

.impact-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.impact-text p {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.impact-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 200px;
    min-width: 200px;
    z-index: 20;
    position: relative;
    margin-top: -50px;
}

.impact-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #3477f6;
    box-shadow: 0 10px 30px rgba(52, 119, 246, 0.3);
}

.impact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.impact-number {
    font-size: 4rem;
    font-weight: 900;
    color: #3477f6;
    text-shadow: none;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.impact-label {
    color: #3477f6;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    max-width: 200px;
}



.impact-content {
    position: relative;
}



/* Projects Section */
.projects-section {
    padding: 80px 0;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    overflow: hidden;
    min-height: 260px;
    max-height: 320px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(52, 119, 246, 0.2);
}

.project-card-image {
    flex: 0 0 260px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.project-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    position: relative;
    border-radius: inherit;
}

.project-card-content {
    flex: 1;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-card h3 {
    color: #3477f6;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
}

.project-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: white;
    color: #3477f6;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.3);
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #3477f6;
    outline-offset: 2px;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    .main-header,
    .mobile-nav-toggle,
    .social-icons {
        display: none;
    }
    
    .hero {
        height: auto;
        margin-top: 0;
    }
}

/* Programs Overview Page Styles */
.programs-hero {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.programs-carousel-section {
    padding: 60px 0;
    background: #fff;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible;
    height: 600px; /* Increased height to accommodate navigation */
}

.carousel-track {
    display: flex;
    height: 500px; /* Fixed height for the carousel content */
    position: relative;
}

.program-slide {
    min-width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.program-slide:first-child {
    opacity: 1;
    visibility: visible;
}

.program-card-large {
    display: flex;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 20px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.program-image-container {
    flex: 0 0 50%;
    position: relative;
    overflow: hidden;
}

.program-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.program-card-large:hover .program-hero-image {
    transform: scale(1.05);
}

.program-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
}

.program-badge {
    background: rgba(52, 119, 246, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.program-content-large {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.program-content-large h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.program-content-large p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.program-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.feature-tag {
    background: rgba(52, 119, 246, 0.1);
    color: #3477f6;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(52, 119, 246, 0.2);
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    gap: 20px;
    z-index: 10;
}

.carousel-btn {
    background: #3477f6;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.carousel-btn:hover {
    background: #2c5aa0;
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #3477f6;
    transform: scale(1.2);
}

.programs-stats {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.programs-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3477f6 0%, #5a9cff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-content h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #333;
    margin: 0 0 5px 0;
}

.stat-content p {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Mobile Responsive for Programs Overview */
@media (max-width: 768px) {
    .carousel-container {
        height: 700px; /* Increased height for mobile */
    }
    
    .carousel-track {
        height: 600px; /* Adjusted height for mobile */
    }
    
    .program-card-large {
        flex-direction: column;
        margin: 0 10px;
    }
    
    .program-image-container {
        flex: none;
        height: 200px;
    }
    
    .program-content-large {
        padding: 30px 20px;
    }
    
    .program-content-large h2 {
        font-size: 24px;
    }
    
    .carousel-nav {
        margin-top: 30px;
    }
    
    .programs-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 20px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-content h3 {
        font-size: 28px;
    }
    
    /* Additional mobile optimizations */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .mobile-nav-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(52, 119, 246, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        display: none;
        padding: 20px;
        z-index: 999;
    }
    
    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Touch-friendly improvements */
    .btn {
        min-height: 48px;
        padding: 16px 32px;
        font-size: 16px;
        -webkit-tap-highlight-color: transparent;
        border-radius: 12px;
        letter-spacing: 0.5px;
    }
    
    .main-nav a {
        padding: 16px 24px;
        min-height: 48px;
        font-size: 16px;
        border-radius: 8px;
        margin: 4px 0;
    }
    
    /* Improved scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Better touch targets */
    .carousel-btn {
        min-width: 48px;
        min-height: 48px;
        font-size: 18px;
    }
    
    .dot {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 750px; /* Even more height for very small screens */
    }
    
    .carousel-track {
        height: 650px; /* Adjusted height for very small screens */
    }
    
    .programs-stats .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .program-features {
        gap: 8px;
    }
    
    .feature-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* Very small screen optimizations */
    .container {
        padding: 0 12px;
    }
    
    /* Smaller logos for very small screens */
    .logo-space-left,
    .logo-space-right {
        width: 50px;
        height: 50px;
    }
    
    .main-header .container {
        grid-template-columns: 50px 1fr 50px;
        gap: 8px;
        padding: 6px 12px;
    }
    
    .mobile-nav-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
        right: 12px;
    }
    
    .program-hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 8px;
    }
    
    .program-description {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 0 12px;
    }
    
    .highlight-card h3 {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .impact-number {
        font-size: 2.5rem;
    }
    
    .impact-left p,
    .impact-right p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .project-card-content h3 {
        font-size: 1.1rem;
    }
    
    .project-card-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Footer mobile optimizations */
    .footer-grid {
        gap: 20px;
    }
    
    .footer-logo-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .links-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-bottom p {
        text-align: center;
        font-size: 0.9rem;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .program-hero {
        padding: 80px 0 60px;
    }
    
    .program-hero h1 {
        font-size: 2rem;
        margin-top: 60px;
    }
    
    .carousel-container {
        height: 500px;
    }
    
    .carousel-track {
        height: 400px;
    }
}

/* Subtle grow-in text animation for page-load hero titles */
@keyframes softGrowIn {
    0% { opacity: 0; transform: translateY(6px) scale(0.98); filter: blur(2px); }
    60% { opacity: 1; transform: translateY(0) scale(1.005); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.text-grow-on-load {
    animation: softGrowIn 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Global mobile/responsiveness improvements */
html, body { width: 100%; }
body { overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }

/* Enhanced typography for mobile readability */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    h1 { font-size: 2.2rem; line-height: 1.2; }
    h2 { font-size: 1.8rem; line-height: 1.3; }
    h3 { font-size: 1.4rem; line-height: 1.4; }
    h4 { font-size: 1.2rem; line-height: 1.4; }
    h5 { font-size: 1.1rem; line-height: 1.4; }
    h6 { font-size: 1rem; line-height: 1.4; }
    
    p { font-size: 1rem; line-height: 1.6; margin-bottom: 1rem; }
}

@media (max-width: 480px) { 
    .container { padding-left: 16px; padding-right: 16px; }
    
    body {
        font-size: 13px;
        line-height: 1.5;
    }
    
    h1 { font-size: 1.9rem; line-height: 1.2; }
    h2 { font-size: 1.6rem; line-height: 1.3; }
    h3 { font-size: 1.3rem; line-height: 1.4; }
    
    p { font-size: 0.95rem; line-height: 1.6; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .moving-grid, .reels-pool::before { animation: none !important; }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .particle {
        border-radius: 50%;
    }
    
    .btn {
        border-width: 1px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        animation: none !important;
    }
}

/* Programs Mega Dropdown */
.main-nav .dropdown {
    position: static;
}
.programs-dropdown{position:fixed;left:50%;top:80px;transform:translateX(-50%);background:#fff;padding:30px 40px;border-radius:20px;box-shadow:0 15px 40px rgba(0,0,0,.15);display:none;white-space:nowrap;z-index:999;}
.dropdown:hover .programs-dropdown,.programs-dropdown:hover{display:block;animation:fadeInScale .3s ease forwards;}
.program-mini{width:180px;margin:10px;text-align:center;display:inline-block;transition:transform .25s ease;}
.program-mini img{width:100%;height:120px;object-fit:cover;border-radius:15px;box-shadow:0 6px 15px rgba(0,0,0,.1);}
.program-mini h4{margin-top:12px;font-size:1rem;color:#3477f6;font-weight:600;}
.program-mini:hover{transform:translateY(-6px);}
@keyframes fadeInScale{from{opacity:0;transform:translateY(10px) scale(.95);}to{opacity:1;transform:translateY(0) scale(1);}}

/* Program Navigation Buttons */
.program-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 80px;
    z-index: 1000;
    align-items: center;
}

.program-nav .prev-program,
.program-nav .next-program {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3477f6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease;
}

.program-nav .prev-program:hover,
.program-nav .next-program:hover {
    background: #245bcf;
}

@media (max-width: 768px) {
    .program-nav {
        bottom: 20px;
        gap: 60px;
    }
    .program-nav .prev-program,
    .program-nav .next-program {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Program Navigation (Enhanced) */
.program-nav{
    position:fixed;
    bottom:40px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    gap:120px;
    align-items:center;
    padding:10px 28px;
    background:rgba(255,255,255,0.45);
    backdrop-filter:blur(12px) saturate(180%);
    border-radius:40px;
    box-shadow:0 12px 40px rgba(0,0,0,0.12);
    transition:opacity .4s ease,transform .4s ease;
    z-index:1000;
}
.program-nav.hide{
    opacity:0;
    transform:translate(-50%,40px);
    pointer-events:none;
}
.nav-btn{
    width:60px;
    height:60px;
    border-radius:50%;
    background:linear-gradient(135deg,#3477f6 0%,#5a9cff 100%);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.6rem;
    transition:transform .25s ease,box-shadow .25s ease;
}
.nav-btn:hover{
    transform:scale(1.15);
    box-shadow:0 8px 25px rgba(52,119,246,0.4);
}
.program-nav a{text-decoration:none}
@media (max-width:768px){
    .program-nav{gap:80px;padding:8px 24px;bottom:25px;}
    .nav-btn{width:50px;height:50px;font-size:1.3rem;}
}
.page-transition{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:#fff;
    pointer-events:none;
    z-index:2000;
    opacity:1;
    transition:opacity .4s ease;
}
.page-transition.loaded{opacity:0;}
.page-transition.out{opacity:1;}

/* Dark mode support - removed to revert top bar color */

/* Programs Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    transform-origin: top center;
    background: rgba(255,255,255,0.98);
    min-width: 1000px;
    max-width: 95vw;
    box-shadow: 0 25px 60px rgba(52,119,246,0.15), 0 8px 18px rgba(0,0,0,0.06);
    border-radius: 20px;
    z-index: 1001;
    margin-top: 15px;
    padding: 35px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms ease, visibility 280ms ease, transform 280ms ease;
    pointer-events: none;
    backdrop-filter: blur(8px) saturate(140%);
}

/* Only use JavaScript-controlled states for better UX */
.nav-dropdown.active .nav-dropdown-content,
.nav-dropdown.show .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Hover fallback for devices without JavaScript */
@media (hover: hover) and (pointer: fine) {
    .nav-dropdown:hover .nav-dropdown-content {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: auto;
    }
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center; /* vertically center text and chevron */
    gap: 6px;
    transition: all 0.3s ease;
    vertical-align: middle; /* align with other links */
    line-height: 1; /* consistent line height prevents offset */
}

.nav-dropdown-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    margin-left: 2px;
    opacity: 0.8;
    line-height: 1; /* avoid affecting anchor height */
    vertical-align: middle;
}

.nav-dropdown.active .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-programs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.nav-program-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    padding: 0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nav-program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.nav-program-card:hover::before {
    left: 100%;
}

.nav-program-image {
    width: 100%;
    height: 110px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.nav-program-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* show full image */
    object-position: center;
    background: #fff; /* prevent dark bars if any */
    transition: transform 0.3s ease;
}

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

.nav-program-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-program-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.nav-program-icon {
    width: 45px;
    height: 45px;
    background: rgba(52, 119, 246, 0.12); /* light theme blue for contrast */
    border: 1px solid rgba(52, 119, 246, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.1rem;
}

/* Make the icons beside program headings theme blue in the dropdown */
.nav-program-icon i {
    color: #3477f6;
}

.nav-program-card:hover .nav-program-icon i {
    color: #5a9cff;
}

/* Subtle emphasis on hover for the icon container */
.nav-program-card:hover .nav-program-icon {
    background: rgba(90, 156, 255, 0.18);
    border-color: rgba(90, 156, 255, 0.35);
}

.nav-program-info h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    color: #333;
}

.nav-program-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #667eea;
    font-style: italic;
    margin: 0;
}

.nav-program-description {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.nav-dropdown-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(255,255,255,0.98);
}

/* About dropdown specific */
.about-dropdown .nav-dropdown-content--about{
    min-width: 480px;
    max-width: 560px;
    padding: 22px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(243,249,255,0.98) 100%);
    border: 1px solid rgba(52,119,246,0.22);
    box-shadow: 0 28px 60px rgba(52,119,246,0.18), 0 10px 24px rgba(0,0,0,0.07);
}
.about-menu{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.nav-dropdown-content .about-menu-item,
.nav-dropdown-content .about-menu-item:visited{
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #1f2d5a;
    font-weight: 600;
    background: rgba(52,119,246,0.10);
    border: 1px solid rgba(52,119,246,0.22);
    border-left: 4px solid rgba(52,119,246,0.35);
    transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.nav-dropdown-content .about-menu-item:hover{ color: #0f1e4a; }
.about-menu-item:hover{
    background: linear-gradient(180deg, rgba(90,156,255,0.18) 0%, rgba(52,119,246,0.18) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(52,119,246,0.22);
}
.about-menu-item.active{
    background: linear-gradient(135deg, rgba(52,119,246,0.25), rgba(90,156,255,0.25));
    border-color: rgba(52,119,246,0.35);
}

@media (max-width: 768px) {
    .nav-dropdown-content {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        min-width: 100vw;
        max-width: 100vw;
        transform: none;
        border-radius: 0;
        margin-top: 0;
        padding: 80px 20px 20px;
        box-shadow: none;
        background: rgba(52, 119, 246, 0.98);
        backdrop-filter: blur(10px);
        overflow-y: auto;
        z-index: 1002;
        display: none;
    }
    
    /* Mobile dropdown back button */
    .nav-dropdown-content .mobile-back-btn {
        position: absolute;
        top: 20px;
        left: 20px;
        color: white;
        font-size: 16px;
        font-weight: 600;
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        cursor: pointer;
        z-index: 1003;
        transition: background 0.3s ease;
        border: none;
        font-family: inherit;
    }
    
    .nav-dropdown-content .mobile-back-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .nav-dropdown-content::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: linear-gradient(180deg, rgba(52, 119, 246, 0.9) 0%, transparent 100%);
        pointer-events: none;
        z-index: 1002;
    }
    
    .nav-dropdown.active .nav-dropdown-content {
        display: block !important;
        animation: slideInFromTop 0.3s ease-out;
    }
    
    .nav-programs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        overflow-x: visible;
        padding-bottom: 0;
        margin-top: 60px; /* Space for back button */
    }
    
    /* Ensure mobile dropdown content is properly sized */
    .nav-dropdown-content .about-menu {
        margin-top: 60px; /* Space for back button */
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-dropdown-content .about-menu-item {
        padding: 16px 20px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
    }
    
    .nav-dropdown-content .about-menu-item:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(8px);
    }
    
    /* Mobile programs grid improvements */
    .nav-programs-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 60px;
        padding: 20px 0;
    }
    
    /* Mobile navigation improvements */
    @media (max-width: 768px) {
        .main-nav {
            padding-top: 20px;
        }
    }
    
    .nav-program-card {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 16px;
        padding: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        text-decoration: none;
        color: #333;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-program-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-color: rgba(52, 119, 246, 0.5);
    }
    
    .nav-program-header {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    
    .nav-program-icon {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #3477f6, #5a9cff);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .nav-program-info h3 {
        font-size: 1.2rem;
        font-weight: 700;
        color: #3477f6;
        margin: 0 0 4px 0;
    }
    
    .nav-program-tagline {
        font-size: 0.9rem;
        color: #666;
        font-weight: 500;
        margin: 0;
    }
    
    .nav-program-description {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #555;
        margin: 0;
    }
    
    /* Better touch targets for mobile */
    .nav-dropdown-toggle {
        padding: 15px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    
    /* Disable hover effects on mobile - removed problematic rule */
}
    
    .nav-programs-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-programs-grid::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1);
        border-radius: 2px;
    }
    
    .nav-programs-grid::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.4);
        border-radius: 2px;
    }
    
    .nav-programs-grid::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.6);
    }
    
    .nav-program-card {
        padding: 0;
        min-width: auto;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .nav-program-content {
        padding: 16px;
    }
    
    .nav-program-image {
        height: 80px;
    }
    
    .nav-program-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-right: 10px;
    }
    
    .nav-program-info h3 {
        font-size: 1rem;
    }
    
    .nav-program-tagline {
        font-size: 0.75rem;
    }
    
    .nav-program-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .nav-dropdown-arrow {
        display: none;
    }

/* ================================
   ABOUT PAGE STYLES
   ================================ */

/* About Content Sections */
.about-section {
    padding: 80px 0;
    background: white;
}

.about-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    margin-top: 120px;
    color: #3477f6;
    position: relative;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #333 20%, #333 80%, transparent 100%);
    opacity: 0.4;
}

.about-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.about-hero-image {
    width: 100%;
    max-width: 1200px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.team-main-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 25px;
}

.about-intro-text {
    max-width: 1000px;
    text-align: center;
}

.about-section:nth-child(even) {
    background: #f8f9fa;
}



.about-intro {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.highlight-text {
    color: #3477f6;
    font-weight: 600;
}

.highlight-link {
    color: #3477f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.highlight-link:hover {
    border-bottom: 1px solid #3477f6;
}

.about-description-section {
    margin-top: 60px;
}

.about-text-wrap-content {
    position: relative;
    margin-bottom: 40px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.about-image-float {
    float: right;
    margin: 0 0 30px 40px;
    width: 450px;
}

.community-image {
    width: 100%;
    height: auto;
    min-height: 380px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-wrapped-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.9;
    color: #555;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.about-wrapped-text p {
    margin-bottom: 25px;
    text-indent: 0;
}

.about-approach-text {
    clear: both;
    margin-top: 30px;
    text-align: center;
}

.about-pillars-text {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-pillars-text p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

.approach-text {
    font-style: italic;
    color: #333;
    font-weight: 500;
}

/* Mission Section */
.mission-section {
    background: #f8f9fa;
}

.mission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.mission-image-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.mission-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center top;
}

.mission-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Vision Section */
.vision-section {
    background: white;
    padding: 80px 0;
}

.vision-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.vision-statement {
    margin-bottom: 50px;
}

.vision-statement p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #3477f6;
    font-weight: 600;
    font-style: italic;
}

.core-values h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

.values-list {
    display: grid;
    gap: 20px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.value-item {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3477f6;
}

.value-item strong {
    color: #3477f6;
    font-weight: 600;
}

/* Scroll Animation for Core Values */
.scroll-animate {
    opacity: 0.6;
    transform: scale(0.95) translateY(10px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.center-focus {
    opacity: 1;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(52, 119, 246, 0.2);
    border-left-color: #3477f6;
    border-left-width: 6px;
}

.scroll-animate.near-center {
    opacity: 0.9;
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 10px 25px rgba(52, 119, 246, 0.1);
    border-left-color: #3477f6;
    border-left-width: 5px;
}

.scroll-animate.visible {
    opacity: 0.8;
    transform: scale(1) translateY(0);
}

/* Team Section */
.team-section {
    background: white;
}

.who-we-are-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.who-we-are-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px 25px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid transparent;
}

.who-we-are-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-left-color: #3477f6;
}

.who-we-are-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.who-we-are-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    position: relative;
    cursor: default;
    transition: all 0.3s ease;
}

.who-we-are-heading:hover {
    color: #3477f6;
    transform: translateX(5px);
}

.who-we-are-heading::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3477f6, #667eea);
    transition: width 0.4s ease;
}

.who-we-are-heading:hover::after {
    width: 40px;
}

.who-we-are-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
    flex-grow: 1;
}

/* Our Approach Section */
.our-approach {
    background: #f8f9fa;
}

.approach-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.approach-text p {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

.approach-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.approach-main-image {
    width: 100%;
    height: 350px;
    object-fit: contain;
    object-position: center;
}

/* Section Title */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3477f6;
    text-align: center;
    margin-bottom: 50px;
}

/* Responsive Design for About Page */
@media (max-width: 768px) {
    .about-section {
        padding: 60px 0;
    }
    
    .about-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
        margin-top: 80px;
    }
    
    .about-image-float {
        width: 320px;
        margin: 0 0 20px 25px;
    }
    
    .community-image {
        min-height: 260px;
    }
    
    .about-wrapped-text {
        max-width: 100%;
        margin: 0 auto;
        line-height: 1.8;
        text-align: left;
    }
    

    
    .about-hero-content {
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .about-hero-image {
        max-width: 100%;
    }
    
    .team-main-image {
        height: 400px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .about-hero-content {
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .team-main-image {
        height: 250px;
    }
    
    .about-intro {
        font-size: 1rem;
    }
    
    .about-text-wrap-content {
        margin-bottom: 30px;
    }
    
    .about-image-float {
        float: none;
        margin: 0 auto 20px auto;
        width: 100%;
        max-width: 300px;
        display: block;
    }
    
    .about-wrapped-text {
        text-align: left;
        max-width: 100%;
        line-height: 1.7;
    }
    
    .mission-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .vision-statement p {
        font-size: 1.1rem;
    }
    
    .core-values h3 {
        font-size: 1.3rem;
    }
    
    .mission-image {
        height: 300px;
    }
    
    .who-we-are-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
    }
    
    .who-we-are-heading {
        font-size: 1.2rem;
    }
    
    .who-we-are-text {
        font-size: 0.95rem;
    }
    
    .team-member-image {
        height: 150px;
    }
    
    .team-member-info {
        padding: 15px;
    }
    
    .approach-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .approach-main-image {
        height: 300px;
    }
    
    .community-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .about-title {
        font-size: 1.8rem;
        margin-top: 60px;
    }
    

    
    .team-main-image {
        height: 300px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .who-we-are-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .who-we-are-card {
        padding: 25px 20px;
    }
    
    .who-we-are-heading {
        font-size: 1.1rem;
    }
    
    .who-we-are-text {
        font-size: 0.9rem;
    }
    
    .about-intro {
        font-size: 0.95rem;
    }
    
    .about-text-left,
    .mission-text,
    .approach-text p {
        font-size: 0.9rem;
    }
    
    .value-item {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
}

/* --- PARTNERS SECTION: Responsive Height and Canvas --- */
@media (max-width: 768px) {
  .partners-section {
    padding: 40px 0 60px 0;
    min-height: 320px;
  }
  .partners-section .section-title {
    font-size: 1.5rem;
  }
}
@media (max-width: 480px) {
  .partners-section {
    padding: 30px 0 40px 0;
    min-height: 220px;
  }
}

/* Team Page */
.team-hero{
    padding: 120px 0 20px;
    background: #fff;
    text-align: center;
}

/* Board section on About page — centered rows like board.html */
.board-section{
    padding: 40px 0 80px;
}
.board-section .team-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}
.board-section .team-card{width: 240px;}
.board-section .section-title{margin-bottom: 30px;}

/* Bring team page heading 70px closer to the top bar */
.team-hero .about-title {
    margin-top: 50px;
}

.team-section{
    padding: 40px 0 80px;
    background:#fff;
}

.team-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap:30px;
    max-width: 1200px;
    margin:0 auto;
}

.team-card{
    background:#fff;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,0.1);
    overflow:hidden;
    text-align:center;
    transition:transform .25s ease, box-shadow .25s ease;
    border:2px solid transparent;
}

/* Ensure incomplete final row is centered for EPIC team section */
.epic-team-section .container .team-grid{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.epic-team-section .team-card{
    width: 240px;
}

.team-card:hover{
    transform: translateY(-6px);
    box-shadow:0 20px 40px rgba(0,0,0,0.15);
    border-color: rgba(52, 119, 246, 0.2);
}

/* EPIC team to footer simple separator */
.epic-team-section{
    border-bottom: 1px solid rgba(52,119,246,0.2);
}

.team-image{
    width:100%;
    height:220px;
    background:#f8f9fa;
    display:flex;
    align-items:center;
    justify-content:center;
}

.team-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* Focus bottom-half portraits (e.g., Deepti Ray) */
.team-image img.focus-bottom{object-position: 50% 85%;}

.team-modal-image img.focus-bottom{object-position: 50% 85%;}

/* Slightly lower focal point for portraits */
.team-image img.focus-slight-bottom{object-position: 50% 60%;}
.team-modal-image img.focus-slight-bottom{object-position: 50% 60%;}

.team-name{
    margin:15px 15px 6px 15px;
    color:#3477f6;
    font-weight:700;
    font-size:1.1rem;
}

.team-role{
    margin:0 15px 22px 15px;
    color:#3477f6;
    opacity:.85;
    font-weight:600;
    font-size:.95rem;
}

@media (max-width: 768px){
    .team-hero{padding: 100px 0 10px;}
    .team-image{height:200px;}
    .team-hero .about-title{margin-top: 10px;}
}

/* Team modal and interactions */
.team-card{cursor:pointer;}
.team-card.card-press{transform: translateY(-2px) rotateY(8deg) scale(1.01);}

.team-modal .modal-close{color:#666;}

.team-modal .team-modal-content{
    max-width: 1100px;
    width: 92%;
    border-radius: 20px;
    overflow: hidden;
}

.team-modal-container{
    display:flex;
    gap:0;
}

.team-modal-image{
    flex: 0 0 42%;
    min-height: 360px;
    background:#f5f7fb;
}
.team-modal-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.team-modal-text{
    flex:1;
    padding: 32px 36px;
    max-height: 80vh;
    overflow:auto;
}
.team-modal-text h2{margin:0 0 8px 0; color:#333; font-weight:700;}
.team-modal-role{color:#3477f6; font-weight:600; margin:0 0 16px 0;}
.team-modal-bio{color:#555; line-height:1.7; font-size:1rem;}

.team-modal-nav{
    position:absolute;
    top:50%;
    transform: translateY(-50%);
    width:50px;
    height:50px;
    border-radius:50%;
    border:none;
    background:#3477f6;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 8px 20px rgba(52,119,246,0.25);
    transition: transform .2s ease, background .2s ease;
    z-index: 10;
}
.team-modal-nav:hover{background:#2c5aa0; transform: translateY(-50%) scale(1.05);} 
.team-modal-nav.prev{left:16px;}
.team-modal-nav.next{right:16px;}

/* Turn-in animation for modal content */
.turn-in-left{animation: turnInLeft .5s ease both;}
.turn-in-right{animation: turnInRight .5s ease both;}
@keyframes turnInLeft{
    from{opacity:0; transform: perspective(1000px) rotateY(-14deg) translateX(-20px) scale(.98);} 
    to{opacity:1; transform: perspective(1000px) rotateY(0) translateX(0) scale(1);} 
}
@keyframes turnInRight{
    from{opacity:0; transform: perspective(1000px) rotateY(14deg) translateX(20px) scale(.98);} 
    to{opacity:1; transform: perspective(1000px) rotateY(0) translateX(0) scale(1);} 
}

@media (max-width: 992px){
    .team-modal-image{min-height: 320px;}
}

@media (max-width: 768px){
    .team-modal .team-modal-content{width: 95%;}
    .team-modal-container{flex-direction:column;}
    .team-modal-image{flex:none; height:260px; min-height:260px;}
    .team-modal-text{max-height: calc(100vh - 340px);}
    .team-modal-nav{width:44px; height:44px;}
}

@media (max-width: 480px){
    .team-modal-text{padding: 20px 16px;}
    .team-modal-nav{width:40px; height:40px;}
}

@media (max-width: 480px){
    .team-hero .about-title{margin-top: 0;}
}

/* --- STATS SECTION: Responsive Grid and Font --- */
@media (max-width: 768px) {
  .stats-section {
    padding: 40px 0;
  }
  .stats-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }
  .stat-item {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .stat-number {
    font-size: 2.2rem;
  }
  .stat-label {
    font-size: 1rem;
  }
}
@media (max-width: 480px) {
  .stats-section {
    padding: 24px 0;
  }
  .stat-number {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.95rem;
  }
}

/* --- CONTAINER: Reduce padding on mobile --- */
@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
}

/* --- CANVAS: Always fill partners-section --- */
.partners-section canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important; /* lowered so it's below scrolling cards (z-index: 2) */
  pointer-events: none;
  display: block;
}

/* Subtle grid background for Global Program section */
.global-grid-bg {
    position: relative;
    overflow: hidden;
}
.global-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(52,119,246,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52,119,246,0.06) 1px, transparent 1px);
    background-size: 28px 28px, 28px 28px;
    pointer-events: none;
    z-index: 0;
}
.global-grid-bg .container,
.global-grid-bg .mission-content,
.global-grid-bg .mission-image-container,
.global-grid-bg .mission-text { position: relative; z-index: 1; }

/* Gentle motion for grid background */
.moving-grid::before {
    animation: gridDrift 18s linear infinite;
}
@keyframes gridDrift {
    0% { background-position: 0 0, 0 0; }
    50% { background-position: 14px 14px, 14px 14px; }
    100% { background-position: 0 0, 0 0; }
}

/* Final mobile header fixes for very small screens */
@media (max-width: 320px) {
    .main-header {
        min-height: 60px;
    }
    
    .logo-space-left,
    .logo-space-right {
        width: 44px !important;
        height: 44px !important;
        padding: 4px;
        border-width: 1px;
    }
    
    .main-header .container {
        grid-template-columns: 44px 1fr 44px !important;
        gap: 6px !important;
        padding: 6px 8px !important;
    }
    
    .mobile-nav-toggle {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
        right: 8px !important;
        padding: 6px;
    }
    
    .home-hero-section {
        margin: 70px 8px 12px 8px !important;
    }
}

/* Responsive Design - ULTIMATE MOBILE FIX FOR ALL DEVICES */
@media (max-width: 900px) {
    /* CRITICAL: Force viewport scaling and ensure header visibility */
    html {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* FORCE HEADER TO ALWAYS BE VISIBLE ON MOBILE */
    .main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgb(52, 119, 246) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        min-height: 70px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* FORCE HEADER CONTAINER TO PROPER MOBILE LAYOUT */
    .main-header .container {
        display: grid !important;
        grid-template-columns: 65px 1fr 65px !important;
        align-items: center !important;
        gap: 10px !important;
        position: relative !important;
        padding: 8px 12px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        height: 70px !important;
        box-sizing: border-box !important;
    }
    
    /* FORCE LOGOS TO BE VISIBLE AND PROPERLY SIZED */
    .logo-space-left,
    .logo-space-right {
        width: 65px !important;
        height: 65px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        background: rgba(255,255,255,0.1) !important;
        border: 1.5px dashed rgba(255,255,255,0.3) !important;
        border-radius: 50% !important;
        padding: 6px !important;
        overflow: hidden !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .logo-space-left img,
    .logo-space-right img {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }
    
    /* FORCE MOBILE NAV TOGGLE TO BE VISIBLE */
    .mobile-nav-toggle {
        display: flex !important;
        position: absolute !important;
        right: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1001 !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        color: white !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        padding: 10px !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .mobile-nav-toggle:hover {
        background-color: rgba(255, 255, 255, 0.25) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
        transform: translateY(-50%) scale(1.05) !important;
    }
    
    /* FORCE MAIN NAV TO MOBILE OVERLAY MODE */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(52, 119, 246, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
        display: none !important;
        padding: 80px 20px 20px !important;
        z-index: 1002 !important;
        min-height: 100vh !important;
        width: 100vw !important;
        overflow-y: auto !important;
    }
    
    .main-nav.active {
        display: block !important;
        animation: slideInFromTop 0.3s ease-out !important;
    }
    
    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* MOBILE NAV STYLES */
    .main-nav ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .main-nav li {
        width: 100% !important;
    }
    
    .main-nav a {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 16px 20px !important;
        min-height: 50px !important;
        width: 100% !important;
        border-radius: 12px !important;
        margin: 0 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: rgba(255, 255, 255, 0.25) !important;
        transform: translateX(8px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    /* FORCE PROPER SPACING FOR CONTENT BELOW HEADER */
    body {
        padding-top: 70px !important;
    }
    
    .hero,
    .program-hero,
    .about-section,
    .team-hero {
        margin-top: 70px !important;
        padding-top: 20px !important;
    }
    
    /* HOME HERO SECTION MOBILE ADJUSTMENTS */
    .home-hero-section {
        margin: 90px 16px 20px 16px !important;
    }
    
    .home-hero-image {
        border-radius: 15px !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .hero {
        height: 70vh !important;
        max-width: calc(100% - 20px) !important;
        margin: 90px auto 0 !important;
        border-radius: 15px !important;
    }
    
    /* MOBILE TYPOGRAPHY */
    h1 { font-size: 2.2rem !important; line-height: 1.2 !important; }
    h2 { font-size: 1.8rem !important; line-height: 1.3 !important; }
    h3 { font-size: 1.4rem !important; line-height: 1.4 !important; }
    h4 { font-size: 1.2rem !important; line-height: 1.4 !important; }
    h5 { font-size: 1.1rem !important; line-height: 1.4 !important; }
    h6 { font-size: 1rem !important; line-height: 1.4 !important; }
    
    body { font-size: 14px !important; line-height: 1.5 !important; }
    p { font-size: 1rem !important; line-height: 1.6 !important; margin-bottom: 1rem !important; }
    
    /* MOBILE GRIDS AND LAYOUTS */
    .intro-grid { grid-template-columns: 1fr !important; gap: 30px !important; }
    .programs-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .highlights-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
    
    /* TOUCH-FRIENDLY BUTTONS */
    .btn {
        min-height: 48px !important;
        padding: 14px 28px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        touch-action: manipulation !important;
    }
    
    /* INTRO CARD IMAGES - PREVENT CROPPING */
    .intro-card.image-card {
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        width: 100% !important;
        height: auto !important;
        min-height: 220px !important;
    }
    
    /* NAVIGATION DROPDOWNS ON MOBILE */
    .nav-dropdown-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(52, 119, 246, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        padding: 80px 20px 20px !important;
        z-index: 1003 !important;
        overflow-y: auto !important;
        border-radius: 0 !important;
        margin: 0 !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .nav-dropdown.active .nav-dropdown-content {
        display: block !important;
        animation: slideInFromTop 0.3s ease-out !important;
    }
    
    .nav-dropdown-arrow { display: none !important; }
    
    .nav-program-card {
        width: 100% !important;
        min-width: auto !important;
        margin-bottom: 16px !important;
    }
    
    .nav-programs-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        overflow-x: visible !important;
    }
}

/* ==================================================
   Cross-browser header padding opt-in (append-only)
   - Keep a neutral default; only add top padding when JS sets measured header
   - This avoids different browsers using different cascade/order behavior
   ================================================== */
:root { --site-header-height: 80px; }

/* Neutral default: no forced body padding unless JS opts in */
body { padding-top: 0 !important; }

/* Apply header padding only when JS measures header and adds this class */
body.has-fixed-header {
    padding-top: var(--site-header-height) !important;
}

/* Defensive: ensure main header sits above content */
.main-header, .site-header { position: fixed !important; top: 0; left: 0; right: 0; z-index: 3000 !important; }

/* =========================
   Safari-specific fixes
   - Provide prefixed backdrop-filter and transform fallbacks
   - Reduce transform/stacking artifacts that can break fixed positioning in Safari
   ========================= */
.is-safari .main-header,
.is-safari .site-header {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased !important;
}

.is-safari .nav-dropdown-content {
    -webkit-transform: translateY(-10px) !important;
    transform: translateY(-10px) !important;
}

/* Add prefixed backdrop filter where used */
.partners-section,
.main-nav,
.nav-dropdown-content {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
}

/* Safari sometimes needs an explicit will-change on fixed elements to avoid repaint/jank */
.main-header, .site-header { will-change: transform; }



/* EXTRA SMALL SCREENS - AGGRESSIVE FIXES */
@media (max-width: 480px) {
    .main-header {
        min-height: 60px !important;
    }
    
    .main-header .container {
        grid-template-columns: 55px 1fr 55px !important;
        gap: 8px !important;
        padding: 6px 8px !important;
        height: 60px !important;
    }
    
    .logo-space-left,
    .logo-space-right {
        width: 55px !important;
        height: 55px !important;
        padding: 4px !important;
    }
    
    .mobile-nav-toggle {
        width: 36px !important;
        height: 36px !important;
        right: 8px !important;
        font-size: 1rem !important;
        padding: 8px !important;
    }
    
    body { padding-top: 60px !important; }
    
    .hero,
    .program-hero,
    .about-section,
    .team-hero {
        margin-top: 60px !important;
    }
    
    .home-hero-section {
        margin: 75px 12px 16px 12px !important;
    }
    
    .hero {
        height: 60vh !important;
        max-width: calc(100% - 16px) !important;
        margin: 75px auto 0 !important;
        border-radius: 12px !important;
    }
    
    .container { padding: 0 12px !important; }
    
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.2rem !important; }
    
    body { font-size: 13px !important; }
    
    .programs-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    .stats-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .highlights-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    
    .intro-card.image-card {
        min-height: 180px !important;
    }
}

/* ULTRA SMALL SCREENS - FINAL SAFEGUARDS */
@media (max-width: 320px) {
    .main-header {
        min-height: 55px !important;
    }
    
    .main-header .container {
        grid-template-columns: 50px 1fr 50px !important;
        gap: 6px !important;
        padding: 4px 6px !important;
        height: 55px !important;
    }
    
    .logo-space-left,
    .logo-space-right {
        width: 50px !important;
        height: 50px !important;
        padding: 3px !important;
        border-width: 1px !important;
    }
    
    .mobile-nav-toggle {
        width: 32px !important;
        height: 32px !important;
        right: 6px !important;
        font-size: 0.9rem !important;
        padding: 6px !important;
    }
    
    body { padding-top: 55px !important; }
    
    .hero,
    .program-hero,
    .about-section,
    .team-hero {
        margin-top: 55px !important;
    }
    
    .home-hero-section {
        margin: 65px 8px 12px 8px !important;
    }
    
    .hero {
        margin: 65px auto 0 !important;
        border-radius: 8px !important;
    }
    
    .container { padding: 0 8px !important; }
}

/* ==================================================
     Desktop: force dropdowns out of document flow
     - Ensures .nav-dropdown-content overlays page and does not change header height
     - Scoped to desktop so mobile full-screen behavior is preserved
     ================================================== */
@media (min-width: 769px) {
    /* make the dropdown container the positioning context */
    .nav-dropdown {
        position: relative !important;
    }

    /* remove panel from flow and place it directly below the nav item */
    .nav-dropdown-content {
        position: absolute !important;
        top: 100% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        background: #ffffff !important;
        /* keep previous sizing behavior but ensure it overlays instead of pushing */
        margin-top: 0 !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
    }

    /* If any rule earlier set display:block in-flow, ensure the panel is visually removed from layout */
    .nav-dropdown > .nav-dropdown-content { display: block !important; }

    /* Ensure header and nav don't grow to accommodate dropdowns */
    .main-header, .main-nav { overflow: visible !important; }
}


/* CRITICAL MOBILE FIXES - ADDRESSING ALL ISSUES */
@media (max-width: 900px) {
    /* Fix the 772px gap issue by extending breakpoint to 900px */
    
    /* ELIMINATE MOBILE SPACING GAPS */
    body {
        padding-top: 80px;
    }
    
    .home-hero-section {
        margin: 0 16px 20px 16px !important;
        padding-top: 0 !important;
    }
    
    .hero,
    .program-hero,
    .about-section,
    .team-hero {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }
    
    /* ENSURE HEADER VISIBILITY */
    .main-header {
        position: fixed !important;
        top: 0 !important;
        z-index: 1000 !important;
        min-height: 80px !important;
        background: rgb(52, 119, 246) !important;
        width: 100% !important;
    }
    
    .main-header .container {
        height: 80px !important;
        padding: 10px 16px !important;
    }
    
    /* MOBILE NAV TOGGLE VISIBILITY */
    .mobile-nav-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        right: 16px !important;
        background: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* MOBILE NAV OVERLAY */
    .main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(52, 119, 246, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        padding: 100px 20px 20px !important;
        z-index: 1002 !important;
        width: 100vw !important;
        height: 100vh !important;
        overflow-y: auto !important;
    }
    
    .main-nav.active {
        display: block !important;
    }
    
    /* MOBILE NAV STYLES */
    .main-nav ul {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .main-nav a {
        padding: 18px 24px !important;
        min-height: 56px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 12px !important;
        font-size: 18px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* DROPDOWN MOBILE BEHAVIOR */
    .nav-dropdown-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(52, 119, 246, 0.98) !important;
        padding: 100px 20px 20px !important;
        z-index: 1003 !important;
        width: 100vw !important;
        height: 100vh !important;
    }
    
    .nav-programs-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .nav-program-card {
        width: 100% !important;
    }
}

/* ADDITIONAL MOBILE FIXES FOR SMALLER SCREENS */
@media (max-width: 500px) {
    body {
        padding-top: 70px !important;
    }
    
    .main-header {
        min-height: 70px !important;
    }
    
    .main-header .container {
        height: 70px !important;
        padding: 8px 12px !important;
    }
    
    .home-hero-section {
        margin: 0 12px 16px 12px !important;
    }
}

/* ==================================================
   Navbar height bump (small, non-invasive)
   - Increases header height slightly on desktop and scales down for smaller viewports
   - Uses !important to ensure it overrides earlier min-height rules where needed
   ================================================== */
.main-header {
    min-height: 96px !important;
    height: auto !important;
}
.main-header .container {
    height: 96px !important;
    align-items: center !important;
}

@media (max-width: 900px) {
    .main-header { min-height: 88px !important; }
    .main-header .container { height: 88px !important; }
}

@media (max-width: 480px) {
    .main-header { min-height: 72px !important; }
    .main-header .container { height: 72px !important; }
}

/* ==================================================
     Make navbar wider on large screens
     - Increase page container max-width and slightly widen header grid columns
     - Leaves mobile and tablet breakpoints unchanged
     ================================================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1800px; /* increase available horizontal space */
    }

    /* Expand header side columns to give more central room */
    .main-header .container {
        grid-template-columns: 180px 1fr 180px !important;
    }

    /* Slightly increase spacing between nav items to use the extra width */
    .main-nav ul { gap: 64px !important; }
    .main-nav a { padding: 12px 24px !important; }
}



/* Ensure program navigation stays visible on smaller screens */
@media (max-width: 900px) {
    .program-nav {
        z-index: 3000;
        bottom: calc(12px + env(safe-area-inset-bottom));
        gap: 40px;
        padding: 6px 16px;
    }
    /* Don't auto-hide on small screens */
    .program-nav.hide {
        opacity: 1;
        transform: translate(-50%, 0);
        pointer-events: auto;
    }
    /* Slightly smaller buttons so they fit */
    .nav-btn,
    .program-nav .prev-program,
    .program-nav .next-program {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* Prevent overlap of impact section elements on tablets/smaller desktops */
@media (max-width: 1200px) {
    .impact-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        min-height: auto;
    }

    .impact-left,
    .impact-right {
        position: static;
        width: 100%;
        max-width: 520px;
        transform: none;
        animation: none;
        margin: 0 auto;
    }

    .impact-center {
        position: static;
        margin: 0;
        width: auto;
        min-width: 0;
        order: 1;
    }

    .impact-left { order: 2; }
    .impact-right { order: 3; }
}

/* Tighten further on phones */
@media (max-width: 768px) {
    .impact-left,
    .impact-right {
        max-width: 420px;
        padding: 16px;
    }
    .impact-text p { font-size: 0.95rem; }
    .impact-number { font-size: 3rem; }
}