/*
Theme Name: HealthBlog
Theme URI: https://rvfdrb.ru
Author: rvfdrb
Author URI: https://rvfdrb.ru
Description: Современная тема для медицинского блога — широкая страница, сетка статей, без сайдбара
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: healthblog
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:    #2E7D32;
  --primary-dk: #1B5E20;
  --primary-lt: #E8F5E9;
  --accent:     #E53935;
  --accent-lt:  #FFEBEE;
  --text:       #1a1a1a;
  --text-mid:   #555;
  --text-light: #888;
  --border:     #e5e5e5;
  --bg:         #f7f7f7;
  --white:      #fff;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --shadow-h:   0 6px 24px rgba(0,0,0,.14);
  --container:  1360px;
  --gap:        28px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dk); }

/* =============================================
   CONTAINER
   ============================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
  background: var(--primary-dk);
  color: rgba(255,255,255,.85);
  font-size: 12.5px;
  padding: 7px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-item { display: flex; align-items: center; gap: 5px; }
.topbar-item svg { flex-shrink: 0; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-logo .logo-icon {
  width: 46px; height: 46px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(46,125,50,.3);
  transition: transform .25s;
}
.site-logo:hover .logo-icon { transform: rotate(5deg) scale(1.05); }
.logo-icon svg { width: 26px; height: 26px; fill: #fff; }
.logo-texts { display: flex; flex-direction: column; gap: 1px; }
.logo-name {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.3px;
  line-height: 1.1;
}
.logo-name span { color: var(--primary); }
.logo-tagline {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-light);
}

/* Search */
.header-search { position: relative; flex: 0 0 280px; }
.header-search input {
  width: 100%;
  padding: 9px 40px 9px 16px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,.12);
}
.header-search button {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-light);
  display: flex; align-items: center;
}
.header-search button:hover { color: var(--primary); }

/* Header CTA */
.header-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(229,57,53,.3);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.header-cta:hover {
  background: #c62828; color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(229,57,53,.4);
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  background: var(--primary);
  position: relative;
}
.site-nav .container { position: relative; }

.nav-menu {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 0;
}
.nav-menu > li > a {
  display: block;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 18px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Dropdown */
.nav-menu li { position: relative; }
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  min-width: 220px;
  list-style: none;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-h);
  z-index: 999;
  border-top: 3px solid var(--primary);
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text);
  transition: background .15s, color .15s;
}
.nav-menu .sub-menu li a:hover { background: var(--primary-lt); color: var(--primary); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: #fff;
}

/* =============================================
   HERO / BANNER (главная)
   ============================================= */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 60%, #43A047 100%);
  padding: 60px 0 50px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-text h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}
.hero-text h1 span { color: #A5D6A7; }
.hero-text p { font-size: 17px; opacity: .9; margin-bottom: 28px; max-width: 480px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary {
  background: #fff; color: var(--primary-dk);
  padding: 13px 30px; border-radius: 50px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.25); color: var(--primary-dk); }
.btn-hero-secondary {
  border: 2px solid rgba(255,255,255,.6); color: #fff;
  padding: 11px 26px; border-radius: 50px;
  font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.btn-hero-secondary:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* Hero stats */
.hero-stats {
  display: flex; gap: 32px; margin-top: 40px;
  padding-top: 30px; border-top: 1px solid rgba(255,255,255,.2);
}
.hero-stat-num { font-size: 30px; font-weight: 800; line-height: 1; }
.hero-stat-label { font-size: 12px; opacity: .75; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }

/* Hero image side */
.hero-cards { display: flex; flex-direction: column; gap: 14px; }
.hero-card {
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: background .2s, border-color .2s, transform .2s;
  color: #fff;
  text-decoration: none;
}
.hero-card:hover {
  background: rgba(255,255,255,.32);
  border-color: rgba(255,255,255,.7);
  transform: translateX(4px);
}
.hero-card-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(255,255,255,.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.hero-card-title { font-size: 15px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.hero-card-sub { font-size: 12px; color: rgba(255,255,255,.85); margin-top: 3px; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-light);
}
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border); }

/* =============================================
   MAIN LAYOUT
   ============================================= */
.site-content { padding: 40px 0 60px; }

.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--gap);
  align-items: start;
}
.content-wrap.no-sidebar { grid-template-columns: 1fr; }
.content-area { min-width: 0; }

/* =============================================
   CATEGORIES BAR (главная)
   ============================================= */
.cats-bar {
  background: var(--white);
  padding: 0;
  margin-bottom: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cats-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.cat-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  color: var(--text-mid);
  border-right: 1px solid var(--border);
  transition: background .2s, color .2s;
  cursor: pointer;
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary-lt);
  color: var(--primary);
}
.cat-pill .cat-icon { font-size: 18px; }

/* =============================================
   POST GRID
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.posts-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Post Card */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }

.post-card-thumb {
  position: relative; overflow: hidden;
  aspect-ratio: 16/10;
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-card-cat {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 10px; border-radius: 50px;
}
.post-card-cat a { color: #fff; }

.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.post-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12.5px; color: var(--text-light); margin-bottom: 10px;
}
.post-card-meta svg { width: 13px; height: 13px; }
.post-card-meta-item { display: flex; align-items: center; gap: 4px; }

.post-card-title {
  font-size: 16px; font-weight: 700; line-height: 1.4;
  color: var(--text); margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 13.5px; color: var(--text-mid); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1; margin-bottom: 16px;
}

.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  margin-top: auto;
}
.post-card-read {
  font-size: 13px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 5px;
  transition: gap .2s;
}
.post-card-read:hover { gap: 10px; }
.post-card-views { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }

/* Featured post (большая карточка) */
.post-card.featured {
  grid-column: span 2;
  flex-direction: row;
}
.post-card.featured .post-card-thumb {
  flex: 0 0 50%;
  aspect-ratio: auto;
}
.post-card.featured .post-card-title { font-size: 20px; }
.post-card.featured .post-card-excerpt { -webkit-line-clamp: 5; }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.section-title {
  font-size: 22px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  display: block; width: 5px; height: 24px;
  background: var(--primary); border-radius: 3px;
}
.section-all {
  font-size: 13.5px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 5px;
}
.section-all:hover { color: var(--primary-dk); }

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-header { margin-bottom: 28px; }
.single-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-lt); color: var(--primary);
  padding: 5px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 14px;
}
.single-cat-badge a { color: inherit; }
.entry-title {
  font-size: 34px; font-weight: 800; line-height: 1.25;
  color: var(--text); margin-bottom: 18px; letter-spacing: -.3px;
}
.entry-meta {
  display: flex; align-items: center; gap: 18px;
  font-size: 13px; color: var(--text-light);
  padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 24px; flex-wrap: wrap;
}
.entry-meta-item { display: flex; align-items: center; gap: 5px; }
.entry-meta-item strong { color: var(--text-mid); }

.entry-featured-img {
  margin-bottom: 28px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 16/7;
}
.entry-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* Article content */
.entry-content {
  font-size: 16.5px; line-height: 1.8; color: var(--text);
  max-width: 820px;
}
.entry-content h2 {
  font-size: 24px; font-weight: 800; margin: 36px 0 14px;
  color: var(--text); letter-spacing: -.2px;
  padding-left: 16px; border-left: 4px solid var(--primary);
}
.entry-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.entry-content h4 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px 24px; }
.entry-content li { margin-bottom: 8px; }
.entry-content strong { color: var(--text); }
.entry-content a { color: var(--primary); border-bottom: 1px solid rgba(46,125,50,.3); }
.entry-content a:hover { border-color: var(--primary); }
.entry-content blockquote {
  background: var(--primary-lt); border-left: 4px solid var(--primary);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0; font-style: italic; font-size: 16px;
}
.entry-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14.5px; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden;
}
.entry-content table th {
  background: var(--primary); color: #fff;
  padding: 11px 14px; text-align: left; font-weight: 600;
}
.entry-content table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.entry-content table tr:nth-child(even) td { background: var(--bg); }
.entry-content table tr:hover td { background: var(--primary-lt); }

/* =============================================
   SHARE BUTTONS
   ============================================= */
.share-box {
  margin: 36px 0;
  padding: 20px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.share-title { font-size: 14px; font-weight: 600; color: var(--text-mid); margin-bottom: 12px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 50px;
  font-size: 13.5px; font-weight: 500; color: #fff;
  transition: transform .2s, box-shadow .2s;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.2); color: #fff; }
.share-vk { background: #4C75A3; }
.share-tg { background: #0088cc; }
.share-ok { background: #EE8208; }
.share-wa { background: #25D366; }
.share-tw { background: #1DA1F2; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.widget-title {
  font-size: 15px; font-weight: 700;
  padding: 14px 18px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.widget-body { padding: 16px 18px; }

/* Search widget */
.widget-search { display: flex; gap: 0; }
.widget-search input {
  flex: 1; padding: 9px 14px; border: 1.5px solid var(--border);
  border-right: none; border-radius: var(--radius) 0 0 var(--radius);
  font-size: 14px; outline: none;
}
.widget-search input:focus { border-color: var(--primary); }
.widget-search button {
  padding: 9px 16px; background: var(--primary); color: #fff; border: none;
  border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 14px;
  transition: background .2s;
}
.widget-search button:hover { background: var(--primary-dk); }

/* Recent posts widget */
.recent-post-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.recent-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.recent-post-thumb {
  flex-shrink: 0; width: 72px; height: 56px;
  border-radius: 6px; overflow: hidden;
}
.recent-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post-thumb-placeholder {
  width: 72px; height: 56px; background: var(--primary-lt);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.recent-post-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--text); }
.recent-post-title a { color: inherit; }
.recent-post-title a:hover { color: var(--primary); }
.recent-post-date { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* Categories widget */
.cat-list { list-style: none; }
.cat-list li {
  border-bottom: 1px solid var(--border);
}
.cat-list li:last-child { border-bottom: none; }
.cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 14px; color: var(--text-mid);
  transition: color .2s;
}
.cat-list a:hover { color: var(--primary); }
.cat-count {
  background: var(--primary-lt); color: var(--primary);
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 50px;
}

/* Tags widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-mid); font-size: 12.5px;
  padding: 4px 12px; border-radius: 50px;
  transition: all .2s;
}
.tag-cloud a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; margin-top: 40px; flex-wrap: wrap;
}
.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); font-size: 14px; font-weight: 500;
  color: var(--text-mid); background: var(--white);
  border: 1.5px solid var(--border);
  transition: all .2s; cursor: pointer;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.page-btn.dots { border: none; background: none; cursor: default; }

/* =============================================
   RELATED POSTS
   ============================================= */
.related-posts { margin-top: 48px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* =============================================
   AUTHOR BOX
   ============================================= */
.author-box {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-top: 36px;
  display: flex; gap: 20px; align-items: flex-start;
}
.author-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-lt); display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--primary); overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.author-bio { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* =============================================
   POPULAR SECTION (горизонтальный список)
   ============================================= */
.popular-list { display: flex; flex-direction: column; gap: 16px; }
.popular-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.popular-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); }
.popular-num {
  font-size: 28px; font-weight: 900; color: var(--primary-lt);
  line-height: 1; flex-shrink: 0; width: 36px; text-align: center;
  font-style: italic;
}
.popular-thumb {
  width: 90px; height: 70px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
}
.popular-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.popular-title a { color: var(--text); }
.popular-title a:hover { color: var(--primary); }
.popular-meta { font-size: 12px; color: var(--text-light); margin-top: 5px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #1a1a1a; color: rgba(255,255,255,.8); margin-top: 60px;
}
.footer-top { padding: 52px 0 36px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
}
/* Если только 3 колонки (Контакты скрыты) */
.footer-grid > *:nth-child(3):last-child,
.footer-grid > *:nth-child(4):last-child {
  grid-column: auto;
}
.footer-widget-title {
  font-size: 15px; font-weight: 700; color: #fff;
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.footer-about p { font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo .logo-icon { width: 38px; height: 38px; border-radius: 10px; }
.footer-logo .logo-name { font-size: 18px; font-weight: 800; color: #fff; }
.footer-logo .logo-name span { color: #81C784; }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: rgba(255,255,255,.7); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: #fff; padding-left: 4px; }

.footer-contacts { display: flex; flex-direction: column; gap: 12px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 2px; opacity: .6; }

.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
  font-size: 15px; transition: background .2s, color .2s;
}
.footer-social-btn:hover { background: var(--primary); color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
}
.footer-bottom .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,.5); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,.5); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.85); }

/* =============================================
   COOKIE NOTICE
   ============================================= */
.cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #222; color: rgba(255,255,255,.85);
  padding: 16px 0; z-index: 9999;
  transform: translateY(100%);
  transition: transform .4s ease;
  border-top: 3px solid var(--primary);
}
.cookie-notice.visible { transform: translateY(0); }
.cookie-notice .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cookie-text { font-size: 14px; }
.cookie-text a { color: #81C784; }
.cookie-btn {
  background: var(--primary); color: #fff;
  border: none; padding: 9px 24px; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .2s;
}
.cookie-btn:hover { background: var(--primary-dk); }

/* =============================================
   SCROLL TO TOP
   ============================================= */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 888;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(46,125,50,.4);
  opacity: 0; transform: translateY(20px);
  transition: opacity .3s, transform .3s, background .2s;
  font-size: 18px;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-dk); }

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-24 { margin-top: 24px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
  :root { --container: 1060px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .hero-text h1 { font-size: 36px; }
}

@media (max-width: 992px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cards { display: none; }
  .posts-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { flex: 0 0 220px; }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .site-header .container { flex-wrap: wrap; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .header-search { flex: 1 1 100%; order: 3; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; align-items: center; }
  .nav-menu {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--primary-dk); z-index: 999;
    padding: 8px 0; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-menu .sub-menu {
    position: static; box-shadow: none; border-top: none;
    background: rgba(0,0,0,.2);
  }
  .hero-banner { padding: 36px 0 32px; }
  .hero-text h1 { font-size: 28px; }
  .hero-stats { gap: 20px; }
  .hero-stat-num { font-size: 24px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { flex-direction: column; grid-column: span 1; }
  .entry-title { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-btns { flex-direction: column; }
  .cats-bar-inner { overflow-x: auto; flex-wrap: nowrap; }
  .entry-content h2 { font-size: 20px; }
}
