/* TaxiMarkt Gebiete & City Pages Styling with Light & Dark Theme Support */
html:has(body.single-tm_gebiet) {
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body.single-tm_gebiet {
  overflow-x: clip;
}

.tm-city,
.tm-city section,
.tm-city .container,
.tm-city-hero-grid > *,
.tm-city-booking > * {
  min-width: 0;
}

.tm-city-hero {
  background: var(--tm-bg);
  padding: clamp(32px, 5vw, 60px) 0;
  border-bottom: 1px solid var(--tm-line);
}

.tm-city-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.tm-city-hero h1 {
  margin: 12px 0;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.tm-city-hero .lead {
  max-width: 58ch;
  color: var(--tm-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
}

.tm-city-tags,
.tm-city-actions,
.tm-city-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tm-city-tags {
  margin: 22px 0;
}

.tm-city-tags span {
  padding: 8px 14px;
  background: var(--tm-bg-card);
  border: 1px solid var(--tm-line);
  border-radius: 30px;
  font-size: 14px;
  color: var(--tm-ink);
  line-height: 1.4;
}

.tm-city-actions {
  margin-top: 18px;
}

.tm-city-actions .button {
  min-height: 48px;
  text-align: center;
}

.tm-outline-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tm-blue);
  border-radius: 30px;
  padding: 11px 18px;
  text-decoration: none;
  font-weight: 700;
  color: var(--tm-blue);
  background: var(--tm-bg-card);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.tm-outline-btn:hover {
  background: var(--tm-blue);
  color: #ffffff;
}

.tm-box {
  background: var(--tm-bg-card);
  border: 1px solid var(--tm-line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--tm-card-shadow);
  color: var(--tm-ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.tm-city .section h2 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.tm-city .section > .container > p {
  color: var(--tm-muted);
  line-height: 1.65;
}

.tm-hero-box .tm-route-calculator {
  box-shadow: none;
  max-width: 100%;
  padding: clamp(16px, 2vw, 24px);
}

.tm-hero-box .tm-calc-heading h2 {
  margin-bottom: 8px;
}

.tm-hero-box .tm-calc-heading h2 {
  font-size: 1.45rem;
}

.tm-city-nav {
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
  border-bottom: 1px solid var(--tm-line);
}

.tm-city-nav a {
  font-weight: 650;
  color: var(--tm-ink);
}

.tm-city-nav a:hover {
  color: var(--tm-blue);
}

.tm-city-prose {
  max-width: 850px;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.tm-city-detail-card {
  max-width: none;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
}

.tm-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.tm-table-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  margin: 22px 0;
  border-radius: 14px;
  border: 1px solid var(--tm-line);
}

.tm-table-scroll:focus {
  outline: 3px solid var(--tm-blue-glow);
  outline-offset: 3px;
}

.tm-data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tm-bg-card);
  min-width: 650px;
  color: var(--tm-ink);
}

.tm-data-table th,
.tm-data-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.tm-data-table th,
.tm-data-table td {
  border-bottom: 1px solid var(--tm-line);
  padding: 13px;
  text-align: left;
}

.tm-data-table th {
  background: var(--tm-bg-soft);
  color: var(--tm-ink-heading);
  font-weight: 750;
}

.tm-faq {
  border-bottom: 1px solid var(--tm-line);
  padding: 18px 0;
  color: var(--tm-ink);
}

.tm-faq summary {
  cursor: pointer;
  font-weight: 750;
  color: var(--tm-ink-heading);
  line-height: 1.5;
}

.tm-city-booking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tm-areas input[type="search"],
.tm-city input[data-route-filter] {
  display: block;
  box-sizing: border-box;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--tm-input-border);
  border-radius: 12px;
  background: var(--tm-input-bg);
  color: var(--tm-input-text);
  width: 100%;
  max-width: 430px;
}

.tm-city [hidden],
.tm-areas [hidden] {
  display: none !important;
}

@media (max-width: 850px) {
  .tm-city-hero-grid,
  .tm-city-booking {
    grid-template-columns: 1fr;
  }

  .tm-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tm-hero-box {
    width: 100%;
  }
}

@media (max-width: 550px) {
  .tm-city .section {
    padding-block: 10px;
  }

  .tm-card-grid {
    grid-template-columns: 1fr;
  }

  .tm-city-hero {
    padding: 28px 0 36px;
  }

  .tm-city-hero-grid {
    gap: 22px;
  }

  .tm-box {
    padding: 16px;
  }

  .tm-city-tags {
    gap: 8px;
    margin: 18px 0;
  }

  .tm-city-tags span {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .tm-city-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tm-city-actions .button {
    width: 100%;
  }

  .tm-hero-box .tm-route-calculator {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .tm-city .tm-calc-result {
    padding: 16px;
  }

  .tm-data-table {
    min-width: 600px;
  }

  .tm-data-table th,
  .tm-data-table td {
    padding: 11px 10px;
    font-size: 0.9rem;
  }

  .tm-city-nav {
    gap: 12px;
  }
}
