/* =============================================
   PROGRAMS SECTION - ENHANCED DESIGN
   Matching Hero Section Aesthetics
   ============================================= */

/* SECTION CONTAINER */
.programs-section {
    min-height: 100vh;
    background: var(--bg-dark);
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
}

/* =============================================
   DYNAMIC BACKGROUND (Similar to Hero)
   ============================================= */

.programs-dynamic-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.7;
}

.programs-dynamic-bg-layer {
    position: absolute;
    inset: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Fallback gradient gdy JS nie załaduje tła */
.programs-dynamic-bg:empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(255,68,0,0.12) 0%, transparent 70%);
}

.programs-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: 
        linear-gradient(180deg, var(--bg-dark) 0%, transparent 15%),
        linear-gradient(0deg, var(--bg-dark) 0%, transparent 15%),
        radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* SECTION HEADER */
.programs-section .section-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 70px;
}

.programs-section .section-header h2 {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 15px;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.programs-section .section-header p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-gray);
    font-weight: 500;
}

/* PROGRAMS GRID - 2 COLUMNS FOR LARGER CARDS */
.programs-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
    max-width: 1100px;
    margin: 0 auto;
}

/* =============================================
   PROGRAM CARDS - ENHANCED
   ============================================= */

.program-card {
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.program-card-inner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Glow effect container */
.program-glow {
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    filter: blur(20px);
}

/* Hover state */
.program-card:hover .program-card-inner {
    transform: translateY(-15px);
    border-color: rgba(255, 68, 0, 0.3);
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255, 68, 0, 0.1);
}

.program-card:hover .program-glow {
    opacity: 0.3;
}

/* Active program - WITH GLOW */
.program-card.active .program-card-inner {
    border: 2px solid var(--primary);
    background: rgba(255, 68, 0, 0.05);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.4),
        0 0 60px rgba(255, 68, 0, 0.3);
}

.program-card.active .program-glow {
    opacity: 0.6;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.6;
        filter: blur(20px);
    }
    50% {
        opacity: 0.8;
        filter: blur(25px);
    }
}

/* PROGRAM IMAGE */
.program-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    flex-shrink: 0;
}

.program-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-card:hover .program-bg-image {
    transform: scale(1.15);
}

/* Overlay on hover */
.program-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.program-card:hover .program-overlay {
    opacity: 1;
}

.program-overlay-content {
    color: var(--text-white);
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.program-card:hover .program-overlay-content {
    transform: translateY(0);
}

.program-overlay-content i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    display: block;
}

.program-card:hover .program-overlay-content i {
    transform: scale(1.15);
}

.program-overlay-content p {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* PROGRAM CONTENT */
.program-content {
    padding: 30px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-time {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.program-content h3 {
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 900;
    color: var(--text-white);
    margin: 0 0 15px 0;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.program-content p {
    font-size: 15px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.7;
    flex: 1;
}

/* LIVE INDICATOR - Enhanced */
.live-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 3;
    box-shadow: 
        0 4px 15px rgba(255, 68, 0, 0.4),
        0 0 0 3px rgba(255, 68, 0, 0.2);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(255, 68, 0, 0.4),
            0 0 0 3px rgba(255, 68, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(255, 68, 0, 0.6),
            0 0 0 5px rgba(255, 68, 0, 0.3);
    }
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */

.program-card {
    opacity: 0;
    transform: translateY(40px);
    animation: none;
}

.program-card.reveal {
    animation: revealCard 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.program-card:nth-child(1).reveal { animation-delay: 0.1s; }
.program-card:nth-child(2).reveal { animation-delay: 0.2s; }
.program-card:nth-child(3).reveal { animation-delay: 0.3s; }
.program-card:nth-child(4).reveal { animation-delay: 0.4s; }
.program-card:nth-child(5).reveal { animation-delay: 0.5s; }
.program-card:nth-child(6).reveal { animation-delay: 0.6s; }

/* =============================================
   RESPONSIVE - TABLET
   ============================================= */

@media (max-width: 1024px) {
    .programs-section {
        padding: 100px 0 80px;
    }
    
    .programs-grid {
        gap: 30px;
    }
    
    .program-image {
        height: 240px;
    }
    
    .program-content {
        padding: 25px 20px;
    }
}

/* =============================================
   RESPONSIVE - MOBILE
   ============================================= */

@media (max-width: 768px) {
    .programs-section {
        padding: 80px 0 60px;
    }
    
    .programs-section .section-header {
        margin-bottom: 50px;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .program-image {
        height: 220px;
    }
    
    .program-content {
        padding: 25px 20px;
    }
    
    .program-content h3 {
        font-size: 22px;
    }
    
    .program-overlay-content i {
        font-size: 3rem;
    }
    
    .live-indicator {
        top: 15px;
        right: 15px;
        padding: 6px 14px;
        font-size: 10px;
    }
}

/* =============================================
   RESPONSIVE - SMALL MOBILE
   ============================================= */

@media (max-width: 480px) {
    .programs-section {
        padding: 70px 0 50px;
    }
    
    .programs-section .section-header h2 {
        font-size: 32px;
    }
    
    .programs-grid {
        gap: 20px;
    }
    
    .program-image {
        height: 200px;
    }
    
    .program-content {
        padding: 20px 18px;
    }
    
    .program-content h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .program-content p {
        font-size: 14px;
    }
    
    .program-card-inner {
        border-radius: 16px;
    }
}