/*
Theme Name: Pozdravem
Theme URI: https://pozdravem.com/
Author: Fedor_work1
Author URI: https://t.me/fedor_work1
Description: Лёгкая адаптивная тема WordPress для сайта поздравлений с двумя сайдбарами, центральным контентом, табами категорий, кнопками копирования, хлебными крошками и кодами вставки.
Version: 1.3.4
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Update URI: false
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thems-greetings
Tags: blog, custom-logo, custom-menu, featured-images, one-column, two-columns, three-columns, right-sidebar, left-sidebar, responsive-layout, rtl-language-support, threaded-comments, translation-ready, PWA
*/

:root {
  --color-bg: #fff7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #fff0f7;
  --color-text: #20202a;
  --color-muted: #707087;
  --color-primary: #e84d8a;
  --color-primary-dark: #bf2d68;
  --color-accent: #7c4dff;
  --color-border: #f0dbe7;
  --footer-widget-link-color: var(--color-primary);
  --footer-widget-link-hover-color: var(--color-accent);
  --footer-widget-link-bg: color-mix(in srgb, var(--color-primary) 14%, transparent);
  --footer-widget-link-hover-bg: color-mix(in srgb, var(--color-primary) 24%, transparent);
  --footer-widget-link-border: color-mix(in srgb, var(--color-primary) 28%, transparent);
  --shadow-soft: 0 18px 55px rgba(160, 54, 111, 0.13);
  --radius-lg: 10px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --container: calc(var(--left-sidebar) + var(--content-width) + var(--right-sidebar) + (var(--gap) * 2));
  --content-width: 740px;
  --left-sidebar: 250px;
  --right-sidebar: 250px;
  --logo-width: 168px;
  --sidebar-widget-padding: 20px;
  --content-padding-desktop: 32px;
  --content-padding-tablet: 24px;
  --content-padding-mobile: 18px;
  --featured-image-width: 0px;
  --featured-image-height: 0px;
  --embed-code-image-width: 0px;
  --embed-code-image-height: 0px;
  --embed-code-height: 100px;
  --term-label-font-size: 14px;
  --term-label-gap: 12px;
  --term-label-gap-mobile: 10px;
  --tag-label-font-size: 14px;
  --tag-label-gap: 12px;
  --tag-label-gap-mobile: 10px;
  --mobile-header-gap: 20px;
  --gap: 24px;
  --font-main: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  min-width: 320px;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(232, 77, 138, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(124, 77, 255, 0.12), transparent 30rem),
    var(--color-bg);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.65;
}

img, svg, video, iframe { max-width: 100%; height: auto; }

a { color: var(--color-primary-dark); text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover, a:focus { color: var(--color-accent); }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(240, 219, 231, 0.72);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 20px;
  min-height: 82px;
}

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.pwa-install-button[hidden] { display: none !important; }
.pwa-install-button-header { flex-shrink: 0; }
.pwa-install-button-mobile { display: none; width: 100%; }
.header-actions .header-search { min-width: 220px; max-width: 300px; }
.custom-logo { max-width: var(--logo-width); max-height: 56px; object-fit: contain; }
.site-title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.8rem); font-weight: 850; letter-spacing: -0.04em; }
.site-title a { color: var(--color-text); }
.site-description { margin: 2px 0 0; color: var(--color-muted); font-size: 0.92rem; }

.main-navigation ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.main-navigation a { display: block; padding: 10px 13px; border-radius: var(--radius-sm); color: var(--color-text); font-weight: 700; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { background: var(--color-surface-soft); color: var(--color-primary-dark); }
.menu-toggle { display: none; width: 44px; height: 42px; min-height: 42px; padding: 10px; }
.menu-toggle-bars { display: grid; gap: 5px; width: 22px; }
.menu-toggle-bars span { display: block; height: 2px; background: #fff; border-radius: 2px; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-field, input[type="text"], input[type="email"], input[type="search"], textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
}
textarea { border-radius: var(--radius-sm); }
.search-field:focus, input:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(232, 77, 138, 0.12); }

button, input[type="submit"], .button, .copy-button, .share-link, .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
/*  min-height: 42px; */
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(232, 77, 138, 0.22);
}
button:hover, input[type="submit"]:hover, .button:hover, .copy-button:hover, .share-link:hover { color: #fff; opacity: 0.9; }

.site-layout {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, var(--left-sidebar)) minmax(0, var(--content-width)) minmax(160px, var(--right-sidebar));
  gap: var(--gap);
  align-items: start;
  padding: 32px 0 44px;
}

.content-area, .sidebar-card, .entry-card, .home-panel, .embed-panel, .no-results {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(240, 219, 231, 0.86);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding:5px;
}

.content-area { min-width: 0; padding: var(--content-padding-desktop); }
.sidebar { min-width: 0; }
.widget { padding: var(--sidebar-widget-padding); margin-bottom: 18px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.widget-title, .widget h2, .widget h3 { margin: 0 0 12px; font-size: 1rem; }
.widget ul { padding-left: 18px; margin: 0; }
.sidebar .widget :where(ul, ol), .footer-widgets .widget :where(ul, ol) { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.sidebar .widget li, .footer-widgets .widget li { margin: 0; }
.sidebar .widget li a, .footer-widgets .widget li a { display: flex; align-items: center; min-height: 36px; padding: 7px 10px; background: var(--color-surface-soft); border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--color-primary-dark); font-weight: 700; }
.sidebar .widget li a:hover, .footer-widgets .widget li a:hover { background: #fff; border-color: var(--color-primary); color: var(--color-accent); opacity: 1; }
.sidebar .widget :where(p, .wp-block-latest-comments__comment-excerpt), .footer-widgets .widget :where(p, .wp-block-latest-comments__comment-excerpt) { margin: 0; color: var(--color-muted); }
.sidebar .widget .wp-block-latest-comments__comment, .footer-widgets .widget .wp-block-latest-comments__comment { padding: 8px 10px; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.sidebar .widget .wp-block-tag-cloud, .footer-widgets .widget .wp-block-tag-cloud { display: flex; }
.sidebar .widget .wp-block-tag-cloud a, .footer-widgets .widget .wp-block-tag-cloud a { display: inline-flex; min-height: auto; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 20px; color: var(--color-muted); font-size: 0.93rem; }
.breadcrumbs .separator { color: #c5a7b8; }
.breadcrumbs a { font-weight: 700; }

.page-header { margin-bottom: 24px; }
.page-title, .entry-title { margin: 0 0 12px; font-size: var(--h1-size); line-height: 1.12; letter-spacing: -0.055em; }
h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
h4 { font-size: var(--h4-size); }
h5 { font-size: var(--h5-size); }
h6 { font-size: var(--h6-size); }


.entry-card { padding: clamp(18px, 3vw, 28px); margin-bottom: 22px; }
.entry-meta, .entry-footer, .entry-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; color: var(--color-muted); font-size: 0.94rem; }
.entry-meta-item, .entry-footer { display: inline-flex; gap: 6px; align-items: center; }
.entry-meta-icon { display: inline-flex; line-height: 1; }
.entry-content { overflow-wrap: anywhere; }
.entry-content p:first-child { margin-top: 0; }
.entry-actions { margin-top: 18px; }
.entry-actions .copy-button { flex-shrink: 0; }
.posts-list { margin-bottom: 22px; }
.posts-list .entry-card { margin-bottom: 22px; }
@media (min-width: 861px) {
  .posts-list-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; grid-auto-rows: 1fr; align-items: stretch; }
  .posts-list-two .entry-card { display: flex; flex-direction: column; height: 100%; margin-bottom: 0; }
  .posts-list-two .entry-content { flex: 1 1 auto; }
  .posts-list-two .entry-footer { order: 3; }
  .posts-list-two .entry-post-actions { order: 4; margin-top: auto; }
}

.refinement-tags, .type-list, .category-tabs, .related-terms { display: flex; flex-wrap: wrap; gap: var(--term-label-gap); padding: 0; margin: 0 0 20px; list-style: none; }
.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: var(--tag-label-gap); margin: 0 0 20px; }
.refinement-tags a, .type-list a, .category-tabs a, .related-terms a, .terms-more-button {
  display: inline-flex;
  padding: 8px 13px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: var(--term-label-font-size);
}
.wp-block-tag-cloud a {
  display: inline-flex;
  padding: 8px 13px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: var(--tag-label-font-size) !important;
}

.refinement-tags a:hover, .type-list a:hover, .category-tabs a:hover, .related-terms a:hover, .wp-block-tag-cloud a:hover, .terms-more-button:hover { background: #fff; border-color: var(--color-primary); color: var(--color-accent); opacity: 1; }

.category-tools { margin-bottom: 22px; }
.category-tools h2 { margin: 18px 0 10px; font-size: 1.05rem; }

.copy-feedback { min-height: 1.4em; color: var(--color-primary-dark); font-weight: 800; }
.copy-button-icon { display: block; width: 22px; height: 22px; object-fit: contain; }
.share-links { display: flex; flex-wrap: wrap; gap: 10px; }
.share-link { min-height: 36px; padding: 8px 12px; font-size: 0.88rem; }

.embed-panel { padding: 18px; margin-top: 22px; }
.embed-panel h2 { margin-top: 0; }
.embed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.embed-code { width: 100%; min-height: var(--embed-code-height); padding: 12px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.87rem; background: #2a2030; color: #fff; border: 0; border-radius: var(--radius-sm); }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 24px; }
.page-numbers { min-width: 42px; color: #fff; }
.page-numbers.current { background: var(--color-text); }
.page-numbers.dots { color: var(--color-muted); background: transparent; box-shadow: none; }

.related-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--color-border); }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.related-card { padding: 16px; background: var(--color-surface-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-weight: 800; }
.related-terms { margin-bottom: 0; }

/* Рекламные блоки (Кастомайзер → «Реклама») */
.ad-slot { margin-bottom: 18px; overflow: hidden; text-align: center; }
.ad-slot-content { margin: 22px 0 0; }
.ad-slot img { max-width: 100%; height: auto; }

/* Галочка перед заголовком (бывшая картинка-иконка) */
.heading-check::before { content: ""; display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.4em; vertical-align: -0.08em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e0242b' d='M20.3 3.6 9.4 15.3 4 10.2 1.5 12.9l8 7.6L23 6.1z'/%3E%3C/svg%3E") no-repeat center / contain; }
/* Рамки и отступы таблиц в текстах - вместо устаревших атрибутов border/cellpadding (вид как у атрибутов: рамка цветом текста) */
table.table-border { border: 1px outset; }
table.table-border > * > tr > td, table.table-border > * > tr > th { border: 1px inset; }
table.cell-pad-0 > * > tr > td, table.cell-pad-0 > * > tr > th { padding: 0; }
table.cell-pad-2 > * > tr > td, table.cell-pad-2 > * > tr > th { padding: 2px; }
table.cell-pad-8 > * > tr > td, table.cell-pad-8 > * > tr > th { padding: 8px; }
/* Сетка месяца [holiday_month] */
.holiday-month { width: 100%; height: 100%; border: 2px outset; border-spacing: 1px; }
.holiday-month > * > tr > td { border: 1px inset; }

.home-panel { padding: clamp(18px, 3vw, 28px); margin-bottom: 22px; }
.home-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Подвал: бренд, колонки-меню, текст, копирайт */
.site-footer { padding: 48px 0 30px; color: rgba(255, 255, 255, 0.66); background: var(--color-footer); font-size: 0.9rem; line-height: 1.6; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.footer-brand { gap: 14px; }
.footer-logo { display: inline-flex; align-items: center; gap: 11px; align-self: flex-start; color: #fff; }
.footer-logo:hover { color: #fff; opacity: 0.9; }
.footer-logo-image { display: block; width: 40px; height: 40px; object-fit: contain; }
.footer-logo-name { font-size: 1.2rem; font-weight: 850; letter-spacing: -0.02em; }
.footer-desc p, .footer-text p { margin: 0; }
.footer-desc p + p, .footer-text p + p { margin-top: 0.6em; }
.footer-social { display: flex; flex-wrap: wrap; gap: 9px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: rgba(255, 255, 255, 0.78); background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-sm); }
.footer-social a:hover, .footer-social a:focus-visible { color: #fff; background: var(--color-primary); }
.footer-social .share-icon { width: 20px !important; height: 20px !important; }
.footer-mail { align-self: flex-start; color: rgba(255, 255, 255, 0.78); }
.footer-col-title { color: rgba(255, 255, 255, 0.5); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-menu { display: flex; flex-direction: column; gap: 9px; padding: 0; margin: 0; list-style: none; }
.footer-menu li { margin: 0; }
.footer-menu a { color: rgba(255, 255, 255, 0.82); }
.footer-menu a:hover, .footer-menu a:focus-visible, .footer-mail:hover, .footer-text a:hover { color: var(--color-primary); }
.footer-text a { color: rgba(255, 255, 255, 0.82); text-decoration: underline; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); font-size: 0.82rem; text-align: center; }

@media (max-width: 1100px) {
  :root { --gap: 18px; }
  .content-area { padding: var(--content-padding-tablet); }
  .site-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .left-sidebar { grid-column: 1; }
  .content-area { grid-column: 1 / -1; grid-row: 1; }
  .right-sidebar { grid-column: 2; }
}

@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr auto; gap: var(--mobile-header-gap); padding: 12px 0; }
  .header-actions { grid-column: 1 / -1; width: 100%; }
  .header-actions .header-search { flex: 1; min-width: 0; max-width: none; }
  .menu-toggle { display: inline-flex; }
  .main-navigation { justify-self: end; }
  .main-navigation ul { display: none; position: absolute; z-index: 70; left: 16px; right: 16px; top: 76px; padding: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
  .main-navigation.toggled ul { display: grid; }
  .main-navigation a { border-radius: var(--radius-sm); }
  .site-layout { grid-template-columns: 1fr; padding-top: 20px; }
  .left-sidebar, .right-sidebar, .content-area { grid-column: 1; }
  .left-sidebar { grid-row: 2; }
  .right-sidebar { grid-row: 3; }
  .embed-grid, .home-codes, .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-shell { width: min(calc(100% - 20px), var(--container)); }
  .content-area { padding: var(--content-padding-mobile); }
  .content-area, .entry-card, .home-panel { border-radius: var(--radius-lg); }
  .entry-actions { align-items: stretch; flex-direction: column; }
  .copy-button, .share-link, .search-submit { width: 100%; }
}

.search-results-area .page-header { margin-bottom: 18px; }
.search-results-area .search-form { margin-bottom: 24px; }
.search-results-area .refinement-tags { margin-bottom: 24px; }
.search-results-area .no-results { padding: 22px; }
.code-image { display: block; width: 100%; margin: 0 0 10px; border-radius: var(--radius-sm); }
.scroll-top-button { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 44px; height: 44px; padding: 0; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 0.2s ease, transform 0.2s ease; }
.scroll-top-button.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.home-tabs-widget .widget, .content-tabs-widget .widget {
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.home-tabs-widget .wp-block-group, .content-tabs-widget .wp-block-group {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.home-tabs-widget .widget + .widget, .content-tabs-widget .widget + .widget { margin-top: 18px; }

.home-tabs-widget ul, .home-tabs-widget .wp-block-categories-list, .home-tabs-widget .wp-block-page-list,
.content-tabs-widget ul, .content-tabs-widget .wp-block-categories-list, .content-tabs-widget .wp-block-page-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--term-label-gap);
  padding: 0;
  margin: 0;
  list-style: none;
}
.home-tabs-widget li, .content-tabs-widget li { margin: 0; }
.home-tabs-widget a, .content-tabs-widget a, .category-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-soft);
  color: var(--color-primary-dark);
  font-size: var(--term-label-font-size);
  font-weight: 800;
}
.home-tabs-widget a:hover, .content-tabs-widget a:hover, .category-tabs a:hover {
  background: #fff;
  border-color: var(--color-primary);
  color: var(--color-accent);
}

.share-link-icon {
  width: auto;
  min-width: 42px;
  padding: 9px;
}
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}
.share-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.share-icon img {
  display: block;
}
.share-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 900;
}

.author-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.author-avatar {
  border-radius: 10px;
}
.author-count {
  margin: 0 0 12px;
  color: var(--color-muted);
  font-weight: 800;
}
.author-social-links {
  margin-top: 14px;
}

/* Cookie-баннер: заголовок с иконкой и крестиком, текст, две кнопки одной ширины */
.cookie-banner {
  position: fixed;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(var(--cookie-banner-width), calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px 20px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -24px rgba(32, 24, 32, 0.45), var(--shadow-soft);
  animation: thems-cookie-up 0.45s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-bottom-right { right: 16px; bottom: 16px; }
.cookie-banner-bottom-left { left: 16px; bottom: 16px; }
.cookie-banner-bottom { left: 50%; bottom: 16px; transform: translateX(-50%); }
.cookie-banner-top { left: 50%; top: 16px; transform: translateX(-50%); }
.cookie-banner-head { display: flex; align-items: center; gap: 10px; }
.cookie-banner-icon { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--color-primary); background: var(--color-surface-soft); border-radius: var(--radius-sm); }
.cookie-banner-title { flex: 1 1 auto; min-width: 0; color: var(--color-text); font-size: 1rem; font-weight: 800; line-height: 1.3; }
.cookie-banner .cookie-banner-close { flex: 0 0 auto; width: 30px; height: 30px; min-height: 30px; padding: 0; margin-left: auto; color: var(--color-muted); background: transparent; border-radius: var(--radius-sm); box-shadow: none; transition: background 0.2s ease, color 0.2s ease; }
.cookie-banner .cookie-banner-close:hover, .cookie-banner .cookie-banner-close:focus-visible { color: var(--color-text); background: var(--color-surface-soft); opacity: 1; }
.cookie-banner-text { color: var(--color-muted); font-size: 0.9rem; line-height: 1.6; }
.cookie-banner-text p { margin: 0; }
.cookie-banner-text p + p { margin-top: 0.6em; }
.cookie-banner-text a { color: var(--color-primary-dark); font-weight: 700; }
.cookie-banner-text a:hover { color: var(--color-accent); }
.cookie-banner-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.cookie-banner-actions .cookie-banner-button { width: 100%; min-height: 46px; padding: 9px 12px; line-height: 1.25; white-space: normal; }
.cookie-banner-actions .cookie-banner-button:only-child { grid-column: 1 / -1; }
.cookie-banner-actions .cookie-banner-button-secondary { color: var(--color-primary-dark); background: var(--color-surface-soft); border: 1px solid var(--color-border); box-shadow: none; }
.cookie-banner-actions .cookie-banner-button-secondary:hover, .cookie-banner-actions .cookie-banner-button-secondary:focus-visible { color: var(--color-accent); background: #fff; border-color: var(--color-primary); opacity: 1; }
@keyframes thems-cookie-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .cookie-banner { animation: none; } }

@media (max-width: 560px) {
  .author-card { grid-template-columns: 1fr; }
  .home-tabs-widget a, .content-tabs-widget a, .category-tabs a { width: 100%; justify-content: center; }
  .home-tabs-widget .wp-block-tag-cloud a, .content-tabs-widget .wp-block-tag-cloud a, .widget .wp-block-tag-cloud a { width: auto; justify-content: center; }
}

@media (max-width: 460px) {
  .cookie-banner { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; padding: 16px; transform: none; }
}


.content-tabs-widget { margin-bottom: 22px; }
.category-tools-group { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 22px; }
.category-tools-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.category-tools-title { font-weight: 900; }
.category-tools-inline ul, .category-tools-inline .wp-block-tag-cloud { margin: 0; }

.featured-media { overflow: hidden; max-width: 100%; margin: 0 0 16px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-soft); }
.featured-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.entry-title + .featured-media { margin-top: 8px; }

.greeting-copy-block { padding: 18px; margin: 18px 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.greeting-copy-content > :first-child { margin-top: 0; }
.greeting-copy-content > :last-child { margin-bottom: 0; }
.greeting-copy-actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 14px; }
.entry-post-actions { margin-top: 16px; }

.term-item-hidden { display: none !important; }
.terms-more-button { color: var(--color-primary-dark); background: var(--color-surface-soft); box-shadow: none; }
.code-image { max-width: 100%; }

@media (max-width: 860px) {
  .header-search .search-form { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .header-search .search-submit { width: 44px; min-width: 44px; min-height: 42px; padding: 0; overflow: hidden; text-indent: -999px; position: relative; }
  .header-search .search-submit::after { content: "🔍"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-indent: 0; font-size: 16px; }
}


.header-social-links { justify-content: center; flex-wrap: nowrap; }
.header-social-links .share-link { min-width: 38px; min-height: 38px; padding: 8px; }
.error-404-card { display: grid; justify-items: center; text-align: center; padding: clamp(28px, 5vw, 56px); }
.error-404-code { margin: 0; color: var(--color-primary); font-size: clamp(4rem, 14vw, 9rem); line-height: 1; font-weight: 950; letter-spacing: -0.08em; }
.error-404-button { margin-top: 12px; }

@media (max-width: 860px) {
  .main-navigation ul { top: 68px; }
  .header-social-links { justify-content: flex-start; }
  .header-social-links .share-link { width: 44px; min-width: 44px; height: 42px; min-height: 42px; padding: 8px; }
}

.site-branding { order: 1; }
.main-navigation { order: 2; }
.pwa-install-button-header { order: 3; }
.header-social-links { order: 4; }
.header-actions { order: 5; }

@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr auto auto; gap: var(--mobile-header-gap); }
  .site-branding { order: 1; }
  .header-social-links { order: 2; }
  .main-navigation { order: 3; }
  .header-actions { order: 4; flex-wrap: wrap; }
  .pwa-install-button-header { display: none; }
  .pwa-install-button-mobile { display: inline-flex; }
}

@media (max-width: 860px) {
  .home-tabs-widget ul, .home-tabs-widget .wp-block-categories-list, .home-tabs-widget .wp-block-page-list, .content-tabs-widget ul, .content-tabs-widget .wp-block-categories-list, .content-tabs-widget .wp-block-page-list, .refinement-tags, .type-list, .category-tabs, .related-terms { gap: var(--term-label-gap-mobile); }
  .wp-block-tag-cloud { gap: var(--tag-label-gap-mobile); }
}

@media (max-width: 560px) {
  .greeting-copy-actions .copy-button, .greeting-copy-actions .share-link { width: auto; }
  .header-social-links .share-link { width: 44px; }
  .main-navigation.toggled ul { z-index: 120; }
}

/* Сайдбар: блоки «Дочерние рубрики» - крупный заголовок-ссылка, список ссылок, «Ещё…» */
.sidebar .widget-links, .sidebar .widget-holidays { padding: 18px 20px 20px; }
.sidebar .widget-links .widget-title, .sidebar .widget-holidays .widget-title { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.sidebar .widget-links .widget-title a, .sidebar .widget-holidays .widget-title a { color: var(--color-primary-dark); }
.sidebar .widget-links .widget-title a:hover, .sidebar .widget-holidays .widget-title a:hover { color: var(--color-accent); }
.sidebar .widget-links .child-categories { gap: 2px; }
.sidebar .widget-links li { padding: 3px 0; }
.sidebar .widget-links li a, .sidebar .widget-holidays li a {
  display: inline;
  min-height: 0;
  padding: 0;
  color: var(--color-text);
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-text) 28%, transparent);
  text-underline-offset: 3px;
}
.sidebar .widget-links li a:hover, .sidebar .widget-holidays li a:hover { color: var(--color-primary-dark); background: none; border: 0; text-decoration-color: currentColor; }
.sidebar .widget-more { display: inline-block; margin-top: 10px; color: var(--color-primary-dark); font-weight: 700; }
.sidebar .widget-more:hover { color: var(--color-accent); }
.sidebar .widget-tint-primary { background: color-mix(in srgb, var(--color-primary) 9%, #fff); border-color: color-mix(in srgb, var(--color-primary) 22%, #fff); }
.sidebar .widget-tint-accent { background: color-mix(in srgb, var(--color-accent) 9%, #fff); border-color: color-mix(in srgb, var(--color-accent) 22%, #fff); }
.sidebar .widget-tint-mix { background: color-mix(in srgb, color-mix(in srgb, var(--color-primary), var(--color-accent)) 9%, #fff); border-color: color-mix(in srgb, color-mix(in srgb, var(--color-primary), var(--color-accent)) 22%, #fff); }

/* Сайдбар: «Календарь праздников» - дата слева (сегодня обведена), праздники справа */
.sidebar .widget-holidays .holiday-days { gap: 10px; }
.holiday-day { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: start; }
.sidebar .widget-holidays .holiday-day > .holiday-date { display: inline-flex; align-items: center; justify-content: center; min-height: 0; padding: 1px 6px; color: var(--color-muted); background: none; border: 1.5px solid transparent; border-radius: 999px; font-size: 1rem; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.45; text-decoration: none; }
.sidebar .widget-holidays .holiday-day > a.holiday-date:hover { color: var(--color-primary-dark); border-color: var(--color-border); }
.sidebar .widget-holidays .holiday-day.is-today > .holiday-date { color: var(--color-text); border-color: var(--color-primary); font-weight: 800; }
.sidebar .widget-holidays .holiday-events { gap: 5px; }
.sidebar .widget-holidays .holiday-events li a { font-size: 0.95rem; font-weight: 500; }
.holiday-gap { padding-left: 22px; color: var(--color-muted); line-height: 1; }
