/* ===== PROGRAMS SECTION STYLES ===== */
.programs {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    position: relative;
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: clamp(22px, 5vw, 42px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-description {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== AUTO-SCROLLING PROGRAMS MARQUEE ===== */
.programs-carousel-container {
    position: relative;
    width: 100%;
    margin: 40px 0 60px;
    overflow: hidden;
    padding: 20px 0;
    /* Fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.programs-carousel {
    display: flex;
    gap: 24px;
    width: max-content;
    padding: 12px 0 20px;
    animation: prog-marquee 50s linear infinite;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Continuous — never pauses */

/* Program Cards */
.programs-carousel .program-card {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
    margin: 5px 0;
    transform: translateZ(0);
    flex-shrink: 0;
}

.programs-carousel .program-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 30px rgba(29, 52, 97, 0.15);
    border-color: var(--primary);
}

/* Program Image */
.programs-carousel .program-image {
    height: 140px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

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

.programs-carousel .program-card:hover .program-image img {
    transform: scale(1.15);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.2));
    pointer-events: none;
}

/* Program Content */
.programs-carousel .program-content {
    padding: 15px 15px 18px;
    position: relative;
}

.programs-carousel .program-icon {
    position: relative;
    margin-top: -30px;
    margin-bottom: 10px;
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border: 2px solid white;
    transition: all 0.3s ease;
}

.programs-carousel .program-card:hover .program-icon {
    transform: rotate(8deg) scale(1.15);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.programs-carousel .program-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.programs-carousel .program-content p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    
    /* Line clamp for webkit browsers */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    
    /* Standard property for future browsers */
    display: box;
    line-clamp: 2;
    box-orient: vertical;
    
    /* Hide overflow */
    overflow: hidden;
    
    /* Fallback for older browsers */
    max-height: 3em;
}
.programs-carousel .program-level {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(29, 52, 97, 0.08);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.programs-carousel .program-card:hover .program-level {
    background: var(--primary);
    color: white;
}

.programs-carousel .program-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.programs-carousel .program-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.programs-carousel .program-card:hover .program-link {
    color: var(--secondary);
    transform: translateX(8px);
}

.programs-carousel .program-card:hover .program-link::after {
    width: 100%;
}

/* Seamless marquee — scrolls exactly half the track (6 cards), then loops */
@keyframes prog-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Nav buttons hidden — marquee is fully automatic */
.carousel-nav { display: none; }

/* ===== STATS STRIP ===== */
.stats-strip {
    background: linear-gradient(160deg, #e8f0fb 0%, #f0f5ff 50%, #eaf1fb 100%);
    padding: 52px 0 58px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 0;
    perspective: 1000px;
}

/* ── 3-D card ── */
.stat-card {
    background: linear-gradient(160deg, #ffffff 0%, #f3f7ff 100%);
    padding: 34px 24px 28px;
    border-radius: 18px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(200, 218, 240, 0.7);

    /* stacked hard shadows = 3-D depth */
    box-shadow:
        0 1px 0  rgba(255,255,255,0.9) inset,
        0 4px 0  #c8d6ee,
        0 7px 0  #b0c2de,
        0 10px 0 #98aece,
        0 14px 28px rgba(30, 58, 110, 0.20),
        0 2px 6px  rgba(30, 58, 110, 0.10);

    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

/* gold + navy top accent */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 16px;
    height: 3px;
    background: linear-gradient(90deg, #1E5AA8, #C8962A);
    border-radius: 0 0 4px 4px;
    opacity: 0.75;
    transition: opacity 0.25s;
}

/* lift on hover — card rises, shadow shrinks */
.stat-card:hover {
    transform: translateY(-12px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 2px 0 #c8d6ee,
        0 4px 0 #b0c2de,
        0 22px 44px rgba(30, 58, 110, 0.24),
        0 4px 12px rgba(30, 58, 110, 0.12);
}

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

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: #1E3A6E;
    -webkit-text-fill-color: #1E3A6E;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    margin-bottom: 5px;
}

.stat-label {
    display: none;
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== FALLBACK FOR MISSING IMAGES ===== */
.program-image.no-image {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-image.no-image::before {
    content: '📷';
    font-size: 40px;
    color: white;
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .programs-carousel .program-card {
        min-width: 250px;
        max-width: 250px;
    }
    
    /* prog-marquee uses -50% so no responsive override needed */
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .programs-carousel .program-card {
        min-width: 220px;
        max-width: 220px;
    }
    
    .programs-carousel .program-image {
        height: 120px;
    }
    
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .stats-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .carousel-nav {
        display: none;
    }
    
    .programs-carousel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        animation: none;
    }
    
    .programs-carousel .program-card {
        scroll-snap-align: start;
    }
    
    .programs-carousel-container::before,
    .programs-carousel-container::after {
        width: 40px;
    }
}