/*
Theme Name: Pixelinform
Theme URI: https://pixelinform.com/
Author: Pixelinform Team
Author URI: https://pixelinform.com/
Description: Сучасна, швидка та SEO-оптимізована тема для новинного/медійного сайту. Створена на основі прототипу Pixelinform — мінімум JavaScript, максимум продуктивності, повна підтримка адаптивності, меню, віджетів, Customizer та структурованих даних (JSON-LD).
Version: 1.0.15
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pixelinform
Tags: news, magazine, blog, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, custom-colors, custom-background, two-columns, right-sidebar, full-width-template
*/

/* ── RESET & VARS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red: #E3001B;
  --dark: #111111;
  --mid: #444444;
  --light: #F5F5F3;
  --white: #FFFFFF;
  --border: #E8E8E6;
  --font: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max: 1160px;
  --gap: 24px;
}
html { font-size: 19px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--white); color: var(--dark); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 8px 14px; background: var(--dark); color: #fff; }
.skip-link:focus { left: 12px; top: 12px; }

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

/* ── TOPBAR ── */
.topbar { background: var(--dark); color: #aaa; font-size: 16px; letter-spacing: .04em; padding: 7px 0; }
.topbar-inner { max-width: var(--max); margin: auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-social { display: flex; align-items: center; }
.topbar-social a { color: #aaa; margin-left: 16px; display: inline-flex; align-items: center; transition: color .2s; }
.topbar-social a:hover { color: #fff; }

/* ── HEADER ── */
.site-header { background: var(--white); position: relative; z-index: 100; }
.header-inner { max-width: var(--max); margin: auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.logo { font-family: var(--font); font-size: 29px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; }
.logo-dot { width: 7px; height: 7px; background: var(--red); border-radius: 50%; display: inline-block; margin: 0 1px 2px; }
.logo-sub { color: #aaa; font-weight: 400; font-size: 18px; margin-left: 4px; }
.custom-logo { max-height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.main-nav li { list-style: none; padding: 0; margin: 0; display: inline-flex; align-items: center; }
.main-nav li::marker, .main-nav ul li::before { content: none; display: none; }
.main-nav a { font-size: 16px; font-weight: 600; padding: 7px 10px; border-radius: 4px; color: var(--mid); transition: background .18s, color .18s; white-space: nowrap; text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-cat > a { background: var(--dark); color: #fff; }
/* Footer menu inside .footer-links */
.footer-links ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; }
.footer-links li { list-style: none; padding: 0; margin: 0; }
.nav-search-btn, .nav-mobile-btn { background: none; border: none; cursor: pointer; color: var(--mid); padding: 6px 8px; display: inline-flex; }
.nav-mobile-btn { display: none; }

.nav-search-overlay { display: none; position: fixed; inset: 0; background: rgba(17,17,17,.92); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.nav-search-overlay.open { display: flex; }
.nav-search-overlay form { width: 100%; max-width: 640px; display: flex; }
.nav-search-overlay input { flex: 1; padding: 16px 20px; font-size: 22px; border: 2px solid #fff; border-right: none; border-radius: 8px 0 0 8px; background: transparent; color: #fff; outline: none; font-family: var(--font); }
.nav-search-overlay button { padding: 16px 24px; background: var(--red); color: #fff; border: 2px solid var(--red); border-radius: 0 8px 8px 0; cursor: pointer; font-size: 18px; font-weight: 700; font-family: var(--font); }
.nav-search-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; }

/* ── BREADCRUMB ── */
.breadcrumb { max-width: var(--max); margin: 20px auto 0; padding: 0 20px; display: flex; align-items: center; gap: 6px; font-size: 16px; color: #999; flex-wrap: wrap; }
.breadcrumb a { color: #999; transition: color .2s; }
.breadcrumb a:hover { color: var(--dark); }

/* ── CARDS ── */
.card { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); transition: box-shadow .22s, transform .22s; background: var(--white); }
.card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); transform: translateY(-3px); }
.card-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; flex-shrink: 0; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-tag { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--red); }
.card-body h3, .card-body h2 { font-family: var(--font); font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.card-body p { font-size: 17px; color: var(--mid); line-height: 1.6; flex: 1; }
.card-meta { font-size: 16px; color: #999; padding-top: 8px; }

.hcard { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--border); }
.hcard:last-child { border-bottom: none; }
.hcard-img { border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; background: #eee; position: relative; }
.hcard-img img { width: 100%; height: 100%; object-fit: cover; }
.hcard-body { display: flex; flex-direction: column; gap: 7px; }
.hcard-body h3, .hcard-body h2 { font-family: var(--font); font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.hcard-body p { font-size: 17px; color: var(--mid); line-height: 1.55; }
.hcard-meta { font-size: 16px; color: #999; }

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

/* ── SIDEBAR ── */
.two-col { max-width: var(--max); margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 32px; position: sticky; top: 24px; }
.widget { font-size: 16px; }
.sb-title, .widget-title { font-family: var(--font); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 2px solid var(--dark); margin-bottom: 16px; }
.sb-item { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sb-item:last-child { border-bottom: none; }
.sb-thumb { border-radius: 5px; overflow: hidden; aspect-ratio: 1; background: #eee; }
.sb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-info h5 { font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 3px; }
.sb-info span { font-size: 14px; color: #aaa; }
.sb-news { background: var(--dark); border-radius: 8px; padding: 22px; color: #fff; }
.sb-news h4 { font-family: var(--font); font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.sb-news p { font-size: 16px; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.sb-news input { width: 100%; padding: 9px 12px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-family: var(--font); font-size: 16px; outline: none; margin-bottom: 8px; }
.sb-news input::placeholder { color: rgba(255,255,255,.35); }
.sb-news button { width: 100%; padding: 10px; background: var(--red); color: #fff; border: none; border-radius: 5px; font-family: var(--font); font-size: 16px; font-weight: 700; cursor: pointer; }

/* Standard widget styles */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.widget li:last-child { border-bottom: none; }
.widget li a { color: var(--mid); font-size: 16px; transition: color .2s; }
.widget li a:hover { color: var(--red); }
.widget_search form, .search-form { display: flex; }
.widget_search input[type="search"], .search-form input[type="search"] { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-right: none; border-radius: 5px 0 0 5px; font-family: var(--font); font-size: 15px; outline: none; }
.widget_search input[type="search"]:focus, .search-form input[type="search"]:focus { border-color: var(--dark); }
.widget_search button, .search-form button { padding: 10px 16px; background: var(--dark); color: #fff; border: 1px solid var(--dark); border-radius: 0 5px 5px 0; cursor: pointer; font-family: var(--font); font-size: 15px; font-weight: 600; }

/* Tag cloud */
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tagcloud a { padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px !important; color: var(--mid); transition: background .15s, color .15s; }
.tagcloud a:hover { background: var(--dark); color: #fff; }

/* ── PAGINATION ── */
.pagination, .nav-links { display: flex; justify-content: center; gap: 6px; padding: 40px 20px; flex-wrap: wrap; }
.pagination a, .pagination span, .nav-links a, .nav-links span { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 5px; font-size: 17px; font-weight: 600; color: var(--mid); transition: background .18s, border-color .18s, color .18s; }
.pagination a:hover, .pagination .current, .nav-links a:hover, .nav-links .current { background: var(--dark); border-color: var(--dark); color: #fff; }

/* ── FOOTER ── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.55); padding: 48px 20px 24px; margin-top: 64px; }
.footer-inner { max-width: var(--max); margin: auto; }
.footer-top { display: grid; grid-template-columns: 200px repeat(4,1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 24px; }
.footer-logo { display: inline-block; font-family: var(--font); font-size: 22px; color: #fff; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; text-decoration: none; transition: opacity .2s; }
.footer-logo:hover { opacity: .8; }
.footer-desc { font-size: 16px; line-height: 1.65; }
.footer-col h5 { font-family: var(--font); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer-col a, .footer-col li a { display: block; font-size: 16px; padding: 3px 0; color: rgba(255,255,255,.55); transition: color .2s; text-decoration: none; }
.footer-col a:hover, .footer-col li a:hover { color: #fff; }
.footer-col ul, .footer-col .footer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.footer-col li, .footer-col .footer-menu li { list-style: none; padding: 0; margin: 0; border: none; }
.footer-col li::marker, .footer-col .footer-menu li::marker { content: none; display: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 14px; flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { color: rgba(255,255,255,.45); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; border: 1px solid rgba(255,255,255,.15); transition: background .2s, color .2s; }
.footer-social a:hover { background: rgba(255,255,255,.1); color: #fff; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.4); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ── PLACEHOLDER COLORS ── */
.ph-green { background: linear-gradient(135deg,#d5e8d4,#b8d4b7); }
.ph-blue  { background: linear-gradient(135deg,#d4dde8,#b7c6d4); }
.ph-warm  { background: linear-gradient(135deg,#e8ddd4,#d4c4b7); }
.ph-night { background: linear-gradient(135deg,#2a2540,#1a1530); }
.ph-food  { background: linear-gradient(135deg,#e8d4c4,#d4b8a0); }
.ph-pink  { background: linear-gradient(135deg,#e8c4d4,#d4a0b8); }
.ph-peach { background: linear-gradient(135deg,#f0e0d0,#e0c8b0); }
.ph-teal  { background: linear-gradient(135deg,#c4e8e4,#a0d4d0); }

/* ════════════════════════════════════════
   CATEGORY / ARCHIVE
════════════════════════════════════════ */
.cat-banner { background: var(--white); padding: 40px 20px 32px; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.cat-banner-inner { max-width: var(--max); margin: auto; position: relative; }
.cat-banner-label { display: inline-block; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border-radius: 3px; margin-bottom: 14px; font-family: var(--font); }
.cat-banner h1 { font-family: var(--font); font-size: 48px; font-weight: 800; color: var(--dark); letter-spacing: -.03em; line-height: 1.15; margin-bottom: 12px; }
.cat-banner p { font-size: 19px; color: var(--mid); max-width: 720px; line-height: 1.6; margin-bottom: 0; }

.cat-filters { max-width: var(--max); margin: 0 auto; padding: 28px 20px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.filter-label { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #aaa; margin-right: 4px; }
.filter-btn { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--white); font-family: var(--font); font-size: 16px; font-weight: 600; color: var(--mid); cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; text-decoration: none; }
.filter-btn:hover { border-color: #aaa; }
.filter-btn.active { background: var(--dark); border-color: var(--dark); color: #fff; }
.filter-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 16px; color: #aaa; }
.filter-sort select { font-family: var(--font); font-size: 16px; color: var(--dark); border: 1px solid var(--border); border-radius: 5px; padding: 5px 10px; outline: none; cursor: pointer; }

.cat-featured { max-width: var(--max); margin: 28px auto 0; padding: 0 20px; display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap); }
.cat-feat-main { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; display: block; }
.cat-feat-main > .feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat-feat-main > .feat-bg img { width: 100%; height: 100%; object-fit: cover; }
.cat-feat-main-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 40%, transparent 80%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.cat-feat-main-overlay .cat-tag-wh, .cat-feat-sm-ov .cat-tag-wh { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; width: fit-content; margin-bottom: 10px; }
.cat-feat-main-overlay h2 { font-family: var(--font); font-size: 29px; font-weight: 800; color: #fff; line-height: 1.28; letter-spacing: -.02em; margin-bottom: 8px; }
.cat-feat-main-overlay .meta { color: rgba(255,255,255,.6); font-size: 16px; }
.cat-feat-side { display: flex; flex-direction: column; gap: var(--gap); }
.cat-feat-sm { position: relative; border-radius: 8px; overflow: hidden; flex: 1; min-height: 140px; display: block; }
.cat-feat-sm > .feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat-feat-sm > .feat-bg img { width: 100%; height: 100%; object-fit: cover; }
.cat-feat-sm-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 50%, transparent 85%); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.cat-feat-sm-ov .cat-tag-wh { font-size: 11px; padding: 2px 7px; margin-bottom: 6px; }
.cat-feat-sm-ov h3 { font-family: var(--font); font-size: 18px; font-weight: 700; color: #fff; line-height: 1.35; }
.cat-feat-sm-ov .meta { color: rgba(255,255,255,.55); font-size: 14px; margin-top: 5px; }

.cat-wrap { max-width: var(--max); margin: 36px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.cat-main { min-width: 0; }
.cat-list-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--dark); }
.cat-list-hd h2 { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.cat-count { font-size: 16px; color: #aaa; }

/* ════════════════════════════════════════
   SEARCH
════════════════════════════════════════ */
.search-hero { background: var(--light); border-bottom: 1px solid var(--border); padding: 40px 20px; }
.search-hero-inner { max-width: var(--max); margin: auto; }
.search-hero h1 { font-family: var(--font); font-size: 33px; font-weight: 800; margin-bottom: 20px; letter-spacing: -.02em; }
.search-box, .err-search { display: flex; gap: 0; max-width: 640px; }
.search-input, .err-search input { flex: 1; padding: 14px 20px; font-family: var(--font); font-size: 19px; border: 2px solid var(--dark); border-right: none; border-radius: 8px 0 0 8px; outline: none; background: var(--white); }
.search-input:focus, .err-search input:focus { border-color: var(--red); }
.search-submit, .err-search button { padding: 14px 24px; background: var(--dark); color: #fff; border: 2px solid var(--dark); border-radius: 0 8px 8px 0; font-family: var(--font); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .2s; }
.search-submit:hover, .err-search button:hover { background: var(--red); border-color: var(--red); }
.search-meta { margin-top: 14px; font-size: 17px; color: #888; }
.search-meta strong { color: var(--dark); font-weight: 700; }

.search-wrap { max-width: var(--max); margin: 36px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.search-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }

.search-result { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--border); align-items: start; }
.search-result:last-child { border-bottom: none; }
.sr-img { border-radius: 6px; overflow: hidden; aspect-ratio: 16/10; background: #eee; }
.sr-img img { width: 100%; height: 100%; object-fit: cover; }
.sr-body { display: flex; flex-direction: column; gap: 6px; }
.sr-body .cat-tag { font-size: 13px; }
.sr-body h3, .sr-body h2 { font-family: var(--font); font-size: 20px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.sr-body h3 em, .sr-body h2 em, .sr-body p em { color: var(--red); font-style: normal; background: rgba(227,0,27,.08); border-radius: 2px; padding: 0 2px; }
.sr-body p { font-size: 17px; color: var(--mid); line-height: 1.55; }
.sr-body .meta { font-size: 14px; color: #aaa; }

.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-family: var(--font); font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.no-results p { font-size: 18px; color: #aaa; margin-bottom: 24px; }
.no-results-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.no-results-tags a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 16px; font-weight: 600; color: var(--mid); transition: background .15s, color .15s; }
.no-results-tags a:hover { background: var(--dark); color: #fff; }

/* ════════════════════════════════════════
   AUTHOR
════════════════════════════════════════ */
.author-hero { background: var(--light); border-bottom: 1px solid var(--border); padding: 48px 20px 40px; }
.author-hero-inner { max-width: var(--max); margin: auto; display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.author-avatar-lg { width: 110px; height: 110px; border-radius: 50%; background: linear-gradient(135deg,#e0d8f0,#c8bce8); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 43px; font-weight: 800; color: #7b5ea7; border: 4px solid var(--white); box-shadow: 0 4px 20px rgba(0,0,0,.1); overflow: hidden; }
.author-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-meta { flex: 1; min-width: 280px; }
.author-role { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.author-meta h1 { font-family: var(--font); font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.author-bio { font-size: 19px; color: var(--mid); line-height: 1.65; max-width: 560px; margin-bottom: 20px; }
.author-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.author-stat { display: flex; flex-direction: column; }
.author-stat strong { font-size: 24px; font-weight: 800; line-height: 1; }
.author-stat span { font-size: 14px; color: #aaa; margin-top: 3px; }
.author-social { display: flex; gap: 8px; margin-top: 20px; }
.author-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); color: var(--mid); transition: background .18s, border-color .18s, color .18s; }
.author-social a:hover { background: var(--dark); border-color: var(--dark); color: #fff; }

.author-wrap { max-width: var(--max); margin: 36px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.author-list-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--dark); }
.author-list-hd h2 { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.author-list-hd h2::before { content: ''; width: 4px; height: 16px; background: var(--red); border-radius: 2px; }

/* ════════════════════════════════════════
   404
════════════════════════════════════════ */
.page-404 { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.err-inner { max-width: 560px; margin: auto; text-align: center; }
.err-code { font-family: var(--font); font-size: 143px; font-weight: 800; line-height: 1; letter-spacing: -.06em; color: var(--light); position: relative; display: inline-block; margin-bottom: 8px; }
.err-code::after { content: '404'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dark); font-size: 143px; letter-spacing: -.06em; -webkit-text-stroke: 2px var(--dark); -webkit-text-fill-color: transparent; }
.err-title { font-family: var(--font); font-size: 33px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.err-text { font-size: 19px; color: var(--mid); line-height: 1.65; margin-bottom: 32px; }
.err-search { margin: 0 auto 28px; }
.err-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.err-link { padding: 10px 20px; border-radius: 6px; font-size: 17px; font-weight: 600; transition: background .18s, color .18s; }
.err-link.primary { background: var(--dark); color: #fff; }
.err-link.primary:hover { background: var(--red); }
.err-link.secondary { border: 1px solid var(--border); color: var(--mid); }
.err-link.secondary:hover { border-color: var(--dark); color: var(--dark); }

.err-popular { max-width: var(--max); margin: 0 auto 64px; padding: 0 20px; }
.err-popular h3 { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 2px solid var(--dark); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.err-popular h3::before { content: ''; width: 4px; height: 16px; background: var(--red); border-radius: 2px; }

/* ════════════════════════════════════════
   ABOUT + CONTACT
════════════════════════════════════════ */
.about-hero { background: var(--dark); padding: 72px 20px 64px; position: relative; overflow: hidden; }
.about-hero::before { content: ''; position: absolute; right: -100px; top: -80px; width: 500px; height: 500px; border-radius: 50%; background: rgba(227,0,27,.08); }
.about-hero-inner { max-width: var(--max); margin: auto; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-hero h1 { font-family: var(--font); font-size: 52px; font-weight: 800; color: #fff; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 20px; }
.about-hero h1 span { color: var(--red); }
.about-hero p { font-size: 20px; color: rgba(255,255,255,.65); line-height: 1.7; margin-bottom: 28px; }
.about-hero-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.about-num { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 20px; }
.about-num strong { font-family: var(--font); font-size: 38px; font-weight: 800; color: #fff; display: block; line-height: 1; margin-bottom: 6px; }
.about-num strong span { color: var(--red); }
.about-num em { font-size: 16px; color: rgba(255,255,255,.5); font-style: normal; }
.about-hero-img { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; }

.about-body { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.about-section { padding: 56px 0 48px; border-bottom: 1px solid var(--border); }
.about-section:last-of-type { border-bottom: none; }
.about-section-label { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.about-section h2 { font-family: var(--font); font-size: 33px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 16px; line-height: 1.25; }
.about-section p { font-size: 19px; color: var(--mid); line-height: 1.75; margin-bottom: 16px; max-width: 680px; }
.about-section p:last-child { margin-bottom: 0; }

.values-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 32px; }
.value-card { background: var(--light); border-radius: 10px; padding: 24px; }
.value-icon { width: 40px; height: 40px; background: var(--dark); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.value-card h4 { font-family: var(--font); font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.value-card p { font-size: 17px; color: var(--mid); line-height: 1.6; margin: 0; }

.team-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 32px; }
.team-card { text-align: center; }
.team-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 29px; font-weight: 800; overflow: hidden; }
.team-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.team-card h4 { font-family: var(--font); font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.team-card span { font-size: 16px; color: #aaa; }
.team-card .team-social { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.team-social a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); color: #aaa; font-size: 14px; transition: background .18s, color .18s; }
.team-social a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 32px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item-icon { width: 40px; height: 40px; background: var(--light); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--mid); }
.contact-item-body h4 { font-family: var(--font); font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.contact-item-body p { font-size: 17px; color: var(--mid); line-height: 1.5; }
.contact-item-body a { color: var(--red); font-weight: 600; }

.contact-form { background: var(--light); border-radius: 12px; padding: 32px; }
.contact-form h3 { font-family: var(--font); font-size: 24px; font-weight: 800; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 16px; font-weight: 600; color: var(--mid); }
.form-group input, .form-group textarea, .form-group select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 17px;
  outline: none;
  background: var(--white);
  transition: border-color .18s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--dark); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit { width: 100%; padding: 13px; background: var(--dark); color: #fff; border: none; border-radius: 6px; font-family: var(--font); font-size: 18px; font-weight: 700; cursor: pointer; transition: background .2s; }
.form-submit:hover { background: var(--red); }

/* ════════════════════════════════════════
   SINGLE POST (redesigned 1.0.3)
════════════════════════════════════════ */
.single-two-col { max-width: var(--max); margin: 24px auto 0; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.single-main { min-width: 0; }
.single-side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 24px; }

.single-header { padding: 8px 0 22px; }
.single-header .cat-badge { display: inline-block; background: var(--red); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; margin-bottom: 16px; font-family: var(--font); }
.single-header h1 { font-family: var(--font); font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 20px; color: var(--dark); }
.single-header .lead { font-size: 24px; color: var(--mid); line-height: 1.65; font-weight: 400; padding: 0 0 0 20px; border-left: 3px solid var(--red); margin-bottom: 26px; }

.single-meta-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.single-meta-row .author-mini { display: flex; align-items: center; gap: 10px; }
.single-meta-row .author-mini-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg,#e0d8f0,#c8bce8); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 16px; font-weight: 700; color: #7b5ea7; flex-shrink: 0; }
.single-meta-row .author-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.single-meta-row .author-info { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.single-meta-row .author-info strong { color: var(--dark); font-weight: 700; font-size: 18px; }
.single-meta-row .author-info time { font-size: 16px; color: #999; }
.single-meta-row .reading-time { font-size: 16px; color: #999; display: inline-flex; align-items: center; gap: 6px; }
.single-meta-row .meta-divider { width: 1px; height: 28px; background: var(--border); }
.single-meta-row .share-block { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.single-meta-row .share-label { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #aaa; }

.entry-share { display: flex; gap: 6px; }
.entry-share a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; color: #fff; transition: opacity .2s, transform .15s; }
.entry-share a:hover { opacity: .85; transform: translateY(-1px); }
.entry-share a.s-fb { background: #1877F2; }
.entry-share a.s-tg { background: #229ED9; }
.entry-share a.s-tw { background: #000000; }
.entry-share a.s-ml { background: var(--mid); }

.single-feat { margin: 8px 0 28px; }
.single-feat img { width: 100%; height: auto; border-radius: 8px; }
.single-feat figcaption { font-size: 14px; color: #888; margin-top: 8px; }

.entry-content { font-size: 21px; line-height: 1.82; color: #222; }
.entry-content p { margin-bottom: 24px; }
.entry-content h2 { font-family: var(--font); font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--dark); margin: 42px 0 16px; line-height: 1.3; scroll-margin-top: 24px; }
.entry-content h3 { font-family: var(--font); font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--dark); margin: 34px 0 12px; scroll-margin-top: 24px; }
.entry-content h4 { font-family: var(--font); font-size: 21px; font-weight: 700; margin: 28px 0 10px; }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--dark); }
.entry-content strong { font-weight: 700; }
.entry-content blockquote { background: var(--light); border-left: 4px solid var(--red); padding: 22px 26px; margin: 34px 0; font-size: 24px; font-style: italic; color: var(--mid); line-height: 1.65; border-radius: 0 8px 8px 0; }
.entry-content blockquote cite { display: block; margin-top: 12px; font-size: 16px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #aaa; }
.entry-content blockquote cite::before { content: '— '; }
.entry-content ul, .entry-content ol { margin: 0 0 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.entry-content ol li { font-size: 21px; padding-left: 6px; }
.entry-content ol li::marker { font-family: var(--font); font-weight: 700; color: var(--red); font-size: 19px; }
.entry-content ul li { font-size: 21px; }
.entry-content img, .entry-content figure { margin: 30px 0; max-width: 100%; height: auto; border-radius: 8px; overflow: hidden; }
.entry-content figcaption { font-size: 16px; color: #aaa; margin-top: 9px; text-align: center; font-style: italic; }
.entry-content code { background: var(--light); padding: 2px 6px; border-radius: 3px; font-size: .9em; }
.entry-content pre { background: var(--dark); color: #eee; padding: 16px; border-radius: 6px; overflow-x: auto; margin: 28px 0; }

/* Callout / tip-box (.callout = "ПРАВИЛО ШЕФА" yellow style) */
.entry-content .callout, .entry-content .wp-block-group.callout, .entry-content .tip-box {
	background: #fffbf0; border: 1px solid #ffe066; border-radius: 8px;
	padding: 20px 24px; margin: 30px 0; font-size: 20px; line-height: 1.65;
}
.entry-content .callout > p:first-child strong:first-child,
.entry-content .callout-title,
.entry-content .tip-box strong:first-child {
	display: block; font-family: var(--font); font-size: 14px; font-weight: 800;
	letter-spacing: .08em; text-transform: uppercase; color: #b88800; margin-bottom: 7px;
}
.entry-content .callout p { margin-bottom: .6em; font-size: 20px; }
.entry-content .callout p:last-child { margin-bottom: 0; }
.entry-content .callout-info { background: #E0F2FE; border-color: #93C5FD; }
.entry-content .callout-info .callout-title, .entry-content .callout-info > p:first-child strong:first-child { color: #1E40AF; }
.entry-content .callout-success { background: #DCFCE7; border-color: #86EFAC; }
.entry-content .callout-success .callout-title, .entry-content .callout-success > p:first-child strong:first-child { color: #166534; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 38px 0 0; padding-top: 28px; border-top: 1px solid var(--border); align-items: center; }
.entry-tags-label { font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #999; margin-right: 4px; }
.entry-tags a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 16px; font-weight: 600; color: var(--mid); transition: background .18s, border-color .18s, color .18s; }
.entry-tags a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

.author-box { display: flex; gap: 20px; align-items: flex-start; background: var(--light); border-radius: 10px; padding: 24px; margin-top: 38px; }
.author-box-avatar { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg,#e0d8f0,#c8bce8); display: flex; align-items: center; justify-content: center; font-family: var(--font); font-size: 26px; font-weight: 700; color: #7b5ea7; flex-shrink: 0; }
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box-body h4 { font-family: var(--font); font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.author-box-body .author-role-mini { font-size: 14px; color: var(--red); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: 8px; }
.author-box-body p { font-size: 18px; color: var(--mid); line-height: 1.6; }

.related-posts { max-width: var(--max); margin: 56px auto 0; padding: 0 20px; }
.related-hd { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.related-hd::before { content: ''; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }

/* TOC widget — same style for desktop sidebar and mobile inline */
.toc-widget {
	background: var(--light); border-radius: 8px; padding: 18px 20px;
}
.toc-widget h4 {
	font-family: var(--font); font-size: 14px; font-weight: 700;
	letter-spacing: .07em; text-transform: uppercase; color: #999;
	margin-bottom: 12px;
}
.toc-widget ol {
	list-style: none; counter-reset: toc-counter; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 9px;
}
.toc-widget li {
	counter-increment: toc-counter;
	display: flex; align-items: flex-start; gap: 8px; font-size: 16px;
	border: none; padding: 0;
}
.toc-widget li::before {
	content: counter(toc-counter);
	font-family: var(--font); font-size: 14px; font-weight: 700;
	color: var(--red); min-width: 18px; padding-top: 2px;
}
.toc-widget li a {
	color: var(--mid); transition: color .18s; line-height: 1.45;
}
.toc-widget li a:hover { color: var(--dark); }

/* Toggle: show TOC in sidebar on desktop, above article on mobile */
.toc-mobile { display: none; margin-bottom: 28px; }
@media (max-width: 1024px) {
	.toc-desktop { display: none !important; }
	.toc-mobile  { display: block; }
}

.side-block { display: flex; flex-direction: column; }
.side-block-title {
	font-family: var(--font); font-size: 14px; font-weight: 800;
	letter-spacing: .07em; text-transform: uppercase;
	margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--dark);
	display: flex; align-items: center; gap: 10px;
}
.side-block-title::before {
	content: ''; width: 4px; height: 16px; background: var(--red); border-radius: 2px;
}

/* Reusable popular item */
.sidebar .sb-item, .sidebar .sidebar-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.sidebar .sb-item:last-child, .sidebar .sidebar-item:last-child { border-bottom: none; }
.single-side .sb-item, .single-side .sidebar-item { padding: 11px 0; border-bottom: 1px solid var(--border); }
.single-side .sb-item:last-child, .single-side .sidebar-item:last-child { border-bottom: none; }

@media (max-width: 1024px) {
	.single-two-col { grid-template-columns: 1fr; gap: 32px; }
	.single-side { position: static; }
}
@media (max-width: 768px) {
	.single-header h1 { font-size: 32px; }
	.single-header .lead { font-size: 18px; }
	.single-meta-row .share-block { margin-left: 0; width: 100%; }
	.author-box { grid-template-columns: 60px 1fr; padding: 20px; }
	.author-box-avatar { width: 60px; height: 60px; font-size: 22px; }
}
@media (max-width: 520px) {
	.single-header h1 { font-size: 28px; }
	.single-header .lead { font-size: 19px; }
	.entry-content { font-size: 19px; line-height: 1.7; }
	.entry-content p { margin-bottom: 20px; }
	.entry-content h2 { font-size: 24px; margin: 32px 0 12px; }
	.entry-content h3 { font-size: 21px; margin: 26px 0 10px; }
	.entry-content h4 { font-size: 19px; }
	.entry-content blockquote { font-size: 19px; padding: 18px 20px; line-height: 1.55; }
	.entry-content blockquote cite { font-size: 14px; }
	.entry-content ol li, .entry-content ul li { font-size: 19px; }
	.entry-content .callout, .entry-content .tip-box { font-size: 18px; padding: 16px 18px; }
	.entry-content .callout p { font-size: 18px; }
}

/* ── COMMENTS ── */
.comments-area { max-width: 820px; margin: 48px auto 0; padding: 0 20px; }
.comments-title { font-family: var(--font); font-size: 24px; font-weight: 800; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--dark); }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment-list .children { list-style: none; padding-left: 32px; margin-top: 18px; border-left: 2px solid var(--border); }
.comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-author img { border-radius: 50%; width: 40px; height: 40px; }
.comment-author cite { font-style: normal; font-weight: 700; }
.comment-meta { font-size: 13px; color: #999; }
.comment-content { font-size: 17px; color: var(--mid); line-height: 1.6; }
.comment-reply-link { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--red); font-weight: 600; }

.comment-respond h3 { font-family: var(--font); font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.comment-form { display: flex; flex-direction: column; gap: 14px; }
.comment-form label { font-size: 14px; font-weight: 600; color: var(--mid); display: block; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px; font-family: var(--font); font-size: 17px; outline: none; background: var(--white); transition: border-color .18s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--dark); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .form-submit input { padding: 12px 24px; background: var(--dark); color: #fff; border: none; border-radius: 6px; font-family: var(--font); font-size: 17px; font-weight: 700; cursor: pointer; transition: background .2s; width: auto; }
.comment-form .form-submit input:hover { background: var(--red); }

/* ── PAGE ── */
.page-wrap { max-width: 820px; margin: 28px auto 64px; padding: 0 20px; }
.page-header { padding: 0 0 22px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.page-header .entry-title { font-family: var(--font); font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--dark); margin-bottom: 14px; }
.page-header .page-lead { font-size: 20px; color: var(--mid); line-height: 1.6; padding: 0 0 0 16px; border-left: 3px solid var(--red); margin: 14px 0; }
.page-header .page-meta { font-size: 14px; color: #999; margin-top: 12px; }
.page-feat { margin: 0 0 28px; }
.page-feat img { width: 100%; height: auto; border-radius: 8px; }

/* Headings inside page content (in case admin pastes <h1>) */
.entry-content h1 { font-family: var(--font); font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin: 1.5em 0 .5em; color: var(--dark); }

@media (max-width: 768px) {
	.page-header .entry-title { font-size: 26px; }
	.page-header .page-lead { font-size: 17px; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .two-col, .cat-wrap, .search-wrap, .author-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cat-featured { grid-template-columns: 1fr; }
  .about-hero-inner { grid-template-columns: 1fr; }
  .about-hero-img { display: none; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  html { font-size: 17px; }
  .header-inner { justify-content: center; position: relative; }
  .site-logo, .logo { margin: 0 auto; }
  .main-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0,0,0,.06); padding: 12px 20px; flex-direction: column; align-items: stretch; gap: 4px; z-index: 99; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .nav-mobile-btn { display: inline-flex; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .values-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cat-banner h1 { font-size: 36px; }
  .single-hero h1 { font-size: 30px; }
  .err-code, .err-code::after { font-size: 95px; }
  .footer-top { grid-template-columns: 1fr; }
  .author-box { grid-template-columns: 60px 1fr; }
  .author-box-avatar { width: 60px; height: 60px; font-size: 22px; }
}
@media (max-width: 520px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .search-result, .hcard { grid-template-columns: 1fr; }
  .sr-img, .hcard-img { aspect-ratio: 16/9; }
  .form-row { grid-template-columns: 1fr; }
  .about-hero-nums { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .single-hero h1 { font-size: 26px; }
  .cat-banner h1 { font-size: 28px; }
  .cat-banner p { font-size: 17px; }
  .topbar-inner { font-size: 14px; }
}

/* ════════════════════════════════════════
   FRONT PAGE — magazine layout
════════════════════════════════════════ */
.hero { max-width: var(--max); margin: 32px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1fr 340px; gap: var(--gap); align-items: stretch; }
.hero-main { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; background: #ddd; display: block; }
.hero-main > .feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-main > .feat-bg img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hero-main:hover > .feat-bg img { transform: scale(1.03); }
.hero-main-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 40%, transparent 80%); display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; }
.hero-main-overlay .cat { background: var(--red); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; width: fit-content; margin-bottom: 12px; }
.hero-main-overlay h2 { font-family: var(--font); font-size: 36px; font-weight: 800; color: #fff; line-height: 1.25; letter-spacing: -.02em; }
.hero-main-overlay .meta { color: rgba(255,255,255,.65); font-size: 16px; margin-top: 10px; }

.hero-side { display: flex; flex-direction: column; gap: var(--gap); align-self: stretch; min-height: 0; }
.hero-card { flex: 1 1 0; position: relative; border-radius: 8px; overflow: hidden; background: #ddd; min-height: 170px; display: block; }
.hero-card > .feat-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-card > .feat-bg img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hero-card:hover > .feat-bg img { transform: scale(1.04); }
.hero-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 50%, transparent 85%); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.hero-card-overlay .cat { background: var(--red); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; width: fit-content; margin-bottom: 8px; }
.hero-card-overlay h3 { font-family: var(--font); font-size: 21px; font-weight: 700; color: #fff; line-height: 1.32; letter-spacing: -.01em; }
.hero-card-overlay .meta { color: rgba(255,255,255,.6); font-size: 16px; margin-top: 7px; }

/* Section header with red bar + "Всі матеріали →" link */
.section-hd { max-width: var(--max); margin: 52px auto 22px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-hd h2 { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.section-hd h2::before { content: ''; width: 4px; height: 18px; background: var(--red); border-radius: 2px; display: block; }
.section-hd .all-link { font-size: 16px; font-weight: 600; color: var(--mid); letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color .2s; }
.section-hd .all-link:hover { color: var(--red); }

/* Generic grid lists used on front page */
.list-grid { max-width: var(--max); margin: 0 auto; padding: 0 20px 16px; display: grid; gap: var(--gap); }
.list-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.list-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Two-column layout for front page (4 hcards + sidebar) */
.front-two-col { max-width: var(--max); margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 320px; gap: 40px; }

.sidebar-block h4 { font-family: var(--font); font-size: 16px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--dark); }
.sidebar-item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-img { border-radius: 5px; overflow: hidden; aspect-ratio: 1; background: #eee; position: relative; }
.sidebar-item-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-item-body { display: flex; flex-direction: column; gap: 5px; }
.sidebar-item-body h5 { font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 1.4; }
.sidebar-item-body span { font-size: 14px; color: #999; }

.newsletter { background: var(--dark); border-radius: 8px; padding: 24px; color: var(--white); }
.newsletter h4 { font-family: var(--font); font-size: 19px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; color: #fff; padding: 0; border: none; text-transform: none; letter-spacing: 0; }
.newsletter p { font-size: 16px; color: rgba(255,255,255,.65); margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; flex-direction: column; }
.newsletter-form input { padding: 11px 14px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-family: var(--font); font-size: 16px; outline: none; transition: border .2s; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form button { padding: 11px 14px; background: var(--red); color: #fff; border: none; border-radius: 5px; font-family: var(--font); font-size: 16px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.newsletter-form button:hover { opacity: .85; }

/* Horizontal cards (used in "Краса та здоров'я" 2-col section) */
.card.card-horizontal { flex-direction: row; gap: 0; }
.card.card-horizontal .card-img { width: 200px; min-width: 200px; flex-shrink: 0; aspect-ratio: auto; height: auto; border-radius: 0; }

@media (max-width: 1024px) {
	.hero { grid-template-columns: 1fr; }
	.hero-main { grid-row: auto; aspect-ratio: 16/8; }
	.hero-side { flex-direction: row; }
	.front-two-col { grid-template-columns: 1fr; }
	.front-two-col .sidebar, .cat-wrap .sidebar { position: static; }
}
@media (max-width: 768px) {
	.list-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
	.hero-side { flex-direction: column; }
	.hero-main-overlay h2 { font-size: 28px; }
	.card.card-horizontal { flex-direction: column; }
	.card.card-horizontal .card-img { width: 100%; min-width: 0; aspect-ratio: 16/9; }
}
@media (max-width: 520px) {
	.list-grid.cols-3, .list-grid.cols-2 { grid-template-columns: 1fr; }
	.hero-main-overlay h2 { font-size: 24px; }
	.hero-main-overlay { padding: 20px; }
}

/* ════════════════════════════════════════
   TELEGRAM CTA BLOCK
════════════════════════════════════════ */
.tg-cta {
	display: flex; align-items: center; gap: 18px;
	background: linear-gradient(135deg, #229ED9 0%, #1A8DC4 100%);
	border-radius: 12px; padding: 22px 28px; margin: 36px 0 0;
	color: #fff;
}
.tg-cta-icon { flex-shrink: 0; color: #fff; opacity: .95; line-height: 0; }
.tg-cta-body { flex: 1; min-width: 0; }
.tg-cta-body h3 { font-family: var(--font); font-size: 20px; font-weight: 800; margin: 0 0 4px; line-height: 1.3; color: #fff; letter-spacing: -.01em; }
.tg-cta-body p { font-size: 15px; color: rgba(255,255,255,.85); margin: 0; line-height: 1.45; }
.tg-cta-btn {
	flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
	background: #fff; color: #1A8DC4; font-family: var(--font); font-weight: 700;
	font-size: 15px; padding: 12px 22px; border-radius: 8px; text-decoration: none;
	white-space: nowrap; transition: transform .15s, box-shadow .2s;
}
.tg-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); color: #1A8DC4; }
@media (max-width: 600px) {
	.tg-cta { flex-direction: column; text-align: center; padding: 22px; gap: 14px; }
	.tg-cta-btn { width: 100%; padding: 13px; }
}

/* ════════════════════════════════════════
   DISCLAIMER
════════════════════════════════════════ */
.disclaimer { display: flex; gap: 12px; align-items: flex-start; }
.disclaimer .disclaimer-icon { flex-shrink: 0; margin-top: 2px; }
.disclaimer p { margin: 0; line-height: 1.55; }

/* On single posts — light box with grey background, between content and tags */
.disclaimer-single {
	background: var(--light); border-left: 3px solid #B7791F;
	border-radius: 0 6px 6px 0; padding: 16px 20px;
	margin: 36px 0 0; color: var(--mid); font-size: 15px;
}
.disclaimer-single .disclaimer-icon { color: #B7791F; }

/* In footer — thin row above copyright */
.disclaimer-footer {
	max-width: var(--max); margin: 0 auto 24px; padding: 16px 0;
	border-top: 1px solid rgba(255,255,255,.08);
	color: rgba(255,255,255,.45); font-size: 13px; line-height: 1.5;
}
.disclaimer-footer .disclaimer-icon { color: rgba(255,255,255,.4); }

/* ── PRINT ── */
@media print {
  .topbar, .site-header, .site-footer, .sidebar, .related-posts, .comments-area, .nav-mobile-btn, .nav-search-btn { display: none !important; }
  .single-wrap { max-width: 100% !important; }
  body { color: #000; background: #fff; }
}
