/* ======================================================
   Nezbavětice Web Redesign - 3 Clean Light Concepts
   ====================================================== */

/* ------------------------------------------------------
   THEME 1: Přírodní & Tradiční (Classic Green - Favorite)
   ------------------------------------------------------ */
:root, body[data-theme="nature"] {
  --primary-dark: #1b4332;
  --primary-medium: #2d6a4f;
  --primary-light: #40916c;
  --primary-accent: #52b788;
  --accent-gold: #e9c46a;
  --accent-warm: #f4a261;
  --accent-alert: #e76f51;

  --bg-main: #f8f9fa;
  --bg-card: #ffffff;
  --bg-subtle: #edf2f4;

  --text-main: #1d2d44;
  --text-muted: #6c757d;
  --text-light: #ffffff;

  --font-family: 'Inter', system-ui, sans-serif;
  --hero-bg: linear-gradient(135deg, rgba(27, 67, 50, 0.92), rgba(45, 106, 79, 0.88)),
             url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  --card-border: 1px solid rgba(0, 0, 0, 0.05);
  --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
}

/* ------------------------------------------------------
   THEME 2: Světlá Moderní Elegance (Čistý Modro-Bílý eGov)
   ------------------------------------------------------ */
body[data-theme="egov"] {
  --primary-dark: #1e3a8a;
  --primary-medium: #2563eb;
  --primary-light: #3b82f6;
  --primary-accent: #60a5fa;
  --accent-gold: #f59e0b;
  --accent-warm: #0284c7;
  --accent-alert: #ef4444;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #eff6ff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #ffffff;

  --font-family: 'Inter', system-ui, sans-serif;
  --hero-bg: linear-gradient(135deg, rgba(30, 58, 138, 0.94), rgba(37, 99, 235, 0.88)),
             url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  --card-border: 1px solid #e2e8f0;
  --card-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ------------------------------------------------------
   THEME 3: Světlý Teplý Terakot & Zahrada (Friendly Warm Light)
   ------------------------------------------------------ */
body[data-theme="community"] {
  --primary-dark: #7c2d12;
  --primary-medium: #c2410c;
  --primary-light: #ea580c;
  --primary-accent: #f97316;
  --accent-gold: #d97706;
  --accent-warm: #15803d;
  --accent-alert: #dc2626;

  --bg-main: #fafaf9;
  --bg-card: #ffffff;
  --bg-subtle: #fff7ed;

  --text-main: #292524;
  --text-muted: #78716c;
  --text-light: #ffffff;

  --font-family: 'Outfit', 'Inter', sans-serif;
  --hero-bg: linear-gradient(135deg, rgba(124, 45, 18, 0.92), rgba(194, 65, 12, 0.86)),
             url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  --card-border: 1px solid #f3f4f6;
  --card-shadow: 0 6px 18px rgba(194, 65, 12, 0.07);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}


/* ======================================================
   BASE STYLES & COMMON LAYOUT
   ====================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sticky Theme Switcher Bar */
.theme-switcher-bar {
  background-color: #0f172a;
  color: #ffffff;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--accent-gold);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.switcher-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.switcher-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}

.switcher-buttons {
  display: flex;
  gap: 10px;
}

.theme-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover, .theme-btn.active {
  background-color: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--primary-dark);
  color: var(--text-light);
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-info {
  display: flex;
  gap: 20px;
}

.top-bar-info a {
  color: #f1f5f9;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar-info a:hover {
  color: var(--accent-gold);
}

/* Header Navigation */
header {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--text-main);
}

.official-crest-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.mayor-avatar-img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-medium);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav Menu */
nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

nav a:hover, nav a.active {
  background-color: var(--bg-subtle);
  color: var(--primary-medium);
}

.nav-cta {
  background-color: var(--primary-medium) !important;
  color: var(--text-light) !important;
  font-weight: 600;
}

.nav-cta:hover {
  background-color: var(--primary-dark) !important;
}

/* Hero Section */
.hero {
  position: relative;
  background: var(--hero-bg);
  color: var(--text-light);
  padding: 80px 0 100px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: -50px;
  transition: background 0.3s ease;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 35px;
}

/* Search Box */
.search-box {
  background-color: var(--bg-card);
  border-radius: 50px;
  padding: 6px 8px 6px 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 100%;
  padding: 10px 0;
  color: var(--text-main);
  background: transparent;
}

.search-box button {
  background-color: var(--primary-medium);
  color: var(--text-light);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-box button:hover {
  background-color: var(--primary-dark);
}

/* Quick Actions Grid */
.quick-actions {
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.action-card {
  background-color: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s ease;
  border: var(--card-border);
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light);
}

.action-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--primary-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.action-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.action-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 35px;
  margin-bottom: 60px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background-color: var(--primary-medium);
  border-radius: 2px;
}

.view-all {
  color: var(--primary-medium);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 45px;
}

.news-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  border: var(--card-border);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.news-img {
  height: 170px;
  background-size: cover;
  background-position: center;
}

.news-body {
  padding: 20px;
}

.news-date {
  font-size: 0.8rem;
  color: var(--primary-medium);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

/* Official Board */
.board-box {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  margin-bottom: 45px;
}

.board-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--bg-subtle);
  margin-bottom: 20px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary-medium);
  border-bottom-color: var(--primary-medium);
}

.board-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-subtle);
}

.board-item:last-child {
  border-bottom: none;
}

.board-item-info h4 {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.board-item-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active {
  background-color: var(--bg-subtle);
  color: var(--primary-medium);
}

.badge-urgent {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--accent-alert);
}

/* Sidebar Widgets */
.sidebar-widget {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 30px;
  border: var(--card-border);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mayor-card {
  display: flex;
  gap: 15px;
  align-items: center;
}

.mayor-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-subtle);
  background-image: url('https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&w=200&q=80');
  background-size: cover;
}

.mayor-details h4 { font-size: 1rem; font-weight: 700; }
.mayor-details p { font-size: 0.85rem; color: var(--text-muted); }

.waste-list { list-style: none; }
.waste-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--bg-subtle);
}

.waste-type { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-communal { background-color: #475569; }
.dot-plastic { background-color: #f59e0b; }
.dot-paper { background-color: #3b82f6; }

.waste-date { font-size: 0.82rem; color: var(--text-muted); }

.report-banner {
  background: linear-gradient(135deg, var(--primary-medium), var(--primary-dark));
  color: var(--text-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.report-banner h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.report-banner p { font-size: 0.88rem; margin-bottom: 18px; }

.btn-report {
  background-color: var(--accent-gold);
  color: #0f172a;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-report:hover { transform: scale(1.03); }

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center; align-items: center;
  z-index: 2000;
}

.modal-overlay.active { display: flex; }
.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 500px; width: 90%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  position: relative;
  border: var(--card-border);
}

.modal-close {
  position: absolute; top: 15px; right: 20px;
  background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: var(--text-muted);
}

.modal-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--text-main); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px;
  border: 1px solid var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; outline: none;
  background: var(--bg-main); color: var(--text-main);
}

.btn-submit {
  width: 100%; background: var(--primary-medium); color: white;
  border: none; padding: 12px; border-radius: var(--radius-sm);
  font-weight: 700; cursor: pointer; margin-top: 10px;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 60px 0 20px;
  transition: background-color 0.3s ease;
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}

.footer-col h4 { font-size: 1.1rem; color: var(--accent-gold); margin-bottom: 18px; }
.footer-col p, .footer-col li { color: #cbd5e1; font-size: 0.9rem; margin-bottom: 10px; }
.footer-col ul { list-style: none; }
.footer-col a { color: #cbd5e1; text-decoration: none; }
.footer-col a:hover { color: var(--text-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px; display: flex; justify-content: space-between;
  font-size: 0.82rem; color: #94a3b8;
}

@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav { display: none; }
  .hero h2 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .switcher-container { flex-direction: column; align-items: flex-start; }
}
