/*
Theme Name: Рибалка Pro
Theme URI: https://tvoyarybalkashop.com.ua
Author: tvoyarybalkashop.com.ua
Author URI: https://tvoyarybalkashop.com.ua
Description: Професійна тема для риболовного блогу з категоріями, автоматичним змістом, налаштуванням через Customizer та стильним дизайном.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: rybalka-pro
Tags: blog, fishing, custom-colors, custom-logo, featured-images, full-site-editing, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks
*/

/* ===============================================================
   CSS ЗМІННІ ТА БАЗОВІ НАЛАШТУВАННЯ
   =============================================================== */

:root {
  /* Основна палітра — ліс, вода, земля */
  --color-primary:        #1b3d2f;   /* глибокий лісовий зелений */
  --color-secondary:      #1e4d6b;   /* вода — синьо-зелений */
  --color-accent:         #c8762a;   /* бурштинова риболовецька наживка */
  --color-accent-light:   #e09040;
  --color-bg:             #f4efe6;   /* тепле кремове полотно */
  --color-bg-alt:         #eae3d5;
  --color-surface:        #ffffff;
  --color-text:           #1c1c1c;
  --color-text-muted:     #5a5a5a;
  --color-text-light:     #888888;
  --color-border:         #d5cfc4;
  --color-border-light:   #ece7de;
  --color-overlay:        rgba(27,61,47,0.82);

  /* Типографіка */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Lora', Georgia, serif;
  --font-ui:       'Nunito Sans', 'Segoe UI', sans-serif;
  --font-mono:     'Fira Code', monospace;

  /* Розміри */
  --container-max:   1260px;
  --container-wide:  1440px;
  --radius-sm:       4px;
  --radius-md:       8px;
  --radius-lg:       16px;
  --radius-xl:       24px;
  --radius-pill:     9999px;

  /* Тіні */
  --shadow-sm:  0 2px 6px rgba(0,0,0,.06);
  --shadow-md:  0 4px 18px rgba(0,0,0,.10);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.14);
  --shadow-xl:  0 24px 60px rgba(0,0,0,.20);

  /* Переходи */
  --transition: all .28s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .55s cubic-bezier(.4,0,.2,1);
}

/* ===============================================================
   RESET & BASE
   =============================================================== */

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg) !important;
  -webkit-font-smoothing: antialiased;
}

#page, .site {
  width: 100%;
  position: relative;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-accent); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 700;
}

p { margin-bottom: 1.25em; }
ul, ol { padding-left: 1.5em; margin-bottom: 1.25em; }
li { margin-bottom: .35em; }

/* ===============================================================
   УТИЛІТИ
   =============================================================== */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--wide { max-width: var(--container-wide); }

.sr-only {
  position: absolute; width:1px; height:1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .65em 1.6em;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn--white {
  background: #fff;
  color: var(--color-primary);
}
.btn--white:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.tag {
  display: inline-block;
  padding: .2em .8em;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--color-primary);
  position: relative;
  padding-bottom: .6em;
  margin-bottom: 1.8rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px; height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}
.section-title.centered { text-align: center; }
.section-title.centered::after { left: 50%; transform: translateX(-50%); }

/* ===============================================================
   ШАПКА САЙТУ
   =============================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-primary);
  box-shadow: var(--shadow-lg);
  /* will-change / translateZ прибрано — створювали зайвий композитний шар,
     який перемальовувався поверх фону hero і викликав мерехтіння при скролі */
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,.25);
}

.header-top {
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: .45rem 0;
}
.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-top-info {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-ui);
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}
.header-top-info a { color: rgba(255,255,255,.65); }
.header-top-info a:hover { color: var(--color-accent-light); }
.header-top-info span { display: flex; align-items: center; gap: .35em; }

.header-social {
  display: flex;
  gap: .75rem;
}
.header-social a {
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  transition: var(--transition);
}
.header-social a:hover { color: var(--color-accent-light); transform: scale(1.15); }

.header-main {
  padding: .6rem 0;
}
.header-main .container {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1.25rem;
}

/* Логотип */
.site-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { height: 52px; width: auto; }
.site-logo-text {}
.site-logo-text .name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.site-logo-text .tagline {
  display: block;
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-top: .15rem;
}

/* Навігація */
.site-nav { display: flex; align-items: center; justify-content: center; }
.site-nav ul { display: flex; list-style: none; gap: .25rem; padding: 0; margin: 0; }
.site-nav li { position: relative; }
.site-nav a {
  display: flex;
  align-items: center;
  gap: .3em;
  padding: .45em .7em;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: var(--transition);
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Dropdown */
.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
  flex-direction: column;
  gap: 0;
}
.site-nav li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-nav .sub-menu li { width: 100%; }
.site-nav .sub-menu a {
  color: var(--color-text);
  padding: .5em 1em;
  font-size: .83rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: .6em;
}
.site-nav .sub-menu a:hover { background: var(--color-bg-alt); color: var(--color-primary); }

.menu-has-children > a::after {
  content: '▾';
  font-size: .65em;
  opacity: .7;
  margin-left: .2em;
}

/* Пошук у шапці */
.header-search { display: flex; align-items: center; }
.header-search form {
  display: flex;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
  transition: var(--transition);
}
.header-search form:focus-within {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.3);
}
.header-search input {
  background: none;
  border: none;
  padding: .45em 1em;
  color: #fff;
  font-family: var(--font-ui);
  font-size: .85rem;
  width: 180px;
  outline: none;
}
.header-search input::placeholder { color: rgba(255,255,255,.45); }
.header-search button {
  background: none;
  border: none;
  padding: .45em .85em;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: var(--transition);
  font-size: .9rem;
}
.header-search button:hover { color: var(--color-accent-light); }

/* Мобільне меню */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}
.mobile-menu-toggle:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ===============================================================
   HERO БАНЕР
   =============================================================== */

.hero-banner {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary);
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  z-index: 1;
  pointer-events: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
  z-index: 0;
}
/* Прибрано hover-ефект масштабування — він викликав мерехтіння */

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 80px 0;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1rem;
  background: rgba(200,118,42,.15);
  border: 1px solid rgba(200,118,42,.3);
  padding: .3em 1em;
  border-radius: var(--radius-pill);
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-title em { color: var(--color-accent-light); font-style: normal; }
.hero-subtitle {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Хвиляста нижня межа */
.hero-banner .wave-bottom {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
}
.hero-banner .wave-bottom svg { width: 100%; height: 60px; }

/* Скрол-індикатор */
.hero-scroll {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.hero-scroll .scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.5));
  animation: scrollPulse 1.6s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ===============================================================
   КАТЕГОРІЇ НА ГОЛОВНІЙ
   =============================================================== */

.categories-section { padding: 80px 0; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1100px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .categories-grid { grid-template-columns: 1fr; }
}

.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-xl);
}

.category-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.category-card:hover .category-card__img { transform: scale(1.08); }

.category-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(27,61,47,.92) 0%,
    rgba(27,61,47,.45) 50%,
    transparent 100%
  );
  transition: var(--transition);
}
.category-card:hover .category-card__overlay {
  background: linear-gradient(
    to top,
    rgba(27,61,47,.96) 0%,
    rgba(27,61,47,.55) 55%,
    transparent 100%
  );
}

.category-card__icon {
  position: absolute;
  top: 16px; left: 16px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  transition: var(--transition);
}
.category-card:hover .category-card__icon {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.category-card__body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
}
.category-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .3rem;
  line-height: 1.2;
}
.category-card__count {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  letter-spacing: .05em;
}
.category-card__arrow {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 34px; height: 34px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
}
.category-card:hover .category-card__arrow { opacity: 1; transform: translateX(0); }

/* ===============================================================
   КАРТКИ СТАТЕЙ
   =============================================================== */

.posts-section { padding: 0 0 80px; }

.posts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* Велика картка */
.post-card--featured {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.post-card--featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.post-card--featured .post-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: block;
  background: var(--color-primary);
}
.post-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__image img { transform: scale(1.04); }
.post-card--featured .post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.post-card--featured:hover .post-card__image img { transform: scale(1.05); }
.post-card--featured .post-card__body { padding: 2rem; }
.post-card--featured .post-card__title { font-size: 1.6rem; margin-bottom: .6rem; }

/* Список статей у боковому блоці */
.posts-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.post-card--compact {
  display: flex;
  gap: 1rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.post-card--compact:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.post-card--compact .post-card__image {
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
}
.post-card--compact .post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card--compact:hover .post-card__image img { transform: scale(1.08); }
.post-card--compact .post-card__body {
  padding: .85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-card--compact .post-card__title {
  font-size: .95rem;
  margin-bottom: .3rem;
  line-height: 1.3;
}

/* Спільні елементи картки */
.post-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .8rem;
}
.post-card__category { }
.post-card__date {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: .3em;
}
.post-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.25;
  margin-bottom: .6rem;
  transition: var(--transition);
}
a:hover .post-card__title,
.post-card--featured:hover .post-card__title { color: var(--color-secondary); }
.post-card__excerpt {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.post-card__read-time {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: .3em;
}

/* Сітка 3 колонки */
.posts-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.post-card--standard {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card--standard:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.post-card--standard .post-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.post-card--standard .post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card--standard:hover .post-card__image img { transform: scale(1.06); }
.post-card--standard .post-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card--standard .post-card__title { font-size: 1.1rem; }
.post-card--standard .post-card__excerpt { font-size: .85rem; flex: 1; }

/* No-photo картки */
.post-card__no-img {
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,.25);
}

/* ===============================================================
   БАНЕР «ПРО МАГАЗИН»
   =============================================================== */

.promo-banner {
  margin: 0 0 80px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  position: relative;
  padding: 60px;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.promo-banner::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.promo-banner__content { position: relative; z-index: 1; flex: 1; }
.promo-banner__eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: .75rem;
}
.promo-banner__title {
  font-size: 2rem;
  color: #fff;
  margin-bottom: .75rem;
}
.promo-banner__text {
  font-family: var(--font-ui);
  color: rgba(255,255,255,.75);
  margin-bottom: 1.5rem;
  max-width: 440px;
}
.promo-banner__image {
  position: relative; z-index: 1;
  flex-shrink: 0;
  width: 280px;
}
.promo-banner__image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }

/* ===============================================================
   ОДИНИЧНА СТАТТЯ
   =============================================================== */

.single-post { padding: 60px 0 80px; }
.single-post .container { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; padding-top: 2rem; }
.single-post-hero { display: block; }

/* Головне фото поста */
.single-post-hero {
  margin-bottom: 0;
}
.post-hero {
  position: relative;
  overflow: hidden;
  height: 220px;
  margin-bottom: 0;
}
.post-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.post-hero__no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}
.post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27,61,47,.8) 0%, transparent 55%);
}
.post-hero__caption {
  position: absolute;
  bottom: 2rem; left: 2rem; right: 2rem;
}
.post-hero__category { margin-bottom: .5rem; }
.post-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* Мета поста */
.post-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 2rem;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: .4em;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--color-text-muted);
}
.post-meta-item strong { color: var(--color-text); }
.post-meta-item .icon { color: var(--color-accent); font-size: .95rem; }

/* ТОК (Зміст) */
.toc-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}
.toc-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--color-accent);
  border-radius: 4px 0 0 4px;
}
.toc-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5em;
  cursor: pointer;
  user-select: none;
}
.toc-title .toc-icon { color: var(--color-accent); }
.toc-title .toc-toggle {
  margin-left: auto;
  font-size: .7rem;
  color: var(--color-text-light);
  transition: var(--transition);
}
.toc-box.collapsed .toc-list { display: none; }
.toc-box.collapsed .toc-toggle { transform: rotate(-90deg); }

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: .3rem; }
.toc-list a {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-start;
  gap: .5em;
  padding: .2em .4em;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1.4;
}
.toc-list a::before {
  content: '•';
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: .05em;
}
.toc-list a:hover { color: var(--color-primary); background: var(--color-border-light); }
.toc-list a.active { color: var(--color-accent); font-weight: 600; }
.toc-list .toc-h3 { padding-left: 1.2em; }
.toc-list .toc-h4 { padding-left: 2.4em; }

/* Тіло статті */
.post-content {
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--color-text);
}
.post-content h2 {
  font-size: 1.65rem;
  margin: 2.2em 0 .7em;
  padding-top: .5em;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-border-light);
  padding-bottom: .5em;
}
.post-content h3 { font-size: 1.28rem; margin: 1.8em 0 .6em; color: var(--color-secondary); }
.post-content h4 { font-size: 1.08rem; margin: 1.5em 0 .5em; }
.post-content ul { list-style: none; padding-left: 0; }
.post-content ul li {
  padding-left: 1.5em;
  position: relative;
  margin-bottom: .5em;
}
.post-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}
.post-content ol li { margin-bottom: .5em; }
.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--color-primary);
  font-size: 1.05rem;
}
.post-content blockquote cite {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--color-text-light);
  font-style: normal;
}
.post-content figure {
  margin: 2em 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.post-content figcaption {
  text-align: center;
  font-size: .82rem;
  color: var(--color-text-light);
  padding: .5rem 1rem;
  background: var(--color-bg-alt);
  font-family: var(--font-ui);
}
.post-content a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 3px; }
.post-content strong { color: var(--color-primary); }
.post-content code {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .1em .4em;
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--color-secondary);
}
.post-content pre {
  background: var(--color-primary);
  color: #d4f5d4;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .9rem;
  font-family: var(--font-ui);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.post-content th {
  background: var(--color-primary);
  color: #fff;
  padding: .75em 1em;
  text-align: left;
  font-weight: 700;
}
.post-content td {
  padding: .65em 1em;
  border-bottom: 1px solid var(--color-border-light);
}
.post-content tr:nth-child(even) td { background: var(--color-bg-alt); }
.post-content tr:last-child td { border-bottom: none; }

/* Info-box блоки */
.post-content .info-box,
.post-content .wp-block-info {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  border-left: 4px solid;
  font-size: .95rem;
}
.info-box--tip { background: rgba(30,77,107,.07); border-color: var(--color-secondary); }
.info-box--warning { background: rgba(200,118,42,.09); border-color: var(--color-accent); }
.info-box--success { background: rgba(27,61,47,.07); border-color: var(--color-primary); }

/* Теги поста */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 2.5rem 0;
}
.post-tags a {
  display: inline-block;
  padding: .3em .9em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.post-tags a:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Автор */
.post-author-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  border: 1px solid var(--color-border-light);
}
.post-author-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  flex-shrink: 0;
}
.post-author-info {}
.post-author-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: .25rem;
}
.post-author-role {
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .5rem;
}
.post-author-bio {
  font-size: .88rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Схожі статті */
.related-posts { margin-top: 3rem; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }

/* ===============================================================
   БІЧНА ПАНЕЛЬ ПОСТА
   =============================================================== */

.post-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.sidebar-widget__header {
  background: var(--color-primary);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sidebar-widget__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.sidebar-widget__icon { color: var(--color-accent-light); font-size: 1rem; }
.sidebar-widget__body { padding: 1.25rem; }

/* Популярні пости у сайдбарі */
.sidebar-post {
  display: flex;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post:hover { color: var(--color-secondary); }
.sidebar-post__img {
  width: 70px; height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-post__info {}
.sidebar-post__title {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: .2rem;
  transition: var(--transition);
}
.sidebar-post:hover .sidebar-post__title { color: var(--color-secondary); }
.sidebar-post__meta {
  font-family: var(--font-ui);
  font-size: .72rem;
  color: var(--color-text-light);
}

/* Категорії у сайдбарі */
.sidebar-categories { list-style: none; padding: 0; margin: 0; }
.sidebar-categories li {
  border-bottom: 1px solid var(--color-border-light);
}
.sidebar-categories li:last-child { border-bottom: none; }
.sidebar-categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 0;
  font-family: var(--font-ui);
  font-size: .88rem;
  color: var(--color-text);
  transition: var(--transition);
}
.sidebar-categories a:hover { color: var(--color-accent); padding-left: .5rem; }
.sidebar-categories .count {
  background: var(--color-bg-alt);
  border-radius: var(--radius-pill);
  padding: .1em .65em;
  font-size: .72rem;
  color: var(--color-text-light);
}

/* ===============================================================
   АРХІВ КАТЕГОРІЇ
   =============================================================== */

.category-header {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 60px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.category-header__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.category-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27,61,47,.9) 0%, rgba(27,61,47,.3) 60%, transparent 100%);
}
.category-header__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem;
}
.category-header__icon {
  font-size: 3rem;
  margin-bottom: .5rem;
}
.category-header__name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  margin-bottom: .5rem;
}
.category-header__description {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  max-width: 500px;
  font-family: var(--font-ui);
  margin: 0;
}

.category-archive { padding-bottom: 80px; }
.category-archive .container { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }

/* ===============================================================
   ПАГІНАЦІЯ
   =============================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
}
.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: .9rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}
.pagination a { color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.pagination a:hover { background: var(--color-primary); color: #fff; }
.pagination .current { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-md); }
.pagination .dots { color: var(--color-text-light); background: none; box-shadow: none; }

/* ===============================================================
   КОМЕНТАРІ
   =============================================================== */

.comments-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--color-border-light);
}
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-item { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border-light); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.comment-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-meta {}
.comment-author-name { font-weight: 700; color: var(--color-primary); font-family: var(--font-display); }
.comment-date { font-size: .78rem; color: var(--color-text-light); font-family: var(--font-ui); }
.comment-content { font-size: .95rem; line-height: 1.7; }

.comment-form-wrapper { }
.comment-form-title { font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--color-primary); }
.comment-form { display: grid; gap: 1rem; }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: var(--transition);
  outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(30,77,107,.12);
}
.comment-form textarea { min-height: 140px; resize: vertical; }

/* ===============================================================
   ПІДВАЛ
   =============================================================== */

.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.8);
  padding: 70px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 60px;
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.2rem;
  text-decoration: none;
}
.footer-logo img { height: 46px; }
.footer-logo-text .name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  font-weight: 700;
}
.footer-logo-text .tagline {
  font-size: .68rem;
  color: var(--color-accent-light);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.footer-desc {
  font-family: var(--font-ui);
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(255,255,255,.6);
  margin-bottom: 1.5rem;
}
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--color-accent); color: #fff; transform: translateY(-2px); }

.footer-col {}
.footer-col-title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: .6rem;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 2px;
  background: var(--color-accent);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a {
  font-family: var(--font-ui);
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  gap: .4em;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--color-accent-light); padding-left: .4rem; }
.footer-links a::before { content: '›'; font-size: 1rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-bottom-text {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-bottom-links a {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* ===============================================================
   ФОРМА ПІДПИСКИ
   =============================================================== */

.newsletter-section {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(255,255,255,.04) 0%, transparent 40%);
}
.newsletter-section .container { position: relative; z-index: 1; }
.newsletter-eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  color: var(--color-accent-light);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.newsletter-title { font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff; margin-bottom: .75rem; }
.newsletter-sub { font-family: var(--font-ui); color: rgba(255,255,255,.7); margin-bottom: 2rem; }
.newsletter-form {
  display: flex;
  gap: .75rem;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .9rem;
  outline: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form input:focus { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }

/* ===============================================================
   ХЛІБНІ КРИХТИ
   =============================================================== */

.breadcrumbs {
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--color-text-light);
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .sep { color: var(--color-border); font-size: .65rem; }
.breadcrumbs .current { color: var(--color-text); }

/* ===============================================================
   ПОВІДОМЛЕННЯ ТА СПОВІЩЕННЯ
   =============================================================== */

.site-notice {
  padding: .6rem 0;
  background: var(--color-accent);
  text-align: center;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: .03em;
}
.site-notice a { color: #fff; text-decoration: underline; }

/* ===============================================================
   404 СТОРІНКА
   =============================================================== */

.error-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}
.error-404__number {
  font-family: var(--font-display);
  font-size: 10rem;
  font-weight: 900;
  color: var(--color-border-light);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-404__title { font-size: 2rem; margin-bottom: 1rem; }
.error-404__text { color: var(--color-text-muted); margin-bottom: 2rem; }

/* ===============================================================
   ПОШУК
   =============================================================== */

.search-header {
  background: var(--color-primary);
  padding: 50px 0;
  text-align: center;
}
.search-header h1 { color: #fff; font-size: 2rem; margin-bottom: .5rem; }
.search-header p { color: rgba(255,255,255,.7); font-family: var(--font-ui); }
.search-form {
  display: flex;
  max-width: 500px;
  margin: 1.5rem auto 0;
  gap: .5rem;
}
.search-form input {
  flex: 1;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-family: var(--font-ui);
  outline: none;
}
.search-form input:focus { border-color: var(--color-accent-light); }
.search-form input::placeholder { color: rgba(255,255,255,.5); }

/* ===============================================================
   АДМІН-БАР ВІДСТУП
   =============================================================== */

.admin-bar .site-header { top: 32px; }
.admin-bar body { padding-top: 0 !important; }

/* ===============================================================
   МЕДІА-ЗАПИТИ (Адаптив)
   =============================================================== */

/* ================================================================
   RESPONSIVE — Desktop 1200 / Tablet 1024 / Tablet-sm 768 / Mobile 480
   ================================================================ */

/* ── Desktop wide (1200px+) ────────────────────────────────────── */
@media (max-width: 1200px) {
  .container { padding-inline: 1.5rem; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Tablet landscape (1100px) ─────────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .posts-grid-3 { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .header-search input { width: 130px; }
  .site-nav a { padding: .4em .6em; font-size: .78rem; white-space: nowrap; }
}

/* ── Tablet portrait (900px) ───────────────────────────────────── */
@media (max-width: 900px) {
  .single-post .container,
  .category-archive .container,
  .archive-layout,
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  /* Сайдбар поста НЕ ховаємо — він переходить під контент,
     інакше віджети (популярне, магазин, теги) повністю зникали */
  .post-sidebar { position: static; }
  .related-posts-grid { grid-template-columns: 1fr 1fr; }
  .promo-banner { flex-direction: column; padding: 2.5rem; text-align: center; }
  .promo-banner__image { width: 100%; max-width: 300px; margin: 0 auto; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .hero-banner { min-height: 480px; }
  .hero-content { padding: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .error-404-inner { grid-template-columns: 1fr; text-align: center; }
  .page-layout { padding: 2rem 0; }
}

/* ── Mobile landscape / small tablet (768px) ───────────────────── */
@media (max-width: 768px) {
  /* Header */
  .header-top { display: none; }
  .site-nav { display: none; }
  .header-search { display: none; }
  .mobile-menu-toggle { display: flex !important; }
  .header-main .container { grid-template-columns: auto 1fr auto; }

  /* Hero */
  .hero-banner { min-height: 380px; }
  .hero-title { font-size: 1.8rem; }
  .post-hero { height: 160px; }
  .post-hero__title { font-size: 1.4rem; }
  .post-hero__caption { left: 1.25rem; right: 1.25rem; bottom: 1.25rem; }

  /* Grids */
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .posts-grid, .posts-grid-3 { grid-template-columns: 1fr; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  /* Footer */
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  /* Forms */
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; }
  .comment-form-row { grid-template-columns: 1fr; }

  /* Shop */
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters-sidebar { position: static; }

  /* Misc */
  .breadcrumbs { font-size: .78rem; }
  .section-header { margin-bottom: 1.5rem; }
}

/* ── Mobile portrait (480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding-inline: 1rem; }
  .categories-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .category-card__name { font-size: 1rem; }
  .post-author-card { flex-direction: column; text-align: center; }
  .post-author-card .author-avatar { margin: 0 auto; }
  .hero-title { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .toc-box { padding: 1rem; }
  .comment-list .children { padding-left: 1rem; }
  .post-nav { flex-direction: column; gap: 1rem; }
  .post-nav a { width: 100%; }
  .share-buttons { flex-wrap: wrap; }
  .error-404-code { font-size: 5rem; }
  .error-404-links { flex-direction: column; }
}

/* ── Дуже малий (360px) ────────────────────────────────────────── */
@media (max-width: 360px) {
  .categories-grid { grid-template-columns: 1fr; }
  .post-card__title { font-size: 1rem; }
}

/* ===============================================================
   АНІМАЦІЇ / SCROLL REVEAL
   =============================================================== */

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* JS додає анімацію тільки якщо підтримується */
.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.js-reveal-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Затримки */
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ===============================================================
   КАСТОМІЗАТОР — Live Preview Helper Classes
   =============================================================== */

body.customizer-preview * { transition: background-color .3s, color .3s; }

/* ===============================================================
   МОБІЛЬНЕ МЕНЮ (overlay)
   =============================================================== */

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: min(360px, 90vw);
  height: 100vh;
  background: var(--color-primary);
  z-index: 9001;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  padding: 1.5rem;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}
.mobile-menu-close:hover { color: #fff; transform: rotate(90deg); }
.mobile-nav { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  color: rgba(255,255,255,.85);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.mobile-nav a:hover { color: var(--color-accent-light); }
.mobile-nav .sub-menu {
  list-style: none;
  padding: 0 0 .75rem 1rem;
  margin: 0;
  display: none;
}
.mobile-nav .sub-menu.open { display: block; }
.mobile-nav .sub-menu a {
  font-size: .9rem;
  font-weight: 400;
  padding: .5rem 0;
  color: rgba(255,255,255,.65);
}

/* ================================================================
   ДОПОВНЕННЯ: Сторінка, архів, пошук, 404, sidebar, коментарі
   ================================================================ */

/* ── PAGE ─────────────────────────────────────────────────────── */
.page-hero {
    min-height: 360px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2.5rem;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 40%, rgba(0,0,0,.2));
}
.page-hero-content { position: relative; z-index: 1; color: #fff; }
.page-hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin: .5rem 0 0; }
.page-title-bar { background: var(--color-forest); padding: 2.5rem 0; }
.page-title { color: #fff; margin: .5rem 0 0; font-size: 2rem; }
.page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; padding: 3rem 0; }
.page-article .entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--color-text); }
.page-article .entry-content h2 { color: var(--color-forest); margin: 2rem 0 .75rem; }
.page-article .entry-content h3 { color: var(--color-water); margin: 1.5rem 0 .5rem; }
.page-article .entry-content img { max-width: 100%; border-radius: 12px; margin: 1.5rem 0; }
.page-article .entry-content blockquote {
    border-left: 4px solid var(--color-amber);
    margin: 1.5rem 0;
    padding: .75rem 1.25rem;
    background: rgba(200,118,42,.07);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* ── ARCHIVE HEADER ───────────────────────────────────────────── */
.archive-header {
    background: var(--color-forest);
    min-height: 280px;
    display: flex;
    align-items: center;
    position: relative;
    padding: 3rem 0;
}
.archive-header-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.archive-header .container { position: relative; z-index: 1; }
.archive-header-content { color: #fff; }
.archive-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; margin-bottom: .5rem; }
.archive-title { font-size: clamp(1.5rem, 3vw, 2.2rem); color: #fff; margin: 0 0 .5rem; }
.archive-desc { color: rgba(255,255,255,.85); max-width: 600px; margin: 0; }
.archive-meta { display: flex; gap: 1rem; margin-top: 1rem; font-size: .85rem; opacity: .75; }
.archive-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; padding: 3rem 0; }
.archive-posts-area { min-width: 0; }
.no-posts { text-align: center; padding: 4rem 2rem; }
.no-posts-icon { font-size: 3rem; margin-bottom: 1rem; }
.no-posts h2 { color: var(--color-forest); margin-bottom: .75rem; }
/* ================================================================
   ТЕГ — АРХІВ (tag.php)
   ================================================================ */

.tag-archive-header {
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary) 45%, var(--color-secondary) 100%);
    padding: 2.5rem 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}
/* М'який патерн поверх, щоб прибрати ефект «обрізаного» синього кута */
.tag-archive-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 85% 50%, rgba(255,255,255,.06) 0%, transparent 55%);
    pointer-events: none;
}
.tag-archive-header > .container { position: relative; z-index: 1; }
.tag-archive-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: .75rem;
}
.tag-archive-icon {
    font-size: 3rem;
    flex-shrink: 0;
    line-height: 1;
}
.tag-archive-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.65);
    margin: 0 0 .2rem;
}
.tag-archive-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    margin: 0 0 .25rem;
    line-height: 1.15;
}
.tag-archive-count {
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    margin: 0;
}

.tag-archive-body {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}
.tag-archive-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}
.tag-posts-area { min-width: 0; }
.tag-posts-area .posts-grid-3 { margin-top: 0; }

/* No posts */
.tag-no-posts {
    text-align: center;
    padding: 3rem 1rem;
}
.tag-no-posts-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.tag-no-posts h2 { color: var(--color-primary); margin-bottom: .5rem; font-size: 1.4rem; }
.tag-no-posts p { color: var(--color-text-light); margin-bottom: 1rem; }
.tag-back-links { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* Aside виджети */
.tag-archive-aside { position: sticky; top: 90px; }
.tag-widget {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.tag-widget-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--color-accent);
}

/* Хмара тегів */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .75rem;
    border-radius: 100px;
    background: rgba(27,61,47,.07);
    color: var(--color-primary);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.tag-cloud-item:hover,
.tag-cloud-item--active {
    background: var(--color-primary);
    color: #fff;
}
.tag-cloud-count {
    font-size: .65rem;
    opacity: .7;
    font-weight: 400;
}

/* Категорії в aside */
.tag-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tag-cat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
    text-decoration: none;
    color: var(--color-text);
    font-size: .875rem;
    transition: color .15s;
}
.tag-cat-list li:last-child a { border-bottom: none; }
.tag-cat-list li a:hover { color: var(--color-primary); }
.tag-cat-count {
    background: rgba(27,61,47,.08);
    padding: .1rem .45rem;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
}

/* Популярні в aside */
.tag-popular-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
    text-decoration: none;
    color: var(--color-text);
    transition: color .15s;
}
.tag-popular-item:last-child { border-bottom: none; }
.tag-popular-item:hover { color: var(--color-primary); }
.tag-popular-num {
    width: 24px;
    height: 24px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: .15rem;
}
.tag-popular-title {
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.35;
}
.tag-popular-date {
    font-size: .72rem;
    color: var(--color-text-light);
    margin-top: .2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .tag-archive-layout { grid-template-columns: 1fr; }
    .tag-archive-aside { position: static; }
    .tag-cloud { max-height: 120px; overflow: hidden; }
    .tag-cloud.expanded { max-height: none; }
}
@media (max-width: 600px) {
    .tag-archive-meta { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .tag-archive-icon { font-size: 2rem; }
    .tag-archive-layout { gap: 1.5rem; }
    .tag-posts-area .posts-grid-3 { grid-template-columns: 1fr; }
}
