/* ================================================================
   FilmyFly Theme — main.css
   Design tokens, layout, components. Light mode only.
   ================================================================ */

/* ── TOKENS ── */
:root {
  --ff-primary:       #2563EB;
  --ff-primary-dark:  #1D4ED8;
  --ff-primary-light: #EFF6FF;
  --ff-bg:            #F9FAFB;
  --ff-white:         #FFFFFF;
  --ff-border:        #E5E7EB;
  --ff-border-light:  #F3F4F6;
  --ff-text-head:     #111827;
  --ff-text-body:     #374151;
  --ff-text-muted:    #6B7280;
  --ff-text-xmuted:   #9CA3AF;
  --ff-radius-card:   12px;
  --ff-radius-sm:     6px;
  --ff-shadow-card:   0 1px 3px rgba(0,0,0,.08);
  --ff-shadow-hover:  0 4px 16px rgba(0,0,0,.12);
  --ff-nav-h:         64px;
  --ff-container:     1280px;
  --ff-transition:    all .2s ease;
}

/* ── RESET / BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--ff-bg);
  color: var(--ff-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/*
 * DO NOT set height:auto globally — it breaks 100%-height card images.
 * Content images that need natural height get height:auto via .ff-single__content img.
 */
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ff-primary); }
button { cursor: pointer; background: none; border: none; font: inherit; }
ul, ol { list-style: none; }

/* WordPress core adds height:auto on images — override for contained images */
.ff-poster-card__img,
.ff-card__img,
.ff-sidebar-item__img {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
}
/* WordPress admin bar offset */
.ff-nav { top: 0; }
.admin-bar .ff-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .ff-nav { top: 46px; }
}
/* Kill WordPress block-library stylesheet interference inside cards */
.ff-card figure,
.ff-poster-card figure,
.ff-sidebar-item figure { margin: 0; }
.ff-card .wp-post-image,
.ff-poster-card .wp-post-image,
.ff-sidebar-item .wp-post-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: none;
}

/* Screen reader only */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ================================================================
   NAV
   ================================================================ */
.ff-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ff-border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ff-nav__inner {
  max-width: var(--ff-container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--ff-nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.ff-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.ff-nav__logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.ff-nav__logo-text {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -.015em;
  color: var(--ff-text-head);
}
.ff-nav__links {
  display: flex;
  align-items: center;
  flex: 1;
}
.ff-nav__menu {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ff-nav__item {}
.ff-nav__link {
  font-size: .875rem;
  font-weight: 400;
  color: var(--ff-text-muted);
  white-space: nowrap;
  transition: color .15s;
}
.ff-nav__link:hover { color: var(--ff-text-head); }
.ff-nav__link.current-menu-item { color: var(--ff-primary); font-weight: 500; }

/* Desktop search */
.ff-nav__search-wrap { flex-shrink: 0; }
.ff-search-form {
  display: flex;
  align-items: center;
  position: relative;
}
.ff-search-form__icon {
  position: absolute;
  left: 10px;
  width: 16px; height: 16px;
  color: var(--ff-text-xmuted);
  pointer-events: none;
  flex-shrink: 0;
}
.ff-search-form__input {
  background: var(--ff-border-light);
  border: 1px solid var(--ff-border);
  border-radius: 999px;
  font-size: .875rem;
  padding: 6px 14px 6px 32px;
  width: 220px;
  color: var(--ff-text-head);
  outline: none;
  transition: var(--ff-transition);
}
.ff-search-form__input::placeholder { color: var(--ff-text-xmuted); }
.ff-search-form__input:focus {
  border-color: var(--ff-primary);
  background: #fff;
  width: 280px;
}

/* Mobile controls */
.ff-nav__mobile-controls {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.ff-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--ff-text-muted);
  transition: var(--ff-transition);
}
.ff-icon-btn:hover { background: var(--ff-border-light); color: var(--ff-text-head); }
.ff-icon-btn__icon { width: 20px; height: 20px; }
.ff-icon-btn__icon--close { display: none; }
[aria-expanded="true"] .ff-icon-btn__icon--search { display: none; }
[aria-expanded="true"] .ff-icon-btn__icon--close   { display: block; }

/* Mobile search bar */
.ff-mobile-search {
  border-top: 1px solid var(--ff-border-light);
  background: #fff;
  padding: 10px 16px 12px;
}
.ff-mobile-search__form { position: relative; display: flex; }
.ff-mobile-search__form .ff-search-form__icon { left: 12px; }
.ff-mobile-search__form .ff-search-form__input {
  width: 100%;
  height: 40px;
  font-size: .9rem;
}

/* ================================================================
   PAGE WRAPPER
   ================================================================ */
.ff-page { display: block; }

/* ================================================================
   CONTAINER
   ================================================================ */
.ff-container {
  max-width: var(--ff-container);
  margin: 0 auto;
  padding: 0 24px;
}
.ff-container--narrow { max-width: 720px; }

/* ================================================================
   SECTIONS
   ================================================================ */
.ff-section { padding: 32px 0; }
.ff-section--white  { background: var(--ff-white); border-top: 1px solid var(--ff-border); border-bottom: 1px solid var(--ff-border); }
.ff-section--gray   { background: var(--ff-bg); }
.ff-strip           { padding: 40px 0; }

.ff-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ff-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ff-text-head);
  border-left: 4px solid var(--ff-primary);
  padding-left: 12px;
}
.ff-section-title__icon { color: var(--ff-primary); display: flex; align-items: center; }
.ff-see-all {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ff-text-xmuted);
  transition: color .15s;
}
.ff-see-all:hover { color: var(--ff-primary); }

/* ================================================================
   POSTER GRID (Trending strip, South strip, etc.)
   ================================================================ */
.ff-poster-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
/* min-width:0 overrides CSS grid's default min-width:auto, which would
   let content expand a grid item beyond its 1fr column width. */
.ff-poster-card { min-width: 0; }
.ff-poster-card__link { display: block; }
.ff-poster-card__img-wrap {
  /*
   * Bulletproof 2:3 portrait ratio via the padding-top hack.
   *
   * WHY NOT aspect-ratio: WordPress injects explicit width/height HTML
   * attributes on <img> tags. Combined with theme/plugin CSS that sets
   * height:auto, aspect-ratio on the WRAPPER gets overridden by the
   * intrinsic image dimensions.
   *
   * WHY height:0 is required: padding-top: 150% computes to 150% of the
   * CONTAINING BLOCK width. But without height:0, the element's height
   * is also "auto" — meaning it can grow taller than the padding value
   * if any child forces it. height:0 pins the box height to exactly the
   * padding value. Combined with overflow:hidden, nothing escapes.
   */
  position: relative;
  width: 100%;
  height: 0;          /* REQUIRED — pins box height to padding value only */
  padding-top: 150%;  /* 2:3 portrait: height = 150% of containing-block width */
  border-radius: var(--ff-radius-card);
  overflow: hidden;
  border: 1px solid var(--ff-border);
  box-shadow: var(--ff-shadow-card);
  transition: var(--ff-transition);
  background: var(--ff-border-light);
}
.ff-poster-card__link:hover .ff-poster-card__img-wrap {
  border-color: rgba(37,99,235,.4);
  box-shadow: var(--ff-shadow-hover);
}
/* All inner elements fill the padded box via absolute positioning */
.ff-poster-card__img,
.ff-poster-card__img-placeholder,
.ff-poster-card__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ff-poster-card__img {
  object-fit: cover;
  transition: transform .5s ease;
}
.ff-poster-card__link:hover .ff-poster-card__img { transform: scale(1.06); }
.ff-poster-card__img-placeholder {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}
.ff-poster-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent 55%);
  display: flex;
  align-items: flex-start;
  padding: 8px;
  opacity: 0;
  transition: opacity .2s;
}
.ff-poster-card__link:hover .ff-poster-card__overlay { opacity: 1; }
.ff-rating-chip {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.75);
  color: #FBBF24;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.ff-poster-card__num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--ff-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.ff-poster-card__title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ff-text-head);
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ff-poster-card__link:hover + .ff-poster-card__title a,
.ff-poster-card__title a:hover { color: var(--ff-primary); }
.ff-poster-card__sub {
  font-size: 12px;
  color: var(--ff-text-muted);
  margin-top: 2px;
}
.ff-poster-card__genre { font-weight: 600; color: var(--ff-text-body); }

/* ================================================================
   EDITORIAL GRID LAYOUT
   ================================================================ */
.ff-editorial {
  background: var(--ff-bg);
  border-top: 1px solid var(--ff-border);
  border-bottom: 1px solid var(--ff-border);
}
.ff-editorial__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 24px;
  align-items: start;
}
.ff-editorial__main { display: flex; flex-direction: column; gap: 16px; }
.ff-editorial__large-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ff-editorial__small-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ================================================================
   CARDS (Large + Small)
   ================================================================ */
.ff-card {
  background: var(--ff-white);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-card);
  overflow: hidden;
  box-shadow: var(--ff-shadow-card);
  transition: var(--ff-transition);
  display: flex;
  flex-direction: column;
}
.ff-card:hover {
  border-color: rgba(37,99,235,.3);
  box-shadow: var(--ff-shadow-hover);
}
.ff-card__img-link { display: block; overflow: hidden; }
.ff-card__img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ff-border-light);
}
.ff-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
}
.ff-card:hover .ff-card__img { transform: scale(1.05); }
.ff-card__img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}
.ff-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ff-card--small .ff-card__body { padding: 12px; gap: 6px; }

.ff-card__meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ff-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ff-text-xmuted);
  text-transform: uppercase;
}
.ff-card__cat--xs { font-size: 10px; }

.ff-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ff-text-head);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ff-card__title--sm {
  font-size: .85rem;
  font-weight: 600;
  -webkit-line-clamp: 2;
}
.ff-card__title a:hover { color: var(--ff-primary); }

.ff-card__excerpt {
  font-size: .85rem;
  color: var(--ff-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.ff-card__excerpt--xs {
  font-size: .75rem;
  -webkit-line-clamp: 2;
}

.ff-card__byline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ff-text-xmuted);
  margin-top: auto;
}
.ff-card__byline svg { flex-shrink: 0; }
.ff-card__byline--xs { font-size: 11px; }
.ff-card__sep { color: var(--ff-border); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.ff-sidebar {
  background: var(--ff-white);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-card);
  overflow: hidden;
  box-shadow: var(--ff-shadow-card);
  position: sticky;
  top: calc(var(--ff-nav-h) + 16px);
}
.ff-sidebar__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ff-border-light);
  background: var(--ff-bg);
  color: var(--ff-primary);
}
.ff-sidebar__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--ff-text-head);
}
.ff-sidebar__list { display: flex; flex-direction: column; }
.ff-sidebar__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--ff-border-light);
  background: var(--ff-bg);
}
.ff-sidebar__footer .ff-see-all { justify-content: center; }

/* Sidebar item */
.ff-sidebar-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ff-border-light);
  transition: background .15s;
}
.ff-sidebar-item:last-child { border-bottom: none; }
.ff-sidebar-item:hover { background: var(--ff-bg); }

.ff-sidebar-item__thumb-link { flex-shrink: 0; display: block; }
.ff-sidebar-item__thumb {
  width: 72px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ff-border-light);
  background: var(--ff-border-light);
}
.ff-sidebar-item__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.ff-sidebar-item:hover .ff-sidebar-item__img { transform: scale(1.08); }
.ff-sidebar-item__img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
}
.ff-sidebar-item__content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ff-sidebar-item__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ff-sidebar-item__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ff-text-body);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ff-sidebar-item__title a:hover { color: var(--ff-primary); }
.ff-sidebar-item__author { font-size: 11px; color: var(--ff-text-xmuted); }

/* ================================================================
   LANG BADGE (dynamic inline style from helpers.php)
   ================================================================ */
.ff-lang-badge { font-family: inherit; }

/* ================================================================
   SEO EDITORIAL COPY
   ================================================================ */
.ff-editorial-seo { padding: 40px 0 32px; }
.ff-editorial-seo__body {
  max-width: 800px;
  margin: 0 auto;
}
.ff-editorial-seo__body p {
  font-size: .82rem;
  color: var(--ff-text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.ff-editorial-seo__body h2 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ff-text-secondary);
  margin: 22px 0 8px;
  line-height: 1.4;
}
.ff-editorial-seo__body ul {
  margin: 6px 0 10px 18px;
  padding: 0;
}
.ff-editorial-seo__body ul li {
  font-size: .82rem;
  color: var(--ff-text-muted);
  line-height: 1.7;
  margin-bottom: 4px;
  list-style: disc;
}
.ff-editorial-seo__body h3 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ff-text-secondary);
  margin: 16px 0 5px;
  line-height: 1.4;
}
.ff-editorial-seo__body strong {
  font-weight: 600;
  color: var(--ff-text-secondary);
}

/* ================================================================
   FAQ
   ================================================================ */
.ff-faq { padding: 56px 0; }
.ff-faq__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ff-text-head);
  text-align: center;
  margin-bottom: 32px;
}
.ff-faq__list { display: flex; flex-direction: column; gap: 12px; }
.ff-faq__item {
  background: var(--ff-white);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-card);
  overflow: hidden;
  transition: border-color .15s;
}
.ff-faq__item:has(.ff-faq__question--open) { border-color: rgba(37,99,235,.35); }
.ff-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ff-text-head);
  text-align: left;
  transition: color .15s;
}
.ff-faq__question:hover { color: var(--ff-primary); }
.ff-faq__chevron {
  flex-shrink: 0;
  transition: transform .2s;
  color: var(--ff-text-xmuted);
}
.ff-faq__question--open .ff-faq__chevron { transform: rotate(180deg); }
.ff-faq__answer { padding: 0 20px 16px; }
.ff-faq__answer p { font-size: .875rem; color: var(--ff-text-muted); line-height: 1.7; }

/* ================================================================
   FOOTER
   ================================================================ */
.ff-footer {
  background: #111827;
  color: rgba(255,255,255,.55);
  padding: 48px 0 0;
}

/* ── Top grid: 4 columns ── */
.ff-footer__inner {
  max-width: var(--ff-container);
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px 40px;
  align-items: start;
}
@media (max-width: 1024px) {
  .ff-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}
@media (max-width: 640px) {
  .ff-footer__inner { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
}
@media (max-width: 400px) {
  .ff-footer__inner { grid-template-columns: 1fr; }
}

/* ── Brand column ── */
.ff-footer__brand { display: flex; flex-direction: column; gap: 10px; }
.ff-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.025em;
}
.ff-footer__tagline {
  font-size: .72rem;
  line-height: 1.7;
  color: rgba(255,255,255,.45);
  max-width: 320px;
}

/* ── Link columns ── */
.ff-footer__col { display: flex; flex-direction: column; gap: 6px; }
.ff-footer__col-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  margin-bottom: 6px;
}
.ff-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ff-footer__links li a {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  transition: color .15s;
  line-height: 1.4;
}
.ff-footer__links li a:hover { color: #fff; }

/* ── Copyright bar ── */
.ff-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
}
.ff-footer__bottom-inner {
  max-width: var(--ff-container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ff-footer__copy { font-size: .72rem; color: rgba(255,255,255,.4); }
.ff-footer__disclaimer { font-size: .72rem; color: rgba(255,255,255,.3); }

/* ================================================================
   BREADCRUMBS
   ================================================================ */
.ff-breadcrumbs {
  background: var(--ff-white);
  border-bottom: 1px solid var(--ff-border);
  padding: 10px 0;
  font-size: .8rem;
  color: var(--ff-text-muted);
}
.ff-breadcrumbs ol {
  max-width: var(--ff-container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}
.ff-breadcrumbs li + li::before { content: '›'; margin-right: 4px; }
.ff-breadcrumbs a { color: var(--ff-text-muted); }
.ff-breadcrumbs a:hover { color: var(--ff-primary); }

/* ================================================================
   SINGLE POST
   ================================================================ */
.ff-single { max-width: 760px; margin: 0 auto; padding: 32px 24px 64px; }
.ff-single__header { margin-bottom: 24px; }
.ff-single__meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ff-single__category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ff-text-xmuted);
  text-transform: uppercase;
}
.ff-single__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ff-text-head);
  line-height: 1.25;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.ff-single__byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--ff-text-muted);
  flex-wrap: wrap;
}
.ff-single__byline-sep { color: var(--ff-border); }
.ff-single__author-link { color: inherit; text-decoration: none; }
.ff-single__author-link:hover { color: var(--ff-primary); }
.ff-single__hero { border-radius: var(--ff-radius-card); overflow: hidden; margin-bottom: 32px; }
.ff-single__hero img { width: 100%; height: auto; display: block; }
.ff-single__content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ff-text-body);
}
.ff-single__content h2 { font-size: 1.3rem; font-weight: 700; color: var(--ff-text-head); margin: 32px 0 12px; }
.ff-single__content h3 { font-size: 1.1rem; font-weight: 600; color: var(--ff-text-head); margin: 24px 0 10px; }
.ff-single__content p { margin-bottom: 18px; }
.ff-single__content ul, .ff-single__content ol { padding-left: 24px; margin-bottom: 18px; }
.ff-single__content li { margin-bottom: 6px; }
.ff-single__content blockquote {
  border-left: 4px solid var(--ff-primary);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--ff-primary-light);
  border-radius: 0 var(--ff-radius-sm) var(--ff-radius-sm) 0;
  color: var(--ff-text-head);
  font-style: italic;
}
.ff-single__content figure { margin: 24px 0; }
.ff-single__content figure img { border-radius: var(--ff-radius-card); height: auto; }
.ff-single__content img { height: auto; max-width: 100%; border-radius: var(--ff-radius-sm); }
.ff-single__content a { color: var(--ff-primary); text-decoration: underline; text-underline-offset: 3px; }

/* Review meta box */
.ff-review-meta {
  background: var(--ff-bg);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-card);
  padding: 20px;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}
.ff-review-meta__item {}
.ff-review-meta__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ff-text-xmuted);
  margin-bottom: 4px;
}
.ff-review-meta__value {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ff-text-head);
}
.ff-review-meta__value--rating { color: var(--ff-primary); font-size: 1.1rem; }

/* ================================================================
   HOMEPAGE H1 (SEO — visually subtle, above trending strip)
   ================================================================ */
/* ── Homepage SEO Intro (H1 + customisable paragraph) ──────────────
   Font-size intentionally below body (< 1rem) so it is present for
   search engines but does not visually compete with editorial content.
   ──────────────────────────────────────────────────────────────── */
.ff-home-intro {
  background: var(--ff-white);
  border-bottom: 1px solid var(--ff-border);
  padding: 9px 0 7px;
}
.ff-home-intro .ff-container {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.ff-home-intro__h1 {
  font-size: .75rem;      /* smaller than body (1rem) — subtle but in DOM */
  font-weight: 500;
  color: var(--ff-text-xmuted);
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ff-home-intro__text {
  font-size: .72rem;
  color: var(--ff-text-xmuted);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 768px) {
  .ff-home-intro .ff-container { flex-direction: column; gap: 2px; }
  .ff-home-intro__h1 { white-space: normal; font-size: .72rem; }
  .ff-home-intro__text { font-size: .7rem; }
}

/* ================================================================
   POST TAGS
   ================================================================ */
.ff-single__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--ff-border);
}
.ff-single__tags-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--ff-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}
.ff-single__tag {
  font-size: .75rem;
  color: var(--ff-text-secondary);
  background: var(--ff-gray-50);
  border: 1px solid var(--ff-border);
  border-radius: 99px;
  padding: 3px 10px;
  text-decoration: none;
  transition: background .15s, color .15s;
  line-height: 1.5;
}
.ff-single__tag:hover { background: var(--ff-primary); color: #fff; border-color: var(--ff-primary); }

/* ================================================================
   POST NAVIGATION (Prev / Next)
   ================================================================ */
.ff-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.ff-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--ff-gray-50);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-card);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.ff-post-nav__item:hover { border-color: var(--ff-primary); background: var(--ff-primary-light); }
.ff-post-nav__item--next { text-align: right; }
.ff-post-nav__dir {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ff-text-muted);
}
.ff-post-nav__item--next .ff-post-nav__dir { justify-content: flex-end; }
.ff-post-nav__title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ff-text-head);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 480px) {
  .ff-post-nav { grid-template-columns: 1fr; }
  .ff-post-nav__item--next { text-align: left; }
  .ff-post-nav__item--next .ff-post-nav__dir { justify-content: flex-start; }
}

/* ================================================================
   RELATED POSTS
   ================================================================ */
.ff-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--ff-border);
}
.ff-related__header { margin-bottom: 20px; }
.ff-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ================================================================
   ARCHIVE / CATEGORY PAGE
   ================================================================ */
.ff-archive { padding: 32px 0 64px; }
.ff-archive__header {
  background: var(--ff-white);
  border-bottom: 1px solid var(--ff-border);
  padding: 32px 0 24px;
  margin-bottom: 32px;
}
.ff-archive__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ff-text-head);
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.ff-archive__desc { font-size: .875rem; color: var(--ff-text-muted); }
.ff-archive__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.ff-archive__pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  font-size: .875rem;
}
.ff-archive__pagination a, .ff-archive__pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--ff-border);
  background: var(--ff-white);
  color: var(--ff-text-muted);
  font-weight: 600;
  transition: var(--ff-transition);
}
.ff-archive__pagination a:hover { border-color: var(--ff-primary); color: var(--ff-primary); }
.ff-archive__pagination .current { background: var(--ff-primary); border-color: var(--ff-primary); color: #fff; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .ff-editorial__layout { grid-template-columns: 1fr; }
  .ff-sidebar { position: static; }
}
@media (max-width: 768px) {
  .ff-nav__search-wrap,
  .ff-nav__links { display: none; }
  .ff-nav__mobile-controls { display: flex; }

  .ff-poster-grid { grid-template-columns: repeat(2, 1fr); }

  .ff-editorial__large-row { grid-template-columns: 1fr; }
  .ff-editorial__small-row { grid-template-columns: repeat(2, 1fr); }
  .ff-archive__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ff-related__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ff-editorial-seo__body { padding: 0 4px; }

  .ff-single__title { font-size: 1.35rem; }

  .ff-container { padding: 0 16px; }
  .ff-section { padding: 24px 0; }
  .ff-strip { padding: 28px 0; }
}
@media (max-width: 480px) {
  .ff-poster-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ff-editorial__small-row { grid-template-columns: 1fr; }
  .ff-archive__grid { grid-template-columns: 1fr; }
  .ff-related__grid { grid-template-columns: 1fr; }
  .ff-nav__logo-text { font-size: 1rem; }
}

/* Mobile nav open state */
@media (max-width: 768px) {
  .ff-nav__links--open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--ff-nav-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--ff-border);
    padding: 16px;
    box-shadow: var(--ff-shadow-hover);
    z-index: 90;
  }
  .ff-nav__links--open .ff-nav__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .ff-nav, .ff-sidebar, .ff-footer, .ff-faq { display: none; }
  .ff-single { max-width: 100%; padding: 0; }
}
