/*
Theme Name: گیاهی‌ترین | Giahitarin
Theme URI: https://giahitarin.local
Author: Giahitarin Team
Author URI: https://giahitarin.local
Description: مجله تخصصی گیاهان آپارتمانی، سلامت و سبک زندگی سبز. طراحی مدرن ادیتوریال با تجربه خواندن بهتر. قالب راست‌چین فارسی با پشتیبانی کامل از وردپرس.
Version: 2.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giahitarin
Domain Path: /languages
Tags: rtl-language-support, blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, footer-widgets, theme-options, threaded-comments, translation-ready
*/

/* ============================================================
   گیاهیترین | Giahitarin — V2 (Modern Editorial)
   Standard magazine design · Content-first · Reader-focused
   ============================================================ */

/* Vazirmatn — local (no CDN dependency) */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 300;
  src: url('./assets/fonts/vazirmatn-arabic-300-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('./assets/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('./assets/fonts/vazirmatn-arabic-500-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('./assets/fonts/vazirmatn-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('./assets/fonts/vazirmatn-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('./assets/fonts/vazirmatn-arabic-800-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 900;
  src: url('./assets/fonts/vazirmatn-arabic-900-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

:root {
  /* Colors — professional forest & warm cream */
  --forest-900: #132A20;
  --forest-800: #1B4332;
  --forest-700: #2D6A4F;
  --forest-600: #40916C;
  --forest-100: #D8F3DC;
  --sage-100: #E9F5EE;
  --cream: #FAF7F2;
  --cream-card: #FFFFFF;
  --terracotta: #C97B4A;
  --terracotta-soft: #F6E7DC;
  --ink: #24352E;
  --muted: #6C7A73;
  --border: #E8E2D8;
  --gold: #D4A24C;

  /* Typography */
  --font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --fs-hero: clamp(1.9rem, 4.5vw, 3.2rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3: clamp(1.15rem, 1.8vw, 1.45rem);
  --fs-body: 1rem;
  --fs-lead: 1.08rem;
  --line-body: 2.1;
  --line-heading: 1.6;

  /* Radii & shadow */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(27, 67, 50, 0.07), 0 1px 2px rgba(27, 67, 50, 0.05);
  --shadow-md: 0 6px 20px rgba(27, 67, 50, 0.08);
  --shadow-lg: 0 16px 40px rgba(27, 67, 50, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-med: 280ms;

  /* Layout */
  --container: 1180px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--line-body);
  color: var(--ink);
  background: var(--cream);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

h1, h2, h3, h4 { line-height: var(--line-heading); font-weight: 800; color: var(--forest-900); text-wrap: balance; }

::selection { background: var(--forest-600); color: #fff; }

:focus-visible {
  outline: 3px solid var(--forest-600);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Reading progress bar ============ */
.progress-bar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 4px;
  z-index: 500;
  background: transparent;
}

.progress-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--forest-600), var(--terracotta));
  transition: width 80ms linear;
  border-radius: 0 4px 4px 0;
}

/* ============ Layout ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}

.section { padding-block: clamp(52px, 7vw, 88px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  position: relative;
  padding-bottom: 14px;
}

.section-head h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--terracotta), var(--forest-600));
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head--center h2::after { inset-inline: 0; margin-inline: auto; }

.section-sub {
  color: var(--muted);
  font-size: var(--fs-body);
  max-width: 520px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full, 999px);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn svg { width: 18px; height: 18px; }

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--forest-800);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 67, 50, 0.24);
}
.btn-primary:hover { background: var(--forest-900); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(27, 67, 50, 0.28); }

.btn-terracotta {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 6px 16px rgba(201, 123, 74, 0.26);
}
.btn-terracotta:hover { background: #B46739; transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border-color: var(--forest-600);
  color: var(--forest-700);
}
.btn-outline:hover { background: var(--forest-100); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--forest-700);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--sage-100); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ============ Top bar ============ */
.topbar {
  background: var(--forest-900);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 500;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}

.topbar-msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-msg svg { width: 15px; height: 15px; color: var(--gold); }

.topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-date svg { width: 14px; height: 14px; color: var(--gold); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-med) var(--ease);
}

.site-header.scrolled { box-shadow: 0 4px 24px rgba(27, 67, 50, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--forest-900);
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--forest-700), var(--forest-800));
  border-radius: 14px 14px 14px 6px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.brand-mark svg { width: 24px; height: 24px; }

.brand em { font-style: normal; color: var(--terracotta); }

.main-nav ul { display: flex; align-items: center; gap: 2px; }

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.main-nav a:hover { background: var(--sage-100); color: var(--forest-700); }

.main-nav a.active, .main-nav .current-menu-item a, .main-nav .current_page_item a { background: var(--forest-800); color: #fff; box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--forest-700);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.icon-btn:hover { background: var(--sage-100); color: var(--forest-800); transform: translateY(-2px); }

.icon-btn svg { width: 20px; height: 20px; }

.menu-toggle { display: none; }

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 42, 32, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 12vh 16px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility var(--t-med) var(--ease);
}

.search-overlay.open { opacity: 1; visibility: visible; }

.search-panel {
  width: 100%;
  max-width: 640px;
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  transform: translateY(-12px);
  transition: transform var(--t-med) var(--ease);
}

.search-overlay.open .search-panel { transform: translateY(0); }

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--forest-800);
}

.search-close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-100);
  color: var(--forest-800);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.search-close:hover { background: var(--forest-800); color: #fff; }
.search-close svg { width: 18px; height: 18px; }

/* Search field: one pill, icon at the start, submit button sitting inside. */
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 5px;
  padding-inline-start: 16px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.search-input-wrap:focus-within {
  border-color: var(--forest-600);
  box-shadow: 0 0 0 4px var(--forest-100);
}

.search-input-wrap > svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 4px;
  font-size: 1rem;
  color: var(--ink);
}

.search-input-wrap input::placeholder { color: var(--muted); }
.search-input-wrap input:focus { outline: none; }

/* Remove the browser's native clear button so it does not collide with ours. */
.search-input-wrap input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.search-input-wrap .search-submit {
  flex-shrink: 0;
  padding: 11px 24px;
  font-size: 0.9rem;
}

.search-hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 528px) {
  .search-panel { padding: 18px; }
  .search-input-wrap { flex-wrap: wrap; border-radius: var(--radius-md); padding-inline: 12px; }
  .search-input-wrap input { flex: 1 1 100%; }
  .search-input-wrap .search-submit { flex: 1 1 100%; margin-bottom: 4px; }
}

/* ============================================================
   Widget-area blocks (Search, Archives, Categories, Recent Posts, …)
   ------------------------------------------------------------
   Anything dropped into a widget area through the block editor lands here.
   Without these rules the default widgets render with core's generic styling,
   which does not match the rest of the sidebar.
   ============================================================ */

.sidebar .wp-block-search__label,
.sidebar .wp-block-heading,
.sidebar .widget > h2,
.sidebar .widget > h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--forest-800);
  margin-bottom: 16px;
}

/* Search widget — same pill as the header overlay. */
.wp-block-search__inside-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  padding-inline-start: 16px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.wp-block-search__inside-wrapper:focus-within {
  border-color: var(--forest-600);
  box-shadow: 0 0 0 4px var(--forest-100);
}

.wp-block-search .wp-block-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 11px 4px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}

.wp-block-search .wp-block-search__input:focus { outline: none; }
.wp-block-search .wp-block-search__input::placeholder { color: var(--muted); }
.wp-block-search .wp-block-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.wp-block-search .wp-block-search__button {
  flex-shrink: 0;
  margin: 0;
  border: 2px solid transparent;
  background: var(--forest-800);
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.wp-block-search .wp-block-search__button:hover { background: var(--forest-900); transform: translateY(-1px); }
.wp-block-search .wp-block-search__button:active { transform: scale(0.97); }

.wp-block-search .wp-block-search__button svg { width: 18px; height: 18px; fill: currentColor; }

/* Icon-only variant */
.wp-block-search.wp-block-search__icon-button .wp-block-search__button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

/* Classic (non-block) search form, e.g. get_search_form() */
.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  padding-inline-start: 16px;
}

.search-form:focus-within { border-color: var(--forest-600); box-shadow: 0 0 0 4px var(--forest-100); }
.search-form label { flex: 1; min-width: 0; margin: 0; }

.search-form .search-field {
  width: 100%;
  border: none;
  background: transparent;
  padding: 11px 4px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}

.search-form .search-field:focus { outline: none; }

.search-form .search-submit {
  flex-shrink: 0;
  background: var(--forest-800);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}

.search-form .search-submit:hover { background: var(--forest-900); }

/* List-style widgets: archives, categories, page list, latest posts */
.sidebar .wp-block-archives,
.sidebar .wp-block-categories,
.sidebar .wp-block-page-list,
.sidebar .wp-block-latest-posts,
.sidebar .wp-block-latest-comments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
}

.sidebar .wp-block-archives li a,
.sidebar .wp-block-categories li a,
.sidebar .wp-block-page-list li a,
.sidebar .wp-block-latest-posts li a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  border-inline-start: 3px solid transparent;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.sidebar .wp-block-archives li a:hover,
.sidebar .wp-block-categories li a:hover,
.sidebar .wp-block-page-list li a:hover,
.sidebar .wp-block-latest-posts li a:hover {
  background: var(--sage-100);
  color: var(--forest-800);
  border-inline-start-color: var(--terracotta);
}

.sidebar .wp-block-latest-posts__post-date {
  display: block;
  padding-inline: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Dropdown variants of the archive/category widgets */
.sidebar .wp-block-archives select,
.sidebar .wp-block-categories select,
.sidebar select {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.sidebar .wp-block-tag-cloud a {
  display: inline-block;
  font-size: 0.82rem !important;
  font-weight: 600;
  padding: 7px 14px;
  margin: 0 0 6px 6px;
  border-radius: 999px;
  background: var(--sage-100);
  color: var(--forest-700);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.sidebar .wp-block-tag-cloud a:hover { background: var(--forest-800); color: #fff; }

/* ============ Breadcrumb ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  padding-block: 18px;
}

.breadcrumb a { color: var(--forest-600); }
.breadcrumb a:hover { color: var(--forest-800); text-decoration: underline; text-underline-offset: 4px; }

.breadcrumb .sep { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: 0.5; }

.breadcrumb span[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ============ Hero spotlight ============ */
.hero { padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 72px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 28px;
}

.hero-main {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}

.hero-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1264 / 848;
}

.story-media img, .banner-primary img, .banner-card img, .video-thumb img, .article-cover img {
  aspect-ratio: 1264 / 848;
}

.hero-main::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 42, 32, 0.05) 0%, rgba(19, 42, 32, 0.82) 100%);
}

.hero-main-body {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 40px);
  color: #fff;
}

.hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--terracotta);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-main h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  margin-bottom: 10px;
  max-width: 620px;
}

.hero-main h1 a:hover { color: var(--gold); }

.hero-main p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-lead);
  max-width: 580px;
  margin-bottom: 16px;
}

.hero-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); font-weight: 500; }

/* Side stories */
.hero-side { display: flex; flex-direction: column; gap: 20px; }

.side-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.side-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.side-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.side-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.side-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--terracotta);
  margin-bottom: 6px;
}

.side-card h3 { font-size: 1.05rem; line-height: 1.9; }
.side-card h3 a:hover { color: var(--forest-600); }

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

/* ============ Trending strip ============ */
.trending {
  background: var(--forest-900);
  color: #fff;
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.trending::before {
  content: '';
  position: absolute;
  top: -50px;
  inset-inline-end: -50px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(201, 123, 74, 0.15);
}

.trending-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.trending-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--gold);
  white-space: nowrap;
}

.trending-label svg { width: 20px; height: 20px; }

.trending-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.trending-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: background-color var(--t-fast), transform var(--t-fast);
}

.trending-item:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

.trending-item .num { font-size: 1.2rem; font-weight: 900; color: var(--terracotta); margin-bottom: 4px; }
.trending-item h4 { font-size: 0.82rem; color: #fff; line-height: 1.8; font-weight: 600; }
.trending-item h4 a:hover { color: var(--gold); }

/* ============ Category quick nav ============ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.cat-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med);
  display: block;
}

.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--forest-600); }

.cat-card .icon {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--sage-100);
  color: var(--forest-700);
  display: grid;
  place-items: center;
}

.cat-card .icon svg { width: 26px; height: 26px; }

.cat-card h3 { font-size: 0.95rem; margin-bottom: 2px; }

.cat-card span { font-size: 0.78rem; color: var(--muted); font-weight: 500; }

/* ============ Editorial magazine grid ============ */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.story-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.story-media { position: relative; overflow: hidden; aspect-ratio: 16/9; display: block; }

.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }

.story-card:hover .story-media img { transform: scale(1.06); }

.story-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.story-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.story-body h3 { font-size: 1.1rem; line-height: 1.9; }
.story-body h3 a:hover { color: var(--forest-600); }

.story-excerpt { font-size: 0.9rem; color: var(--muted); line-height: 2; flex: 1; }

.story-card .meta { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 0.8rem; color: var(--muted); }

/* Large story spans */
.story-lg { grid-column: span 7; }
.story-md { grid-column: span 5; }
.story-sm { grid-column: span 4; }

.story-lg .story-body h3 { font-size: 1.4rem; }
.story-lg .story-excerpt { font-size: 0.98rem; }

/* ============ Featured category banner ============ */
.featured-cat {
  background: linear-gradient(135deg, var(--forest-800) 0%, var(--forest-600) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  margin-block: 24px;
  position: relative;
  overflow: hidden;
}

.featured-cat::before {
  content: '';
  position: absolute;
  top: -60px;
  inset-inline-end: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.featured-cat::after {
  content: '';
  position: absolute;
  bottom: -40px;
  inset-inline-start: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(201, 123, 74, 0.25);
}

.featured-cat-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.featured-cat-head {
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.featured-cat-head h2 { color: #fff; }
.featured-cat-head h2::after { background: var(--gold); }
.featured-cat-head p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }

.banner-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease);
}

.banner-card:hover { transform: translateY(-5px); }

.banner-card img { width: 100%; height: 130px; object-fit: cover; }

.banner-card-body { padding: 16px; }

.banner-card h4 { font-size: 0.95rem; color: #fff; line-height: 1.8; }
.banner-card h4 a:hover { color: var(--gold); }

.banner-card .meta { font-size: 0.78rem; color: rgba(255,255,255,0.7); margin-top: 8px; }

.banner-primary {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.banner-primary img { width: 100%; height: 260px; object-fit: cover; }

.banner-primary-body { padding: 24px; color: var(--ink); }

.banner-primary h3 { font-size: 1.5rem; }
.banner-primary p { color: var(--muted); font-size: 0.95rem; }
.banner-primary h3 a:hover { color: var(--forest-600); }

/* ============ Editor's note ============ */
.editor-note {
  background: var(--terracotta-soft);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.editor-note::before {
  content: '❝';
  position: absolute;
  top: 10px;
  inset-inline-end: 24px;
  font-size: 7rem;
  color: var(--terracotta);
  opacity: 0.22;
  line-height: 1;
}

.editor-note img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50% 50% 50% 18%;
  margin-inline: auto;
  box-shadow: var(--shadow-lg);
}

.editor-note blockquote {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 700;
  line-height: 2.2;
  color: var(--forest-800);
  margin-bottom: 18px;
}

.editor-note figcaption { color: var(--muted); font-size: 0.9rem; }
.editor-note figcaption strong { color: var(--forest-800); display: block; font-size: 1rem; margin-bottom: 4px; }

/* ============ Video strip ============ */
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.video-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.video-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.video-thumb { position: relative; aspect-ratio: 16/9; display: block; }

.video-thumb img { width: 100%; height: 100%; object-fit: cover; }

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(19, 42, 32, 0.3);
  transition: background-color var(--t-fast);
}

.video-card:hover .video-play { background: rgba(19, 42, 32, 0.4); }

.video-play svg {
  width: 52px;
  height: 52px;
  color: #fff;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.video-duration {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  background: rgba(19, 42, 32, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.video-card h4 { font-size: 0.95rem; padding: 14px 16px 4px; line-height: 1.8; }
.video-card span { font-size: 0.78rem; color: var(--muted); padding: 0 16px 14px; display: block; }

/* ============ Tag cloud ============ */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.tag-cloud a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}

.tag-cloud a:hover { background: var(--forest-800); border-color: var(--forest-800); color: #fff; transform: translateY(-2px); }

/* ============ Newsletter ============ */
.newsletter {
  background: linear-gradient(135deg, var(--forest-900), var(--forest-700));
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 64px);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.newsletter::before, .newsletter::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.newsletter::before { width: 280px; height: 280px; top: -120px; inset-inline-end: -80px; }
.newsletter::after { width: 200px; height: 200px; bottom: -100px; inset-inline-start: -60px; }

.newsletter-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.newsletter h2 { color: #fff; font-size: var(--fs-h2); margin-bottom: 12px; }
.newsletter p { color: rgba(255,255,255,0.85); max-width: 480px; }
.newsletter .sub-note { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 10px; }

.newsletter-form .field {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  align-items: center;
}

.newsletter-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 0.95rem;
  color: var(--ink);
  min-width: 0;
}
.newsletter-form input:focus { outline: none; }

/* ============ Footer ============ */
.site-footer { background: var(--forest-900); color: rgba(255,255,255,0.75); margin-top: 72px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 44px;
  padding-block: 60px;
}

.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 2.1; max-width: 300px; }

.footer-socials { display: flex; gap: 10px; margin-top: 20px; }

.footer-socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  transition: all var(--t-fast) var(--ease);
}
.footer-socials a:hover { background: var(--terracotta); border-color: var(--terracotta); transform: translateY(-3px); }
.footer-socials svg { width: 18px; height: 18px; }

.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 20px; }

.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 0.88rem; color: rgba(255,255,255,0.65); transition: color var(--t-fast), padding-inline-start var(--t-fast); }
.footer-col a:hover { color: var(--gold); padding-inline-start: 6px; }

.footer-news h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.footer-news p { font-size: 0.85rem; margin-bottom: 16px; }

.footer-news .field { display: flex; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 5px; }
.footer-news input { flex: 1; min-width: 0; background: transparent; border: none; padding: 10px 14px; color: #fff; font-size: 0.85rem; }
.footer-news input::placeholder { color: rgba(255,255,255,0.4); }
.footer-news input:focus { outline: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer-bottom a { color: var(--gold); }

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ Success button state ============ */
.btn-success {
  background: var(--forest-600);
  color: #fff;
  pointer-events: none;
  border-color: var(--forest-600);
}

.btn-success:hover { background: var(--forest-600); transform: none; box-shadow: none; }

/* ============ Back to top ============ */
.back-top {
  position: fixed;
  bottom: 28px;
  inset-inline-start: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--forest-800);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(27, 67, 50, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t-med) var(--ease);
  z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--forest-900); transform: translateY(-3px); }
.back-top svg { width: 22px; height: 22px; }

/* ============ Meta ============ */
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item svg { width: 15px; height: 15px; color: var(--forest-600); }
.meta .author { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--forest-800); }

.author-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ============ Article page ============ */
.article-hero { padding-block: 24px 8px; }

.article-title {
  font-size: clamp(1.8rem, 4.2vw, 2rem);
  margin-bottom: 20px;
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-block: 28px;
  aspect-ratio: 1264 / 848;
}

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

.article-cover figcaption {
  background: var(--cream-card);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 10px 16px;
}

.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }

/* TOC */
/* Scrolls with the page like any other widget. It is deliberately NOT sticky:
   a sticky element travels through its whole containing block (.sidebar), so it
   would slide down over the widgets beneath it. */
.widget-toc {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--forest-800);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title svg { width: 18px; height: 18px; color: var(--terracotta); }

.toc-list li + li { margin-top: 4px; }

.toc-list a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  border-inline-start: 3px solid transparent;
  transition: all var(--t-fast) var(--ease);
}

.toc-list a:hover { background: var(--sage-100); color: var(--forest-800); }

.toc-list a.active { background: var(--sage-100); color: var(--forest-800); border-inline-start-color: var(--terracotta); font-weight: 700; }

.toc-list .toc-h3 { padding-inline-start: 28px; font-size: 0.84rem; font-weight: 500; }
.toc-list .toc-h4 { padding-inline-start: 44px; font-size: 0.8rem; font-weight: 400; }

/* Article body */
.article-body {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 52px);
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
}

.article-body > * {
  max-width: 100%;
}

.article-body .lead { font-size: var(--fs-lead); color: var(--muted); font-weight: 500; }

.article-body p { color: #33453D; }

.article-body h2 {
  font-size: 1.35rem;
  color: var(--forest-800);
  margin-top: 1em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.article-body h3 { font-size: 1.25rem; color: var(--forest-700); }

.article-body ul { padding-inline-start: 0; display: grid; gap: 12px; }

.article-body ul li {
  padding-inline-start: 26px;
  position: relative;
  color: #33453D;
}

.article-body ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.75em;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--forest-600);
  transform: rotate(45deg);
}

.article-body ol { padding-inline-start: 1.5em; display: grid; gap: 12px; }
.article-body ol li { color: #33453D; }
.article-body ol li::marker { color: var(--terracotta); font-weight: 800; }

.article-body strong { color: var(--forest-800); }

.pull-quote {
  border-inline-start: 5px solid var(--terracotta);
  background: var(--terracotta-soft);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 2.2;
  color: #8A4B26;
  margin-block: 2em;
}

.pull-quote::before { content: '❝'; display: block; font-size: 2.4rem; color: var(--terracotta); line-height: 1; margin-bottom: 8px; }

.tip-box {
  background: var(--sage-100);
  border: 1px solid var(--forest-100);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-block: 2em;
}

.tip-box-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--forest-800);
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.tip-box-title svg { width: 22px; height: 22px; color: var(--forest-600); }
.tip-box ul li::before { background: var(--terracotta); }
.tip-box ul li { color: #2F5544; font-weight: 500; }

/* Article body images */
.article-body img {
	border-radius: 10px;
	margin-bottom: 15px;
	margin-top: 15px;
}

/* استایل کلی جدول با گوشه‌های گرد و سایه */
.article-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    text-align: right;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

/* استایل سلول‌ها */
.article-body th, 
.article-body td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

/* هدر جدول با رنگ سبز تیره */
.article-body th {
    background-color: #14452f;
    color: #ffffff;
    font-weight: bold;
}

/* حذف خط پایین آخرین ردیف برای حفظ گردی گوشه‌ها */
.article-body tr:last-child td {
    border-bottom: none;
}

/* رنگ پس‌زمینه برای ردیف‌های زوج جهت خوانایی بهتر */
.article-body tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* تنظیمات ریسپانسیو برای موبایل (اسکرول افقی) */
@media (max-width: 768px) {
    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .article-body th, 
    .article-body td {
        white-space: nowrap;
        min-width: 120px;
    }
}

/* Article footer */
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.share-row { display: flex; align-items: center; gap: 10px; }
.share-row .label { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--forest-700);
  border: 1px solid var(--border);
  transition: all var(--t-fast) var(--ease);
}
.share-btn:hover { background: var(--forest-800); color: #fff; transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; }

/* Author bio */
.author-bio {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  margin-top: 28px;
  box-shadow: var(--shadow-sm);
}

.author-bio .author-avatar { width: 72px; height: 72px; font-size: 1.6rem; }

.author-bio h4 { font-weight: 800; margin-bottom: 6px; }
.author-bio h4 span { font-weight: 500; color: var(--muted); font-size: 0.85rem; margin-inline-start: 8px; }
.author-bio p { font-size: 0.92rem; color: var(--muted); line-height: 2; }

/* ============ Comments ============ */
.comments-section {
  margin-top: 40px;
}

.comments-section h2 {
  font-size: 1.25rem;
  color: var(--forest-800);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.comment-form {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color var(--t-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--forest-600);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
  margin-bottom: 14px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.comment-item .comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-600), var(--forest-800));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  flex-shrink: 0;
}

.comment-name { font-weight: 800; color: var(--forest-800); font-size: 0.95rem; }
.comment-date { font-size: 0.78rem; color: var(--muted); margin-inline-start: auto; }
.comment-text { color: #33453D; font-size: 0.92rem; line-height: 2; }

/* Next article CTA */
.next-article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--forest-800), var(--forest-700));
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  color: #fff;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

.next-article::after { content: '←'; position: absolute; inset-inline-end: -10px; bottom: -20px; font-size: 6rem; color: rgba(255,255,255,0.08); line-height: 1; }

.next-article .label { font-size: 0.8rem; color: var(--gold); font-weight: 700; margin-bottom: 4px; display: block; }
.next-article h3 { color: #fff; font-size: 1.2rem; max-width: 520px; }
.next-article h3 a:hover { color: var(--gold); }

/* Sidebar widgets */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--forest-800);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 40px;
  height: 2px;
  background: var(--terracotta);
}

.popular-list li + li { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }

.popular-item { display: flex; align-items: center; gap: 14px; }
.popular-item:hover .popular-info h4 { color: var(--forest-600); }

.popular-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.popular-rank { font-weight: 800; color: var(--terracotta); font-size: 0.85rem; font-style: normal; }

.popular-info { flex: 1; min-width: 0; }
.popular-info h4 { font-size: 0.9rem; font-weight: 700; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular-info span { font-size: 0.78rem; color: var(--muted); }

.widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-tags a {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}
.widget-tags a:hover { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }

.widget-newsletter { background: linear-gradient(160deg, var(--sage-100), var(--forest-100)); border-color: transparent; }
.widget-newsletter p { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.widget-newsletter input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 10px;
  background: #fff;
}
.widget-newsletter input:focus { outline: none; border-color: var(--forest-600); }

/* ============ Category page ============ */
.category-hero {
  background: linear-gradient(135deg, var(--forest-800), var(--forest-600));
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 56px);
  color: #fff;
  margin-block: 18px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.category-hero::before { content: ''; position: absolute; top: -60px; inset-inline-end: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,0.06); }

.category-hero .cat-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.16);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.category-hero .cat-icon svg { width: 30px; height: 30px; }

.category-hero h1 { color: #fff; font-size: var(--fs-h2); margin-bottom: 8px; position: relative; z-index: 1; }
.category-hero p { color: rgba(255,255,255,0.85); max-width: 540px; position: relative; z-index: 1; font-size: 0.95rem; }

.cat-stats { display: flex; gap: 24px; margin-top: 20px; position: relative; z-index: 1; flex-wrap: wrap; }
.cat-stats span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.cat-stats svg { width: 16px; height: 16px; color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.chip:hover { border-color: var(--forest-600); color: var(--forest-700); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.chip.active { background: var(--forest-800); border-color: var(--forest-800); color: #fff; box-shadow: 0 4px 14px rgba(27, 67, 50, 0.2); }
.chip svg { width: 16px; height: 16px; }

.category-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.category-main { display: flex; flex-direction: column; gap: 24px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }

.pagination a, .pagination span {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  border-radius: 50%;
  background: var(--cream-card);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}

.pagination a:hover { border-color: var(--forest-600); color: var(--forest-700); transform: translateY(-2px); }
.pagination .current { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }

.pagination svg { width: 18px; height: 18px; }

.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ============ WordPress Alignments ============ */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1.5em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.alignnone { margin-bottom: 1.5em; }

.wp-caption {
  max-width: 100%;
  margin-bottom: 1.5em;
}

.wp-caption img { max-width: 100%; }
.wp-caption-text {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 8px 12px;
  background: var(--cream-card);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* WordPress gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 1.5em;
}

.gallery-item img { width: 100%; border-radius: var(--radius-sm); }

/* WordPress post password */
.post-password-form {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.post-password-form input[type="password"] {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  margin-inline: 8px;
}

.post-password-form input[type="submit"] {
  background: var(--forest-800);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Sticky post */
.sticky {
  position: relative;
}

.sticky::before {
  content: '📌';
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 3;
  font-size: 1.2rem;
}


/* ============================================================
   Post content typography
   ------------------------------------------------------------
   The global reset (* { margin: 0 }) and `ul, ol { list-style: none }`
   strip every default the editor relies on, and `a { color: inherit;
   text-decoration: none }` makes in-article links indistinguishable from
   body text. This section restores them for post content only.
   ============================================================ */

.article-content > * + * { margin-top: 1.5em; }

.article-content p,
.article-content li { color: #33453D; }

/* Links must be visible inside prose. */
.article-content a:not(.btn):not(.wp-block-button__link) {
  color: var(--forest-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease);
}

.article-content a:not(.btn):not(.wp-block-button__link):hover {
  color: var(--terracotta);
}

.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 { margin-top: 1.8em; margin-bottom: 0.6em; }

.article-content h4 { font-size: 1.1rem; color: var(--forest-700); }
.article-content h5, .article-content h6 { font-size: 1rem; color: var(--forest-700); }

/* Restore list markers stripped by the global reset. */
.article-content ul { list-style: disc; padding-inline-start: 1.4em; }
.article-content ol { list-style: decimal; padding-inline-start: 1.6em; }
.article-content li::marker { color: var(--terracotta); }
.article-content li + li { margin-top: 8px; }
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul { margin-top: 8px; }

.article-content blockquote {
  border-inline-start: 4px solid var(--forest-600);
  background: var(--sage-100);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-block: 1.8em;
  font-size: 1.05rem;
}

.article-content blockquote p + p { margin-top: 1em; }
.article-content blockquote cite { display: block; margin-top: 10px; font-size: 0.88rem; color: var(--muted); font-style: normal; }

.article-content figure { margin-block: 1.8em; }
.article-content figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); text-align: center; }

.article-content hr { border: 0; border-top: 1px solid var(--border); margin-block: 2.4em; }

.article-content code,
.article-content kbd {
  background: var(--sage-100);
  border: 1px solid var(--forest-100);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: embed;
}

.article-content pre {
  background: var(--forest-900);
  color: #EAF3ED;
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  margin-block: 1.8em;
}

.article-content pre code { background: none; border: 0; padding: 0; color: inherit; }

/* ============================================================
   Gutenberg block support
   ------------------------------------------------------------
   Core block styles are enqueued again (functions.php used to dequeue them
   wholesale). These rules cover what the theme adds on top: wide/full
   alignment, and a table override specific enough to beat core without
   removing core's CSS.
   ============================================================ */

.article-content .alignwide {
  width: auto;
  max-width: calc(100% + 2 * clamp(16px, 4vw, 48px));
  margin-inline: calc(-1 * clamp(16px, 4vw, 48px));
}

.article-content .alignfull {
  width: auto;
  max-width: calc(100% + 2 * clamp(28px, 4.5vw, 52px));
  margin-inline: calc(-1 * clamp(28px, 4.5vw, 52px));
}

.article-content .alignwide img,
.article-content .alignfull img { width: 100%; }

/* Theme table styling, scoped tightly enough to win against
   wp-block-library without dequeuing it. */
.article-content .wp-block-table > table,
.article-content figure.wp-block-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: right;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.article-content .wp-block-table th,
.article-content .wp-block-table td {
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid #ddd;
}

.article-content .wp-block-table th {
  background-color: #14452f;
  color: #ffffff;
}

.article-content .wp-block-table tr:last-child td { border-bottom: 0; }
.article-content .wp-block-table tr:nth-child(even) { background-color: var(--sage-100); }

/* Honeypot: off-screen for people, present for bots. */
.honeypot-field {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Newsletter form status message */
.newsletter-status { margin-top: 10px; font-size: 0.88rem; min-height: 1.2em; }
.newsletter-status.is-error { color: var(--terracotta); }
.newsletter-status.is-success { color: var(--forest-600); font-weight: 700; }
.newsletter .newsletter-status,
.footer-news .newsletter-status { color: #fff; }
.newsletter .newsletter-status.is-error,
.footer-news .newsletter-status.is-error { color: var(--gold); }

/* Required by the WordPress theme directory */
.bypostauthor > .comment-header .comment-name::after {
  content: '★';
  color: var(--gold);
  margin-inline-start: 6px;
}

.gallery-caption {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

/* Screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip link */
/* Must NOT also carry .screen-reader-text: that clips the link to 1x1px with
   no :focus escape, so it stayed invisible even when focused. */
.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-start: 0;
  z-index: 9999;
  background: var(--forest-800);
  color: #fff;
  padding: 10px 20px;
  border-end-end-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus,
.skip-link:focus-visible { top: 0; }

/* ============ 404 Page ============ */
.error404-content {
  text-align: center;
  padding-block: clamp(60px, 10vw, 120px);
}

.error404-content h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--terracotta);
  line-height: 1;
  margin-bottom: 16px;
}

.error404-content p {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .trending-list { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .story-lg { grid-column: span 7; }
  .story-md { grid-column: span 5; }
  .story-sm { grid-column: span 6; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout, .category-layout { grid-template-columns: 1fr; }
  .article-layout > .sidebar { align-self: auto; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .featured-cat-inner { grid-template-columns: repeat(2, 1fr); }
  .banner-primary { grid-column: span 2; }
}

@media (max-width: 768px) {
  :root { --header-h: 66px; }
  .menu-toggle { display: grid; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    background: var(--cream-card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(27, 67, 50, 0.12);
    padding: 16px;
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--t-med) var(--ease);
    z-index: 99;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }

  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { justify-content: center; font-size: 1rem; padding: 14px; }

  .header-actions .btn { display: none; }

  .hero-side { grid-template-columns: 1fr; }
  .trending-inner { grid-template-columns: 1fr; }
  .trending-list { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .story-lg, .story-md, .story-sm { grid-column: span 12; }
  .video-grid { grid-template-columns: 1fr; }
  .editor-note { grid-template-columns: 1fr; text-align: center; }
  .editor-note img { max-width: 220px; }
  .featured-cat-inner { grid-template-columns: 1fr; }
  .banner-primary { grid-column: span 1; }
  .newsletter-inner { grid-template-columns: 1fr; }
  .newsletter-form .field { flex-direction: column; background: transparent; box-shadow: none; gap: 10px; border-radius: 0; }
  .newsletter-form input { background: rgba(255,255,255,0.95); border-radius: 999px; padding: 14px 18px; width: 100%; }
  .newsletter-form .btn { width: 100%; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .author-bio { flex-direction: column; align-items: center; text-align: center; }
  .article-body { padding: 20px 16px; }
  .next-article { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 528px) {
  .cat-grid { grid-template-columns: 1fr; }
  .topbar-date { display: none; }
  .hero-stats { gap: 24px; }
  .article-footer { flex-direction: column; align-items: flex-start; }
  .category-hero { padding: 28px 20px; }
}

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