/*
Theme Name: Lanka-KSO
Theme URI: https://khersonline.net
Author: Khersonline
Description: Тема новинного порталу Lanka-KSO.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: lanka-kso
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   1. Custom Properties
   ========================================================================== */

:root {
	--shell:        1320px;
	--gap:          10px;
	--gap-lg:       14px;
	--b:            none;
	--hairline:     1px solid rgba(0, 0, 0, 0.1);
	--block-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
	--bg:           #fff;
	--font:         system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--header-bg:    linear-gradient(135deg, #c0392b 0%, #7b0000 100%);
	--header-h:     58px;       /* висота header — використовується в sticky offset */
	/* Зсув sticky-банера, коли під header є смуга NAV BAR (desktop) */
	--nav-bar-sticky-offset: 40px;
	--header-color: #fff;

	/* Посилання в контенті (не хедер / не кнопки-іконки) */
	--link:         #a93226;
	--link-hover:   #c0392b;
	--link-visited: #7b241c;

	--block-bg:     rgba(255, 255, 255, 0.93);
	--label-fs:     10px;
	--label-fw:     800;

	/* Dark mode overrides (застосовуються через .lanka-kso-dark на <html>) */
	--dark-bg:      #121212;
	--dark-surface: #1e1e1e;
	--dark-border:  #333;
	--dark-text:    #e0e0e0;
	--dark-muted:   #a8a8a8;

	--wp-admin-bar: 0px;
}

body.admin-bar {
	--wp-admin-bar: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--wp-admin-bar: 46px;
	}
}

/* ==========================================================================
   2. Reset / Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
	font-family:  var(--font);
	background:   var(--bg);
	color:        #000;
	line-height:  1.4;
	padding-top:  var(--header-h);
}
img {
	max-width: 100%;
	height:    auto;
	display:   block;
}

/* ==========================================================================
   2a. Посилання — уніфіковано по сайту (винятки нижче)
   ========================================================================== */

a {
	color:                   var(--link);
	text-decoration:         underline;
	text-decoration-color:   rgba(169, 50, 38, 0.45);
	text-decoration-thickness: 1px;
	text-underline-offset:   3px;
	transition:              color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover,
a:focus-visible {
	color:                 var(--link-hover);
	text-decoration-color: var(--link-hover);
}

a:visited {
	color: var(--link-visited);
}

/* Хедер, другорядне меню, мобільний дровер — світла/контрастна палітра, без «контентного» підкреслення. */
.site-header a:not(.social-link),
.site-header a:not(.social-link):visited {
	color:           inherit;
	text-decoration: none;
}

.site-header a:not(.social-link):hover,
.site-header a:not(.social-link):focus-visible {
	color:           var(--header-color);
	text-decoration: none;
	opacity:         0.95;
}

.header-logo__link,
.header-logo__link:visited,
.header-nav__list a,
.header-nav__list a:visited,
.header-nav__list li ul li a,
.header-nav__list li ul li a:visited {
	color:           inherit;
	text-decoration: none;
}

#mobile-menu a,
#mobile-menu a:visited {
	color:           #111;
	text-decoration: none;
}

#mobile-menu a:hover,
#mobile-menu a:focus-visible {
	color:                 var(--link-hover);
	text-decoration:       underline;
	text-decoration-color: var(--link-hover);
}

.lanka-kso-dark #mobile-menu a,
.lanka-kso-dark #mobile-menu a:visited {
	color: var(--dark-text);
}

.lanka-kso-dark #mobile-menu a:hover,
.lanka-kso-dark #mobile-menu a:focus-visible {
	color: var(--link-hover);
}

/* Картки-превʼю: посилання на всю площу без глобального підкреслення */
.hero-card__link,
.hero-card__link:visited,
.search-item__link,
.search-item__link:visited,
.lcol-item__link,
.lcol-item__link:visited {
	text-decoration: none;
}

/* Пагінація-клітинки */
a.page-numbers {
	text-decoration: none;
}

a.page-numbers:hover,
a.page-numbers:focus-visible {
	text-decoration: none;
}

/* Навігація «Попередня / Наступна» лише з підкресленням заголовка */
.post-navigation a,
.post-navigation a:visited {
	text-decoration: none;
}

.post-navigation a .nav-title {
	text-decoration:         underline;
	text-decoration-color:   rgba(169, 50, 38, 0.45);
	text-decoration-thickness: 1px;
	text-underline-offset:   3px;
	transition:              text-decoration-color 0.15s ease;
}

.post-navigation a:hover .nav-title,
.post-navigation a:focus-visible .nav-title {
	text-decoration-color: var(--link-hover);
}

/* ==========================================================================
   3. Shell
   ========================================================================== */

.shell {
	max-width: var(--shell);
	margin:    0 auto;
	padding:   0 16px;
}

/* ==========================================================================
   4. Wireframe Block
   ========================================================================== */

.block {
	border:        none;
	position:      relative;
	min-height:    48px;
	background:    #fff;
	box-shadow:    var(--block-shadow);
}

/* Wireframe-мітки (data-label) вимкнено */
.block::before {
	display: none !important;
	content: none;
}

/* ==========================================================================
   5. HEADER — fixed
   ========================================================================== */

.site-header {
	position:   fixed;
	top:        var(--wp-admin-bar);
	left:       0;
	right:      0;
	width:      100%;
	z-index:    300;
	background: var(--header-bg);
	color:      var(--header-color);
}

.site-header .shell {
	padding-top:    0;
	padding-bottom: 0;
}

/*
   Desktop: [LOGO] [NAV] [END = tools + hamburger]
*/
.header-grid {
	display:               grid;
	grid-template-areas:   "logo nav end";
	/* minmax(0, 1fr) дає змогу стискати колонку меню; інакше 1fr має min = ширина всіх пунктів і вони заїжджають під header-end. */
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap:            10px;
	align-items:           center;
	min-height:            var(--header-h);
}

.header-grid > * {
	min-width: 0;
}

.header-logo {
	grid-area:   logo;
	min-width:   min-content;
	justify-self: start;
}

.header-end {
	grid-area:       end;
	display:         flex;
	align-items:     center;
	flex:            0 0 auto;
	flex-shrink:     0;
	gap:             0;
	justify-self:    end;
	min-width:       max-content;
	white-space:     nowrap;
	position:        relative;
	z-index:         2;
}

.header-hamburger { display: none; }

/* ==========================================================================
   5a. LOGO
   ========================================================================== */

.header-logo__link {
	display:         flex;
	align-items:     center;
	text-decoration: none;
	padding:         6px 12px 6px 0;
	color:           #fff;
}

.header-logo__img {
	display:    block;
	max-height: var(--header-h);
	width:      auto;
	object-fit: contain;
}

.header-logo__text {
	font-size:      20px;
	font-weight:    900;
	letter-spacing: -0.02em;
	line-height:    1;
	color:          #fff;
	text-transform: uppercase;
	white-space:    nowrap;
}

/* ==========================================================================
   5b. HEADER NAV — горизонтальне меню (inline, без wireframe-рамки)
   ========================================================================== */

.header-nav {
	grid-area:   nav;
	position:    relative;
	z-index:     1;
	display:     flex;
	align-items: center;
	height:      100%;
	min-width:   0;
	max-width:   100%;
	overflow:    hidden;
}

/* WordPress генерує <ul class="header-nav__list"> */
.header-nav__list {
	display:        flex;
	align-items:    stretch;
	list-style:     none;
	margin:         0;
	padding:        0;
	height:         100%;
	width:          100%;
	min-width:      0;
	max-width:      100%;
	gap:            0;
	flex-wrap:      nowrap;
}

.header-nav__list > li {
	position:  relative;
	min-width: 0;
	flex:      0 1 auto;
}

.header-nav__list > li > a,
.header-nav__list > li > span {
	display:         flex;
	align-items:     center;
	height:          100%;
	min-width:       0;
	max-width:       100%;
	padding:         0 10px;
	font-size:       clamp(11px, 0.9vw, 14px);
	font-weight:     700;
	text-transform:  uppercase;
	letter-spacing:  clamp(0.02em, 0.05vw, 0.08em);
	color:           rgba(255, 255, 255, 0.92);
	text-decoration: none;
	white-space:     nowrap;
	overflow:        hidden;
	text-overflow:   ellipsis;
	transition:      background 0.15s, color 0.15s;
}

.header-nav__list > li > a:hover,
.header-nav__list > li > a:focus-visible,
.header-nav__list > li.current-menu-item > a,
.header-nav__list > li.current-menu-ancestor > a {
	background: rgba(0, 0, 0, 0.25);
	color:      #fff;
	outline:    none;
}

/* Dropdown (2-й рівень) */
.header-nav__list li ul {
	display:    none;
	position:   absolute;
	top:        100%;
	left:       0;
	min-width:  180px;
	background: #7b0000;
	list-style: none;
	padding:    4px 0;
	z-index:    500;
	box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.header-nav__list li:hover > ul,
.header-nav__list li:focus-within > ul {
	display: block;
}

.header-nav__list li ul li a {
	display:         block;
	padding:         8px 14px;
	font-size:       12px;
	font-weight:     600;
	color:           rgba(255, 255, 255, 0.88);
	text-decoration: none;
	white-space:     nowrap;
	transition:      background 0.12s;
}

.header-nav__list li ul li a:hover {
	background: rgba(255, 255, 255, 0.15);
	color:      #fff;
}

/* ==========================================================================
   5c. HEADER TOOLS — іконки + годинник
   ========================================================================== */

.header-tools {
	display:     flex;
	align-items: center;
	gap:         2px;
	padding:     0 0 0 8px;
	height:      100%;
}

/* Кнопка-іконка */
.header-tool {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           36px;
	height:          36px;
	border:          none;
	border-radius:   4px;
	background:      transparent;
	color:           rgba(255, 255, 255, 0.88);
	cursor:          pointer;
	transition:      background 0.15s, color 0.15s;
	flex-shrink:     0;
}

.header-tool:hover,
.header-tool:focus-visible {
	background: rgba(0, 0, 0, 0.25);
	color:      #fff;
	outline:    none;
}

.header-tool svg {
	display:      block;
	flex-shrink:  0;
}

/* Соцмережі в хедері (після пошуку) */
.header-tools__social {
	display:     flex;
	align-items: center;
	gap:         0;
	margin:      0;
	padding:     0 2px 0 0;
	flex-shrink: 0;
}

.header-tools__social .social-link,
.header-tools__social .social-link:visited {
	width:           36px;
	height:          36px;
	margin:          0;
	border:          none;
	border-radius:   4px;
	background:      transparent;
	color:           rgba(255, 255, 255, 0.88);
	text-decoration: none;
}

.header-tools__social .social-link:hover,
.header-tools__social .social-link:focus-visible {
	background: rgba(0, 0, 0, 0.25);
	color:      #fff;
	outline:    none;
}

/* Годинник + Дата */
.header-clock {
	display:        flex;
	flex-direction: column;
	align-items:    flex-end;
	padding:        0 4px 0 6px;
	gap:            1px;
	min-width:      72px;
}

.header-clock__time {
	font-size:      14px;
	font-weight:    700;
	color:          #fff;
	line-height:    1.2;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

.header-clock__date {
	font-size:      10px;
	font-weight:    500;
	color:          rgba(255, 255, 255, 0.75);
	line-height:    1.2;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   5d. HAMBURGER — три лінії
   ========================================================================== */

.header-hamburger {
	display:         none;
	flex-direction:  column;
	justify-content: center;
	gap:             5px;
	width:           40px;
	height:          40px;
	padding:         8px;
	border:          none;
	background:      transparent;
	cursor:          pointer;
	border-radius:   4px;
	transition:      background 0.15s;
}

.header-hamburger:hover,
.header-hamburger:focus-visible {
	background: rgba(0, 0, 0, 0.25);
	outline:    none;
}

.hamburger-line {
	display:      block;
	width:        100%;
	height:       2px;
	background:   #fff;
	border-radius: 2px;
	transition:   transform 0.2s;
}

/* ==========================================================================
   6. NAV BAR (ALT ROW) — впритул під header, без відступу
   ========================================================================== */

.nav-bar {
	position:   sticky;
	top:        calc(var(--header-h) + var(--wp-admin-bar));
	z-index:    200;
	border-top: none;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
	background: #fff;
}

.nav-bar .shell { padding-top: 0; padding-bottom: 0; }

.nav-grid {
	display:               grid;
	grid-template-areas:   "menu social";
	grid-template-columns: 1fr auto;
	gap:                   var(--gap);
	align-items:           stretch;
}

.nav-menu   { grid-area: menu;   min-height: 36px; }
.nav-social { grid-area: social; min-height: 36px; }

/* ==========================================================================
   7. HEADER IMAGE / BANNER
   ========================================================================== */

.header-image { background: #fff; }

.header-image .shell {
	padding-top:    10px;
	padding-bottom: 10px;
}

.header-image .block { min-height: 90px; }

/* ==========================================================================
   8. PORTAL — головна сітка контенту
   ========================================================================== */

.site-main { padding: 12px 0 20px; }

.portal {
	display:               grid;
	gap:                   var(--gap);
	grid-template-columns: minmax(0, 1fr);
	/* Права колонка остання — одразу перед футером на мобільних */
	grid-template-areas:
		"latest"
		"left"
		"between"
		"center"
		"feed"
		"right";
}

/* Інакше колонки grid не стискаються → горизонтальний скрол */
.portal > * {
	min-width: 0;
}

.portal__left    { grid-area: left;    min-height: 180px; min-width: 0; overflow: hidden; }
.portal__latest  { grid-area: latest; min-height: 220px; }
.portal__between { grid-area: between; min-height: 80px;  }
.portal__center  { grid-area: center;  min-height: 380px; }
.portal__right   { grid-area: right;   min-height: 180px; min-width: 0; }
.portal__feed    { grid-area: feed;    min-height: 120px; }

.portal__latest,
.portal__left,
.portal__right,
.portal__between,
.portal__center,
.portal__feed { display: block; }

/* Планшет: головна — 2 колонки (ліва смуга + основний стовп), права колонка смугою знизу */
@media (min-width: 768px) and (max-width: 1023px) {
	.portal--home {
		grid-template-columns: 30% minmax(0, 1fr);
		grid-template-areas:
			"left latest"
			"left between"
			"left center"
			"left feed"
			"right right";
	}

	.portal--home .portal__right {
		margin-top: var(--gap);
	}
}

@media (min-width: 1024px) {
	.portal {
		grid-template-columns: 22% minmax(0, 1fr) 22%;
		grid-template-areas:
			"left  latest  right"
			"left  between right"
			"left  center  right"
			"left  feed    right";
	}
	.portal__left  { grid-row: 1 / 5; min-height: 0; }
	.portal__right { grid-row: 1 / 5; min-height: 0; }
}

@media (min-width: 1280px) {
	.portal { grid-template-columns: 20% minmax(0, 1fr) 22%; }
}

/* Права колонка: прибираємо зайвий wireframe-відступ; внутрішній стек на всю висоту */
.portal__right.block {
	min-height:     0;
	padding:        0;
	background:     transparent;
	align-self:     stretch;
}

.portal__right.block::before { display: none; }

.portal__right-inner {
	display:        flex;
	flex-direction: column;
	gap:            var(--gap);
	align-items:    stretch;
	min-height:     100%;
	flex:           1 1 auto;
}

.portal__right-widgets {
	display:        flex;
	flex-direction: column;
	gap:            var(--gap);
	flex:           1 1 auto;
	min-height:     0;
}

.portal__right-custom {
	background:   var(--block-bg);
	box-shadow:   var(--block-shadow);
	padding:      10px;
	min-height:   0;
}

.portal__right-widgets .widget {
	margin: 0;
}

.portal__right-widgets .widget-title {
	margin:         0 0 8px;
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color:          #444;
}

.portal__right-widgets .widget:not(:last-child) {
	padding-bottom: var(--gap);
	border-bottom:  1px solid rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
	.sidebar-top {
		flex-shrink: 0;
	}
}

/* ==========================================================================
   8b. SIDEBAR TOP — перегляди (день / тиждень / місяць)
   ========================================================================== */

.sidebar-top {
	border:        none;
	box-shadow:    var(--block-shadow);
	background:    var(--block-bg);
	min-height:    0;
	align-self:    stretch;
}

.sidebar-top__head {
	padding:       8px 8px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-top__label {
	margin:         0 0 8px;
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color:          #555;
	text-align:     center;
}

.sidebar-top__tabs {
	display:         flex;
	flex-wrap:       wrap;
	gap:             4px;
	justify-content: center;
	padding:         8px;
}

.sidebar-top__tabs--solo {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-top__tab {
	flex:           1 1 auto;
	min-width:      0;
	padding:        6px 8px;
	border:         1px solid rgba(0, 0, 0, 0.2);
	border-radius:  4px;
	background:     #fff;
	font-size:      11px;
	font-weight:    700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor:         pointer;
	color:          #333;
	transition:     background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-top__tab:hover,
.sidebar-top__tab:focus-visible {
	border-color: #c0392b;
	color:        #c0392b;
	outline:      none;
}

.sidebar-top__tab[aria-selected="true"] {
	background:   #c0392b;
	border-color: #c0392b;
	color:        #fff;
}

.sidebar-top__panel { padding: 0; }

.sidebar-top__panel.is-hidden,
.sidebar-top__panel[hidden] {
	display: none !important;
}

.sidebar-top__list {
	list-style: none;
	margin:     0;
	padding:    0;
}

.sidebar-top__list li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-top__list li:last-child {
	border-bottom: none;
}

.sidebar-top__link {
	display:         flex;
	align-items:     flex-start;
	gap:             10px;
	padding:         10px 8px;
	text-decoration: none;
	color:           inherit;
	transition:      background 0.12s;
}

.sidebar-top__link:hover,
.sidebar-top__link:focus-visible {
	background: rgba(0, 0, 0, 0.04);
	outline:    none;
}

.sidebar-top__thumb {
	flex-shrink: 0;
	width:       72px;
	height:      54px;
	overflow:    hidden;
	border:      1px solid rgba(0, 0, 0, 0.12);
	display:     block;
}

.sidebar-top__thumb img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.sidebar-top__body {
	display:        flex;
	flex-direction: column;
	gap:            4px;
	min-width:      0;
}

.sidebar-top__title {
	font-size:   13px;
	font-weight: 700;
	line-height: 1.35;
	color:       #111;
	display:     -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:    hidden;
}

.sidebar-top__link:hover .sidebar-top__title {
	color: #a93226;
}

.sidebar-top__date {
	font-size:   11px;
	font-weight: 600;
	color:       #666;
}

.sidebar-top__empty {
	margin:     0;
	padding:    12px 10px;
	font-size:  12px;
	color:      #666;
	text-align: center;
}

/* Менші екрани: без мініатюр */
@media (max-width: 767px) {
	.sidebar-top__thumb {
		display: none;
	}

	.sidebar-top__link {
		padding: 8px;
	}
}

/* Одиночна публікація: без верхнього блоку останніх, контент на всю ширину */
.portal--single {
	grid-template-columns: 1fr;
	grid-template-areas:
		"center"
		"left"
		"right";
}

.portal--single .portal__left,
.portal--single .portal__center,
.portal--single .portal__right {
	display:    block;
	min-height: 0;
}

@media (min-width: 768px) {
	.portal--single {
		grid-template-columns: minmax(0, 28%) minmax(0, 1fr);
		grid-template-areas:
			"left center"
			"right right";
	}
}

@media (min-width: 1024px) {
	.portal--single {
		grid-template-columns: 22% minmax(0, 1fr) 22%;
		grid-template-areas: "left center right";
	}
	.portal--single .portal__left { grid-row: auto; }
}

@media (min-width: 1280px) {
	.portal--single { grid-template-columns: 20% minmax(0, 1fr) 22%; }
}

/* ==========================================================================
   8c. HOME FEED — стрічка «Ще новини»
   ========================================================================== */

.home-feed {
	border:        none;
	box-shadow:    var(--block-shadow);
	background:    var(--block-bg);
	padding:       0;
	min-height:    0;
}

.home-feed__heading {
	margin:         0;
	padding:        10px 12px;
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color:          #333;
	border-bottom:  1px solid rgba(0, 0, 0, 0.12);
	background:     #f5f5f5;
}

.home-feed__list {
	list-style: none;
	margin:     0;
	padding:    0;
}

.home-feed__item {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.home-feed__item:last-child {
	border-bottom: none;
}

.home-feed__link {
	display:               grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items:           baseline;
	gap:                   10px 14px;
	padding:               8px 12px;
	text-decoration:       none;
	color:                 inherit;
	font-size:             14px;
	line-height:           1.45;
	transition:            background 0.12s;
}

.home-feed__link:hover,
.home-feed__link:focus-visible {
	background: rgba(0, 0, 0, 0.04);
	outline:    none;
}

.home-feed__time {
	font-size:   12px;
	font-weight: 700;
	color:       #c0392b;
	white-space: nowrap;
}

.home-feed__title {
	font-weight: 600;
	color:       #111;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 2px;
}

.home-feed__link:hover .home-feed__title,
.home-feed__link:focus-visible .home-feed__title {
	color:                 var(--link-hover);
	text-decoration-color: var(--link-hover);
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */

.site-footer {
	border-top: none;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
	background: #fff;
	margin-top: 10px;
}

.site-footer .shell {
	padding-top:    14px;
	padding-bottom: 14px;
}

.footer-grid {
	display:               grid;
	grid-template-columns: 1fr;
	gap:                   var(--gap);
}

@media (min-width: 1024px) {
	.footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.footer-grid .block { min-height: 80px; }

.footer-bottom { margin-top: var(--gap); }
.footer-bottom .block { min-height: 36px; }

/* ==========================================================================
   10. HEADER RESPONSIVE
   ========================================================================== */

/* Вузький десктоп: компактніше лого + годинник. */
@media (min-width: 1024px) and (max-width: 1320px) {
	.header-logo__link {
		padding-right: 8px;
	}

	.header-logo__text {
		font-size: 18px;
	}

	.header-clock {
		min-width:     0;
		padding-left:  4px;
		padding-right: 2px;
	}

	.header-clock__time {
		font-size: 13px;
	}

	.header-clock__date {
		font-size: 9px;
	}
}

@media (max-width: 1200px) {
	.header-nav {
		display: none;
	}

	.header-hamburger {
		display: flex;
	}

	.header-clock__date {
		display: none;
	}
}

@media (max-width: 767px) {
	.header-tools     { display: none; }
	.header-hamburger { display: flex; }
}

/* ==========================================================================
   11. NAV BAR RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
	.nav-social { display: none; }
	.nav-grid   { grid-template-areas: "menu"; grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
	.nav-bar { display: none; }
}

/* ==========================================================================
   12. MOBILE MENU DRAWER
   ========================================================================== */

#mobile-menu {
	position:    fixed;
	inset:       0 0 0 auto;
	width:       min(320px, 85vw);
	background:  var(--block-bg);
	border-left: none;
	box-shadow:  -8px 0 28px rgba(0, 0, 0, 0.15);
	z-index:     400;
	padding:     24px 16px;
	overflow-y:  auto;
	transform:   translateX(100%);
	transition:  transform 0.25s ease;
	display:     flex;
	flex-direction: column;
}

.lanka-kso-dark #mobile-menu {
	background: var(--dark-surface);
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.55);
}

/* Social links (icons) */
.nav-social__icons,
.mobile-social__icons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
	margin-top: 18px; /* щоб не перекривало data-label */
}

.social-link,
.social-link:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 30%;
	border: var(--hairline);
	background: #fff;
	color: #000;
	text-decoration: none;
}

/* Один стиль іконок: контур (path / rect / circle / polygon), без заливки. */
.social-link svg {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.social-link:hover { opacity: 0.85; }

#mobile-menu.is-open { transform: translateX(0); }

#mobile-overlay {
	display:    none;
	position:   fixed;
	inset:      0;
	background: rgba(0, 0, 0, 0.45);
	z-index:    399;
}

#mobile-overlay.is-open { display: block; }

.mobile-menu__top {
	display:         flex;
	align-items:     flex-start;
	justify-content: space-between;
	gap:             10px;
	padding-bottom:  10px;
	border-bottom:   1px solid rgba(0, 0, 0, 0.1);
}

.lanka-kso-dark .mobile-menu__top {
	border-bottom-color: var(--dark-border);
}

.mobile-menu__close {
	display:       inline-flex;
	align-items:   center;
	justify-content: center;
	width:         32px;
	height:        32px;
	border:        none;
	background:    transparent;
	font-size:     32px;
	line-height:   1;
	cursor:        pointer;
	color:         #111;
	border-radius: 8px;
}

.mobile-menu__close:hover,
.mobile-menu__close:focus-visible {
	background: rgba(0, 0, 0, 0.07);
	outline:    none;
}

.lanka-kso-dark .mobile-menu__close {
	color: var(--dark-text);
}

.lanka-kso-dark .mobile-menu__close:hover,
.lanka-kso-dark .mobile-menu__close:focus-visible {
	background: rgba(255, 255, 255, 0.08);
}

.mobile-menu__sections {
	display:    flex;
	flex-direction: column;
	gap:        var(--gap);
	flex:       1 1 auto;
	min-height: 0;
	padding-top: 12px;
}

.mobile-menu__nav {
	order: 1;
	padding-top: 12px;
}

.mobile-menu__social {
	order: 2;
	padding-top: 6px;
	display:       flex;
	align-items:   center;
	justify-content: center;
	gap:           10px;
	flex-wrap:     wrap;
}

.mobile-menu__tools {
	order:          3;
	display:        flex;
	align-items:    center;
	justify-content: center;
	flex-wrap:      wrap;
	gap:            10px;
	padding-top:    10px;
	border-top:     1px solid rgba(0, 0, 0, 0.08);
}

.lanka-kso-dark .mobile-menu__tools {
	border-top-color: var(--dark-border);
}

.mobile-menu__clock {
	display:        flex;
	flex-direction: column;
	justify-content: center;
	align-items:    flex-start;
	gap:            2px;
	padding:        0;
}

.mobile-menu__clock .header-clock__time {
	color:       #111;
	font-size:   16px;
	font-weight: 800;
}

.mobile-menu__clock .header-clock__date {
	color:       #555;
	font-size:   11px;
	font-weight: 600;
}

#mobile-menu ul {
	list-style: none;
	margin:     0;
	padding:    0;
}

#mobile-menu a {
	display:         block;
	padding:         10px 8px;
	border-radius:   10px;
	color:           #111;
	text-decoration: none;
	font-weight:     700;
}

.lanka-kso-dark #mobile-menu a {
	color: var(--dark-text);
}

#mobile-menu a:hover,
#mobile-menu a:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	outline:    none;
}

.lanka-kso-dark #mobile-menu a:hover,
.lanka-kso-dark #mobile-menu a:focus-visible {
	background: rgba(255, 255, 255, 0.06);
}

.mobile-menu__social .social-link,
.mobile-menu__social .social-link:visited {
	display:        inline-flex;
	align-items:    center;
	justify-content: center;
	width:          34px;
	height:         34px;
	padding:        0;
	line-height:    0;
	border-radius:  10px;
	background:     transparent;
	border-color:   rgba(0, 0, 0, 0.18);
	color:          #111;
	margin:         0;
}

.mobile-social__icons {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	gap:             10px;
	margin-top:      0;
}

.mobile-menu__social .social-link svg {
	width:      18px;
	height:     18px;
	display:    block;
	flex-shrink: 0;
	transform:  translate(0, 0);
}

.mobile-social-tool {
	width:           34px;
	height:          34px;
	padding:         0;
	border:          1px solid rgba(0, 0, 0, 0.18);
	border-radius:   10px;
	background:      transparent;
	color:           #111;
}

.mobile-social-tool:hover,
.mobile-social-tool:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	outline:    none;
}

.lanka-kso-dark .mobile-tool {
	color:      var(--dark-text);
	background: transparent;
}

.lanka-kso-dark .mobile-menu__clock .header-clock__time {
	color: var(--dark-text);
}

.lanka-kso-dark .mobile-menu__clock .header-clock__date {
	color: var(--dark-muted);
}

.lanka-kso-dark .mobile-menu__social .social-link,
.lanka-kso-dark .mobile-menu__social .social-link:visited {
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .mobile-social-tool {
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .mobile-social-tool:hover,
.lanka-kso-dark .mobile-social-tool:focus-visible {
	background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   12b. LOGIN MODAL
   ========================================================================== */

#login-modal,
#lanka-kso-comment-notice-modal {
	display:  none;
	position: fixed;
	inset:    0;
	z-index:  620;
}

#lanka-kso-comment-notice-modal {
	z-index: 621;
}

#login-modal.is-open,
#lanka-kso-comment-notice-modal.is-open { display: block; }

.lanka-kso-comment-notice-modal__text {
	margin:    0 38px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color:     rgba(0, 0, 0, 0.85);
}

.lanka-kso-dark .lanka-kso-comment-notice-modal__text {
	color: var(--dark-text);
}

.login-modal__backdrop {
	position:   absolute;
	inset:      0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.login-modal__box {
	position:      absolute;
	top:           50%;
	left:          50%;
	transform:     translate(-50%, -50%);
	width:         min(420px, 94vw);
	background:    #fff;
	border-radius: 14px;
	padding:       24px 20px 18px;
	box-shadow:    0 14px 42px rgba(0,0,0,0.28);
}

.login-modal__close {
	position:      absolute;
	top:           10px;
	right:         10px;
	width:         36px;
	height:        36px;
	border:        none;
	border-radius: 10px;
	background:    rgba(0, 0, 0, 0.06);
	font-size:     22px;
	line-height:   1;
	cursor:        pointer;
}

.login-modal__close:hover,
.login-modal__close:focus-visible {
	background: rgba(0, 0, 0, 0.11);
	outline:    none;
}

.login-modal__title {
	margin:        0 38px 14px 0;
	font-size:     15px;
	font-weight:   800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.login-modal__form {
	display:        flex;
	flex-direction: column;
	gap:            8px;
}

.login-modal__box label {
	display:       block;
	font-size:     12px;
	font-weight:   700;
	margin-bottom: 5px;
}

.login-modal__box input[type="text"],
.login-modal__box input[type="password"] {
	width:         100%;
	padding:       10px 12px;
	border:        1px solid rgba(0, 0, 0, 0.2);
	border-radius: 10px;
	font-size:     14px;
}

.login-modal__box input[type="text"]:focus,
.login-modal__box input[type="password"]:focus {
	border-color: #c0392b;
	box-shadow:   0 0 0 3px rgba(192, 57, 43, 0.2);
	outline:      none;
}

.login-modal__remember {
	display:       inline-flex !important;
	align-items:   center;
	gap:           8px;
	margin:        2px 0 4px;
}

.login-modal__remember input {
	width: auto !important;
}

#login-modal-submit {
	width:         100%;
	padding:       11px 14px;
	border:        none;
	border-radius: 10px;
	background:    var(--header-bg);
	color:         #fff;
	font-size:     14px;
	font-weight:   800;
	cursor:        pointer;
}

.login-modal__msg {
	display:       none;
	border-radius: 10px;
	padding:       8px 10px;
	font-size:     13px;
	line-height:   1.4;
}

.login-modal__msg.is-error {
	display:    block;
	background: rgba(192, 57, 43, 0.12);
	color:      #7b241c;
}

.login-modal__links {
	margin-top:      10px;
	display:         flex;
	gap:             12px;
	justify-content: space-between;
}

.lanka-kso-dark .login-modal__box {
	background: var(--dark-surface);
}

.lanka-kso-dark .login-modal__close {
	background: rgba(255, 255, 255, 0.08);
	color:      var(--dark-text);
}

.lanka-kso-dark .login-modal__box label {
	color: var(--dark-muted);
}

.lanka-kso-dark .login-modal__box input[type="text"],
.lanka-kso-dark .login-modal__box input[type="password"] {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .login-modal__msg.is-error {
	background: rgba(255, 107, 107, 0.15);
	color:      #ffb8b8;
}

/* ==========================================================================
   12c. AUTH PAGES (register / lostpass)
   ========================================================================== */

.site-main--auth {
	padding: 18px 0 28px;
}

.auth-card {
	max-width:    520px;
	margin:       0 auto;
	background:   var(--block-bg);
	box-shadow:   var(--block-shadow);
	border-radius: 14px;
	padding:      18px 16px;
}

.auth-card__title {
	margin:        0 0 12px;
	font-size:     20px;
	font-weight:   900;
	line-height:   1.2;
}

.auth-card__alert {
	border-radius: 10px;
	padding:       10px 12px;
	margin:        0 0 10px;
}

.auth-card__alert p + p {
	margin-top: 4px;
}

.auth-card__alert--error {
	background: rgba(192, 57, 43, 0.12);
	color:      #7b241c;
}

.auth-card__alert--ok {
	background: rgba(22, 160, 133, 0.14);
	color:      #0e6251;
}

.auth-card__form {
	display:        flex;
	flex-direction: column;
	gap:            8px;
}

.auth-card__form label {
	font-size:      12px;
	font-weight:    700;
}

.auth-card__form input {
	width:          100%;
	padding:        10px 12px;
	border:         1px solid rgba(0, 0, 0, 0.18);
	border-radius:  10px;
	font-size:      14px;
}

.auth-card__form input:focus {
	border-color: #c0392b;
	box-shadow:   0 0 0 3px rgba(192, 57, 43, 0.2);
	outline:      none;
}

.auth-card__form button {
	margin-top:    4px;
	padding:       11px 14px;
	border:        none;
	border-radius: 10px;
	background:    var(--header-bg);
	color:         #fff;
	font-size:     14px;
	font-weight:   800;
	cursor:        pointer;
}

.auth-card__links {
	margin-top: 10px;
}

.auth-card__links-sep {
	margin: 0 6px;
	opacity: 0.45;
}

.auth-card__remember {
	display:     flex;
	align-items: center;
	gap:         8px;
	font-weight: 600;
	margin:      6px 0 10px;
	cursor:      pointer;
}

.auth-card__remember input {
	width: auto !important;
	margin: 0;
}

.lanka-kso-dark .auth-card {
	background: var(--dark-surface);
}

.lanka-kso-dark .auth-card__title {
	color: var(--dark-text);
}

.lanka-kso-dark .auth-card__alert--error {
	background: rgba(255, 107, 107, 0.15);
	color:      #ffb8b8;
}

.lanka-kso-dark .auth-card__alert--ok {
	background: rgba(46, 204, 113, 0.15);
	color:      #b9f6ca;
}

.lanka-kso-dark .auth-card__form label {
	color: var(--dark-muted);
}

.lanka-kso-dark .auth-card__form input {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

/* ==========================================================================
   13. CUSTOMIZER TOGGLE HOOKS
   ========================================================================== */

.lanka-kso-no-header-image .header-image { display: none; }

/* Sticky-банер: за замовчуванням одразу під основним header */
.lanka-kso-header-image-sticky .header-image {
	position: sticky;
	top:      calc(var(--header-h) + var(--wp-admin-bar));
	z-index:  150;
}

/* +40px лише якщо є друга навігаційна смуга (видна з ≥1024px) */
@media (min-width: 1024px) {
	body.lanka-kso-has-secondary-nav.lanka-kso-header-image-sticky .header-image {
		top: calc(var(--header-h) + var(--nav-bar-sticky-offset) + var(--wp-admin-bar));
	}
}

.lanka-kso-no-between-banner .portal__between { display: none; }

@media (min-width: 1024px) {
	.lanka-kso-no-between-banner .portal {
		grid-template-areas:
			"left  latest  right"
			"left  center  right"
			"left  feed    right";
	}
	.lanka-kso-no-between-banner .portal__left  { grid-row: 1 / 4; }
	.lanka-kso-no-between-banner .portal__right { grid-row: 1 / 4; }
}

@media (min-width: 768px) and (max-width: 1023px) {
	.lanka-kso-no-between-banner .portal--home {
		grid-template-columns: 30% minmax(0, 1fr);
		grid-template-areas:
			"left latest"
			"left center"
			"left feed"
			"right right";
	}

	.lanka-kso-no-between-banner .portal--home .portal__right {
		margin-top: var(--gap);
	}
}

/* ==========================================================================
   14. UTILITY — screen-reader only
   ========================================================================== */

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

/* ==========================================================================
   15. LEFT COLUMN — стрічка новин (.lcol)
   ========================================================================== */

.portal__left {
	min-height: 0;
}

.lcol {
	border:        none;
	box-shadow:    var(--block-shadow);
	background:    var(--block-bg);
	height:        100%;
}

.lcol__header {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	padding:         6px 8px;
	border-bottom:   var(--hairline);
	background:      #f5f5f5;
	gap:             6px;
}

.lcol__title {
	font-size:      14px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height:    1.2;
	text-align:     center;
	flex:           1 1 auto;
}

.lcol__count {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	min-width:       20px;
	height:          20px;
	padding:         0 5px;
	border:          var(--hairline);
	background:      #fff;
	font-size:       10px;
	font-weight:     700;
	line-height:     1;
	white-space:     nowrap;
}

.lcol__list { list-style: none; margin: 0; padding: 0; }

.lcol__empty { padding: 12px 8px; font-size: 12px; color: #666; }

.lcol-item { border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.lcol-item:last-child { border-bottom: none; }

.lcol-item__link {
	display:         flex;
	align-items:     baseline;
	gap:             5px;
	padding:         5px 8px;
	text-decoration: none;
	color:           inherit;
	transition:      background 0.15s;
}

.lcol-item__body {
	display:        flex;
	flex-direction: column;
	gap:            3px;
	min-width:      0;
}

.lcol-item__link:hover,
.lcol-item__link:focus-visible {
	background: rgba(0, 0, 0, 0.04);
	outline:    none;
}

.lcol-item__thumb { display: none; }

.lcol-item__time {
	flex-shrink: 0;
	font-size:   10px;
	font-weight: 700;
	color:       #c0392bb3;
	white-space: nowrap;
	line-height: 1.4;
	min-width:   80px;
}

.lcol-item__title { font-size: 14px; line-height: 1.4; color: #111; font-weight: 700; }

.lcol-item__link:hover .lcol-item__title,
.lcol-item__link:focus-visible .lcol-item__title {
	color:                 var(--link-hover);
	text-decoration:       underline;
	text-decoration-color: var(--link-hover);
	text-underline-offset: 2px;
}

.lcol-injection { border-bottom: 1px solid rgba(0, 0, 0, 0.12); padding: 4px 0; }

/* ==========================================================================
   16. LEFT COLUMN — мобільний вигляд (картка з мініатюрою)
   ========================================================================== */

@media (max-width: 767px) {

	.portal__left { min-height: 0; }

	.lcol-item--has-thumb .lcol-item__link {
		align-items: flex-start;
		gap:         8px;
		padding:     8px;
	}

	.lcol-item--has-thumb .lcol-item__thumb {
		display:     block;
		flex-shrink: 0;
		width:       72px;
		height:      54px;
		overflow:    hidden;
		border:      1px solid rgba(0, 0, 0, 0.15);
	}

	.lcol-item--has-thumb .lcol-item__thumb img {
		width:      100%;
		height:     100%;
		object-fit: cover;
		display:    block;
	}

	.lcol-item--has-thumb .lcol-item__body {
		display:        flex;
		flex-direction: column;
		gap:            3px;
		min-width:      0;
	}

	.lcol-item__time { font-size: 10px; min-width: 0; }
	.lcol-item__title { font-size: 13px; }

	.lcol-item:not(.lcol-item--has-thumb) .lcol-item__link { padding: 7px 8px; }
}

/* ==========================================================================
   17. SEARCH MODAL
   ========================================================================== */

#search-modal {
	display:  none;
	position: fixed;
	inset:    0;
	z-index:  600;
}

#search-modal.is-open { display: block; }

.search-modal__backdrop {
	position:   absolute;
	inset:      0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(3px);
}

.search-modal__box {
	position:      absolute;
	top:           50%;
	left:          50%;
	transform:     translate(-50%, -50%);
	width:         min(640px, 94vw);
	background:    #fff;
	border:        none;
	padding:       28px 24px 24px;
	border-radius: 14px;
	box-shadow:    0 12px 40px rgba(0,0,0,0.28);
}

.search-modal__close {
	position:      absolute;
	top:           10px;
	right:         10px;
	width:         40px;
	height:        40px;
	display:       flex;
	align-items:   center;
	justify-content: center;
	border:        none;
	border-radius: 10px;
	background:    rgba(0, 0, 0, 0.06);
	font-size:     22px;
	line-height:   1;
	cursor:        pointer;
	color:         #555;
	transition:    color 0.15s, background 0.15s;
}

.search-modal__close:hover {
	color:      #c0392b;
	background: rgba(0, 0, 0, 0.09);
}

.search-modal__title {
	font-size:     14px;
	font-weight:   800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin:        0 40px 16px 0;
	color:         #111;
}

/* Форма пошуку: label обгортає input у WP — даємо label flex:1, інакше поле лишається вузьким. */
.search-modal__box .search-form,
.search-results__form .search-form,
.search-results__empty .search-form {
	display:     flex;
	align-items: stretch;
	gap:         10px;
	width:       100%;
}

.search-results__empty .search-form {
	max-width: 520px;
	margin:    0 auto;
}

.search-form__label,
.search-modal__box .search-form > label,
.search-results__form .search-form > label,
.search-results__empty .search-form > label {
	flex:      1 1 auto;
	min-width: 0;
	display:   block;
}

.search-modal__box .search-field,
.search-results__form .search-field,
.search-results__empty .search-field {
	box-sizing:   border-box;
	width:        100%;
	padding:      12px 16px;
	border:       1px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	font-size:    15px;
	font-family:  var(--font);
	outline:      none;
	transition:   border-color 0.15s, box-shadow 0.15s;
}

.search-results__form .search-field,
.search-results__empty .search-field {
	font-size: 15px;
	padding:   11px 16px;
}

.search-modal__box .search-field:focus,
.search-results__form .search-field:focus,
.search-results__empty .search-field:focus {
	border-color: #c0392b;
	box-shadow:   0 0 0 3px rgba(192, 57, 43, 0.2);
}

.search-modal__box .search-submit,
.search-results__form .search-submit,
.search-results__empty .search-submit {
	flex-shrink:   0;
	padding:       12px 22px;
	background:    var(--header-bg);
	color:         #fff;
	border:        none;
	border-radius: 10px;
	font-size:     14px;
	font-weight:   700;
	font-family:   var(--font);
	cursor:        pointer;
	transition:    opacity 0.15s, transform 0.1s;
	-webkit-appearance: none;
	appearance:    none;
}

.search-modal__box .search-submit:hover,
.search-results__form .search-submit:hover,
.search-results__empty .search-submit:hover {
	opacity:   0.9;
	transform: translateY(-1px);
}

.search-results__form .search-submit,
.search-results__empty .search-submit {
	font-size: 14px;
	padding:   11px 20px;
}

/* ==========================================================================
   18. DARK THEME  (.lanka-kso-dark на <html>)
   ========================================================================== */

.lanka-kso-dark {
	--link:         #ff8a80;
	--link-hover:   #ffab91;
	--link-visited: #e57373;
	--hairline:     1px solid rgba(255, 255, 255, 0.12);
	--block-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.lanka-kso-dark body {
	background: var(--dark-bg);
	color:      var(--dark-text);
}

.lanka-kso-dark .block {
	background:   var(--dark-surface);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .block::before {
	display: none !important;
}

.lanka-kso-dark .nav-bar {
	background:   var(--dark-surface);
	border-top:   none;
	box-shadow:   0 1px 0 rgba(255, 255, 255, 0.06);
}

.lanka-kso-dark .header-image,
.lanka-kso-dark .site-footer { background: var(--dark-surface); }

.lanka-kso-dark .site-footer {
	border-top: none;
	box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.4);
}

.lanka-kso-dark .lcol {
	background:   var(--dark-surface);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .lcol__header {
	background:   #1a1a1a;
	border-color: var(--dark-border);
}

.lanka-kso-dark .lcol-item { border-color: var(--dark-border); }

.lanka-kso-dark .lcol-item__title { color: var(--dark-text); }

.lanka-kso-dark .lcol-item__link:hover { background: rgba(255,255,255,0.06); }

.lanka-kso-dark .sidebar-top {
	background:   var(--dark-surface);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .sidebar-top__head,
.lanka-kso-dark .sidebar-top__tabs--solo {
	border-bottom-color: var(--dark-border);
}

.lanka-kso-dark .sidebar-top__label { color: var(--dark-muted); }

.lanka-kso-dark .sidebar-top__tab {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .sidebar-top__tab:hover,
.lanka-kso-dark .sidebar-top__tab:focus-visible {
	border-color: #ff6b6b;
	color:        #ff6b6b;
}

.lanka-kso-dark .sidebar-top__tab[aria-selected="true"] {
	background:   #c0392b;
	border-color: #c0392b;
	color:        #fff;
}

.lanka-kso-dark .sidebar-top__list li { border-bottom-color: var(--dark-border); }

.lanka-kso-dark .sidebar-top__title { color: var(--dark-text); }

.lanka-kso-dark .sidebar-top__date { color: var(--dark-muted); }

.lanka-kso-dark .sidebar-top__thumb { border-color: var(--dark-border); }

.lanka-kso-dark .home-feed {
	background:   var(--dark-surface);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .home-feed__heading {
	background:   #1a1a1a;
	border-bottom-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .home-feed__item { border-bottom-color: var(--dark-border); }

.lanka-kso-dark .home-feed__title { color: var(--dark-text); }

.lanka-kso-dark .portal__right-widgets .widget-title {
	color: var(--dark-muted);
}

.lanka-kso-dark .portal__right-widgets .widget:not(:last-child) {
	border-bottom-color: var(--dark-border);
}

.lanka-kso-dark .portal__right-custom {
	background: var(--dark-surface);
}

.lanka-kso-dark .p-center {
	background:   var(--dark-surface);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .p-center__band {
	border-bottom-color: var(--dark-border);
}

.lanka-kso-dark .p-center__rubrika {
	color:         #ff6b6b;
	border-bottom-color: var(--dark-border);
}

.lanka-kso-dark .p-center__rubrika a:hover,
.lanka-kso-dark .p-center__rubrika a:focus-visible {
	color: #ff8787;
}

.lanka-kso-dark .p-center-card {
	background:   var(--dark-bg);
	border:       none;
	box-shadow:   0 1px 6px rgba(0, 0, 0, 0.35);
}

.lanka-kso-dark .p-center-card__title,
.lanka-kso-dark .p-center-video__title {
	color: var(--dark-text);
}

.lanka-kso-dark .p-center-card__media,
.lanka-kso-dark .p-center-card__img--ph {
	background: #2a2a2a;
}

.lanka-kso-dark .p-center__list li {
	border-bottom-color: var(--dark-border);
}

.lanka-kso-dark .p-center__rowlink:hover,
.lanka-kso-dark .p-center__rowlink:focus-visible {
	background: rgba(255, 255, 255, 0.05);
}

.lanka-kso-dark .p-center__rowtitle {
	color: var(--dark-text);
}

.lanka-kso-dark .p-center-video__media {
	border-color: var(--dark-border);
}

.lanka-kso-dark .search-modal__box {
	background:   var(--dark-surface);
	border-color: var(--dark-border);
}

.lanka-kso-dark .search-modal__title { color: var(--dark-text); }

.lanka-kso-dark .search-modal__box .search-field {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .search-modal__close {
	color:      var(--dark-muted);
	background: rgba(255, 255, 255, 0.08);
}

.lanka-kso-dark .search-modal__close:hover {
	color:      #ff6b6b;
	background: rgba(255, 255, 255, 0.12);
}

.lanka-kso-dark #mobile-menu {
	background:   var(--dark-surface);
	border-left:  none;
	box-shadow:   -8px 0 32px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   19. HERO LATEST — сітка карток (останні новини)
   ========================================================================== */

/*
  Стратегія сітки:
  Замість grid-auto-rows (що викликає пусті клітинки при непарній кількості)
  використовуємо дворядкову grid-template з явними рядками.

  Desktop (≥ 1024px):
    Ряд 1: [main — 2 рядки] [картка 2] [картка 3]
    Ряд 2: [main — 2 рядки] [картка 4] [картка 5]

  Планшет (640–1023px): 2 колонки; непарна кількість — остання на всю ширину.
  Мобіль (< 640px):     1 колонка.
*/

.hero-latest {
	display:    block !important;
	min-height: 0 !important;
	background: none !important;
	border:     none !important;
	padding:    0;
}

.hero-latest::before { display: none !important; }

.hero-latest__label {
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color:          #888;
	margin-bottom:  6px;
	padding-left:   2px;
}

.hero-latest__grid {
	display:               grid;
	gap:                   3px;
	grid-template-columns: 1fr;
}

.hero-card {
	position:   relative;
	overflow:   hidden;
	background: #1a1a1a;
	height:     180px;
}

@media (min-width: 640px) and (max-width: 1023px) {
	.hero-latest__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-card       { height: 160px; }
	.hero-card--main { height: 160px; }

	.hero-latest__grid > .hero-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (max-width: 1023px) {
	.hero-latest__grid .hero-card:nth-child(n + 6) {
		display: none;
	}
}

@media (min-width: 1024px) {
	.hero-latest__grid {
		grid-template-columns: repeat(3, 1fr);
		grid-auto-flow:        dense;
	}

	.hero-card { height: 160px; }

	.hero-card--main {
		grid-column: 1;
		grid-row:    1 / 3;
		height:      100%;
		min-height:  323px;
	}
}

/* ── Картка — спільні стилі ──────────────────────────────────────────────── */

.hero-card__link {
	display:         block;
	width:           100%;
	height:          100%;
	text-decoration: none;
	color:           #fff;
	position:        relative;
}

.hero-card__img-wrap {
	position: absolute;
	inset:    0;
	overflow: hidden;
}

.hero-card__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform 0.4s ease;
}

.hero-card__img--placeholder {
	background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
}

.hero-card:hover .hero-card__img {
	transform: scale(1.04);
}

.hero-card__overlay {
	position:       absolute;
	inset:          0;
	background:     linear-gradient(
		to top,
		rgba(0, 0, 0, 0.80) 0%,
		rgba(0, 0, 0, 0.40) 40%,
		rgba(0, 0, 0, 0.05) 100%
	);
	pointer-events: none;
	transition:     background 0.3s;
}

.hero-card:hover .hero-card__overlay {
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.88) 0%,
		rgba(0, 0, 0, 0.55) 50%,
		rgba(0, 0, 0, 0.12) 100%
	);
}

.hero-card__body {
	position: absolute;
	bottom:   0;
	left:     0;
	right:    0;
	padding:  10px 12px;
	z-index:  2;
}

.hero-card__title {
	font-size:          13px;
	font-weight:        700;
	line-height:        1.35;
	color:              #fff;
	margin-bottom:      4px;
	display:            -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:           hidden;
	text-shadow:        0 1px 3px rgba(0,0,0,0.6);
}

.hero-card--main .hero-card__title {
	font-size:          16px;
	-webkit-line-clamp: 5;
}

.hero-card__time {
	display:        block;
	font-size:      10px;
	font-weight:    500;
	color:          rgba(255, 255, 255, 0.70);
	letter-spacing: 0.02em;
}

.hero-card__views {
	position:      absolute;
	top:           8px;
	right:         8px;
	display:       flex;
	align-items:   center;
	gap:           3px;
	background:    rgba(0,0,0,0.55);
	color:         rgba(255,255,255,0.85);
	font-size:     10px;
	font-weight:   600;
	padding:       2px 6px;
	border-radius: 2px;
	z-index:       3;
}

@media (max-width: 479px) {
	.hero-card {
		height: 150px;
	}

	.hero-card__title {
		font-size: 12px;
	}

	.hero-card--main .hero-card__title {
		font-size: 13px;
	}
}

/* ==========================================================================
   20. PORTAL — центральний контент (.p-center), стиль класичного порталу
   ========================================================================== */

.portal__center.p-center {
	min-height: 0;
}

.p-center {
	border:        none;
	box-shadow:    var(--block-shadow);
	background:    var(--block-bg);
	text-align:    left;
}

.p-center__band {
	padding:       14px 12px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.p-center__band:last-child {
	border-bottom: none;
	padding-bottom: 16px;
}

.p-center__rubrika {
	margin:         0 0 12px;
	padding:        0 0 10px;
	font-size:      17px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color:          #c0392b;
	text-align:     center;
	border-bottom:  1px solid rgba(0, 0, 0, 0.12);
	line-height:    1.25;
}

.p-center__rubrika a {
	color:           inherit;
	text-decoration: none;
}

.p-center__rubrika a:hover,
.p-center__rubrika a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
	color:           #a93226;
	outline:         none;
}

/* ── Верхній ряд: 3 картки з фото ───────────────────────────────────────── */
.p-center__featured {
	display:               grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap:                   10px;
}

.p-center-card {
	margin:     0;
	padding:    0;
	border:     none;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
	background: #fff;
	min-width:  0;
	transition: box-shadow 0.2s ease;
}

.p-center-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.p-center-card__link {
	display:         block;
	height:          220px;
	text-decoration: none;
	color:           #fff;
	outline:         none;
	position:        relative;
	overflow:        hidden;
}

.p-center-card__link:focus-visible {
	box-shadow: inset 0 0 0 2px #c0392b;
}

.p-center-card__media {
	position:   absolute;
	inset:      0;
	overflow:   hidden;
	background: #ebebeb;
}

.p-center-card__link::before {
	content:        '';
	position:       absolute;
	inset:          0;
	background:     linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.08) 100%);
	pointer-events: none;
	z-index:        1;
}

.p-center-card__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform 0.35s ease;
}

.p-center-card__img--ph {
	background: linear-gradient(145deg, #ddd, #bbb);
}

.p-center-card__body {
	position:   absolute;
	left:       0;
	right:      0;
	bottom:     0;
	padding:    10px 10px 12px;
	display:    flex;
	flex-direction: column;
	gap:        6px;
	z-index:    2;
}

.p-center-card__meta {
	display:         flex;
	align-items:     center;
	justify-content: space-between;
	gap:             8px;
	flex-wrap:       wrap;
}

.p-center-card__time {
	font-size:   11px;
	font-weight: 700;
	color:       rgba(255, 255, 255, 0.92);
}

.p-center-card__views {
	font-size:   11px;
	font-weight: 700;
	color:       rgba(255, 255, 255, 0.85);
	white-space: nowrap;
}

.p-center-card__title {
	margin:      0;
	font-size:   14px;
	font-weight: 700;
	line-height: 1.35;
	color:       #fff;
	display:     -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow:    hidden;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.p-center-card__link:hover .p-center-card__title,
.p-center-card__link:focus-visible .p-center-card__title {
	color:                 #fff;
	text-decoration:       underline;
	text-decoration-color: rgba(255,255,255,0.9);
	text-underline-offset: 2px;
}

.p-center-card:hover .p-center-card__img {
	transform: scale(1.04);
}

@media (max-width: 767px) {
	.p-center__featured {
		grid-template-columns: 1fr;
	}

	.p-center-card__link {
		height: 210px;
	}
}

/* ── Двоколонникові списки ──────────────────────────────────────────────── */
.p-center__duo {
	display:               grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap:                   16px 20px;
}

@media (max-width: 640px) {
	.p-center__duo {
		grid-template-columns: 1fr;
	}
}

.p-center__list {
	list-style: none;
	margin:     0;
	padding:    0;
}

.p-center__list li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.p-center__list li:last-child {
	border-bottom: none;
}

.p-center__rowlink {
	display:               grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items:           baseline;
	gap:                   8px 10px;
	padding:               8px 0;
	text-decoration:       none;
	color:                 inherit;
	font-size:             15px;
	line-height:           1.4;
	transition:            background 0.12s;
}

.p-center__rowlink:hover,
.p-center__rowlink:focus-visible {
	background: rgba(0, 0, 0, 0.03);
	outline:    none;
}

.p-center__rowtime {
	font-size:   11px;
	font-weight: 700;
	color:       #c0392b;
	white-space: nowrap;
}

.p-center__rowtitle {
	font-weight:    600;
	color:          #1a1a1a;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 2px;
}

.p-center__rowlink:hover .p-center__rowtitle,
.p-center__rowlink:focus-visible .p-center__rowtitle {
	color:                 var(--link-hover);
	text-decoration-color: var(--link-hover);
}

.p-center__rowviews {
	font-size:   11px;
	font-weight: 700;
	color:       #d35400;
	white-space: nowrap;
}

/* ── Фото-сітка ─────────────────────────────────────────────────────────── */
.p-center__photo-grid {
	display:               grid;
	gap:                   4px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
	.p-center__photo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-auto-rows:        minmax(88px, 11vw);
	}

	.p-center-photo__cell--lead {
		grid-column: span 2;
		grid-row:    span 2;
	}
}

.p-center-photo__cell {
	position:        relative;
	display:         block;
	overflow:        hidden;
	min-height:      120px;
	text-decoration: none;
	color:           #fff;
}

.p-center-photo__cell:focus-visible {
	outline:        2px solid #c0392b;
	outline-offset: 1px;
}

.p-center-photo__img {
	width:      100%;
	height:     100%;
	min-height: 120px;
	object-fit: cover;
	display:    block;
	transition: transform 0.35s ease;
}

.p-center-photo__cell:hover .p-center-photo__img {
	transform: scale(1.05);
}

.p-center-photo__cell--lead .p-center-photo__img {
	min-height: 200px;
}

@media (min-width: 768px) {
	.p-center-photo__cell--lead .p-center-photo__img {
		min-height: 0;
		height:     100%;
	}
}

.p-center-photo__cap {
	position:       absolute;
	left:           0;
	right:          0;
	bottom:         0;
	padding:        10px 12px;
	font-size:      12px;
	font-weight:    700;
	line-height:    1.35;
	background:     linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
	text-shadow:    0 1px 2px rgba(0, 0, 0, 0.7);
	display:        -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:       hidden;
}

/* ── Відео — горизонтальна стрічка ─────────────────────────────────────── */
.p-center__video-scroll {
	display:    flex;
	gap:        12px;
	overflow-x: auto;
	padding:    4px 2px 10px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}

.p-center-video__card {
	flex:               0 0 min(240px, 74vw);
	scroll-snap-align:  start;
	display:            flex;
	flex-direction:     column;
	gap:                8px;
	text-decoration:    none;
	color:              inherit;
	min-width:          0;
}

.p-center-video__card:focus-visible {
	outline: 2px solid #c0392b;
	outline-offset: 2px;
}

.p-center-video__media {
	position:     relative;
	aspect-ratio: 16 / 9;
	overflow:     hidden;
	background:   #111;
	border:       none;
	box-shadow:   0 1px 4px rgba(0, 0, 0, 0.12);
}

.p-center-video__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.p-center-video__img--ph {
	display:    block;
	background: linear-gradient(135deg, #333, #1a1a1a);
	height:     100%;
}

.p-center-video__play {
	position:   absolute;
	inset:      0;
	display:    flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.p-center-video__title {
	position:   absolute;
	left:       0;
	right:      0;
	bottom:     0;
	padding:    10px 12px;
	font-size:   13px;
	font-weight: 700;
	line-height: 1.35;
	color:       #fff;
	display:     -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:    hidden;
	background:  linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
	z-index:     2;
}

.p-center-video__card:hover .p-center-video__title,
.p-center-video__card:focus-visible .p-center-video__title {
	color: #fff;
}

/* ==========================================================================
   21. SCROLL-TO-TOP BUTTON
   ========================================================================== */

#lanka-kso-scroll-top {
	position:        fixed;
	bottom:          24px;
	right:           20px;
	z-index:         500;
	width:           40px;
	height:          40px;
	background:      var(--header-bg);
	color:           #fff;
	border:          none;
	border-radius:   4px;
	cursor:          pointer;
	display:         flex;
	align-items:     center;
	justify-content: center;
	box-shadow:      0 2px 8px rgba(0,0,0,0.25);
	opacity:         0;
	visibility:      hidden;
	transform:       translateY(10px);
	transition:      opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
	flex-shrink:     0;
}

#lanka-kso-scroll-top.is-visible {
	opacity:    1;
	visibility: visible;
	transform:  translateY(0);
}

#lanka-kso-scroll-top:hover {
	opacity: 0.85;
}

#lanka-kso-scroll-top svg {
	display:     block;
	flex-shrink: 0;
	pointer-events: none;
}

/* Dark mode */
.lanka-kso-dark #lanka-kso-scroll-top {
	box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ==========================================================================
   20. SEARCH RESULTS — сторінка результатів пошуку
   ========================================================================== */

.search-results {
	border:     none !important;
	min-height: 0 !important;
}

.search-results::before { display: none !important; }

/* Шапка результатів */
.search-results__header {
	padding:         0 0 16px;
	border-bottom:   1px solid rgba(0, 0, 0, 0.08);
	margin-bottom:   20px;
}

.search-results__heading {
	font-size:     clamp(1.1rem, 2.8vw, 1.35rem);
	font-weight:   800;
	line-height:   1.3;
	margin:        0 0 8px;
	color:         #111;
}

.search-results__query {
	background:  transparent;
	color:       #a93226;
	font-style:  normal;
	font-weight: 800;
}

.search-results__count {
	font-size:     14px;
	color:         #333;
	margin:        0 0 14px;
	font-weight:   600;
}

.archive-results__description {
	font-size:   14px;
	color:       #444;
	line-height: 1.55;
	margin:      0 0 8px;
	max-width:   68ch;
}

.archive-results__description p {
	margin: 0 0 0.5em;
}

.archive-results__description p:last-child {
	margin-bottom: 0;
}

.search-results__form {
	margin-top: 4px;
}

/* .search-form для сторінки результатів — спільні правила з модалкою вище */

/* Список результатів */
.search-results__list {
	list-style: none;
	margin:     0;
	padding:    0;
	display:    flex;
	flex-direction: column;
	gap:        12px;
}

.search-item {
	margin:        0;
	border:        none;
	border-radius: 12px;
	background:    rgba(0, 0, 0, 0.02);
	overflow:      hidden;
	transition:    box-shadow 0.15s;
	box-shadow:    0 1px 0 rgba(0, 0, 0, 0.06);
}

.search-item:hover {
	box-shadow:   0 4px 14px rgba(0, 0, 0, 0.06);
}

.search-item__link {
	display:         flex;
	align-items:     flex-start;
	gap:             14px;
	padding:         14px 16px;
	text-decoration: none;
	color:           inherit;
	transition:      background 0.15s;
	border-radius:   12px;
}

.search-item__link:hover {
	background: rgba(0, 0, 0, 0.03);
}

.search-item__thumb {
	flex-shrink:   0;
	width:         120px;
	height:        80px;
	overflow:      hidden;
	border-radius: 10px;
	border:        1px solid rgba(0, 0, 0, 0.12);
	background:    #e8e8e8;
}

.search-item__thumb img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.search-item__body {
	flex:           1;
	min-width:      0;
	display:        flex;
	flex-direction: column;
	gap:            6px;
	align-self:     center;
}

.search-item__title {
	font-size:   16px;
	font-weight: 800;
	line-height: 1.35;
	color:       #0d0d0d;
	margin:      0;
}

.search-item__link:hover .search-item__title { color: #a93226; }

.search-item__meta {
	display:     flex;
	align-items: center;
	gap:         10px;
	flex-wrap:   wrap;
}

.search-item__cat {
	font-size:      10px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color:          #fff;
	background:     #a93226;
	padding:        4px 10px;
	border-radius:  999px;
}

.search-item__date {
	font-size:   12px;
	font-weight: 600;
	color:       #3d3d3d;
}

.search-item__excerpt {
	font-size:   14px;
	line-height: 1.55;
	color:       #292929;
	margin:      0;
	max-width:   65ch;
}

/* Пагінація */
.search-results__pagination {
	margin-top:    28px;
	padding-top:   20px;
	border-top:    1px solid rgba(0, 0, 0, 0.12);
}

.search-results__pagination .nav-links {
	display:     flex;
	flex-wrap:   wrap;
	gap:         8px;
	align-items: center;
}

.search-results__pagination .page-numbers {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	min-width:       40px;
	height:          40px;
	padding:         0 12px;
	border:          1px solid rgba(0, 0, 0, 0.15);
	border-radius:   10px;
	font-size:       14px;
	font-weight:     700;
	text-decoration: none;
	color:           #111;
	transition:      background 0.15s, color 0.15s, border-color 0.15s;
}

.search-results__pagination .page-numbers.current,
.search-results__pagination .page-numbers:hover {
	background:   #c0392b;
	border-color: #c0392b;
	color:        #fff;
}

/* Порожня відповідь */
.search-results__empty {
	padding:    32px 16px;
	text-align: center;
}

.search-results__empty-msg {
	font-size:     16px;
	color:         #333;
	margin-bottom: 20px;
	max-width:     42ch;
	margin-left:   auto;
	margin-right:  auto;
	line-height:   1.5;
}

/* Темна тема — сторінка пошуку (контент + пагінація + картки) */
.lanka-kso-dark .search-results__header {
	border-color: var(--dark-border);
}

.lanka-kso-dark .archive-results__description,
.lanka-kso-dark .archive-results__description p {
	color: var(--dark-muted);
}

.lanka-kso-dark .search-results__heading,
.lanka-kso-dark .search-results__count {
	color: var(--dark-text);
}

.lanka-kso-dark .search-results__count {
	color: var(--dark-muted);
}

.lanka-kso-dark .search-results__form .search-field,
.lanka-kso-dark .search-results__empty .search-field {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .search-results__form .search-field:focus,
.lanka-kso-dark .search-results__empty .search-field:focus {
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.35);
}

.lanka-kso-dark .search-item {
	background: rgba(255, 255, 255, 0.03);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lanka-kso-dark .search-item:hover {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.lanka-kso-dark .search-item__link:hover {
	background: rgba(255, 255, 255, 0.04);
}

.lanka-kso-dark .search-item__title {
	color: var(--dark-text);
}

.lanka-kso-dark .search-item__link:hover .search-item__title {
	color: #ff8a80;
}

.lanka-kso-dark .search-item__thumb {
	border-color: var(--dark-border);
	background:   #2a2a2a;
}

.lanka-kso-dark .search-item__date {
	color: var(--dark-muted);
}

.lanka-kso-dark .search-item__excerpt {
	color: #d0d0d0;
}

.lanka-kso-dark .search-results__pagination {
	border-color: var(--dark-border);
}

.lanka-kso-dark .search-results__pagination .page-numbers {
	border-color: var(--dark-border);
	color:        var(--dark-text);
	background:   transparent;
}

.lanka-kso-dark .search-results__pagination .page-numbers.current,
.lanka-kso-dark .search-results__pagination .page-numbers:hover {
	background:   #c0392b;
	border-color: #c0392b;
	color:        #fff;
}

.lanka-kso-dark .search-results__empty-msg {
	color: var(--dark-muted);
}

@media (max-width: 520px) {
	.search-modal__box .search-form,
	.search-results__form .search-form,
	.search-results__empty .search-form {
		flex-direction: column;
		align-items:    stretch;
	}

	.search-modal__box .search-submit,
	.search-results__form .search-submit,
	.search-results__empty .search-submit {
		width: 100%;
	}

	.search-item__link {
		flex-direction: column;
		align-items:    stretch;
	}

	.search-item__thumb {
		width:  100%;
		height: 160px;
	}
}

/* ==========================================================================
   Single post — повний текст замітки
   ========================================================================== */

.site-main--single .portal__entry {
	border:      none;
	box-shadow:  var(--block-shadow);
	background:  #fff;
	padding:     16px 18px 24px;
	min-height:  0;
}

.site-main--single .entry-header {
	margin-bottom: 0;
}

.site-main--single .entry-title {
	margin:      0 0 1rem;
	font-size:   clamp(1.5rem, 4vw, 40px);
	font-weight: 900;
	line-height: 1.2;
}

.site-main--single .entry-header__rule {
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	margin: 0 0 0.85rem;
}

.site-main--single .entry-meta--single {
	display:         flex;
	flex-wrap:       wrap;
	align-items:     center;
	justify-content: space-between;
	gap:             0.5rem 1rem;
	font-size:       13px;
	font-weight:     600;
	color:           #444;
	width:           100%;
}

.site-main--single .entry-meta__main {
	display:     flex;
	flex-wrap:   wrap;
	align-items: center;
	gap:         0.35rem 1rem;
}

.site-main--single .entry-meta__views {
	display:     inline-flex;
	align-items: center;
	gap:         0.35rem;
	margin-left: auto;
	color:       #555;
	font-variant-numeric: tabular-nums;
}

.site-main--single .entry-meta__eye {
	flex-shrink: 0;
	vertical-align: middle;
}

.site-main--single .entry-content {
	font-size:   19px;
	line-height: 1.65;
	margin-top:  0.85rem;
}

.site-main--single .entry-content > *:first-child {
	margin-top: 0;
}

.site-main--single .entry-content > *:last-child {
	margin-bottom: 0;
}

.site-main--single .page-links {
	margin-top: 1.25rem;
	font-size:  14px;
	font-weight: 600;
}

.site-main--single .entry-footer {
	margin-top:  1.5rem;
	padding-top: 0;
	border-top:  none;
	font-size:   14px;
}

.site-main--single .entry-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin-bottom: 0;
}

.site-main--single .entry-share__label {
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #555;
}

.site-main--single .entry-share__icons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}

.site-main--single .entry-share__icons .social-link,
.site-main--single .entry-share__icons .social-link:visited {
	text-decoration: none;
	width: 36px;
	height: 36px;
	border-radius: 4px;
	margin: 0;
}

.site-main--single .entry-share__icons .social-link:hover,
.site-main--single .entry-share__icons .social-link:focus-visible {
	opacity: 0.9;
	outline: none;
}

.site-main--single .entry-footer__rule {
	border: none;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	margin: 1rem 0;
}

.site-main--single .entry-tags {
	display:        flex;
	flex-wrap:      wrap;
	align-items:    baseline;
	gap:            8px 10px;
}

.site-main--single .entry-tags__label {
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color:          #666;
	flex-shrink:    0;
}

.site-main--single .entry-tags__list {
	display:   flex;
	flex-wrap: wrap;
	gap:       6px;
}

.site-main--single .entry-tags__pill {
	display:         inline-flex;
	align-items:     center;
	padding:         4px 10px;
	border:          1px solid rgba(0, 0, 0, 0.14);
	border-radius:   999px;
	background:      #f7f7f7;
	font-size:       12px;
	font-weight:     600;
	color:           #222;
	text-decoration: none;
	transition:      border-color 0.15s, background 0.15s, color 0.15s;
}

.site-main--single .entry-tags__pill:hover,
.site-main--single .entry-tags__pill:focus-visible {
	border-color: #c0392b;
	color:        #c0392b;
	background:   #fff;
	outline:      none;
}

/* Схожі новини */
.entry-related {
	margin-top:  1.75rem;
	padding-top: 1.25rem;
	border-top:  var(--hairline);
}

.entry-related__heading {
	margin:         0 0 12px;
	font-size:      13px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color:          #333;
}

.entry-related__grid {
	display:               grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap:                   10px;
}

.related-card {
	display:         block;
	text-decoration: none;
	color:           inherit;
	min-width:       0;
}

.related-card__media {
	position:   relative;
	aspect-ratio: 16 / 10;
	overflow:   hidden;
	border-radius: 8px;
	background: #e8e8e8;
}

.related-card__img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
}

.related-card__img--ph {
	background: linear-gradient(145deg, #ddd, #bbb);
}

.related-card__overlay {
	position:       absolute;
	inset:          0;
	display:        flex;
	flex-direction: column;
	justify-content: flex-end;
	padding:        10px 10px 8px;
	background:     linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
	gap:            6px;
}

.related-card__title {
	font-size:   13px;
	font-weight: 700;
	line-height: 1.35;
	color:       #fff;
	display:     -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow:    hidden;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.related-card__views {
	display:     inline-flex;
	align-items: center;
	gap:         4px;
	font-size:   11px;
	font-weight: 700;
	color:       rgba(255, 255, 255, 0.92);
}

.related-card__eye {
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.entry-related__grid {
		grid-template-columns: 1fr;
	}

	.related-card__media {
		aspect-ratio: 16 / 9;
	}
}

/* Кнопка «Коментувати» + прихована панель форми */
.lanka-kso-comments__toolbar {
	margin: 1rem 0 0;
}

.lanka-kso-btn-comment {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	min-height:      40px;
	padding:         0 18px;
	border:          none;
	border-radius:   10px;
	background:      var(--header-bg);
	color:           #fff;
	font-size:       14px;
	font-weight:     800;
	font-family:     var(--font);
	cursor:          pointer;
	text-decoration: none;
	transition:      opacity 0.15s;
}

.lanka-kso-btn-comment:hover,
.lanka-kso-btn-comment:focus-visible {
	opacity: 0.92;
	outline: none;
}

/* [hidden] на кнопці не працює: .lanka-kso-btn-comment задає display: inline-flex пізніше в каскаді */
#lanka-kso-toggle-comment-form.lanka-kso-toggle-hidden-for-reply {
	display: none !important;
}

.lanka-kso-comment-compose-panel[hidden] {
	display: none !important;
}

.lanka-kso-comment-compose-panel:not([hidden]) {
	margin-top: 1rem;
}

/* ==========================================================================
   Comments area
   ========================================================================== */

.lanka-kso-comments {
	margin-top:  2rem;
	padding-top: 1.5rem;
	border-top:  var(--hairline);
}

.comments-title {
	font-size:   clamp(1.05rem, 2.5vw, 1.25rem);
	font-weight: 800;
	margin:      0 0 1rem;
	color:       #111;
}

.comment-list {
	list-style:      none;
	margin:          0;
	padding:         0;
	display:         flex;
	flex-direction:  column;
	gap:             0.85rem;
}

.comment-list .children {
	list-style:     none;
	margin:         0.85rem 0 0;
	padding:        0 0 0 1rem;
	border-left:    2px solid rgba(0, 0, 0, 0.1);
}

.comment-body {
	padding:       1rem 1.1rem 0.85rem;
	border:        1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	background:    rgba(0, 0, 0, 0.02);
}

.comment-meta {
	font-size:     13px;
	font-weight:   600;
	color:         #444;
	margin-bottom: 0.55rem;
	display:       block;
}

.comment-meta__row {
	display:         flex;
	flex-wrap:       wrap;
	align-items:     flex-start;
	justify-content: space-between;
	gap:             0.5rem 1rem;
	width:           100%;
}

.comment-meta__left {
	min-width: 0;
	flex:      1 1 auto;
}

.comment-meta__right {
	display:         flex;
	flex-wrap:       wrap;
	align-items:     center;
	justify-content: flex-end;
	gap:             0.35rem 0.75rem;
	margin-left:     auto;
	text-align:      right;
	max-width:       100%;
}

.comment-meta__actions {
	display:     inline-flex;
	flex-wrap:   wrap;
	align-items: center;
	gap:         0.35rem 0.75rem;
}

.comment-meta__actions .comment-reply-link,
.comment-meta__actions .lanka-kso-comment-manage {
	font-weight:     700;
	text-decoration: none;
}

.comment-datetime {
	font-size:   12px;
	font-weight: 600;
	color:       #666;
}

.comment-author .avatar {
	border-radius: 50%;
	vertical-align: middle;
	margin-right:  10px;
}

.comment-author .fn,
.comment-author .fn a {
	font-weight: 800;
}

.comment-metadata {
	font-size:   12px;
	font-weight: 600;
}

.lanka-kso-comment-in-reply {
	margin:        0 0 10px;
	padding:       8px 10px;
	border-radius: 8px;
	background:    rgba(192, 57, 43, 0.08);
	border:      1px solid rgba(192, 57, 43, 0.2);
	font-size:     13px;
	line-height:   1.45;
	color:         #444;
}

.lanka-kso-comment-in-reply__badge {
	display:       inline-block;
	margin-right:  6px;
	padding:       2px 8px;
	border-radius: 6px;
	background:    #c0392b;
	color:         #fff;
	font-size:     11px;
	font-weight:   800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	vertical-align: middle;
}

.lanka-kso-comment-in-reply__meta {
	font-weight: 600;
}

.lanka-kso-comment-in-reply__jump {
	font-weight: 800;
	color:       var(--link);
	text-decoration: none;
}

.lanka-kso-comment-in-reply__jump:hover,
.lanka-kso-comment-in-reply__jump:focus-visible {
	text-decoration: underline;
}

.lanka-kso-comment-in-reply__quote {
	margin-top:  6px;
	padding-left: 10px;
	border-left: 2px solid rgba(192, 57, 43, 0.45);
	font-size:   13px;
	color:       #555;
}

.comment-content {
	font-size:   15px;
	line-height: 1.6;
	color:       #222;
}

.comment-content p {
	margin: 0.55rem 0 0;
}

.comment-content p:first-child {
	margin-top: 0;
}

.comment-body > .reply {
	display: none;
}

.comments-pagination,
nav.navigation.comment-navigation {
	margin:     1.35rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.comments-pagination .nav-links,
nav.navigation.comment-navigation .nav-links {
	display:         flex;
	gap:             8px;
	flex-wrap:       wrap;
	justify-content: center;
	align-items:     center;
}

.comments-pagination .page-numbers,
.comments-pagination a.page-numbers,
nav.navigation.comment-navigation a.page-numbers,
nav.navigation.comment-navigation span.page-numbers {
	display:         inline-flex;
	min-width:       40px;
	height:          40px;
	align-items:     center;
	justify-content: center;
	border:          1px solid rgba(0, 0, 0, 0.15);
	border-radius:   10px;
	font-weight:     700;
	font-size:       14px;
	padding:         0 10px;
	text-decoration: none !important;
}

.comments-pagination span.page-numbers.current {
	background:      #c0392b;
	border-color:    #c0392b;
	color:           #fff !important;
}

.comments-pagination a.page-numbers:hover,
nav.navigation.comment-navigation a.page-numbers:hover {
	border-color: var(--link-hover);
	color:        var(--link-hover) !important;
}

.comments-closed {
	margin:        1rem 0;
	padding:       12px 16px;
	border-radius: 10px;
	background:    rgba(0, 0, 0, 0.05);
	font-weight:   600;
	color:         #444;
}

.lanka-kso-comment-form {
	display:        flex;
	flex-direction: column;
	gap:            1rem;
	margin-top:     1.35rem;
}

.lanka-kso-comment-alert {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
}

.lanka-kso-comment-alert--ok {
	background: rgba(29, 131, 72, 0.1);
	color: #1d8348;
	border: 1px solid rgba(29, 131, 72, 0.25);
}

.lanka-kso-comment-alert--err {
	background: rgba(192, 57, 43, 0.1);
	color: #c0392b;
	border: 1px solid rgba(192, 57, 43, 0.25);
}

.lanka-kso-comment-actions {
	display: flex;
	gap: 12px;
	margin: 8px 0 0;
	font-size: 13px;
}

.lanka-kso-comment-actions a {
	font-weight: 700;
}

.lanka-kso-comment-edit-form {
	margin: 0 0 14px;
	padding: 12px;
	border-radius: 10px;
	background: #f8f8f8;
	border: 1px solid rgba(0, 0, 0, 0.09);
}

.lanka-kso-comment-edit-form h3 {
	margin: 0 0 8px;
	font-size: 15px;
}

.lanka-kso-comment-edit-form textarea {
	width: 100%;
	max-width: 100%;
	min-height: 120px;
	padding: 10px 14px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	font-family: var(--font);
	font-size: 15px;
}

.lanka-kso-comment-edit-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}

.lanka-kso-comment-form .comment-notes,
.lanka-kso-comment-form .logged-in-as {
	font-size: 13px;
	color:     #555;
	line-height: 1.45;
}

.lanka-kso-comment-form .logged-in-as {
	margin: 0;
}

.lanka-kso-comment-form .logged-in-as a {
	font-weight: 700;
}

.lanka-kso-comment-form .logged-in-as__profile {
	color:           var(--link);
	text-decoration: none;
}

.lanka-kso-comment-form .logged-in-as__profile:hover,
.lanka-kso-comment-form .logged-in-as__profile:focus-visible {
	text-decoration: underline;
}

.lanka-kso-comment-form .logged-in-as__logout {
	color: var(--link);
}

.lanka-kso-comment-form .must-log-in a {
	color:       var(--link);
	font-weight: 700;
}

.lanka-kso-reply-context {
	margin:        0 0 12px;
	padding:       10px 12px;
	border-radius: 10px;
	background:    rgba(0, 0, 0, 0.04);
	border:        1px solid rgba(0, 0, 0, 0.08);
}

.lanka-kso-reply-context__label {
	font-size:       12px;
	font-weight:     800;
	text-transform:  uppercase;
	letter-spacing:  0.04em;
	color:           #555;
	margin-bottom:   6px;
}

.lanka-kso-reply-context__quote {
	margin:      0;
	padding:     0 0 0 12px;
	border-left: 3px solid #c0392b;
	font-size:   14px;
	line-height: 1.45;
	color:       #333;
}

.lanka-kso-comment-form .lanka-kso-comment-hint {
	margin:        0;
	padding:       10px 12px;
	border-radius: 10px;
	background:    #f4f4f4;
	border:        1px solid rgba(0, 0, 0, 0.08);
}

.lanka-kso-comment-form .comment-form-comment label,
.lanka-kso-comment-form .comment-form-author label,
.lanka-kso-comment-form .comment-form-email label,
.lanka-kso-comment-form .comment-form-url label {
	display:        block;
	font-size:      11px;
	font-weight:    800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom:  6px;
	color:          #333;
}

.lanka-kso-comment-form .required {
	color: var(--link);
}

.lanka-kso-comment-form input[type="text"],
.lanka-kso-comment-form input[type="email"],
.lanka-kso-comment-form input[type="url"],
.lanka-kso-comment-form textarea {
	width:         100%;
	max-width:     100%;
	padding:       10px 14px;
	border:        1px solid rgba(0, 0, 0, 0.18);
	border-radius: 10px;
	font-family:   var(--font);
	font-size:     15px;
	outline:       none;
	transition:    border-color 0.15s, box-shadow 0.15s;
}

.lanka-kso-comment-form textarea {
	min-height: 140px;
	resize:     vertical;
}

.lanka-kso-comment-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

.comment-tool-btn {
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 8px;
	background: #fff;
	color: #222;
	font-family: var(--font);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.comment-tool-btn:hover,
.comment-tool-btn:focus-visible {
	border-color: #c0392b;
	box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}

.lanka-kso-comment-form input:focus,
.lanka-kso-comment-form textarea:focus {
	border-color: #c0392b;
	box-shadow:   0 0 0 3px rgba(192, 57, 43, 0.2);
}

.lanka-kso-comment-submit {
	padding:       12px 22px;
	border:        none;
	border-radius: 10px;
	background:    var(--header-bg);
	color:         #fff !important;
	text-decoration: none !important;
	font-weight:   800;
	font-size:     14px;
	cursor:        pointer;
	font-family:   var(--font);
	transition:    opacity 0.15s;
}

.lanka-kso-comment-submit:hover,
.lanka-kso-comment-submit:focus-visible {
	opacity: 0.9;
}

.comment-reply-title {
	font-size:   1.1rem;
	font-weight: 800;
	margin:      0 0 0.75rem;
	color:       #111;
}

.comment-reply-title small {
	font-size:   13px;
	font-weight: 600;
	margin-left: 10px;
}

.comment-awaiting-moderation {
	font-size:     13px;
	font-style:    italic;
	color:         #666;
	margin-bottom: 0.35rem;
}

.lanka-kso-dark .comments-title,
.lanka-kso-dark .comment-reply-title {
	color: var(--dark-text);
}

.lanka-kso-dark .comment-list .children {
	border-color: var(--dark-border);
}

.lanka-kso-dark .comment-body {
	background:   var(--dark-surface);
	border-color: var(--dark-border);
}

.lanka-kso-dark .comment-meta {
	color: var(--dark-muted);
}

.lanka-kso-dark .comment-datetime {
	color: var(--dark-muted);
}

.lanka-kso-dark .comment-content {
	color: var(--dark-text);
}

.lanka-kso-dark .lanka-kso-comment-in-reply {
	background:   rgba(192, 57, 43, 0.12);
	border-color: rgba(192, 57, 43, 0.35);
	color:        var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-comment-in-reply__quote {
	color: var(--dark-muted);
	border-left-color: rgba(192, 57, 43, 0.55);
}

.lanka-kso-dark .comments-pagination,
.lanka-kso-dark nav.navigation.comment-navigation {
	border-color: var(--dark-border);
}

.lanka-kso-dark .comments-pagination .page-numbers,
.lanka-kso-dark .comments-pagination a.page-numbers,
.lanka-kso-dark nav.navigation.comment-navigation a.page-numbers,
.lanka-kso-dark nav.navigation.comment-navigation span.page-numbers {
	border-color: var(--dark-border);
	color:        var(--dark-text) !important;
}

.lanka-kso-dark .comments-pagination span.page-numbers.current {
	background:   #c0392b;
	border-color: #c0392b;
	color:        #fff !important;
}

.lanka-kso-dark .comments-closed {
	background: rgba(255, 255, 255, 0.06);
	color:      var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-comment-form .comment-notes,
.lanka-kso-dark .lanka-kso-comment-form .logged-in-as {
	color: var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-reply-context {
	background:   rgba(255, 255, 255, 0.05);
	border-color: var(--dark-border);
}

.lanka-kso-dark .lanka-kso-reply-context__label {
	color: var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-reply-context__quote {
	color: var(--dark-text);
	border-left-color: #c0392b;
}

.lanka-kso-dark .lanka-kso-comment-edit-form {
	background: var(--dark-surface);
	border-color: var(--dark-border);
}

.lanka-kso-dark .lanka-kso-comment-edit-form h3 {
	color: var(--dark-text);
}

.lanka-kso-dark .lanka-kso-comment-edit-form textarea {
	background: var(--dark-bg);
	border-color: var(--dark-border);
	color: var(--dark-text);
}

.lanka-kso-dark .lanka-kso-comment-alert--ok {
	background: rgba(46, 204, 113, 0.14);
	color: #7dffb3;
	border-color: rgba(46, 204, 113, 0.35);
}

.lanka-kso-dark .lanka-kso-comment-alert--err {
	background: rgba(192, 57, 43, 0.18);
	color: #ff9f95;
	border-color: rgba(192, 57, 43, 0.35);
}

.lanka-kso-dark .lanka-kso-comment-form .lanka-kso-comment-hint {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--dark-border);
}

.lanka-kso-dark .lanka-kso-comment-form .comment-form-comment label,
.lanka-kso-dark .lanka-kso-comment-form .comment-form-author label,
.lanka-kso-dark .lanka-kso-comment-form .comment-form-email label,
.lanka-kso-dark .lanka-kso-comment-form .comment-form-url label {
	color: var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-comment-form input[type="text"],
.lanka-kso-dark .lanka-kso-comment-form input[type="email"],
.lanka-kso-dark .lanka-kso-comment-form input[type="url"],
.lanka-kso-dark .lanka-kso-comment-form textarea {
	background:   var(--dark-bg);
	border-color: var(--dark-border);
	color:        var(--dark-text);
}

.lanka-kso-dark .comment-tool-btn {
	background: var(--dark-bg);
	border-color: var(--dark-border);
	color: var(--dark-text);
}

.lanka-kso-dark .comment-awaiting-moderation {
	color: var(--dark-muted);
}

.lanka-kso-dark .site-main--single .portal__entry {
	background:   var(--dark-bg);
	border:       none;
	box-shadow:   var(--block-shadow);
}

.lanka-kso-dark .site-main--single .entry-title,
.lanka-kso-dark .site-main--single .entry-content {
	color: var(--dark-text);
}

.lanka-kso-dark .site-main--single .entry-meta--single {
	color: var(--dark-muted, #aaa);
}

.lanka-kso-dark .site-main--single .entry-header__rule,
.lanka-kso-dark .site-main--single .entry-footer__rule {
	border-top-color: var(--dark-border);
}

.lanka-kso-dark .site-main--single .entry-share__icons .social-link,
.lanka-kso-dark .site-main--single .entry-share__icons .social-link:visited {
	background: var(--dark-surface);
	border-color: var(--dark-border);
	color: var(--dark-text);
}

.lanka-kso-dark .site-main--single .entry-tags__pill {
	background: var(--dark-surface);
	border-color: var(--dark-border);
	color: var(--dark-text);
}

.lanka-kso-dark .entry-related {
	border-top-color: var(--dark-border);
}

.lanka-kso-dark .entry-related__heading {
	color: var(--dark-muted);
}

.lanka-kso-dark .lanka-kso-btn-comment.lanka-kso-open-login-modal {
	color: #fff;
}

/* NAV BAR: стилі для secondary меню */
.nav-bar .menu {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-wrap: nowrap;
    height: 100%;
    background: #000;
    width: 100%;
}
.nav-bar .menu > li {
    position: relative;
}
.nav-bar .menu > li > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-bar .menu > li > a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

/* Пошуковий спінер */
.search-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.search-loading-overlay.is-active {
    display: flex;
}
.search-loading-overlay__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.search-loading-overlay__text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Фото блок: виправлення caption ────────────────────────────────────── */
.p-center__photo-grid {
        grid-auto-rows: minmax(140px, 18vw);
}
.p-center-photo__cap {
        padding:            12px 10px 10px;
        font-size:          11px;
        -webkit-line-clamp: 2;
        background:         linear-gradient(to top, rgba(0,0,0,0.88) 60%, transparent);
}
@media (min-width: 768px) {
        .p-center-photo__cap {
                font-size:          12px;
                -webkit-line-clamp: 3;
        }
}

/* ── Фото блок: фікс висоти ────────────────────────────────────────────── */
.p-center__photo-grid {
        grid-auto-rows: minmax(100px, 12vw);
        max-height: 400px;
}
.p-center-photo__cell {
        max-height: 400px;
}
.p-center-photo__cell--lead {
        max-height: 400px;
}
.p-center-photo__img {
        max-height: 400px;
}

/* ── Фото блок: повний фікс ─────────────────────────────────────────────── */
.p-center__photo-grid {
        grid-auto-rows: 120px;
        max-height: none;
}
.p-center-photo__cell,
.p-center-photo__cell--lead,
.p-center-photo__img {
        max-height: none;
}
@media (min-width: 768px) {
        .p-center__photo-grid {
                grid-auto-rows: 130px;
        }
}

/* ── Фото блок: ховаємо 5-ту картинку на мобільному ───────────────────── */
@media (max-width: 767px) {
        .p-center__photo-grid .p-center-photo__cell:nth-child(5) {
                display: none;
        }
}

/* ── Мобільні виправлення шрифтів ──────────────────────────────────────── */
@media (max-width: 767px) {
        /* Ліва колонка — останні новини */
        .lcol-item__title {
                font-size: 15px;
                line-height: 1.45;
        }

        /* ТОП sidebar */
        .sidebar-top__title {
                font-size: 14px;
                line-height: 1.4;
        }

        /* Hero картки */
        .hero-card__title {
                font-size: 14px;
        }
        .hero-card--main .hero-card__title {
                font-size: 16px;
        }

        /* Фото блок caption */
        .p-center-photo__cap {
                font-size: 13px;
                padding: 8px 10px;
        }

        /* Загальний текст статті */
        .entry-content {
                font-size: 16px;
                line-height: 1.7;
        }

        /* Заголовок статті */
        .entry-title {
                font-size: 20px;
                line-height: 1.3;
        }

        /* Центральний контент — рубрики */
        .p-center__rowtitle {
                font-size: 14px;
        }
        .p-center__rowtime {
                font-size: 11px;
        }
}

/* ── Футер: завжди темний ───────────────────────────────────────────────── */
.site-footer {
        background: #1a1a1a !important;
        color: #ccc !important;
        padding: 32px 0 0;
}
.site-footer .widget-title,
.site-footer h3 {
        color: #fff !important;
        font-size: 15px;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #333;
}
.site-footer a {
        color: #e57373 !important;
}
.site-footer a:hover {
        color: #fff !important;
}
.site-footer p,
.site-footer li {
        color: #bbb !important;
        font-size: 13px;
        line-height: 1.6;
}
.site-footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
}
.site-footer ul li {
        padding: 4px 0;
        border-bottom: 1px solid #2a2a2a;
}
.footer-bottom {
        margin-top: 24px;
        padding: 12px 0;
        text-align: center;
        border-top: 1px solid #333;
}
.footer-bottom p {
        color: #888 !important;
        font-size: 12px !important;
        margin: 0;
}

/* ── Футер: блоки темні + фікс li ──────────────────────────────────────── */
.footer-grid .block {
        background: #1a1a1a !important;
        padding: 20px !important;
}
.site-footer ul li {
        border-bottom: none !important;
}

/* ── Футер: перебиваємо білий фон блоків ───────────────────────────────── */
.site-footer .block {
        background: #1a1a1a !important;
        box-shadow: none !important;
        border: none !important;
}
.footer-bottom .block {
        background: #111 !important;
        box-shadow: none !important;
        border: none !important;
}

/* ── Футер copyright: єдиний колір ─────────────────────────────────────── */
.footer-bottom .block,
.footer-bottom {
        background: #1a1a1a !important;
}

/* ── Footer соцмережі ───────────────────────────────────────────────────── */
.footer-social {
        margin-top: 8px;
}
.footer-social__icons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 10px;
}
.footer-social .social-link {
        display:         inline-flex;
        align-items:     center;
        justify-content: center;
        width:           36px;
        height:          36px;
        border-radius:   4px;
        background:      #2a2a2a;
        color:           #ccc !important;
        transition:      background 0.2s, color 0.2s;
}
.footer-social .social-link:hover {
        background: #c0392b;
        color:      #fff !important;
}

/* Fix: page.php - portal--single не повинен успадковувати grid від .lanka-kso-no-between-banner .portal */
@media (min-width: 1024px) {
        .lanka-kso-no-between-banner .portal--single {
                grid-template-areas: "left center right";
        }
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
        text-align:   center;
        padding:      40px 20px;
}
.page-404__code {
        font-size:    120px;
        font-weight:  700;
        line-height:  1;
        color:        var(--clr-accent, #c0392b);
        margin-bottom: 8px;
}
.page-404__title {
        font-size:    28px;
        font-weight:  700;
        margin:       0 0 16px;
        color:        var(--clr-heading, #1a1a1a);
}
.page-404__text {
        font-size:    16px;
        color:        #555;
        margin-bottom: 28px;
        max-width:    480px;
        margin-left:  auto;
        margin-right: auto;
}
.page-404__search {
        max-width:    420px;
        margin:       0 auto 24px;
}
.page-404__search .search-form {
        display:      flex;
        gap:          8px;
}
.page-404__search .search-field {
        flex:         1;
        padding:      10px 14px;
        border:       1px solid #ddd;
        border-radius: 4px;
        font-size:    15px;
}
.page-404__btn {
        display:      inline-block;
        padding:      10px 24px;
        background:   var(--clr-accent, #c0392b);
        color:        #fff;
        border-radius: 4px;
        font-weight:  600;
        font-size:    15px;
        text-decoration: none;
        transition:   opacity .2s;
}
.page-404__btn:hover {
        opacity: .85;
        color:   #fff;
}

/* 404 actions */
.page-404__actions {
        display:        flex;
        gap:            12px;
        justify-content: center;
        flex-wrap:      wrap;
        margin-top:     8px;
}
.page-404__btn {
        display:        inline-flex;
        align-items:    center;
        gap:            8px;
        padding:        10px 24px;
        border-radius:  4px;
        font-weight:    600;
        font-size:      15px;
        text-decoration: none;
        cursor:         pointer;
        border:         none;
        transition:     opacity .2s;
}
.page-404__btn--search {
        background:     var(--clr-accent, #c0392b);
        color:          #fff;
}
.page-404__btn--home {
        background:     #f0f0f0;
        color:          #333;
}
.page-404__btn:hover {
        opacity:        .85;
        color:          inherit;
}

/* Featured image в статті */
//.entry-featured-image {
//    margin: 0 0 1.5rem;
//}
.entry-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}
.entry-featured-caption {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    margin-top: 4px;
}
.site-main--single .entry-content p {
    margin-bottom: 1.1rem;
}


/* Telegram widget — показуємо тільки відео */
.tg-widget-wrap .tgme_widget_message_text,
.tg-widget-wrap .tgme_widget_message_footer,
.tg-widget-wrap .tgme_widget_message_author,
.tg-widget-wrap .tgme_widget_message_info,
.tg-widget-wrap .tgme_widget_message_bubble_tail {
    display: none !important;
}
.tg-widget-wrap .tgme_widget_message_bubble {
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}
.tg-widget-wrap .tgme_widget_message {
    padding: 0 !important;
}

/* ── Цитати (blockquote) в статтях ─────────────────────────────────────── */
.entry-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem 1rem 1.5rem;
    border-left: 4px solid #c0392b;
    background: #fdf5f4;
    border-radius: 0 6px 6px 0;
}
.entry-content blockquote p {
    margin: 0 0 0.5rem;
    font-size: 1.05em;
    color: #222;
    font-style: italic;
    line-height: 1.7;
}
.entry-content blockquote p:last-of-type { margin-bottom: 0; }
.entry-content blockquote cite {
    display: block;
    margin-top: 0.65rem;
    font-size: 0.82em;
    font-style: normal;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 0.02em;
}
.entry-content blockquote cite::before { content: "— "; }

/* Темна тема */
.lanka-kso-dark .entry-content blockquote {
    background: rgba(192, 57, 43, 0.08);
    border-left-color: #e57373;
}
.lanka-kso-dark .entry-content blockquote p { color: var(--dark-text); }
.lanka-kso-dark .entry-content blockquote cite { color: #e57373; }

/* ── Списки (ul / ol) в статтях ────────────────────────────────────────── */
.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1.25rem 0;
    padding-left: 0;
    list-style: none;
}
.entry-content ul li,
.entry-content ol li {
    position: relative;
    padding: 0.35rem 0 0.35rem 1.6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 0.97em;
    line-height: 1.6;
    color: #1a1a1a;
}
.entry-content ul li:last-child,
.entry-content ol li:last-child { border-bottom: none; }

/* Маркований — червона крапка */
.entry-content ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c0392b;
}

/* Нумерований — червоне коло з цифрою */
.entry-content ol { counter-reset: ol-counter; }
.entry-content ol li::before {
    content: counter(ol-counter);
    counter-increment: ol-counter;
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 20px;
    height: 20px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Темна тема */
.lanka-kso-dark .entry-content ul li,
.lanka-kso-dark .entry-content ol li {
    color: var(--dark-text);
    border-bottom-color: var(--dark-border);
}