/*
Theme Name: Созопол Новини
Theme URI: https://example.com/
Author: Созопол Новини
Description: Изчистена новинарска тема за община Созопол, Царево и Южното Черноморие. Времето на живо, крайбрежна навигация по населените места, автоматичен nofollow за външни линкове и източник на снимките.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sozopol-news
*/

:root {
	--sea: #0e3a53;
	--sea-2: #135a7f;
	--link: #0b6e99;
	--sky: #3a86c8;
	--forest: #2f6b4f;
	--sand: #b07a14;
	--ink: #1b2329;
	--muted: #5b6770;
	--line: #dfe5ea;
	--mist: #f2f5f7;
	--paper: #ffffff;
	--focus: #f2b705;
	--radius: 6px;
	--wrap: 1200px;
	--f-head: "Literata", Georgia, "Times New Roman", serif;
	--f-body: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.6 var(--f-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--sea); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--sea); line-height: 1.22; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem); }
h3 { font-size: 1.2rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: #fff; padding: 8px 12px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--sea); color: #d6e6ef; font-size: 14px; }
.topbar .wrap { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 36px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar-weather { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar-weather span { white-space: nowrap; }
.topbar-weather b { color: #fff; font-weight: 600; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; margin-right: auto; }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: 1.55rem; color: var(--sea); white-space: nowrap; }
.brand-tag { font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1440px) { .brand-tag { display: none; } }
.brand img { max-height: 48px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: var(--radius); }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { background: var(--mist); color: var(--sea); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; flex-direction: column; box-shadow: 0 12px 30px rgba(14,58,83,.12); }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.header-search { display: flex; }
.search-form { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--mist); }
.search-form input { border: 0; background: transparent; padding: 9px 14px; font: inherit; font-size: 15px; width: 150px; min-width: 0; }
.search-form button { border: 0; background: var(--sea); color: #fff; padding: 0 16px; font: inherit; font-size: 14px; cursor: pointer; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; font: inherit; color: var(--sea); cursor: pointer; }

/* ---------- Coast strip (signature) ---------- */
.coast { background: linear-gradient(180deg, #eaf3f8 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.coast .wrap { position: relative; }
.coast-label { font-size: 13px; color: var(--muted); padding-top: 12px; }
.coast-line { list-style: none; margin: 0; padding: 10px 0 16px; display: flex; overflow-x: auto; scrollbar-width: thin; position: relative; }
.coast-line::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: repeating-linear-gradient(90deg, var(--sky) 0 10px, transparent 10px 16px); opacity: .55; }
.coast-line li { flex: 1 0 auto; text-align: center; position: relative; }
.coast-line a { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 10px; color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.coast-line a::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--sea-2); position: relative; z-index: 1; }
.coast-line .is-hub a { font-weight: 700; color: var(--sea); }
.coast-line .is-hub a::before { width: 16px; height: 16px; background: var(--sea-2); margin-top: -2px; }
.coast-line .is-tsarevo a::before { border-color: var(--forest); }
.coast-line .is-tsarevo.is-hub a::before { background: var(--forest); }
.coast-line a:hover { color: var(--link); }

/* ---------- Layout ---------- */
.site-main { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; border-bottom: 2px solid var(--sea); padding-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head a { font-size: 15px; text-decoration: none; }
.section-head.c-tsarevo { border-color: var(--forest); }
.section-head.c-tsarevo h2 { color: var(--forest); }
.section-head.c-beach { border-color: var(--sand); }
.section-head.c-beach h2 { color: #7a5309; }

/* ---------- Lead ---------- */
.lead { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; }
.lead-main a { text-decoration: none; color: inherit; }
.lead-main a.kicker { color: var(--sea-2); }
.lead-main .thumb { display: block; }
.lead-main .thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--mist); }
.lead-main .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lead-main h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.15rem); margin: 14px 0 8px; }
.lead-main p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.lead-side { display: flex; flex-direction: column; gap: 18px; }

/* ---------- Cards ---------- */
.kicker { display: inline-block; font-size: 13px; font-weight: 600; color: var(--sea-2); text-decoration: none; margin-bottom: 4px; }
.kicker.c-tsarevo { color: var(--forest); }
.kicker.c-beach { color: var(--sand); }
.meta { font-size: 14px; color: var(--muted); }
.card-row { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 14px; align-items: start; }
.card-row .thumb { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--mist); }
.card-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-row h3 { font-size: 1.05rem; margin: 0 0 4px; }
.card-row h3 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card-row h3 a:hover, .card h3 a:hover { color: var(--link); }
.card-row.wide { grid-template-columns: 240px minmax(0,1fr); padding: 18px 0; border-bottom: 1px solid var(--line); }
.card-row.wide h3 { font-size: 1.25rem; }
.card-row.wide p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card .thumb { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/2; background: var(--mist); margin-bottom: 10px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 1.1rem; margin: 0 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Quick links ---------- */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.quick a { display: block; padding: 14px 16px; background: var(--mist); border-radius: var(--radius); text-decoration: none; color: var(--ink); border-left: 4px solid var(--sea-2); }
.quick a strong { display: block; color: var(--sea); font-size: 1rem; }
.quick a span { font-size: 14px; color: var(--muted); }
.quick a:hover { background: #e6eef3; }

/* ---------- Sidebar ---------- */
.sidebar .widget { background: var(--mist); border-radius: var(--radius); padding: 18px; margin-bottom: 24px; }
.sidebar .widget-title { font-size: 1.1rem; margin: 0 0 12px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { text-decoration: none; color: var(--ink); }
.sidebar li a:hover { color: var(--link); }

/* ---------- Weather ---------- */
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-now .wx-icon { font-size: 40px; line-height: 1; }
.wx-temp { font-family: var(--f-head); font-size: 2.6rem; font-weight: 700; color: var(--sea); line-height: 1; }
.wx-desc { color: var(--muted); font-size: 15px; }
.wx-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 14px; }
.wx-facts dt { color: var(--muted); }
.wx-facts dd { margin: 0; font-weight: 600; }
.wx-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 28px; background: linear-gradient(160deg, #f3f9fc, #fff 60%); }
.wx-table, .entry-content .wx-table { width: 100%; border-collapse: collapse; font-size: 15px; display: table; }
.wx-table th, .wx-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.wx-table th { font-weight: 600; color: var(--muted); font-size: 14px; }
.wx-table td.wx-i { font-size: 22px; width: 40px; }
.wx-table .hi { font-weight: 700; color: #b23a1d; }
.wx-table .lo { color: var(--sea-2); }
.wx-table-wrap { overflow-x: auto; }
.wx-source { font-size: 13px; color: var(--muted); margin-top: 10px; }
.entry-content .wx-places, .entry-content .children { padding-left: 0; }
.wx-places { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.wx-places a { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 15px; }
.wx-places a[aria-current] { background: var(--sea); color: #fff; border-color: var(--sea); }

/* ---------- Single / page ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }
.entry-header .meta { margin-bottom: 18px; }
.entry-lead { font-size: 1.15rem; color: #3c4850; margin: 0 0 20px; }
.entry-figure { margin: 0 0 24px; }
.entry-figure img { border-radius: var(--radius); width: 100%; }
.entry-figure figcaption, .wp-caption-text, figure figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.entry-content { max-width: 72ch; }
.entry-content > * { margin-top: 0; margin-bottom: 1.05em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.3em; color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
.entry-content th { background: var(--mist); }
.entry-content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--sky); color: #3c4850; }
.box { background: var(--mist); border-radius: var(--radius); padding: 16px 18px; border-left: 4px solid var(--sea-2); }
.box.tip { border-color: var(--forest); background: #eef5f1; }
.box.warn { border-color: var(--sand); background: #fbf5e8; }
.box > :last-child { margin-bottom: 0; }
.factbox { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; background: var(--mist); padding: 16px 18px; border-radius: var(--radius); font-size: 16px; }
.factbox dt { color: var(--muted); }
.factbox dd { margin: 0; font-weight: 500; }
.toc { background: var(--mist); border-radius: var(--radius); padding: 14px 18px; font-size: 15px; }
.toc ol { margin: 6px 0 0; }
.entry-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-tags a { font-size: 14px; padding: 4px 10px; background: var(--mist); border-radius: 999px; text-decoration: none; color: var(--ink); }
.share { display: flex; gap: 10px; align-items: center; margin-top: 24px; font-size: 15px; }
.share a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.related { margin-top: 44px; }
.children { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.children li { margin: 0; }
.page-intro { max-width: 72ch; }

/* ---------- Archive ---------- */
.archive-head { margin-bottom: 10px; }
.archive-head p { color: var(--muted); max-width: 70ch; }
.pagination { margin-top: 30px; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pagination .current { background: var(--sea); color: #fff; border-color: var(--sea); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sea); color: #c9dbe5; padding: 44px 0 24px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.layout { grid-template-columns: 1fr; }
	.quick { grid-template-columns: repeat(2, 1fr); }
	.footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
	.menu-toggle { display: block; }
	.header-inner { flex-wrap: wrap; }
	.main-nav { display: none; width: 100%; order: 3; padding-bottom: 12px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.header-search { order: 4; width: 100%; padding-bottom: 12px; display: none; }
	.main-nav.is-open + .header-search { display: flex; }
	.search-form { width: 100%; }
	.search-form input { width: 100%; }
	.lead { grid-template-columns: 1fr; }
	.grid, .children { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.site-header { position: static; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.grid, .grid.two, .children, .quick { grid-template-columns: 1fr; }
	.card-row.wide { grid-template-columns: 110px minmax(0,1fr); }
	.card-row.wide p { display: none; }
	.footer-cols { grid-template-columns: 1fr; }
	.topbar-weather span:nth-child(n+3) { display: none; }
	.topbar .wrap > span:first-child { display: none; }
	.topbar .wrap { justify-content: center; }
	.factbox { grid-template-columns: 1fr; }
	.factbox dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .topbar, .site-header, .coast, .sidebar, .site-footer, .share { display: none; } }

/* ---------- Цвят по секция ---------- */
.section-tsarevo .entry-header h1, .section-tsarevo .entry-content h2 { color: var(--forest); }
.section-tsarevo .box, .section-tsarevo .factbox { border-color: var(--forest); }
.section-beach .entry-header h1, .section-beach .entry-content h2 { color: #6b4807; }
