/*
Theme Name: Ціна Якість
Theme URI: https://cenakachestvo.com
Author: Cenakachestvo
Description: Сучасна тема для огляду товарів з підтримкою E-E-A-T, Polylang, Yoast SEO
Version: 1.0.2
License: Private
Text Domain: cena-kachestvo
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --color-red:        #D62828;
  --color-red-dark:   #B31E1E;
  --color-red-light:  #FFF5F5;
  --color-black:      #1A1A1A;
  --color-gray-dark:  #444444;
  --color-gray-mid:   #767676;
  --color-gray-light: #E8E8E8;
  --color-bg:         #FAFAF8;
  --color-white:      #FFFFFF;
  --color-border:     #EBEBEB;

  --font-display: 'Manrope', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);

  --container: 1200px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-black);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-red-dark); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--color-black); }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); margin: 2rem 0 1rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: 1.5rem 0 .75rem; }
p { margin-bottom: 1.25rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
li { margin-bottom: .4rem; }
blockquote { border-left: 4px solid var(--color-red); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--color-red-light); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-style: italic; }
table { border-collapse: collapse; max-width: 100%; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-family: var(--font-display); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-gray-mid); }
/* Responsive video */
.video-wrap { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1.5rem 0; border-radius: var(--radius-md); }
.video-wrap iframe, .video-wrap video, .video-wrap embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
/* WordPress image alignment */
.entry-content img.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content img.alignleft { float: left; margin: 0 1.5rem 1rem 0; max-width: 50%; }
.entry-content img.alignright { float: right; margin: 0 0 1rem 1.5rem; max-width: 50%; }
.entry-content img.alignnone, .entry-content img.alignfull { display: block; max-width: 100%; }
.entry-content figure.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.entry-content figure.alignleft { float: left; margin: 0 1.5rem 1rem 0; max-width: 50%; }
.entry-content figure.alignright { float: right; margin: 0 0 1rem 1.5rem; max-width: 50%; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text { font-size: .82rem; color: var(--color-gray-mid); text-align: center; margin-top: .4rem; }
.entry-content::after { content: ''; display: table; clear: both; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.site-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 2.5rem; align-items: start; padding: 2rem 0 3rem; }
.site-main { min-width: 0; }
@media (max-width: 1024px) { .site-layout { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* ============================================================
   HEADER
   ============================================================ */
.site-header { background: var(--color-white); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; overflow: visible; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo a { display: flex; align-items: center; line-height: 0; }
.site-logo img,
.site-logo a img,
.custom-logo,
.custom-logo-link img { height: 56px !important; width: auto !important; max-width: 240px !important; max-height: 56px !important; object-fit: contain !important; display: block !important; }
.header-search { flex: 0 1 320px; margin-left: auto; margin-right: 1rem; }
.header-search form { display: flex; align-items: center; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 24px; overflow: hidden; padding: 0 .5rem 0 1rem; }
.header-search input { border: none; background: transparent; padding: .5rem 0; font-size: .9rem; font-family: var(--font-body); color: var(--color-black); width: 100%; outline: none; }
.header-search button { background: none; border: none; cursor: pointer; padding: .4rem; color: var(--color-gray-mid); display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.tg-header-link { display: flex; align-items: center; gap: .4rem; background: #229ED9; color: #fff !important; border-radius: 20px; padding: .4rem .9rem; font-size: .82rem; font-weight: 600; white-space: nowrap; transition: background .2s; }
.tg-header-link:hover { background: #1A8BBF; color: #fff !important; }
.tg-header-link svg { width: 16px; height: 16px; }

/* Language bar */
.lang-bar { background: var(--color-red); }
.lang-bar-inner { display: flex; align-items: center; gap: .75rem; padding: .45rem 0; }
.lang-bar-label { color: rgba(255,255,255,.8); font-size: .82rem; }
.lang-bar a { color: #fff; font-size: .82rem; font-weight: 700; padding: .2rem .65rem; border-radius: 12px; transition: background .2s; display: flex; align-items: center; gap: .3rem; }
.lang-bar a.active, .lang-bar a:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Navigation */
.main-nav { background: var(--color-white); border-bottom: 2px solid var(--color-red); }
.nav-inner { display: flex; align-items: center; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; }
.main-nav ul li a { display: block; padding: .85rem 1.1rem; font-family: var(--font-display); font-size: .88rem; font-weight: 600; color: var(--color-black); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; white-space: nowrap; }
.main-nav ul li a:hover, .main-nav ul li.current-menu-item a { color: var(--color-red); border-bottom-color: var(--color-red); }

/* Hamburger — CSS only */
.hamburger-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: .5rem; }
.hamburger-label span { display: block; width: 24px; height: 2px; background: var(--color-black); border-radius: 2px; }
#nav-toggle { display: none; }
.nav-mobile-search { display: none; }

@media (max-width: 768px) {
  .hamburger-label { display: flex; } .header-search { display: none; } .tg-header-link { display: none; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-white); border-top: 1px solid var(--color-border); z-index: 99; }
  #nav-toggle:checked ~ * .main-nav { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul li a { padding: .9rem 1.5rem; border-bottom: 1px solid var(--color-border); border-right: none; margin-bottom: 0; }
  .nav-mobile-search { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--color-border); }
  .nav-mobile-search form { display: flex; align-items: center; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 24px; padding: 0 .5rem 0 1rem; }
  .nav-mobile-search input { border: none; background: transparent; padding: .5rem 0; font-size: .9rem; color: var(--color-black); width: 100%; outline: none; }
  .nav-mobile-search input::placeholder { color: var(--color-gray-mid); }
  .nav-mobile-search button { background: none; border: none; cursor: pointer; padding: .4rem; color: var(--color-gray-mid); display: flex; align-items: center; }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
/* Breadcrumbs — inline, no list */
.breadcrumbs { padding: .75rem 0; font-size: .82rem; color: var(--color-gray-mid); display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.breadcrumbs a { color: var(--color-gray-mid); }
.breadcrumbs a:hover { color: var(--color-red); }
.breadcrumbs .bc-sep { margin: 0 .35rem; color: var(--color-gray-light); font-size: .9rem; }
.breadcrumbs .bc-current { color: var(--color-black); }

/* Language switcher — Polylang override, no flags */
.lang-bar .pll-parent-menu-item { display: none !important; }
.lang-bar ul.pll-language-list { list-style: none !important; padding: 0 !important; margin: 0 !important; display: flex !important; gap: .5rem !important; align-items: center !important; }
.lang-bar ul.pll-language-list li { display: inline-flex !important; }
.lang-bar ul.pll-language-list li a { color: #fff !important; font-size: .82rem !important; font-weight: 700 !important; padding: .25rem .7rem !important; border-radius: 12px !important; transition: background .2s !important; text-decoration: none !important; }
.lang-bar ul.pll-language-list li a img { display: none !important; }
.lang-bar ul.pll-language-list li.current-lang a,
.lang-bar ul.pll-language-list li a:hover { background: rgba(255,255,255,.22) !important; color: #fff !important; }
/* Hide Polylang separators and bullets */
.lang-bar ul.pll-language-list li.pll-sep { display: none !important; }
.lang-bar ul.pll-language-list li::before { display: none !important; }
.lang-bar ul.pll-language-list li::marker { display: none !important; }
.lang-bar a.active { background: rgba(255,255,255,.22); }
.lang-bar a { border-radius: 12px; }

/* ============================================================
   ARTICLE
   ============================================================ */
.breadcrumbs { margin-bottom: .25rem; }
.entry-header { margin-bottom: 1.25rem; }
.entry-cat-link { display: inline-block; margin-bottom: .5rem; text-decoration: none; }
.entry-cat-link .cat-badge { background: var(--color-red); color: #fff; padding: .2rem .65rem; border-radius: 12px; font-size: .78rem; font-weight: 600; }
.entry-title { margin-top: .35rem; margin-bottom: .5rem; }
/* ── Entry meta row ─────────────────────────────────── */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  font-size: .82rem;
  color: var(--color-gray-mid);
  margin: .75rem 0 1.25rem;
  padding: .6rem .85rem;
  background: var(--color-bg-alt, #F8F8F8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
}
.entry-meta a { color: inherit; text-decoration: none; }
.entry-meta a:hover { color: var(--color-red); }

/* Розділювач між елементами */
.entry-meta > * + *::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: .9em;
  background: var(--color-border);
  margin-right: 1rem;
  vertical-align: middle;
}

/* Автор */
.entry-meta-author {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}
.entry-meta-author svg { flex-shrink: 0; opacity: .5; }
.entry-meta-author a { color: var(--color-text); font-weight: 600; }
.entry-meta-author a:hover { color: var(--color-red); }

/* Дата оновлення */
.entry-meta-date {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-gray-mid);
  white-space: nowrap;
}
.entry-meta-date svg { flex-shrink: 0; opacity: .5; }

/* Статистика (перегляди / час читання) */
.entry-meta-stats {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  font-size: .8rem;
  margin-left: auto;
}
.entry-meta-stats span { display: inline-flex; align-items: center; gap: .3rem; }
.entry-meta-stats svg { opacity: .45; flex-shrink: 0; }

/* Мобайл: stats переносяться на новий рядок, ширина 100% */
@media (max-width: 600px) {
  .entry-meta { gap: .45rem .75rem; padding: .55rem .7rem; }
  .entry-meta-stats { margin-left: 0; width: 100%; padding-top: .35rem; border-top: 1px solid var(--color-border); }
  .entry-meta-stats::before { display: none; }
}
.entry-featured-image { margin-bottom: 1.5rem; border-radius: var(--radius-lg); overflow: hidden; }
.entry-featured-image img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }

/* Reading progress */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--color-red); z-index: 9999; width: 0%; transition: width .1s linear; }

/* Entry stats (legacy fallback) */
.entry-stats { display: flex; align-items: center; gap: 1rem; font-size: .8rem; color: var(--color-gray-mid); }
.entry-stats span { display: flex; align-items: center; gap: .3rem; }

/* TOC */
.toc-box { background: var(--color-white); border: 1px solid var(--color-border); border-left: 4px solid var(--color-red); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 1.75rem 0; }
.toc-box .toc-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: .75rem; }
.toc-box ol { margin: 0; padding-left: 1.25rem; }
.toc-box ol li { margin-bottom: .35rem; }
.toc-box ol li a { color: var(--color-black); font-size: .88rem; }
.toc-box ol li a:hover { color: var(--color-red); }

/* ============================================================
   PRODUCTS WIDGET
   ============================================================ */
.products-widget { margin: 2rem 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow-x: auto; background: var(--color-white); }
.products-widget-header { background: var(--color-black); color: #fff; padding: .75rem 1.25rem; font-family: var(--font-display); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.product-row { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--color-border); transition: background .15s; }
.product-row:last-child { border-bottom: none; }
.product-row:hover { background: var(--color-bg); }
.product-rank { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: var(--color-gray-light); line-height: 1; text-align: center; }
.product-row:nth-child(-n+4) .product-rank { color: var(--color-red); }
.product-brand { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-red); display: block; }
.product-name { font-family: var(--font-display); font-size: .95rem; font-weight: 700; color: var(--color-black); line-height: 1.3; }
.product-price { font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; color: var(--color-black); white-space: nowrap; }
.product-btn { display: inline-flex; align-items: center; background: var(--color-red); color: #fff !important; padding: .5rem 1.1rem; border-radius: var(--radius-sm); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; box-shadow: 0 3px 0 var(--color-red-dark); transition: transform .15s, box-shadow .15s; }
.product-btn:hover { color: #fff !important; transform: translateY(1px); box-shadow: 0 2px 0 var(--color-red-dark); }

@media (max-width: 600px) {
  .product-row { grid-template-columns: 36px 1fr; grid-template-rows: auto auto; gap: .5rem; }
  .product-rank { grid-row: 1 / 3; }
  .product-price { grid-column: 2; }
  .product-btn { grid-column: 2; }


}

/* ============================================================
   PRODUCTS COMPARISON TABLE
   ============================================================ */
.ckt-wrap { margin: 2.5rem 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-white); overflow-x: auto; }
.ckt-header { background: var(--color-black); color: #fff; padding: .75rem 1.25rem; font-family: var(--font-display); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ckt-date { display: flex; align-items: center; gap: .4rem; background: #FFF8E1; border-bottom: 1px solid #FFE082; padding: .45rem 1.25rem; font-size: .82rem; color: #7B5800; }
.ckt-card { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); transition: background .15s; }
.ckt-card:last-child { border-bottom: none; }
.ckt-card:hover { background: var(--color-bg); }
.ckt-card-top { display: grid; grid-template-columns: 40px 1fr 120px; gap: 1rem; align-items: center; }
.ckt-rank { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--color-gray-light); text-align: center; line-height: 1; }
.ckt-card:nth-child(-n+5) .ckt-rank { color: var(--color-red); }
.ckt-info { min-width: 0; }
.ckt-brand { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-red); display: block; margin-bottom: .2rem; }
.ckt-name { font-family: var(--font-display); font-size: .95rem; font-weight: 700; color: var(--color-black); line-height: 1.3; }
.ckt-right { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; min-width: 0; }
.ckt-price { font-family: var(--font-display); font-size: 1.1rem; font-weight: 900; color: var(--color-black); white-space: nowrap; text-align: right; }
.ckt-stars { white-space: nowrap; text-align: right; }
.ckt-note { margin-top: .65rem; padding: .55rem .85rem; background: var(--color-bg); border-left: 3px solid var(--color-red); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .84rem; color: var(--color-gray-dark); line-height: 1.55; }
.ckt-footer { margin-top: .8rem; }
@media (max-width: 600px) {
  .ckt-card-top { grid-template-columns: 36px 1fr; }
  .ckt-right { flex-direction: row; align-items: center; gap: .75rem; margin-top: .4rem; grid-column: 1 / -1; }
}
.col-rank { font-family: var(--font-display); font-weight: 900; color: var(--color-red); font-size: 1rem; }
.stars { color: var(--color-red); }
.stars-empty { color: var(--color-gray-light); }
.table-btn { display: inline-block; background: var(--color-red); color: #fff !important; padding: .35rem .85rem; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 700; }
.table-btn:hover { background: var(--color-red-dark); color: #fff !important; }

/* ============================================================
   AUTHOR E-E-A-T BOX
   ============================================================ */
.author-box { display: flex; gap: 1.25rem; background: var(--color-white); border: 1px solid var(--color-border); border-top: 4px solid var(--color-red); border-radius: var(--radius-lg); padding: 1.5rem; margin: 2.5rem 0; }
.author-avatar img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--color-black); margin-bottom: .2rem; }
.author-role { font-size: .8rem; color: var(--color-red); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }
.author-bio { font-size: .88rem; color: var(--color-gray-dark); line-height: 1.6; margin: 0; }
.author-links { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.author-links a { font-size: .78rem; color: var(--color-gray-mid); border: 1px solid var(--color-border); padding: .2rem .6rem; border-radius: 12px; transition: border-color .2s, color .2s; }
.author-links a:hover { border-color: var(--color-red); color: var(--color-red); }
@media (max-width: 500px) { .author-box { flex-direction: column; } }

/* Author rating */
.author-rating-box { background: var(--color-red-light); border: 1px solid #FFCDD2; border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin: 2rem 0; display: flex; gap: 1rem; align-items: flex-start; }
.rating-avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rating-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--color-red); margin-bottom: .3rem; }
.rating-text { font-size: .9rem; color: var(--color-black); margin: 0; line-height: 1.6; }
.rating-date { font-size: .75rem; color: var(--color-gray-mid); margin-top: .4rem; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-block { margin: 2.5rem 0; }
.faq-block-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--color-red); }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: .6rem; overflow: hidden; background: var(--color-white); }
.faq-question { width: 100%; background: none; border: none; padding: 1rem 1.25rem; text-align: left; font-family: var(--font-display); font-size: .92rem; font-weight: 700; color: var(--color-black); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--color-red); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.25rem 1rem; font-size: .9rem; color: var(--color-gray-dark); line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   WHERE TO BUY
   ============================================================ */
.where-to-buy { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin: 2rem 0; }
.wtb-title { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: .85rem; }
.wtb-shops { display: flex; flex-wrap: wrap; gap: .5rem; }
.wtb-shop { display: inline-flex; align-items: center; gap: .35rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: .4rem .85rem; font-size: .85rem; font-weight: 600; color: var(--color-black); transition: border-color .2s, color .2s; }
.wtb-shop:hover { border-color: var(--color-red); color: var(--color-red); }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts { margin: 2.5rem 0; }
.related-posts-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.related-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.related-card-body { padding: .75rem 1rem; }
.related-card-title { font-family: var(--font-display); font-size: .88rem; font-weight: 700; color: var(--color-black); line-height: 1.4; }
.related-card:hover .related-card-title { color: var(--color-red); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 88px; }
.widget { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.5rem; }
.widget-title { font-family: var(--font-display); font-size: .88rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-gray-mid); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--color-red); }
.widget-post { display: flex; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--color-border); }
.widget-post:last-child { border-bottom: none; }
.widget-post img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.widget-post-title { font-size: .83rem; font-weight: 600; color: var(--color-black); line-height: 1.4; }
.widget-post-title:hover { color: var(--color-red); }

/* TG sidebar widget */
.tg-widget { background: var(--color-black); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; margin-bottom: 1.5rem; }
.tg-widget-icon { width: 48px; height: 48px; background: #229ED9; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto .75rem; }
.tg-widget-icon svg { width: 24px; height: 24px; fill: #fff; }
.tg-widget h3 { color: #fff; font-size: 1rem; margin-bottom: .4rem; }
.tg-widget p { color: rgba(255,255,255,.65); font-size: .82rem; margin-bottom: 1rem; }
.tg-widget a.tg-subscribe { display: inline-block; background: #229ED9; color: #fff !important; padding: .6rem 1.5rem; border-radius: 20px; font-size: .88rem; font-weight: 700; transition: background .2s; }
.tg-widget a.tg-subscribe:hover { background: #1A8BBF; }

/* ============================================================
   POST CARDS
   ============================================================ */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body { padding: 1.25rem; }
.post-card-cat { display: inline-block; background: var(--color-red); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem .6rem; border-radius: 10px; margin-bottom: .6rem; }
.post-card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--color-black); line-height: 1.4; margin-bottom: .6rem; }
.post-card:hover .post-card-title { color: var(--color-red); }
.post-card-meta { font-size: .78rem; color: var(--color-gray-mid); display: flex; gap: .75rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--color-black); color: rgba(255,255,255,.7); margin-top: 3rem; }
.footer-tg-bar { background: #229ED9; padding: 1.25rem 0; text-align: center; }
.footer-tg-bar a { display: inline-flex; align-items: center; gap: .6rem; color: #fff !important; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.footer-tg-bar svg { width: 20px; height: 20px; fill: #fff; }
.footer-main { padding: 2.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo img { height: 44px; width: auto; margin-bottom: .75rem; }
.footer-desc { font-size: .85rem; line-height: 1.6; color: rgba(255,255,255,.5); }
.footer-col-title { font-family: var(--font-display); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.35); margin-bottom: .75rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul li a { color: rgba(255,255,255,.55); font-size: .88rem; transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: rgba(255,255,255,.35); }
.footer-bottom a { color: rgba(255,255,255,.35); }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   UTILS
   ============================================================ */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ============================================================
   PAGE (статичні сторінки — без мета-даних статті)
   ============================================================ */
.page-article .entry-header { margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 2px solid var(--color-red); }
.page-article .entry-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-content { font-size: 1rem; line-height: 1.8; }
.page-content h2 { margin-top: 2rem; }
.page-content h3 { margin-top: 1.5rem; }
.page-content p { margin-bottom: 1.25rem; }
