/*
Theme Name: Plungiškis
Theme URI: https://www.plungiskis.lt/
Author: Plungiškis.lt
Description: Plungės naujienų portalo tema su žemaitiškos juostos motyvu. Veikia be papildomų įskiepių: SEO meta žymos ir schema.org duomenys, peradresavimai, tamsusis režimas, skaitomiausių įrašų skaičiavimas, turinio rodyklė, dalinimosi mygtukai, mygtukas „į viršų“ ir bazinė prisijungimo apsauga.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plungiskis
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ---------- Šriftai (Bitter, SIL OFL; tik lotyniški + lietuviški simboliai) ---------- */
@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter-var.woff") format("woff");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Bitter";
	src: url("assets/fonts/bitter-italic-var.woff") format("woff");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

/* ---------- Spalvos ir dydžiai ---------- */
:root {
	--paper: #EDF1F0;      /* rūkas virš Platelių */
	--surface: #FFFFFF;
	--ink: #142A2F;
	--muted: #4D6267;
	--line: #D0DAD8;
	--river: #0E3B43;      /* Babrungas */
	--river-2: #155964;
	--gold: #E2A72E;       /* Oginskių auksas */
	--red: #B0172F;        /* juostos raudona */
	--on-river: #F2F6F5;
	--link: #0F5C68;
	--btn-bg: var(--river);
	--btn-ink: var(--on-river);

	--f-head: "Bitter", "Rockwell", "Roboto Slab", Georgia, serif;
	--f-text: "Bitter", Georgia, "Times New Roman", serif;
	--f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--wrap: 1240px;
	--pad: clamp(16px, 3vw, 28px);
	--gap: clamp(18px, 2.4vw, 32px);
	--r: 3px;
	--header-h: 68px;

	--sash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Crect width='24' height='12' fill='%230E3B43'/%3E%3Cpath d='M12 0 24 6 12 12 0 6z' fill='%23E2A72E'/%3E%3Cpath d='M12 3 18 6 12 9 6 6z' fill='%23B0172F'/%3E%3Cpath d='M12 5 14 6 12 7 10 6z' fill='%23F2F6F5'/%3E%3C/svg%3E");
	color-scheme: light;
}

[data-theme="dark"] {
	--paper: #0B171A;
	--surface: #112327;
	--ink: #E5EDEB;
	--muted: #9EB1B3;
	--line: #23393E;
	--river: #08252A;
	--river-2: #0F3940;
	--on-river: #E5EDEB;
	--link: #84CCD3;
	--btn-bg: var(--gold);
	--btn-ink: #142A2F;
	color-scheme: dark;
}

/* ---------- Bazė ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem/1.55 var(--f-ui);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--link); }
a:hover { color: var(--red); }
[data-theme="dark"] a:hover { color: var(--gold); }

:focus-visible {
	outline: 3px solid var(--gold);
	outline-offset: 2px;
	border-radius: 2px;
}

h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.15; }

.wrap {
	width: 100%;
	max-width: calc(var(--wrap) + 2 * var(--pad));
	margin-inline: auto;
	padding-inline: var(--pad);
}

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

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 1000;
	top: 8px;
	left: 8px;
	padding: 12px 18px;
	background: var(--gold);
	color: #142A2F;
	font-weight: 700;
	text-decoration: none;
}

#top { position: absolute; top: 0; }
.site-main:focus { outline: none; }

/* ---------- Juosta (parašinis motyvas) ---------- */
.juosta {
	height: 12px;
	background: var(--sash) repeat-x left center / 24px 12px;
}

/* ---------- Viršutinė informacinė eilutė ---------- */
.topbar {
	background: var(--river);
	color: color-mix(in srgb, var(--on-river) 80%, transparent);
	font-size: .8125rem;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar__inner {
	display: flex;
	align-items: center;
	gap: .4rem 1.4rem;
	min-height: 34px;
	flex-wrap: wrap;
	padding-block: 4px;
}
.topbar__date { color: var(--on-river); font-weight: 600; }
.topbar__place {
	display: inline-flex;
	align-items: center;
	gap: .45em;
}
.topbar__place::before {
	content: "";
	width: .55em;
	height: .55em;
	background: var(--gold);
	transform: rotate(45deg);
}
.topbar__sun { display: inline-flex; gap: 1.1rem; flex-wrap: wrap; }
.topbar__sun b { color: var(--on-river); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Antraštė ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: var(--river);
	color: var(--on-river);
}
.site-header .juosta { height: 6px; background-size: 12px 6px; }

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: var(--header-h);
}

.brand { margin: 0; font-size: 1rem; line-height: 1; }
.brand__link {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	color: var(--on-river);
	text-decoration: none;
}
.brand__link:hover { color: var(--on-river); }
.brand__link:hover .brand__mark { transform: rotate(45deg); }
.brand__mark { flex: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.brand__word {
	font: 800 1.6rem/1 var(--f-head);
	letter-spacing: -.01em;
}
.brand__tld { color: var(--gold); font-weight: 600; }
.brand__img { max-height: 48px; width: auto; }

.site-nav { margin-left: auto; }
.site-nav .menu {
	display: flex;
	gap: .25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav .menu > li { position: relative; }
.site-nav a {
	display: block;
	padding: .55rem .75rem;
	color: var(--on-river);
	font: 600 .95rem/1.2 var(--f-ui);
	text-decoration: none;
	border-radius: var(--r);
}
.site-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current-post-ancestor > a {
	box-shadow: inset 0 -3px 0 var(--gold);
	border-radius: 0;
}
.site-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: .4rem;
	background: var(--river-2);
	border-radius: var(--r);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: block; }

.tools { display: flex; gap: .25rem; margin-left: .5rem; }
.icon-btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--on-river);
	cursor: pointer;
}
.icon-btn svg { fill: currentColor; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn[aria-expanded="true"] { background: var(--gold); color: #142A2F; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; }

.search-panel {
	background: var(--river-2);
	padding-block: 1rem;
}
.search-panel[hidden] { display: none; }

.progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 6px;
	pointer-events: none;
}
.progress span {
	display: block;
	height: 100%;
	background: var(--sash) repeat-x left center / 12px 6px;
	clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0);
}

/* ---------- Paieškos forma ---------- */
.search-form {
	display: flex;
	gap: .5rem;
	max-width: 680px;
}
.search-form__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 1rem;
	border: 2px solid var(--line);
	border-radius: var(--r);
	background: var(--surface);
	color: var(--ink);
	font: 400 1.05rem var(--f-ui);
}
.search-panel .search-form__input { border-color: transparent; }
.search-form__input:focus { border-color: var(--gold); outline: none; }

/* ---------- Mygtukai ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 48px;
	padding: .75rem 1.4rem;
	border: 0;
	border-radius: var(--r);
	background: var(--btn-bg);
	color: var(--btn-ink);
	font: 700 1rem/1.2 var(--f-ui);
	text-decoration: none;
	cursor: pointer;
}
.btn:hover { background: var(--red); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.is-loading { opacity: .6; pointer-events: none; }
.search-panel .btn { background: var(--gold); color: #142A2F; }

/* ---------- „Ką tik paskelbta“ ---------- */
.ticker {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	font-size: .9rem;
}
.ticker__inner { display: flex; align-items: center; gap: 1rem; min-height: 46px; }
.ticker__label {
	flex: none;
	margin: 0;
	font-weight: 700;
	color: var(--red);
}
[data-theme="dark"] .ticker__label { color: var(--gold); }
.ticker__list {
	display: flex;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: .5rem 0;
	overflow-x: auto;
	scrollbar-width: none;
	mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.ticker__list::-webkit-scrollbar { display: none; }
.ticker__list li { flex: none; white-space: nowrap; }
.ticker__list time { color: var(--muted); margin-right: .35rem; font-variant-numeric: tabular-nums; }
.ticker__list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.ticker__list a:hover { color: var(--red); }

/* ---------- Sekcijos ---------- */
.section { margin-block: clamp(36px, 5vw, 64px); }

.sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	border-bottom: 2px solid var(--ink);
	padding-bottom: .6rem;
}
.sec-head .sec-title { margin: 0; }

.sec-title {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0 0 1.1rem;
	font: 800 clamp(1.35rem, 2vw, 1.7rem)/1.1 var(--f-head);
	color: var(--ink);
}
.sec-title::before {
	content: "";
	flex: none;
	width: .6em;
	height: .6em;
	background: var(--cat, var(--red));
	transform: rotate(45deg);
}
.sec-title a { color: inherit; text-decoration: none; }
.sec-title a:hover { color: var(--red); }
.sec-more {
	font: 600 .9rem var(--f-ui);
	color: var(--muted);
	text-decoration: none;
	white-space: nowrap;
}
.sec-more:hover { color: var(--red); text-decoration: underline; }

/* ---------- Kategorijos žyma ---------- */
.chip {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	font: 700 .8125rem/1.2 var(--f-ui);
	color: var(--cat, var(--red));
	color: color-mix(in srgb, var(--cat, var(--red)) 82%, var(--ink));
	text-decoration: none;
}
[data-theme="dark"] .chip { color: color-mix(in srgb, var(--cat, var(--red)) 45%, var(--ink)); }
.chip::before {
	content: "";
	width: .6em;
	height: .6em;
	background: var(--cat, var(--red));
	transform: rotate(45deg);
	flex: none;
}
.chip:hover { text-decoration: underline; color: var(--ink); }

/* ---------- Kortelės ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.card__media { display: block; overflow: hidden; border-radius: var(--r); background: var(--line); }
.card__media img,
.card__media .ph {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.card__body { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.card__title {
	margin: 0;
	font: 700 1.2rem/1.22 var(--f-head);
	letter-spacing: -.005em;
	overflow-wrap: break-word;
}
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 3px;
	text-underline-offset: .15em;
}
.card__dek {
	margin: 0;
	font: 400 1rem/1.55 var(--f-text);
	color: var(--muted);
}
.card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .2rem 1rem;
	margin: 0;
	font-size: .8125rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* Paveikslėlio pakaitalas – juostos raštas kategorijos spalva */
.ph {
	position: relative;
	display: block;
	background: var(--river);
	background:
		linear-gradient(color-mix(in srgb, var(--cat, #0E3B43) 82%, transparent), color-mix(in srgb, var(--cat, #0E3B43) 82%, transparent)),
		var(--sash) center / 64px 32px;
}
.ph__label {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding: .35rem .8rem;
	background: rgba(255, 255, 255, .94);
	color: #142A2F;
	font: 800 .95rem/1.2 var(--f-head);
	white-space: nowrap;
	border-radius: 2px;
}
.card--compact .ph__label { display: none; }

/* Pagrindinė naujiena: paveikslėlis ir užlenkta upės spalvos plokštė */
.card--lead { gap: 0; }
.card--lead .card__media img,
.card--lead .card__media .ph { aspect-ratio: 16 / 9; }
.card--lead .card__body {
	position: relative;
	margin: -88px 10% 0 0;
	padding: clamp(18px, 2.6vw, 34px);
	padding-top: calc(clamp(18px, 2.6vw, 34px) + 8px);
	background: var(--river);
	color: var(--on-river);
	border-radius: 0 var(--r) var(--r) 0;
	gap: .7rem;
}
.card--lead .card__body::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 8px;
	background: var(--sash) repeat-x left center / 16px 8px;
}
.card--lead .card__title { font-size: clamp(1.7rem, 3.3vw, 2.75rem); line-height: 1.08; font-weight: 800; letter-spacing: -.015em; }
.card--lead .card__title a,
.card--lead .card__title a:hover { color: var(--on-river); }
.card--lead .card__dek { color: color-mix(in srgb, var(--on-river) 82%, transparent); font-size: 1.08rem; max-width: 62ch; }
.card--lead .card__meta { color: color-mix(in srgb, var(--on-river) 72%, transparent); }
.card--lead .chip { color: var(--gold); }
.card--lead .chip::before { background: var(--gold); }

/* Eilutė: mažas paveikslėlis kairėje */
.card--row { flex-direction: row; align-items: flex-start; gap: 1rem; }
.card--row .card__media { flex: 0 0 38%; max-width: 220px; }
.card--row .card__title { font-size: 1.05rem; }

.card--compact { flex-direction: row; align-items: center; gap: .8rem; }
.card--compact .card__media { flex: 0 0 84px; }
.card--compact .card__media img,
.card--compact .card__media .ph { aspect-ratio: 1; }
.card--compact .card__title { font-size: 1rem; }

/* ---------- Tinkleliai ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--archive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--archive .card--lead { grid-column: 1 / -1; }

/* ---------- Pagrindinio puslapio viršus ---------- */
.front-top {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
	gap: var(--gap);
	margin-top: clamp(20px, 3vw, 36px);
	align-items: start;
}

.stream {
	background: var(--surface);
	padding: 1.25rem 1.25rem .5rem;
	border-radius: var(--r);
	border-top: 4px solid var(--ink);
}
.stream__list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 1rem;
	border-left: 2px solid var(--line);
}
.stream__list li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .25rem;
	padding: 0 0 1.1rem .4rem;
}
.stream__list li::before {
	content: "";
	position: absolute;
	left: calc(-1rem - 6px);
	top: .3rem;
	width: 10px;
	height: 10px;
	background: var(--cat, var(--red));
	transform: rotate(45deg);
	box-shadow: 0 0 0 3px var(--surface);
}
.stream__list time {
	font: 700 .8125rem/1 var(--f-ui);
	color: var(--red);
	font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .stream__list time { color: var(--gold); }
.stream__title {
	color: var(--ink);
	font: 700 1.04rem/1.3 var(--f-head);
	text-decoration: none;
}
.stream__title:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; color: var(--ink); }
.stream .chip { font-size: .75rem; }

/* ---------- Skaitomiausios + archyvas ---------- */
.split {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
	gap: var(--gap);
	align-items: start;
}

.rank {
	list-style: none;
	counter-reset: rank;
	margin: 0;
	padding: 0;
}
.rank li {
	counter-increment: rank;
	display: grid;
	grid-template-columns: 3.2rem minmax(0, 1fr);
	column-gap: .5rem;
	align-items: baseline;
	padding: .9rem 0;
	border-top: 1px solid var(--line);
}
.rank li:first-child { border-top: 0; padding-top: 0; }
.rank li::before {
	content: counter(rank);
	grid-row: span 2;
	font: 800 2.6rem/1 var(--f-head);
	color: var(--gold);
	font-variant-numeric: lining-nums;
}
.rank__title {
	color: var(--ink);
	font: 700 1.15rem/1.28 var(--f-head);
	text-decoration: none;
}
.rank__title:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.rank__meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .3rem; font-size: .8125rem; color: var(--muted); }
.rank--small li { grid-template-columns: 2.2rem minmax(0, 1fr); padding: .7rem 0; }
.rank--small li::before { font-size: 1.7rem; grid-row: auto; }
.rank--small .rank__title { font-size: 1rem; }

.otd {
	position: relative;
	padding: 1.4rem 1.4rem 1rem;
	background: var(--river);
	color: var(--on-river);
	border-radius: var(--r);
	overflow: hidden;
}
.otd::after {
	content: "";
	position: absolute;
	right: -40px;
	bottom: -40px;
	width: 160px;
	height: 160px;
	background: var(--sash) center / 48px 24px;
	transform: rotate(45deg);
	opacity: .22;
	pointer-events: none;
}
.otd .sec-title { color: var(--on-river); }
.otd .sec-title::before { background: var(--gold); }
.otd__list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; }
.otd__list li { padding: .8rem 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.otd__list li:first-child { border-top: 0; padding-top: 0; }
.otd__ago { display: block; font: 700 .8125rem var(--f-ui); color: var(--gold); margin-bottom: .2rem; }
.otd__list a { color: var(--on-river); font: 700 1.08rem/1.3 var(--f-head); text-decoration: none; }
.otd__list a:hover { text-decoration: underline; text-decoration-color: var(--gold); color: #fff; }

/* ---------- Kategorijų blokai ---------- */
.catblock .sec-head { border-bottom-color: var(--cat, var(--ink)); }
.catblock__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: var(--gap);
}
.catblock__main .card__title { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.catblock__list { display: flex; flex-direction: column; gap: 1.2rem; }
.catblock__list .card + .card { padding-top: 1.2rem; border-top: 1px solid var(--line); }
.catblock--alt .catblock__main { order: 2; }

.more-wrap { margin: 2rem 0 0; text-align: center; }

/* ---------- Archyvai ---------- */
.page-head {
	padding-block: clamp(22px, 4vw, 44px) clamp(18px, 3vw, 30px);
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(24px, 4vw, 44px);
}
.page-head__title {
	display: flex;
	align-items: center;
	gap: .8rem;
	margin: .3rem 0 .4rem;
	font-size: clamp(2rem, 4.4vw, 3.2rem);
	font-weight: 800;
	letter-spacing: -.015em;
}
.page-head__title::before {
	content: "";
	flex: none;
	width: .42em;
	height: .42em;
	background: var(--cat, var(--red));
	transform: rotate(45deg);
}
.page-head__desc { max-width: 70ch; color: var(--muted); font: 400 1.08rem/1.6 var(--f-text); }
.page-head__desc p { margin: 0 0 .6rem; }
.page-head__count { margin: .4rem 0 0; font-size: .875rem; color: var(--muted); }
.page-head--404 .search-form { margin-block: 1.2rem; }

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
	margin-bottom: clamp(36px, 5vw, 64px);
}
.side-sticky { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 2rem; }
.widget { min-width: 0; }
.widget ul { padding-left: 1.1rem; }

.topics { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.topics a {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .45rem .7rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--cat);
	border-radius: var(--r);
	color: var(--ink);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
}
.topics a span { color: var(--muted); font-weight: 400; font-size: .8rem; }
.topics a:hover { border-color: var(--cat); }

.pagination { margin-top: 2.5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 .8rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.page-numbers.current { background: var(--river); border-color: var(--river); color: var(--on-river); }
.page-numbers.dots { background: none; border: 0; }
a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }

.empty { padding: 2rem; background: var(--surface); border-radius: var(--r); }
.empty h2 { margin-top: 0; }

/* ---------- Naršymo kelias ---------- */
.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: .2rem;
	list-style: none;
	margin: 0 0 .8rem;
	padding: 0;
	font-size: .8125rem;
	color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: .2rem; min-width: 0; }
.crumbs li + li::before { content: "/"; margin-inline: .35rem; opacity: .5; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-current] {
	display: inline-block;
	max-width: 36ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Straipsnis ---------- */
.article__head { margin-top: clamp(20px, 3.5vw, 40px); }
.article__head > * { max-width: 980px; }
.article__title {
	margin: .5rem 0 .8rem;
	font-size: clamp(2rem, 4.4vw, 3.3rem);
	font-weight: 800;
	line-height: 1.07;
	letter-spacing: -.018em;
	text-wrap: balance;
}
.article__dek {
	margin: 0 0 1rem;
	max-width: 62ch;
	font: 400 clamp(1.1rem, 1.6vw, 1.3rem)/1.5 var(--f-text);
	color: var(--muted);
}
.article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem 1.4rem;
	padding-top: .9rem;
	border-top: 1px solid var(--line);
	font-size: .875rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.article__author { color: var(--ink); font-weight: 700; }

.article__figure { margin-block: 1.6rem 0; }
.article__figure img { display: block; width: 100%; max-height: 660px; object-fit: cover; border-radius: var(--r); }
.article__figure figcaption { margin-top: .5rem; font-size: .875rem; color: var(--muted); }

.article__layout {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) 300px;
	gap: clamp(20px, 3.4vw, 52px);
	margin-top: clamp(24px, 3.5vw, 44px);
	align-items: start;
}
.article__body { min-width: 0; max-width: 720px; }
.rail-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 1.2rem; }

.entry {
	font: 400 var(--fs, 1.15rem)/1.75 var(--f-text);
	overflow-wrap: break-word;
}
.entry > * { margin-block: 0 1.2em; }
.entry h2, .entry h3, .entry h4 { margin: 1.8em 0 .55em; font-weight: 800; letter-spacing: -.01em; scroll-margin-top: calc(var(--header-h) + 24px); }
.entry h2 { font-size: 1.6em; }
.entry h3 { font-size: 1.28em; }
.entry h4 { font-size: 1.1em; }
.entry a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.entry a:hover { color: var(--red); text-decoration-thickness: 2px; }
[data-theme="dark"] .entry a:hover { color: var(--gold); }
.entry strong { font-weight: 700; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry li { margin-bottom: .35em; }
.entry li::marker { color: var(--red); }
.entry blockquote {
	margin: 1.8em 0;
	padding: .2em 0 .2em 1.2em;
	border-left: 5px solid var(--gold);
	font-size: 1.12em;
	font-style: italic;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry img { border-radius: var(--r); }
.entry figure { margin-inline: 0; }
.entry figcaption, .entry .wp-caption-text, .entry .wp-element-caption {
	margin-top: .45rem;
	font: 400 .875rem/1.45 var(--f-ui);
	color: var(--muted);
}
.entry table { width: 100%; border-collapse: collapse; font: .95rem/1.5 var(--f-ui); }
.entry th, .entry td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry th { background: var(--surface); }
.entry hr { border: 0; height: 12px; background: var(--sash) repeat-x center / 24px 12px; margin: 2.4em 0; opacity: .9; }
.entry iframe { width: 100%; border: 0; border-radius: var(--r); }
.entry .wp-block-embed__wrapper iframe, .entry iframe[src*="youtube"] { aspect-ratio: 16 / 9; height: auto; }
.entry pre { overflow-x: auto; padding: 1rem; background: var(--surface); border-radius: var(--r); font-size: .9em; }

/* WordPress lygiavimas */
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.entry::after { content: ""; display: table; clear: both; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.gallery-item { margin: 0; }

.toc { font-family: var(--f-ui); }
.toc--inline { display: none; margin-bottom: 1.6rem; background: var(--surface); border-radius: var(--r); border-left: 4px solid var(--gold); }
.toc--inline summary { padding: .9rem 1rem; font-weight: 700; cursor: pointer; }
.toc--inline .toc__list { padding: 0 1rem 1rem 2.2rem; margin: 0; }
.toc--side { padding: 1.1rem 1.1rem .6rem; background: var(--surface); border-radius: var(--r); border-top: 4px solid var(--river); }
[data-theme="dark"] .toc--side { border-top-color: var(--gold); }
.toc__title { margin: 0 0 .6rem; font: 800 1.05rem var(--f-head); }
.toc__list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.toc__list li { margin: 0 0 .5rem; }
.toc__l3 { padding-left: .9rem; font-size: .85rem; }
.toc__list a { color: var(--muted); text-decoration: none; display: block; line-height: 1.35; border-left: 2px solid transparent; padding-left: .5rem; margin-left: -.6rem; }
.toc__list a:hover, .toc__list a.is-active { color: var(--ink); border-left-color: var(--red); }

.share { display: flex; flex-wrap: wrap; gap: .45rem; }
.share--rail { flex-direction: column; }
.share__btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1.5px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
}
.share__btn svg { fill: currentColor; }
.share__btn:hover { border-color: var(--river); background: var(--river); color: var(--on-river); }
.share__btn.is-done { background: var(--gold); border-color: var(--gold); color: #142A2F; }

.fontsize { display: flex; flex-direction: column; gap: .45rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.fontsize button {
	width: 42px;
	height: 36px;
	border: 1.5px solid var(--line);
	border-radius: var(--r);
	background: var(--surface);
	color: var(--ink);
	font: 700 .85rem var(--f-ui);
	cursor: pointer;
}
.fontsize button:hover { border-color: var(--ink); }

.article__foot { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.tags a {
	display: inline-block;
	padding: .35rem .75rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-size: .875rem;
	text-decoration: none;
}
.tags a::before { content: "#"; color: var(--red); margin-right: .1em; }
.tags a:hover { border-color: var(--ink); }
.article__share { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.article__share p { margin: 0; font-weight: 700; }

/* Skaitykite toliau */
.next-read { margin-top: clamp(40px, 6vw, 72px); }
.next-read__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	background: var(--river);
	color: var(--on-river);
	border-radius: var(--r);
	overflow: hidden;
	text-decoration: none;
}
.next-read__link:hover { color: var(--on-river); }
.next-read__media img, .next-read__media .ph { display: block; width: 100%; height: 100%; min-height: 220px; object-fit: cover; aspect-ratio: auto; }
.next-read__body {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .7rem;
	padding: clamp(22px, 4vw, 48px);
}
.next-read__body::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 8px;
	background: var(--sash) repeat-y center top / 8px 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E%3Crect width='12' height='24' fill='%230E3B43'/%3E%3Cpath d='M6 0 12 12 6 24 0 12z' fill='%23E2A72E'/%3E%3Cpath d='M6 6 9 12 6 18 3 12z' fill='%23B0172F'/%3E%3C/svg%3E");
}
.next-read__label { font: 700 .875rem var(--f-ui); color: var(--gold); }
.next-read__title { font: 800 clamp(1.5rem, 2.8vw, 2.2rem)/1.12 var(--f-head); letter-spacing: -.01em; }
.next-read__link:hover .next-read__title { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: .15em; }
.next-read__dek { color: color-mix(in srgb, var(--on-river) 78%, transparent); font: 400 1.02rem/1.55 var(--f-text); }

/* Komentarai */
.comments { max-width: 760px; margin-block: 3rem; }
.comment-list { padding-left: 1rem; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	width: 100%;
	padding: .7rem .8rem;
	border: 2px solid var(--line);
	border-radius: var(--r);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}

.entry--page { max-width: 760px; margin-bottom: 4rem; }
.page-links { margin: 1.5rem 0; font-weight: 700; }

/* ---------- Poraštė ---------- */
.site-footer {
	margin-top: clamp(48px, 7vw, 96px);
	background: var(--river);
	color: color-mix(in srgb, var(--on-river) 80%, transparent);
	font-size: .95rem;
}
.site-footer a { color: var(--on-river); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem 3rem;
	padding-block: clamp(32px, 5vw, 56px);
}
.site-footer__about p { max-width: 46ch; }
.brand--footer { margin-bottom: 1rem; }
.site-footer__title { margin: 0 0 .9rem; font: 800 1.1rem var(--f-head); color: var(--on-river); }
.site-footer__cats, .site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__cats { columns: 2; column-gap: 1.5rem; }
.site-footer__cats li, .site-footer__links li { margin-bottom: .5rem; break-inside: avoid; }
.site-footer__cats li { display: flex; align-items: center; gap: .5rem; }
.site-footer__cats li::before { content: ""; width: .5em; height: .5em; background: var(--cat); transform: rotate(45deg); flex: none; }
.site-footer__bottom {
	padding-block: 1.1rem;
	border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: .85rem;
}
.site-footer__bottom p { margin: 0; }

/* ---------- Mygtukas „į viršų“: rombas ---------- */
.totop {
	position: fixed;
	right: clamp(14px, 2.4vw, 28px);
	bottom: clamp(14px, 2.4vw, 28px);
	z-index: 70;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	color: #142A2F;
	text-decoration: none;
	transition: opacity .25s, transform .25s;
}
.totop__shape {
	position: absolute;
	inset: 6px;
	background: var(--gold);
	transform: rotate(45deg);
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(14, 59, 67, .35);
	transition: background .2s;
}
.totop svg { position: relative; fill: currentColor; }
.totop:hover { color: #fff; }
.totop:hover .totop__shape { background: var(--red); }
.js .totop:not(.is-visible) { opacity: 0; visibility: hidden; transform: translateY(12px); }

/* ---------- Prisitaikymas ---------- */
@media (max-width: 1180px) {
	.article__layout { grid-template-columns: 52px minmax(0, 1fr); }
	.article__aside { display: none; }
	.toc--inline { display: block; }
	.article__body { max-width: 760px; }
}

@media (max-width: 1080px) {
	.site-nav a { padding-inline: .5rem; font-size: .9rem; }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
	.menu-btn { display: grid; }
	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		margin: 0;
		padding: .6rem var(--pad) 1.2rem;
		background: var(--river-2);
		box-shadow: 0 16px 30px rgba(0, 0, 0, .25);
		max-height: calc(100vh - var(--header-h));
		overflow-y: auto;
	}
	.site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav a { padding: .85rem .4rem; font-size: 1.05rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
	.site-nav .sub-menu { display: block; position: static; box-shadow: none; padding: 0 0 0 1rem; background: none; }
	.tools { margin-left: auto; }
	.front-top, .split, .layout { grid-template-columns: minmax(0, 1fr); }
	.grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.side-sticky { position: static; }
	.catblock__grid { grid-template-columns: minmax(0, 1fr); }
	.catblock--alt .catblock__main { order: 0; }
	.site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
	:root { --header-h: 60px; }
	.topbar__len, .topbar__place { display: none; }
	.brand__word { font-size: 1.35rem; }
	.brand__mark { width: 34px; height: 34px; }
	.card--lead .card__body { margin: -36px 0 0 0; border-radius: 0 0 var(--r) var(--r); }
	.article__layout { grid-template-columns: minmax(0, 1fr); }
	.article__rail { order: 2; }
	.rail-sticky { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
	.share--rail { display: none; }
	.fontsize { flex-direction: row; padding-top: 0; border-top: 0; }
	.next-read__link { grid-template-columns: minmax(0, 1fr); }
	.next-read__media img, .next-read__media .ph { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 600px) {
	.grid--4, .grid--3, .grid--archive { grid-template-columns: minmax(0, 1fr); }
	.card--row .card__media { flex-basis: 34%; }
	.site-footer__grid { grid-template-columns: minmax(0, 1fr); }
	.search-form { flex-direction: column; }
	.ticker__label { display: none; }
	.crumbs span[aria-current] { max-width: 22ch; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	.topbar, .site-header, .ticker, .article__rail, .article__aside, .article__share,
	.next-read, .related, .site-footer, .totop, .toc { display: none !important; }
	body { background: #fff; color: #000; }
	.entry a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
