:root {
  --ink: #0f0d0b;
  --bg: #14110d;
  --panel: #1d1914;
  --panel-2: #26201a;
  --line: #3a3128;
  --sand: #ece0c8;
  --muted: #a89a82;
  --gold: #c9a24a;
  --gold-soft: #e0c57f;
  --radius: 10px;
  /* One font for everything: Tajawal (free, Google Fonts) — close to the itfGhroob look on karbala-tv.iq */
  --serif: "Tajawal", "Segoe UI", Tahoma, sans-serif;   /* headings */
  --sans: "Tajawal", "Segoe UI", Tahoma, sans-serif;    /* body text */
  --arabic: "Tajawal", "Segoe UI", Tahoma, sans-serif;  /* Arabic lines */
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-opacity='.09' stroke-width='1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Cpath d='M0 28h8M48 28h8M28 0v8M28 48v8'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--sand);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--serif); font-weight: 800; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 17, 13, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  background: url("favicon.svg") center / contain no-repeat;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; letter-spacing: .02em; }
.brand-ar { font-family: var(--arabic); color: var(--gold); font-size: .95rem; text-align: left; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .15s; }
.nav a:hover { color: var(--sand); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 70% 90% at 85% 10%, rgba(155, 47, 47, .22), transparent 60%),
    radial-gradient(ellipse 60% 80% at 10% 100%, rgba(47, 93, 138, .18), transparent 60%),
    var(--star), var(--ink);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center;
  padding: 88px 0 96px;
}
.eyebrow {
  display: block; margin: 0 0 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); letter-spacing: -.01em; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 34ch; margin: 22px 0 32px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--gold); color: var(--ink); font-weight: 600; text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--gold-soft); transform: translateY(-1px); }

.featured {
  display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  transition: transform .2s, border-color .2s;
}
.featured:hover { transform: translateY(-3px); border-color: var(--gold); }
.featured-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 18px 22px 22px; }
.featured-body .eyebrow { width: 100%; margin: 0; }
.featured-title { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.15; }

/* ---------- Thumbnails ---------- */
.thumb {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2);
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; pointer-events: none; }
.card:hover .thumb img, .featured:hover .thumb img,
.card:hover .thumb video, .featured:hover .thumb video { transform: scale(1.04); }
.poster, .player.player-soon {
  background:
    var(--star),
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--cat) 55%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--cat) 30%, var(--ink)), var(--ink));
}
.poster-ar {
  font-family: var(--arabic); font-weight: 700; color: rgba(236, 224, 200, .85);
  font-size: clamp(1.8rem, 4vw, 2.6rem); text-shadow: 0 2px 20px rgba(0, 0, 0, .5);
}
.thumb-big .poster-ar { font-size: clamp(2.6rem, 6vw, 4rem); }
.play {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(15, 13, 11, .7); border: 1px solid rgba(236, 224, 200, .35);
  transition: background .2s, transform .2s;
}
.play::after {
  content: ""; position: absolute; left: 23px; top: 18px;
  border-left: 17px solid var(--sand); border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.card:hover .play, .featured:hover .play { background: var(--gold); transform: scale(1.06); }
.card:hover .play::after, .featured:hover .play::after { border-left-color: var(--ink); }
.badge {
  position: absolute; right: 10px; bottom: 10px;
  padding: 2px 8px; border-radius: 4px; background: rgba(15, 13, 11, .85);
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.badge-soon { color: var(--gold); border: 1px solid rgba(201, 162, 74, .4); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--ink); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }

.search input {
  width: min(300px, 80vw); padding: 10px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--sand); font: inherit; font-size: .95rem;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  --cat: var(--gold);
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font: 500 .9rem var(--sans); transition: all .15s;
}
.chip:hover { color: var(--sand); border-color: var(--cat); }
.chip[aria-selected="true"] { background: var(--cat); border-color: var(--cat); color: #fff; }
.chip[data-cat="all"][aria-selected="true"] { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 22px; }
.card { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.card:hover { border-color: color-mix(in srgb, var(--gold) 70%, transparent); transform: translateY(-2px); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.card-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.meta { color: var(--muted); font-size: .85rem; }
.tag {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--cat) 45%, var(--sand)); text-decoration: none;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0;
  border-top: 1px solid var(--line);
}
.tl-item { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.tl-item a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 22px 20px 24px; text-decoration: none; position: relative; transition: background .15s; }
.tl-item a::before { content: ""; position: absolute; left: 20px; top: -1px; width: 28px; height: 2px; background: var(--cat); }
.tl-item a:hover { background: var(--panel); }
.tl-year { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.tl-title { font-weight: 600; }
.tl-text { color: var(--muted); font-size: .9rem; }

/* ---------- About ---------- */
.about { max-width: 720px; }
.about p { color: var(--muted); font-size: 1.1rem; margin-top: 18px; }

/* ---------- Watch page ---------- */
.watch { padding: 32px 0 80px; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.back:hover { color: var(--sand); }
.player {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line);
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.player-soon .poster-ar { font-size: clamp(3rem, 8vw, 5.5rem); }
.soon-label { font-size: .85rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.watch-meta { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.watch-title { font-size: clamp(2rem, 4vw, 3rem); margin-top: 10px; }
.watch-desc { color: var(--muted); font-size: 1.08rem; max-width: 70ch; margin-top: 14px; }
.more { margin-top: 64px; }
.more h2 { font-size: 1.8rem; margin-bottom: 22px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--ink); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--sand); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; }
  .nav { gap: 18px; }
}
@media (max-width: 520px) {
  .nav a:nth-child(2) { display: none; }
  .section { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
