/* ===== FONTY ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, FEFF, U+FFFD;
}

/* ===== PROMĚNNÉ ===== */
:root {
  --color-accent:     #22c55e;
  --color-bg:         #f5f5f5;
  --color-surface:    #e8e8e8;
  --color-text:       #1a1714;
  --color-text-muted: #7a7168;
  --color-border:     #e0d8cc;
  --color-cta-bg:     #4A3220;
  --color-cta-text:   #faf8f5;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: linear-gradient(160deg, #faf8f5 0%, #f5eedc 40%, #f2e6de 100%);
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
}


/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #4A3220;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.logo-tld {
  font-weight: 500;
  font-size: 0.55em;
  color: var(--color-text-muted);
  vertical-align: baseline;
}
.logo-claim {
  font-weight: 400;
  font-size: 0.6rem;
  color: #5a4a3a;
  letter-spacing: 0.01em;
  margin-top: -0.1rem;
  text-align: center;
  padding-right: 1.4rem;
}
.logo-block {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.logo-block h1 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4A3220;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: text-decoration 0.2s ease;
  white-space: nowrap;
}
nav a:hover {
  text-decoration: underline;
}
nav a.nav-cta {
  font-weight: 700;
  color: var(--color-cta-text);
  background-color: var(--color-cta-bg);
  padding: 0.65rem 1.25rem;
  border-radius: 100px;
  margin-left: 0.5rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
nav a.nav-cta:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: var(--color-cta-text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== MAPA ===== */
.map-wrap {
  width: 100%;
  max-width: 100vw;
  height: calc(100vh - 73px - 60px);
  margin: 0 auto;
  padding: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
svg#map {
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  transition: none;
  -webkit-tap-highlight-color: transparent;
}
.specialty-marker {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Klikatelné krajové oblasti */
.region-area {
  fill: transparent;
  stroke: transparent;
  cursor: default;
}

/* Tooltip */
#tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s;
  max-width: 260px;
  font-size: 13px;
  line-height: 1.4;
}
#tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
#tooltip .tt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
#tooltip .tt-name {
  font-weight: 700;
  color: #4A3220;
  font-size: 14px;
  margin-bottom: 3px;
}
#tooltip .tt-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
  #tooltip.pinned .tt-close {
    display: block;
  }
}
#tooltip .tt-desc {
  color: var(--color-text);
}
#tooltip .tt-detail {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--color-cta-text);
  background-color: var(--color-cta-bg);
  padding: 5px 14px;
  border-radius: 100px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: box-shadow 0.2s ease;
}
#tooltip .tt-detail:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: underline;
}
#tooltip.cluster .tt-detail {
  display: none;
}
.tt-cluster-item {
  padding: 4px 0;
  cursor: pointer;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.15s;
}
.tt-cluster-item:last-child {
  border-bottom: none;
}
.tt-cluster-item:hover {
  background: #EDE3D4;
  text-decoration: underline;
}

/* Města na mapě */
.city-label-major {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  fill: #4A3220;
  pointer-events: none;
  text-anchor: middle;
}
.city-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  fill: #6B4F3A;
  pointer-events: none;
  text-anchor: middle;
}

/* Speciality markery */
.spec-emoji {
  text-anchor: middle;
  font-size: 16px;
  pointer-events: none;
}
/* Zoom ovládání (styl Google Maps) */
.zoom-controls {
  position: absolute;
  bottom: 60px;
  right: 40px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  overflow: hidden;
}
.zoom-controls button {
  width: 40px;
  height: 40px;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #666;
  font-size: 18px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.zoom-controls button:hover {
  background: #f0f0f0;
  color: #333;
}
.zoom-controls button:active {
  background: #e0e0e0;
}
.zoom-controls button + button {
  border-top: 1px solid #e6e6e6;
}
.zoom-controls svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Mapové ovládací tlačítka (styl Google Maps) */
.map-btn {
  position: absolute;
  right: 40px;
  z-index: 100;
  width: 40px;
  height: 40px;
  background: #fff;
  border: none;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #666;
  transition: background 0.15s, color 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.map-btn:hover {
  background: #f0f0f0;
  color: #333;
}
.map-btn:active {
  background: #e0e0e0;
}
.map-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
#fullscreen-btn { bottom: 148px; }

/* Fullscreen režim */
.map-wrap:fullscreen {
  background: linear-gradient(160deg, #faf8f5 0%, #f5eedc 40%, #f2e6de 100%);
}

/* ===== TEASER POD MAPOU ===== */
.map-teaser {
  text-align: center;
  padding: 1.25rem 1.5rem;
}
.map-teaser p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.map-teaser strong {
  color: var(--color-text);
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
/* ===== RESPONSIVE ===== */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
  /* 1. Kompaktnější header */
  .nav-inner {
    padding: 0 0.5rem 0 0.75rem;
    height: 48px;
  }
  .logo {
    font-size: 1.4rem;
  }
  .logo-claim {
    display: none;
  }
  header nav {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, #faf8f5 0%, #f5eedc 40%, #f2e6de 100%);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1.5rem;
    gap: 0.25rem;
    border-top: 1px solid var(--color-border);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  header nav.open {
    transform: translateX(0);
  }
  header nav a {
    font-size: 1.2rem;
    padding: 0.75rem 0;
  }
  header nav a.nav-cta {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  /* 2. Mapa — kompaktní, bez mrtvého prostoru pod obrysem */
  .map-wrap {
    height: calc(100vh - 48px - 200px);
    height: calc(100dvh - 48px - 200px);
  }
  svg#map {
    height: 100%;
    aspect-ratio: unset;
  }
  svg#map .country-border {
    stroke-width: 2.8;
  }

  /* 3. Texty měst */
  .city-label {
    font-size: 12px !important;
  }
  .city-label-major {
    font-size: 16px !important;
  }

  /* 5. Dotykové prvky 44x44px */
  .map-btn {
    right: 12px;
    width: 44px;
    height: 44px;
  }
  .map-btn svg {
    width: 18px;
    height: 18px;
  }
  #fullscreen-btn { bottom: 108px; }
  .zoom-controls {
    bottom: 12px;
    right: 12px;
  }
  .zoom-controls button {
    width: 44px;
    height: 44px;
  }
  .zoom-controls svg {
    width: 18px;
    height: 18px;
  }

  /* 6. Tooltip — bottom sheet */
  #tooltip {
    bottom: 0;
    left: 0;
    right: 0;
    top: auto !important;
    left: 0 !important;
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }
  #tooltip.visible {
    transform: translateY(0);
  }
  #tooltip.pinned .tt-close {
    display: flex !important;
    font-size: 22px;
    min-width: 44px;
    min-height: 44px;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 2px;
  }
  #tooltip .tt-name {
    font-size: 16px;
  }
  #tooltip .tt-desc {
    font-size: 14px;
    line-height: 1.5;
  }
  #tooltip .tt-detail {
    font-size: 13px;
    padding: 8px 20px;
    margin-top: 12px;
  }

  .nav-toggle {
    display: block;
  }
  .footer-inner {
    padding: 1.25rem 1.5rem;
  }
}
