/* ===== AD SPACE ===== */
.ad-wrap { padding: 20px 6% 0; }
.ad-wrap .ad-container { margin: 0 auto; max-width: 100%; overflow: hidden; }

/* ===== SECTION ===== */
.section { padding: 64px 6%; }
.section.alt { background: var(--white); }
.sec-header {
    display: flex; align-items: flex-end;
    justify-content: space-between; margin-bottom: 36px;
}
.sec-label {
    font-size: .76rem; font-weight: 600;
    letter-spacing: .15em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 7px;
}
.sec-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem; font-weight: 600;
    color: var(--ink); line-height: 1.15;
}
.sec-link {
    font-size: .83rem; font-weight: 600;
    color: var(--gold); white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
    transition: gap .2s;
}
.sec-link::after { content: '→'; }
.sec-link:hover { gap: 12px; }

/* ===== SERIES GRID ===== */
.grid-series {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 22px;
}
.s-card {
    background: var(--white);
    border-radius: 12px; overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-sm);
    transition: transform .28s ease, box-shadow .28s ease;
    position: relative;
}
.s-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px var(--shadow-md);
}
.s-card:hover .s-overlay { opacity: 1; }
.s-card:hover .s-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.s-thumb {
    width: 100%; aspect-ratio: 2/3;
    object-fit: cover; display: block;
}
.s-thumb-ph {
    width: 100%; aspect-ratio: 2/3;
    background: linear-gradient(160deg, var(--cream2) 0%, var(--parchment) 100%);
    display: flex; align-items: center; justify-content: center;
}
.s-ph-cross {
    width: 38px; height: 38px; position: relative; opacity: .3;
}
.s-ph-cross::before, .s-ph-cross::after {
    content: ''; position: absolute;
    background: var(--ink2); border-radius: 3px;
}
.s-ph-cross::before { width: 7px; height: 100%; left: 50%; transform: translateX(-50%); }
.s-ph-cross::after  { width: 100%; height: 7px; top: 28%; }

.s-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(28,24,16,.72) 38%, transparent 100%);
    opacity: 0; transition: opacity .28s;
}
.s-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(.78);
    width: 50px; height: 50px;
    background: var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .28s, transform .28s;
    box-shadow: 0 4px 18px rgba(200,149,42,.45);
}
.s-play svg { width: 17px; height: 17px; fill: white; margin-left: 3px; }

.s-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 3px;
    color: white;
}
.s-badge.pop  { background: var(--gold); }
.s-badge.new  { background: var(--red-soft); }
.s-badge.feat { background: var(--blue-sky); }

.s-info { padding: 14px; }
.s-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem; font-weight: 600;
    color: var(--ink); margin-bottom: 5px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.s-meta { font-size: .8rem; color: var(--warm-gray); }

/* Skeleton */
.skeleton {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-sm);
}
.skel-img {
    width: 100%; aspect-ratio: 2/3;
    background: linear-gradient(90deg, var(--cream2) 25%, var(--parchment) 50%, var(--cream2) 75%);
    background-size: 200%;
    animation: shimmer 1.5s infinite;
}
.skel-text { padding: 14px; }
.skel-line {
    height: 12px; background: var(--cream2); border-radius: 4px; margin-bottom: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FEATURE BANNER ===== */
.feature {
    background: var(--ink);
    margin: 0 6%; border-radius: 18px;
    overflow: hidden; display: grid;
    grid-template-columns: 1fr 300px;
    min-height: 340px;
    box-shadow: 0 20px 60px var(--shadow-lg);
    position: relative;
}
.feat-body {
    padding: 52px 48px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; z-index: 2;
}
.feat-eye {
    font-size: .72rem; font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 14px;
}
.feat-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem; font-weight: 600;
    color: white; line-height: 1.12; margin-bottom: 14px;
}
.feat-stats {
    display: flex; gap: 28px; margin-bottom: 18px;
    flex-wrap: wrap;
}
.feat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem; font-weight: 600;
    color: var(--gold); display: block; line-height: 1;
}
.feat-lbl {
    font-size: .72rem; color: rgba(250,247,242,.55);
    letter-spacing: .06em; text-transform: uppercase;
}
.feat-desc {
    font-size: .9rem; color: rgba(250,247,242,.72);
    line-height: 1.7; margin-bottom: 28px; max-width: 400px;
}
.feat-img {
    position: relative; overflow: hidden;
}
.feat-img::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right, var(--ink) 0%, rgba(28,24,16,.3) 100%);
    z-index: 1; pointer-events: none;
}
.feat-img-inner {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #3D3526, #1C1810);
    display: flex; align-items: center; justify-content: center;
}
.feat-poster {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    display: block;
}
.feat-deco {
    color: rgba(200,149,42,.15);
    font-family: 'Cormorant Garamond', serif;
    font-size: 14rem; line-height: 1;
}

/* Responsive feature */
@media (max-width: 960px) {
    .feature { grid-template-columns: 1fr 200px; margin: 0 4%; min-height: 280px; }
    .feat-body { padding: 32px 28px; }
    .feat-title { font-size: 1.75rem; }
}
@media (max-width: 580px) {
    .feature { grid-template-columns: 1fr; margin: 0 3%; }
    .feat-img { display: none; }
    .feat-body { padding: 32px 24px; }
}

/* ===== ARTICLE GRID ===== */
.grid-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 26px;
}
.a-card {
    background: var(--white); border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-sm);
    transition: transform .28s, box-shadow .28s;
    cursor: pointer; display: flex; flex-direction: column;
}
.a-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px var(--shadow-md); }
.a-thumb {
    width: 100%; aspect-ratio: 16/9;
    object-fit: cover; background: var(--parchment);
}
.a-thumb-ph {
    width: 100%; aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--cream2), var(--parchment));
    display: flex; align-items: center; justify-content: center;
}
.a-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.a-tag {
    font-size: .76rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 9px;
    text-decoration: none; display: inline-block;
}
.a-tag:hover { text-decoration: underline; }
.a-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem; font-weight: 600;
    color: var(--ink); line-height: 1.35; margin-bottom: 9px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.a-excerpt {
    font-size: .84rem; color: var(--warm-gray);
    line-height: 1.65; flex: 1; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.a-footer {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid var(--cream2); padding-top: 12px;
}
.a-date { font-size: .8rem; color: var(--warm-gray); }
.a-read { font-size: .8rem; font-weight: 600; color: var(--gold-dark); }
.a-read::after { content: ' →'; }

/* ===== CATEGORY PILLS ===== */
.cat-row {
    display: flex; gap: 10px; overflow-x: auto;
    padding-bottom: 6px; scrollbar-width: none;
    margin-bottom: 28px;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-pill {
    flex-shrink: 0; padding: 8px 20px;
    border-radius: 40px; font-size: .8rem; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    background: var(--white); color: var(--ink2);
    border: 1.5px solid var(--parchment);
    transition: all .2s;
}
.cat-pill:hover, .cat-pill.on {
    background: var(--gold); border-color: var(--gold); color: white;
}

/* ===== DETAIL HERO ===== */
.det-hero {
    background: var(--ink);
    padding: 86px 6% 56px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 44px; align-items: start;
}
.det-poster {
    width: 220px; aspect-ratio: 2/3;
    border-radius: 12px; object-fit: cover;
    box-shadow: 0 20px 56px rgba(0,0,0,.5);
}
.det-poster-ph {
    width: 220px; aspect-ratio: 2/3;
    border-radius: 12px; background: rgba(255,255,255,.05);
    display: flex; align-items: center; justify-content: center;
}
.det-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem; font-weight: 600;
    color: white; line-height: 1.1; margin-bottom: 14px;
}
.det-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.det-tag {
    font-size: .75rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 12px; border-radius: 4px;
    background: rgba(200,149,42,.28); color: #E8B84B;
    border: 1px solid rgba(200,149,42,.35);
}
.det-tag.tag-fin { background: rgba(76,175,80,.18); color: #81C784; border-color: rgba(76,175,80,.35); }
.det-tag.tag-emi { background: rgba(33,150,243,.18); color: #64B5F6; border-color: rgba(33,150,243,.35); }
.det-desc {
    font-size: .95rem; line-height: 1.75;
    color: rgba(250,247,242,.80);   /* ratio ~7:1 sobre #1C1810 */
    margin-bottom: 26px; max-width: 520px;
}
.det-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== SEASON TABS ===== */
.season-tabs {
    display: flex; gap: 8px; overflow-x: auto;
    scrollbar-width: thin; scrollbar-color: var(--gold) var(--parchment);
    padding-bottom: 8px; margin-bottom: 20px;
    flex-wrap: wrap;
}
.season-tabs::-webkit-scrollbar { height: 4px; }
.season-tabs::-webkit-scrollbar-track { background: var(--parchment); border-radius: 2px; }
.season-tabs::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.season-btn {
    flex-shrink: 0;
    padding: 8px 18px; border-radius: 6px;
    font-size: .8rem; font-weight: 500;
    background: var(--white); color: var(--ink2);
    border: 1.5px solid var(--parchment);
    transition: all .2s;
}
.season-btn:hover, .season-btn.on {
    background: var(--gold); border-color: var(--gold); color: white;
}

/* ===== EPISODE LIST ===== */
.ep-list { display: flex; flex-direction: column; gap: 10px; }

.ep-row {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 6px var(--shadow-sm);
    border-left: 3px solid transparent;
    transition: all .22s;
    /* Desktop: fila horizontal */
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 0;
}
.ep-row:hover {
    box-shadow: 0 6px 22px var(--shadow-md);
    border-left-color: var(--gold);
}
.ep-row-active {
    border-left-color: var(--gold) !important;
    background: rgba(200,149,42,.05);
}

/* Imagen */
.ep-thumb {
    width: 150px; height: 84px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.ep-thumb-ph {
    width: 150px; height: 84px;
    background: var(--cream2);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    flex-shrink: 0;
}
.ep-play-ov {
    position: absolute; inset: 0;
    background: rgba(200,149,42,.12);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
}
.ep-row:hover .ep-play-ov { opacity: 1; }
.ep-play-btn {
    width: 34px; height: 34px; background: var(--gold);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.ep-play-btn svg { width: 13px; height: 13px; fill: white; margin-left: 2px; }

/* Cuerpo de texto */
.ep-body {
    padding: 10px 14px;
    min-width: 0; /* importante para que el texto no desborde */
}
.ep-num { font-size: .8rem; color: var(--warm-gray); margin-bottom: 4px; }
.ep-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem; font-weight: 600; color: var(--ink);
    margin-bottom: 4px;
    /* Evitar desborde */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ep-desc {
    font-size: .82rem; color: var(--warm-gray); line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ep-dur { font-size: .82rem; color: var(--warm-gray); white-space: nowrap; padding-right: 14px; }
.ep-viendo { color: var(--gold); font-weight: 700; font-size: .72rem; letter-spacing: .04em; }

/* ── MÓVIL: imagen arriba, texto abajo ── */
@media (max-width: 600px) {
    .ep-row {
        grid-template-columns: 1fr;  /* una sola columna */
        border-left: none;
        border-top: 3px solid transparent;
    }
    .ep-row:hover {
        border-left-color: transparent;
        border-top-color: var(--gold);
        transform: none;
    }
    .ep-row-active {
        border-left-color: transparent !important;
        border-top-color: var(--gold) !important;
    }
    .ep-thumb {
        width: 100%;
        height: 190px;
    }
    .ep-thumb-ph {
        width: 100%;
        height: 190px;
    }
    .ep-body {
        padding: 12px 14px 8px;
    }
    .ep-dur {
        padding: 0 14px 12px;
        display: block;
    }
}

/* ===== PLAYER OVERLAY ===== */
.player-ov {
    position: fixed; inset: 0; background: #000;
    z-index: 1000; display: none; flex-direction: column;
}
.player-ov.open { display: flex; }

.plyr-top {
    position: relative;
    padding: 14px 20px;
    background: rgba(0,0,0,.92); backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: space-between;
    z-index: 20;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
}
.plyr-btn {
    width: 42px; height: 42px;
    background: rgba(255,255,255,.1); backdrop-filter: blur(8px);
    border: none; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; transition: background .2s;
}
.plyr-btn:hover  { background: rgba(200,149,42,.5); }
.plyr-btn.close:hover { background: rgba(192,57,43,.7); }
.plyr-info { text-align: center; }
.plyr-serie { font-size: .8rem; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.plyr-ep    { font-size: 1rem; font-weight: 600; color: white; }

/* ===== PLAYER OVERLAY — iframe compatible móvil ===== */
.plyr-frame {
    flex: 1;
    position: relative;
    background: #000;
    -webkit-overflow-scrolling: touch; /* iOS Safari */
}
.plyr-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    /* Evita el error "complemento faltante" en Samsung Internet */
    background: #000;
}
/* En móvil: forzar orientación y tamaño correcto del player */
@media (max-width: 768px) {
    .player-ov {
        /* Asegurar que cubre todo, incluyendo la notch */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        position: fixed;
    }
    .plyr-top {
        /* Más compacto en móvil */
        padding: 10px 14px;
    }
}

.plyr-bottom {
    background: rgba(0,0,0,.88); backdrop-filter: blur(10px);
    padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,.06);
}
.plyr-nav {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.08); border: none;
    color: white; padding: 9px 18px; border-radius: 7px;
    font-size: .88rem; transition: background .2s, transform .2s;
}
.plyr-nav:hover:not(:disabled) { background: rgba(200,149,42,.35); transform: translateY(-1px); }
.plyr-nav:disabled { opacity: .3; cursor: not-allowed; }
.plyr-nav svg { width: 15px; height: 15px; }
.plyr-counter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem; color: white;
}
.plyr-counter strong { color: var(--gold); font-size: 1.4rem; }

/* Share btn */
.plyr-share {
    background: rgba(200,149,42,.2); border: none;
    color: var(--gold-light); padding: 9px 16px;
    border-radius: 7px; font-size: .85rem;
    display: flex; align-items: center; gap: 6px;
    transition: background .2s;
}
.plyr-share:hover { background: rgba(200,149,42,.4); }

/* Share modal */
.share-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7); z-index: 2000;
    display: none; align-items: center; justify-content: center;
}
.share-modal.open { display: flex; }
.share-box {
    background: var(--white); border-radius: 14px;
    padding: 28px; max-width: 480px; width: 92%;
}
.share-head {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 18px;
}
.share-head h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--ink); }
.share-close {
    background: none; border: none; font-size: 1.4rem;
    color: var(--warm-gray); line-height: 1;
}
.share-ep { text-align: center; margin-bottom: 18px; }
.share-ep p { font-size: .88rem; color: var(--warm-gray); }
.share-ep strong { font-size: 1.05rem; color: var(--ink); display: block; margin-bottom: 4px; }
.share-input-wrap { display: flex; gap: 8px; }
.share-input {
    flex: 1; background: var(--cream2);
    border: 1.5px solid var(--parchment); border-radius: 6px;
    padding: 10px 14px; font-size: .84rem; color: var(--ink);
    outline: none;
}
.share-copy {
    background: var(--gold); border: none;
    color: white; padding: 10px 16px; border-radius: 6px;
    font-size: .84rem; font-weight: 600;
}
.share-copy:hover { background: var(--gold-dark); }

/* ===== TOAST ===== */
.toast {
    position: fixed; top: 80px; right: 22px;
    background: var(--white);
    border: 1px solid var(--parchment);
    border-radius: 10px; padding: 12px 18px;
    box-shadow: 0 8px 28px var(--shadow-lg);
    z-index: 9998;
    display: flex; align-items: center; gap: 10px;
    transform: translateX(130%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    min-width: 220px;
}
.toast.show { transform: translateX(0); }
.toast-ico {
    width: 30px; height: 30px; flex-shrink: 0;
    border-radius: 50%; background: rgba(200,149,42,.1);
    color: var(--gold); font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
}
.toast-msg { font-size: .85rem; color: var(--ink2); font-weight: 500; }

/* ===== PAGE VIEWS ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== FADE-UP ===== */
.fu {
    opacity: 0; transform: translateY(20px);
    transition: opacity .55s ease, transform .55s ease;
}
.fu.vis { opacity: 1; transform: none; }

/* Stagger cards */
.grid-series .s-card,
.grid-articles .a-card {
    opacity: 0; transform: translateY(18px);
    transition: opacity .45s ease, transform .45s ease,
    box-shadow .28s ease;
}
.grid-series.loaded .s-card,
.grid-articles.loaded .a-card { opacity: 1; transform: none; }
.grid-series.loaded .s-card:nth-child(1) { transition-delay:.04s }
.grid-series.loaded .s-card:nth-child(2) { transition-delay:.08s }
.grid-series.loaded .s-card:nth-child(3) { transition-delay:.12s }
.grid-series.loaded .s-card:nth-child(4) { transition-delay:.16s }
.grid-series.loaded .s-card:nth-child(5) { transition-delay:.20s }
.grid-series.loaded .s-card:nth-child(6) { transition-delay:.24s }
.grid-series.loaded .s-card:nth-child(7) { transition-delay:.28s }
.grid-series.loaded .s-card:nth-child(8) { transition-delay:.32s }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .hamburger { display: flex; margin-left: auto; }
    .nav-search { display: none; }

    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-left { padding: 56px 6% 44px; }
    .feature { grid-template-columns: 1fr; margin: 0 4%; }
    .feat-img { display: none; }
    .feat-body { padding: 36px 28px; }
    .feat-title { font-size: 1.75rem; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
    .foot-brand { grid-column: 1 / -1; }
    .det-hero { grid-template-columns: 1fr; padding-top: 90px; }
    .det-poster { width: 160px; }
    .ep-row { grid-template-columns: 120px 1fr; }
    .ep-thumb, .ep-thumb-ph { width: 120px; height: 67px; }
    .ep-dur { display: none; }
}
@media (max-width: 580px) {
    .section { padding: 44px 5%; }
    .sec-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .grid-series { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid-articles { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; gap: 28px; }
    .feature { margin: 0 3%; }
    .hero-title { font-size: 2.3rem; }
    .det-title { font-size: 2rem; }
    .plyr-bottom { padding: 10px 14px; }
    .plyr-nav span { display: none; }
}

/* Mi Lista vacía */
.empty-state {
    text-align: center; padding: 80px 20px;
}
.empty-state-icon {
    font-size: 3.5rem; color: var(--parchment);
    margin-bottom: 18px; font-family: 'Cormorant Garamond', serif;
}
.empty-state h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem; color: var(--ink); margin-bottom: 10px;
}
.empty-state p { color: var(--warm-gray); margin-bottom: 24px; }