/**
 * eLfilms.cz - Styly pro stránku Seznam epizod seriálu
 *
 * @package    eLfilms
 * @subpackage Frontend
 * @file       css/serial-epizody.css
 * @version    4.1 - SEO Enhanced Edition
 * @datum      Březen 2026
 * @author     eLfilms Team
 * @copyright  2009-2026 eLfilms.cz
 *
 * Styly pro veřejnou stránku se seznamem epizod seriálu.
 *
 * STYLUJE:
 * - Skip to content (accessibility)
 * - Hero sekce (background image, gradient overlay)
 * - Sekce s popisem série a trailer tlačítkem
 * - Selector sérií (dropdown)
 * - Seznam epizod (flex karty)
 * - Still image epizody s episode number badge
 * - Hvězdičkové hodnocení epizod
 * - Titulky tlačítko
 * - Modal pro titulky a trailer
 * - Video kontejner (16:9 iframe)
 *
 * POUŽÍVÁ:
 * - serial-epizody.php (parent stránka)
 *
 * DESIGN:
 * - Barvy: tmavě modrá (#0d1b2a, #0b334f–#1a4f72), zlatá (#EEB500)
 * - Max šířka obsahu: 1200px
 *
 * NOTE:
 * - Responsive styly jsou v serial-epizody-responsive.css
 * - Hero background nastavuje JS z data-hero atributu
 * - .skip-to-content nahrazuje inline style v PHP
 */

/* ============================================
   RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   BODY
   ============================================ */
body {
    font-family: Arial, sans-serif;
    background-color: #0b334f;
    color: white;
    min-height: 100vh;
}

/* ============================================
   ACCESSIBILITY - SKIP TO CONTENT
   ============================================ */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    background: #EEB500;
    color: #0b334f;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}

.skip-to-content:focus {
    left: 10px;
    top: 10px;
}

/* ============================================
   HERO SEKCE
   ============================================ */
.hero-section {
    height: 30vh;
    background: linear-gradient(135deg, #5b9bd5, #8bc4d9);
    background-size: cover;
    background-position: top;
    position: relative;
    margin-top: 60px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(11, 51, 79, 0.7) 100%);
}

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

/* ============================================
   SEKCE S POPISEM SÉRIE A TRAILEREM
   ============================================ */
.season-info-section {
    background: linear-gradient(135deg, #0b334f 0%, #1a4d6f 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.season-info-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.season-description {
    flex: 1;
    color: #ffffff;
}

.season-info-title {
    font-size: 28px;
    font-weight: 700;
    color: #EEB500;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.season-info-text {
    font-size: 16px;
    line-height: 1.7;
    color: #e8f1f5;
    margin: 0;
    text-align: justify;
    text-indent: 30px;
}

.season-trailer-btn-wrapper {
    flex-shrink: 0;
}

/* ============================================
   TRAILER TLAČÍTKO
   ============================================ */
.btn-trailer {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 18px 35px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.btn-trailer:hover {
    background: rgba(238, 181, 0, 0.9);
    border-color: #EEB500;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(238, 181, 0, 0.4);
}

.btn-trailer i {
    font-size: 20px;
}

/* ============================================
   SEKCE EPIZOD
   ============================================ */
.episodes-section {
    background-color: #0b334f;
    padding: 40px 0 80px;
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.episodes-title {
    font-size: 32px;
    color: white;
}

.episodes-title a {
    color: #EEB500;
    text-decoration: none;
}

.episodes-title a:hover {
    text-decoration: underline;
}

/* ============================================
   SELECTOR SÉRIÍ
   ============================================ */
.series-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.series-selector label {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
}

.series-select {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 40px 10px 15px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.series-select option {
    background: #0b334f;
    color: white;
}

/* ============================================
   SEZNAM EPIZOD
   ============================================ */
.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ============================================
   KARTA EPIZODY
   ============================================ */
.episode-item {
    display: flex;
    gap: 25px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    align-items: stretch;
}

.episode-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(5px);
}

/* ============================================
   STILL IMAGE EPIZODY
   ============================================ */
.episode-image {
    flex: 0 0 280px;
    min-height: 160px;
    background: #1a4a6e;
    background-size: cover;
    background-position: center;
    position: relative;
}

.episode-number-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
}

/* ============================================
   OBSAH EPIZODY
   ============================================ */
.episode-content {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.episode-title {
    font-size: 20px;
    color: #EEB500;
    font-weight: bold;
}

.episode-date {
    color: rgba(255,255,255,0.8);
    font-size: 14.5px;
    font-weight: bold;
    white-space: nowrap;
}

/* ============================================
   HODNOCENÍ HVĚZDIČKAMI
   ============================================ */
.episode-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.episode-rating .star {
    font-size: 20px;
    color: rgba(255,255,255,0.4);
    opacity: 0.6;
    transition: color 0.2s, opacity 0.2s;
}

.episode-rating .star.filled {
    color: #EEB500;
    opacity: 1;
}

.episode-rating .star.empty {
    color: rgba(255,255,255,0.3);
    opacity: 0.5;
}

.episode-rating .star.interactive {
    cursor: pointer;
    font-size: 22px;
}

.episode-rating .star.interactive:hover {
    color: #EEB500;
    opacity: 1;
}

.episode-rating .rating-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-right: 4px;
}

.episode-rating .rating-value {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-left: 6px;
}

.episode-rating .rating-thanks {
    font-size: 13px;
    color: #27ae60;
    margin-left: 6px;
}

/* ============================================
   POPIS EPIZODY
   ============================================ */
.episode-description {
    color: rgba(255,255,255,0.85);
    font-size: 16.5px;
    line-height: 1.6;
    text-align: justify;
    text-indent: 30px;
    overflow: hidden;
}

/* ============================================
   TITULKY
   ============================================ */
.episode-subtitles {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px 25px;
    min-width: 120px;
}

.btn-episode-subtitles {
    display: inline-block;
    box-sizing: border-box;
    background: linear-gradient(45deg, #EEB500, #ffd700);
    color: #0b334f;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    line-height: normal;
}

.btn-episode-subtitles:not(.no-subtitles):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 181, 0, 0.4);
}

.btn-episode-subtitles.no-subtitles {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    padding: 10px 20px;
}

.download-count {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    margin-top: 8px;
}

/* ============================================
   ŽÁDNÉ EPIZODY
   ============================================ */
.no-episodes {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.6);
}

.no-episodes h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

/* ============================================
   ZPĚT NA SERIÁL
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #EEB500;
    text-decoration: none;
    margin-bottom: 30px;
    font-size: 15px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ============================================
   MODAL (titulky + trailer)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: flex-start;
}

.modal[style*="block"] {
    display: flex !important;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 95%;
    max-width: 700px;
    background: #0b334f;
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #EEB500;
}

.modal-title {
    color: #EEB500;
    font-size: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.modal-episode-info {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================
   TITULKY V MODALU
   ============================================ */
.subtitle-item-download {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.subtitle-item-download:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(238, 181, 0, 0.3);
}

.subtitle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitle-flag {
    font-size: 24px;
}

.subtitle-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.subtitle-lang {
    color: #EEB500;
    font-weight: bold;
    font-size: 15px;
}

.subtitle-meta {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.btn-download {
    background: linear-gradient(45deg, #EEB500, #ffd700);
    color: #0b334f;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(238, 181, 0, 0.4);
}

.no-subtitles {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.5);
}

.no-subtitles-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.loading-subtitles {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.7);
}

/* ============================================
   VIDEO MODAL (trailer)
   ============================================ */
.video-title {
    color: #EEB500;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

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