/* Ecser Municipality Portal - CSS Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* CSS Variables & Tokens */
:root {
  /* Colors - Light Theme */
  --primary: hsl(142, 55%, 20%);
  --primary-light: hsl(142, 45%, 28%);
  --primary-dark: hsl(142, 65%, 12%);
  --accent: hsl(43, 90%, 50%);
  --accent-light: hsl(43, 100%, 62%);
  --accent-dark: hsl(43, 85%, 40%);
  --bg-base: hsl(210, 20%, 97%);
  --bg-surface: hsl(0, 0%, 100%);
  --bg-surface-glass: rgba(255, 255, 255, 0.75);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-glow: rgba(142, 55%, 20%, 0.15);
  
  --text-base: hsl(210, 24%, 15%);
  --text-muted: hsl(210, 10%, 45%);
  --text-on-primary: hsl(0, 0%, 100%);
  
  --success: hsl(142, 70%, 40%);
  --danger: hsl(0, 75%, 50%);
  --warning: hsl(35, 90%, 55%);
  
  /* Layout & Sizing */
  --container-width: 1280px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 30px -4px rgba(0, 0, 0, 0.06), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 50px -12px rgba(10, 20, 15, 0.12);
  --shadow-glow: 0 0 20px rgba(142, 55%, 20%, 0.1);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
  --primary: hsl(142, 50%, 25%);
  --primary-light: hsl(142, 40%, 32%);
  --primary-dark: hsl(142, 60%, 15%);
  --accent: hsl(43, 90%, 55%);
  --accent-light: hsl(43, 100%, 65%);
  --accent-dark: hsl(43, 85%, 45%);
  --bg-base: hsl(210, 18%, 10%);
  --bg-surface: hsl(210, 16%, 14%);
  --bg-surface-glass: rgba(22, 26, 32, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(255, 255, 255, 0.12);
  
  --text-base: hsl(210, 20%, 94%);
  --text-muted: hsl(210, 10%, 65%);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 30px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 255, 255, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-base);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-glow);
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Reusable Components & Layout Utility */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass-panel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-glow);
}

/* Header & Navigation */
header.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition-normal), border var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, var(--accent) 0%, var(--primary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-badge.logo-badge-footer {
  width: 38px;
  height: 38px;
  padding: 2px;
}

.logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 700;
}

.logo-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

nav.main-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-row-primary {
  gap: 4px;
}

.nav-row-secondary {
  gap: 4px;
  border-top: 1px solid var(--border-color);
  padding-top: 6px;
  margin-top: 4px;
}

.nav-row-secondary .nav-link {
  font-size: 0.85rem;
  padding: 5px 10px;
}

.nav-row-secondary .dropdown-arrow {
  font-size: 0.6rem !important;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(142, 55%, 20%, 0.05);
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.05);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Controls style (Theme, Lang) */
.btn-control {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  font-size: 1.1rem;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-control:hover {
  background: var(--border-color-glow);
  transform: translateY(-2px);
}

.btn-control.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(142, 55%, 20%, 0.15);
}

body.dark-mode .btn-control.active {
  background: var(--primary);
  color: var(--text-base);
  border-color: var(--primary-light);
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

.lang-select-wrapper {
  position: relative;
}

.lang-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  padding-right: 28px;
}

.lang-select-wrapper::after {
  content: "▼";
  font-size: 0.6rem;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

/* Desktop Header Dynamic Menu Layout */
@media (min-width: 1101px) {
  .header-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo-section {
    order: 0;
  }

  nav.main-nav {
    order: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .nav-controls {
    order: 2;
  }

  .hamburger {
    display: flex !important;
    order: 3;
    margin-left: 16px;
    z-index: 102;
  }

  /* Secondary Nav Row displays as a dropdown menu under the Hamburger */
  .nav-row-secondary {
    display: none;
    position: absolute;
    top: calc(100% - 12px);
    right: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0;
    min-width: 240px;
    z-index: 1000;
    margin-top: 8px;
    border-top: none;
  }

  .nav-row-secondary.active {
    display: flex;
    animation: fadeIn var(--transition-fast) forwards;
  }

  .nav-row-secondary .nav-link {
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
  }

  .nav-row-secondary .nav-link:hover,
  .nav-row-secondary .nav-link.active {
    background: rgba(142, 55%, 20%, 0.05);
    color: var(--primary);
  }

  body.dark-mode .nav-row-secondary .nav-link:hover,
  body.dark-mode .nav-row-secondary .nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-light);
  }

  /* Flyout submenu for dropdowns inside the hamburger dropdown */
  .nav-row-secondary .nav-dropdown {
    position: relative;
  }

  .nav-row-secondary .dropdown-menu {
    left: auto;
    right: 100%;
    top: 0;
    margin-top: 0;
    margin-right: 8px;
    box-shadow: var(--shadow-lg);
  }

  /* Rotate dropdown arrow to indicate left flyout */
  .nav-row-secondary .dropdown-toggle .dropdown-arrow {
    transform: rotate(90deg);
    margin-left: 8px;
  }

  .nav-row-secondary .nav-dropdown:hover .dropdown-arrow {
    transform: rotate(90deg) scale(1.1);
  }
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 102;
}

.hamburger span {
  height: 2px;
  width: 100%;
  background: var(--text-base);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Dynamic Page Content Routing */
.page-section {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal) ease-in-out;
  padding: 60px 0;
}

.page-section.active {
  display: block;
  opacity: 1;
}

/* Hero Section */
.hero {
  position: relative;
  background: radial-gradient(circle at top right, rgba(142, 55%, 20%, 0.15) 0%, rgba(0, 0, 0, 0) 60%), var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 80px 48px;
  margin-bottom: 48px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.hero-content {
  max-width: 650px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 20px;
  animation: slideUp var(--transition-slow) forwards;
}

body.dark-mode .hero-title {
  color: var(--text-base);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  animation: slideUp var(--transition-slow) 0.1s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: slideUp var(--transition-slow) 0.2s forwards;
}

/* Buttons */
.btn {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 14px rgba(142, 55%, 20%, 0.2);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(142, 55%, 20%, 0.3);
}

.btn-secondary {
  background: var(--bg-base);
  color: var(--text-base);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color-glow);
  transform: translateY(-2px);
}

/* Floating Status Widget on Hero */
.hero-widget {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  padding: 30px;
  z-index: 2;
}

.widget-title {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.status-badge.open {
  background: rgba(142, 55%, 20%, 0.1);
  color: var(--primary);
}

body.dark-mode .status-badge.open {
  background: rgba(43, 90%, 55%, 0.2);
  color: var(--accent-light);
}

.status-badge.closed {
  background: rgba(220, 50%, 50%, 0.1);
  color: var(--danger);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.open .status-dot {
  background: var(--primary);
  animation: pulse 2s infinite;
}

body.dark-mode .status-badge.open .status-dot {
  background: var(--accent-light);
}

.status-badge.closed .status-dot {
  background: var(--danger);
}

.widget-hours {
  font-size: 0.9rem;
  color: var(--text-base);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* Grid & Section Header styling */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px auto;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 12px;
}

body.dark-mode .section-title {
  color: var(--text-base);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* News Section Cards */
.news-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.btn-filter {
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.btn-filter.active, .btn-filter:hover {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.news-img-container {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-img {
  transform: scale(1.05);
}

.news-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-card-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-base);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-summary {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-btn {
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .news-btn {
  color: var(--accent);
}

.news-btn i {
  transition: transform var(--transition-fast);
}

.news-card:hover .news-btn i {
  transform: translateX(4px);
}

/* Polgarmesteri Hivatal Layout */
.office-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.office-info-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.office-card {
  padding: 32px;
}

.office-card h3 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  color: var(--primary);
}

body.dark-mode .office-card h3 {
  color: var(--text-base);
}

/* Contact List Grid */
.contact-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(142, 55%, 20%, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

body.dark-mode .contact-item-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
}

.contact-item-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-item-value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Office Hours Table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr {
  border-bottom: 1px solid var(--border-color);
}

.hours-table tr:last-child {
  border-bottom: none;
}

.hours-table td {
  padding: 12px 0;
  font-weight: 500;
}

.hours-table td.day {
  color: var(--text-muted);
}

.hours-table td.time {
  text-align: right;
  font-weight: 600;
}

.hours-table tr.today {
  color: var(--primary);
  font-weight: 700;
}

body.dark-mode .hours-table tr.today {
  color: var(--accent-light);
}

/* Electronic administration callout */
.e-admin-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-md);
  margin-top: 32px;
  gap: 24px;
}

.e-admin-text {
  max-width: 60%;
}

.e-admin-text h3 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.e-admin-text p {
  color: rgba(255, 255, 255, 0.8);
}

.e-admin-banner .btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.e-admin-banner .btn-primary:hover {
  background: var(--accent-light);
}

/* Document Search & Files list */
.doc-search-container {
  margin-bottom: 24px;
  position: relative;
}

.doc-search-input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.doc-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142, 55%, 20%, 0.15);
}

.doc-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.doc-row:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.doc-type-icon {
  font-size: 1.5rem;
  color: var(--danger);
}

.doc-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.doc-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.doc-size {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-download {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  color: var(--primary);
  transition: all var(--transition-fast);
}

.doc-row:hover .btn-download {
  background: var(--primary);
  color: white;
}

/* Institutions layout */
.institutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.inst-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.inst-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.inst-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inst-name {
  font-size: 1.4rem;
  color: var(--text-base);
}

.inst-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.inst-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}

.inst-info-item i {
  color: var(--primary);
  margin-top: 4px;
  width: 16px;
  text-align: center;
}

body.dark-mode .inst-info-item i {
  color: var(--accent);
}

.inst-info-label {
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

/* Tourism / Attractions */
.tourism-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 60px;
}

.tourism-intro-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  height: 380px;
}

.tourism-intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tourism-intro-text h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

body.dark-mode .tourism-intro-text h3 {
  color: var(--text-base);
}

.tourism-intro-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.sights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.sight-card {
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sight-img {
  height: 240px;
  overflow: hidden;
}

.sight-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.sight-card:hover .sight-img img {
  transform: scale(1.05);
}

.sight-body {
  padding: 24px;
  flex-grow: 1;
}

.sight-name {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--primary);
}

body.dark-mode .sight-name {
  color: var(--text-base);
}

.sight-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.sight-card-link {
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.sight-card-link:hover {
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent);
}

.sight-more-link {
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.sight-card-link:hover .sight-more-link {
  color: var(--accent) !important;
}

body.dark-mode .sight-card-link:hover .sight-more-link {
  color: var(--accent-light) !important;
}

/* Contact Layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-form {
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(142, 55%, 20%, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Styled map box */
.map-container {
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.map-placeholder {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--bg-base) 20%, var(--border-color) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.map-marker {
  font-size: 2.5rem;
  color: var(--danger);
  animation: bounce 2s infinite;
}

.map-text {
  font-weight: 600;
  margin-top: 12px;
  font-size: 0.95rem;
}

.form-status {
  padding: 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
  display: none;
  animation: fadeIn var(--transition-fast) forwards;
}

.form-status.success {
  background: rgba(142, 55%, 20%, 0.1);
  color: var(--primary);
  border: 1px solid rgba(142, 55%, 20%, 0.2);
}

body.dark-mode .form-status.success {
  background: rgba(43, 90%, 55%, 0.2);
  color: var(--accent-light);
  border: 1px solid rgba(43, 90%, 55%, 0.3);
}

.form-status.error {
  background: rgba(220, 50%, 50%, 0.1);
  color: var(--danger);
  border: 1px solid rgba(220, 50%, 50%, 0.2);
}

/* Footer styling */
footer.main-footer {
  background: hsl(210, 24%, 12%);
  color: hsl(210, 20%, 90%);
  padding: 80px 0 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode footer.main-footer {
  background: hsl(210, 20%, 6%);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo-title {
  font-size: 1.8rem;
  color: white;
}

.footer-logo-subtitle {
  font-size: 0.8rem;
  color: hsl(210, 10%, 65%);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-description {
  color: hsl(210, 10%, 65%);
  font-size: 0.95rem;
  max-width: 400px;
}

.footer-heading {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

.footer-links-list a {
  color: hsl(210, 10%, 65%);
}

.footer-links-list a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: hsl(210, 10%, 55%);
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(142, 55%, 20%, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(142, 55%, 20%, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(142, 55%, 20%, 0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-12px);
  }
  60% {
    transform: translateY(-6px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Representatives Section CSS */
.rep-grid-container {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 40px;
  margin-bottom: 60px;
}

.rep-mayor-card {
  padding: 40px;
  text-align: center;
}

.rep-avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 24px auto;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--bg-surface);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.rep-mayor-card:hover .rep-avatar-img {
  transform: scale(1.05);
  border-color: var(--accent);
}

.rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.rep-card {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rep-card-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--bg-surface);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.rep-card:hover .rep-card-avatar {
  transform: scale(1.05);
  border-color: var(--accent);
}

.rep-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-base);
}

.rep-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode .rep-role {
  color: var(--accent-light);
}

.committee-section {
  margin-top: 60px;
}

.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.committee-card {
  padding: 30px;
}

.committee-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.dark-mode .committee-title {
  color: var(--text-base);
}

.committee-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.committee-member {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
  font-size: 0.95rem;
}

.committee-member span {
  font-weight: 500;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .rep-grid-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero {
    padding: 60px 32px;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-widget {
    position: static;
    transform: none;
    margin-top: 40px;
    width: 100%;
  }
  .office-grid, .tourism-intro, .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .tourism-intro-img {
    height: 280px;
    order: 2;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .header-container {
    height: 70px;
  }
  .logo-title {
    font-size: 1.15rem;
  }
  nav.main-nav {
    display: none; /* Mobile menu toggled by js */
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px 20px;
    gap: 0;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  nav.main-nav.mobile-active {
    display: flex;
  }

  .nav-row {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .nav-row-secondary {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
  }

  .nav-row-secondary::before {
    content: "Közérdekű";
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 4px 16px 8px;
    opacity: 0.7;
  }

  .nav-row-secondary .nav-link {
    font-size: 0.95rem;
    padding: 8px 16px;
  }

  .hamburger {
    display: flex;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .e-admin-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  .e-admin-text {
    max-width: 100%;
  }
  .rep-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
  .rep-card {
    padding: 16px;
  }
  .rep-card-avatar {
    width: 80px;
    height: 80px;
  }
}

/* Office Leaders & Staff Styling */
.office-leaders-section {
  margin-bottom: 48px;
}

.office-sub-title {
  font-size: 2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
}

body.dark-mode .office-sub-title {
  color: var(--text-base);
}

.office-leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.office-leader-card {
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.leader-avatar-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 0 auto 24px auto;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--bg-surface);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.office-leader-card:hover .leader-avatar-placeholder {
  transform: scale(1.05);
  border-color: var(--accent);
}

.office-staff-section {
  margin-top: 60px;
  margin-bottom: 60px;
}

.office-staff-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.staff-dept-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.staff-dept-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.dark-mode .staff-dept-title {
  color: var(--text-base);
}

.staff-members-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.staff-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

.staff-member-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.staff-member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-member-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-base);
}

.staff-member-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode .staff-member-role {
  color: var(--accent-light);
}

.staff-member-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staff-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.staff-phone-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.staff-phone-link:hover {
  color: var(--primary);
}

body.dark-mode .staff-phone-link:hover {
  color: var(--accent);
}

.staff-ext-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--border-color-glow);
  color: var(--text-muted);
}

.staff-email-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  color: var(--primary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.staff-email-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

body.dark-mode .staff-email-btn {
  color: var(--accent-light);
}

body.dark-mode .staff-email-btn:hover {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

/* Lunch Break Status Badge Styling */
.status-badge.lunch {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-badge.lunch .status-dot {
  background: var(--warning);
  animation: pulse-lunch 2s infinite;
}

@keyframes pulse-lunch {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* ==========================================
   Navigation Dropdown & Public Interest Sections
   ========================================== */

/* Dropdown Menu styling */
.nav-dropdown {
  position: relative;
}

.nav-link.dropdown-toggle {
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-arrow {
  font-size: 0.65rem;
  transition: transform var(--transition-fast);
  margin-left: 2px;
}

.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-surface);
  min-width: 260px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  margin-top: 8px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Ensure the secondary row dropdowns open upward if near bottom */
.nav-row-secondary .dropdown-menu {
  min-width: 280px;
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-base);
  transition: background var(--transition-fast), color var(--transition-fast), padding-left var(--transition-fast);
}

.dropdown-item:hover, .dropdown-item.active {
  background: rgba(142, 55%, 20%, 0.05);
  color: var(--primary);
  padding-left: 24px;
}

body.dark-mode .dropdown-item:hover, body.dark-mode .dropdown-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-light);
}

/* Civil Organizations Section */
.civil-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.civil-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.civil-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.civil-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--border-color-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

body.dark-mode .civil-card-icon {
  color: var(--accent-light);
}

.civil-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

body.dark-mode .civil-card-title {
  color: var(--text-base);
}

.civil-card-info {
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.civil-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-grow: 1;
  line-height: 1.5;
}

/* Health Care Section */
.health-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
}

.health-emergency-card {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px;
  border-left: 5px solid var(--accent);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, rgba(0,0,0,0) 100%), var(--bg-surface);
}

.emergency-icon {
  font-size: 3rem;
  color: var(--accent);
  animation: pulse-lunch 2s infinite;
}

.emergency-details h3 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 8px;
}

body.dark-mode .emergency-details h3 {
  color: var(--text-base);
}

.emergency-details p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.health-main-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 30px;
}

.health-gps-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.health-gps-card {
  padding: 30px;
}

.gps-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.gps-doctor {
  font-size: 1.4rem;
  color: var(--primary);
}

body.dark-mode .gps-doctor {
  color: var(--text-base);
}

.gps-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--border-color-glow);
  color: var(--primary);
}

body.dark-mode .gps-badge {
  color: var(--accent-light);
}

.gps-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.gps-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.95rem;
}

.gps-timetable {
  font-size: 0.85rem;
  width: 100%;
  border-collapse: collapse;
}

.gps-timetable td {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
}

.gps-timetable td.day {
  font-weight: 700;
  color: var(--text-muted);
  width: 100px;
}

.gps-timetable td.time {
  text-align: right;
  font-family: inherit;
}

.health-side-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.health-side-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.health-side-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Churches Section */
.churches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.church-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.church-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, var(--primary) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.church-name {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 12px;
}

body.dark-mode .church-name {
  color: var(--text-base);
}

.church-details {
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.church-hours {
  font-size: 0.9rem;
  background: var(--bg-base);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: auto;
  line-height: 1.5;
}

/* Transportation Section */
.transport-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
}

.transport-widget {
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.transport-widget h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 12px;
}

body.dark-mode .transport-widget h3 {
  color: var(--text-base);
}

.widget-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.transport-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.info-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card .card-icon {
  font-size: 2.2rem;
  color: var(--primary);
}

body.dark-mode .info-card .card-icon {
  color: var(--accent);
}

.info-card h3 {
  font-size: 1.4rem;
  color: var(--primary);
}

body.dark-mode .info-card h3 {
  color: var(--text-base);
}

.info-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

/* EKO Kft. Section */
.eko-container {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 30px;
  margin-top: 40px;
}

.eko-profile {
  padding: 40px;
}

.eko-tasks-card {
  padding: 40px;
}

.eko-tasks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.eko-tasks-list li {
  display: flex;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
}

.eko-tasks-list li i {
  color: var(--primary);
  margin-top: 4px;
}

body.dark-mode .eko-tasks-list li i {
  color: var(--accent);
}

/* Phone Numbers Table */
.phone-table-wrapper {
  margin-top: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.phone-table tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

.phone-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.phone-table tbody tr:hover {
  background: rgba(142, 55%, 20%, 0.02);
}

body.dark-mode .phone-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.phone-table td {
  padding: 16px 20px;
  font-size: 0.95rem;
}

.phone-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.phone-category-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.phone-category-badge.emergency {
  background: rgba(220, 38, 38, 0.1);
  color: hsl(0, 75%, 50%);
}

.phone-category-badge.utilities {
  background: rgba(37, 99, 235, 0.1);
  color: hsl(220, 75%, 55%);
}

.phone-category-badge.local {
  background: rgba(142, 55%, 20%, 0.1);
  color: var(--primary);
}

body.dark-mode .phone-category-badge.local {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-light);
}

.phone-link {
  font-weight: 700;
  font-family: inherit;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .phone-link {
  color: var(--accent);
}

.phone-link:hover {
  text-decoration: underline;
}

/* ==========================================
   Responsive Overrides for Dropdown Menu & New Layouts
   ========================================== */

@media (max-width: 1024px) {
  .health-main-grid, .eko-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 1100px) {
  /* Navigation dropdown structure adaptation in mobile menu */
  .nav-dropdown {
    width: 100%;
  }

  .nav-link.dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 10px 16px;
  }

  /* On mobile, disable hover-based dropdown and use click-toggle */
  .nav-dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
  }

  .dropdown-menu {
    position: static;
    display: none;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0.02);
    padding-left: 20px;
    margin-top: 0;
    width: 100%;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    min-width: unset;
  }

  .dropdown-menu::before {
    display: none;
  }

  body.dark-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.02);
  }

  .nav-dropdown.active .dropdown-menu {
    display: block;
  }

  .nav-dropdown:hover .dropdown-arrow {
    transform: none;
  }

  .nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
  }

  .dropdown-arrow {
    transition: transform var(--transition-fast);
  }

  .dropdown-item {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .dropdown-item:hover {
    padding-left: 20px;
  }

  /* Layout refinements */
  .health-emergency-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }

  .gps-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .transport-info-grid {
    grid-template-columns: 1fr;
  }

  .phone-table th:nth-child(2), .phone-table td:nth-child(2) {
    text-align: right;
  }

  .phone-name-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ====================================================
   Tourism Tabs & Monograph Reader Styles
   ==================================================== */
.tourism-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.btn-tab {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-tab:hover {
  background: var(--bg-base);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-tab.active {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(142, 55%, 20%, 0.15);
}

body.dark-mode .btn-tab.active {
  background: var(--primary);
  color: var(--text-base);
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

/* Monograph & Wedding Two-Column Layout */
.monograph-reader-container,
.wedding-reader-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar / Table of Contents */
.monograph-sidebar,
.wedding-sidebar {
  padding: 24px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.monograph-sidebar::-webkit-scrollbar,
.wedding-sidebar::-webkit-scrollbar {
  width: 6px;
}
.monograph-sidebar::-webkit-scrollbar-thumb,
.wedding-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.sidebar-title {
  font-size: 1.3rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

body.dark-mode .sidebar-title {
  color: var(--text-base);
}

/* Mobile Chapter Selector (hidden by default on desktop) */
.monograph-mobile-select-wrapper,
.wedding-mobile-select-wrapper {
  display: none;
}

.monograph-chapter-list,
.wedding-chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.monograph-chapter-item,
.wedding-chapter-item {
  display: block;
}

.monograph-chapter-link,
.wedding-chapter-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.monograph-chapter-link:hover,
.wedding-chapter-link:hover {
  background: rgba(142, 55%, 20%, 0.05);
  color: var(--primary);
  padding-left: 16px;
}

body.dark-mode .monograph-chapter-link:hover,
body.dark-mode .wedding-chapter-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.monograph-chapter-link.active,
.wedding-chapter-link.active {
  background: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
  padding-left: 16px;
}

body.dark-mode .monograph-chapter-link.active,
body.dark-mode .wedding-chapter-link.active {
  background: var(--primary-light);
  color: var(--text-base);
}

/* Book Content Viewer */
.monograph-viewer,
.wedding-viewer {
  padding: 48px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#monograph-text-area,
#wedding-text-area {
  animation: fadeIn var(--transition-normal) forwards;
}

/* Font styling for book reading */
#monograph-text-area h2,
#wedding-text-area h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

body.dark-mode #monograph-text-area h2,
body.dark-mode #wedding-text-area h2 {
  color: var(--text-base);
}

#monograph-text-area .chapter-subtitle,
#wedding-text-area .chapter-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode #monograph-text-area .chapter-subtitle,
body.dark-mode #wedding-text-area .chapter-subtitle {
  color: var(--accent);
}

#monograph-text-area p,
#wedding-text-area p {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  color: var(--text-base);
  text-align: justify;
}

#monograph-text-area .monograph-preface-author,
#wedding-text-area .wedding-preface-author {
  margin-top: 32px;
  text-align: right;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
}

#monograph-text-area .monograph-bibliography-list,
#wedding-text-area .wedding-acknowledgements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

#monograph-text-area .monograph-bibliography-list li,
#wedding-text-area .wedding-acknowledgements-list li {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.02);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1rem;
}

body.dark-mode #monograph-text-area .monograph-bibliography-list li,
body.dark-mode #wedding-text-area .wedding-acknowledgements-list li {
  background: rgba(255, 255, 255, 0.02);
}

/* Title Page styling */
.monograph-title-page,
.wedding-title-page {
  text-align: center;
  padding: 40px 0;
}

.monograph-title-page h1,
.wedding-title-page h1 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 16px;
}

body.dark-mode .monograph-title-page h1,
body.dark-mode .wedding-title-page h1 {
  color: var(--text-base);
}

.monograph-title-page .monograph-author,
.wedding-title-page .wedding-author {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.monograph-title-page .monograph-meta,
.wedding-title-page .wedding-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 48px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

/* Next/Prev Navigation Buttons */
.monograph-nav-buttons,
.wedding-nav-buttons {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding-top: 24px;
  gap: 16px;
}

.monograph-nav-buttons .btn,
.wedding-nav-buttons .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* Responsive Overrides for Monograph & Wedding */
@media (max-width: 992px) {
  .monograph-reader-container,
  .wedding-reader-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .monograph-sidebar,
  .wedding-sidebar {
    position: static;
    max-height: none;
    width: 100%;
    padding: 20px;
  }
  
  .monograph-chapter-list,
  .wedding-chapter-list {
    display: none; /* Hide on mobile/tablet to favor select dropdown */
  }
  
  .monograph-mobile-select-wrapper,
  .wedding-mobile-select-wrapper {
    display: block;
    width: 100%;
  }
  
  .monograph-mobile-select-wrapper select,
  .wedding-mobile-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .monograph-viewer,
  .wedding-viewer {
    padding: 24px;
  }
}

/* ====================================================
   Desktop Header Intermediate Responsiveness
   ==================================================== */
@media (min-width: 1101px) {
  /* Let .nav-row-primary wrap during width checks, JavaScript will adjust placement */
}

@media (min-width: 1101px) and (max-width: 1280px) {
  .nav-link {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  .logo-title {
    font-size: 1.25rem;
  }
  .logo-subtitle {
    font-size: 0.7rem;
  }
  .nav-controls {
    gap: 8px;
  }
}

