/*
Theme Name: FilmyFlyZ
Theme URI: https://filmyflyz.com
Author: FilmyFlyZ
Description: FilmyFly - India's largest movie database. Bollywood, South Hindi Dubbed, Hollywood Hindi movies and web series.
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Private
Text Domain: filmyflyz
*/

/* ════════════════════════════════════════════════
   GOOGLE FONTS
════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Righteous&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — DARK (DEFAULT)
════════════════════════════════════════════════ */
:root {
    --bg:         #000000;
    --surface:    #0d0d0d;
    --card:       #141414;
    --lift:       #1c1c1c;
    --edge:       #252525;
    --ghost:      #3f3f46;
    --muted:      #6b7280;
    --fog:        #d1d5db;
    --snow:       #f9fafb;
    --red:        #e11d48;
    --red-soft:   rgba(225,29,72,.12);
    --gold:       #f59e0b;
    --gold-soft:  rgba(245,158,11,.1);
    --font-d:     'Righteous', sans-serif;
    --font-b:     'Poppins', sans-serif;
    --r-sm:       8px;
    --r-md:       12px;
    --r-lg:       16px;
    --r-xl:       20px;
    --t:          150ms ease;
    color-scheme: dark;
}

/* ════════════════════════════════════════════════
   LIGHT THEME
════════════════════════════════════════════════ */
[data-theme="light"] {
    --bg:         #f8fafc;
    --surface:    #f1f5f9;
    --card:       #ffffff;
    --lift:       #f8fafc;
    --edge:       #e2e8f0;
    --ghost:      #94a3b8;
    --muted:      #64748b;
    --fog:        #334155;
    --snow:       #0f172a;
    --red:        #e11d48;
    --red-soft:   rgba(225,29,72,.08);
    --gold:       #b45309;
    --gold-soft:  rgba(180,83,9,.1);
    color-scheme: light;
}

/* ════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--bg);
    color: var(--snow);
    font-family: var(--font-b);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background .2s ease, color .2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-b); }
input, select, textarea { font-family: var(--font-b); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--edge); border-radius: 2px; }

/* ════════════════════════════════════════════════
   TYPOGRAPHY
════════════════════════════════════════════════ */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-d); line-height: 1.15; color: var(--snow); }
p { line-height: 1.75; color: var(--fog); }

/* ════════════════════════════════════════════════
   CONTAINER — consistent max-width with padding
════════════════════════════════════════════════ */
.ff-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width:540px)  { .ff-container { padding: 0 24px; } }
@media (min-width:768px)  { .ff-container { padding: 0 32px; } }
@media (min-width:1200px) { .ff-container { padding: 0 48px; } }

/* ════════════════════════════════════════════════
   HEADER — slim, never wraps
════════════════════════════════════════════════ */
.ff-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--edge);
    height: 58px;
    transition: background .2s ease, box-shadow .2s ease;
}
[data-theme="light"] .ff-header { background: rgba(248,250,252,.92); }

.ff-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 12px;
    overflow: hidden; /* prevents vertical wrap */
}

/* Logo */
.ff-logo {
    font-family: var(--font-d);
    font-size: 1.25rem;
    letter-spacing: -.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}
.ff-logo .red { color: var(--red); }
.ff-logo-badge {
    font-size: .58rem;
    font-family: var(--font-b);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--red);
    border: 1px solid rgba(225,29,72,.35);
    background: var(--red-soft);
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
}

/* Desktop nav links — single row, no wrap */
.ff-nav-links {
    display: none;
    align-items: center;
    gap: 0;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}
@media (min-width:1100px) { .ff-nav-links { display: flex; } }

.ff-nav-links a {
    font-size: .78rem;
    font-weight: 400;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 7px;
    transition: all var(--t);
    white-space: nowrap;
    flex-shrink: 0;
}
.ff-nav-links a:hover { color: var(--snow); background: rgba(255,255,255,.05); }
.ff-nav-links a.active { color: var(--snow); }
.ff-nav-links a.ff-nav-home { font-weight: 600; color: var(--snow); }
.ff-nav-links a.ff-nav-gold { color: var(--gold); }
.ff-nav-links a.ff-nav-gold:hover { background: var(--gold-soft); }

/* Nav right */
.ff-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ff-search-bar {
    display: none;
    align-items: center;
    gap: 7px;
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: .78rem;
    color: var(--ghost);
    cursor: text;
    transition: border-color var(--t);
    white-space: nowrap;
    width: 180px;
}
@media (min-width:900px) { .ff-search-bar { display: flex; } }
.ff-search-bar:hover { border-color: var(--ghost); }
.ff-search-bar svg { width:13px;height:13px;stroke:var(--muted);fill:none;stroke-width:2;flex-shrink:0; }

.ff-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 8px;
    color: var(--muted);
    flex-shrink: 0;
    transition: all var(--t);
}
.ff-icon-btn:hover { border-color: var(--red); color: var(--red); }
.ff-icon-btn svg { width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2; }

.ff-browse-btn {
    display: none;
    align-items: center;
    min-height: 36px;
    background: var(--red);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: 0 16px;
    border-radius: 50px;
    white-space: nowrap;
    transition: background var(--t);
    flex-shrink: 0;
}
@media (min-width:900px) { .ff-browse-btn { display: flex; } }
.ff-browse-btn:hover { background: #be123c; }

/* Hamburger */
.ff-ham {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    flex-shrink: 0;
}
@media (min-width:1100px) { .ff-ham { display: none; } }
.ff-ham span {
    display: block; width:18px; height:1.5px;
    background: var(--snow); border-radius:2px;
    transition: all .22s ease;
}
.ff-ham.open span:nth-child(1) { transform: rotate(45deg) translateY(6.5px); }
.ff-ham.open span:nth-child(2) { opacity: 0; }
.ff-ham.open span:nth-child(3) { transform: rotate(-45deg) translateY(-6.5px); }

/* Mobile menu */
.ff-mob-menu {
    display: none;
    background: var(--surface);
    border-top: 1px solid var(--edge);
    padding: 12px 16px 16px;
}
.ff-mob-menu.open { display: block; }
.ff-mob-menu a {
    display: block;
    font-size: .875rem;
    color: var(--fog);
    padding: 11px 8px;
    border-bottom: 1px solid rgba(37,37,37,.5);
    transition: color var(--t);
}
.ff-mob-menu a:hover { color: var(--snow); }
.ff-mob-menu a.ff-nav-gold { color: var(--gold); border-bottom: none; }

/* ════════════════════════════════════════════════
   SEARCH OVERLAY
════════════════════════════════════════════════ */
.ff-search-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.94);
    backdrop-filter: blur(14px);
    overflow-y: auto;
    padding: 80px 16px 40px;
}
.ff-search-overlay.open { display: block; }
.ff-search-overlay-inner { max-width: 860px; margin: 0 auto; }
.ff-search-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: var(--r-lg);
    padding: 5px 5px 5px 18px;
    margin-bottom: 20px;
    transition: border-color var(--t);
}
.ff-search-box:focus-within { border-color: var(--red); }
.ff-search-box svg { width:17px;height:17px;stroke:var(--muted);fill:none;stroke-width:2;flex-shrink:0; }
.ff-search-box input {
    flex: 1; background: none; border: none; outline: none;
    font-size: .95rem; color: var(--snow); padding: 8px 0;
}
.ff-search-box input::placeholder { color: var(--ghost); }
.ff-search-close {
    min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;
    background:var(--lift);border-radius:8px;color:var(--fog);font-size:1.1rem;
    flex-shrink:0;transition:background var(--t);
}
.ff-search-close:hover { background: var(--edge); }
.ff-search-hint { text-align:center;color:var(--muted);font-size:.875rem;padding:40px 0; }
#ff-search-results { min-height: 100px; }

/* ════════════════════════════════════════════════
   OTT STRIP
════════════════════════════════════════════════ */
.ff-ott-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--edge);
    padding: 10px 0;
}
.ff-ott-inner { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.ff-ott-label {
    font-size:.68rem;font-weight:600;text-transform:uppercase;
    letter-spacing:.7px;color:var(--muted);flex-shrink:0;
}
.ff-ott-badges { display:flex;flex-wrap:wrap;gap:5px; }
.ff-ott-badge {
    font-size:.68rem;font-weight:700;padding:4px 10px;
    background:var(--card);border:1px solid var(--edge);border-radius:5px;
    min-height:26px;display:inline-flex;align-items:center;
    transition:transform var(--t);text-decoration:none;
}
.ff-ott-badge:hover { transform:translateY(-1px); }

/* ════════════════════════════════════════════════
   LANGUAGE FILTER
════════════════════════════════════════════════ */
.ff-lang-filter { background:var(--bg);border-bottom:1px solid var(--edge);padding:12px 0; }
.ff-lang-pills { display:flex;flex-wrap:wrap;gap:7px; }
.ff-lang-pill {
    font-size:.75rem;font-weight:500;padding:6px 14px;
    background:var(--card);border:1px solid var(--edge);border-radius:50px;
    color:var(--fog);min-height:34px;display:inline-flex;align-items:center;gap:4px;
    transition:all var(--t);cursor:pointer;
}
.ff-lang-pill:hover,
.ff-lang-pill.active { border-color:var(--gold);background:var(--gold-soft); }
.ff-lang-pill.active { color:var(--gold); }
.ff-lang-count { font-size:.65rem;color:var(--ghost); }

/* ════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════ */
.ff-hero {
    padding-top: 58px;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.ff-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 55% at 62% 38%, rgba(225,29,72,.09) 0%, transparent 65%),
        radial-gradient(ellipse 38% 48% at 12% 72%, rgba(245,158,11,.05) 0%, transparent 58%),
        var(--bg);
}
[data-theme="light"] .ff-hero-bg {
    background: radial-gradient(ellipse 60% 55% at 62% 38%, rgba(225,29,72,.06) 0%, transparent 65%), var(--bg);
}
.ff-hero-inner { position:relative;z-index:1;width:100%;padding:60px 0 80px; }


@media (min-width:1024px) {  }


.ff-hero-stat { padding-right:24px;margin-right:24px;border-right:1px solid var(--edge); }
.ff-hero-stat:last-child { border-right:none;margin-right:0;padding-right:0; }
.ff-hero-stat-num { font-family:var(--font-d);font-size:1.5rem;color:var(--snow);line-height:1;margin-bottom:3px; }
.ff-hero-stat-label { font-size:.65rem;text-transform:uppercase;letter-spacing:.6px;color:var(--muted); }



@media (min-width:1024px) {  }

/* Poster items built by JS — override any height issues */

/* First poster spans 2 rows */

/* Other posters have fixed aspect */

/* Tall poster fills its rows naturally */







/* Poster gradient placeholders (fallback) */
.ff-poster-violet { background:linear-gradient(148deg,#180a2c 0%,#3a1060 100%); }
.ff-poster-teal   { background:linear-gradient(148deg,#04181a 0%,#0e3d3a 100%); }
.ff-poster-amber  { background:linear-gradient(148deg,#1a1000 0%,#3d2a00 100%); }
.ff-poster-navy   { background:linear-gradient(148deg,#02071a 0%,#081838 100%); }
.ff-poster-rose   { background:linear-gradient(148deg,#1a0410 0%,#3d0c22 100%); }
.ff-poster-forest { background:linear-gradient(148deg,#041408 0%,#0d301a 100%); }

/* ════════════════════════════════════════════════
   MOVIE CARDS
════════════════════════════════════════════════ */
.ff-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width:480px)  { .ff-cards-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width:640px)  { .ff-cards-grid { grid-template-columns: repeat(4,1fr); } }
@media (min-width:900px)  { .ff-cards-grid { grid-template-columns: repeat(5,1fr); } }
@media (min-width:1200px) { .ff-cards-grid { grid-template-columns: repeat(6,1fr); } }

/* Loading skeleton grid (only for skeleton — replaced by real cards) */
.ff-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    pointer-events: none;
}
@media (min-width:480px)  { .ff-skeleton-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width:640px)  { .ff-skeleton-grid { grid-template-columns: repeat(4,1fr); } }
@media (min-width:900px)  { .ff-skeleton-grid { grid-template-columns: repeat(5,1fr); } }
@media (min-width:1200px) { .ff-skeleton-grid { grid-template-columns: repeat(6,1fr); } }

/* Mobile scroll */
.ff-cards-scroll { display:flex;gap:10px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none; }
.ff-cards-scroll::-webkit-scrollbar { display:none; }
.ff-cards-scroll .ff-card { flex:0 0 132px;width:132px; }

/* Card */
.ff-card {
    background:var(--card);border:1px solid var(--edge);border-radius:var(--r-lg);
    overflow:hidden;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;cursor:pointer;
}
.ff-card:hover { transform:translateY(-4px);box-shadow:0 16px 40px rgba(0,0,0,.6);border-color:rgba(225,29,72,.18); }
.ff-card:hover .ff-card-cta { opacity:1; }
.ff-card:hover .ff-card-img img { transform:scale(1.05); }

.ff-card-poster { display:block;position:relative;aspect-ratio:2/3;overflow:hidden;background:var(--lift); }
.ff-card-img { position:absolute;inset:0;overflow:hidden; }
.ff-card-img img { width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease; }
.ff-card-img-ph { width:100%;height:100%;display:flex;align-items:center;justify-content:center; }

.ff-card-rating {
    position:absolute;top:7px;left:7px;
    display:inline-flex;align-items:center;gap:3px;
    background:rgba(0,0,0,.75);border:1px solid rgba(245,158,11,.4);border-radius:5px;
    padding:2px 6px;font-size:.68rem;font-weight:700;color:var(--gold);z-index:2;
}
.ff-card-lang {
    position:absolute;top:7px;right:7px;
    background:rgba(0,0,0,.75);border-radius:4px;padding:2px 6px;
    font-size:.6rem;font-weight:600;text-transform:uppercase;color:var(--muted);z-index:2;
}
.ff-card-cta {
    position:absolute;bottom:0;left:0;right:0;
    background:linear-gradient(to top,rgba(0,0,0,.88) 0%,transparent 100%);
    padding:28px 10px 10px;opacity:0;transition:opacity .18s ease;z-index:3;
}
.ff-card-cta span { font-size:.7rem;font-weight:600;color:var(--red); }

.ff-card-body { padding:9px 11px 12px; }
.ff-card-title {
    font-family:var(--font-d);font-size:.8rem;color:var(--snow);
    line-height:1.3;margin-bottom:4px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ff-card-meta { display:flex;align-items:center;gap:5px;font-size:.65rem;color:var(--muted); }
.ff-card-genre {
    background:var(--lift);border-radius:3px;
    padding:2px 5px;font-size:.6rem;color:var(--ghost);
}

/* Skeleton animation */
@keyframes shimmer { 0%{background-position:-600px 0} 100%{background-position:600px 0} }
.ff-skel {
    background:linear-gradient(90deg,var(--card) 25%,var(--lift) 50%,var(--card) 75%);
    background-size:600px 100%;
    animation:shimmer 1.4s infinite linear;
    border-radius:var(--r-sm);
}

/* ════════════════════════════════════════════════
   SECTIONS
════════════════════════════════════════════════ */
.ff-section { padding: 48px 0; }
.ff-section-dark    { background: var(--bg); }
.ff-section-surface { background: var(--surface); border-top:1px solid var(--edge); border-bottom:1px solid var(--edge); }

.ff-section-header { display:flex;align-items:center;justify-content:space-between;margin-bottom:18px; }
.ff-section-title {
    display:flex;align-items:center;gap:10px;
    font-family:var(--font-d);font-size:1.3rem;color:var(--snow);
}
.ff-section-title::before {
    content:'';display:block;width:4px;height:20px;
    background:var(--red);border-radius:2px;flex-shrink:0;
}
.ff-see-all {
    display:inline-flex;align-items:center;gap:4px;
    font-size:.78rem;font-weight:500;color:var(--red);transition:color var(--t);
}
.ff-see-all:hover { color:#fb7185; }
.ff-see-all svg { width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2; }

/* Tabs */
.ff-tabs { display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px; }
.ff-tab {
    font-size:.75rem;font-weight:500;padding:6px 14px;
    background:var(--card);border:1px solid var(--edge);border-radius:50px;
    color:var(--fog);min-height:32px;transition:all var(--t);
    font-family:var(--font-b);white-space:nowrap;
}
.ff-tab:hover  { border-color:var(--red);color:var(--red); }
.ff-tab.active { background:var(--red);border-color:var(--red);color:#fff; }

/* ════════════════════════════════════════════════
   TRAILERS
════════════════════════════════════════════════ */
.ff-trailers-grid {
    display:grid;gap:14px;
    grid-template-columns: repeat(auto-fill, minmax(230px,1fr));
}
.ff-trailer-card {
    background:var(--card);border:1px solid var(--edge);border-radius:var(--r-lg);
    overflow:hidden;cursor:pointer;transition:transform .2s ease,border-color .2s ease;
}
.ff-trailer-card:hover { transform:translateY(-4px);border-color:var(--red); }
.ff-trailer-thumb { aspect-ratio:16/9;position:relative;overflow:hidden;background:var(--lift); }
.ff-trailer-thumb img { width:100%;height:100%;object-fit:cover; }
.ff-trailer-play {
    position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    background:rgba(0,0,0,.35);
}
.ff-trailer-play-btn {
    width:46px;height:46px;background:rgba(225,29,72,.9);border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    transition:transform .2s ease,background .2s ease;
}
.ff-trailer-card:hover .ff-trailer-play-btn { transform:scale(1.08);background:var(--red); }
.ff-trailer-info { padding:10px 12px; }
.ff-trailer-title { font-family:var(--font-d);font-size:.82rem;color:var(--snow);margin-bottom:3px; }
.ff-trailer-meta  { font-size:.68rem;color:var(--muted); }

/* ════════════════════════════════════════════════
   WHERE TO WATCH BANNER
════════════════════════════════════════════════ */
.ff-wtw-banner { background:var(--surface);border-top:1px solid var(--edge);border-bottom:1px solid var(--edge);padding:56px 0; }
.ff-wtw-grid {
    display:grid;grid-template-columns:1fr;gap:36px;align-items:center;
}
@media (min-width:768px) { .ff-wtw-grid { grid-template-columns:1.15fr 1fr;gap:56px; } }
.ff-wtw-badge {
    display:inline-flex;align-items:center;gap:6px;
    background:var(--red-soft);border:1px solid rgba(225,29,72,.2);border-radius:50px;
    padding:4px 12px;font-size:.66rem;font-weight:700;text-transform:uppercase;
    letter-spacing:.6px;color:var(--red);margin-bottom:14px;
}
.ff-wtw-title { font-size:clamp(1.5rem,3vw,2rem);line-height:1.15;margin-bottom:14px; }
.ff-wtw-desc { font-size:.875rem;color:var(--fog);line-height:1.75;max-width:420px;margin-bottom:24px; }
.ff-wtw-actions { display:flex;flex-wrap:wrap;gap:10px; }
.ff-btn-primary {
    display:inline-flex;align-items:center;gap:7px;min-height:42px;
    background:var(--red);color:#fff;font-size:.82rem;font-weight:600;
    padding:0 22px;border-radius:10px;transition:background var(--t);
}
.ff-btn-primary:hover { background:#be123c; }
.ff-btn-primary svg { width:14px;height:14px;fill:#fff; }
.ff-btn-secondary {
    display:inline-flex;align-items:center;gap:7px;min-height:42px;
    background:transparent;color:var(--fog);font-size:.82rem;font-weight:500;
    padding:0 22px;border-radius:10px;border:1px solid var(--edge);transition:all var(--t);
}
.ff-btn-secondary:hover { border-color:var(--ghost);color:var(--snow); }
.ff-wtw-mini-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.ff-wtw-mini-card {
    background:var(--card);border:1px solid var(--edge);border-radius:var(--r-md);
    padding:12px;display:flex;gap:10px;align-items:flex-start;
    transition:border-color var(--t);text-decoration:none;
}
.ff-wtw-mini-card:hover { border-color:var(--ghost); }
.ff-wtw-mini-poster { width:36px;height:52px;border-radius:5px;overflow:hidden;background:var(--lift);flex-shrink:0; }
.ff-wtw-mini-poster img { width:100%;height:100%;object-fit:cover; }
.ff-wtw-mini-title { font-weight:600;font-size:.78rem;color:var(--snow);line-height:1.3;margin-bottom:2px; }
.ff-wtw-mini-meta  { font-size:.65rem;color:var(--muted);margin-bottom:3px; }
.ff-wtw-mini-rating{ font-size:.65rem;font-weight:700;color:var(--gold);display:inline-flex;align-items:center;gap:2px; }

/* ════════════════════════════════════════════════
   CONTENT / ARTICLE
════════════════════════════════════════════════ */
.ff-content-section { background:var(--bg);border-top:1px solid var(--edge);padding:64px 0; }
.ff-article { max-width:860px;margin:0 auto; }
.ff-article h2 {
    font-family:var(--font-d);font-size:1.4rem;color:var(--snow);
    margin:2.6rem 0 .85rem;padding-bottom:.45rem;border-bottom:1px solid var(--edge);
}
.ff-article h2:first-child { margin-top:0; }
.ff-article h3 { font-size:1rem;font-weight:600;color:var(--snow);margin:1.5rem 0 .45rem; }
.ff-article p  { font-size:.925rem;line-height:1.82;color:var(--fog);margin-bottom:1.1rem;max-width:760px; }
.ff-article ul,.ff-article ol { margin:.7rem 0 1.1rem 1.4rem; }
.ff-article ul { list-style:disc; }
.ff-article ol { list-style:decimal; }
.ff-article li { font-size:.9rem;color:var(--fog);line-height:1.75;margin-bottom:.35rem; }
.ff-article strong { color:var(--snow);font-weight:600; }
.ff-article a { color:var(--red); }
.ff-article a:hover { text-decoration:underline; }

/* Feature cards inside article */
.ff-feat-grid { display:grid;grid-template-columns:1fr;gap:12px;margin:14px 0 24px; }
@media (min-width:640px) { .ff-feat-grid { grid-template-columns:1fr 1fr; } }
.ff-feat-card {
    background:var(--card);border:1px solid var(--edge);border-radius:14px;padding:18px;
    transition:border-color var(--t);
}
.ff-feat-card:hover { border-color:var(--ghost); }
.ff-feat-card h3 { font-size:.9rem;font-weight:600;color:var(--snow);margin:0 0 7px;display:flex;align-items:center;gap:7px; }
.ff-feat-dot { width:7px;height:7px;border-radius:50%;flex-shrink:0; }
.ff-feat-card p  { font-size:.82rem;line-height:1.7;margin:0 0 8px; }
.ff-feat-card a  { font-size:.75rem;color:var(--red);display:inline-block;margin-top:2px; }
.ff-feat-card a:hover { text-decoration:underline; }

/* Quality grid */
.ff-qual-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0 20px; }
@media (min-width:540px) { .ff-qual-grid { grid-template-columns:repeat(3,1fr); } }
.ff-qual-card { background:var(--card);border:1px solid var(--edge);border-radius:10px;padding:12px; }
.ff-qual-label { font-family:var(--font-d);font-size:.78rem;color:var(--gold);margin-bottom:4px; }
.ff-qual-card p { font-size:.75rem;line-height:1.6;margin:0; }

/* Search tags */
.ff-tags { display:flex;flex-wrap:wrap;gap:5px; }
.ff-tag {
    display:inline-block;background:var(--lift);border:1px solid var(--edge);
    border-radius:5px;padding:3px 9px;font-size:.72rem;color:var(--muted);
}

/* Comparison table */
.ff-table-wrap { overflow-x:auto;border-radius:12px;border:1px solid var(--edge);margin:14px 0 24px; }
.ff-table { width:100%;border-collapse:collapse;font-size:.85rem; }
.ff-table th { background:var(--card);padding:11px 14px;text-align:left;font-weight:600;color:var(--snow);border-bottom:1px solid var(--edge); }
.ff-table td { padding:11px 14px;border-bottom:1px solid var(--lift);color:var(--fog); }
.ff-table tr:last-child td { border-bottom:none; }
.ff-yes { color:#22c55e; }
.ff-no  { color:var(--red); }

/* FAQ */
.ff-faq-list { display:flex;flex-direction:column;gap:7px;margin:14px 0 24px; }
.ff-faq-item { background:var(--card);border:1px solid var(--edge);border-radius:11px;overflow:hidden; }
.ff-faq-q {
    width:100%;display:flex;align-items:center;justify-content:space-between;
    padding:15px 18px;text-align:left;font-size:.875rem;font-weight:600;
    color:var(--snow);background:none;border:none;cursor:pointer;gap:14px;
    transition:background var(--t);
}
.ff-faq-q:hover { background:var(--lift); }
.ff-faq-icon { font-size:1.15rem;color:var(--muted);flex-shrink:0;transition:transform .28s ease,color .28s ease;line-height:1; }
.ff-faq-item.open .ff-faq-icon { transform:rotate(45deg);color:var(--red); }
.ff-faq-a { max-height:0;overflow:hidden;transition:max-height .3s ease,padding .3s ease;font-size:.85rem;color:var(--fog);line-height:1.75; }
.ff-faq-a.open { max-height:320px;padding:0 18px 15px; }

/* Explore CTA button (variation pages) */
.ff-explore-cta {
    display:inline-flex;align-items:center;gap:8px;min-height:46px;
    background:var(--red);color:#fff;font-size:.875rem;font-weight:700;
    padding:0 26px;border-radius:11px;
    transition:background var(--t),transform var(--t);margin:18px 0 28px;
}
.ff-explore-cta:hover { background:#be123c;transform:translateY(-2px); }
.ff-explore-cta svg { width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round; }

/* ════════════════════════════════════════════════
   MOVIE DETAIL PAGE
════════════════════════════════════════════════ */
.ff-movie-hero { position:relative;padding-top:58px;min-height:460px;overflow:hidden; }
.ff-movie-backdrop { position:absolute;inset:0;z-index:0; }
.ff-movie-backdrop img { width:100%;height:100%;object-fit:cover;object-position:center top;filter:brightness(.3); }
.ff-movie-backdrop-overlay { position:absolute;inset:0;background:linear-gradient(to right,rgba(0,0,0,.94) 28%,rgba(0,0,0,.5) 65%,rgba(0,0,0,.1) 100%); }
.ff-movie-backdrop-bottom { position:absolute;bottom:0;left:0;right:0;height:100px;background:linear-gradient(to top,var(--bg) 0%,transparent 100%); }
.ff-movie-hero-inner { position:relative;z-index:1;padding:44px 0 52px; }
.ff-movie-hero-grid { display:grid;grid-template-columns:170px 1fr;gap:30px;align-items:flex-start; }
@media (max-width:600px) { .ff-movie-hero-grid { grid-template-columns:1fr;text-align:center; } .ff-movie-poster-wrap{margin:0 auto;} }
.ff-movie-poster-wrap { width:170px;flex-shrink:0; }
.ff-movie-poster {
    width:100%;aspect-ratio:2/3;border-radius:13px;overflow:hidden;
    border:2px solid rgba(255,255,255,.07);box-shadow:0 18px 56px rgba(0,0,0,.6);background:var(--card);
}
.ff-movie-poster img { width:100%;height:100%;object-fit:cover; }
.ff-movie-genres { display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px; }
.ff-movie-genre-tag { font-size:.7rem;font-weight:500;color:rgba(255,255,255,.7);border:1px solid rgba(255,255,255,.15);border-radius:50px;padding:2px 10px; }
.ff-movie-title { font-size:clamp(1.5rem,4vw,2.5rem);color:#fff;line-height:1.1;letter-spacing:-.4px; }
.ff-movie-year  { font-size:clamp(1.1rem,2.5vw,1.6rem);color:rgba(255,255,255,.5);font-family:var(--font-d); }
.ff-movie-tagline { font-size:.9rem;color:rgba(255,255,255,.5);font-style:italic;margin:6px 0 14px; }
.ff-movie-meta-row { display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-bottom:18px; }
.ff-movie-score { display:flex;align-items:center;gap:7px;background:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.1);border-radius:9px;padding:7px 12px; }
.ff-movie-score-num { font-family:var(--font-d);font-size:1.3rem;line-height:1; }
.ff-movie-score-label { font-size:.62rem;color:rgba(255,255,255,.45);line-height:1.3; }
.ff-movie-pill { font-size:.75rem;color:rgba(255,255,255,.6);background:rgba(255,255,255,.08);border-radius:5px;padding:3px 9px; }
.ff-movie-overview { font-size:.9rem;color:rgba(255,255,255,.8);line-height:1.75;max-width:560px;margin-bottom:22px; }
.ff-movie-overview-label { font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:rgba(255,255,255,.4);margin-bottom:5px; }
.ff-movie-actions { display:flex;flex-wrap:wrap;gap:9px;margin-bottom:20px; }
.ff-mact {
    display:inline-flex;align-items:center;gap:7px;min-height:42px;
    font-size:.82rem;font-weight:600;padding:0 18px;border-radius:10px;transition:all var(--t);
    font-family:var(--font-b);cursor:pointer;border:none;
}
.ff-mact.primary { background:var(--red);color:#fff; }
.ff-mact.primary:hover { background:#be123c; }
.ff-mact.secondary { background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.12); }
.ff-mact.secondary:hover { background:rgba(255,255,255,.14); }
.ff-mact svg { width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2; }

.ff-movie-body { background:var(--bg);padding:44px 0; }
.ff-movie-body-grid { display:grid;grid-template-columns:1fr;gap:32px; }
@media (min-width:1024px) { .ff-movie-body-grid { grid-template-columns:1fr 270px;gap:44px; } }

/* Where to watch on detail page */
.ff-wtw-box { background:var(--card);border:1px solid var(--edge);border-radius:14px;padding:18px;margin-bottom:24px; }
.ff-wtw-box-title { font-size:.9rem;color:var(--snow);margin-bottom:12px;display:flex;align-items:center;gap:7px;font-family:var(--font-d); }
.ff-wtw-box-title svg { width:14px;height:14px;fill:var(--red); }
.ff-platform-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:7px; }
.ff-platform-btn {
    background:var(--lift);border:1px solid var(--edge);border-radius:7px;
    padding:7px 9px;text-align:center;font-size:.7rem;font-weight:700;
    transition:all var(--t);cursor:pointer;text-decoration:none;display:block;
}
.ff-platform-btn:hover { border-color:var(--ghost);transform:translateY(-1px); }
.ff-plat-sub { font-size:.6rem;font-weight:400;color:var(--muted);display:block;margin-top:1px; }

/* Cast grid */
.ff-cast-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));gap:13px;margin:14px 0; }
.ff-cast-card { text-align:center;cursor:pointer;text-decoration:none; }
.ff-cast-photo { width:70px;height:70px;border-radius:50%;overflow:hidden;margin:0 auto 7px;background:var(--lift);border:2px solid var(--edge);transition:border-color var(--t); }
.ff-cast-card:hover .ff-cast-photo { border-color:var(--red); }
.ff-cast-photo img { width:100%;height:100%;object-fit:cover; }
.ff-cast-name { font-size:.75rem;font-weight:600;color:var(--snow);line-height:1.3;margin-bottom:2px; }
.ff-cast-char { font-size:.65rem;color:var(--muted); }

/* Movie sidebar */
.ff-movie-sidebar { display:flex;flex-direction:column;gap:14px; }
.ff-sidebar-card { background:var(--card);border:1px solid var(--edge);border-radius:13px;padding:16px 18px; }
.ff-sidebar-label { font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin-bottom:12px; }
.ff-sidebar-facts { display:flex;flex-direction:column;gap:9px; }
.ff-sidebar-fact { display:flex;flex-direction:column;gap:1px; }
.ff-sidebar-fact-k { font-size:.67rem;color:var(--muted);text-transform:uppercase;letter-spacing:.3px; }
.ff-sidebar-fact-v { font-size:.84rem;color:var(--snow);font-weight:500; }
.ff-keywords { display:flex;flex-wrap:wrap;gap:5px; }
.ff-kw { font-size:.7rem;background:var(--lift);border:1px solid var(--edge);border-radius:5px;padding:3px 9px;color:var(--fog);cursor:pointer;transition:all var(--t); }
.ff-kw:hover { border-color:var(--ghost);color:var(--snow); }

/* ════════════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════════════ */
.ff-breadcrumb { display:flex;align-items:center;flex-wrap:wrap;gap:4px;font-size:.75rem;color:var(--muted);padding:10px 0; }
.ff-breadcrumb a { color:var(--muted);transition:color var(--t); }
.ff-breadcrumb a:hover { color:var(--snow); }
.ff-breadcrumb > span { color:var(--snow); }
.ff-bc-sep { width:11px;height:11px;stroke:var(--ghost);fill:none;stroke-width:2; }

/* ════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
.ff-footer { background:var(--surface);border-top:1px solid var(--edge); }
.ff-footer-main { padding:44px 0 36px; }
.ff-footer-grid { display:grid;grid-template-columns:1fr 1fr;gap:24px; }
@media (min-width:640px)  { .ff-footer-grid { grid-template-columns:1fr 1fr 1fr; } }
@media (min-width:900px)  { .ff-footer-grid { grid-template-columns:1.6fr 1fr 1fr 1fr; } }
.ff-footer-brand p { font-size:.78rem;line-height:1.7;color:var(--muted);margin:9px 0 10px;max-width:240px; }
.ff-footer-disclaimer { font-size:.65rem;color:var(--ghost); }
.ff-footer-col-title { font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--snow);margin-bottom:12px; }
.ff-footer-col ul { display:flex;flex-direction:column;gap:7px; }
.ff-footer-col a { font-size:.78rem;color:var(--muted);transition:color var(--t); }
.ff-footer-col a:hover { color:var(--snow); }
.ff-footer-bottom { border-top:1px solid var(--edge);padding:16px 0;display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center; }
@media (min-width:640px) { .ff-footer-bottom { flex-direction:row;justify-content:space-between;text-align:left; } }
.ff-footer-bottom p { font-size:.7rem;color:var(--ghost);margin:0; }

/* ════════════════════════════════════════════════
   PAGE TEMPLATE
════════════════════════════════════════════════ */
.ff-page-hero { background:linear-gradient(to bottom,var(--surface),var(--bg));border-bottom:1px solid var(--edge);padding:48px 0 40px;margin-top:58px; }

/* ════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════ */
.ff-pagination { display:flex;justify-content:center;align-items:center;gap:5px;padding:28px 0; }
.ff-page-btn { min-width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:var(--card);border:1px solid var(--edge);border-radius:7px;font-size:.82rem;color:var(--fog);transition:all var(--t);cursor:pointer; }
.ff-page-btn:hover { border-color:var(--red);color:var(--red); }
.ff-page-btn.active { background:var(--red);border-color:var(--red);color:#fff; }

/* ════════════════════════════════════════════════
   NOTICE
════════════════════════════════════════════════ */
.ff-notice { background:var(--card);border:1px solid var(--edge);border-left:3px solid var(--red);border-radius:9px;padding:14px 18px;margin:18px 0;font-size:.85rem;color:var(--fog);line-height:1.7; }

/* ════════════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════════════ */
.ff-red  { color:var(--red); }
.ff-gold { color:var(--gold); }
.ff-muted{ color:var(--muted); }
.ff-fog  { color:var(--fog); }
.ff-display { font-family:var(--font-d); }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ════════════════════════════════════════════════
   WORDPRESS ADMIN BAR
════════════════════════════════════════════════ */
.admin-bar .ff-header { top:32px; }
@media screen and (max-width:782px) { .admin-bar .ff-header { top:46px; } }

/* ════════════════════════════════════════════════
   MOBILE RESPONSIVE — CRITICAL FIXES
════════════════════════════════════════════════ */

/* Prevent ANY element from overflowing the viewport */
* { max-width: 100%; }
img, video, iframe, embed, object { max-width: 100%; }

/* Container never overflows */
.ff-container { overflow-x: hidden; }

/* Cards grid — never overflows */
.ff-cards-grid { width: 100%; }

/* Nav never wraps to second line */
.ff-nav-inner { flex-wrap: nowrap; }

/* Hide desktop nav on small screens */
@media (max-width: 1099px) {
    .ff-nav-links { display: none !important; }
    .ff-browse-btn { display: none !important; }
    .ff-search-bar { display: none !important; }
}

/* Show hamburger only on mobile */
@media (min-width: 1100px) {
    .ff-ham { display: none !important; }
}

/* Mobile: search icon visible, theme toggle visible */
@media (max-width: 1099px) {
    .ff-nav-right { gap: 6px; }
}

/* Mobile cards — 2 columns minimum */
@media (max-width: 479px) {
    .ff-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ff-card-title { font-size: .72rem; }
    .ff-card-meta  { font-size: .58rem; }
}

/* Trailers — single column on very small screens */
@media (max-width: 540px) {
    .ff-trailers-grid { grid-template-columns: 1fr; }
}

/* WTW mini grid — single column on very small screens */
@media (max-width: 480px) {
    .ff-wtw-mini-grid { grid-template-columns: 1fr; }
}

/* Hero on mobile — compact */
@media (max-width: 599px) {
    .ff-hero { min-height: 240px; }
    .ff-hero-inner { padding: 36px 0 52px; }
}

/* Footer grid — 2 cols on mobile */
@media (max-width: 639px) {
    .ff-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .ff-footer-grid { grid-template-columns: 1fr; }
}

/* Page hero — no overflow */
.ff-page-hero, [style*="background:linear-gradient"] {
    overflow: hidden;
}

/* Fix WordPress block editor outputting giant cover blocks */
.ff-article .wp-block-cover,
.ff-article .wp-block-image,
.ff-article .wp-block-video,
.ff-article .wp-block-embed,
.ff-article figure { max-width: 100% !important; width: auto !important; }

/* Remove any WordPress default black cover */
.wp-block-cover { min-height: 0 !important; height: auto !important; }

/* OTT strip — wrap nicely on mobile */
@media (max-width: 540px) {
    .ff-ott-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ff-ott-badges { gap: 4px; }
    .ff-ott-badge { font-size: .62rem; padding: 3px 8px; }
}

/* Language pills — scroll horizontally on mobile */
@media (max-width: 600px) {
    .ff-lang-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .ff-lang-pills::-webkit-scrollbar { display: none; }
    .ff-lang-pill { flex-shrink: 0; }
}

/* Section padding smaller on mobile */
@media (max-width: 600px) {
    .ff-section { padding: 32px 0; }
}

/* Tabs scroll on mobile */
@media (max-width: 600px) {
    .ff-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .ff-tabs::-webkit-scrollbar { display: none; }
    .ff-tab { flex-shrink: 0; }
}

/* ════════════════════════════════════════════════
   V5 CRITICAL FIXES
════════════════════════════════════════════════ */

/* ── GLOBAL OVERFLOW FIX ───────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Every element respects viewport width */
*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Specific elements that can overflow */
img, video, iframe, table, pre, code {
    max-width: 100%;
}

/* ── CONSISTENT LAYOUT FRAME ───────────────── */
/* ALL containers use the same max-width and padding system */
.ff-container {
    max-width: 1360px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

@media (min-width: 540px)  { .ff-container { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 768px)  { .ff-container { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 1200px) { .ff-container { padding-left: 48px; padding-right: 48px; } }

/* Article uses same max-width logic, INSIDE the container */
.ff-article {
    max-width: 100%;
    width: 100%;
}

/* ── HERO SECTION — NO OVERFLOW ON MOBILE ── */
.ff-hero {
    overflow: hidden;
    max-width: 100vw;
}

.ff-hero-inner {
    overflow: hidden;
}

.ff-hero-center {
    max-width: 680px;
    width: 100%;
}

/* Hero search bar — full width on mobile, max-width on desktop */
.ff-hero-search-wrap {
    width: 100%;
    max-width: 680px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .ff-hero-search-wrap { border-radius: 12px; }
    .ff-hero-search-input { padding: 0 14px; font-size: .85rem; }
    .ff-hero-search-btn { padding: 0 14px; font-size: .78rem; }
}

/* ── MOVIE DETAIL PAGE — TMDB STYLE FIXED HEIGHT ── */
/* The hero must NOT take the whole screen — fixed height like TMDB */
.ff-movie-hero {
    position: relative;
    padding-top: 58px;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

/* Backdrop is contained inside — does NOT overflow */
.ff-movie-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0;
    /* Height matches the hero content height — no overflow */
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.ff-movie-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: brightness(0.28);
    display: block;
}

.ff-movie-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,.95) 0%,
        rgba(0,0,0,.75) 40%,
        rgba(0,0,0,.5) 70%,
        rgba(0,0,0,.3) 100%
    );
}

.ff-movie-backdrop-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg, #000) 0%, transparent 100%);
}

/* Movie hero inner content */
.ff-movie-hero-inner {
    position: relative;
    z-index: 1;
    padding: 32px 0 40px;
    width: 100%;
}

/* Movie hero grid — TMDB style: poster left, info right */
.ff-movie-hero-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 28px;
    align-items: flex-start;
    width: 100%;
}

@media (max-width: 640px) {
    .ff-movie-hero-grid {
        grid-template-columns: 120px 1fr;
        gap: 16px;
    }
}

@media (max-width: 440px) {
    .ff-movie-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .ff-movie-poster-wrap { width: 140px; margin: 0 auto; }
    .ff-movie-genres { justify-content: center; }
    .ff-movie-meta-row { justify-content: center; }
    .ff-movie-actions { justify-content: center; }
}

.ff-movie-poster-wrap {
    width: 160px;
    flex-shrink: 0;
}

@media (max-width: 640px) { .ff-movie-poster-wrap { width: 120px; } }

/* Movie body — full width */
.ff-movie-body {
    width: 100%;
    overflow: hidden;
}

.ff-movie-body-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    width: 100%;
}

@media (min-width: 1024px) {
    .ff-movie-body-grid { grid-template-columns: 1fr 260px; gap: 40px; }
}

/* ── SECTIONS — consistent padding ─────────── */
.ff-section { padding: 44px 0; overflow: hidden; }

/* Section header never wraps badly */
.ff-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    gap: 12px;
}

/* Cards grid — consistent with container */
.ff-cards-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px)  { .ff-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .ff-cards-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 900px)  { .ff-cards-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .ff-cards-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── OTT STRIP — no overflow ────────────────── */
.ff-ott-strip { overflow: hidden; }
.ff-ott-inner { overflow: hidden; }

/* ── LANGUAGE FILTER — scroll on mobile ─────── */
.ff-lang-filter { overflow: hidden; }
.ff-lang-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 7px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.ff-lang-pills::-webkit-scrollbar { display: none; }
.ff-lang-pill { flex-shrink: 0; }

/* ── TABS — scroll on mobile ─────────────────── */
.ff-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 18px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}
.ff-tabs::-webkit-scrollbar { display: none; }
.ff-tab { flex-shrink: 0; }

/* ── CONTENT FRAME CONSISTENCY ───────────────── */
/* This is the key fix — content section uses SAME container */
.ff-content-section { overflow: hidden; }
.ff-content-section .ff-container { /* same as all other containers */ }
.ff-article { max-width: 860px; width: 100%; }

/* ── HEADER — absolutely no overflow ─────────── */
.ff-header {
    overflow: hidden;
    max-width: 100vw;
    width: 100%;
}

.ff-header .ff-container { overflow: visible; }

/* ── PAGE TEMPLATE — no overflow ─────────────── */
#ff-main { overflow-x: hidden; max-width: 100vw; }

/* ── FOOTER — no overflow ────────────────────── */
.ff-footer { overflow: hidden; }

/* ── SEARCH OVERLAY — contained ──────────────── */
.ff-search-overlay { overflow-y: auto; overflow-x: hidden; }

/* ── BREADCRUMB — no overflow ────────────────── */
.ff-breadcrumb { overflow: hidden; flex-wrap: wrap; }
.ff-breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ── CAST GRID — responsive ──────────────────── */
.ff-cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 12px;
    width: 100%;
}

/* ── WTW SECTION — responsive ────────────────── */
.ff-wtw-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}
@media (min-width: 768px) {
    .ff-wtw-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
}

.ff-wtw-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 400px) {
    .ff-wtw-mini-grid { grid-template-columns: 1fr; }
}

/* ── TRAILER CARDS — responsive ──────────────── */
.ff-trailers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    width: 100%;
}

/* ── MOVIE PAGE SPECIFIC FIXES ───────────────── */
/* Similar movies grid */
.ff-similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    width: 100%;
}

/* Platform grid */
.ff-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 7px;
    width: 100%;
}

/* ── WORDPRESS BLOCK FIXES ───────────────────── */
/* Prevent ALL WordPress blocks from causing overflow */
.wp-block-cover { display: none !important; }
.wp-block-image figure { max-width: 100% !important; }
.wp-block-embed { max-width: 100% !important; overflow: hidden; }
.entry-content .wp-block-cover { display: none !important; }

/* Light theme adjustments */
[data-theme="light"] .ff-movie-backdrop img { filter: brightness(0.4); }
[data-theme="light"] .ff-movie-backdrop-overlay {
    background: linear-gradient(to right, rgba(240,240,240,.92) 0%, rgba(240,240,240,.7) 50%, rgba(240,240,240,.3) 100%);
}
[data-theme="light"] .ff-movie-title,
[data-theme="light"] .ff-movie-year,
[data-theme="light"] .ff-movie-overview { color: #0f172a; }
[data-theme="light"] .ff-movie-genre-tag { color: #0f172a; border-color: rgba(0,0,0,.2); }
[data-theme="light"] .ff-movie-tagline { color: rgba(0,0,0,.6); }


/* ════════════════════════════════════════════════
   LIGHT THEME — MINIMAL TARGETED OVERRIDES
   Only add rules here that CSS variables cannot handle.
   DO NOT use !important. DO NOT use broad selectors.
   All color/bg changes should be done via CSS vars above.
════════════════════════════════════════════════ */

/* Header backdrop — inline style uses rgba so needs override */
[data-theme="light"] #ff-header {
    background: rgba(255,255,255,.93);
    border-bottom-color: var(--edge);
}

/* Hero section bg gradient */
[data-theme="light"] #ff-hero-bg {
    background: linear-gradient(135deg, #1a3a6e 0%, #2d5fa0 50%, #1a3460 100%);
}

/* Movie backdrop in light mode — darken it more so text stays readable */
[data-theme="light"] .ffm-backdrop-img {
    filter: brightness(0.35);
}

/* OTT strip */
[data-theme="light"] .ff-ott-strip {
    background: var(--surface);
    border-bottom-color: var(--edge);
}

/* Lang filter strip */
[data-theme="light"] .ff-lang-filter {
    background: var(--bg);
    border-bottom-color: var(--edge);
}

/* Section dark/surface backgrounds */
[data-theme="light"] .ff-section-dark    { background: var(--bg); }
[data-theme="light"] .ff-section-surface { background: var(--surface); border-color: var(--edge); }

/* Content section */
[data-theme="light"] .ff-content-section { background: var(--bg); }

/* Footer */
[data-theme="light"] .ff-footer         { background: var(--surface); }
[data-theme="light"] .ff-footer-bottom  { border-top-color: var(--edge); }

/* Where to watch banner */
[data-theme="light"] .ff-wtw-banner     { background: var(--surface); }

/* Mobile menu — inline rgba border needs override */
[data-theme="light"] #ff-mob-menu {
    background: var(--surface);
    border-top-color: var(--edge);
}

/* Search overlay */
[data-theme="light"] #ff-search-overlay {
    background: rgba(248,250,252,.96);
}

/* Trailers section bg */
[data-theme="light"] .ff-trailers-grid .ff-trailer-card {
    background: var(--card);
    border-color: var(--edge);
}

/* Card hover border in light mode */
[data-theme="light"] .ff-card:hover {
    border-color: rgba(225,29,72,.25);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ── NAV LINK HOVER — CSS only, no inline JS ── */
.ff-nav-link {
    font-size: .78rem;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 7px;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s ease, background .15s ease;
    display: inline-block;
}
.ff-nav-link:hover {
    color: var(--snow);
    background: rgba(128,128,128,.08);
}

/* Browse all button hover — CSS only */
.ff-browse-link {
    display: none;
    align-items: center;
    min-height: 35px;
    background: var(--red);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: 0 15px;
    border-radius: 50px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s ease;
    flex-shrink: 0;
}
.ff-browse-link:hover { background: #be123c; color: #fff; }

/* Search bar hover — CSS only */
.ff-search-bar:hover { border-color: var(--ghost); }

/* OTT badge hover animation — no links, just visual */
.ff-ott-badge {
    cursor: default;
    transition: transform .2s ease, opacity .2s ease;
}
.ff-ott-badge:hover {
    transform: translateY(-2px);
    opacity: .85;
}

/* ── POST NAV LINKS ── */
.ff-post-nav-link {
    background: var(--card);
    border: 1px solid var(--edge);
    border-radius: 12px;
    padding: 16px;
    display: block;
    transition: border-color .15s ease;
    text-decoration: none;
}
.ff-post-nav-link:hover { border-color: var(--ghost); }

/* ============================================================
   SEO SECTION — homepage & pages article block
============================================================ */
.ff-seo-section {
    background: var(--bg);
    border-top: 1px solid var(--edge);
    padding: 64px 0 72px;
    overflow: hidden;
}

/* Page banner */
.ff-page-banner {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--edge);
    padding: 40px 0 32px;
    overflow: hidden;
}
.ff-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: .72rem;
    color: var(--muted);
    margin-bottom: 12px;
}
.ff-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}
.ff-breadcrumb a:hover { color: var(--snow); }
.ff-page-title {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--snow);
    line-height: 1.1;
    margin-bottom: 8px;
}
.ff-page-excerpt {
    color: var(--fog);
    font-size: .9rem;
    max-width: 540px;
    line-height: 1.7;
    margin: 0;
}

/* Article — ensure block-level children never collapse */
.ff-article > * { display: block; }
.ff-article > p:empty { display: none; }

/* ── HAMBURGER & MOBILE MENU — light mode fixes ── */
/* Ensure hamburger bars are visible in light mode */
[data-theme="light"] #ff-ham span {
    background: var(--fog);
}
[data-theme="light"] #ff-ham {
    background: var(--card);
    border-color: var(--edge);
}
[data-theme="light"] #ff-ham:hover {
    border-color: var(--ghost);
}

/* Mobile menu link separator fix for light mode */
[data-theme="light"] #ff-mob-menu a {
    color: var(--fog);
    border-bottom-color: var(--edge);
}
[data-theme="light"] #ff-mob-menu a:hover {
    color: var(--snow);
    background: var(--lift);
}

/* Dark mode: ensure hamburger bars are bright */
[data-theme="dark"] #ff-ham span {
    background: var(--fog);
}

/* Mobile menu links hover feedback */
#ff-mob-menu a {
    transition: background .12s ease, color .12s ease;
    border-radius: 6px;
}
#ff-mob-menu a:hover {
    color: var(--snow);
    background: var(--lift);
}
