/*
Theme Name: Demir Bozan 2026
Text Domain: demir-bozan-2026
Description: Лека класическа тема за demirbozan.bg – без външни шрифтове и скриптове, със същите менюта и странични колони като HeatMap AdAptive.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

/* ===== Основа: билкова, топла, четлива за по-възрастни читатели ===== */
:root {
	--paper: #fbf8f2;
	--card: #ffffff;
	--ink: #1f2a24;
	--muted: #5b665f;
	--line: #e3ddd0;
	--green: #2f5d3a;
	--green-dark: #1e3d27;
	--green-soft: #eaf2e6;
	--amber: #b86a14;
	--amber-dark: #8f500c;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 19px;
	line-height: 1.65;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--serif);
	color: var(--green-dark);
	line-height: 1.25;
	margin: 1.6em 0 .6em;
	font-weight: 700;
}
h1 { font-size: 2.1rem; margin-top: .2em; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.25rem; }
h5, h6 { font-size: 1.1rem; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 100; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ===== Горна лента с телефоните ===== */
.topbar { background: var(--green-dark); color: #e9f1e6; font-size: .9rem; }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: flex-end; min-height: 40px; padding-top: 4px; padding-bottom: 4px; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar-cta { background: var(--amber); padding: 3px 12px; border-radius: 999px; }
.topbar-cta:hover { background: var(--amber-dark); color: #fff; }

/* ===== Заглавна част ===== */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 8px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--green-dark); }
.brand-tag { font-size: .85rem; color: var(--muted); }

.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.main-nav .menu a { display: block; padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; border-radius: 6px; }
.main-nav .menu a:hover, .main-nav .current-menu-item > a { background: var(--green-soft); color: var(--green-dark); }
.main-nav .sub-menu { display: none; }
.nav-toggle { display: none; }

/* ===== Лента за поръчка (джаджа от Ad Inserter) – запазено място против CLS ===== */
.leaderboard { background: var(--green-soft); border-bottom: 1px solid var(--line); }
.leaderboard .wrap { min-height: 3.5em; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 6px; padding-bottom: 6px; }
.leaderboard p, .leaderboard h6 { margin: 0; font-family: var(--sans); font-size: 1rem; }

/* ===== Съдържание и странична колона ===== */
.site-content { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; padding-top: 28px; padding-bottom: 48px; }
.main { min-width: 0; }
.entry, .intro, .comments { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 34px; }
.entry-header { margin-bottom: 1.2em; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9rem; color: var(--muted); margin: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content blockquote {
	background: var(--green-soft);
	border-left: 6px solid var(--green);
	margin: 1.5em 0;
	padding: .8em 1.1em;
	border-radius: 0 8px 8px 0;
}
.entry-content blockquote p { margin: .4em 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 17px; background: #fff; }
.entry-content a { text-decoration: underline; }
.entry-content .wp-caption-text, .entry-content figcaption { font-size: 15px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea, .search-field, .wpcf7 input, .wpcf7 select, .wpcf7 textarea { font-size: 18px; min-height: 48px; }
.wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .wpcf7 select, .wpcf7 textarea { width: 100%; max-width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid #c9c2b2; border-radius: 6px; font-family: inherit; }
.wpcf7 .wpcf7-form-control-wrap { display: block; max-width: 100%; }
.wpcf7 form { max-width: 100%; overflow-wrap: anywhere; }
.wpcf7 input[type="submit"], .search-submit, .comment-form input[type="submit"], .btn { min-height: 48px; }
.entry-content th, .entry-content td { border: 1px solid #cfc8b8; padding: 8px 12px; vertical-align: top; }
.entry-content th { background: var(--green-soft); text-align: left; }
.entry-content td:nth-child(2) { text-align: right; }
.entry-content img { border-radius: 6px; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.entry-footer { margin-top: 1.5em; font-size: .9rem; color: var(--muted); }
.below { margin: 1.5em 0; }

.rank-math-breadcrumb { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }
.rank-math-breadcrumb p { margin: 0; }

/* ===== Начало и списъци ===== */
.intro h1 { margin-bottom: .4em; }
.intro p { margin: .6em 0; }
.intro-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1em !important; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--green); color: #fff !important; text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--green-dark); }
.btn-accent { background: var(--amber); }
.btn-accent:hover { background: var(--amber-dark); }
.list-title, .page-title { margin-top: 1.4em; }
.post-list { display: grid; gap: 16px; }
.card { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card:not(.has-post-thumbnail) { grid-template-columns: minmax(0, 1fr); }
.card-thumb img { width: 160px; height: 110px; object-fit: cover; border-radius: 6px; display: block; }
.card-title { margin: 0 0 4px; font-size: 1.25rem; }
.card-title a { text-decoration: none; color: var(--green-dark); }
.card-title a:hover { text-decoration: underline; }
.card-meta { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.card-excerpt { margin: 0; font-size: 1rem; }
.author-head { display: flex; gap: 18px; align-items: center; margin-bottom: 1em; }
.author-head img { border-radius: 50%; flex: none; }
.author-bio { margin: 0; color: var(--muted); }
.pagination .nav-links, .post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-decoration: none; }
.page-numbers.current { background: var(--green); color: #fff; border-color: var(--green); }
.post-navigation .nav-links > div { flex: 1 1 260px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.post-navigation a { text-decoration: none; }
.nav-label { display: block; font-size: .8rem; color: var(--muted); }

/* ===== Странична колона ===== */
.sidebar { min-width: 0; font-size: .95rem; }
.sidebar .widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.widget-title { margin: 0 0 .6em; font-size: 1.15rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.search-form { display: flex; gap: 6px; }
.search-form label { flex: 1; }
.search-field, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 9px 11px; border: 1px solid #c9c2b2; border-radius: 6px; font: inherit; font-size: 1rem; background: #fff;
}
.search-submit, .comment-form input[type="submit"] { padding: 9px 16px; border: 0; border-radius: 6px; background: var(--green); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.search-submit:hover, .comment-form input[type="submit"]:hover { background: var(--green-dark); }

/* ===== Коментари ===== */
.comments { margin-top: 24px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; padding-left: 24px; border-left: 2px solid var(--green-soft); }
.comment-body { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-meta { font-size: .85rem; color: var(--muted); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 6px; }

/* ===== Долна част ===== */
.site-footer { background: var(--green-dark); color: #dfe9dc; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding-top: 36px; padding-bottom: 20px; }
.footer-title { font-family: var(--serif); font-size: 1.2rem; color: #fff; font-weight: 700; margin: 0 0 .5em; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { padding: 3px 0; }
.footer-cta { display: inline-block; background: var(--amber); padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; padding-bottom: 20px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ===== Мобилно ===== */
@media (max-width: 960px) {
	.site-content { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.main-nav-desktop { display: none; }
	.site-header { position: relative; }
	.nav-toggle { display: block; position: static; }
	.nav-toggle summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
	.nav-toggle summary::-webkit-details-marker { display: none; }
	.nav-toggle[open] .main-nav { position: absolute; left: 14px; right: 14px; top: 100%; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
	.nav-toggle .menu a { padding: 12px 14px; font-size: 1.05rem; }
	.nav-toggle .menu { flex-direction: column; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	body { font-size: 18px; }
	.entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
	h1 { font-size: 1.7rem; }
	.wrap { padding: 0 14px; }
	.entry, .intro, .comments { padding: 18px 16px; }
	.brand-name { font-size: 1.3rem; }
	.brand img { width: 44px; height: 44px; }
	.topbar-text { display: none; }
	.topbar-inner { justify-content: center; }
	.leaderboard .wrap { min-height: 6em; }
	.card { grid-template-columns: minmax(0, 1fr); }
	.card-thumb img { width: 100%; height: 160px; }
	.alignleft, .alignright { float: none; margin: 1em auto; display: block; }
}
