/*
  Flat, minimal, professional design.
  No gradients, no shadows, no animations.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --hover: #f5f5f5;
  --text: #222;
  --muted: #666;
  --border: #e0e0e0;
  --accent: #111;
  --row-hover: #f5f5f5;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--hover);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.tab-link:hover {
  background: var(--card);
  color: var(--text);
}

.tab-link.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Header */
.header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

/* Desktop header - single line layout */
.desktop-header {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand:hover {
  color: var(--accent);
}

.logo-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-top: -8px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.main-nav a {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--border);
  color: var(--text);
}

.main-nav a.active {
  background: var(--accent);
  color: #fff;
}

.nav-divider {
  width: 1px;
  height: 1rem;
  background: var(--border);
  margin: 0 0.5rem;
}

.nav-secondary {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.nav-secondary:hover {
  color: var(--text);
}

.header-search {
  flex-shrink: 0;
}

.header-search .autocomplete-wrap {
  max-width: 200px;
}

.header-search .search-input {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}

/* Page headings for SEO */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.place-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.dienst-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.clear-filter {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.clear-filter:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Mobile header */
.mobile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.mobile-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-title:hover {
  color: var(--accent);
}

/* Search button */
.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}

.search-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.search-btn-mobile {
  margin-left: auto;
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
}

.search-modal.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.search-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-modal-title {
  font-weight: 600;
  font-size: 1rem;
}

.search-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.search-modal-close:hover {
  color: var(--text);
}

.search-modal-body {
  padding: 1.25rem;
}

.search-modal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-modal .autocomplete-list {
  position: relative;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.5rem;
  border: none;
  box-shadow: none;
}

.search-modal .autocomplete-item {
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

/* Menu toggle button (hamburger) */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text);
  border-radius: 1px;
}

/* Drawer overlay */
.drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.drawer-overlay.show {
  display: block;
}

/* Drawer menu */
.drawer-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1000;
  transition: left 0.25s ease;
  display: flex;
  flex-direction: column;
}

.drawer-menu.open {
  left: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.drawer-title:hover {
  color: var(--accent);
}

.drawer-close {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.drawer-close:hover {
  color: var(--text);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.drawer-search {
  padding: 0.75rem 1.25rem;
}

.drawer-search .autocomplete-wrap {
  max-width: 100%;
}

.drawer-search .search-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 16px; /* Prevent zoom on iOS */
}

.drawer-item {
  display: block;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.drawer-item:hover {
  background: var(--row-hover);
}

.drawer-item.active {
  background: var(--accent);
  color: #fff;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 1.25rem;
}

/* Legacy filter tabs - keep for backward compat */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
}

.filter-tabs a {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
}

.filter-tabs a:hover {
  background: var(--border);
  color: var(--text);
}

.filter-tabs a.active {
  background: var(--accent);
  color: #fff;
}

/* Table */
.incidents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.incidents-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* Column widths */
.incidents-table .col-tijd {
  width: 55px;
}

.incidents-table .col-prio {
  width: 75px;
}

.incidents-table .col-dienst {
  width: 120px;
}

.incidents-table .col-melding {
  width: auto;
}

.incidents-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.incidents-table tbody tr {
  cursor: pointer;
}

.incidents-table tbody tr:hover {
  background: var(--row-hover);
}

/* Unseen (new) incident indicator */
.incidents-table tbody tr.unseen .cell-time {
  color: var(--accent);
  font-weight: 700;
}

.incidents-table tbody tr.unseen {
  background: rgba(232, 97, 0, 0.05);
}

/* Cells */
.cell-time {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.cell-prio {
  white-space: nowrap;
}

.prio-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  width: 70px;
  text-align: center;
  white-space: nowrap;
}

.prio-tag.high {
  background: #d32f2f;
  color: #fff;
}

.prio-tag.medium {
  background: #f9a825;
  color: #000;
}

.prio-tag.low {
  background: #e0e0e0;
  color: #444;
}

.cell-dienst {
  white-space: nowrap;
  font-size: 0.8rem;
  min-width: 110px;
}

.dienst-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  width: 105px;
}

.dienst-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.dienst-brandweer {
  background: #ffebee;
  color: #c62828;
}

.dienst-politie {
  background: #e3f2fd;
  color: #1565c0;
}

.dienst-ambulance {
  background: #e8f5e9;
  color: #2e7d32;
}

.cell-msg {
  line-height: 1.4;
}

.cell-msg .title {
  font-weight: 500;
  color: var(--text);
}

.cell-msg .sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Search bar */
.search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.autocomplete-wrap {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: #aaa;
}

.autocomplete-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 100;
}

.autocomplete-list.show {
  display: block;
}

.autocomplete-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--row-hover);
}

.autocomplete-item mark {
  background: #fff3cd;
  padding: 0;
}

.clear-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.clear-btn:hover {
  color: var(--text);
}

/* Plaatsen link */
.plaatsen-link {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.plaatsen-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Detail View */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--text);
}

.detail-alert {
  padding: 1rem 1.25rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #856404;
}

.detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-tags {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.detail-time {
  font-size: 0.85rem;
  color: var(--muted);
}

.detail-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 1.25rem 1.5rem;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.detail-meta {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.meta-row {
  display: flex;
  padding: 0.5rem 0;
}

.meta-row:first-child {
  padding-top: 0;
}

.meta-row:last-child {
  padding-bottom: 0;
}

.meta-label {
  width: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.meta-value {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
}

.detail-map {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-map iframe {
  width: 100%;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.map-notice {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.map-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.map-link:hover {
  color: var(--text);
}

/* Expired/Not Found Incident Page */
.detail-expired {
  text-align: center;
  padding: 2rem 1.5rem;
}

.detail-expired .expired-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.detail-expired h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.detail-expired p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.expired-cta {
  padding: 1.5rem;
  text-align: center;
}

.expired-cta .btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.expired-cta .btn-primary:hover {
  background: #c0392b;
}

.detail-capcodes {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.capcodes-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.capcodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.capcode-item {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 4px;
  font-size: 0.85rem;
}

.capcode-code {
  font-family: monospace;
  font-weight: 500;
  color: var(--muted);
  min-width: 80px;
}

.capcode-desc {
  color: var(--text);
}

/* Incident description text */
.detail-description {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.detail-description h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.detail-description p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.detail-description p:last-child {
  margin-bottom: 0;
}

.detail-footer {
  padding: 1rem 1.5rem;
  text-align: right;
}

.detail-id {
  font-size: 0.75rem;
  color: #aaa;
  font-family: monospace;
}

/* Related incidents */
.related-section {
  margin-top: 2rem;
}

.related-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-item {
  display: block;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.related-item:hover {
  border-color: var(--muted);
}

.related-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.related-time {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
}

.related-item-title {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.related-item-plaats {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Header mobile */
  .header {
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  .header h1 {
    font-size: 1.1rem;
  }

  .header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  /* Filter tabs mobile - horizontal scroll */
  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .filter-tabs a {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  /* Search row mobile */
  .search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .autocomplete-wrap {
    max-width: 100%;
  }

  .search-input {
    padding: 0.6rem 0.75rem;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .clear-btn {
    text-align: center;
    padding: 0.4rem;
  }

  /* Table mobile - card layout */
  .incidents-table {
    display: block;
  }

  .incidents-table thead {
    display: none;
  }

  .incidents-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .incidents-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    gap: 0.5rem;
  }

  .incidents-table tbody tr:hover {
    background: #fff;
    border-color: var(--accent);
  }

  .incidents-table td {
    padding: 0;
    border: none;
  }

  .incidents-table td.cell-time {
    order: 1;
    font-size: 0.75rem;
  }

  .incidents-table td.cell-prio {
    order: 2;
  }

  .incidents-table td.cell-dienst {
    order: 3;
  }

  .incidents-table td.cell-msg {
    order: 4;
    width: 100%;
    margin-top: 0.25rem;
  }

  .cell-msg .title {
    font-size: 0.9rem;
  }

  .cell-msg .sub {
    font-size: 0.7rem;
  }

  .prio-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .dienst-tag {
    font-size: 0.75rem;
  }

  /* Page heading mobile */
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .place-title {
    font-size: 1.1rem;
  }

  .dienst-title {
    font-size: 1rem;
  }

  /* Detail view mobile */
  .detail-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }

  .detail-time {
    font-size: 0.8rem;
  }

  .detail-title {
    font-size: 1.1rem;
    padding: 1rem;
  }

  .detail-meta {
    padding: 0.75rem 1rem;
  }

  .meta-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .meta-label {
    width: auto;
    font-size: 0.7rem;
  }

  .meta-value {
    font-size: 0.85rem;
  }

  .detail-map {
    padding: 1rem;
  }

  .detail-map iframe {
    height: 180px;
  }

  .detail-capcodes {
    padding: 1rem;
  }

  .capcode-item {
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .capcode-code {
    min-width: auto;
    font-size: 0.75rem;
  }

  .capcode-desc {
    font-size: 0.8rem;
  }

  .back-link {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .mobile-title {
    font-size: 0.95rem;
  }

  .place-title {
    font-size: 1rem;
  }

  .incidents-table tbody tr {
    padding: 0.6rem;
  }

  .cell-msg .title {
    font-size: 0.85rem;
  }

  .detail-title {
    font-size: 1rem;
  }
}

.chart-wrap {
  position: relative;
}

.chart-bar {
  cursor: crosshair;
  transition: opacity 0.1s;
}
.chart-bar:hover {
  opacity: 1 !important;
}

.chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--text);
  color: var(--card);
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  transform: translate(-50%, -110%);
}

/* ===========================
   Detail hero photo
   =========================== */
.detail-hero-photo {
  margin: 0 -1.5rem 0;
  line-height: 0;
  border-bottom: 1px solid var(--border);
}

.detail-hero-photo img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* ===========================
   Place / Regio stats block
   =========================== */
.place-stats {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.stats-cards {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.5rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card.stat-brandweer { border-top: 3px solid #dc3545; }
.stat-card.stat-politie   { border-top: 3px solid var(--accent); }
.stat-card.stat-ambulance { border-top: 3px solid #f59e0b; }
.stat-card.stat-total     { border-top: 3px solid var(--muted); }

.stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.stat-lbl {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 0.2rem;
}

.chart-section {
  margin-top: 0.5rem;
}

.chart-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.4rem;
}

.hour-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ===========================
   Nearby incidents (detail)
   =========================== */
.nearby-section {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nearby-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.nearby-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.nearby-item:last-child { margin-bottom: 0; }
.nearby-item:hover { color: var(--accent); }

.nearby-item-msg {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nearby-time {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-divider {
  color: var(--border);
  font-size: 0.85rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Content pages (privacy, voorwaarden, contact) */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.content-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.content-page h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.content-page p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.content-page ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content-page li {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.content-page a {
  color: var(--accent);
}

.content-page a:hover {
  text-decoration: underline;
}

/* Contact form */
.contact-form {
  max-width: 500px;
  margin-top: 1.5rem;
}

.contact-form .form-label {
  font-weight: 500;
  font-size: 0.9rem;
}

.contact-form .form-control {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
}

.contact-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.contact-form .btn-primary {
  background: var(--accent);
  border: none;
  padding: 0.6rem 1.5rem;
  font-weight: 500;
  border-radius: 6px;
}

.contact-form .btn-primary:hover {
  background: #2563eb;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Pagination */
.pagination-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
}

.pagination-btn:hover:not(.disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination-btn.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

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

@media (max-width: 576px) {
  .pagination-nav {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
  }
  
  .pagination-info {
    order: -1;
    width: 100%;
    text-align: center;
  }
  
  .pagination-btn {
    flex: 1;
    justify-content: center;
    max-width: 140px;
  }
}

/* Detail page sidebar layout */
.detail-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.detail-main {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.detail-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
}

.sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  margin-bottom: 0.5rem;
}

.sidebar-links li:last-child {
  margin-bottom: 0;
}

.sidebar-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.sidebar-links a:hover {
  background: var(--hover);
  color: var(--accent);
}

.sidebar-btn {
  display: block;
  text-align: center;
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.sidebar-btn:hover {
  background: var(--accent);
  color: #fff;
}

.sidebar-ad {
  background: var(--hover);
}

.ad-placeholder {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
}

/* Sidebar responsive */
@media (max-width: 900px) {
  .detail-layout {
    flex-direction: column;
  }
  
  .detail-sidebar {
    width: 100%;
    position: static;
    order: 1;
    margin-top: 1.5rem;
  }
  
  .sidebar-widget {
    margin-bottom: 0.75rem;
  }
}

/* Horizontal sidebar for map page */
.map-sidebar-horizontal {
  margin-top: 1rem;
}

.map-sidebar-horizontal .sidebar-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.map-sidebar-horizontal .sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.sidebar-links-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links-horizontal li {
  margin: 0;
}

.sidebar-links-horizontal a {
  display: inline-block;
  background: var(--hover);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}

/* Politie Nieuws Sidebar Widget */
.sidebar-politie-nieuws {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.politie-nieuws-mini {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.politie-nieuws-item-mini {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.politie-nieuws-item-mini:hover {
  border-color: #1565c0;
  box-shadow: 0 2px 8px rgba(21, 101, 192, 0.1);
}

.nieuws-title-mini {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.nieuws-date-mini {
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar-btn-small {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
}

/* Sidebar Meldingen (styled like index.php table) */
.sidebar-widget-meldingen {
  background: var(--card);
}

.sidebar-meldingen-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sidebar-melding-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.sidebar-melding-row:last-child {
  border-bottom: none;
}

.sidebar-melding-row:hover {
  background: var(--row-hover);
}

.sidebar-melding-row .melding-dienst {
  flex-shrink: 0;
}

.sidebar-melding-row .dienst-tag {
  width: auto;
  min-width: 28px;
  padding: 0.25rem;
}

.sidebar-melding-row .dienst-icon {
  font-size: 1rem;
}

.sidebar-melding-row .melding-content {
  flex: 1;
  min-width: 0;
}

.sidebar-melding-row .melding-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.sidebar-melding-row .melding-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar-melding-row .melding-plaats {
  font-weight: 500;
}

.sidebar-melding-row .melding-tijd {
  opacity: 0.8;
}

/* Politie Nieuws Page */
.politie-news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.politie-news-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.politie-news-item:hover {
  border-color: #1565c0;
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.1);
}

.news-item-image {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--hover);
}

.news-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item-content {
  flex: 1;
  min-width: 0;
}

.news-item-meta {
  margin-bottom: 0.25rem;
}

.news-item-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.news-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.news-item-desc {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

/* Politie Article Detail */
.politie-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.article-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.article-source {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1565c0;
}

.article-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

.article-image {
  margin-bottom: 1.25rem;
  border-radius: 8px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-cta {
  margin-bottom: 1.5rem;
}

.btn-politie {
  display: inline-block;
  background: #1565c0;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-politie:hover {
  background: #0d47a1;
  color: #fff;
}

.article-disclaimer {
  padding: 1rem;
  background: var(--hover);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.article-disclaimer p {
  margin: 0;
}

.article-disclaimer a {
  color: #1565c0;
}

@media (max-width: 768px) {
  .politie-news-item {
    flex-direction: column;
  }
  
  .news-item-image {
    width: 100%;
    height: 160px;
  }
  
  .article-title {
    font-size: 1.25rem;
  }
}

/* Traffic jams sidebar widget */
.sidebar-verkeer .sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.verkeer-total {
  font-size: 0.75rem;
  background: #d32f2f;
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.verkeer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.verkeer-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.verkeer-item:hover {
  background: var(--hover);
}

.verkeer-road {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.2rem 0.4rem;
  background: #d32f2f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  flex-shrink: 0;
}

.verkeer-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.verkeer-title {
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text);
}

.verkeer-km {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

/* Verkeer page styles */
.verkeer-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.verkeer-header h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.verkeer-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 0.75rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  background: var(--hover);
}

.stat-item.stat-total {
  background: #d32f2f;
  color: #fff;
}

.stat-item.stat-km {
  background: #f9a825;
  color: #000;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

.verkeer-update {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.verkeer-empty {
  text-align: center;
  padding: 3rem;
  background: var(--hover);
  border-radius: 12px;
  font-size: 1.1rem;
}

.verkeer-section {
  margin-bottom: 2rem;
}

.verkeer-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.verkeer-table-container {
  overflow-x: auto;
}

.verkeer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.verkeer-table th,
.verkeer-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.verkeer-table th {
  background: var(--hover);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
}

.verkeer-table tbody tr:hover {
  background: var(--row-hover);
}

.verkeer-table .cell-road {
  width: 60px;
}

.verkeer-table .cell-km {
  width: 80px;
  text-align: right;
  white-space: nowrap;
}

.verkeer-table .cell-situation {
  color: var(--muted);
  font-size: 0.85rem;
}

.road-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  padding: 0.25rem 0.5rem;
  background: #d32f2f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
}

.road-tag-large {
  min-width: 55px;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
}

.verkeer-roads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.verkeer-road-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.road-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--hover);
  border-bottom: 1px solid var(--border);
}

.road-stats {
  font-size: 0.8rem;
  color: var(--muted);
}

.road-card-body {
  padding: 0.5rem 0;
}

.road-jam-item {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

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

.jam-location {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.jam-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.jam-description {
  font-size: 0.8rem;
  color: var(--muted);
}

.jam-km {
  font-size: 0.75rem;
  font-weight: 600;
  color: #d32f2f;
  white-space: nowrap;
}

.verkeer-source {
  text-align: center;
  padding: 1rem;
  background: var(--hover);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.verkeer-source a {
  color: var(--accent);
}

@media (max-width: 768px) {
  .verkeer-stats {
    gap: 1rem;
  }
  
  .stat-item {
    padding: 0.75rem 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .verkeer-roads-grid {
    grid-template-columns: 1fr;
  }
  
  .verkeer-table .cell-situation {
    display: none;
  }
  
  .verkeer-table .cell-location {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .verkeer-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .verkeer-header h1 {
    font-size: 1.25rem;
  }
  
  .jam-location {
    font-size: 0.8rem;
  }
  
  .jam-description {
    font-size: 0.75rem;
  }
  
  .road-card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .verkeer-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  
  .verkeer-table {
    font-size: 0.8rem;
  }
  
  .verkeer-table th,
  .verkeer-table td {
    padding: 0.5rem;
  }
  
  .road-tag {
    min-width: 38px;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
}
