.episodes-slider-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.episodes-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 40px; /* Lisää padding vasemmalle ja oikealle */
    scrollbar-width: none;
    justify-content: flex-start; /* Aloita vasemmalta */
    margin: 0 auto;
    max-width: 1200px; /* Raja leveys */
}

/* Piilota scrollbar vielä paremmin */
.episodes-slider::-webkit-scrollbar {
    display: none;
}
.episode-slide {
    flex: 0 0 350px;
    display: flex; /* Lisätään flex */
}

.episode-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex; /* Lisätään flex */
    flex-direction: column; /* Asetetaan sisältö pystysuoraan */
    width: 100%; /* Täyttää slide-leveyden */
}

.episode-card:hover {
    transform: translateY(-5px);
}

.episode-thumbnail {
    position: relative;
    height: 190px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 58, 101, 0.7);
    transition: background 0.3s ease;
}

.episode-card:hover .episode-overlay {
    background: rgba(37, 58, 101, 0.5);
}

.episode-content {
    padding: 20px;
}

.episode-content h3 {
    margin: 0 0 10px 0;
font-size: 1.2rem;
    color: #333;
}

.episode-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.watch-button {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.watch-button:hover {
    background: var(--primary-blue-highlight);
    transform: translateY(-2px);
}

.slider-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.slider-prev, .slider-next {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s 
ease;
    height: 60px;
    width: 60px;
}

.slider-prev:hover, .slider-next:hover {
    background: var(--primary-blue-highlight);
    transform: scale(1.1);
}

.archive-link {
    text-align: center;
    margin-top: 30px;
}


/* Font Awesome versio */
.play-button {
    position: relative;
    z-index: 2;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.play-button i {
    font-size: 1.5em;
    color: var(--primary-blue);
    margin-left: 3px; /* Keskitä play-ikoni */
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Koko kortti klikattavaksi */
.episode-card {
    cursor: pointer;
    position: relative;
}










.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
background: rgba(37, 58, 101, 0.9);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,0,0,0.7);
    transform: scale(1.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px;
    background: rgba(0,0,0,0.5);
}

.video-info h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.4em;
    text-align: center;
}

.video-info p {
    color: rgba(255,255,255,0.8);
    margin: 0;
    line-height: 1.5;
    text-align: center;
}








/* Mobiili */
@media (max-width: 768px) {
    .episodes-slider {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        justify-items: center; /* Keskitä grid-solut */
        padding: 20px;
    }
    
    .episode-slide {
        width: 100%;
        max-width: 350px;
    }
}

/* Piilota nuolet mobiililla */
@media (max-width: 768px) {
    .slider-navigation {
        display: none;
    }
}

/* Piilota nuolet isolla näytöllä (yli 1200px) */
@media (min-width: 1200px) {
    .slider-navigation {
        display: none;
    }
}

/* Näytä nuolet vain tablet-koossa (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    .slider-navigation {
        display: flex;
    }
}