/*
Theme Name: PhotoVideoLab News
Theme URI: https://photovideolab.ru
Description: Новостной журнал о фото, видео и нейросетях. Магазинная раскладка в духе NewsBlogger: крупная featured-сетка, блоки по рубрикам, правый сайдбар с виджетами и цветные плашки категорий. Классическая тема на WP_Query, без сторонних сборщиков.
Version: 1.0.0
Author: PhotoVideoLab
Author URI: https://photovideolab.ru
Text Domain: photovideolab-news
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: news, magazine, blog, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   Design tokens
   ============================================================ */
:root {
  /* Brand / accents */
  --accent: #e0242e;
  --accent-dark: #b81b23;
  --accent-soft: #fdeaeb;

  /* Category colours (news-magazine coloured labels) */
  --cat-tech: #e0242e;   /* Новости техники */
  --cat-reviews: #1e6fd9;/* Обзоры и сравнения */
  --cat-ai: #7c3aed;     /* ИИ-инструменты */
  --cat-lab: #10a86a;    /* Лаборатория знаний */
  --cat-default: #16181c;

  /* Neutrals */
  --ink: #16181c;
  --ink-2: #33373d;
  --muted: #6a6f76;
  --line: #e6e8eb;
  --line-strong: #d3d7dc;
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --bg-topbar: #16181c;
  --bg-footer: #16181c;
  --nav-bg: #16181c;   /* primary nav background (stays dark) */
  --chip-bg: #16181c;  /* dark chips: section title, code blocks */

  /* Type */
  --font-head: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --container: 1200px;
  --gap: 30px;
  --gap-sm: 20px;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(20, 22, 26, .08), 0 6px 20px rgba(20, 22, 26, .05);
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }
figure { margin: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: .2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  background: var(--bg-topbar);
  color: rgba(255,255,255,.72);
  font-size: 13px;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 40px; flex-wrap: wrap;
}
.topbar__date {
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: .3px; text-transform: none;
}
.topbar__date svg { opacity: .7; }
.topbar__social { display: inline-flex; align-items: center; gap: 6px; }
.topbar__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; color: rgba(255,255,255,.7);
  border-radius: 3px; transition: background .15s, color .15s;
}
.topbar__social a:hover { background: var(--accent); color: #fff; }

/* ============================================================
   Header / masthead
   ============================================================ */
.masthead { background: var(--bg); border-bottom: 3px solid var(--ink); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 22px; padding-bottom: 22px;
}
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-branding__logo { display: flex; align-items: center; gap: 12px; }
.site-branding__mark { flex: 0 0 auto; }
.site-title {
  font-family: var(--font-head); font-weight: 700; font-size: 34px;
  line-height: 1; letter-spacing: -.5px; margin: 0; text-transform: uppercase;
}
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--ink); }
.site-title__accent { color: var(--accent); }
.site-description { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-family: var(--font-body); }

.masthead__ad {
  flex: 0 0 auto; max-width: 468px;
}
.masthead__ad-slot {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  padding: 18px 40px; text-align: center; background: var(--bg-soft);
}
.masthead__tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); border-radius: var(--radius);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   Primary navigation
   ============================================================ */
.nav-primary { background: var(--nav-bg); position: relative; z-index: 40; }
.nav-primary__inner { display: flex; align-items: stretch; }
.nav-menu {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch;
}
.nav-menu li { position: relative; }
.nav-menu a {
  display: flex; align-items: center; height: 100%; min-height: 50px;
  padding: 0 18px; color: rgba(255,255,255,.86);
  font-family: var(--font-head); font-weight: 500; font-size: 15px;
  text-transform: uppercase; letter-spacing: .6px;
}
.nav-menu > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.nav-menu > li:hover > a::after,
.nav-menu > li.current-menu-item > a::after,
.nav-menu > li.current-menu-parent > a::after { transform: scaleX(1); }
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: #fff; background: rgba(255,255,255,.06); }

/* Sub-menus */
.nav-menu ul {
  list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0;
  min-width: 220px; background: #1f2227; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s; z-index: 50;
}
.nav-menu li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu ul a { min-height: 40px; padding: 8px 18px; font-size: 13px; letter-spacing: .4px; }
.nav-menu ul a::after { display: none; }

.nav-toggle {
  display: none; align-items: center; gap: 10px; background: transparent; border: 0;
  color: #fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  font-size: 15px; padding: 14px 20px;
}
.nav-toggle__bars { display: inline-block; width: 22px; height: 16px; position: relative; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2px; background: #fff; transition: .2s;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 7px; }
.nav-toggle__bars span:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Header search dropdown */
.header-search {
  display: none; background: var(--ink); border-top: 1px solid rgba(255,255,255,.12);
}
.header-search.is-open { display: block; }
.header-search form { display: flex; gap: 10px; padding: 16px 0; }
.header-search input[type="search"] {
  flex: 1; height: 46px; border: 0; border-radius: var(--radius); padding: 0 16px; font-size: 16px;
}
.header-search button {
  height: 46px; padding: 0 22px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: 1px;
}
.header-search button:hover { background: var(--accent-dark); }

/* ============================================================
   Layout scaffolding
   ============================================================ */
.site-main { padding: var(--gap) 0 48px; }
.layout {
  display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: var(--gap); align-items: start;
}
.layout--full { grid-template-columns: minmax(0,1fr); }

/* ============================================================
   Category badge / labels
   ============================================================ */
.cat-badge {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: var(--cat-default); padding: 4px 9px; border-radius: 3px;
  line-height: 1.4;
}
.cat-badge:hover { color: #fff; filter: brightness(.92); }
.cat-tech-news { background: var(--cat-tech); }
.cat-reviews { background: var(--cat-reviews); }
.cat-ai-tools { background: var(--cat-ai); }
.cat-lab { background: var(--cat-lab); }

.entry-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  color: var(--muted); font-size: 13px;
}
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--accent); }
.entry-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.entry-meta__item svg { opacity: .6; }

/* ============================================================
   Featured / hero grid
   ============================================================ */
.featured { margin-bottom: var(--gap); }
.featured__grid {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr;
  gap: var(--gap-sm); min-height: 460px;
}
.featured__lead { grid-row: 1 / 3; display: flex; }
.featured__lead > .f-card { width: 100%; height: 100%; }
.f-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--ink); display: block; min-height: 210px; box-shadow: var(--shadow);
}
.f-card__media { position: absolute; inset: 0; }
.f-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.f-card:hover .f-card__media img { transform: scale(1.05); }
.f-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,11,13,.88) 0%, rgba(10,11,13,.35) 45%, rgba(10,11,13,0) 75%);
}
.f-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; }
.f-card__title {
  color: #fff; margin: 10px 0 0; font-weight: 600; line-height: 1.2;
}
.f-card__title a { color: #fff; }
.f-card__title a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.featured__lead .f-card__title { font-size: 30px; }
.f-card__title { font-size: 17px; }
.f-card__meta { margin-top: 10px; color: rgba(255,255,255,.75); font-size: 12px; }
.f-card__meta a { color: rgba(255,255,255,.75); }

.featured__strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-sm); margin-top: var(--gap-sm);
}

/* ============================================================
   Section heading (category blocks)
   ============================================================ */
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 20px; border-bottom: 2px solid var(--ink); padding-bottom: 0;
}
.section-head__title {
  position: relative; margin: 0; font-size: 22px; text-transform: uppercase; letter-spacing: .5px;
  padding: 8px 16px; color: #fff; background: var(--chip-bg);
}
.section-head__title--tech-news { background: var(--cat-tech); }
.section-head__title--reviews { background: var(--cat-reviews); }
.section-head__title--ai-tools { background: var(--cat-ai); }
.section-head__title--lab { background: var(--cat-lab); }
.section-head__more {
  font-family: var(--font-head); text-transform: uppercase; font-size: 13px; letter-spacing: 1px;
  color: var(--muted);
}
.section-head__more:hover { color: var(--accent); }

.cat-section { margin-bottom: 42px; }
.cat-section__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--gap); align-items: start; }

/* Media wrappers are <a> elements — force block so aspect-ratio reserves height
   (prevents lazy-loaded images from overflowing onto the next section). */
.lead-post__media,
.mini-post__media,
.rank-item__media,
.footer-mini__media { display: block; }
.post-card__media > a:not(.post-card__badge) { display: block; width: 100%; height: 100%; }

/* Lead post inside category block */
.lead-post .lead-post__media { border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; aspect-ratio: 16/10; }
.lead-post .lead-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.lead-post:hover .lead-post__media img { transform: scale(1.04); }
.lead-post__title { font-size: 24px; margin: 12px 0 8px; line-height: 1.2; }
.lead-post__title a { color: var(--ink); }
.lead-post__title a:hover { color: var(--accent); }
.lead-post__excerpt { color: var(--ink-2); font-size: 15px; margin: 8px 0 12px; }

/* List of small posts */
.post-list { display: flex; flex-direction: column; gap: 18px; }
.mini-post { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
.mini-post__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.mini-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mini-post:hover .mini-post__media img { transform: scale(1.05); }
.mini-post__title { font-family: var(--font-body); font-weight: 700; font-size: 15px; line-height: 1.3; margin: 6px 0; }
.mini-post__title a { color: var(--ink); }
.mini-post__title a:hover { color: var(--accent); }
.mini-post .entry-meta { font-size: 12px; }

/* ============================================================
   Post cards grid (archive / blog / featured strip)
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.post-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__badge { position: absolute; top: 12px; left: 12px; }
.post-card__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__title { font-size: 18px; line-height: 1.25; margin: 0; font-family: var(--font-body); font-weight: 700; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { color: var(--ink-2); font-size: 14px; margin: 0; }
.post-card__footer { margin-top: auto; }

/* Featured strip cards are compact */
.featured__strip .post-card__excerpt { display: none; }

/* ============================================================
   Sidebar & widgets
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.widget__title, .widget-title, .widgettitle {
  font-size: 17px; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--ink); position: relative;
}
.widget__title::after, .widget-title::after, .widgettitle::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 60px; height: 2px; background: var(--accent);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.widget ul li:last-child { border-bottom: 0; }
.widget a { color: var(--ink); }
.widget a:hover { color: var(--accent); }

/* Popular / recent list with thumbnails */
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-item:first-child { padding-top: 0; }
.rank-item:last-child { border-bottom: 0; }
.rank-item__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; }
.rank-item__media img { width: 100%; height: 100%; object-fit: cover; }
.rank-item__title { font-weight: 700; font-size: 14px; line-height: 1.3; margin: 2px 0 6px; }
.rank-item__title a { color: var(--ink); }
.rank-item__title a:hover { color: var(--accent); }
.rank-item__meta { font-size: 12px; color: var(--muted); }

/* Newsletter widget */
.widget--newsletter { background: var(--ink); color: #fff; border-color: var(--ink); }
.widget--newsletter .widget__title { color: #fff; border-color: rgba(255,255,255,.25); }
.widget--newsletter p { color: rgba(255,255,255,.78); font-size: 14px; margin: 0 0 14px; }
.widget--newsletter input {
  width: 100%; height: 44px; border: 0; border-radius: var(--radius); padding: 0 14px; margin-bottom: 10px; font-size: 15px;
}
.widget--newsletter button {
  width: 100%; height: 46px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: 1px; font-size: 15px;
}
.widget--newsletter button:hover { background: var(--accent-dark); }

/* Tag cloud */
.tagcloud, .widget--tags__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a, .widget--tags__list a {
  display: inline-block; font-size: 13px !important; padding: 6px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px; color: var(--ink-2);
}
.tagcloud a:hover, .widget--tags__list a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Category list widget with counts */
.cat-links li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-links__count {
  font-family: var(--font-head); font-size: 12px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; color: var(--muted);
}

/* ============================================================
   Single post
   ============================================================ */
.single-hero { background: var(--bg); border-bottom: 1px solid var(--line); padding: 34px 0; }
.single-hero__badges { margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.single-title { font-size: 40px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -.4px; }
.single-deck { font-size: 19px; color: var(--ink-2); margin: 0 0 18px; max-width: 760px; line-height: 1.5; }
.single-hero .entry-meta { font-size: 14px; }
.single-author { display: inline-flex; align-items: center; gap: 8px; }
.single-author__avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--bg-soft); }

.single-thumb { margin: 0 0 var(--gap); border-radius: var(--radius); overflow: hidden; }
.single-thumb img { width: 100%; }

.entry-content { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2 { font-size: 28px; margin-top: 1.6em; color: var(--ink); }
.entry-content h3 { font-size: 22px; margin-top: 1.4em; color: var(--ink); }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote {
  margin: 1.5em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--accent);
  font-size: 20px; color: var(--ink); font-style: italic;
}
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content code {
  background: var(--bg-soft); padding: 2px 6px; border-radius: 3px; font-size: .9em;
}
.entry-content pre {
  background: var(--chip-bg); color: #f2f3f5; padding: 18px; border-radius: var(--radius); overflow: auto;
}

.single-tags { margin: 26px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.single-tags__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; color: var(--muted); }

.single-share { display: flex; gap: 10px; align-items: center; margin: 24px 0; }
.single-share__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 13px; color: var(--muted); }
.single-share a {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line);
}
.single-share a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.author-box {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px; margin: 30px 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--bg-soft); }
.author-box__name { font-size: 18px; margin: 0 0 6px; }
.author-box__bio { margin: 0; color: var(--muted); font-size: 14px; }

/* Related posts */
.related { margin-top: 40px; }

/* Post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); margin: 30px 0; }
.post-nav__link {
  display: block; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.post-nav__link:hover { border-color: var(--accent); }
.post-nav__label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: var(--muted); }
.post-nav__title { display: block; color: var(--ink); font-weight: 700; margin-top: 6px; }
.post-nav__next { text-align: right; }

/* ============================================================
   Page header / archive header
   ============================================================ */
.page-hero { background: var(--bg); border-bottom: 1px solid var(--line); padding: 30px 0; margin-bottom: var(--gap); }
.page-hero__eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-size: 13px; color: var(--accent); margin: 0 0 8px; }
.page-hero__title { font-size: 36px; margin: 0; letter-spacing: -.3px; }
.page-hero__desc { margin: 12px 0 0; color: var(--muted); max-width: 720px; }

/* ============================================================
   Comments
   ============================================================ */
.comments-area { margin-top: 40px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.comments-title, .comment-reply-title { font-size: 20px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ol { list-style: none; padding-left: 28px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; font: inherit; margin-bottom: 12px;
}
.comment-form .submit, .form-submit input {
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius);
  padding: 12px 24px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
}
.comment-form .submit:hover, .form-submit input:hover { background: var(--accent-dark); }

/* ============================================================
   Pagination
   ============================================================ */
.pagination { margin: 36px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
  padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); font-family: var(--font-head);
}
.pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination a.page-numbers:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-footer); color: rgba(255,255,255,.72); margin-top: 40px; }
.footer-widgets {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: var(--gap);
  padding: 48px 0 40px;
}
.footer-col .footer-title {
  color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .6px;
  margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.15); position: relative;
}
.footer-col .footer-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 46px; height: 2px; background: var(--accent); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-col li:last-child { border-bottom: 0; }
.footer-col a { color: rgba(255,255,255,.72); }
.footer-col a:hover { color: #fff; }
.footer-brand__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand__title { font-family: var(--font-head); font-weight: 700; font-size: 24px; text-transform: uppercase; color: #fff; }
.footer-brand__title .site-title__accent { color: var(--accent); }
.footer-brand p { font-size: 14px; margin: 0 0 16px; }
.footer-brand__social { display: flex; gap: 8px; }
.footer-brand__social a {
  display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: var(--radius); background: rgba(255,255,255,.08); color: #fff;
}
.footer-brand__social a:hover { background: var(--accent); }
.footer-mini { display: flex; flex-direction: column; gap: 14px; }
.footer-mini__item { display: grid; grid-template-columns: 60px 1fr; gap: 12px; align-items: center; }
.footer-mini__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; }
.footer-mini__media img { width: 100%; height: 100%; object-fit: cover; }
.footer-mini__title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.footer-mini__title a { color: rgba(255,255,255,.85); }
.footer-mini__title a:hover { color: #fff; }
.footer-mini__date { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 3px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255,255,255,.72); }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   Search results / no results
   ============================================================ */
.no-results { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; }
.search-result { padding: 18px 0; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result__title { font-size: 20px; margin: 0 0 6px; }
.search-result__title a { color: var(--ink); }
.search-result__title a:hover { color: var(--accent); }

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 60px 0; }
.error-404__code { font-family: var(--font-head); font-size: 120px; line-height: 1; color: var(--accent); margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 15px;
  padding: 12px 26px; border-radius: var(--radius); border: 0;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .masthead__ad { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .featured__strip { grid-template-columns: repeat(2, 1fr); }
  .single-title { font-size: 32px; }
}
@media (max-width: 782px) {
  .nav-toggle { display: inline-flex; }
  .nav-primary__inner { flex-wrap: wrap; }
  .nav-menu {
    display: none; flex-direction: column; width: 100%; border-top: 1px solid rgba(255,255,255,.12);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a { min-height: 48px; padding: 0 20px; }
  .nav-menu > li > a::after { display: none; }
  .nav-menu ul {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    background: rgba(255,255,255,.04); padding: 0;
  }
  .featured__grid { grid-template-columns: 1fr; grid-template-rows: none; min-height: 0; }
  .featured__lead { grid-row: auto; }
  .featured__lead .f-card__title { font-size: 24px; }
  .f-card { min-height: 260px; }
  .cat-section__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sidebar { grid-template-columns: 1fr; }
  .card-grid, .card-grid--2, .featured__strip { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .single-title { font-size: 27px; }
  .masthead__inner { flex-wrap: wrap; }
  .topbar__inner { justify-content: center; }
}

/* ============================================================
   Dark theme
   ============================================================ */
[data-theme="dark"] {
  --ink: #eef0f3;
  --ink-2: #c4c9d0;
  --muted: #9aa0a8;
  --line: #2a2e35;
  --line-strong: #3a3f47;
  --bg: #1b1e24;
  --bg-soft: #131519;
  --bg-topbar: #0f1114;
  --bg-footer: #0f1114;
  --nav-bg: #0f1114;
  --chip-bg: #2f333b;
  --accent-soft: #3a2023;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 6px 22px rgba(0,0,0,.45);
}
[data-theme="dark"] .masthead__ad-slot { background: var(--bg-soft); border-color: var(--line-strong); }
[data-theme="dark"] .header-search input[type="search"],
[data-theme="dark"] .search-field,
[data-theme="dark"] .comment-form input,
[data-theme="dark"] .comment-form textarea,
[data-theme="dark"] .widget--newsletter input {
  background: #0f1114; color: var(--ink); border-color: var(--line-strong);
}
[data-theme="dark"] .widget--newsletter { background: #0f1114; border-color: #0f1114; }
[data-theme="dark"] img { filter: brightness(.94); }

/* Theme toggle button */
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: inline-flex; }
[data-theme="dark"] .theme-toggle__sun { display: inline-flex; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ============================================================
   Featured slider
   ============================================================ */
.featured__grid--slider { display: block; min-height: 0; }
.slider {
  position: relative; overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--ink);
  height: 480px;
}
.slider__track { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .6s ease; z-index: 1;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.slide .f-card { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; }
.slider .featured__lead .f-card__title,
.slide .f-card__title { font-size: 34px; }
.slide .f-card__body { padding: 34px; max-width: 760px; }

.slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s; backdrop-filter: blur(2px);
}
.slider__nav:hover { background: var(--accent); }
.slider__prev { left: 16px; }
.slider__next { right: 16px; }
.slider__dots {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5;
  display: flex; gap: 8px; justify-content: center;
}
.slider__dot {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(255,255,255,.45); cursor: pointer; transition: background .15s, transform .15s;
}
.slider__dot.is-active { background: var(--accent); transform: scale(1.2); }
.slider:hover .slider__nav { opacity: 1; }

@media (max-width: 782px) {
  .slider { height: 360px; }
  .slide .f-card__title { font-size: 24px; }
  .slide .f-card__body { padding: 20px; }
}
@media (max-width: 640px) {
  .slider { height: 300px; }
  .slider__nav { width: 38px; height: 38px; }
}

/* ============================================================
   "You may have missed" block
   ============================================================ */
.missed { margin-top: 8px; }
.missed .section-head__title { background: var(--accent); }

