/* CSS Variables for Theming */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Ensure all media elements are responsive */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Ensure all text elements wrap properly */
p, h1, h2, h3, h4, h5, h6, span, div, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Ensure all containers are responsive */
section, .container, .banner, .stats, .about, .initiatives, .contact, .footer {
    max-width: 100vw;
    overflow-x: hidden;
    /* overflow-y is now handled per-section to allow shadows */
    box-sizing: border-box;
    /* Prevent layout shifts during animations */
    contain: layout style;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 4vw, 32px);
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: clamp(32px, 5vw, 48px);
}

/* Logo sizing:
   - Recommended logo size: 150x150px to 200x200px (square format)
   - Display height: clamp(32px, 5vw, 48px)
     * Mobile: 32px
     * Tablet: ~40px
     * Desktop: 48px
   - Width: auto (maintains aspect ratio)
   - Format: PNG, SVG, or JPG with transparent background preferred
*/
.logo {
    height: clamp(32px, 5vw, 48px);
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.school-name {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    white-space: nowrap;
}

/* Navbar Brand Display Modes */
/* Logo Only Mode - Remove gap when only logo is shown */
.nav-brand.logo-only {
    gap: 0;
}

.nav-brand.logo-only .logo {
    display: block;
}

.nav-brand.logo-only .school-name {
    display: none !important;
}

/* Name Only Mode - Remove gap when only name is shown */
.nav-brand.name-only {
    gap: 0;
}

.nav-brand.name-only .logo {
    display: none !important;
}

.nav-brand.name-only .school-name {
    display: block;
}

/* Both Mode (default) - Keep gap for spacing between logo and name */
.nav-brand.both {
    gap: 12px;
}

.nav-brand.both .logo {
    display: block;
}

.nav-brand.both .school-name {
    display: block;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(16px, 3vw, 32px);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
    animation: expandWidth 0.3s ease;
}

.nav-link {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-color);
}

/* Banner Section - Fully Fluid */
.banner {
    position: relative;
    width: 100%;
    /* Fully fluid height that adapts smoothly to any screen size */
    height: clamp(300px, 50vh + 10vw, 1000px);
    min-height: clamp(300px, 40vh, 600px);
    max-height: 95vh;
    overflow: hidden; /* Prevent scrollbars during carousel/animations */
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    /* Ensure content doesn't overflow during animations */
    contain: layout style;
}

.banner-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden; /* Prevent scrollbars on banner slides */
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-height: 100%;
    /* Ensure images maintain quality and load smoothly */
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.banner-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.7), rgba(44, 62, 80, 0.7));
    z-index: 1;
}

/* Single image - no carousel */
.banner-carousel.single-image .banner-slides {
    transition: none;
}

.banner-carousel.single-image .banner-slide img {
    animation: zoomIn 20s ease-in-out infinite alternate;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: clamp(45px, 6vw, 60px);
    height: clamp(45px, 6vw, 60px);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(24px, 4vw, 32px);
    font-weight: bold;
    transition: var(--transition);
    opacity: 0.8;
}

.carousel-btn:hover,
.carousel-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: clamp(20px, 4vw, 40px);
}

.carousel-next {
    right: clamp(20px, 4vw, 40px);
}

.carousel-btn span {
    line-height: 1;
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: clamp(20px, 4vw, 30px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot:hover,
.carousel-dot:focus {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
    outline: none;
}

.carousel-dot.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
    padding: clamp(16px, 3vw, 24px);
    margin: 0;
    pointer-events: none;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.banner-title {
    font-size: clamp(36px, 7vw, 64px);
    font-weight: 700;
    margin-bottom: clamp(16px, 3vw, 24px);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
    animation: fadeInBlur 1.2s ease 0.3s both, slideInLeft 1s ease 0.3s both;
    position: relative;
    z-index: 1;
    letter-spacing: 0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.banner-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: white;
    animation: expandWidth 1s ease 1s forwards;
}

.banner-tagline {
    font-size: clamp(20px, 4vw, 28px);
    opacity: 0.95;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.1);
    animation: fadeInBlur 1.2s ease 0.5s both, slideInRight 1s ease 0.5s both;
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stats Section */
.stats {
    background: var(--bg-light);
    color: var(--text-color);
    padding: clamp(80px, 12vw, 120px) clamp(16px, 4vw, 32px) clamp(60px, 10vw, 100px);
    padding-bottom: clamp(80px, 12vw, 120px); /* Extra padding to accommodate card shadows */
    position: relative;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    /* Ensure content doesn't overflow during scroll animations */
    contain: layout style;
}

/* Stats Section Title */
.stats-title {
    font-size: clamp(32px, 6vw, 48px);
    text-align: center;
    margin-bottom: clamp(48px, 8vw, 64px);
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: fadeInBlur 1s ease, fadeInDown 0.8s ease, gradientShift 5s ease infinite;
}

.stats-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    animation: expandWidth 0.8s ease 0.3s both;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two groups side by side */
    gap: clamp(24px, 4vw, 40px);
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    padding-bottom: 20px; /* Extra space for shadows at bottom */
}

/* Stats Group (for grouped structure) */
.stats-group {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 18px);
    width: 100%;
}

.stats-group-title {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin: 0;
    padding-bottom: clamp(6px, 1vw, 10px);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.stats-group-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.stats-group-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cards per group */
    gap: clamp(12px, 2vw, 18px);
    width: 100%;
    justify-items: center;
}

/* Ensure stats content is above background pattern */
.stats .container {
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: clamp(16px, 2.5vw, 24px);
    padding-top: clamp(16px, 2.5vw, 24px);
    padding-bottom: clamp(16px, 2.5vw, 24px); /* Ensure consistent bottom padding */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: clamp(8px, 1.2vw, 12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.8);
    min-height: clamp(100px, 15vw, 140px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    max-width: 100%;
    width: 100%;
    position: relative;
    overflow: hidden; /* Prevent scrollbars */
    cursor: pointer;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Ensure content is evenly distributed */
    gap: 0; /* Remove any default gap */
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card.visible {
    opacity: 1;
    animation: fadeInScale 0.8s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-card.visible:hover {
    transform: translateY(-12px) scale(1.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-color: rgba(255, 255, 255, 0.4);
    animation: glowPulse 2s ease-in-out infinite;
    /* Ensure hover transform doesn't cause overflow */
    will-change: transform;
}

.stat-card.visible:active {
    transform: translateY(-8px) scale(1.05);
}

/* Enhanced stat card with shimmer on hover */
.stat-card.visible::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.stat-card.visible:hover::after {
    left: 100%;
}

/* Add overlay for better text contrast on hover */
.stat-card.visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    z-index: 0;
    pointer-events: none;
}

.stat-card.visible:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: clamp(28px, 4.5vw, 36px);
    margin-bottom: clamp(6px, 1vw, 10px);
    display: block;
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.stat-card.visible:hover .stat-icon {
    animation: pulse 1s ease-in-out infinite, float 3s ease-in-out infinite;
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.stat-number {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: clamp(4px, 0.8vw, 8px);
    display: block;
    color: white;
    padding-bottom: 0; /* Ensure no extra padding */
}
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease, text-shadow 0.3s ease;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 2;
}

.stat-number.animating {
    color: #ffd700; /* Gold color during animation */
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.stat-number.animated {
    animation: numberComplete 0.5s ease;
    color: white; /* Reset to white after animation */
}

@keyframes numberComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.stat-label {
    font-size: clamp(13px, 2vw, 15px);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-bottom: 0; /* Ensure no extra margin at bottom */
    padding-bottom: 0; /* Ensure no extra padding at bottom */
}

.stat-card.visible:hover .stat-label {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: clamp(12px, 2vw, 16px) clamp(24px, 4vw, 32px);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: clamp(14px, 2vw, 16px);
}

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

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Sections */
section {
    padding: clamp(40px, 8vw, 80px) clamp(16px, 4vw, 32px);
    position: relative;
}

/* Banner section should have no padding - carousel fills entire space */
section.banner {
    padding: 0;
}

/* Section Separators */
section:not(.banner):not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: inherit;
    z-index: 1;
}

/* Wave separator between banner and stats */
.banner + .stats {
    margin-top: 0;
    padding-top: clamp(100px, 15vw, 140px);
}

.banner + .stats::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-light);
    clip-path: polygon(0 80px, 100% 0, 100% 80px, 0 80px);
    z-index: 2;
    pointer-events: none;
}

/* Wave separator between stats and about */
.stats + .about::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-light);
    clip-path: polygon(0 0, 100% 60px, 100% 60px, 0 60px);
    z-index: 2;
    pointer-events: none;
}

/* Wave separator between about and initiatives */
.about + .initiatives::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-light);
    clip-path: polygon(0 60px, 100% 0, 100% 60px, 0 60px);
    z-index: 1;
}

/* Wave separator between initiatives and contact */
.initiatives + .contact::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-light);
    clip-path: polygon(0 0, 100% 60px, 100% 60px, 0 60px);
    z-index: 1;
}

/* Fluid section separators - adapt to screen size */
@media (max-width: 900px) {
    .banner + .stats {
        padding-top: clamp(40px, 8vw, 80px);
    }
    
    /* Stack stats groups vertically on smaller screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .banner + .stats::before {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        height: clamp(2px, 0.5vw, 4px);
        top: clamp(-4px, -0.5vw, -2px);
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    }

    .stats + .about::before,
    .about + .initiatives::before,
    .initiatives + .contact::before {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        height: clamp(2px, 0.5vw, 3px);
        top: clamp(-3px, -0.5vw, -2px);
        background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    }
}

.section-title {
    font-size: clamp(32px, 6vw, 48px);
    text-align: center;
    margin-bottom: clamp(40px, 7vw, 60px);
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 20px;
    font-weight: 700;
    animation: fadeInDown 0.8s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    animation: expandWidth 0.8s ease 0.3s both;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

/* ============================================
   ENHANCED ANIMATIONS
   ============================================ */

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(2deg);
    }
    66% {
        transform: translateY(-10px) rotate(-2deg);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Shimmer/Shine Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Rotate and Scale */
@keyframes rotateScale {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Slide In with Fade */
@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(0 0 100% 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 144, 226, 0.6);
    }
}

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

/* Scale In with Bounce */
@keyframes scaleInBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Fade In with Blur */
@keyframes fadeInBlur {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* About Section */
.about {
    background: var(--bg-light);
    position: relative;
    overflow: hidden; /* Prevent scrollbars during parallax/animations */
    /* Ensure content doesn't overflow during scroll animations */
    contain: layout style;
}

.about-content {
    display: grid;
    /* Side by side on larger screens, stacked on mobile */
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 60px);
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent scrollbars during animations */
}

/* Stack on smaller screens for better organization */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: clamp(32px, 5vw, 48px);
    }
}

.about-text {
    font-size: clamp(17px, 2.5vw, 19px);
    color: var(--text-color);
    line-height: 1.9;
    padding: clamp(40px, 6vw, 60px);
    /* Extra padding on left to accommodate checkmarks */
    padding-left: clamp(40px, 6vw, 60px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Allow vertical overflow for checkmarks, prevent horizontal */
    overflow-x: hidden;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure text content is properly positioned */
.about-text > * {
    position: relative;
    z-index: 1;
}

.about-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1;
}

.about-text p {
    margin: 0 0 0.9em 0;
    color: var(--text-light);
    text-align: left;
    line-height: 1.65;
}

/* About Content Title */
.about-content-title {
    font-size: clamp(24px, 4vw, 28px);
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0 0 1em 0;
    line-height: 1.3;
}

/* School Info Table (Type, Classes, Medium) */
.school-info-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    margin: 0 0 clamp(1.25rem, 3vw, 1.75rem) 0;
    padding: 0;
    background: var(--card-bg, #fff);
    border: 1px solid rgba(var(--primary-rgb, 74, 144, 226), 0.15);
    border-radius: clamp(8px, 1.2vw, 12px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: clamp(14px, 0.9rem + 0.15vw, 15px);
}

.school-info-row {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(var(--primary-rgb, 74, 144, 226), 0.1);
}

.school-info-row:last-child {
    border-bottom: none;
}

.school-info-table dt {
    padding: clamp(0.5rem, 1vw, 0.65rem) clamp(0.75rem, 1.5vw, 1rem);
    margin: 0;
    background: linear-gradient(135deg, 
        rgba(var(--primary-rgb, 74, 144, 226), 0.1), 
        rgba(var(--primary-rgb, 74, 144, 226), 0.05));
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.school-info-table dd {
    padding: clamp(0.6rem, 1.2vw, 0.85rem) clamp(0.75rem, 1.5vw, 1rem);
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.4;
}

/* Desktop/Tablet - horizontal cards */
@media (min-width: 600px) {
    .school-info-table {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .school-info-row {
        border-bottom: none;
        border-right: 1px solid rgba(var(--primary-rgb, 74, 144, 226), 0.1);
    }
    
    .school-info-row:last-child {
        border-right: none;
    }
}

/* Tablet - 2 columns if 3 doesn't fit */
@media (min-width: 480px) and (max-width: 599px) {
    .school-info-table {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .school-info-row {
        border-right: 1px solid rgba(var(--primary-rgb, 74, 144, 226), 0.1);
    }
    
    .school-info-row:nth-child(2n) {
        border-right: none;
    }
    
    .school-info-row:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* Mobile - single column stack */
@media (max-width: 479px) {
    .school-info-table {
        grid-template-columns: 1fr;
    }
    
    .school-info-row {
        flex-direction: row;
        align-items: center;
    }
    
    .school-info-table dt {
        min-width: 80px;
        flex-shrink: 0;
        border-right: 1px solid rgba(var(--primary-rgb, 74, 144, 226), 0.1);
    }
    
    .school-info-table dd {
        flex: 1;
    }
}

/* About Highlights/List - Education themed icons */
.about-highlights {
    margin: clamp(12px, 2vw, 18px) 0;
    padding-left: 0;
    padding-right: 0;
    list-style: none;
}

.about-highlights li {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1.5vw, 14px);
    margin: clamp(0.5em, 1vw, 0.7em) 0;
    padding-right: clamp(8px, 2vw, 12px);
    color: var(--text-light);
    line-height: 1.6;
}

.about-highlights li::before {
    content: '✓';
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(20px, 2.5vw, 24px);
    height: clamp(20px, 2.5vw, 24px);
    margin-top: 0.15em;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-highlights li:hover::before {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.4);
}

.about-text p:first-child,
.about-text .about-content-title + p {
    margin-top: 0;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Better text spacing and readability */
.about-text p + p {
    margin-top: 0.75em;
}

/* About "Know More" Link */
.about-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: clamp(24px, 4vw, 32px);
    padding: clamp(12px, 2vw, 16px) clamp(24px, 4vw, 32px);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-size: 200% 200%;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: clamp(15px, 2.5vw, 17px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    position: relative;
    z-index: 1;
    align-self: flex-start;
    overflow-x: hidden;
    overflow-y: visible;
    animation: gradientShift 3s ease infinite;
}

.about-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.about-more-link:hover::before {
    left: 100%;
}

.about-more-link:hover,
.about-more-link:focus {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    background-size: 200% 200%;
    color: white;
    animation: glowPulse 1.5s ease-in-out infinite, gradientShift 3s ease infinite;
}

.about-more-link:active {
    transform: translateY(0);
}

.about-more-link .link-arrow {
    font-size: 18px;
    transition: var(--transition);
    display: inline-block;
}

.about-more-link:hover .link-arrow,
.about-more-link:focus .link-arrow {
    transform: translateX(4px);
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                inset 0 70px 50px -30px rgba(0, 0, 0, 0.12); /* Soft top vignette to soften screen area */
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 2;
}

/* About image framing: applies to all viewports (mobile, tablet, desktop).
   object-position crops from top to de-emphasize screens/posters. */
.about-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center 58%;
    border-radius: 20px;
    transition: var(--transition);
    display: block;
    min-height: clamp(300px, 40vh, 500px);
    box-sizing: border-box;
    overflow: hidden;
}

/* Per-image framing (all viewports): emphasize students, crop out top */
.about-image img[data-about-index="1"],
.about-image img[data-about-index="4"] {
    object-position: center 62%;
}
.about-image img[data-about-index="2"] {
    object-position: center 55%;
}
.about-image img[data-about-index="3"] {
    object-position: center 68%;
}

/* On larger screens, ensure image fills container height */
@media (min-width: 901px) {
    .about-image {
        min-height: 100%;
    }
    
    .about-image img {
        min-height: 100%;
        height: 100%;
    }
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(231, 76, 60, 0.05));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 20px;
    z-index: 1;
    pointer-events: none;
}

.about-image:hover::after {
    opacity: 1;
}

.about-image:hover img {
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.1) contrast(1.05);
}

.about-image {
    animation: fadeInBlur 1s ease;
}

.about-text {
    animation: slideInFade 0.8s ease;
}

/* Handle missing image */
.about-image:has(img[style*="display: none"]) {
    min-height: 300px;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image:has(img[style*="display: none"])::after {
    content: 'Image';
    color: var(--text-light);
    font-size: 18px;
    opacity: 0.5;
    z-index: 1;
}

/* Initiatives Section */
.initiatives {
    background: var(--bg-light);
    position: relative;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    /* Ensure content doesn't overflow during scroll animations */
    contain: layout style;
    padding-bottom: clamp(60px, 10vw, 100px); /* Extra padding to accommodate card shadows */
}

.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Fully fluid layout that adapts to any screen size */
    gap: clamp(20px, 3vw, 40px);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    justify-items: center; /* Center cards in grid cells */
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    padding-bottom: 20px; /* Extra space for shadows at bottom */
    padding-left: clamp(20px, 3vw, 40px);
    padding-right: clamp(20px, 3vw, 40px);
}

/* CRITICAL: Desktop 3-per-row using CSS Grid */
@media (min-width: 1024px) {
    .initiatives .container {
        max-width: 1400px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .initiatives-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 380px) !important;
        max-width: 1400px !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        gap: 40px !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .initiatives-grid .initiative-card {
        width: 380px !important;
        max-width: 380px !important;
        box-sizing: border-box !important;
    }
}


@media (min-width: 1440px) {
    .initiatives-grid {
        max-width: 1400px !important;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden; /* Only hide horizontal overflow */
        overflow-y: visible; /* Allow shadows to be visible */
        justify-content: center !important; /* Center cards when fewer in last row */
        gap: 40px !important; /* Fixed gap for consistent calculation */
        padding-left: 40px !important;
        padding-right: 40px !important;
    }
    
    .initiatives-grid .initiative-card {
        /* Use same calc as desktop for consistency */
        width: calc((100% - 160px) / 3) !important;
        flex: 0 0 calc((100% - 160px) / 3) !important;
        min-width: calc((100% - 160px) / 3) !important;
        max-width: calc((100% - 160px) / 3) !important;
        box-sizing: border-box !important;
    }
}

.initiative-card {
    background: white;
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(24px, 4vw, 40px);
    padding-top: clamp(24px, 4vw, 40px);
    padding-bottom: clamp(24px, 4vw, 40px); /* Ensure consistent bottom padding */
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden; /* Prevent scrollbars */
    opacity: 1;
    transform: translateY(0);
    min-height: clamp(240px, 35vw, 320px);
    display: flex;
    flex-direction: column;
    /* Card width for flexbox layout - base mobile styles (will be overridden by media queries) */
    /* Default to mobile: full width - these will be overridden by media queries */
    flex: 0 1 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    height: auto; /* Changed from 100% to auto for better content fitting */
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Ensure content is properly distributed */
    justify-content: flex-start; /* Align content to top */
    gap: 0; /* Remove any default gap between flex items */
    /* Ensure card height matches content */
    align-items: stretch; /* Stretch items to fill width */
    /* Prevent excessive bottom space */
    align-content: flex-start; /* Align content lines to start */
}

.initiative-card.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUpCard 0.6s ease forwards;
}

.initiative-card:nth-child(1).visible { animation-delay: 0.1s; }
.initiative-card:nth-child(2).visible { animation-delay: 0.2s; }
.initiative-card:nth-child(3).visible { animation-delay: 0.3s; }
.initiative-card:nth-child(4).visible { animation-delay: 0.4s; }
.initiative-card:nth-child(5).visible { animation-delay: 0.5s; }
.initiative-card:nth-child(6).visible { animation-delay: 0.6s; }

.initiative-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.initiative-card:hover::before {
    transform: scaleX(1);
}

.initiative-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.initiative-card:hover::after {
    opacity: 1;
}

.initiative-card.visible:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    animation: glowPulse 2s ease-in-out infinite;
    /* Ensure hover transform doesn't cause overflow */
    will-change: transform;
}

.initiative-card.visible:hover .initiative-icon {
    animation: rotateScale 1s ease-in-out, float 3s ease-in-out infinite;
    transform: scale(1.15);
}

.initiative-icon {
    font-size: clamp(48px, 6vw, 64px);
    display: block;
    margin-bottom: clamp(16px, 3vw, 24px);
    margin-top: 0; /* Ensure no extra top margin */
    transition: var(--transition);
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    padding-bottom: 0; /* Ensure no extra padding */
}

.initiative-card:hover .initiative-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.initiative-card h3 {
    font-size: clamp(22px, 3.5vw, 28px);
    margin-bottom: clamp(12px, 2vw, 16px);
    margin-top: 0; /* Ensure no extra top margin */
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
    transition: var(--transition);
    padding-bottom: 0; /* Ensure no extra padding */
}

.initiative-card:hover h3 {
    color: var(--primary-color);
}

.initiative-card p {
    color: var(--text-light);
    line-height: 1.8;
    position: relative;
    z-index: 1;
    font-size: clamp(15px, 2.5vw, 17px);
    margin: 0;
    margin-bottom: 0; /* Ensure no extra margin at bottom */
    padding-bottom: 0; /* Ensure no extra padding at bottom */
    /* Remove flex-grow to prevent excessive bottom space */
    flex-grow: 0; /* Changed from 1 to prevent taking up all space */
    flex-shrink: 1; /* Allow shrinking if needed */
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--bg-light), white);
    position: relative;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    /* Ensure content doesn't overflow during scroll animations */
    contain: layout style;
    padding-bottom: clamp(60px, 10vw, 100px); /* Extra padding to accommodate card shadows */
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(40px, 6vw, 60px);
    text-align: center;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    padding-bottom: 20px; /* Extra space for shadows at bottom */
}

/* Contact info and map side by side on larger screens when map is visible - Like About Us */
.contact-content.has-map {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    align-items: stretch;
}

.contact-content.has-map .contact-info {
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-content.has-map .contact-map {
    height: 100%;
    min-height: clamp(300px, 40vh, 500px);
}

.contact-info {
    background: white;
    padding: clamp(32px, 5vw, 60px);
    padding-top: clamp(32px, 5vw, 60px);
    padding-bottom: clamp(32px, 5vw, 60px); /* Ensure consistent bottom padding */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
    position: relative;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    min-height: clamp(300px, 40vh, 500px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.contact-info h3 {
    font-size: clamp(28px, 5vw, 36px);
    margin-bottom: clamp(32px, 5vw, 40px);
    color: var(--secondary-color);
    font-weight: 700;
}

.contact-info p {
    font-size: clamp(17px, 3vw, 20px);
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
    transition: var(--transition);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.contact-info p:hover {
    transform: translateX(5px);
    color: var(--text-color);
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    position: relative;
}

.contact-info a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.contact-info a:hover::after,
.contact-info a:focus::after {
    width: 100%;
}

.contact-info a:hover,
.contact-info a:focus {
    color: var(--accent-color);
    transform: scale(1.05);
}

/* Google Maps Container */
.contact-map {
    width: 100%;
    height: clamp(250px, 35vh, 500px);
    min-height: clamp(250px, 30vh, 400px);
    border-radius: 20px;
    overflow: hidden; /* Keep hidden for iframe, but shadow will be visible */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: white;
    position: relative;
    animation: fadeInUp 0.8s ease;
    max-width: 100%;
    box-sizing: border-box;
    /* Ensure shadow is not clipped by parent */
    margin-bottom: 0; /* No margin needed - padding on parent handles it */
}

.contact-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: relative;
    z-index: 0;
}

/* Mobile: Stack contact info and map - Like About Us */
@media (max-width: 900px) {
    .contact-content.has-map {
        grid-template-columns: 1fr;
        gap: clamp(32px, 5vw, 48px);
    }
    
    .contact-content.has-map .contact-map {
        order: -1; /* Show map first on mobile */
    }
    
    .contact-content.has-map .contact-info {
        min-height: auto;
    }
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: clamp(24px, 4vw, 32px) clamp(16px, 4vw, 32px);
    position: relative;
}

/* Important Links Section */
.important-links {
    background: var(--bg-color);
    padding: clamp(60px, 10vw, 100px) clamp(16px, 4vw, 32px);
    padding-bottom: clamp(80px, 12vw, 120px); /* Extra padding to accommodate card shadows */
    position: relative;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 35vw, 400px), 1fr));
    gap: clamp(24px, 4vw, 32px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Only hide horizontal overflow */
    overflow-y: visible; /* Allow shadows to be visible */
    padding-bottom: 20px; /* Extra space for shadows at bottom */
}

.important-link-card {
    background: white;
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(32px, 5vw, 40px);
    padding-top: clamp(32px, 5vw, 40px);
    padding-bottom: clamp(32px, 5vw, 40px); /* Ensure consistent bottom padding */
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-height: auto; /* Allow natural height */
    /* Ensure content is properly distributed */
    justify-content: flex-start; /* Changed from space-between to prevent excessive spacing */
    gap: 0; /* Remove any default gap between flex items */
    height: auto; /* Allow natural height based on content */
    align-content: flex-start; /* Align content lines to start */
}

.important-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.important-link-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.important-link-card:hover::before {
    transform: scaleX(1);
}

.important-link-card .link-icon {
    font-size: clamp(40px, 6vw, 48px);
    margin-bottom: clamp(16px, 3vw, 20px);
    margin-top: 0; /* Ensure no extra top margin */
    display: block;
    transition: transform 0.3s ease;
    padding-bottom: 0; /* Ensure no extra padding */
}

.important-link-card:hover .link-icon {
    transform: scale(1.2) rotate(5deg);
}

.important-link-card h3 {
    font-size: clamp(20px, 3.5vw, 24px);
    margin: 0 0 clamp(8px, 1.5vw, 12px) 0;
    margin-top: 0; /* Ensure no extra top margin */
    color: var(--secondary-color);
    font-weight: 700;
    transition: color 0.3s ease;
    padding-bottom: 0; /* Ensure no extra padding */
}

.important-link-card:hover h3 {
    color: var(--primary-color);
}

.important-link-card p {
    font-size: clamp(14px, 2.5vw, 16px);
    color: var(--text-light);
    margin: 0 0 clamp(16px, 2.5vw, 20px) 0; /* Consistent bottom margin */
    line-height: 1.6;
    flex-grow: 0; /* Changed from 1 to prevent taking up all space */
    flex-shrink: 1; /* Allow shrinking if needed */
    padding-bottom: 0; /* Ensure no extra padding at bottom */
}

.important-link-card .link-arrow {
    font-size: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    align-self: flex-end;
    margin-top: clamp(12px, 2vw, 16px); /* Fixed spacing from paragraph */
    margin-bottom: 0; /* Ensure arrow is at the bottom edge */
    padding-bottom: 0; /* Ensure no extra padding */
    flex-shrink: 0; /* Prevent arrow from shrinking */
    /* Arrow positioned with fixed margin from content above */
}

.important-link-card:hover .link-arrow {
    transform: translateX(8px);
}

/* Wave separator before footer */
.important-links + .footer::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--secondary-color);
    clip-path: polygon(0 60px, 100% 0, 100% 60px, 0 60px);
    z-index: 1;
}

/* Update contact + footer separator to important-links + footer */
.contact + .footer::before {
    display: none;
}

/* Footer separator styles moved to main mobile media query above */

/* Fluid touch targets - always at least 44x44px */
.carousel-btn,
.nav-toggle {
    min-width: clamp(40px, 6vw, 50px);
    min-height: clamp(40px, 6vw, 50px);
}

.about-more-link {
    min-height: clamp(40px, 6vw, 50px);
    padding: clamp(10px, 2vw, 16px) clamp(20px, 4vw, 32px);
}

/* Fluid Navigation - Adapts to screen size */
.nav-toggle {
    display: none; /* Hidden by default, shown when needed */
}

/* Show mobile menu when screen is narrow enough */
@media (max-width: 800px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: clamp(60px, 10vh, 80px);
        left: -100%;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        padding: clamp(20px, 4vw, 32px);
        box-shadow: var(--shadow);
        transition: left 0.3s ease;
        z-index: 99;
        max-height: calc(100vh - clamp(60px, 10vh, 80px));
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: clamp(10px, 2vw, 16px) 0;
        font-size: clamp(16px, 3vw, 20px);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: clamp(32px, 5vw, 40px);
    }

    .about-image {
        order: -1;
        min-height: 250px;
    }

    .about-image img {
        min-height: 250px;
    }

    .about-text {
        padding: clamp(32px, 5vw, 48px);
        min-height: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Stack groups vertically on mobile */
        gap: clamp(24px, 4vw, 32px);
        max-width: 100%;
    }
    
    .stats-group {
        gap: clamp(12px, 2vw, 16px);
    }
    
    .stats-group-title {
        font-size: clamp(18px, 2.5vw, 20px);
        padding-bottom: clamp(6px, 1vw, 8px);
    }
    
    .stats-group-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 cards side by side even on mobile */
        gap: clamp(10px, 1.5vw, 14px);
        max-width: 100%;
    }

    .stat-card {
        padding: clamp(18px, 3vw, 24px);
        min-height: clamp(120px, 18vw, 160px);
        aspect-ratio: 1;
        max-width: 100%;
    }
    
    .stat-icon {
        font-size: clamp(32px, 5vw, 40px);
        margin-bottom: clamp(8px, 1.2vw, 12px);
    }
    
    .stat-number {
        font-size: clamp(28px, 4vw, 36px);
        margin-bottom: clamp(4px, 0.8vw, 8px);
    }
    
    .stat-label {
        font-size: clamp(14px, 2vw, 16px);
    }

    .initiatives-grid {
        gap: 24px;
        max-width: 100%;
        justify-content: center; /* Center cards */
    }
    
    .initiatives-grid .initiative-card {
        /* Mobile: 1 card per row */
        width: 100% !important;
        flex: 0 1 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .initiative-card {
        padding: clamp(24px, 4vw, 28px);
        min-height: 260px;
        max-width: 100%;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .important-link-card {
        padding: clamp(24px, 4vw, 32px);
    }

    .banner {
        /* Mobile: Taller for better visual impact */
        height: clamp(450px, 70vh, 600px);
        min-height: 400px;
    }

    .banner-title {
        font-size: clamp(28px, 6vw, 48px);
    }

    .banner-tagline {
        font-size: clamp(16px, 3vw, 22px);
    }

    .banner-content {
        padding: 20px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-dots {
        bottom: 15px;
        gap: 8px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .section-title {
        font-size: clamp(28px, 5vw, 40px);
        margin-bottom: clamp(32px, 6vw, 48px);
    }

    /* Contact section styles already defined above - removed duplicate */
}

/* Tablet optimizations - only for true tablet sizes, not desktop */
@media (min-width: 769px) and (max-width: 899px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr); /* Two groups side by side */
        gap: clamp(24px, 3.5vw, 32px);
        max-width: 1200px;
    }
    
    .stats-group {
        gap: clamp(12px, 2vw, 16px);
    }
    
    .stats-group-title {
        font-size: clamp(18px, 2.5vw, 22px);
    }
    
    .stats-group-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per group */
        gap: clamp(12px, 2vw, 18px);
    }

    .stat-card {
        padding: clamp(20px, 3vw, 28px);
        min-height: clamp(140px, 18vw, 180px);
    }
    
    .stat-icon {
        font-size: clamp(36px, 5.5vw, 44px);
        margin-bottom: clamp(10px, 1.5vw, 14px);
    }
    
    .stat-number {
        font-size: clamp(30px, 4.5vw, 40px);
        margin-bottom: clamp(6px, 1vw, 10px);
    }
    
    .stat-label {
        font-size: clamp(15px, 2.2vw, 17px);
    }

    .initiatives-grid {
        gap: 32px; /* Fixed gap for consistent calculation */
        max-width: 900px !important;
        justify-content: center; /* Center cards when fewer in last row */
    }
    
    .initiatives-grid .initiative-card {
        /* On tablet, fit 2 cards per row */
        /* 32px = 1 gap between 2 cards */
        width: calc((100% - 32px) / 2) !important;
        flex: 0 1 calc((100% - 32px) / 2) !important;
        min-width: calc((100% - 32px) / 2) !important;
        max-width: calc((100% - 32px) / 2) !important;
    }

    .initiative-card {
        padding: clamp(28px, 4vw, 32px);
        min-height: 280px;
    }

    .about-content {
        gap: clamp(40px, 5vw, 60px);
    }

    .about-text {
        padding: clamp(40px, 5vw, 56px);
    }

    .about-image img {
        min-height: 350px;
    }
}

/* About image order on smaller screens - show image first for better visual flow */
@media (max-width: 900px) {
    .about-image {
        order: -1;
    }
}

/* Loading Animation for Images */
@keyframes imageLoad {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

img[loading="lazy"] {
    animation: imageLoad 0.5s ease;
}

/* Parallax Effect for Banner (subtle) */
.banner-carousel {
    will-change: transform;
}

/* Enhanced Scroll Animations */
@keyframes scrollFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Number Counter Animation Enhancement */
/* Enhanced stat number hover */
.stat-card.visible:hover .stat-number {
    transform: scale(1.15);
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
    animation: pulse 0.5s ease;
}

.stat-card.visible:hover .stat-number.animated {
    animation: pulse 0.5s ease, glowPulse 2s ease-in-out infinite;
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.6), 0 0 25px rgba(255, 255, 255, 0.4);
}


/* ============================================
   DARK MODE SUPPORT
   ============================================ */
.dark-mode {
    --primary-color: #5a9fe2;
    --secondary-color: #3c4e60;
    --accent-color: #f76c6c;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --bg-light: #2a2a2a;
    --border-color: #404040;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode .navbar {
    background: rgba(26, 26, 26, 0.95);
}

.dark-mode .about-text,
.dark-mode .initiative-card,
.dark-mode .stat-card,
.dark-mode .contact-info,
.dark-mode .contact-map {
    background: var(--bg-light);
    color: var(--text-color);
}

.dark-mode .section-title {
    color: var(--text-color);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: var(--primary-color);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    margin-left: 16px;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 16px;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 44px;
    min-height: 44px;
}

.lang-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* Print Styles */
@media print {
    .navbar,
    .carousel-btn,
    .carousel-dots,
    .dark-mode-toggle,
    .language-switcher,
    .about-more-link,
    .footer {
        display: none !important;
    }
    
    .banner {
        height: 300px !important;
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    .stat-card,
    .initiative-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ============================================
   SCROLL BUTTONS
   ============================================ */
.scroll-btn {
    position: fixed;
    right: clamp(16px, 4vw, 32px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0) scale(0.8);
    will-change: transform, opacity;
}

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

.scroll-btn:hover {
    background: var(--accent-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.scroll-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.scroll-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s ease;
}

.scroll-btn:hover svg {
    transform: scale(1.1);
}

.scroll-to-top {
    bottom: clamp(80px, 12vw, 120px);
}

.scroll-to-bottom {
    bottom: clamp(16px, 4vw, 32px);
}

/* Hide scroll buttons on very small screens */
@media (max-width: 480px) {
    .scroll-btn {
        width: 44px;
        height: 44px;
        right: 16px;
    }
    
    .scroll-to-top {
        bottom: 80px;
    }
    
    .scroll-to-bottom {
        bottom: 16px;
    }
}

/* Dark mode scroll buttons */
.dark-mode .scroll-btn {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .scroll-btn:hover {
    background: var(--accent-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Hide scroll buttons when printing */
@media print {
    .scroll-btn {
        display: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .stat-icon,
    .initiative-icon {
        animation: none !important;
    }
    
    .scroll-btn {
        transition: opacity 0.01ms !important;
    }
    
    .stat-number.animating {
        animation: none !important;
        color: white !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    }
    
    .stat-number.animated {
        animation: none !important;
    }
    
    .parallax-section {
        transform: none !important;
        will-change: auto !important;
    }
    
    .about-highlights li::before {
        transition: none !important;
    }
}

/* FINAL FIX: Force 3 cards per row on desktop - highest specificity, at end of file */
@media (min-width: 1024px) {
    section#initiatives.initiatives .container {
        max-width: 1400px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    #initiativesGrid.initiatives-grid {
        max-width: 1400px !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        gap: 40px !important;
        justify-content: center !important;
        width: 100% !important;
    }

    #initiativesGrid.initiatives-grid .initiative-card {
        width: 380px !important;
        flex: 0 0 380px !important;
        min-width: 380px !important;
        max-width: 380px !important;
        box-sizing: border-box !important;
    }
}

/* ABSOLUTE FINAL OVERRIDE - Remove all width constraints and force 3 cards */
@media (min-width: 1024px) {
    section#initiatives .container {
        max-width: 1400px !important;
        padding: 0 !important;
    }
    
    #initiativesGrid {
        max-width: 1400px !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        gap: 40px !important;
        justify-content: center !important;
    }

    #initiativesGrid .initiative-card {
        width: 380px !important;
        flex: 0 0 380px !important;
        min-width: 380px !important;
        max-width: 380px !important;
    }
}
