/* --- Repair Detail Modal: hide scrollbars (minimal, layout-neutral) --- */
#repairDetailModal { overflow: hidden; }
#repairDetailModal { overflow-x: hidden; }
#repairDetailModal, #repairDetailModal .modal-dialog, #repairDetailModal .modal-content, #repairDetailModal .modal-body { overflow-x: clip; overflow-y: hidden; }
#repairDetailModal .modal-dialog { overflow-x: hidden; }
#repairDetailModal, 
#repairDetailModal .modal-content, 
#repairDetailModal .modal-body { scrollbar-width: none; /* Firefox */ }
#repairDetailModal .modal-content { overflow-x: hidden; overflow-y: hidden; }
#repairDetailModal .modal-body { 
  /* keep structure intact, only prevent horizontal bar */
  overflow-x: hidden; 
  overflow-y: hidden;
}
#repairDetailModal .modal-body > .row { overflow-x: hidden; }
#repairDetailModal .modal-body > .row > [class*="col-"] { min-width: 0; }
#repairDetailModal .modal-body > .row > .col-md-6 { min-width: 0; }
#repairDetailModal .col-md-6.d-flex.flex-column { min-width: 0; }
#repairDetailModal #modal-repair-map { min-width: 0; max-width: 100%; }
#repairDetailModal .p-4.flex-grow-1 { min-width: 0; overflow-x: hidden; }
#repairDetailModal .p-4 > .row { 
  /* prevent negative gutter margins from overflowing the padded container */
  --bs-gutter-x: 0; 
  margin-left: 0; 
  margin-right: 0; 
  overflow-x: hidden;
}
#repairDetailModal .p-4.flex-grow-1 { scrollbar-width: none; -ms-overflow-style: none; }
#repairDetailModal .p-4.flex-grow-1::-webkit-scrollbar { display: none; }
#repairDetailModal * { scrollbar-width: none !important; }
#repairDetailModal *::-webkit-scrollbar { width: 0 !important; height: 0 !important; background: transparent !important; }
#repairDetailModal::-webkit-scrollbar,
#repairDetailModal .modal-content::-webkit-scrollbar,
#repairDetailModal .modal-body::-webkit-scrollbar { display: none; /* WebKit */ }
#repairDetailModal .modal-content::-webkit-scrollbar:horizontal, 
#repairDetailModal .modal-body::-webkit-scrollbar:horizontal { display: none; }
#repairDetailModal * { -ms-overflow-style: none; }

/* Prevent page-level horizontal scroll while the modal is open (scoped to N07) */
body.modal-open { overflow-x: hidden; }
html.modal-open { overflow-x: hidden; }
/* Also hide page-level scrollbars while modal is open (only during modal) */
body.modal-open, html.modal-open { scrollbar-width: none; }
body.modal-open::-webkit-scrollbar, html.modal-open::-webkit-scrollbar { display: none; }
/* Scoped flex layout for modal to avoid inner scrollbars */
#repairDetailModal,
#repairDetailModal .modal-dialog,
#repairDetailModal .modal-content,
#repairDetailModal .modal-body { overflow: hidden !important; }
#repairDetailModal,
#repairDetailModal .modal-dialog,
#repairDetailModal .modal-content,
#repairDetailModal .modal-body,
#repairDetailModal .p-4.flex-grow-1 { overflow-x: hidden !important; }
#repairDetailModal [class*="col-"] { min-width: 0 !important; max-width: 100% !important; }
#repairDetailModal .modal-body > .row { --bs-gutter-x: 0; margin-left: 0; margin-right: 0; }
#repairDetailModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 96dvh;
}

/* Ensure the floating close button doesn't overlap the modal title */
#repairDetailModal #modal-repair-name {
  padding-right: 4rem; /* space for close button bubble + gap */
}

@media (max-width: 575.98px) {
  #repairDetailModal #modal-repair-name {
    padding-right: 4.5rem; /* a touch more room on small screens */
  }
}
#repairDetailModal .modal-body { flex: 1 1 auto; padding: 0; }
#repairDetailModal .modal-body > .row { height: 100%; }
#repairDetailModal .modal-body > .row > [class*="col-"] { height: 100%; }
#repairDetailModal .col-md-6.d-flex.flex-column { height: 100%; overflow: hidden; }

/* Mobile-friendly behavior: allow vertical scroll, keep footer visible, no ugly scrollbars */
@media (max-width: 575.98px) {
  /* Use full width/height modal on phones */
  #repairDetailModal .modal-dialog { max-width: 100%; margin: 1rem; }
  /* Account for outer margin in available height */
  #repairDetailModal .modal-content { max-height: calc(100dvh - 2rem); border-radius: 24px; overflow: hidden; }

  /* Let the body scroll vertically; keep scrollbars hidden visually */
  #repairDetailModal .modal-body { 
    overflow-y: auto !important; 
    -webkit-overflow-scrolling: touch; 
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); /* space for sticky footer + safe area */
  }

  /* Make the action buttons always reachable */
  #repairDetailModal .modal-footer {
    position: sticky; 
    bottom: 0; 
    background: #fff; 
    z-index: 3; 
    box-shadow: 0 -6px 16px rgba(0,0,0,0.06);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  }

  /* Stack columns naturally and avoid forced full-height on each */
  #repairDetailModal .modal-body > .row { height: auto; }
  #repairDetailModal .modal-body > .row > [class*="col-"] { height: auto; }
  #repairDetailModal .col-md-6.d-flex.flex-column { overflow: visible; }

  /* Reasonable map height when stacked */
  #repairDetailModal .modal-repair-map { min-height: 40vh; }
}
/* PACMAN v11_pro */
:root {
    --c-soft: #f8f9fa;
    --plan: #ff9900;
    --active: #d00000;
    --done: #2a9d8f;
    --closure: #fd7e14;
    --restriction: #ffc107;
    --detour: #0dcaf0;
}

/* Enhance focus styles for key interactive elements */
.btn:focus-visible, .repair-card a:focus-visible, .updates-dot:focus-visible, .updates-arrow:focus-visible,
.legend-toggle:focus-visible, .repair-detail:focus-visible, .repair-map-link:focus-visible {
  outline: 0.2rem solid #0d6efd;
  outline-offset: 0.15rem;
}

/* Timeline modal styling for prominence */
.detail-timeline {
  border: 1px solid rgba(13,71,152,0.18);
  background: #0b3b7a; /* dark PACMAN blue */
  color: #eef4ff;
}
.detail-timeline .timeline-slider-wrap { position: relative; height: 32px; }
.detail-timeline .timeline-slider-wrap .form-range { position: absolute; inset: 0; margin: 0; }
.detail-timeline .timeline-today-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0dcaf0; /* cyan */
  box-shadow: 0 0 0 3px rgba(13,202,240,0.25);
  pointer-events: none;
}
.detail-timeline .form-range::-webkit-slider-thumb { background: #0dcaf0; }
.detail-timeline .form-range::-moz-range-thumb { background: #0dcaf0; }
.detail-timeline .form-range::-webkit-slider-runnable-track { background: rgba(255,255,255,0.25); }
.detail-timeline .form-range::-moz-range-track { background: rgba(255,255,255,0.25); }

/* Elegant title wrapper with floating minimize icon */
.timeline-title-wrap {
  position: relative;
  display: inline-block;
  padding-top: 20px; /* more space so button isn't glued to top border */
}
.timeline-title-wrap .timeline-title { position: relative; z-index: 1; }
.timeline-minimize-btn {
  position: absolute;
  top: -4px; /* move slightly down from the top border */
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  z-index: 2;
}
@media (max-width: 575.98px) {
  .timeline-minimize-btn { top: -2px; }
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* A11y: .sr-only / .visually-hidden – text pouze pro čtečky (skrytý vizuálně) */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* A11y: globální outline pro :focus-visible (klávesnice) */
:focus-visible { outline: 0.2rem solid rgba(0,71,152,0.6); outline-offset: 0.15rem; }

/* Typografie v rem – snadné zvětšení textu dle preferencí uživatele */
html { font-size: 16px; }
body { font-size: 1rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p  { font-size: 1rem; }

/* Accessibility: visually hidden utility for screen readers */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.visually-hidden { /* alias */
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Global focus-visible outline for keyboard users */
:focus-visible {
  outline: 0.2rem solid rgba(0,71,152,0.6);
  outline-offset: 0.15rem;
}

/* Base responsive typography using rem units */
html { font-size: 16px; }
body { font-size: 1rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p  { font-size: 1rem; }

/* --- Hero image area (right side) --- */
.hero-image-wrapper { position: relative; }
.hero-image-box { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 1rem 3rem rgba(0,0,0,.175); background: #0b3b7a; }
.hero-image-label { position: absolute; top: 14px; left: 14px; z-index: 3; display: inline-flex; gap: 6px; align-items: center; }
.hero-label-brand { display: inline-block; background: transparent; color: #fff; border-radius: 0; padding: 0; font-weight: 800; font-size: 12px; letter-spacing: 0.04em; }
.hero-label-sub { display: inline-block; background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.65); border-radius: 9999px; padding: 6px 10px; font-weight: 700; font-size: 12px; }

.hero-map,
.hero-article { position: relative; width: 100%; height: clamp(320px, 48vh, 520px); background: #002f66; }
.hero-article-image { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.9); transition: transform 0.6s ease, filter 0.4s ease; }
.hero-image-box:hover .hero-article-image { transform: scale(1.04); filter: brightness(1); }

/* Blue overlay info rectangle (kept from map variant) */
.hero-map-info { position: absolute; left: 16px; bottom: 16px; right: 72px; z-index: 4; background: rgba(0,71,152,0.92); color: #fff; padding: 14px 16px; border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,0.18); cursor: pointer; overflow: hidden; transition: background 0.25s ease, box-shadow 0.25s ease; }
.hero-map-title { font-weight: 800; font-size: clamp(16px, 2.4vw, 22px); line-height: 1.2; }
.hero-map-meta { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,0.85); }
.hero-map-meta .hero-article-excerpt { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-map-extra { display: none; }
.hero-map-info:hover { background: rgba(0,71,152,0.98); }

/* Collapsible More section */
.hero-article-more { max-height: 0; opacity: 0; transition: max-height 0.35s ease, opacity 0.3s ease; border-top: 1px solid rgba(255,255,255,0.18); margin-top: 8px; padding-top: 8px; }
.hero-article-more .hero-article-more-row { margin-top: 8px; font-size: 14px; color: rgba(255,255,255,0.9); }
.hero-article-more .hero-article-date { font-weight: 700; letter-spacing: 0.02em; }

/* Expanded state: desktop via hover, mobile via .expanded class */
@media (hover: hover) and (pointer: fine) {
  .hero-map-info:hover .hero-article-more { max-height: 200px; opacity: 1; }
}
.hero-map-info.expanded .hero-article-more { max-height: 220px; opacity: 1; }

/* Tap-friendly affordance: add subtle caret hint (optional, not visible now) */

/* Arrow bubble button (right object) */
.hero-image-button { position: absolute; right: 16px; bottom: 16px; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: #ffffff; color: #004798; border-radius: 9999px; box-shadow: 0 10px 24px rgba(0,0,0,0.18); z-index: 5; text-decoration: none; }
.hero-image-button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(0,0,0,0.22); color: #003a7a; }

/* Updates carousel images: subtle zoom on hover */
.update-card-image { transition: transform 0.4s ease; }
.update-card:hover .update-card-image { transform: scale(1.03); }

.bg-soft {
  background: var(--c-soft);
}

.legend {
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  line-height: 1.5;
  font-size: 13px;
  width: min(78vw, 260px);
  border: 1px solid rgba(13,71,152,0.08);
}

/* Collapsible legend */
.legend-collapsible.collapsed {
  background: transparent;
  padding: 0;
  box-shadow: none;
  width: auto;
}

.legend-collapsible .legend-content { display: block; }
.legend-collapsible.collapsed .legend-content { display: none; }

.legend-collapsible .legend-toggle, .map-mini-filters .filter-buttons .btn-filter {
    background: #004798;
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,71,152,0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.map-mini-filters .filter-buttons .active.co-act {
    outline: 0.2rem solid #d00000;
    outline-offset: 0.15rem;
    background: #d00000;
}

.map-mini-filters .filter-buttons .active.co-plan {
    outline: 0.2rem dashed #ff9900;
    outline-offset: 0.15rem;
    background: #ff9900;
}

.map-mini-filters .filter-buttons .active.co-done {
    outline: 0.2rem solid #2a9d8f;
    outline-offset: 0.15rem;
    background: #2a9d8f;
}

.legend-collapsible .legend-toggle i { margin-right: 6px; }

.legend h6 {
  margin-top: 0;
  margin-bottom: 8px;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.legend-section {
  margin-bottom: 10px;
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-color-box {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: middle;
}

.legend .fa-solid {
  width: 16px;
  text-align: center;
  margin-right: 6px;
}

/* Items and samples inside legend */
.legend-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  margin: 6px 0;
}

.legend-line {
  display: inline-block;
  width: 44px;
  border-top: 4px solid #ccc; /* actual color/width overridden inline */
}

.legend-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0d2c4f 0%, #09345e 100%);
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Ensure icons inside pins are perfectly centered */
.legend .legend-pin .fa-solid {
  margin: 0 !important;
  width: auto !important;
  text-align: center;
  line-height: 1;
}

.legend-pin.end { background: #6c757d; }

.map-section {
  height: auto;
  min-height: auto;
  background: #ffffff; /* Změněno na bílou */
  padding: 4rem 0;
}

.map-wrapper {
  height: 70vh;
  min-height: 500px;
  border-radius: 24px;
  box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
  overflow: hidden;
  position: relative; /* Přidáno pro správné pozicování detailního panelu */
}

#leaflet-map {
  height: 100%;
}

.pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #244;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 3px 9px rgba(0,0,0,0.3);
  font-size: 14px;
}

.pin.active {
  background: var(--active);
}

.pin.planned {
  background: var(--plan);
}

.pin.done {
  background: var(--done);
}

.pin.closure {
  background: var(--closure);
}

.pin.restriction {
  background: var(--restriction);
}

.pin.detour {
  background: var(--detour);
}

.end-flag {
  background: #fff;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

#repairs {
  background-color: #fff;
  padding: 5rem 0;
}

.repairs-container {
  background-color: #004798;
  border-radius: 24px;
  padding: 3rem;
}

/* Show more button styling */
#repairs-show-more {
  background: #ffffff;
  color: #004798;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

#repairs-show-more:hover {
  background: #f2f6ff;
  color: #003a7a;
}

.repairs-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.filter-buttons::-webkit-scrollbar {
  display: none;
}

.map-mini-filters .filter-buttons { 
    overflow-x: initial;}

.btn-filter {
  background-color: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-filter:hover {
  background-color: rgba(255,255,255,0.2);
}

.repair-card {
  background: #186FD1; /* Změněno na modrou */
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.15);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  color: #fff; /* Nastavení výchozí barvy textu na bílou */
  position: relative; /* Nutné pro pozicování pseudo-elementu a tlačítka */
}

/* Maska pro výkroj v pravém dolním rohu karty */
.repair-card::before {
  content: '';
  position: absolute;
  bottom: 0; /* Změněno z top */
  right: 0;
  width: 60px;
  height: 60px;
  background-color: transparent; /* Pozadí kontejneru, aby to fungovalo správně */
  border-top-left-radius: 16px; /* Změněno pro správný roh */
  box-shadow: 10px -10px 0 10px #186FD1; /* Vytvoří tvar výkroje */
  z-index: 1;
}

.repair-card:hover {
  transform: translateY(-5px);
}

.repair-image {
  position: relative;
  padding-bottom: 66.67%; /* zpět na původní výšku náhledu */
  background: #f8f9fa;
}

/* Progress badge in the opposite corner of status */
.repair-progress-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: saturate(140%) blur(2px);
  -webkit-backdrop-filter: saturate(140%) blur(2px);
}

/* Card image fills the header area */
.repair-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* původní vzhled karet */
}

/* Modal map preview */
.modal-repair-map {
  height: 100%;
  min-height: 260px; /* default na menších displejích, JS srovná po zobrazení */
  border-radius: 24px 0 0 24px;
  overflow: hidden;
}

/* How-it-works modals polishing */
.modal-content {
  border-radius: 24px;
}

.how-modal .modal-header {
  padding: 1.25rem 1.5rem 0.5rem 1.5rem;
}

.how-modal .modal-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Styled modal titles with icons */
.how-modal .modal-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(13,71,152,0.12), rgba(13,71,152,0));
  padding: 6px 10px;
  border-radius: 999px;
}
.how-modal .modal-title-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d4798;
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(13,71,152,0.35);
}
.how-modal .modal-title-icon i { font-size: 0.9rem; }

/* Subtle divider below header area */
.how-modal .modal-header + .modal-body { position: relative; }
.how-modal .modal-header + .modal-body::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: -10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

/* How-it-works tiles */
.how-benefits { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 576px) { .how-benefits { grid-template-columns: repeat(2, 1fr); } }

.how-benefits li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8faff;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.how-benefits li:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13,71,152,0.12); border-color: #d9e2f2; }
.how-benefits li i {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(13,71,152,0.08);
  color: #0d4798 !important;
  margin-right: 0 !important; /* override Bootstrap spacing */
  font-size: 16px;
}
.how-benefits li.featured {
  background: linear-gradient(180deg, #f2f7ff, #ffffff);
  border-color: #cddbf6;
  box-shadow: 0 10px 28px rgba(13,71,152,0.15);
  padding-right: 100px; /* leave space so badge never overlaps text */
}
.how-benefits li.featured::after {
  content: 'Důležité';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 11px;
  color: #0d4798;
  background: #ffffff;
  border: 1px solid #cddbf6;
  padding: 4px 10px; /* rectangular pill */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(13,71,152,0.10);
  pointer-events: none;
}

.how-modal .modal-footer .btn {
  border-radius: 999px;
  padding-left: 16px;
  padding-right: 16px;
}

.how-steps {
  counter-reset: step;
}

.how-steps li {
  position: relative;
  padding-left: 2.25rem;
}

.how-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #004798;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Legend inside modal: keep spacing consistent */
#legend-modal-content .legend-section { margin-bottom: 12px; }
#legend-modal-content .legend-item { 
  margin: 6px 0; 
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
}
#legend-modal-content .legend-line { margin-right: 8px; }
#legend-modal-content .legend-section > p { color: #0d2c4f; }

/* Shared legend theme aligned with site (used on map and in modal container) */
.legend-theme-p1 .legend-section > p {
  color: #0d2c4f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.legend-theme-p1 .legend-item { min-height: 22px; }
.legend-theme-p1 .legend-content { padding-top: 8px; }
.legend-theme-p1.legend { padding: 12px 14px; }
.legend-theme-p1 .legend-pin.end { background: #6c757d; }

/* Modal footer buttons: branded pill style across all modals */
.modal .modal-footer .btn {
  border-radius: 999px;
  font-weight: 600;
  padding-left: 16px;
  padding-right: 16px;
}
.modal .modal-footer .btn-primary {
  background-color: #0d2c4f;
  border-color: #0d2c4f;
}
.modal .modal-footer .btn-primary:hover {
  filter: brightness(1.06);
}
.modal .modal-footer .btn-light {
  background-color: rgba(13, 44, 79, 0.06);
  border-color: rgba(13, 44, 79, 0.15);
  color: #0d2c4f;
}

/* Article callouts for important paragraphs */
.article-body .article-callout {
  background: linear-gradient(180deg, #f2f6ff, #ffffff);
  border: 1px solid #dbe5fb;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  box-shadow: 0 8px 20px rgba(13,71,152,0.10);
}
.article-body .article-callout strong { color: #0d2c4f; }

/* Article modals adopt the same styled headers and tiles */
.article-modal .modal-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(13,71,152,0.12), rgba(13,71,152,0));
  padding: 6px 10px;
  border-radius: 999px;
}
.article-modal .modal-title-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d4798;
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(13,71,152,0.35);
}
.article-modal .modal-title-icon i { font-size: 0.9rem; }
.article-modal .modal-header + .modal-body { position: relative; }
.article-modal .modal-header + .modal-body::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  top: -10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}
.article-modal .article-benefits { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 0.5rem; }
@media (min-width: 576px) { .article-modal .article-benefits { grid-template-columns: repeat(2, 1fr); } }
.article-modal .article-benefits li {
  background: #f8faff;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  padding: 0.75rem 1rem;
}
.modal .modal-footer .btn-light:hover {
  background-color: rgba(13, 44, 79, 0.12);
  border-color: rgba(13, 44, 79, 0.25);
}

/* ==== Multi-photo uploader (contact form) ==== */
.uploader-dropzone {
  border: 2px dashed rgba(13,44,79,0.25);
  background: #f8f9fb;
  border-radius: 16px;
  padding: 16px;
  transition: border-color .2s, background-color .2s;
  cursor: pointer;
}
.uploader-dropzone:focus { outline: none; box-shadow: 0 0 0 0.25rem rgba(0,71,152,0.15); }
.uploader-dropzone.dragover { border-color: #004798; background: #f2f6ff; }
.uploader-inner { display: flex; align-items: center; gap: 12px; }
.uploader-icon { 
  width: 44px; height: 44px; border-radius: 12px; 
  background: #004798; color: #fff; display: inline-flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 18px rgba(0,71,152,0.25);
}
.uploader-text { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.uploader-previews { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 10px; 
  margin-top: 12px; 
}
@media (min-width: 576px) { .uploader-previews { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px) { .uploader-previews { grid-template-columns: repeat(6, 1fr); } }

.uploader-thumb {
  position: relative; border-radius: 12px; overflow: hidden; background: #e9ecef; aspect-ratio: 1/1; box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.uploader-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uploader-thumb .uploader-remove {
  position: absolute; top: 6px; right: 6px; 
  background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 999px; 
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; 
  cursor: pointer; outline: none;
}
.uploader-thumb .uploader-remove:hover { background: rgba(0,0,0,0.75); }
.uploader-thumb .uploader-name {
  position: absolute; left: 0; right: 0; bottom: 0; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 90%);
  font-size: 11px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.uploader-error { color: #dc3545; font-size: 0.875rem; margin-top: 6px; }

@media (max-width: 575.98px) {
  .legend { width: min(88vw, 280px); font-size: 12px; }
    .legend-collapsible .legend-toggle,, .map-mini-filters .filter-buttons .btn-filter {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Navbar 'Kontakt' button: use the same brand blue as repairs section */
nav.navbar .btn.btn-primary[href="#contact"] {
  background-color: #004798;
  border-color: #004798;
}
nav.navbar .btn.btn-primary[href="#contact"]:hover {
  background-color: #003a7a;
  border-color: #003a7a;
}

/* --- Anchor scrolling offset so sticky navbar doesn't hide headings --- */
:root { --header-offset: 72px; }
@media (max-width: 991.98px) { :root { --header-offset: 64px; } }

/* Smooth scrolling for in-page anchors (supports keyboard/URL jumps, too) */
html { scroll-behavior: smooth; }

/* Apply offset to main sections that are targeted by anchors */
#map,
#repairs,
#howitworks,
#updates,
#about,
#accessibility,
#contact {
  scroll-margin-top: calc(var(--header-offset) + 16px);
}

/* When we programmatically focus the target section for accessibility,
   suppress the default blue focus outline to avoid top/bottom blue lines */
#map:focus,
#repairs:focus,
#howitworks:focus,
#updates:focus,
#about:focus,
#accessibility:focus,
#contact:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Updates carousel */
#updates { background: #fff; }
/* Allow card shadows to render past the grid without being clipped */
#updates .container { overflow: visible; padding-right: 0; }
.updates-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: 16px;
  overflow-x: auto;
  overflow-y: visible; /* allow shadows to render outside track vertically */
  /* Side and bottom padding to avoid clipping card shadows */
  padding: 16px 24px 40px; /* extra bottom room for larger shadows (lead card) */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  position: relative; /* host right-edge overlay */
}
.updates-arrows { position: relative; }
.updates-arrow {
  position: absolute; top: -56px; /* float above track */
  width: 40px; height: 40px; border-radius: 50%; border: none; background: #0d2c4f; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(13,44,79,0.25);
}
.updates-arrow--prev { left: 0; }
.updates-arrow--next { right: 0; }
.updates-arrow:hover { background: #004798; }
.updates-arrow:focus { outline: none; box-shadow: 0 0 0 4px rgba(0,71,152,0.2); }
/* Hide native scrollbar while keeping scroll functionality */
.updates-track { scrollbar-width: none; }
.updates-track::-webkit-scrollbar { display: none; }

@media (min-width: 576px) { .updates-track { grid-auto-columns: 70%; gap: 18px; } }
@media (min-width: 768px) { .updates-track { grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; } }
@media (min-width: 1200px) { 
  .updates-track { 
    grid-auto-columns: calc((100% - (32px * 2)) / 3);
    gap: 32px; 
    padding-right: 0; /* avoid extra space that can reveal next card */
  }
  /* Right-edge fade overlay: hides sliver of next card without clipping shadows */
  .updates-track::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 24px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, #ffffff 100%);
  }
}

.update-card {
  scroll-snap-align: start;
  scroll-snap-stop: always; /* ensure snapping to full cards */
  border: none;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(13, 44, 79, 0.12);
  overflow: visible; /* ensure inner shadows/effects are not clipped */
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  padding: 16px;
  text-align: left;
}
.update-card:focus { outline: none; box-shadow: 0 0 0 0.25rem rgba(0,71,152,0.2); }
.update-card .update-card-image {
  width: 96px; height: 96px; object-fit: contain; border-radius: 12px; background: #f8f9fa;
}
.update-card .update-card-body { padding-left: 14px; }
.update-card .update-card-cta { font-weight: 600; color: #004798; }

/* Lead card */
.update-card--lead {
  background: #0d2c4f;
  color: #fff;
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(13, 44, 79, 0.25);
  position: relative; /* enable z-index to ensure shadow draws above neighbors */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 28px;
}
.update-lead-inner { max-width: 520px; }
.update-card--lead h3 { letter-spacing: 0.2px; }

/* Card as button */
.update-card.update-card--item {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  will-change: transform;
}
.update-card.update-card--item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(13, 44, 79, 0.18);
}

/* Article cards: portrait image next to text */
.update-card.update-card--item {
  display: grid; /* side-by-side layout */
  grid-template-columns: 110px 1fr; /* narrower portrait image */
  align-items: center;
  padding: 12px; /* tighter to reduce total height */
}
.update-card.update-card--item .update-card-image {
  width: 110px;
  height: 140px; /* shorter portrait for lower card height */
  object-fit: cover; /* crop to fill */
  border-radius: 12px; /* keep rounded corners */
  background: #e9ecef;
}
.update-card.update-card--item .update-card-body {
  padding-left: 12px; /* space between image and text */
}
.update-card.update-card--item .update-card-body p {
  display: -webkit-box;
  line-clamp: 2; /* standard */
  -webkit-line-clamp: 2; /* clamp description to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 575.98px) {
  .update-card.update-card--item { grid-template-columns: 96px 1fr; padding: 10px; }
  .update-card.update-card--item .update-card-image { width: 96px; height: 120px; }
}

@media (max-width: 575.98px) {
  .update-card { grid-template-columns: 80px 1fr; padding: 14px; }
  .update-card .update-card-image { width: 80px; height: 80px; }
}

/* Dots pagination */
.updates-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.updates-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(13,44,79,0.25);
  border: none; padding: 0; cursor: pointer;
}
.updates-dot[aria-selected="true"] { background: #004798; box-shadow: 0 0 0 4px rgba(0,71,152,0.12); }
.updates-dot:focus { outline: none; box-shadow: 0 0 0 4px rgba(0,71,152,0.2); }
.updates-dot:hover { background: #0d2c4f; }

/* Article-style modals */
.add-repair-modal { border-radius: 20px; overflow: hidden; }
#add-repair-map { height: 420px; background: #f2f4f7; }
@media (max-width: 575.98px) { #add-repair-map { height: 300px; } }
.edit-repair-modal { border-radius: 20px; overflow: hidden; }
#edit-repair-map { height: 360px; background: #f2f4f7; }
@media (max-width: 575.98px) { #edit-repair-map { height: 280px; } }
.add-repair-modal .form-label { font-weight: 600; color: #0d2c4f; }
.add-repair-modal .form-control, .add-repair-modal .form-select { border-radius: 12px; }
.add-repair-modal .row.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.add-repair-modal .modal-title { font-weight: 700; color: #0d2c4f; }
.add-repair-modal .modal-footer .btn-danger { border-radius: 999px; font-weight: 700; }
.add-repair-modal #add-repair-photo-preview { display: flex !important; align-items: center; gap: 12px; }
.add-repair-modal textarea#add-repair-desc { min-height: 88px; }
.add-repair-modal #add-repair-photo { padding: 8px 12px; }
.article-hero { width: 100%; height: 220px; overflow: hidden; border-top-left-radius: 24px; border-top-right-radius: 24px; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.how-modal .modal-body ul, .how-modal .modal-body ol { padding-left: 1.25rem; }

/* Leaflet.Draw UX polishing for add-repair map */
#add-repair-map .leaflet-draw-toolbar { display: flex; flex-direction: column; gap: 8px; }
#add-repair-map .leaflet-draw-toolbar:not(.leaflet-draw-toolbar-top) { margin-top: 8px; }
#add-repair-map .leaflet-draw-toolbar a { display: inline-flex; }
#add-repair-map .leaflet-draw-toolbar a { box-shadow: 0 6px 16px rgba(0,0,0,0.12); border-radius: 8px; }
#add-repair-map .leaflet-draw-toolbar a:hover { filter: brightness(1.08); }
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline { background-color: #0d6efd; }
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit { background-color: #198754; }
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove { background-color: #dc3545; }

/* Leaflet.Draw UX polishing for edit-repair map */
#edit-repair-map .leaflet-draw-toolbar { display: flex; flex-direction: column; gap: 8px; }
#edit-repair-map .leaflet-draw-toolbar:not(.leaflet-draw-toolbar-top) { margin-top: 8px; }
#edit-repair-map .leaflet-draw-toolbar a { display: inline-flex; }
#edit-repair-map .leaflet-draw-toolbar a { box-shadow: 0 6px 16px rgba(0,0,0,0.12); border-radius: 8px; }
#edit-repair-map .leaflet-draw-toolbar a:hover { filter: brightness(1.08); }
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline { background-color: #0d6efd; }
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit { background-color: #198754; }
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove { background-color: #dc3545; }

/* Edit action buttons (Leaflet.Draw) */
#add-repair-map .leaflet-draw-actions a { color: #fff; font-weight: 600; background-image: none !important; }
#add-repair-map .leaflet-draw-actions li:nth-child(1) a { background-color: #198754; border-color: rgba(0,0,0,0.25); } /* Save */
#add-repair-map .leaflet-draw-actions li:nth-child(2) a { background-color: #6c757d; border-color: rgba(0,0,0,0.25); } /* Cancel */
#add-repair-map .leaflet-draw-actions a:hover { filter: brightness(1.05); }

#edit-repair-map .leaflet-draw-actions a { color: #fff; font-weight: 600; background-image: none !important; }
#edit-repair-map .leaflet-draw-actions li:nth-child(1) a { background-color: #198754; border-color: rgba(0,0,0,0.25); } /* Save */
#edit-repair-map .leaflet-draw-actions li:nth-child(2) a { background-color: #6c757d; border-color: rgba(0,0,0,0.25); } /* Cancel */
#edit-repair-map .leaflet-draw-actions a:hover { filter: brightness(1.05); }

/* High-contrast toolbar icons: use white glyphs, hide default sprite */
#add-repair-map .leaflet-draw-toolbar a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background-image: none !important; /* hide Leaflet.Draw sprite */
  color: #fff; border: 1px solid rgba(0,0,0,0.25);
}
#add-repair-map .leaflet-draw-toolbar a::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 16px; line-height: 1; color: #fff; content: "";
}
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline::before { content: "\f304"; } /* fa-pen */
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit::before { content: "\f044"; }     /* fa-pen-to-square */
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove::before { content: "\f1f8"; }   /* fa-trash */

#edit-repair-map .leaflet-draw-toolbar a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background-image: none !important; /* hide Leaflet.Draw sprite */
  color: #fff; border: 1px solid rgba(0,0,0,0.25);
}
#edit-repair-map .leaflet-draw-toolbar a::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 16px; line-height: 1; color: #fff; content: "";
}
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline::before { content: "\f304"; } /* fa-pen */
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit::before { content: "\f044"; }     /* fa-pen-to-square */
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove::before { content: "\f1f8"; }   /* fa-trash */

/* Focus visibility and better hover contrast */
#add-repair-map .leaflet-draw-toolbar a:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline:hover { background-color: #0b5ed7; }
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit:hover { background-color: #157347; }
#add-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove:hover { background-color: #bb2d3b; }

#edit-repair-map .leaflet-draw-toolbar a:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-draw-polyline:hover { background-color: #0b5ed7; }
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-edit:hover { background-color: #157347; }
#edit-repair-map .leaflet-draw-toolbar .leaflet-draw-edit-remove:hover { background-color: #bb2d3b; }

/* Drawing vertices & guides */
#add-repair-map .leaflet-draw-guide-dash { border-top: 2px dashed rgba(13,110,253,0.7); }
#add-repair-map .leaflet-vertex-icon { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #0d6efd; box-shadow: 0 2px 6px rgba(13,110,253,0.25); }

#edit-repair-map .leaflet-draw-guide-dash { border-top: 2px dashed rgba(13,110,253,0.7); }
#edit-repair-map .leaflet-vertex-icon { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #0d6efd; box-shadow: 0 2px 6px rgba(13,110,253,0.25); }

/* Drawn polyline appearance */
#add-repair-map .leaflet-overlay-pane svg path[stroke="#0d6efd"] { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); stroke-linecap: round; stroke-linejoin: round; }

#edit-repair-map .leaflet-overlay-pane svg path[stroke="#0d6efd"] { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); stroke-linecap: round; stroke-linejoin: round; }

/* Article body formatting */
.article-body { font-size: 1rem; line-height: 1.7; }
.article-body p { margin-bottom: 1rem; }
.article-body h3, .article-body h4 { color: #0d2c4f; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.article-body ul, .article-body ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.article-body strong { color: #0d2c4f; }

.article-figure { margin: 1rem 0 1.25rem; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 20px rgba(13,44,79,0.12); background: #f8f9fa; }
.article-figure img { width: 100%; height: auto; display: block; max-height: 380px; object-fit: cover; }
.article-caption { font-size: 0.875rem; color: #6c757d; text-align: center; padding: 6px 10px 0; }

.article-quote { border-left: 4px solid #004798; padding-left: 12px; color: #0d2c4f; font-weight: 600; margin: 1rem 0; }

/* Article modals: prevent horizontal scroll everywhere */
#article1Modal .modal-content,
#article2Modal .modal-content,
#article3Modal .modal-content,
#article4Modal .modal-content { overflow-x: hidden; }

/* Desktop: fit content to viewport height without inner scrollbars
   – reduce vertical footprint of large elements to avoid vertical scrolling */
@media (min-width: 992px) {
  /* Make the modal a flex column and constrain total height */
  #article1Modal .modal-content,
  #article2Modal .modal-content,
  #article3Modal .modal-content,
  #article4Modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 92dvh; /* below full to keep nice margins */
  }
  /* Ensure header/footer are fixed height chunks (no shrink), body uses remaining space */
  #article1Modal .modal-header,
  #article2Modal .modal-header,
  #article3Modal .modal-header,
  #article4Modal .modal-header,
  #article1Modal .modal-footer,
  #article2Modal .modal-footer,
  #article3Modal .modal-footer,
  #article4Modal .modal-footer { flex-shrink: 0; }

  #article1Modal .modal-body,
  #article2Modal .modal-body,
  #article3Modal .modal-body,
  #article4Modal .modal-body {
    overflow: hidden; /* avoid inner scrollbars on desktop */
  }

  /* Tighter hero and figures to fit within viewport without scrolling */
  .article-hero { height: 180px; }
  #article1Modal .article-figure img,
  #article2Modal .article-figure img,
  #article3Modal .article-figure img,
  #article4Modal .article-figure img { max-height: 300px; }
  #article1Modal .article-figure,
  #article2Modal .article-figure,
  #article3Modal .article-figure,
  #article4Modal .article-figure { margin: 0.75rem 0 1rem; }
  #article1Modal .article-body p,
  #article2Modal .article-body p,
  #article3Modal .article-body p,
  #article4Modal .article-body p { margin-bottom: 0.875rem; }
}

/* Mobile/tablet: allow vertical scrolling inside content, keep horizontal off */
@media (max-width: 991.98px) {
  #article1Modal .modal-content,
  #article2Modal .modal-content,
  #article3Modal .modal-content,
  #article4Modal .modal-content {
    max-height: 100dvh;
  }
  #article1Modal .modal-body,
  #article2Modal .modal-body,
  #article3Modal .modal-body,
  #article4Modal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Make previews visually static and non-interactive */
.leaflet-container.preview-static {
  pointer-events: none; /* disable mouse */
}

/* Hide Leaflet controls inside previews */
.leaflet-container.preview-static .leaflet-control-container {
  display: none !important;
}

.repair-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
}

.repair-status.active {
  background-color: var(--active);
}

.repair-status.planned {
  background-color: var(--plan);
}

.repair-status.done {
  background-color: var(--done);
}

/* Missing badge colors for other statuses */
.repair-status.closure {
  background-color: var(--closure);
}

.repair-status.restriction {
  background-color: var(--restriction);
  /* optional: dark text for better contrast on yellow; comment out if you prefer white */
  color: #212529;
}

.repair-status.detour {
  background-color: var(--detour);
}

.repair-content {
  padding: 1.5rem;
  position: static; /* allow .repair-footer to anchor to .repair-card instead */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* vyplní zbylou výšku karty až ke spodní hraně */
  /* Reserve space for the pinned footer (date + Detail), incl. room for map-link notch */
  padding-bottom: 96px;
}

.repair-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff; /* Změněno na bílou */
}

/* Inline dark subtitle next to white title */
.repair-subtitle-inline {
  font-weight: 600;
  color: #0d2c4f; /* tmavý text */
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 0.9rem;
}

/* Work kind line under title */
.repair-kind {
  margin-top: -0.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.repair-description {
  color: rgba(255, 255, 255, 0.8); /* Změněno na průsvitnou bílou */
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.repair-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* divider remains visible */
  padding-right: 55px; /* room for bottom-right map link */
  /* Pin footer to consistent bottom offset across all cards */
  position: absolute;
  left: 1.5rem;  /* equals .repair-content side padding */
  right: 1.5rem; /* equals .repair-content side padding */
  bottom: 1.5rem; /* equal bottom offset on all cards */
}

.repair-date {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8); /* Změněno na průsvitnou bílou */
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repair-detail {
  background-color: #fff; /* Bílé pozadí */
  color: #186FD1; /* Modrý text */
  padding: 0.375rem 1rem; /* Odsazení pro vzhled tlačítka */
  border-radius: 50px; /* Zaoblení do tvaru "pilulky" */
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.repair-map-link {
  position: absolute;
  bottom: 0; /* Změněno z top */
  right: 0;
  width: 50px;
  height: 50px;
  background-color: #0d2c4f; /* Tmavě modrá/černá */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 0 16px 0; /* Upraveno zaoblení pro nový roh */
  text-decoration: none;
  z-index: 2; /* Nad maskou */
  transition: background-color 0.2s;
}

.repair-detail:hover {
  background-color: #f0f0f0; /* Ztmavení pozadí při najetí myší */
  color: #186FD1;
}

.repair-map-link:hover {
  background-color: #000;
}

.btn-filter[data-filter="planned"].active {
  background-color: var(--plan);
  border-color: var(--plan);
}

.btn-filter[data-filter="active"].active {
  background-color: var(--active);
  border-color: var(--active);
}

.btn-filter[data-filter="done"].active {
  background-color: var(--done);
  border-color: var(--done);
}

.btn-filter[data-filter="closure"].active {
  background-color: var(--closure);
  border-color: var(--closure);
}

.btn-filter[data-filter="restriction"].active {
  background-color: var(--restriction);
  border-color: var(--restriction);
}

.btn-filter[data-filter="detour"].active {
  background-color: var(--detour);
  border-color: var(--detour);
}

@media (max-width: 991.98px) {
  .repairs-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-buttons {
    width: 100%;
  }

  #clear-filters {
    width: 100%;
  }
}

/* Mobile: stack date above Detail button in repair card footer */
@media (max-width: 575.98px) {
  /* Extra space at the bottom to accommodate stacked footer */
  .repair-content { padding-bottom: 120px; }

  /* For static example cards (date + detail directly in footer) */
  .repair-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  /* For dynamically generated cards where footer contains an inner .d-flex wrapper */
  .repair-footer > .d-flex {
    width: 100%;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.5rem;
  }
}

/* Nové styly pro sekci O projektu a FAQ */
#about {
  background-color: #fff;
}

.about-text h2 {
  color: #0d2c4f;
}

.about-text .btn-dark {
  background-color: #0d2c4f;
  border-color: #0d2c4f;
}

.accordion {
  --bs-accordion-border-width: 0;
  --bs-accordion-border-radius: 1rem;
  --bs-accordion-inner-border-radius: 1rem;
  --bs-accordion-btn-padding-x: 1.5rem;
  --bs-accordion-btn-padding-y: 1.25rem;
  --bs-accordion-btn-focus-box-shadow: none;
  --bs-accordion-body-padding-x: 1.5rem;
  --bs-accordion-body-padding-y: 1.25rem;
  --bs-accordion-btn-icon-width: 1.5rem;
}

.accordion-item {
  background-color: transparent;
  border: none;
  margin-bottom: 1rem;
  position: relative; /* pro overlay podbarvení */
}

.accordion-button {
  background-color: #f1f3f5; /* světle šedé bubliny v zavřeném stavu */
  color: #212529;
  font-weight: 700;
  border-radius: 9999px !important; /* pilulka */
  padding: 1rem 4.25rem 1rem 1.25rem; /* více místa pro ikonu vpravo */
  box-shadow: none;
  position: relative;
}

/* Plynulé přebarvení: nejdřív se rozbalí (světlé), pak fade to red */
.accordion-button,
.accordion-body {
  transition: color 0s linear, background-color 0s; /* okamžitě přepnout text i bg */
}

/* Otevřená hlavička zůstává nejprve světlá, barvu přidáme až s třídou .is-colorized */
.accordion-button:not(.collapsed) {
  background-color: #f1f3f5; /* zůstává světlé při rozbalení */
  color: #212529;
  box-shadow: none;
  border-bottom-left-radius: 9999px !important; /* ponechá bublinu dokud neproběhne colorize */
}

.accordion-body {
  background-color: transparent;
  color: #212529;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-top: 0;
  padding-top: 0.75rem;
}

/* Tělo bubliny ve stavu otevřeno: součást červené karty */
/* Tělo se nejprve ukáže transparentní; barvu přidáme s .is-colorized */
.accordion-collapse.show .accordion-body {
  background-color: transparent;
  color: #212529;
  border-radius: 24px; /* všechny rohy 24px v otevřeném stavu (před přebarvením) */
  margin-top: -0.6rem; /* lehce větší překrytí hlavičky */
  padding: 0.75rem 2.75rem 1.25rem 1.25rem; /* víc místa vpravo, aby text nenarážel do ikony */
}

/* Zachovat extra prostor vpravo i během animace (collapse/collapsing) */
.accordion-collapse .accordion-body { padding-right: 2.75rem; }

/* Vlastní ikona: plus (zavřeno) / křížek (otevřeno) v tmavém čtverečku */
.accordion-button::after {
  content: "\f067"; /* fa-plus */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  background: #111;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.accordion-button:not(.collapsed)::after {
  content: "\f00d"; /* fa-times */
  background: #111;
  color: #fff;
}

/* Dekorativní "ouško" na pravém okraji při otevření */
/* Dekorativní ouško zobrazíme až při fázi přebarvení */
.accordion-item.is-colorized .accordion-button:not(.collapsed)::before {
  content: "";
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 42px;
  background: #dc3545;
  border-radius: 21px;
}

/* Fáze přebarvení po dokončení rozbalení */
.accordion-item.is-colorized .accordion-button:not(.collapsed) {
  background-color: transparent; /* barvu dodá overlay, aby to neprobliklo */
  color: #fff;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  /* Zmenšení horních rohů hlavičky na 24px (místo velkého pilulkového rádiusu) */
  border-top-left-radius: 24px !important;
  border-top-right-radius: 24px !important;
}

/* Ensure header text is white as soon as item becomes colorized, even before full expand */
.accordion-item.is-colorized .accordion-button { color: #fff; }

.accordion-item.is-colorized .accordion-collapse.show .accordion-body {
  background-color: transparent; /* barvu dodá overlay, aby to neprobliklo */
  color: #fff;
  /* Všechny rohy 24px pro konzistentní kartu */
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 24px;
}

/* Make answer text white immediately when colorized, even during the collapsing phase */
.accordion-item.is-colorized .accordion-collapse .accordion-body {
  color: #fff;
}

.accordion-collapse.collapsing {
    transition: height 0.28s ease; /* slightly snappier height animation */
}

/* Smooth FAQ reveal: fade/slide content like hero map info */
.accordion-collapse {
  overflow: hidden; /* ensure content doesn't overflow during animation */
}

/* Prepare body for animation in both opening and closing */
.accordion-body {
  will-change: opacity, transform;
}

/* Opening state: when panel is shown, animate inner content in */
.accordion-collapse.show .accordion-body {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease; /* match height timing */
}

/* During collapsing (closing), keep a quick fade/slide to smooth the exit */
.accordion-collapse.collapsing .accordion-body {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Red overlay pro barevnou fázi – plynulé podbarvení bez probliknutí */
.accordion-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #dc3545;
  border-radius: 24px; /* sjednocený rádius na všech rozích */
  opacity: 0;
  transition: opacity 0s; /* okamžité podbarvení */
  pointer-events: none;
  will-change: opacity;
  z-index: 0;
}

.accordion-item.is-colorized::before {
  opacity: 1;
}

/* Zajistíme, že obsah je nad overlayem */
.accordion-button,
.accordion-body,
.accordion-collapse { position: relative; z-index: 1; }

/* Jak PACMAN funguje - nový design */
.packman-feature-card {
  padding: 2.5rem;
  border-radius: 24px;
  height: 100%;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden; /* Skryje části pseudo-elementu, které přesahují */
}

/* Pseudo-element pro vytvoření výřezu */
.packman-feature-card::after {
  content: '';
  position: absolute;
  bottom: -1px; /* Posun o 1px pro překrytí rámečku */
  right: -1px;
  width: 60px;
  height: 60px;
  background-color: transparent;
  border-top-left-radius: 24px;
  box-shadow: -10px -10px 0 10px #f8f9fa; /* Barva pozadí karty */
  z-index: 1;
}

.packman-feature-card-primary::after {
   box-shadow: -10px -10px 0 10px #004798; /* Barva pozadí primární karty */
}

.packman-feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.08);
}

.packman-feature-card-primary {
  background-color: #004798;
  color: white;
  border-color: #004798;
}

.packman-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 1.5rem;
  color: #0d2c4f;
}

.packman-feature-card-primary .packman-feature-icon {
  border-color: rgba(255,255,255,0.3);
  color: white;
}

.packman-feature-card h3 {
  font-weight: 700;
}

.packman-feature-card p {
  flex-grow: 1;
  color: #6c757d;
}

.packman-feature-card-primary p,
.packman-feature-card-primary h3 {
  color: white;
}

.packman-feature-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

.packman-feature-link {
  color: #0d2c4f;
  text-decoration: underline;
  font-weight: 500;
}

.packman-feature-card-primary .packman-feature-link {
  color: white;
}

.packman-feature-arrow {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 48px;
  height: 48px;
  background-color: #0d2c4f;
  color: white;
  border-radius: 12px 0 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s;
  z-index: 2; /* Nad výřezem */
}

.packman-feature-arrow:hover {
  transform: scale(1.1);
  color: white;
}

/* Hero sekce */
.hero-section {
  position: relative;
}

/* Decorative helmet behind hero copy */
.hero-copy {
  position: relative;
}
.hero-copy::after {
  content: "";
  transform: scale(1);
  filter: brightness(1);
  transition: transform 280ms ease, filter 280ms ease;
  position: absolute;
  left: auto;
  right: -200px; /* více vystrčeno doprava */
  top: -20px;

/* Smooth hover effect without re-rendering the map tiles */
.hero-image-box:hover .hero-map {
  transform: scale(1.03);
  filter: brightness(1.03);
}
  width: 520px;
  height: 520px;
  background: url('img/helma.png') no-repeat center/contain;
  opacity: 1; /* plná viditelnost na přání */
  mix-blend-mode: multiply; /* lépe se spojí s bílým podkladem */
  z-index: 0;
  pointer-events: none;
}
.hero-copy > * { position: relative; z-index: 1; }

@media (max-width: 991.98px) { /* pod lg stackne layout, zmenšíme vodotisk */
  .hero-copy::after {
    left: auto;
    right: -30px; /* více vpravo i na menších displejích */
    top: 0px;
    width: 380px;
    height: 380px;
    opacity: 1;
  }
}

.hero-text-column {
  position: relative;
  z-index: 2;
}

.hero-text-column::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background-image: url('https://i.postimg.cc/pXW5zB9r/logo-praha1-circle.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  z-index: -1;
}

.hero-headline {
  color: #004798;
}

.hero-image-wrapper {
  position: relative;
  max-width: 480px;
  margin-left: auto;
}

.hero-image-box {
  position: relative;
  padding: 0;
  background: transparent;
  border-radius: 24px;
  overflow: hidden;
  z-index: 1;
}

/* Hero inline map replaces the image */
.hero-map {
  width: 100%;
  height: 360px;
  position: relative;
  z-index: 0; /* keep Leaflet panes behind overlay UI */
  will-change: transform, filter;
}
/* Keep hero map panes from covering overlay UI */
.hero-map .leaflet-pane {
  z-index: 0 !important;
  pointer-events: none; /* map is read-only in hero */
}
@media (min-width: 992px) {
  .hero-map { height: 420px; }
}

/* Bottom info bar over the map */
.hero-map-info {
  position: absolute;
  left: 16px;
  /* Reserve space for the bottom-right arrow (23% width) plus gutter */
  right: calc(16px + 23% + 8px);
  bottom: 16px;
  background: rgba(13, 44, 79, 0.9);
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.hero-map-info:hover { transform: translateY(-1px); background: rgba(13, 44, 79, 0.95); }
.hero-map-title {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-map-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.875rem;
  opacity: 0.95;
}
.hero-progress strong { color: #ffda6a; }

/* Extra info that reveals on hover */
.hero-map-extra {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}
.hero-map-info:hover .hero-map-extra { max-height: 220px; opacity: 1; }
.hero-extra-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-extra-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
}
.hero-extra-badges .badge.status { color: #b6e0ff; border-color: rgba(102,179,255,0.35); }
.hero-extra-badges .badge.type { color: #ffd6a0; border-color: rgba(255,190,120,0.35); }
.hero-extra-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.8rem; color: rgba(255,255,255,0.95); }
.hero-extra-row i { opacity: 0.9; width: 16px; text-align: center; margin-top: 2px; }
.hero-extra-row.detour span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; }

@media (max-width: 575.98px) {
  /* Slightly denser on mobile */
  .hero-map-info { left: 12px; right: calc(12px + 28% + 8px); bottom: 12px; padding: 10px 12px; border-radius: 14px; }
  .hero-map-title { font-size: 0.95rem; }
  .hero-map-meta { font-size: 0.8rem; gap: 10px; }
  .hero-extra-badges .badge { font-size: 0.7rem; padding: 5px 9px; }
}

/* Maska pro levý horní roh - vráceno do funkční podoby */
.hero-image-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 25%;
  background-color: white;
  border-radius: 0; /* Reset */
  border-bottom-right-radius: 24px; /* Pouze tento roh zaoblený */
  z-index: 4;
}

/* Maska pro pravý dolní roh - vráceno do funkční podoby */
.hero-image-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 25%;
  height: 25%;
  background-color: white;
  border-radius: 0; /* Reset */
  border-top-left-radius: 24px; /* Pouze tento roh zaoblený */
  z-index: 4;
}

.hero-image-label {
  position: absolute;
  top: 0;
  left: 0;
  background: #004798;
  color: #fff;
  width: 23%;
  height: 23%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px; /* Všechny rohy opět stejně zaoblené */
  font-weight: 700;
  /* Container-based sizing: enable container query units relative to this box */
  container-type: inline-size;
  box-sizing: border-box; /* keep padding inside the 23% box */
  /* Adaptive inner padding so text never lepí ke krajům */
  padding: clamp(8px, 3cqi, 14px) clamp(10px, 4cqi, 18px);
  gap: clamp(4px, 2cqi, 10px);
  z-index: 6;
  text-align: center;
  line-height: 1.2;
}

/* Hero label typografie: PACMAN nad P1 */
.hero-image-label .hero-label-brand {
  /* Scale with label width, but keep readable bounds */
  font-size: clamp(12px, 14cqi, 24px);
  letter-spacing: clamp(0.02em, 0.4cqi, 0.08em);
  line-height: 1;
}
.hero-image-label .hero-label-sub {
  /* Slightly larger than brand, still container-relative */
  font-size: clamp(14px, 18cqi, 30px);
  font-weight: 800; /* opticky pevnější P1 */
  letter-spacing: clamp(0.03em, 0.6cqi, 0.12em);
  margin-top: clamp(4px, 2cqi, 8px);
  line-height: 1;
  /* Keep inner pill spacious on any size */
  padding: clamp(3px, 1.6cqi, 6px) clamp(6px, 2.6cqi, 12px);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 9999px;
  background: rgba(255,255,255,0.2);
}

/* Větší rozměry na desktopu */
@media (min-width: 992px) {
  /* On larger screens: allow a touch larger text while respecting the container */
  .hero-image-label .hero-label-brand {
    font-size: clamp(14px, 20cqi, 28px);
    letter-spacing: clamp(0.03em, 0.5cqi, 0.1em);
  }
  .hero-image-label .hero-label-sub {
    font-size: clamp(16px, 26cqi, 36px);
    letter-spacing: clamp(0.04em, 0.7cqi, 0.14em);
  }
}

/* Fallback: browsers without container query units (cqi)
   Use viewport-based clamps to ensure desktop text is visibly larger */
@supports not (font-size: 1cqi) {
  .hero-image-label .hero-label-brand {
    font-size: clamp(14px, 2.0vw, 26px);
  }
  .hero-image-label .hero-label-sub {
    font-size: clamp(16px, 2.6vw, 34px);
  }
}

.hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px; /* Zajištění zaoblení vnějších rohů */
}

.hero-image-button {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 23%;
  height: 23%;
  background: var(--active);
  border-radius: 16px; /* Všechny rohy opět stejně zaoblené */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: transform 0.2s;
  z-index: 7; /* above masks and overlay */
  font-size: 1.5rem;
}

.hero-image-button:hover {
  transform: scale(1.05);
  color: white;
}

/* About sekce */
.about-card {
  padding: 2rem;
  border-radius: 24px;
  height: 100%;
}

/* --- Global timeline control (bottom-left) --- */
.p1-global-timeline .gtl-wrap { position: relative; }
.leaflet-control.p1-global-timeline { z-index: 1000; margin: 0 0 24px 24px; }
.p1-global-timeline .gtl-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 9999px; border: none;
  background: #004798; color: #fff; box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}
.p1-global-timeline .gtl-toggle:hover { filter: brightness(1.08); }
.p1-global-timeline .gtl-toggle:focus-visible { outline: 2px solid rgba(102,163,255,0.95); outline-offset: 2px; }
.p1-global-timeline .gtl-toggle i { font-size: 16px; }
.p1-global-timeline .gtl-panel {
  position: absolute; left: 0; bottom: 50px; min-width: 260px;
  background: rgba(255,255,255,0.98); color: #0d2c4f; border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.25);
  padding: 10px 12px; transform: translateY(8px); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.p1-global-timeline .gtl-panel.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.p1-global-timeline .gtl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p1-global-timeline .gtl-row-top { margin-bottom: 8px; }
.p1-global-timeline .gtl-label { font-weight: 700; font-size: 13px; color: #004798; }
.p1-global-timeline .gtl-date { font-weight: 700; font-size: 13px; }
.p1-global-timeline .gtl-reset { border: none; background: transparent; color: #004798; padding: 6px; border-radius: 8px; }
.p1-global-timeline .gtl-reset:hover { background: rgba(13,71,152,0.08); }
.p1-global-timeline .gtl-range { width: 100%; accent-color: #004798; }
/* Caption next to the toggle for better discoverability */
.p1-global-timeline .gtl-caption, .p1-global-timeline .gtl-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    margin-left: 8px;
    padding: 0 12px;
    border: none;
    border-radius: 9999px;
    background: rgba(255,255,255,0.96);
    color: #0d2c4f;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    cursor: pointer;
}
    .p1-global-timeline .gtl-caption:hover, .p1-global-timeline .gtl-more:hover {
        filter: brightness(0.98);
    }
    .p1-global-timeline .gtl-caption:focus-visible, .p1-global-timeline .gtl-more:focus-visible {
        outline: 2px solid rgba(102,163,255,0.95);
        outline-offset: 2px;
    }

@media (max-width: 575.98px) {
    .p1-global-timeline .gtl-caption, .p1-global-timeline .gtl-more {
        height: 48px;
        padding: 0 14px;
        font-size: 15px;
    }
}

@media (max-width: 575.98px) {
  .p1-global-timeline .gtl-panel { min-width: 220px; }
  .p1-global-timeline .gtl-toggle { width: 48px; height: 48px; }
}

/* Search popover */
.search-popover {
  /* Bootstrap popover CSS variables */
  --bs-popover-max-width: 380px;
  --bs-popover-bg: transparent; /* remove outer rectangle */
  --bs-popover-border-color: transparent; /* remove outer border */
  --bs-popover-border-radius: 16px;
  --bs-popover-header-bg: transparent;
  --bs-popover-header-border-bottom-color: transparent;
  --bs-popover-body-padding-x: 0.5rem;
  --bs-popover-body-padding-y: 0.5rem;
  box-shadow: none; /* no outer shadow, only inner pill has shadow via focus */
}

/* Ensure width behaves predictably and adapts */
.popover.search-popover { width: min(90vw, 320px); overflow: visible; }
.popover.search-popover { z-index: 2000; }

.search-popover .popover-body { padding: 0.5rem; }
.search-popover .popover-body { overflow: visible; }

/* Popover arrow colors to match */
/* Hide the popover arrow since we use a pill inside */
.search-popover .popover-arrow { display: none; }

.search-popover { --search-input-h: 44px; }

.search-popover .form-control {
  border: none;
  background: transparent;
  padding: 0 0.9rem;
  box-shadow: none;
  color: #0d2c4f;
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

.search-popover .btn {
  border-radius: 9999px;
}

/* Pill input container */
.search-popover .input-group {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 9999px;
  padding: 4px;
  align-items: stretch;
  height: var(--search-input-h);
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  overflow: visible;
}

.search-popover .input-group:focus-within {
  border-color: #cfe2ff;
  box-shadow: 0 0 0 3px rgba(13, 76, 143, 0.15);
}

.search-popover .search-button {
  background: #0d2c4f;
  color: #fff;
  border: none;
  padding: 0 0.9rem;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.search-popover .search-button:hover {
  filter: brightness(1.06);
}

.search-popover .form-control::placeholder {
  color: #6c757d;
}

/* Awesomplete dropdown within popover */
.search-popover .awesomplete { width: 100%; position: relative; }
.search-popover .awesomplete > ul {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-top: 0;
  padding: 4px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  width: 100%;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 2100;
  max-height: 40vh;
  overflow: auto;
}

.search-popover .awesomplete > ul > li {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.search-popover .awesomplete > ul > li[aria-selected="true"],
.search-popover .awesomplete > ul > li:hover {
  background: #f1f3f5;
}

/* Mobile: make it a bit wider for thumbs */
@media (max-width: 575.98px) {
  .popover.search-popover { width: min(92vw, 320px); }
}

/* Kontejner pro štítek s vyhledávacím filtrem */
.search-filter-container {
  position: sticky;
  top: 70px; /* Výška navigace */
  z-index: 1020; /* Pod navigací, ale nad ostatním obsahem */
  display: flex;
  justify-content: flex-end;
  padding-right: 1rem;
  margin-top: -20px; /* Negativní margin pro přiblížení k navigaci */
  pointer-events: none; /* Aby neblokoval klikání na obsah pod ním */
}

.search-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0d2c4f;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  pointer-events: all; /* Povolí klikání na štítek */
}

.search-filter-tag .btn-close {
  background-color: transparent;
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.8;
}

.search-filter-tag .btn-close:hover {
  opacity: 1;
}

div.awesomplete mark {
  background: transparent; /* Odstranění výchozí žluté barvy */
  font-weight: 600; /* Ztučnění shodujícího se textu */
  color: inherit; /* Dědí barvu z rodiče (li) */
  padding: 0;
}

/* No special mobile slide-out; the same collapsible legend is used on phones */

/* Nové styly pro postranní panel s detailem opravy */
.detail-panel {
  position: absolute;
  top: 50%;
  left: 20px;
  width: 380px;
  max-height: calc(100% - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 2000; /* above Leaflet controls and legend toggle */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translate(-120%, -50%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

.detail-panel.visible {
  transform: translate(0, -50%);
  pointer-events: all;
}

/* Hide mobile-only handle by default (desktop/tablet) */
.detail-panel-handle { display: none; }

/* Mini timeline-only mode: keep panel visible, hide header and non-timeline body */
.detail-panel.minimized .detail-panel-header { display: none; }
.detail-panel.minimized .detail-panel-body > *:not(.detail-timeline) { display: none !important; }
.detail-panel.minimized .detail-panel-body { padding: 0.75rem 1rem; }
.detail-panel.minimized .detail-timeline { margin-top: 0 !important; }

/* Mobile: show detail panel as a bottom sheet fully inside the map */
@media (max-width: 575.98px) {
  .detail-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: calc(100% - 16px); /* fully within map wrapper minus margins */
    transform: translateY(110%); /* slide up from bottom */
    border-radius: 20px;
  }
  .detail-panel.visible {
    transform: translateY(0);
  }
  .detail-panel-body {
    -webkit-overflow-scrolling: touch;
  }
  /* Mobile-only side handle */
  .detail-panel-handle {
    position: absolute;
    right: -4px; /* slightly inside from the edge */
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 48px;
    border-radius: 0 12px 12px 0;
    background: rgba(13,44,79,0.9);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    z-index: 5;
  }
  .detail-panel-handle i { font-size: 14px; }
  .detail-panel-handle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,71,152,0.35);
  }
  /* Peek state: slide panel partially off-screen to the right, keep handle visible */
  .detail-panel.peek {
    transform: translateY(0) translateX(calc(-100% + 36px));
  }
  /* Keep the handle visible on the right even when panel is peeked */
  .detail-panel.peek .detail-panel-handle {
    position: fixed;
    right: 10px;
    left: auto;
    border-radius: 12px;
    z-index: 3000;
  }
}

.detail-panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.detail-route-point {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.detail-route-point input {
  flex-grow: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.detail-route-icon {
  margin-right: 1rem;
  color: #dc3545;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: nowrap; /* keep buttons on one line */
  overflow-x: auto;  /* allow horizontal scroll if too narrow */
  -webkit-overflow-scrolling: touch;
}

.detail-actions .btn {
  flex: 0 0 auto;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* 1) PDF jako primární (tmavá navy) */
.detail-actions .btn:nth-child(1) {
  background-color: #0d2c4f;
  border-color: #0d2c4f;
  color: #fff;
}
.detail-actions .btn:nth-child(1):hover {
  background-color: #0b3a69;
  border-color: #0b3a69;
}

/* 2) Sdílet a 3) Navigovat jako outline secondary */
.detail-actions .btn:nth-child(2),
.detail-actions .btn:nth-child(3) {
  background-color: #fff;
  color: #344054;
  border: 1px solid #d0d5dd;
}
.detail-actions .btn:nth-child(2):hover,
.detail-actions .btn:nth-child(3):hover {
  background-color: #f8fafc;
  color: #1f2937;
  border-color: #c2c8d0;
}

.detail-actions .btn i { font-size: 0.95em; }

/* Malé šířky: pěkné zalomení bez horizontálního scrollu */
@media (max-width: 480px) {
  .detail-actions { justify-content: flex-start; }
}

/* Mobile: avoid horizontal scroll, arrange buttons responsively */
@media (max-width: 575.98px) {
  .detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    overflow-x: visible;
  }
  .detail-actions .btn {
    width: 100%;
    justify-content: center;
    flex: 0 0 auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.95rem;
  }
  /* Make the first (PDF) button span full width on mobile */
  .detail-actions .btn:nth-child(1) {
    grid-column: 1 / -1;
  }
}

/* Branded buttons: Clear filters + Show more on repairs list (blue panel) */
#clear-filters,
#repairs-show-more {
  border-radius: 999px;
  font-weight: 600;
  padding-left: 16px;
  padding-right: 16px;
  border-color: rgba(255,255,255,0.75) !important;
  color: #fff !important;
  backdrop-filter: saturate(140%) blur(2px);
}
#clear-filters:hover,
#repairs-show-more:hover {
  background-color: rgba(255,255,255,0.15) !important;
  border-color: #ffffff !important;
}
#clear-filters:focus-visible,
#repairs-show-more:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.35);
}

/* Make clear-filters background match repairs container blue */
#clear-filters {
  background-color: #004798 !important; /* same as .repairs-container */
  border-color: rgba(255,255,255,0.75) !important;
}
#clear-filters:hover {
  background-color: #003a7a !important; /* slightly darker on hover */
}

/* Ensure 'Zobrazit více' remains readable on white background */
#repairs-show-more {
  background: #ffffff !important;
  color: #004798 !important;
  border-color: #004798 !important;
}
#repairs-show-more:hover {
  background: #f2f6ff !important;
  color: #003a7a !important;
  border-color: #003a7a !important;
}

.detail-panel-body {
  padding: 1.5rem;
  overflow-y: auto;
  /* Hide scrollbar UI but keep scrolling functional */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}
.detail-panel-body::-webkit-scrollbar { /* WebKit */
  width: 0 !important;
  height: 0 !important;
}

.detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d2c4f;
  margin-bottom: 0.25rem;
}

.detail-subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.detail-date {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.detail-description {
  font-size: 0.875rem;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.detail-progress-wrapper {
  position: relative;
  margin-top: 2.5rem; /* Zvětšení horního okraje */
}

.detail-progress-bar {
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.detail-progress-bar-inner {
  height: 100%;
  background-color: #dc3545;
  border-radius: 4px;
}

.detail-progress-label {
  position: absolute;
  top: -35px;
  left: 0; /* Bude upraveno JS */
  transform: translateX(-50%);
  background-color: var(--progress-color, #dc3545);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.detail-progress-label::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--progress-color, #dc3545);
}

.detail-panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e9ecef;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #6c757d;
  cursor: pointer;
  z-index: 2; /* above header contents */
}

/* Nové styly pro patičku */
footer {
  background-color: #fff; /* Pozadí sekce, aby bylo vidět zaoblení */
}

.footer-wrapper {
  position: relative;
  background-color: transparent; /* background is drawn by SVG */
  color: white;
  border-radius: 0; /* visual corners will be drawn by SVG */
  padding: 3rem;
  display: flex;
  justify-content: flex-start; /* Změněno na zarovnání doleva */
  align-items: flex-start;
  gap: 4rem; /* Přidána mezera mezi logy a obsahem */
  overflow: visible; /* umožní "bublinu" sociálních ikon mírně vyjet ven */
}

/* Zaoblený "výkroj" v pravém dolním rohu modrého panelu, aby do něj elegantně zapadla bílá bublina sociálních ikon */
@media (min-width: 992px) {
  .footer-wrapper {
    --notch-w: 120px;        /* šířka výkroje */
    --notch-h: 72px;         /* výška výkroje */
    --notch-radius: 28px;    /* zaoblení vnitřního rohu výkroje */
  }
  /* SVG notch is used instead of ::after */
  .footer-wrapper::after { display: none; }
  .footer-social { z-index: 3; }
}

/* Footer background SVG (rounded outer corners) */
.footer-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* behind content (z=2) but above page background */
  pointer-events: none;
}

/* SVG notch container positioning */
.footer-notch-svg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--notch-w);
  height: var(--notch-h);
  z-index: 1; /* under icons */
  display: none; /* hidden on mobile */
}

@media (min-width: 992px) {
  .footer-notch-svg { display: block; }
}

.footer-logos {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Změněno na zarovnání doleva */
  text-align: left; /* Změněno na zarovnání doleva */
  padding-bottom: 4rem; /* Přidán spodní padding, aby se zabránilo překrytí */
  position: relative;
  z-index: 2;
  flex: 1 1 auto; /* vyplní zbytek šířky vedle log */
  width: 100%;
}

.footer-main {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
}

.footer-main .footer-links { margin-right: auto; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  opacity: 1; /* Změněno z 0.8 na 1 */
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1; /* Změněno z 1 na 1 (efekt zrušen) */
}

.footer-contact {
  margin-bottom: 1.5rem;
}
.footer-contact h6 {
  color: #ffffff;
  font-weight: 700;
}
.footer-contact ul { list-style: none; }
.footer-contact li {
  margin: 0.25rem 0;
  color: #e9ecef;
}
.footer-contact a {
  color: #ffffff;
  text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }

@media (min-width: 992px) {
  .footer-contact { text-align: right; }
  .footer-contact li { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
}

.footer-copyright {
  font-size: 0.875rem;
  opacity: 0.6;
  margin: 0;
}

.footer-social {
  position: absolute;
  bottom: 12px; /* posun nad spodní hranu řezu, aby seděly v "vykroji" */
  right: 12px;
  background: transparent; /* bez bílé kapsle */
  padding: 0.25rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.social-icon {
  width: 42px;
  height: 42px;
  background-color: #0d2c4f;
  color: white;
  border-radius: 10px; /* měkké zaoblení rohů ikon */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.social-icon:hover {
  transform: scale(1.1);
  color: white;
}

@media (max-width: 991.98px) {
  .footer-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  .footer-content {
    align-items: center;
    text-align: center;
  }
  .footer-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
  .footer-social {
    position: relative;
    right: 0;
    bottom: 0;
    width: 100%;
    justify-content: center;
    margin: 0; 
    padding: 0.25rem;
  }
}

/* Styly pro kontaktní formulář */
#contact {
  background-color: #fff;
}

/* --- Hero image interactions & subtle animation --- */
.hero-image-wrapper { perspective: 1000px; }

.hero-image-box {
  overflow: hidden; /* keep zoomed edges clipped */
  transition: box-shadow 400ms ease;
  animation: heroPulse 8s ease-in-out infinite;
}

.hero-image {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: 60% 40%;
  will-change: transform;
}

.hero-image-box:hover .hero-image { transform: scale(1.06) rotateX(2deg) rotateY(-3deg); }

.hero-image-button { transition: transform 300ms ease, box-shadow 300ms ease; }

.hero-image-box:hover .hero-image-button { transform: translateX(4px); }

@keyframes heroPulse {
  0%, 100% { box-shadow: 0 20px 60px rgba(13, 44, 79, 0.08); }
  50% { box-shadow: 0 28px 80px rgba(13, 44, 79, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image-box { animation: none; }
  .hero-image, .hero-image-button { transition: none; }
}

.contact-form-wrapper {
  background-color: #f8f9fa;
  padding: 2.5rem;
  border-radius: 24px;
}

.contact-form-wrapper .form-label {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.contact-form-wrapper .form-control {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  border: 1px solid #dee2e6;
}

.contact-form-wrapper .form-control:focus {
  box-shadow: none;
  border-color: #004798;
}

/* Zvýraznění prvního pole, jak je na obrázku */
.contact-form-wrapper #jmeno {
  border-color: #e57373;
}

.contact-form-wrapper .form-control::placeholder {
  color: #adb5bd;
}

.contact-form-wrapper textarea.form-control {
  min-height: 120px;
}

.btn-submit {
  background-color: #0d2c4f;
  border-color: #0d2c4f;
  border-radius: 16px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: #004798;
}

/* Repairs section header layout */
.repairs-header .badge { white-space: nowrap; }
/* Enlarge and center the note badge next to heading */
.repairs-header { align-items: center; }
.repairs-header #repairs-note .badge { font-size: 1rem; padding: 0.5rem 0.9rem; border-radius: 9999px; }
@media (max-width: 991.98px) {
  .repairs-header h2 { margin-bottom: 0.25rem; }
  .repairs-header { align-items: flex-start; }
  .repairs-header #repairs-note { margin-top: 0.25rem; }
}

@media (min-width: 992px) {
  /* Slight optical alignment tweak for the badge next to the heading */
  .repairs-header #repairs-note { margin-top: 0.25rem; }
}

.contact-text h2 {
  color: #0d2c4f;
}

/* Vlastní styly pro hamburger menu */

/* TEMP: Hide on-map legend control (kept code, just visually hidden). */
#leaflet-map .legend { display: none !important; }
.navbar-toggler {
  border: none;
  padding: 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.burger-menu {
  width: 28px;
  height: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #0d2c4f;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animace na křížek */
.navbar-toggler[aria-expanded="true"] .burger-menu span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .burger-menu span:nth-child(2) {
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .burger-menu span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

/* Styly pro nové značky na mapě */
.map-marker-wrapper {
  position: absolute;
  display: flex;
  align-items: center;
  /* Posuneme celý wrapper tak, aby střed ikony byl na [0,0] */
  transform: translate(-16px, -16px);
}

.map-marker-pin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d2c4f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 10;
}

.map-marker-pin.active { background: var(--active); }
.map-marker-pin.planned { background: var(--plan); }
.map-marker-pin.done { background: var(--done); }
.map-marker-pin.closure { background: var(--closure); }
.map-marker-pin.restriction { background: var(--restriction); }
.map-marker-pin.detour { background: var(--detour); }
.map-marker-pin.end { background: #6c757d; }

.map-marker-label {
  /* Disabled for this iteration: start label rectangles are hidden */
  display: none !important;
}

.show-labels .map-marker-label { display: none !important; }

.label-title {
  font-size: 10px;
  color: #6c757d;
  font-weight: 500;
}

.label-street {
  font-size: 13px;
  font-weight: 600;
  color: #0d2c4f;
}

.custom-div-icon {
  border: none;
  background: none;
}

/* Helmet progress marker */
.helmet-div-icon {
  border: none;
  background: transparent;
}

.helmet-marker-wrapper {
  position: absolute;
  /* anchor bottom-center exactly on the coordinate */
  transform: translate(-50%, -86%);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Let the whole wrapper capture hover to prevent flicker between label/img */
  pointer-events: all;
  cursor: pointer;
}

/* Transparent hitbox to enlarge stable hover area */
.helmet-hitbox {
  position: absolute;
  /* Widen the hoverable area around the helmet and label */
  top: -14px;
  left: -16px;
  right: -16px;
  bottom: -12px;
  pointer-events: all;
}

.helmet-img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  pointer-events: all;
  cursor: pointer;
}

.helmet-label {
  position: relative;
  top: 0;
  transform: none;
  background: #0d2c4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  margin-bottom: 2px; /* menší mezera nad helmou */
  pointer-events: all;
  cursor: pointer;
}

/* zoom-based scaling for helmet */
.leaflet-container.zoom-lvl-16 .helmet-img { width: 34px; height: 34px; }
.leaflet-container.zoom-lvl-16 .helmet-label { font-size: 13px; margin-bottom: 3px; }
/* slight upward nudge at closer zoom */
.leaflet-container.zoom-lvl-16 .helmet-marker-wrapper { transform: translate(-50%, -88%); }

/* extra subtle increase at deeper zoom */
.leaflet-container.zoom-lvl-18 .helmet-img { width: 45px; height: 45px; }
.leaflet-container.zoom-lvl-18 .helmet-label { font-size: 15px; margin-bottom: 5px; }
.leaflet-container.zoom-lvl-18 .helmet-marker-wrapper { transform: translate(-50%, -89%); }

/* XL increase only at very close zoom (detail) */
.leaflet-container.zoom-lvl-19 .helmet-img { width: 68px; height: 68px; }
.leaflet-container.zoom-lvl-19 .helmet-label { font-size: 22px; margin-bottom: 6px; padding: 4px 10px; }
.leaflet-container.zoom-lvl-19 .helmet-marker-wrapper { transform: translate(-50%, -90%); }

/* End-of-route round dot */
.end-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0d2c4f;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.25);
}
.leaflet-container.zoom-lvl-18 .end-dot { width: 14px; height: 14px; }
.leaflet-container.zoom-lvl-19 .end-dot { width: 16px; height: 16px; }

/* Jemné úpravy pro progress bar uvnitř modalu */
#repairDetailModal .detail-progress-wrapper {
  margin: 2.5rem 0; /* větší odsazení, aby nebylo blízko textu */
}

#repairDetailModal .detail-progress-label {
  top: -32px; /* o trochu blíž k textu v modalu */
  white-space: nowrap;
}

/* Map modals: action buttons (PDF / Share / Navigate) */
#howMapModal .map-actions,
#legendModal .map-actions,
#repairDetailModal .map-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#howMapModal .btn-action,
#legendModal .btn-action,
#repairDetailModal .btn-action {
  white-space: nowrap;
}

#howMapModal .btn-action.btn-outline-secondary,
#legendModal .btn-action.btn-outline-secondary,
#repairDetailModal .btn-action.btn-outline-secondary {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  border-color: #ced4da;
  color: #495057;
  background-color: #fff;
}

#howMapModal .btn-action.btn-outline-secondary:hover,
#legendModal .btn-action.btn-outline-secondary:hover,
#repairDetailModal .btn-action.btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
  color: #212529;
}

#howMapModal .btn-action.btn-primary,
#legendModal .btn-action.btn-primary,
#repairDetailModal .btn-action.btn-primary {
  border-radius: 999px;
}

/* Ensure footer areas with actions never cause horizontal overflow */
#howMapModal .modal-footer,
#legendModal .modal-footer,
#repairDetailModal .modal-footer {
  overflow-x: clip;
}

/* Small screens: allow clean wrapping */
@media (max-width: 480px) {
  #howMapModal .map-actions,
  #legendModal .map-actions,
  #repairDetailModal .map-actions {
    justify-content: space-between;
    gap: 0.5rem 0.5rem;
  }
}

/* Leaflet map overlay: action buttons (PDF / Sdílet / Navigovat) */
.leaflet-container .map-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  overflow-x: clip;
}

.leaflet-container .map-actions .btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  padding: 0.5rem 0.75rem;
}

.leaflet-container .map-actions .btn-action i { font-size: 0.95em; }

/* Solid primary (PDF) — dark navy to match map UI */
.leaflet-container .map-actions .btn-primary.btn-action {
  background-color: #0d2c4f;
  border-color: #0d2c4f;
  color: #fff;
}
.leaflet-container .map-actions .btn-primary.btn-action:hover {
  background-color: #0b3a69;
  border-color: #0b3a69;
}

/* Outline secondary (Sdílet, Navigovat) */
.leaflet-container .map-actions .btn-outline-secondary.btn-action {
  background-color: #fff;
  color: #344054;
  border-color: #d0d5dd;
}
.leaflet-container .map-actions .btn-outline-secondary.btn-action:hover {
  background-color: #f8fafc;
  color: #1f2937;
  border-color: #c2c8d0;
}

@media (max-width: 480px) {
  .leaflet-container .map-actions { justify-content: space-between; }
}


