/*
Theme Name: Afo News
Theme URI: https://afonews.com
Author: Nagaland Me
Author URI: https://nagaland.me
Description: A fast, world class custom news theme for Afo News. Dark first with a light mode, gradient identity, pill navigation, prominent sharing, trending sidebar, and a typographic system built for credibility and speed. Built for Google News, Discover, and mobile.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afonews
Tags: news, magazine, dark, blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --bg:        #0a0e18;
  --bg-elev:   #0f1626;
  --surface:   #141c30;
  --surface-2: #1b2440;
  --line:      #28324f;
  --line-soft: #1e2740;
  --text:      #f2f5fc;
  --text-dim:  #9aa4bf;
  --text-faint:#6a7390;
  --brand-1:   #7c3aed;
  --brand-2:   #ec4899;
  --brand-3:   #22d3ee;
  --accent:    #a855f7;
  --breaking:  #f43f5e;
  --grad: linear-gradient(118deg, var(--brand-1) 0%, var(--brand-2) 52%, var(--brand-3) 100%);
  --grad-soft: linear-gradient(118deg, rgba(124,58,237,.16), rgba(236,72,153,.14) 52%, rgba(34,211,238,.16));

  --shadow:    0 2px 4px rgba(0,0,0,.25), 0 12px 30px rgba(0,0,0,.32);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --ring: rgba(168,85,247,.55);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1240px;
  --gap: 28px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(.95rem, .92rem + .15vw, 1.02rem);
  --step-1:  clamp(1.1rem, 1.02rem + .4vw, 1.32rem);
  --step-2:  clamp(1.35rem, 1.2rem + .7vw, 1.8rem);
  --step-3:  clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-4:  clamp(2.1rem, 1.6rem + 2.6vw, 3.6rem);
}

[data-theme="light"] {
  --bg:        #f5f7fc;
  --bg-elev:   #ffffff;
  --surface:   #ffffff;
  --surface-2: #eef1f8;
  --line:      #e1e6f1;
  --line-soft: #eceff6;
  --text:      #0c0f18;
  --text-dim:  #4e576f;
  --text-faint:#838ca3;
  --grad-soft: linear-gradient(118deg, rgba(124,58,237,.08), rgba(236,72,153,.07) 52%, rgba(34,211,238,.09));
  --shadow:    0 1px 2px rgba(16,24,40,.06), 0 14px 34px rgba(16,24,40,.08);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.08);
}

/* ============================================================
   2. BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(168,85,247,.35); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   3. BUTTONS + TAGS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--step--1); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn-grad {
  background: var(--grad); border: 0; color: #fff;
  box-shadow: 0 6px 18px rgba(124,58,237,.35);
}
.btn-grad:hover { filter: brightness(1.06); }

.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
}
.cat-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-body); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--grad-soft); color: var(--text);
  border: 1px solid var(--line);
}
.cat-badge.solid { background: var(--grad); color: #fff; border: 0; }

.meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  color: var(--text-faint); font-size: var(--step--1); margin: 0;
}
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.meta-row svg { width: 14px; height: 14px; opacity: .8; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }

/* ============================================================
   4. BREAKING BANNER
   ============================================================ */
.breaking {
  background: linear-gradient(90deg, var(--breaking), #be123c);
  color: #fff;
}
.breaking .container { display: flex; align-items: center; gap: 14px; padding-block: 9px; }
.breaking .tag {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.breaking .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.breaking .msg { font-size: var(--step--1); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breaking .msg:hover { text-decoration: underline; }
.breaking .close { background: none; border: 0; color: #fff; opacity: .8; font-size: 1.1rem; line-height: 1; padding: 4px; }
.breaking .close:hover { opacity: 1; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* ============================================================
   5. HEADER + NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-bar { display: flex; align-items: center; gap: 22px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(124,58,237,.4);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1; }
.brand-tag { display: block; font-family: var(--font-body); font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin-top: 3px; }

.search-form { flex: 1; max-width: 520px; position: relative; }
.search-form input[type="search"] {
  width: 100%; padding: 11px 16px 11px 42px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: var(--step--1); transition: border-color .15s ease;
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form input:focus { border-color: var(--accent); outline: none; }
.search-form .s-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-faint); pointer-events: none; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); display: grid; place-items: center;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); }

/* pill nav */
.primary-nav { border-top: 1px solid var(--line-soft); }
.primary-nav .nav-scroll { display: flex; gap: 9px; padding-block: 11px; overflow-x: auto; scrollbar-width: none; }
.primary-nav .nav-scroll::-webkit-scrollbar { display: none; }
.primary-nav ul { display: flex; gap: 9px; list-style: none; margin: 0; padding: 0; }
.primary-nav li a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 15px; border-radius: var(--radius-pill);
  font-size: var(--step--1); font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--line); background: var(--surface);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.primary-nav li a:hover { color: var(--text); transform: translateY(-1px); border-color: var(--accent); }
.primary-nav li.current-menu-item a,
.primary-nav li.current_page_item a {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 5px 14px rgba(124,58,237,.4);
}
.primary-nav .nav-ico { width: 15px; height: 15px; }

/* ============================================================
   6. LAYOUT GRID
   ============================================================ */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 332px; gap: 40px; padding-block: 40px; }
.section { margin-bottom: 48px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { position: relative; font-size: var(--step-2); padding-left: 16px; margin: 0; }
.section-title::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 5px; border-radius: 5px; background: var(--grad); }
.section-more { font-size: var(--step--1); font-weight: 600; color: var(--text-dim); display: inline-flex; align-items: center; gap: 5px; }
.section-more:hover { color: var(--accent); }

/* ============================================================
   7. HERO
   ============================================================ */
.hero { padding-top: 36px; }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 26px; }
.hero-lead { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.hero-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-lead .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,8,15,.92) 8%, rgba(5,8,15,.45) 52%, rgba(5,8,15,.1) 100%); }
.hero-lead .inner { position: relative; padding: 30px; max-width: 640px; }
.hero-lead h2 { font-size: var(--step-4); color: #fff; margin: 12px 0 10px; }
.hero-lead p { color: rgba(255,255,255,.82); margin: 0; }
.hero-lead .meta-row { color: rgba(255,255,255,.7); margin-top: 14px; }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 26px; }
.hero-side-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 217px; display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); }
.hero-side-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-side-card .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,8,15,.92), rgba(5,8,15,.18)); }
.hero-side-card .inner { position: relative; padding: 18px; }
.hero-side-card h3 { font-size: var(--step-1); color: #fff; margin: 9px 0 0; }

/* ============================================================
   8. CARDS
   ============================================================ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: var(--gap); }
.card { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, border-color .18s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .thumb .cat-badge { position: absolute; left: 12px; top: 12px; }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: var(--step-1); margin: 0; }
.card h3 a:hover { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card .excerpt { color: var(--text-dim); font-size: var(--step--1); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta-row { margin-top: auto; }

/* horizontal compact card */
.card-row { display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.card-row:last-child { border-bottom: 0; }
.card-row .thumb { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/11; }
.card-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-row h3 { font-size: 1.02rem; margin: 0 0 7px; line-height: 1.25; }
.card-row h3 a:hover { color: var(--accent); }

/* ============================================================
   9. SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 28px; }
.widget { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; }
.widget-title { font-size: var(--step-1); margin: 0 0 16px; display: flex; align-items: center; gap: 9px; }
.widget-title svg { width: 18px; height: 18px; color: var(--accent); }
.widget.sticky { position: sticky; top: 168px; }

.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.trending-list li { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.trending-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.trending-list li::before {
  counter-increment: t; content: counter(t, decimal-leading-zero);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.trending-list a { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; line-height: 1.25; }
.trending-list a:hover { color: var(--accent); }
.trending-list .t-meta { display: block; font-family: var(--font-body); font-size: .76rem; color: var(--text-faint); margin-top: 5px; }

/* newsletter widget */
.nl-widget { background: var(--grad-soft); border-color: var(--line); }
.nl-widget p { color: var(--text-dim); font-size: var(--step--1); }
.nl-form { display: flex; flex-direction: column; gap: 10px; }
.nl-form input { padding: 11px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: var(--step--1); }
.nl-form input:focus { outline: none; border-color: var(--accent); }
.nl-note { font-size: .72rem; color: var(--text-faint); margin: 2px 0 0; }

/* ============================================================
   10. ARTICLE (single)
   ============================================================ */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--grad); z-index: 80; transition: width .1s linear; }
.article { max-width: 760px; }
.article-head { margin-bottom: 26px; }
.article-head .crumbs { font-size: var(--step--1); color: var(--text-faint); margin-bottom: 14px; }
.article-head .crumbs a:hover { color: var(--accent); }
.article-title { font-size: var(--step-4); margin: 12px 0 16px; letter-spacing: -.02em; }
.article-dek { font-size: var(--step-1); color: var(--text-dim); font-family: var(--font-display); font-weight: 400; line-height: 1.4; margin: 0 0 20px; }
.byline { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.byline .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.byline .who { font-size: var(--step--1); }
.byline .who b { font-family: var(--font-body); font-weight: 700; }
.byline .who a:hover { color: var(--accent); }
.article-figure { margin: 26px 0; }
.article-figure img { width: 100%; border-radius: var(--radius); }
.article-figure figcaption { font-size: .8rem; color: var(--text-faint); margin-top: 9px; text-align: center; }

.article-body { font-size: 1.12rem; line-height: 1.75; }
.article-body > p:first-of-type::first-letter {
  float: left; font-family: var(--font-display); font-weight: 700;
  font-size: 3.6em; line-height: .78; padding: 6px 12px 0 0; margin-top: 4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.article-body h2 { font-size: var(--step-2); margin: 1.5em 0 .5em; }
.article-body h3 { font-size: var(--step-1); margin: 1.4em 0 .4em; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body blockquote {
  margin: 1.6em 0; padding: 6px 0 6px 24px; border-left: 4px solid transparent;
  border-image: var(--grad) 1; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--text);
}
.article-body img { border-radius: var(--radius); margin: 1.4em 0; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .5em; }

.tag-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 32px 0; }
.tag-list a { font-size: .78rem; font-weight: 600; padding: 6px 13px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text-dim); }
.tag-list a:hover { border-color: var(--accent); color: var(--text); }

/* share row */
.share-row { display: flex; flex-wrap: wrap; gap: 11px; margin: 24px 0; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--step--1); color: #fff; border: 0; transition: transform .15s ease, filter .15s ease; }
.share-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.share-btn svg { width: 17px; height: 17px; }
.share-card { background: var(--grad); box-shadow: 0 6px 16px rgba(124,58,237,.35); }
.share-wa { background: #25d366; }
.share-x  { background: #1d2330; border: 1px solid var(--line); }
.share-fb { background: #1877f2; }
.share-rd { background: #ff4500; }
.share-cp { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.share-cp:hover { filter: none; border-color: var(--accent); }

/* author box */
.author-box { display: flex; gap: 18px; align-items: flex-start; background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; margin: 36px 0; }
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--line); }
.author-box h4 { font-size: var(--step-1); margin: 0 0 4px; }
.author-box .role { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.author-box p { color: var(--text-dim); font-size: var(--step--1); margin: 0; }

/* ============================================================
   11. FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-elev); margin-top: 20px; position: relative; }
.site-footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px; background: var(--grad); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; padding-block: 52px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-dim); font-size: var(--step--1); max-width: 320px; }
.footer-col h4 { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 16px; font-family: var(--font-body); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--text-dim); font-size: var(--step--1); }
.footer-col a:hover { color: var(--text); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-dim); }
.footer-social a:hover { border-color: var(--accent); color: var(--text); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom { border-top: 1px solid var(--line-soft); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--text-faint); font-size: .8rem; }

/* ============================================================
   12. MISC: pagination, 404, archive head, comments
   ============================================================ */
.page-hero { padding: 40px 0 8px; }
.page-hero .eyebrow { margin-bottom: 8px; display: block; }
.page-hero h1 { font-size: var(--step-3); margin: 0; }
.page-hero p { color: var(--text-dim); margin-top: 10px; max-width: 640px; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--step--1); }
.pagination .page-numbers:hover { border-color: var(--accent); }
.pagination .page-numbers.current { background: var(--grad); color: #fff; border-color: transparent; }

.notfound { text-align: center; padding: 80px 0; }
.notfound .code { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 18vw, 11rem); line-height: .9; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: var(--step-2); margin: 8px 0 14px; }
.notfound p { color: var(--text-dim); margin-bottom: 26px; }

.comments { margin: 40px 0; }
.comments h3 { font-size: var(--step-2); margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); margin-bottom: 12px; font-family: inherit; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); }

/* ============================================================
   13. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .widget.sticky { position: static; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .hero-lead { min-height: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .search-form { display: none; }
  .menu-toggle { display: grid; place-items: center; }
  .primary-nav { position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); transform: translateX(100%); transition: transform .25s ease; background: var(--bg-elev); z-index: 70; border-left: 1px solid var(--line); overflow-y: auto; }
  .primary-nav.open { transform: translateX(0); }
  .primary-nav .nav-scroll { flex-direction: column; padding: 70px 20px 30px; overflow: visible; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav li a { width: 100%; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 65; opacity: 0; visibility: hidden; transition: opacity .2s; }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
  .sidebar { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .author-box { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   14. SHARE CARD MODAL
   ============================================================ */
.afo-modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.afo-modal.open { display: flex; }
.afo-modal .backdrop { position: absolute; inset: 0; background: rgba(3,6,12,.8); backdrop-filter: blur(5px); }
.afo-modal .dialog { position: relative; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 430px; width: 100%; max-height: 94vh; overflow-y: auto; box-shadow: var(--shadow); }
.afo-modal h3 { font-size: var(--step-1); margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.afo-modal h3 svg { width: 20px; height: 20px; color: var(--accent); }
.afo-modal .sub { color: var(--text-dim); font-size: var(--step--1); margin: 0 0 16px; }
.afo-modal .close-x { position: absolute; top: 15px; right: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.afo-modal .close-x:hover { border-color: var(--accent); }
.sharecard-canvas-wrap { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; background: var(--bg); aspect-ratio: 1080/1350; }
.sharecard-canvas-wrap canvas { width: 100%; height: auto; display: block; }
.sharecard-loading { display: grid; place-items: center; height: 100%; color: var(--text-faint); font-size: var(--step--1); }
.sharecard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sharecard-actions .btn, .sharecard-actions .share-btn { justify-content: center; }
.sharecard-actions .full { grid-column: 1 / -1; }
