/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:       #b86b20;
  --accent-dark:  #8c4f15;
  --accent-light: #f5e6d3;
  --bg:           #faf8f5;
  --surface:      #ffffff;
  --text:         #2c2420;
  --text-muted:   #7a6a5e;
  --border:       #e8ddd4;
  --nav-h:        64px;

  /* category colours */
  --cat-zastupitelstvo: #2563eb;
  --cat-oznameni:       #b86b20;
  --cat-obcane:         #16a34a;
  --cat-rss:            #7c3aed;
  --cat-sokol:          #dc2626;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

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

img { max-width: 100%; height: auto; display: block; }

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(44, 36, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 2rem;
}

.navbar__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.navbar__brand span { font-size: 0.7rem; font-weight: 400; opacity: 0.75; }

.navbar__nav {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
  align-items: center;
}

.navbar__nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.navbar__nav a:hover,
.navbar__nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.navbar__admin-btn {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 0.4rem 0.9rem !important;
}
.navbar__admin-btn:hover { background: var(--accent-dark) !important; }

/* hamburger - mobile */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.navbar__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  height: 520px;
  margin-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero__subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-top: 0.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ─── Layout ────────────────────────────────────────────────── */
.page-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.page-main { min-width: 0; }

/* ─── Section titles ────────────────────────────────────────── */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── News cards ────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: 0 4px 20px rgba(184,107,32,0.15);
  transform: translateY(-2px);
}

.news-card__cat-bar {
  height: 4px;
  background: var(--cat-oznameni);
}
.news-card--zastupitelstvo .news-card__cat-bar { background: var(--cat-zastupitelstvo); }
.news-card--oznameni       .news-card__cat-bar { background: var(--cat-oznameni); }
.news-card--obcane         .news-card__cat-bar { background: var(--cat-obcane); }

.news-card__body {
  padding: 1rem 1.1rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge--zastupitelstvo { background: #dbeafe; color: #1d4ed8; }
.badge--oznameni       { background: #fef3c7; color: #92400e; }
.badge--obcane         { background: #dcfce7; color: #166534; }
.badge--rss            { background: #ede9fe; color: #5b21b6; }

.news-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.news-card__title a { color: inherit; }
.news-card__title a:hover { color: var(--accent); }

.news-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.news-card__footer {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar { min-width: 0; }

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.sidebar-widget__header {
  background: var(--accent-light);
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  border-bottom: 1px solid var(--border);
}

.sidebar-widget__body { padding: 0.75rem 1rem; }

/* quick links */
.quick-links { list-style: none; }
.quick-links li + li { border-top: 1px solid var(--border); }
.quick-links a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  color: var(--text);
  transition: color 0.15s, padding-left 0.15s;
}
.quick-links a:hover { color: var(--accent); padding-left: 4px; }

/* rss items */
.rss-list { list-style: none; }
.rss-list li + li { border-top: 1px solid var(--border); }
.rss-list a {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.35;
}
.rss-list a:hover { color: var(--accent); }
.rss-list__source {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ─── Page header (inner pages) ─────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #3b2a1e 0%, #5c3d22 100%);
  color: #fff;
  padding: 3rem 1.5rem 2.5rem;
  margin-top: var(--nav-h);
  text-align: center;
}
.page-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 800; }
.page-header p  { font-size: 0.95rem; opacity: 0.8; margin-top: 0.4rem; }

/* ─── Articles list (news page) ─────────────────────────────── */
.articles-list { display: flex; flex-direction: column; gap: 1.25rem; }

.article-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: box-shadow 0.2s;
}
.article-row:hover { box-shadow: 0 4px 20px rgba(184,107,32,0.12); }

.article-row__accent {
  width: 4px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 4px;
  background: var(--cat-oznameni);
}
.article-row--zastupitelstvo .article-row__accent { background: var(--cat-zastupitelstvo); }
.article-row--oznameni       .article-row__accent { background: var(--cat-oznameni); }
.article-row--obcane         .article-row__accent { background: var(--cat-obcane); }

.article-row__content { flex: 1; min-width: 0; }
.article-row__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.article-row__title a { color: var(--text); }
.article-row__title a:hover { color: var(--accent); }
.article-row__excerpt { font-size: 0.875rem; color: var(--text-muted); }
.article-row__meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ─── Article detail ────────────────────────────────────────── */
.article-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.5rem;
}
.article-detail h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; }
.article-detail__meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.article-detail__body { line-height: 1.75; font-size: 0.95rem; }
.article-detail__body p { margin-bottom: 1rem; }
.article-detail__body h2,
.article-detail__body h3 { margin: 1.5rem 0 0.5rem; font-weight: 700; }

/* ─── Documents page ────────────────────────────────────────── */
.doc-year-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.doc-year-tab {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-muted);
  transition: 0.15s;
}
.doc-year-tab:hover,
.doc-year-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.doc-list { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.15s;
}
.doc-item:hover { box-shadow: 0 2px 12px rgba(184,107,32,0.1); }
.doc-item__icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-item__info { flex: 1; min-width: 0; }
.doc-item__title { font-weight: 600; font-size: 0.9rem; }
.doc-item__meta  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.doc-item__dl {
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent-dark);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: 0.15s;
  text-decoration: none;
}
.doc-item__dl:hover { background: var(--accent); color: #fff; }

/* ─── Static info pages ─────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}
.info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--accent-dark); }
.info-card p, .info-card li { font-size: 0.875rem; color: var(--text-muted); }
.info-card ul { padding-left: 1.25rem; }
.info-card li { margin-bottom: 0.25rem; }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  color: var(--text);
  transition: 0.15s;
  text-decoration: none;
}
.pagination a:hover     { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
.pagination .current    { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.pagination .disabled   { opacity: 0.4; pointer-events: none; }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: #2c2420;
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer__col h4 { color: #fff; font-size: 0.9rem; margin-bottom: 0.75rem; font-weight: 700; }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 0.4rem; }
.footer__col a  { color: rgba(255,255,255,0.65); transition: color 0.15s; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ─── Flash messages ────────────────────────────────────────── */
.flash { padding: 0.85rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash--success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash--info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
}
.btn--primary   { background: var(--accent);       color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--secondary { background: var(--accent-light); color: var(--accent-dark); border: 1px solid var(--accent); }
.btn--secondary:hover { background: var(--accent); color: #fff; }
.btn--more {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
}
.btn--more:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Full-width content wrapper (no sidebar) ───────────────── */
.page-body--full {
  grid-template-columns: 1fr;
}
.page-body--full .page-main { max-width: 820px; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .page-body {
    grid-template-columns: 1fr;
  }
  .sidebar { order: -1; }

  .navbar__nav { display: none; }
  .navbar__toggle { display: block; }
  .navbar__nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(44,36,32,0.97);
    padding: 1rem;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .hero { height: 380px; }
  .hero__title { font-size: 1.5rem; }
  .news-grid { grid-template-columns: 1fr; }
  .article-detail { padding: 1.25rem; }
}
