/*
Theme Name: FilmPlotHub IMDb Clone
Theme URI: https://example.com/
Author: FilmPlotHub
Description: Dark, IMDb-like catalog theme for Movies, TV Series, and Actors. Uses API-fed image URLs stored as post meta; no ratings.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: filmplothub-imdb
*/

/* ===== Roboto (IMDb-ish) ===== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

:root{
  --bg:#0b0d10;
  --panel:#11151b;
  --panel2:#0f1318;
  --text:#e9eef5;
  --muted:#aab4c3;
  --line:rgba(255,255,255,.08);
  --accent:#f5c518; /* IMDb-ish yellow */
  --chip:#1a2029;
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --radius:16px;

  --fph-font: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

/* ===== Global typography (set ONCE) ===== */
body{
  background:var(--bg);
  color:var(--text);
  font-family: var(--fph-font);
  font-size:16px;
  line-height:1.65;
  letter-spacing:-0.005em;
}

a{color:inherit;text-decoration:none}
a:hover{opacity:.95}

/* IMPORTANT:
   Global paragraph max-width causes your “text not reaching container”.
   Remove it globally; control width per section instead. */
p{
  margin:0 0 1rem 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6{
  font-family: var(--fph-font);
  letter-spacing:-0.02em;
  margin:0 0 .6rem 0;
}

.container{max-width:1200px;margin:0 auto;padding:0 18px}

/* ===== Header ===== */
.site-header{
  position:sticky;top:0;z-index:50;
  background:linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.55));
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header-inner{display:flex;align-items:center;gap:14px;padding:14px 0}
.brand{
  display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.2px;
}
.brand-badge{
  width:34px;height:34px;border-radius:10px;
  background:var(--accent); color:#000;
  display:grid;place-items:center;font-weight:900;
}
.nav{display:flex;gap:12px;margin-left:14px;align-items:center}
.nav a{padding:8px 10px;border-radius:999px;color:var(--muted)}
.nav a:hover{background:rgba(255,255,255,.06);color:var(--text)}
.nav .current-menu-item a{background:rgba(245,197,24,.14);color:var(--text);border:1px solid rgba(245,197,24,.35)}

.search-wrap{margin-left:auto;display:flex;align-items:center;gap:10px;min-width:320px}
.search-wrap form{flex:1}
.search-wrap input[type="search"]{
  width:100%;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  outline:none;
}
.search-wrap input[type="search"]::placeholder{color:rgba(255,255,255,.45)}

/* ===== Hero (home) ===== */
.hero{
  border-bottom:1px solid var(--line);
  padding:18px 0 22px;
}
.hero-card{
  position:relative;
  overflow:hidden;
  border-radius:calc(var(--radius) + 6px);
  background:linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.60) 52%, rgba(0,0,0,.15) 100%);
  min-height:360px;
  box-shadow:var(--shadow);
}
.hero-bg{
  position:absolute; inset:0;
  background-size:cover;
  background-position:center;
  filter:saturate(1.05) contrast(1.05);
  transform:scale(1.03);
}
.hero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.60) 55%, rgba(0,0,0,.10));
}
.hero-content{position:relative; z-index:2; padding:34px; max-width:760px}

.kicker{display:flex;gap:10px;align-items:center;color:var(--muted);font-weight:600}
.chip{
  background:rgba(245,197,24,.14);
  color:var(--text);
  border:1px solid rgba(245,197,24,.35);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
}

.hero h1{
  margin:10px 0 10px;
  font-size:54px;
  line-height:1.02;
  letter-spacing:-.5px
}
.hero p{
  margin:0;
  color:rgba(233,238,245,.85);
  font-size:16px;
  line-height:1.55;
  max-width:85ch; /* readable hero width */
}

.hero-actions{margin-top:18px;display:flex;gap:10px;flex-wrap:wrap}
.btn{
  display:inline-flex;align-items:center;gap:10px;
  padding:10px 14px;border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  font-family: var(--fph-font);
  font-weight:500;
  letter-spacing:-0.01em;
}
.btn:hover{background:rgba(255,255,255,.11)}
.btn-primary{background:rgba(245,197,24,.95);color:#000;border-color:rgba(245,197,24,.95)}
.btn-primary:hover{background:rgba(245,197,24,.85)}

/* ===== Sections / Cards ===== */
.section{padding:22px 0 6px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.section-title{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:800}
.section-title:before{content:"";width:4px;height:18px;border-radius:999px;background:var(--accent);display:inline-block}
.section-head a{color:var(--muted);font-size:13px}
.section-head a:hover{color:var(--text)}

.row{
  display:flex;
  gap:14px;
  overflow:auto;
  padding-bottom:10px;
  scroll-snap-type:x mandatory;
}
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  min-width:180px;
  scroll-snap-align:start;
  box-shadow: 0 10px 25px rgba(0,0,0,.28);
}
.poster{aspect-ratio:2/3;background:#0a0c0f;position:relative;overflow:hidden}
.poster img{width:100%;height:100%;object-fit:cover;display:block}
.poster .fallback{width:100%;height:100%;display:grid;place-items:center;color:rgba(255,255,255,.35);font-weight:800}
.card-body{padding:10px 10px 12px}
.card-title{font-weight:800;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-meta{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.35}

/* ===== Stats ===== */
.stats{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:16px;
  padding:18px 0 26px;
  border-top:1px solid var(--line);
}
.stat{
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  text-align:center;
}
.stat .num{font-size:34px;font-weight:900;color:var(--accent);letter-spacing:-.5px}
.stat .label{margin-top:6px;color:var(--muted);font-weight:700;font-size:12px;letter-spacing:.2px;text-transform:uppercase}

/* ===== Browse grid ===== */
.grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap:14px;
}

/* ===== Single (movie / tv) ===== */
.single-hero{
  margin:18px 0 10px;
  border-radius:20px;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--panel2);
}
.single-top{
  position:relative;
  min-height:320px;
}
.single-top .bg{
  position:absolute;inset:0;
  background-size:cover;
  background-position:center;
  filter:saturate(1.05) contrast(1.05);
}
.single-top .shade{
  position:absolute;inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.50) 60%, rgba(0,0,0,.10));
}
.single-top .inner{
  position:relative;
  z-index:2;
  display:flex;
  gap:18px;
  padding:20px;
  align-items:flex-end;
}

/* FIX: lock poster size so it never becomes massive */
.single-top .pimg{
  width:180px;
  max-width:180px;
  min-width:180px;
  aspect-ratio:2/3;
  flex-shrink:0;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:#0a0c0f;
}
.single-top .pimg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.single-top h1{
  margin:0;
  font-size:40px;
  line-height:1.05
}
.single-top .meta{
  margin-top:8px;
  color:rgba(233,238,245,.78);
  display:flex;
  gap:10px;
  flex-wrap:wrap
}

/* ===== Content text (THIS is where your paragraph spacing + width is fixed) ===== */
.content-card{
  padding:18px 20px 22px;
}

/* Bigger h2 like your live site */
.content-card h2{
  font-size:32px;
  font-weight:800;
  line-height:1.2;
  margin:3rem 0 1.25rem;
  letter-spacing:-0.02em;
}

/* Make paragraphs full width of container + add spacing */
.content-card p{
  margin:0 0 1.4rem;
  max-width:100%;
  font-size:17px;
  line-height:1.75;
  color:rgba(233,238,245,.90);
}

/* Lead paragraph (slightly bigger) */
.content-card p:first-of-type{
  font-size:18px;
  line-height:1.8;
  font-weight:500;
}

/* ===== Footer ===== */
.site-footer{
  padding:26px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px
}

/* ===== Responsive ===== */
@media (max-width: 1100px){
  .grid{grid-template-columns: repeat(4, minmax(0,1fr))}
  .hero h1{font-size:44px}
}

@media (max-width: 720px){
  .grid{grid-template-columns: repeat(2, minmax(0,1fr))}
  .search-wrap{min-width:0}
  .hero-content{padding:22px}
  .hero h1{font-size:36px}

  /* Smaller poster on mobile */
  .single-top .pimg{
    width:120px;
    max-width:120px;
    min-width:120px;
  }

  /* h2 slightly smaller on mobile */
  .content-card h2{
    font-size:26px;
    margin:2.2rem 0 1rem;
  }
}

.poster { position: relative; }
.poster-label{
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ================================
   IMDb-ish SINGLE PAGE (NEW)
   ================================ */

.imdb-single { margin-top: 6px; }

.imdb-hero{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel2);
  box-shadow: var(--shadow);
}

.imdb-hero-bg{
  position:absolute; inset:0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.03);
}

.imdb-hero-shade{
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.90), rgba(0,0,0,.62) 55%, rgba(0,0,0,.20));
}

.imdb-hero-inner{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 22px;
  align-items: end;
}

/* Poster locked */
.imdb-poster{
  width: 180px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: #0a0c0f;
  box-shadow: 0 14px 30px rgba(0,0,0,.45);
}
.imdb-poster img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.imdb-poster-fallback{
  width:100%;height:100%;
  display:grid;place-items:center;
  color: rgba(255,255,255,.35);
  font-weight: 800;
}

.imdb-titleblock { max-width: 860px; }

.imdb-kicker{
  display:flex;flex-wrap:wrap;align-items:center;
  gap: 8px;
  color: rgba(233,238,245,.78);
  font-weight: 600;
}
.imdb-dot{ opacity:.65; margin: 0 2px; }
.imdb-genre{ color: rgba(233,238,245,.78); }

.imdb-title-row{
  display:flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
}
.imdb-title{
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.imdb-year{
  font-size: 18px;
  color: rgba(233,238,245,.72);
  font-weight: 700;
}

.imdb-meta-row{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 8px;
  color: rgba(233,238,245,.70);
}
.imdb-meta-sep{ opacity: .6; }
.imdb-meta-link{ color: rgba(245,197,24,.9); }
.imdb-meta-link:hover{ opacity: .9; text-decoration: underline; }

.imdb-tagline{
  margin-top: 12px;
  margin-bottom: 0;
  color: rgba(233,238,245,.86);
  max-width: 70ch;
  line-height: 1.55;
}

.imdb-actions{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.imdb-body{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
}

.imdb-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px 22px;
}
.imdb-card-tight{ padding: 16px 18px; }

.imdb-h2{
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Gutenberg content spacing (BIG FIX) */
.imdb-content p{
  margin: 0 0 1.1rem;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(233,238,245,.90);
}
.imdb-content p:last-child{ margin-bottom: 0; }

/* Also handle WP block spacing */
.imdb-content > *{
  max-width: 100%;
}
.imdb-content h2, .imdb-content h3{
  margin: 1.6rem 0 .8rem;
}

/* Details list */
.imdb-dl{ margin: 0; }
.imdb-dl-row{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.imdb-dl-row:first-child{ border-top: 0; padding-top: 0; }
.imdb-dl dt{
  margin:0;
  color: rgba(170,180,195,.85);
  font-weight: 700;
}
.imdb-dl dd{
  margin:0;
  color: rgba(233,238,245,.90);
}

/* Responsive */
@media (max-width: 980px){
  .imdb-body{ grid-template-columns: 1fr; }
  .imdb-hero-inner{ grid-template-columns: 160px 1fr; }
  .imdb-poster{ width: 160px; }
  .imdb-title{ font-size: 36px; }
}
@media (max-width: 640px){
  .imdb-hero-inner{ grid-template-columns: 1fr; align-items: start; }
  .imdb-poster{ width: 160px; }
}

/* IMDb-style layout for single pages */

.imdb-body{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:24px;
  margin-top:20px;
}

.imdb-side .content-card{
  background: var(--panel);
  border-radius: 18px;
  border:1px solid var(--line);
}

.imdb-dl{
  margin:0;
}

.imdb-dl-row{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px solid var(--line);
}

.imdb-dl-row:last-child{
  border-bottom:none;
}

.imdb-dl-row dt{
  color:var(--muted);
  font-weight:600;
}

.imdb-dl-row dd{
  margin:0;
  font-weight:700;
}

/* Mobile */
@media (max-width: 900px){
  .imdb-body{
    grid-template-columns: 1fr;
  }
}
