/* ============================================================
   contenido.css — Content show page (Netflix-style) + index
   ============================================================ */

/* ── Netflix Hero ─────────────────────────────────────────── */
.nf-hero {
    position: relative;
    min-height: 90vh;
    background-color: #000;
    background-image: var(--backdrop);
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: flex-end;
}

/* Left-to-right dark vignette (Netflix signature) */
.nf-hero-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,.85) 0%,
        rgba(0,0,0,.5)  40%,
        rgba(0,0,0,.15) 70%,
        transparent     100%
    );
}

/* Bottom fade merges hero into page body */
.nf-hero-bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35%;
    background: linear-gradient(to top, #000 0%, transparent 100%);
}

/* Hero content: sits at the bottom-left */
.nf-hero-content {
    position: relative;
    z-index: 2;
    padding-top: 6rem;   /* navbar clearance */
    padding-bottom: 4rem;
    max-width: 680px;
}

/* Meta row: badge · year · rating · genres */
.nf-hero-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.nf-badge {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: var(--red);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
}
.nf-meta-dot {
    color: rgba(255,255,255,.7);
    font-size: .85rem;
}
.nf-meta-genre {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
}

/* Title */
.nf-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin: 0 0 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.6);
}

/* Short overview in hero */
.nf-overview {
    color: rgba(255,255,255,.8);
    font-size: .95rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 560px;
}

/* Action buttons */
.nf-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.nf-btn-play {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: #000;
    font-weight: 700;
    font-size: .95rem;
    padding: .65rem 1.75rem;
    border-radius: .4rem;
    border: none;
    cursor: pointer;
    transition: background .15s;
}
.nf-btn-play:hover { background: rgba(255,255,255,.8); }
.nf-btn-more {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    padding: .65rem 1.75rem;
    border-radius: .4rem;
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    transition: background .15s;
}
.nf-btn-more:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ── Body ─────────────────────────────────────────────────── */
.nf-body {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

/* ── Sections ─────────────────────────────────────────────── */
.nf-section {
    margin-bottom: 3.5rem;
}
.nf-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Trailer ──────────────────────────────────────────────── */
.nf-trailer {
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(0,0,0,.7);
    max-width: 860px;
    margin: 0 auto;
}

/* ── Details row: poster + info ───────────────────────────── */
.nf-details-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.nf-poster-wrap { flex-shrink: 0; }
.nf-poster {
    width: 200px;
    border-radius: .75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
    display: block;
}
.nf-info-wrap { width: 100%; }
.nf-full-overview {
    color: rgba(255,255,255,.7);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: .95rem;
}
.nf-dl { align-items: center; }
.nf-dl-row { justify-content: center; }

/* Definition list */
.nf-dl { display: flex; flex-direction: column; gap: .6rem; }
.nf-dl-row { display: flex; gap: .75rem; font-size: .9rem; }
.nf-dl-row dt { color: var(--text-muted); width: 90px; flex-shrink: 0; font-weight: 500; }
.nf-dl-row dd { color: rgba(255,255,255,.85); margin: 0; }

@media (max-width: 600px) {
    .nf-details-row { flex-direction: column; }
    .nf-poster { width: 140px; }
    .nf-hero { min-height: 70vh; }
    .nf-hero-vignette {
        background: linear-gradient(to bottom, rgba(0,0,0,.4) 0%, rgba(0,0,0,.85) 100%);
    }
}

/* ── Cast Grid ────────────────────────────────────────────── */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
}
.cast-card { text-align: center; }
.cast-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.cast-card .cast-name {
    font-size: .75rem;
    color: rgba(255,255,255,.7);
    margin-top: .35rem;
    line-height: 1.2;
}

/* ── CTA Card ─────────────────────────────────────────────── */
.content-cta-card {
    position: relative;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0;
    overflow: hidden;
    background-color: #111;
    background-image: var(--cta-bg);
    background-size: cover;
    background-position: center 30%;
    isolation: isolate;
}
.content-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.62);
    z-index: 0;
}
.content-cta-card > * { position: relative; z-index: 1; }
.content-cta-card h3 { color: #fff; font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.content-cta-card p  { color: rgba(255,255,255,.85); margin-bottom: 1.25rem; }

/* Plan box inside CTA */
.cta-plan-box {
    display: inline-block;
    background: rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: .75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    min-width: 220px;
}
.cta-plan-name { color: rgba(255,255,255,.7); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.cta-plan-price { display: flex; align-items: baseline; gap: .45rem; justify-content: center; flex-wrap: wrap; }
.cta-plan-original { color: rgba(255,255,255,.45); text-decoration: line-through; font-size: .95rem; }
.cta-plan-current { color: var(--red); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.cta-plan-period { color: rgba(255,255,255,.55); font-size: .8rem; }
.cta-ver-todos { display: block; color: rgba(255,255,255,.55); font-size: .8rem; text-decoration: underline; margin-top: .5rem; }
.cta-ver-todos:hover { color: #fff; }

/* Device icons row */
.cta-devices {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}
.cta-devices-label { color: rgba(255,255,255,.45); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.cta-devices-icons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.cta-devices-icons > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    color: rgba(255,255,255,.55);
    font-size: .65rem;
    line-height: 1;
    transition: color .2s;
}
.cta-devices-icons > span:hover { color: #fff; }
.cta-devices-icons i  { font-size: 1.4rem; }
.cta-devices-icons svg { opacity: .6; }

/* ── Search / Index styles ────────────────────────────────── */
.search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 0 auto 2rem;
    z-index: 100;
}
#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: .5rem;
    z-index: 200;
    max-height: 420px;
    overflow-y: auto;
}
.search-results-list { list-style: none; margin: 0; padding: .25rem 0; }
.search-results-list li a,
.search-results-list li .search-result-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: background .15s;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}
.search-results-list li a:hover,
.search-results-list li .search-result-item:hover { background: rgba(255,255,255,.07); }
.search-result-title  { flex: 1; font-size: .9rem; }
.search-result-badge  {
    font-size: .7rem;
    padding: 2px 6px;
    background: var(--red);
    color: #fff;
    border-radius: 3px;
    white-space: nowrap;
}
.contenido-search-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: 2rem;
    padding: .65rem 1.25rem;
    font-size: .95rem;
    width: 100%;
    transition: border-color .2s;
}
.contenido-search-input:focus {
    outline: none;
    border-color: var(--red);
    background: var(--bg-card);
    color: #fff;
}
.contenido-search-input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   CONTENT INDEX — Netflix-style layout
   ═══════════════════════════════════════════════════════════ */

/* ── Index Hero ────────────────────────────────────────── */
.nf-index-hero {
    position: relative;
    height: 82vh;
    min-height: 520px;
    background-color: #111;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center 20%;
    display: flex;
    align-items: flex-end;
}
.nf-index-hero-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,.92) 0%,
        rgba(0,0,0,.6)  40%,
        rgba(0,0,0,.15) 75%,
        transparent     100%
    );
}
.nf-index-hero-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, #000 0%, transparent 100%);
}
.nf-index-hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 3.5rem;
    max-width: 620px;
}
.nf-index-hero-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}
.nf-index-rating {
    color: #eab308;
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.nf-index-rating .bi { font-size: .75rem; }
.nf-index-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin: 0 0 .9rem;
    text-shadow: 0 2px 24px rgba(0,0,0,.7);
}
.nf-index-hero-overview {
    color: rgba(255,255,255,.75);
    font-size: .95rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 520px;
}

/* ── Search ────────────────────────────────────────────── */
.nf-search-wrap {
    background: linear-gradient(to bottom, #000 0%, transparent 100%);
    padding: 1.5rem 0 .5rem;
    position: relative;
    z-index: 100;
}
.search-wrapper { position: relative; z-index: 100; }
.nf-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
}
.nf-search-input { padding-left: 2.75rem !important; }

/* ── Rows wrapper ──────────────────────────────────────── */
.nf-rows-wrap {
    padding: 1rem 0 5rem;
    background: #000;
}

/* ── Row section ───────────────────────────────────────── */
.nf-row-section {
    margin-bottom: 2.5rem;
    padding: 0 2rem;
}
.nf-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
}
.nf-row-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Row scroll container ──────────────────────────────── */
.nf-row-outer {
    position: relative;
}
.nf-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.nf-row::-webkit-scrollbar { display: none; }

/* ── Arrow buttons ─────────────────────────────────────── */
.nf-row-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(0,0,0,.75);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    opacity: 0;
    backdrop-filter: blur(4px);
}
.nf-row-outer:hover .nf-row-arrow { opacity: 1; }
.nf-row-arrow:hover { background: rgba(0,0,0,.95); }
.nf-row-arrow-left  { left: -20px; }
.nf-row-arrow-right { right: -20px; }

/* ── Card ──────────────────────────────────────────────── */
.nf-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: block;
    width: 160px;
    border-radius: .5rem;
    overflow: hidden;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
    position: relative;
}
.nf-card:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0,0,0,.8);
    z-index: 10;
}
.nf-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #1a1a1a;
    overflow: hidden;
}
.nf-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}
.nf-card:hover .nf-card-img-wrap img { transform: scale(1.05); }

/* Hover overlay */
.nf-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .25s;
    display: flex;
    align-items: flex-end;
}
.nf-card:hover .nf-card-overlay { opacity: 1; }
.nf-card-info {
    padding: .65rem .6rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    width: 100%;
}
.nf-card-rating {
    color: #eab308;
    font-size: .7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .2rem;
}
.nf-card-badge {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: var(--red);
    color: #fff;
    padding: 1px 5px;
    border-radius: 2px;
    align-self: flex-start;
}
.nf-card-title {
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nf-card-year {
    color: rgba(255,255,255,.5);
    font-size: .68rem;
}

/* ── Season select ─────────────────────────────────────── */
.nf-season-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: .4rem;
    padding: .4rem .9rem;
    font-size: .9rem;
    cursor: pointer;
}
.nf-season-select:focus { outline: none; border-color: var(--red); }

/* ── Episodes grid ──────────────────────────────────────── */
.nf-episodes-grid { display: flex; flex-direction: column; gap: 1rem; }
.nf-episodes-loading { color: var(--text-muted); padding: 1.5rem 0; }
.nf-ep-card {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: .5rem;
    overflow: hidden;
    transition: border-color .2s;
}
.nf-ep-card:hover { border-color: var(--red); }
.nf-ep-still {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 16/9;
    background: #111;
    overflow: hidden;
}
.nf-ep-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-ep-no-still {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.5rem;
}
.nf-ep-info { padding: .75rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.nf-ep-num  { font-size: .75rem; color: var(--red); font-weight: 600; }
.nf-ep-title { font-size: .95rem; font-weight: 700; color: #fff; }
.nf-ep-overview { font-size: .82rem; color: var(--text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 576px) {
    .nf-ep-still { width: 110px; }
    .nf-ep-overview { -webkit-line-clamp: 2; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .nf-index-hero { height: 65vh; }
    .nf-index-hero-vignette {
        background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.9) 100%);
    }
    .nf-row-section { padding: 0 1rem; }
    .nf-card { width: 120px; }
    .nf-row-arrow { display: none; }
}
@media (min-width: 1400px) {
    .nf-card { width: 185px; }
}

/* ── Blog inline images (AI-injected TMDB backdrops) ─────── */
.blog-img {
    margin: 1.75rem 0;
    border-radius: .6rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.blog-img img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}
@media (max-width: 576px) {
    .blog-img { margin: 1.25rem 0; border-radius: .4rem; }
}

/* ── Sticky CTA bar (Phase 22 Conversion Audit) ───────────────── */
.nf-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.75rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.nf-sticky-cta.visible {
    transform: translateY(0);
}

/* ── Inline mid-page CTA block (Phase 22 Conversion Audit) ────── */
.nf-inline-cta {
    margin: 2.5rem 0;
    border-radius: 12px;
    border: 1px solid rgba(82,49,115,0.3);
    background: linear-gradient(135deg, rgba(82,49,115,0.08) 0%, rgba(10,10,10,0.6) 100%);
    padding: 0;
    overflow: hidden;
}
.nf-inline-cta-inner {
    padding: 1.75rem 2rem;
}
.nf-inline-cta-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    margin-bottom: 0.6rem;
}
.nf-inline-cta p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
@media (max-width: 575.98px) {
    .nf-sticky-cta .btn-nav-cta { font-size: 0.85rem; padding: 0.5rem 1rem; }
    .nf-inline-cta-inner { padding: 1.25rem 1.25rem; }
}
