/*
Theme Name:  Znayesh
Theme URI:   https://znayesh.com.ua
Description: Warm, friendly lifestyle blog theme for znayesh.com.ua — 6 niches, category-section homepage, optimised for Ukrainian audience.
Version:     1.0.0
Author:      Znayesh Team
Text Domain: znayesh
*/

/* ══════════════════════════════════════════════════════════════════
   GOOGLE FONTS
══════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ══════════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════════ */
:root {
  /* Base palette */
  --bg:        #FDF9F5;
  --surface:   #FFFFFF;
  --surface2:  #F5EFE8;
  --surface3:  #EDE4DA;
  --border:    #E8DDD3;
  --border2:   #D4C4B4;
  --text:      #2C1810;
  --text2:     #5A3E30;
  --muted:     #9C7B68;
  --inverse:   #FFFFFF;

  /* Accent */
  --accent:    #CC2200;
  --accent-d:  #A81B00;
  --accent-lt: #FFF3F0;
  --accent-md: #FFCFC6;

  /* Category colours */
  --home:       #2E6B3E; --home-lt:   #EDF7F0; --home-md:   #BDE8CA; --home-d:   #1E4A2A;
  --repair:     #6B3F8C; --repair-lt: #F5EEFB; --repair-md: #DBC4F0; --repair-d: #4E2D68;
  --health:     #B5272A; --health-lt: #FEF0F0; --health-md: #F8C4C5; --health-d: #8C1B1E;
  --tech:       #1A5C8C; --tech-lt:   #EEF5FC; --tech-md:   #BDD9F0; --tech-d:   #0F3D5E;
  --auto:       #8C5A00; --auto-lt:   #FDF5E6; --auto-md:   #F0D898;  --auto-d:  #5E3C00;
  --beauty:     #8C1F5C; --beauty-lt: #FDF0F7; --beauty-md: #F0BDDC; --beauty-d: #651545;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-ui:      'Nunito', system-ui, sans-serif;

  /* Layout */
  --max-w:      1200px;
  --sidebar-w:  280px;
  --gap:        18px;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows */
  --sh-xs: 0 1px 4px rgba(44,24,16,.05);
  --sh-sm: 0 2px 12px rgba(44,24,16,.07);
  --sh-md: 0 6px 24px rgba(44,24,16,.13);
  --sh-lg: 0 12px 40px rgba(44,24,16,.16);

  /* Transitions */
  --ease: .18s ease;
}

/* ══════════════════════════════════════════════════════════════════
   RESET
══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }
table { border-collapse: collapse; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
══════════════════════════════════════════════════════════════════ */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

.l-main {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 36px;
  padding: 32px 0 60px;
  align-items: start;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
}

/* ══════════════════════════════════════════════════════════════════
   READING PROGRESS BAR
══════════════════════════════════════════════════════════════════ */
#znayesh-rbar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0;
  background: var(--accent);
  transition: width .08s linear;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════════ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 8px rgba(44,24,16,.06);
}

/* Top utility bar */
.header-util {
  border-bottom: 1px solid var(--border);
  height: 36px;
  display: flex; align-items: center;
}
.header-util-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-size: .75rem; color: var(--muted);
}
/* Social icons */
.header-socials { display: flex; align-items: center; gap: 2px; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  color: var(--muted);
  transition: color var(--ease), background var(--ease);
}
.social-icon:hover { color: var(--text); background: var(--surface2); }

/* Main header row */
.header-main-row {
  display: flex; align-items: center; gap: 20px;
  height: 64px;
}

/* Logo */
.site-logo {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700;
  color: var(--text); letter-spacing: -.03em;
  flex-shrink: 0; line-height: 1;
  transition: opacity var(--ease);
}
.site-logo:hover { opacity: .85; }
.site-logo .accent {
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 1px;
}

/* Social icons in utility bar */
.header-socials { display: flex; align-items: center; gap: 2px; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  color: var(--muted);
  transition: color var(--ease), background var(--ease);
}
.social-icon:hover { color: var(--text); background: var(--surface2); }

/* Primary nav — utility pages, sits right next to logo */
.primary-nav { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
.primary-nav a {
  font-size: .8rem; font-weight: 700;
  color: var(--text2); padding: 6px 11px;
  border-radius: var(--r-sm);
  transition: background var(--ease), color var(--ease);
  white-space: nowrap; letter-spacing: .01em;
}
.primary-nav a:hover,
.primary-nav a.current-menu-item { background: var(--surface2); color: var(--text); }

/* Search — pushed to far right */
.header-search-form {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 7px 14px;
  margin-left: auto;
  transition: border-color var(--ease);
}
.header-search-form:focus-within { border-color: var(--accent); }
.header-search-form input {
  background: none; border: none; outline: none;
  font-size: .875rem; color: var(--text); width: 160px;
}
.header-search-form input::placeholder { color: var(--muted); }
.header-search-form button {
  color: var(--muted); display: flex; align-items: center;
  padding: 0; transition: color var(--ease);
}
.header-search-form button:hover { color: var(--accent); }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px; padding: 6px;
  cursor: pointer; margin-left: auto;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 1px;
  transition: transform var(--ease), opacity var(--ease);
}

/* Category strip */
.cat-strip {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip-inner { display: flex; align-items: stretch; min-width: max-content; }
.cat-strip-link {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; height: 38px;
  font-size: .73rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease);
}
.cat-strip-link .cat-icon { font-size: 14px; }
.cat-strip-link:hover,
.cat-strip-link.active {
  color: var(--cat-color, var(--accent));
  border-bottom-color: var(--cat-color, var(--accent));
}

/* Mobile nav drawer */
.mob-nav {
  display: none; position: fixed; inset: 0; z-index: 300;
}
.mob-nav.open { display: block; }
.mob-nav-overlay {
  position: absolute; inset: 0;
  background: rgba(44,24,16,.5);
}
.mob-nav-drawer {
  position: absolute; top: 0; left: 0; bottom: 0; width: 300px;
  background: var(--surface); overflow-y: auto;
  display: flex; flex-direction: column;
}
.mob-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.mob-nav-close {
  font-size: 1.25rem; color: var(--muted); padding: 4px;
}
.mob-nav-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  font-weight: 700; font-size: .9375rem;
  border-bottom: 1px solid var(--border);
  color: var(--text2); transition: background var(--ease), color var(--ease);
}
.mob-nav-links a:hover { background: var(--surface2); color: var(--text); }

/* ══════════════════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 12px 0;
  font-size: .75rem; color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.breadcrumb a { color: var(--muted); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border2); }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════
   SECTION HEADING
══════════════════════════════════════════════════════════════════ */
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 10px;
}
.section-hd-inner { display: flex; align-items: center; gap: 10px; }
.section-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cat-color, var(--accent)); flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 700; color: var(--text);
}
.section-title em { font-style: normal; color: var(--cat-color, var(--accent)); }
.section-more {
  font-size: .75rem; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  transition: color var(--ease);
}
.section-more::after { content: '→'; }
.section-more:hover { color: var(--cat-color, var(--accent)); }

/* Section block spacing */
.section-block {
  padding: 28px 0 0;
  border-top: 2px solid var(--border);
}
.section-block + .section-block { margin-top: 0; }
.section-block:first-child { border-top: none; padding-top: 0; }

/* ══════════════════════════════════════════════════════════════════
   CATEGORY BADGE / TAG
══════════════════════════════════════════════════════════════════ */
.cat-badge {
  display: inline-block;
  font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--cat-lt, var(--accent-lt));
  color: var(--cat-color, var(--accent));
  transition: opacity var(--ease);
}
.cat-badge:hover { opacity: .8; }

/* Per-category colour helpers */
.cat-home    { --cat-color: var(--home);   --cat-lt: var(--home-lt); }
.cat-repair  { --cat-color: var(--repair); --cat-lt: var(--repair-lt); }
.cat-health  { --cat-color: var(--health); --cat-lt: var(--health-lt); }
.cat-tech    { --cat-color: var(--tech);   --cat-lt: var(--tech-lt); }
.cat-auto    { --cat-color: var(--auto);   --cat-lt: var(--auto-lt); }
.cat-beauty  { --cat-color: var(--beauty); --cat-lt: var(--beauty-lt); }

/* ══════════════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════════════ */

/* ── Standard card ── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }

.card-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--surface2); flex-shrink: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-family: var(--font-display);
  font-size: .975rem; font-weight: 600; line-height: 1.35;
  color: var(--text); margin: 7px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--ease);
}
.card:hover .card-title { color: var(--cat-color, var(--accent)); }
.card-excerpt {
  font-size: .85rem; color: var(--text2); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: .72rem; color: var(--muted);
}
.card-author { display: flex; align-items: center; gap: 6px; }
.card-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface2); border: 1.5px solid var(--border);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--muted);
}
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Lead card ── */
.card-lead {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
}
.card-lead:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.card-lead-thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--surface2); flex-shrink: 0; }
.card-lead-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-lead:hover .card-lead-thumb img { transform: scale(1.03); }
.card-lead-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.card-lead-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700; line-height: 1.3;
  color: var(--text); margin: 8px 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--ease);
}
.card-lead:hover .card-lead-title { color: var(--cat-color, var(--accent)); }
.card-lead-excerpt {
  font-size: .875rem; line-height: 1.65; color: var(--text2); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Horizontal card ── */
.card-h {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  display: grid; grid-template-columns: 90px 1fr;
  overflow: hidden;
  transition: box-shadow var(--ease);
}
.card-h:hover { box-shadow: var(--sh-sm); }
.card-h-thumb { overflow: hidden; background: var(--surface2); }
.card-h-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card-h:hover .card-h-thumb img { transform: scale(1.06); }
.card-h-body {
  padding: 10px 12px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card-h-title {
  font-family: var(--font-display);
  font-size: .825rem; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--ease);
}
.card-h:hover .card-h-title { color: var(--cat-color, var(--accent)); }
.card-h-meta { font-size: .68rem; color: var(--muted); margin-top: 5px; }

/* ── Numbered card (popular posts) ── */
.card-num {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.card-num:last-child { border-bottom: none; padding-bottom: 0; }
.card-num-n {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  color: var(--border2); line-height: 1; text-align: right; padding-top: 2px;
}
.card-num-title {
  font-size: .8rem; font-weight: 600; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--ease);
}
a:hover .card-num-title { color: var(--accent); }
.card-num-meta { font-size: .68rem; color: var(--muted); margin-top: 3px; }

/* ── Section layout (lead + 4 horizontal) ── */
.sec-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}
.sec-layout .card-lead { grid-row: span 2; }

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════════ */
.l-sidebar {
  display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 116px;
}

.widget {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.widget-header {
  padding: 11px 16px;
  background: var(--text); color: var(--inverse);
  font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.widget-body { padding: 14px 16px; }

/* Newsletter widget */
.widget-newsletter { padding: 20px 16px; text-align: center; }
.widget-nl-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-lt); margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.widget-newsletter h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.widget-newsletter p { font-size: .8rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.nl-input {
  width: 100%; padding: 9px 12px; margin-bottom: 8px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: .875rem; outline: none;
  transition: border-color var(--ease);
}
.nl-input:focus { border-color: var(--accent); }
.nl-submit {
  width: 100%; padding: 9px;
  background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 700; cursor: pointer;
  transition: background var(--ease);
}
.nl-submit:hover { background: var(--accent-d); }

/* Popular widget */
.widget-popular { padding: 6px 16px 14px; }
.pop-item {
  display: flex; gap: 10px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.pop-item:last-child { border-bottom: none; padding-bottom: 0; }
.pop-num {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  color: var(--border2); line-height: 1; flex-shrink: 0; width: 24px; text-align: right;
}
.pop-title {
  font-size: .8rem; font-weight: 600; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--ease);
}
.pop-item:hover .pop-title { color: var(--accent); }
.pop-meta { font-size: .68rem; color: var(--muted); margin-top: 3px; }

/* Category widget */
.widget-cats { padding: 6px 16px 14px; }
.widget-cat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: .825rem; transition: color var(--ease);
}
.widget-cat-item:last-child { border-bottom: none; }
.widget-cat-item:hover { color: var(--accent); }
.widget-cat-left { display: flex; align-items: center; gap: 8px; }
.widget-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.widget-cat-count {
  font-size: .72rem; color: var(--muted);
  background: var(--surface2); padding: 1px 8px; border-radius: 10px;
}

/* Tags widget */
.widget-tags { padding: 14px 16px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud-item {
  font-size: .7rem; font-weight: 700; padding: 4px 10px;
  border: 1.5px solid var(--border); border-radius: 20px;
  color: var(--muted); transition: all var(--ease); cursor: pointer;
}
.tag-cloud-item:hover { background: var(--text); border-color: var(--text); color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════════════════════════════ */
.single-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 36px;
  padding: 0 0 60px;
  align-items: start;
}

/* Article header */
.article-header { padding: 28px 0 0; }
.article-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
  color: var(--text); margin: 14px 0 16px;
}
.article-deck {
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 400; font-style: italic;
  color: var(--text2); line-height: 1.65;
  border-left: 3px solid var(--accent);
  padding-left: 16px; margin-bottom: 20px;
}
.article-byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: .8125rem; color: var(--muted);
}
.byline-author { display: flex; align-items: center; gap: 8px; }
.byline-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; border: 2px solid var(--border);
}
.byline-avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-name { font-weight: 700; color: var(--text); }
.byline-sep { color: var(--border2); }

/* Featured image */
.article-featured-img { margin: 24px 0; }
.article-featured-img img {
  width: 100%; max-height: 500px; object-fit: cover;
  border-radius: var(--r-md);
}
.article-featured-img figcaption {
  font-size: .75rem; color: var(--muted);
  padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px;
}

/* Article body */
.article-body {
  font-family: var(--font-display);
  font-size: 1.0625rem; line-height: 1.85;
  color: var(--text); max-width: 700px;
}
.article-body h2 {
  font-size: 1.5rem; font-weight: 700; line-height: 1.2;
  margin: 2em 0 .7em;
  padding-bottom: .5em; border-bottom: 2px solid var(--border);
  color: var(--text);
}
.article-body h3 {
  font-size: 1.2rem; font-weight: 700; line-height: 1.25;
  margin: 1.7em 0 .5em; color: var(--text);
}
.article-body h4 {
  font-family: var(--font-ui); font-size: .9375rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 1.4em 0 .4em; color: var(--text2);
}
.article-body p { margin-bottom: 1.5em; }
.article-body p:last-child { margin-bottom: 0; }
.article-body a { color: var(--tech); text-decoration: underline; text-decoration-thickness: 1px; }
.article-body a:hover { color: var(--accent); }
.article-body ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.5em; }
.article-body ol { list-style: decimal; padding-left: 1.5em; margin-bottom: 1.5em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote {
  margin: 2em 0; padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-lt); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic; font-size: 1.05rem; color: var(--text2); line-height: 1.7;
}
.article-body blockquote cite {
  display: block; margin-top: 8px;
  font-style: normal; font-size: .8rem;
  font-family: var(--font-ui); color: var(--muted);
}
.article-body img { border-radius: var(--r-sm); margin: 1.5em 0; }
.article-body hr { border: none; border-top: 2px solid var(--border); margin: 2.5em 0; }
.article-body table { width: 100%; margin: 1.5em 0; font-size: .9375rem; }
.article-body table th {
  font-family: var(--font-ui); font-size: .75rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  text-align: left; padding: 10px 14px;
  background: var(--surface2); border: 1px solid var(--border);
}
.article-body table td { padding: 10px 14px; border: 1px solid var(--border); }
.article-body table tr:nth-child(even) { background: var(--surface2); }

/* Key tip box */
.article-body .tip-box {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 20px; margin: 2em 0;
}
.article-body .tip-box strong {
  font-family: var(--font-ui); font-size: .75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent); display: block; margin-bottom: 6px;
}

/* TOC */
.article-toc {
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 16px 20px;
  margin: 0 0 2em; font-family: var(--font-ui);
}
.article-toc-title {
  font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 10px;
}
.article-toc ol { list-style: decimal; padding-left: 1.25em; }
.article-toc li { font-size: .875rem; margin-bottom: 4px; }
.article-toc a { color: var(--text2); transition: color var(--ease); }
.article-toc a:hover, .article-toc a.active { color: var(--accent); }

/* Share bar */
.article-share {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px 0; margin-top: 32px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.share-label {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 700;
  color: #fff; transition: opacity var(--ease);
}
.share-btn:hover { opacity: .85; }
.share-btn--tg { background: #229ED9; }
.share-btn--fb { background: #1877F2; }
.share-btn--tw { background: #000; }
.share-btn--copy {
  background: var(--surface2); color: var(--text);
  border: 1.5px solid var(--border);
}

/* Article tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.article-tag {
  font-size: .72rem; font-weight: 700; padding: 4px 12px;
  border: 1.5px solid var(--border); border-radius: 20px;
  color: var(--muted); transition: all var(--ease);
}
.article-tag:hover { background: var(--text); border-color: var(--text); color: #fff; }

/* Author box */
.author-box {
  display: grid; grid-template-columns: 72px 1fr; gap: 20px;
  align-items: start; padding: 24px;
  margin-top: 36px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); border-left: 4px solid var(--accent);
}
.author-box-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; border: 3px solid var(--border);
}
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box-name {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 6px;
}
.author-box-bio { font-size: .875rem; color: var(--text2); line-height: 1.6; }

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

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 40px 0;
}
.page-numbers {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 600; color: var(--muted);
  transition: all var(--ease);
}
.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.page-numbers.current {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 700;
}
.page-numbers.prev, .page-numbers.next { width: auto; padding: 0 14px; }
.page-numbers.dots { border: none; color: var(--muted); width: auto; }

/* Load more */
.load-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; margin-top: 28px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: .875rem; font-weight: 700; letter-spacing: .03em;
  color: var(--text); cursor: pointer;
  transition: all var(--ease);
}
.load-more-btn:hover { background: var(--text); border-color: var(--text); color: #fff; }
.load-more-btn:disabled { opacity: .45; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════
   CATEGORY / ARCHIVE PAGE HEADER
══════════════════════════════════════════════════════════════════ */
.archive-header {
  display: flex; align-items: center; gap: 16px;
  padding: 28px 0 20px;
  border-bottom: 3px solid var(--cat-color, var(--accent));
  margin-bottom: 28px;
}
.archive-icon { font-size: 2.25rem; line-height: 1; }
.archive-title {
  font-family: var(--font-display);
  font-size: 1.875rem; font-weight: 700;
  color: var(--cat-color, var(--text));
}
.archive-description {
  font-size: .9375rem; color: var(--muted); margin-top: 4px; line-height: 1.55;
  font-family: var(--font-ui);
}
.archive-count {
  font-size: .8rem; color: var(--muted); margin-top: 4px;
  font-family: var(--font-ui);
}

/* ══════════════════════════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════════════════════════ */
.search-header { padding: 28px 0 24px; border-bottom: 3px solid var(--text); margin-bottom: 28px; }
.search-label {
  font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; font-family: var(--font-ui);
}
.search-term {
  font-family: var(--font-display);
  font-size: 1.875rem; font-weight: 700; margin-bottom: 6px;
}
.search-count { font-size: .875rem; color: var(--muted); font-family: var(--font-ui); }
.search-no-results { text-align: center; padding: 60px 20px; }
.search-no-results .emoji { font-size: 4rem; margin-bottom: 16px; }
.search-no-results h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 10px;
}
.search-no-results p { color: var(--muted); font-family: var(--font-ui); margin-bottom: 24px; }
.search-form-inline {
  display: flex; gap: 0; max-width: 400px; margin: 0 auto;
}
.search-form-inline input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-size: .9375rem; outline: none;
  transition: border-color var(--ease);
}
.search-form-inline input:focus { border-color: var(--accent); }
.search-form-inline button {
  padding: 10px 20px;
  background: var(--accent); color: #fff;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-weight: 700; font-size: .875rem;
  transition: background var(--ease);
}
.search-form-inline button:hover { background: var(--accent-d); }

/* ══════════════════════════════════════════════════════════════════
   404 PAGE
══════════════════════════════════════════════════════════════════ */
.error-404-wrap {
  text-align: center; padding: 80px 20px 120px;
}
.error-404-num {
  font-family: var(--font-display); font-size: 7rem; font-weight: 700;
  line-height: 1; color: var(--surface2); letter-spacing: -.05em;
  -webkit-text-stroke: 2px var(--border2);
  margin-bottom: 16px;
}
.error-404-title {
  font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; margin-bottom: 12px;
}
.error-404-desc { color: var(--muted); font-family: var(--font-ui); margin-bottom: 32px; }
.btn-home {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; background: var(--accent); color: #fff;
  border-radius: var(--r-md); font-weight: 700; font-size: .9375rem;
  transition: background var(--ease);
}
.btn-home:hover { background: var(--accent-d); }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════ */
.site-footer { background: var(--text); color: rgba(255,255,255,.55); margin-top: 60px; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px; padding: 48px 0 40px;
}
.footer-logo {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  color: #fff; margin-bottom: 12px; display: inline-block;
}
.footer-logo .accent { color: var(--accent); }
.footer-tagline { font-size: .8125rem; line-height: 1.7; max-width: 240px; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-social-btn {
  padding: 6px 14px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px; font-size: .75rem; color: rgba(255,255,255,.55);
  transition: all var(--ease);
}
.footer-social-btn:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.footer-col h4 {
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col a {
  display: block; font-size: .8125rem; color: rgba(255,255,255,.45);
  margin-bottom: 8px; transition: color var(--ease);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .75rem;
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom a { color: rgba(255,255,255,.3); transition: color var(--ease); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ══════════════════════════════════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════════════════════════════════ */
#znayesh-btt {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(204,34,0,.35);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
  pointer-events: none;
}
#znayesh-btt.show { opacity: 1; transform: translateY(0); pointer-events: all; }
#znayesh-btt:hover { background: var(--accent-d); }

/* ══════════════════════════════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════════════════════════════ */
.comments-area { margin-top: 48px; }
.comments-title {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700;
  margin-bottom: 24px; padding-bottom: 10px;
  border-bottom: 3px solid var(--text);
}
.comment-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.comment-item {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; border: 2px solid var(--border);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author-name { font-weight: 700; font-size: .9rem; }
.comment-date { font-size: .75rem; color: var(--muted); }
.comment-awaiting { font-size: .8rem; color: var(--muted); font-style: italic; }
.comment-content { font-size: .9375rem; line-height: 1.7; }
.comment-reply-link {
  font-size: .75rem; font-weight: 700; color: var(--accent);
  margin-top: 8px; display: inline-block; transition: opacity var(--ease);
}
.comment-reply-link:hover { opacity: .7; }

/* Comment form */
.comment-form-title {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 3px solid var(--text);
}
.comment-form-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}
.form-input {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: .9375rem; outline: none; background: var(--surface);
  transition: border-color var(--ease);
}
.form-input:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  padding: 11px 28px; background: var(--accent); color: #fff;
  border-radius: var(--r-sm); font-weight: 700; font-size: .9375rem;
  cursor: pointer; transition: background var(--ease);
}
.form-submit:hover { background: var(--accent-d); }

/* ══════════════════════════════════════════════════════════════════
   PAGE CONTENT
══════════════════════════════════════════════════════════════════ */
.page-title {
  font-family: var(--font-display);
  font-size: 2.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
  padding: 28px 0 20px; border-bottom: 3px solid var(--text); margin-bottom: 32px;
}
.page-body { max-width: 760px; }
.page-body p { font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.8; margin-bottom: 1.5em; }
.page-body h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin: 2em 0 .7em; }
.page-body h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin: 1.7em 0 .5em; }
.page-body ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.5em; font-family: var(--font-display); font-size: 1.0625rem; line-height: 1.8; }
.page-body li { margin-bottom: .5em; }
.page-body a { color: var(--tech); text-decoration: underline; }
.page-body a:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .l-main, .single-wrap { grid-template-columns: 1fr; }
  .l-sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .primary-nav, .header-search-form { display: none; }
  .hamburger { display: flex; }
  .sec-layout { grid-template-columns: 1fr; }
  .sec-layout .card-lead { grid-row: auto; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .comment-form-fields { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .article-headline { font-size: 1.75rem; }
}

/* ══════════════════════════════════════════════════════════════════
   PRINT
══════════════════════════════════════════════════════════════════ */
@media print {
  .site-header, .cat-strip, .l-sidebar, .site-footer,
  #znayesh-btt, #znayesh-rbar, .article-share, .related-section { display: none !important; }
  .single-wrap { grid-template-columns: 1fr; }
  .article-body { max-width: 100%; }
}
