:root {
  --bg: #ffffff;
  --text: #444444;
  --heading: #111111;
  --muted: #999999;
  --link: #4eaee6;
  --link-hover: #ff0303;
  --nav-bg: #2d2d2d;
  --nav-text: #dddddd;
  --nav-border: #3f3f3f;
  --accent-blue: #37b8eb;
  --accent-red: #f43d2a;
  --topbar-border: #ececec;
  --card-border: #e5e5e5;
  --font-heading: 'Bebas Neue', Arial, Georgia, serif;
  --font-body: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-width: 1170px;
  --content-width: 780px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--heading);
  margin: 0 0 8px;
}

img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 14px; }
.clear { clear: both; }

/* diagonal-stripe divider used next to section headings, matching the theme's accent pattern */
.stripe-line {
  flex: 1; height: 12px; margin-top: 6px;
  background-image: repeating-linear-gradient(45deg, var(--accent-blue) 0 2px, transparent 2px 6px);
  opacity: 0.55;
}

/* ---------- top bar ---------- */
.top-nav { background: #ffffff; border-bottom: 1px solid var(--topbar-border); }
.top-nav .container { display: flex; align-items: center; height: 36px; gap: 20px; flex-wrap: wrap; }
.today-date { color: var(--link); font-size: 12px; font-weight: 500; white-space: nowrap; }
.top-menu { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.top-menu a { color: var(--link); font-size: 12px; }
.top-menu a:hover, .top-menu .is-active a { color: var(--link-hover); }
.top-nav .social-icons { display: flex; gap: 10px; margin-left: auto; }
.social-icons span { color: #999; font-size: 13px; cursor: default; }

/* ---------- header ---------- */
.theme-header { background: var(--bg); border-top: 3px solid var(--accent-blue); box-shadow: 0 0 3px #cacaca; }
.header-content { padding: 16px 14px; text-align: center; }
.logo-link img { max-height: 84px; margin: 0 auto; }

.main-nav { background: var(--nav-bg); border-bottom: 4px solid var(--accent-blue); }
.main-nav .container { display: flex; align-items: center; }
.main-menu { display: flex; flex-wrap: wrap; flex: 1; }
.main-menu li { border-left: 1px solid var(--nav-border); }
.main-menu a {
  display: block; padding: 0 18px; line-height: 50px;
  color: var(--nav-text); font-family: var(--font-heading); font-size: 15px; letter-spacing: 0.03em;
}
.main-menu li.is-active a { background: var(--accent-blue); color: #fff; }
.main-menu a:hover { color: var(--accent-blue); }
.main-menu li.is-active a:hover { color: #fff; }
.nav-search { display: flex; flex-shrink: 0; }
.nav-search input {
  border: 1px solid var(--nav-border); background: #1f1f1f; color: #fff;
  padding: 6px 10px; font-family: var(--font-body); font-size: 13px; width: 130px;
}
.nav-search button {
  border: none; background: var(--accent-blue); color: #fff; padding: 6px 12px;
  font-family: var(--font-heading); letter-spacing: 0.03em; cursor: pointer;
}
.nav-search button:hover { background: var(--link-hover); }

/* ---------- breadcrumb ---------- */
#breadcrumb { font-size: 12px; color: var(--muted); margin: 14px 0; }
#breadcrumb img { display: inline-block; height: 13px; vertical-align: middle; }
#breadcrumb a { color: var(--link); }
#breadcrumb span > span { color: var(--muted); margin: 0 5px; }

/* ---------- main layout ---------- */
#main-content { padding: 16px 0 40px; }
.content-layout { display: flex; gap: 24px; align-items: flex-start; }
.content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ---------- hero (home) ---------- */
.hero-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 24px; }
.hero-card { position: relative; display: block; height: 140px; background-size: cover; background-position: center; background-color: #ccc; overflow: hidden; }
.hero-card-main { grid-column: span 2; grid-row: span 2; height: 288px; }
.hero-card-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; background: linear-gradient(to top, rgba(0,0,0,.9) 10%, rgba(0,0,0,0)); }
.hero-date { display: block; font-size: 11px; color: #ccc; margin-bottom: 4px; }
.hero-title {
  font-family: var(--font-heading); font-size: 15px; line-height: 1.25; color: #fff; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.hero-card-main .hero-title { font-size: 22px; -webkit-line-clamp: 3; }
.hero-card-badge {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-card-badge img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- thumbnail badge + caption overlay (used by cards, list items, related) ---------- */
.post-thumb { position: relative; display: block; overflow: hidden; background: #eee; aspect-ratio: 16/9; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-badge {
  position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.post-thumb-badge img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-caption {
  position: absolute; left: 0; right: 0; bottom: 0; background: rgba(244,61,42,.9);
  color: #fff; font-size: 12px; font-weight: 500; line-height: 1.3;
  padding: 6px 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- cat-box (home section blocks) ---------- */
.cat-box { margin-bottom: 30px; }
.cat-box-title { display: flex; align-items: baseline; gap: 10px; }
.cat-box-title h2 { font-size: 22px; margin: 0; }
.cat-box-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 10px; }
.post-card { display: flex; gap: 10px; }
.post-card-first { grid-column: 1 / -1; }
.post-card-first .post-thumb { width: 280px; flex-shrink: 0; }
.post-card:not(.post-card-first) .post-thumb { width: 100px; flex-shrink: 0; }
.post-box-title { font-family: var(--font-body); font-weight: 500; font-size: 15px; line-height: 1.35; margin: 0 0 4px; }
.post-card-first .post-box-title { font-family: var(--font-heading); font-size: 22px; font-weight: 400; letter-spacing: 0.01em; }
.post-box-title a { color: var(--heading); }
.post-box-title a:hover { color: var(--link-hover); }
.post-meta { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.post-meta a { color: var(--link); }
.post-excerpt { font-size: 13px; margin: 6px 0 0; }
.more-link {
  display: inline-block; margin-top: 8px; background: var(--accent-blue); color: #fff;
  font-size: 12px; font-weight: 500; padding: 7px 14px; border-radius: 3px;
}
.more-link:hover { background: var(--link-hover); color: #fff; }

/* ---------- archive / rubrika list ---------- */
.page-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.page-head h1 { font-size: 30px; margin: 0; }
.item-list { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--topbar-border); flex-wrap: wrap; }
.item-list .post-thumb { width: 220px; flex-shrink: 0; }
.item-list .item-body { flex: 1; min-width: 220px; }
.item-list .post-box-title { font-family: var(--font-heading); font-size: 21px; font-weight: 400; }

.pagination { display: flex; gap: 8px; align-items: center; margin-top: 18px; font-size: 13px; }
.pagination a, .pagination .page-item-current { padding: 5px 10px; border: 1px solid var(--card-border); border-radius: 3px; }
.pagination .page-item-current { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

/* ---------- share pills (decorative, non-linking) ---------- */
.share-row { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.share-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  color: #fff; font-size: 13px; font-weight: 500; border-radius: 3px;
}
.share-pill.facebook { background: #3b5998; }
.share-pill.twitter { background: #4eaee6; }
.share-pill.linkedin { background: #0077b5; }
.share-pill.pinterest { background: #e60023; }

/* ---------- single article ---------- */
.post { max-width: var(--content-width); }
.post-title { font-size: 30px; margin-bottom: 10px; }
.post-meta-line { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.post-meta-line a { color: var(--link); }
.post-image { margin-bottom: 4px; background: #eee; }
.post-image img { width: 100%; height: auto; }
.entry { font-size: 16px; line-height: 1.8; }
.entry p { margin: 0 0 16px; }
.entry p:first-of-type { font-weight: 500; color: var(--heading); }
.entry strong { color: var(--heading); }

.telegram-cta {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-blue); color: #fff;
  padding: 9px 16px; border-radius: 3px; font-size: 13px; font-weight: 500; margin: 6px 0 18px;
}

.tag-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tag-pills .tag-label { font-size: 12px; color: var(--muted); }
.tag-pills span.tag { font-size: 12px; padding: 4px 10px; background: #f2f2f2; border-radius: 12px; color: var(--text); }

section.related-posts { margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--topbar-border); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.related-item .post-thumb { aspect-ratio: 16/9; margin-bottom: 8px; }
.related-item h3 { font-size: 14px; font-weight: 500; font-family: var(--font-body); margin: 0 0 4px; }
.related-item h3 a { color: var(--heading); }
.related-item h3 a:hover { color: var(--link-hover); }
.related-item .post-date { font-size: 12px; color: var(--muted); }

/* ---------- comment box (decorative, no backend) ---------- */
.comment-box { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--topbar-border); }
.comment-box h3 { font-size: 20px; }
.comment-box form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin-top: 14px; }
.comment-box label { font-size: 13px; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.comment-box textarea, .comment-box input {
  border: 1px solid var(--card-border); padding: 10px; font-family: var(--font-body); font-size: 13px; border-radius: 2px;
}
.comment-box textarea { min-height: 120px; resize: vertical; }
.comment-box button {
  align-self: flex-start; background: var(--accent-blue); color: #fff; border: none;
  padding: 9px 20px; border-radius: 3px; font-size: 13px; cursor: pointer;
}
.comment-box button:hover { background: var(--link-hover); }

/* ---------- sidebar widgets ---------- */
.widget { margin-bottom: 22px; }
.widget-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.widget-top h4 { font-size: 18px; margin: 0; }
.widget-container ul li { padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.widget-container ul li a { color: var(--heading); }
.widget-container ul li a:hover { color: var(--link-hover); }

.widget-donate { background: #fafafa; border: 1px solid var(--card-border); padding: 14px; }
.widget-donate p { font-size: 13px; margin: 8px 0 12px; }
.btn-support { display: inline-block; background: var(--accent-red); color: #fff; padding: 8px 16px; border-radius: 3px; font-family: var(--font-heading); letter-spacing: 0.03em; }
.btn-support:hover { background: var(--accent-blue); color: #fff; }

.widget-telegram-box { display: flex; align-items: center; gap: 8px; background: var(--accent-blue); color: #fff; padding: 10px; font-size: 13px; }

.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud span { font-size: 11px; padding: 3px 8px; background: #f2f2f2; border-radius: 3px; color: var(--text); }

.widget-social .social-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.widget-social .social-icons span { padding: 6px 10px; background: #f7f7f7; border: 1px solid var(--card-border); border-radius: 3px; font-size: 12px; color: var(--muted); }

/* ---------- authors ---------- */
.page-list, .page-authors-container { display: flex; flex-direction: column; gap: 14px; }
.page-item { display: flex; gap: 16px; padding: 14px; border: 1px solid var(--card-border); color: var(--text); }
.page-item:hover { border-color: var(--accent-blue); }
.page-item:hover .page-title { color: var(--link-hover); }
.page-image { width: 200px; flex-shrink: 0; aspect-ratio: 16/10; background: #eee; overflow: hidden; }
.page-image img { width: 100%; height: 100%; object-fit: cover; }
.page-content { flex: 1; min-width: 0; }
.page-title { font-family: var(--font-body); font-weight: 500; font-size: 17px; color: var(--heading); margin-bottom: 6px; }
.page-description { font-size: 13px; margin: 0 0 8px; }
.page-date { font-size: 12px; color: var(--muted); margin: 0; }

.single-author-box { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--card-border); margin-bottom: 24px; }
.single-author-icon img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.author-posts h1 { font-size: 20px; margin-bottom: 12px; }

/* ---------- search ---------- */
.loading-container { text-align: center; padding: 20px; }
.search-loading { display: none; }
.search-results-empty { color: var(--muted); text-align: center; padding: 20px; }
mark { background: #fff3b0; color: inherit; padding: 0 2px; }

/* ---------- footer ---------- */
.theme-footer { background: #fff; margin-top: 34px; border-top: 8px solid var(--accent-blue); }
.footer-inner { padding: 30px 14px 18px; }
.footer-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.footer-col-title { font-size: 16px; margin-bottom: 10px; color: var(--heading); }
.footer-col-title a { color: var(--heading); }
.footer-article-list { display: flex; flex-direction: column; gap: 6px; }
.footer-article-item a { color: var(--link); font-size: 13px; }
.footer-article-item a:hover { color: var(--link-hover); }
.footer-divider { border: none; border-top: 1px solid var(--topbar-border); margin: 22px 0 0; }
.footer-bottom { background: var(--nav-bg); padding: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.footer-bottom p { margin: 0; font-size: 12px; color: #999; }
.footer-bottom .social-icons span { color: #999; font-size: 12px; }

/* ---------- 404 / generic page ---------- */
#main-content h1 { font-size: 26px; }

/* ---------- load more ---------- */
.button-container { text-align: center; margin-top: 22px; }
#load-more { background: var(--accent-blue); color: #fff; border: none; padding: 10px 24px; font-family: var(--font-heading); font-size: 15px; letter-spacing: 0.03em; cursor: pointer; }
#load-more:hover { background: var(--link-hover); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .content-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card-main { grid-column: span 2; height: 220px; }
  .cat-box-content { grid-template-columns: 1fr; }
  .post-card-first .post-thumb { width: 160px; }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .top-menu { display: none; }
  .main-menu { overflow-x: auto; flex-wrap: nowrap; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .item-list .post-thumb { width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
  .page-image { width: 120px; }
}
