/* === Balabolka.net — News aggregator theme === */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --accent: #e53935;
  --accent-hover: #c62828;
  --border: rgba(0,0,0,.08);
  --header-bg: #1a1a2e;
  --header-text: #f8f9fa;
  --maxw: 1060px;
}

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

html, body {
  margin: 0;
  padding: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

/* === Header === */
.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.site-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--header-text);
  letter-spacing: -.3px;
  text-decoration: none;
}
.site-logo span { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(248,249,250,.75);
  font-size: .85rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.site-nav a:hover {
  background: rgba(229,57,53,.25);
  color: #fff;
  text-decoration: none;
}

/* === Layout === */
.site-wrap { padding: 24px 0 40px; }

/* === Article cards (list/home) === */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.postlist { display: grid; gap: 14px; }

.postcard { overflow: hidden; }
.postcard__body { padding: 16px 18px; }
.postcard__section {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--accent);
  margin-bottom: 6px;
}
.postcard__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}
.postcard__title a { color: var(--text); }
.postcard__title a:hover { color: var(--accent); text-decoration: none; }
.postcard__meta {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.postcard__desc { margin: 8px 0 0; color: var(--text); opacity: .88; font-size: .95rem; }

/* === Article page === */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.article-card { padding: 28px 30px 32px; }

.article-header { margin-bottom: 20px; }
.article-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--accent);
  margin-bottom: 10px;
}
.article-title {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
}
.article-meta {
  font-size: .85rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body > * + * { margin-top: 1em; }
.article-body h2, .article-body h3, .article-body h4 {
  margin-top: 1.8em;
  margin-bottom: .5em;
  line-height: 1.3;
}
.article-body h2 { font-size: 1.4rem; }
.article-body h3 { font-size: 1.15rem; }
.article-body a { color: var(--accent); border-bottom: 1px solid rgba(229,57,53,.35); }
.article-body a:hover { border-bottom-color: var(--accent); text-decoration: none; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li { margin-bottom: .4em; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 16px;
  margin: 1.2em 0;
  background: rgba(229,57,53,.05);
  border-radius: 0 8px 8px 0;
  color: #374151;
}
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

/* === Related === */
.related-box {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.related-box h3 { margin: 0 0 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related-list li a { color: var(--text); font-size: .95rem; }
.related-list li a:hover { color: var(--accent); text-decoration: none; }

/* === Sidebar === */
.sidebar { position: sticky; top: 72px; }
.sidebar__box { padding: 14px 16px; margin-bottom: 16px; }
.sidebar__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  margin: 0 0 10px;
}
.sidebar__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sidebar__list a { color: var(--text); font-size: .9rem; }
.sidebar__list a:hover { color: var(--accent); text-decoration: none; }

/* === Homepage === */
.home-hero {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 32px 0 28px;
  margin-bottom: 28px;
  border-bottom: 3px solid var(--accent);
}
.home-hero h1 { margin: 0 0 8px; font-size: 1.75rem; font-weight: 800; }
.home-hero p { margin: 0; color: rgba(248,249,250,.7); font-size: 1rem; }

.section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

/* === List page === */
.list-header { margin-bottom: 24px; }
.list-header h1 { margin: 0 0 6px; font-size: 1.6rem; }
.list-header p { margin: 0; color: var(--muted); }

/* === Footer === */
.site-footer {
  background: var(--header-bg);
  color: rgba(248,249,250,.55);
  font-size: .82rem;
  padding: 22px 0;
  margin-top: 48px;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer a { color: rgba(248,249,250,.6); }
.site-footer a:hover { color: #fff; text-decoration: none; }

@media (max-width: 640px) {
  .article-title { font-size: 1.5rem; }
  .article-card { padding: 20px 16px 24px; }
  .home-hero { padding: 22px 0 18px; }
  .home-hero h1 { font-size: 1.35rem; }
}
