/*
 * Cine-Rizos stylesheet.
 *
 * Layout notes:
 *  - `:root` holds the design tokens (colors, radius).
 *  - `.grid` is a responsive auto-fill poster grid.
 *  - `.card` / `.card-link` / `.card-body` are flex columns; `.card-ratings` uses
 *    `margin-top: auto` so the rating block stays pinned to the card bottom
 *    regardless of title/director length.
 *  - `.card-ratings` has two rows: `.cr-top` (Rizospastis logo + stars) and
 *    `.cr-boxes`, three equal boxes (IMDb, Rotten Tomatoes, Letterboxd) across the card.
 *  - The film detail page (`#film`) and similar cards follow near the bottom.
 */

[hidden] { display: none !important; }

:root {
  --bg: #101014;
  --bg-2: #111115;
  --card: #151419;
  --card-hover: #1c1a21;
  --text: #f5f3f4;
  --muted: #aaa5ab;
  --accent: #e1444b;
  --accent-soft: #bc252d;
  --brand-red: #e23a43;
  --gold: #edc56a;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: #111115;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-caption {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.07em;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
}

.brand .logo { height: 42px; width: auto; display: block; }

.brand-text span { color: var(--brand-red); }

.search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
/* «50 ανά σελίδα» and the ↑/↓ button always stay side by side. */
.search .ctl-pair { display: inline-flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.search #genre { max-width: 190px; }
.search #sort { max-width: 200px; }

.search input, .search select {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.95rem;
  outline: none;
}

.search input:focus, .search select:focus { border-color: var(--accent); }

.search .q-wrap { position: relative; flex: 1; min-width: 260px; display: flex; }
.search input[type="search"] { flex: 1; min-width: 0; padding-right: 36px; }
/* Our own clear button replaces the browser's (Firefox has none). */
.search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.q-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}
.q-clear:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.q-clear[hidden] { display: none; }
@media (max-width: 640px) { .search .q-wrap { min-width: 100%; } }

.search .order-btn {
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  min-width: 44px;
}
.search .order-btn:hover { border-color: var(--accent); }

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 6px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.hero h1 {
  margin: 21px 0 18px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.075em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  margin: 0 0 32px;
  color: #b8b4ba;
  font-size: 16px;
  line-height: 1.8;
  max-width: 660px;
}

.stats {
  padding: 12px 24px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  padding: 20px 24px 60px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.card-play {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.card-play:hover {
  background: var(--accent-soft);
  transform: scale(1.08);
}

.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #14151b;
  overflow: hidden;
}

.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
}

.poster-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: radial-gradient(circle at 30% 20%, #262229, #14151b);
  overflow: hidden;
}

.placeholder-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.16;
  pointer-events: none;
  padding: 24px;
}

.placeholder-title { position: relative; z-index: 1; }

.card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 600;
}

.card-eng { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.card-meta { color: var(--muted); font-size: 0.78rem; margin-top: 6px; }

.card-ratings {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}
.cr-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.card-ratings .stars { font-size: clamp(0.85rem, 8.8cqi, 1.25rem); }
.riz-logo { width: 100%; height: 20px; object-fit: contain; object-position: left center; display: block; opacity: 0.92; }

.stars { position: relative; display: inline-block; font-size: 0.95rem; line-height: 1; color: #4a4e57; }
.stars-bg { color: #4a4e57; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--gold); }
.stars-none { color: var(--muted); }

.badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.badge:hover { opacity: 0.85; }
.badge.imdb { background: #f5c518; color: #000; }
.badge.rt { background: #f00000; color: #fff; }
.badge.lb { background: #202830; color: #fff; }

/* Three equal boxes, evenly spaced, from one side of the card to the other. */
.cr-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
.cr-boxes .badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 28px;
  padding: 3px 2px;
  font-size: clamp(0.6rem, 6.4cqi, 0.82rem);
  white-space: nowrap;
  overflow: hidden;
}
.cr-boxes .badge.imdb span:first-child { font-weight: 900; }
.rt-tomato { height: 1.45em; width: auto; flex-shrink: 0; }
.lb-logo { height: 2em; width: auto; flex-shrink: 0; }
.cr-boxes .badge > span { flex-shrink: 0; }

.genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.genre-chip {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.78rem;
}

.similar-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.similar-card {
  position: relative;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: default;
}
.similar-card[role="button"] { cursor: pointer; transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; }
.similar-card[role="button"]:hover, .similar-card[role="button"]:focus {
  transform: translateY(-4px);
  background: var(--card-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  outline: none;
}
.similar-poster { aspect-ratio: 2 / 3; background: #14151b; overflow: hidden; }
.similar-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.similar-poster .poster-placeholder { font-size: 0.72rem; }
.similar-body {
  padding: 9px 11px 11px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.similar-title { font-size: 0.88rem; font-weight: 600; line-height: 1.2; }
.similar-year { color: var(--muted); font-size: 0.76rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.avail { font-size: 0.68rem; padding: 1px 6px; border-radius: 4px; font-weight: 700; white-space: nowrap; }
.avail.in { background: rgba(46, 160, 67, 0.18); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.35); }
.avail.out { background: rgba(225, 68, 75, 0.12); color: #ff8f94; border: 1px solid rgba(255, 143, 148, 0.3); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 24px;
  font-size: 1.05rem;
}

.footer {
  padding: 20px 24px 40px;
  color: #6b7078;
  font-size: 0.8rem;
  text-align: center;
}
/* Site footer: one note line, then © and the info pages, separated by a quiet «·». */
.site-footer {
  width: 100%;
  margin: 40px 0 0;
  padding: 18px clamp(16px, 4vw, 48px) 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #6b7078;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}
.site-footer-note { margin: 0 0 8px; }
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  row-gap: 4px;
}
.site-footer-links > * + *::before {
  content: "·";
  display: inline-block;
  margin: 0 10px;
  color: #4a4e55;
}
.site-footer-links button {
  background: none; border: 0; padding: 0; font: inherit; color: var(--muted);
  cursor: pointer; transition: color 0.15s ease;
}
.site-footer-links button:hover,
.site-footer-links button:focus-visible { color: var(--text); }
@media (max-width: 560px) {
  /* Phones: © on its own line and plain spacing between links, so a wrapped row never starts with «·». */
  .site-footer-links { column-gap: 16px; }
  .site-footer-links > :first-child { flex-basis: 100%; }
  .site-footer-links > * + *::before { content: none; }
}

/* Footer popups (about, sources, privacy, contact, changelog): a native <dialog>. */
html:has(.info-dialog[open]) { overflow: hidden; }
.info-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.info-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
.info-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  display: grid; place-items: center; width: 36px; height: 36px;
  background: var(--bg-2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%;
  color: var(--muted); font-size: 0.95rem; line-height: 1; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.info-close:hover, .info-close:focus-visible { color: var(--text); border-color: var(--accent); }
.doc-page {
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 36px clamp(20px, 5vw, 40px) 28px;
  line-height: 1.7;
}
.doc-page h1 { padding-right: 40px; }
.doc-page:focus { outline: none; }
.doc-page h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.02em; margin: 0 0 18px; }
.doc-page h2 { font-size: 1.08rem; margin: 30px 0 8px; }
.doc-page p, .doc-page li { color: #d9d6dc; }
.doc-page p { margin: 0 0 12px; }
.doc-page ul { margin: 0 0 12px; padding-left: 20px; }
.doc-page li { margin-bottom: 4px; }
.doc-page a { color: var(--accent); text-decoration: none; }
.doc-page a:hover { text-decoration: underline; }
.doc-page .doc-updated { color: var(--muted); font-size: 0.88rem; margin-top: -8px; }
.doc-page .doc-note { color: var(--muted); font-style: italic; }
.doc-page .tmdb-logo { display: block; height: 14px; width: auto; margin: 6px 0 14px; }
.doc-page .doc-email { font-size: 1.05rem; }
.changelog .release { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.changelog .release:first-child { border-top: 0; }
/* One row per version, only one open at a time; the chevron turns when open. */
.changelog details.release summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; cursor: pointer; list-style: none;
  color: var(--muted); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}
.changelog details.release summary::-webkit-details-marker { display: none; }
.changelog details.release summary::before {
  content: ""; width: 6px; height: 6px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s ease;
}
.changelog details.release[open] summary::before { transform: rotate(45deg); }
.changelog details.release summary:hover,
.changelog details.release summary:focus-visible,
.changelog details.release[open] summary { color: var(--text); }
.changelog details.release.current summary { color: var(--accent); }
.changelog details.release ul { margin-top: 0; padding-bottom: 8px; }

/* Film page */
.film-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

.back-btn {
  position: sticky;
  top: calc(var(--topbar-height, 71px) + 12px);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.back-btn:hover { border-color: var(--accent); }

.not-found {
  color: var(--muted);
  padding: 40px 0;
  text-align: center;
  font-size: 1rem;
}

/* Detail modal */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.modal-panel {
  position: relative;
  margin: 3vh auto;
  width: min(920px, 94vw);
  max-height: 94vh;
  overflow-y: auto;
  background: var(--bg-2);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px;
}
.close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}
.close:hover { color: var(--text); }

.detail-hero { display: flex; gap: 24px; flex-wrap: wrap; }
.detail-poster { width: 220px; flex-shrink: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; background: #14151b; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 260px; }
.detail-info h2 { margin: 0 0 4px; font-size: 1.7rem; }
.detail-orig { color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.detail-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

.ratings-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rbox {
  display: grid;
  grid-template-rows: 24px 24px;
  row-gap: 2px;
  place-items: center;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
}
.rlabel { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.rvalue { display: flex; align-items: center; justify-content: center; height: 24px; line-height: 1; font-size: 1.2rem; font-weight: 700; }
.rbox-link { text-decoration: none; color: inherit; transition: border-color 0.15s ease, opacity 0.15s ease; }
.rbox-link:hover { border-color: var(--accent); opacity: 0.85; }
.rbox .rvalue.riz { font-size: 1rem; }
.rbox-imdb { background: #f5c518; color: #000; }
.rbox-imdb .rlabel { color: #000; font-weight: 900; }
.rbox-imdb .rvalue { font-weight: 900; }
.rbox-rt { background: #f00000; color: #fff; }
.rbox-lb { background: #14181c; color: #fff; }
.rbox-lb .rlabel { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.lb-dots { display: inline-flex; }
.lb-dots i { width: 9px; height: 9px; border-radius: 50%; margin-right: -2px; }
.lb-dots i:nth-child(1) { background: #ff8000; }
.lb-dots i:nth-child(2) { background: #00e054; }
.lb-dots i:nth-child(3) { background: #40bcf4; }
.rlabel .riz-logo { width: 95px; height: 17px; object-position: center; }
.rlabel .rt-logo { display: block; width: 75px; height: 24px; margin: 0 auto; }

.evidence {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(225, 68, 75, 0.08);
  color: var(--text);
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

.detail-block { margin-top: 22px; }
.detail-block h4 { margin: 0 0 8px; color: var(--muted); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.5px; }
.detail-block p { margin: 0; line-height: 1.6; }

.sources { color: var(--muted); font-size: 0.82rem; margin-bottom: 10px; }
.sources a { color: var(--accent); text-decoration: none; }
.sources a:hover { text-decoration: underline; }

.review-text { line-height: 1.75; font-size: 0.98rem; }
.review-text p { margin: 0 0 1em; }

.trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.trailer iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.trailer-link:hover { color: var(--text); text-decoration: underline; }

.stream {
  position: relative;
  width: 100%;
  container-type: inline-size;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  margin-bottom: 12px;
}
.stream iframe {
  width: 100%;
  /* Video plus the provider's tabs, without a tall empty area on mobile. */
  height: 400px;
  height: calc(56.25cqw + 48px);
  border: 0;
  display: block;
}

.watch-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.watch-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.watch-link:hover { background: var(--accent-soft); }

.review-page {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.review-page summary {
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.review-page summary::-webkit-details-marker { display: none; }
.review-page summary:hover { background: var(--card-hover); }
.review-page[open] summary { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.review-page .review-text { padding: 12px 14px; }
.rp-date { color: var(--muted); font-weight: 600; }
.rp-source a { color: var(--accent); text-decoration: none; }
.rp-source a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .detail-poster { width: 140px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 2rem 1rem; }
.pagination button { background: var(--surface, #222); color: inherit; border: 1px solid #555; border-radius: 8px; padding: .6rem 1rem; cursor: pointer; font-size: 1.2rem; }
.pagination button:disabled { opacity: .35; cursor: default; }
.pagination button:focus-visible { outline: 2px solid #e53935; outline-offset: 3px; }
.pagination select { background: var(--bg-2); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.2);
                     border-radius: 8px; padding: 6px 8px; font: inherit; cursor: pointer; }

.card-date { font-size: .75rem; color: #a0a0a0; margin: .25rem 0 .5rem; }

/* Proposals (ΚΝΕ) */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.protaseis-btn {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.protaseis-btn:hover { background: var(--accent); }

.proposals {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 60px;
}
.proposals .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 10px;
}
.proposals h1 { font-size: 2rem; margin: 0 0 8px; }
.proposals > p { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

.proposals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.category-card:hover,
.category-card:focus-visible {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-2px);
  outline: none;
}
.category-name { font-weight: 800; font-size: 1.02rem; }
.category-count { color: var(--muted); font-size: 0.85rem; }
.category-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related-links a { color: var(--accent); text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* Clickable director / cast names on the film page, and the person filter above the list. */
.person-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3);
               text-underline-offset: 3px; }
.person-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.person-filter { display: flex; width: fit-content; max-width: calc(100% - 48px); align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 24px 12px;
                 padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px;
                 background: var(--bg-2); color: var(--text); font-size: 0.95rem; }
.person-filter[hidden] { display: none; }
.person-filter button { margin-left: 2px; border: 0; background: transparent; color: var(--muted);
                        font-size: 1rem; cursor: pointer; border-radius: 50%; width: 28px; height: 28px; }
.person-filter button:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
