:root {
  --green: #064e3b;
  --green-dark: #043b2d;
  --green-light: #e7f3ef;
  --champagne: #f8e7c9;

  --text: #1f2937;
  --muted: #5f6b67;

  --background: #f8e7c9;
  --card: #fffdf9;

  --border: #e6d8bc;
  --shadow: 0 12px 30px rgba(6, 78, 59, 0.12);

  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
}

/* Seiteninhalt */

.page-content {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 60px 0 80px;
}

.map-introduction,
.map-section,
.map-notice {
  padding: 32px;

  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow: var(--shadow);
}

.map-introduction {
  margin-bottom: 28px;
}

.map-section {
  margin-bottom: 28px;
}

.map-introduction h2,
.map-notice h2 {
  margin-top: 0;
  color: var(--green);
}

.map-introduction p,
.map-notice p {
  margin-bottom: 0;

  color: var(--muted);
  line-height: 1.65;
}

/* Kategorien */

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin-bottom: 24px;
}

.filter-button {
  min-height: 44px;
  padding: 10px 18px;

  border: 1px solid transparent;
  border-radius: 999px;

  background: var(--green-light);
  color: var(--green);

  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.filter-button:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.filter-button.is-active {
  background: var(--green);
  color: #fff;
}

.filter-button:focus-visible,
.reset-button:focus-visible,
}

.filter-loading {
  margin: 0;
  color: var(--muted);
}

/* Werkzeugleiste */

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 18px;
}

.place-count {
  margin: 0;

  color: var(--green);
  font-weight: 700;
}

.reset-button {
  min-height: 44px;
  padding: 10px 18px;

  border: 1px solid var(--green);
  border-radius: 999px;

  background: #fff;
  color: var(--green);

  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;

  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.reset-button:hover {
  background: var(--green);
  color: #fff;
}

/* Karte */

.map,
#map {
  width: 100%;
  height: 650px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow: var(--shadow);
}

/* Leaflet */

.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-popup-content-wrapper {
  overflow: hidden;
  padding: 0;

  border-radius: 14px;

  box-shadow: 0 10px 30px rgba(31, 41, 55, 0.22);
}

.leaflet-popup-content {
  width: 290px !important;
  margin: 0;
}

.dorf-popup {
  overflow: hidden;
  background: #fff;
}

.dorf-popup-image {
  display: block;
  width: 100%;
  height: 165px;

  object-fit: cover;
}

.dorf-popup-content {
  padding: 18px;
}

.dorf-popup-category {
  display: inline-block;
  margin-bottom: 8px;

  color: var(--green);

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dorf-popup h3 {
  margin: 0 0 10px;

  color: var(--green);
  font-size: 1.25rem;
  line-height: 1.25;
}

.dorf-popup-description {
  margin: 0 0 14px;

  color: var(--muted);
  line-height: 1.5;
}

.dorf-popup-details {
  display: grid;
  gap: 8px;
}

.dorf-popup-row {
  font-size: 0.92rem;
  line-height: 1.45;
}

.dorf-popup-row strong {
  color: var(--green);
}

.dorf-popup-row a {
  color: var(--green);
}

.dorf-popup-notice {
  margin-top: 14px;
  padding: 10px 12px;

  background: var(--green-light);
  border-radius: 10px;

  font-size: 0.9rem;
  line-height: 1.45;
}

.dorf-popup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-top: 14px;

  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.dorf-popup-link:hover {
  text-decoration: underline;
}

/* Eigene Marker */

.dorf-marker-wrapper {
  background: transparent;
  border: 0;
}

.dorf-marker {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  color: #fff;
  background: var(--marker-color);

  border: 3px solid #fff;
  border-radius: 50% 50% 50% 10%;

  font-size: 19px;
  font-weight: 700;

  transform: rotate(-45deg);

  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.28);
}

.dorf-marker span {
  transform: rotate(45deg);
}

/* Fehlermeldung */

.map-error {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 30px;
  text-align: center;

  background: var(--card);
}

.map-error h2 {
  margin-top: 0;
  color: var(--green);
}

/* Smartphone */

@media (max-width: 560px) {
  .page-content {
    width: calc(100% - 24px);
    padding: 28px 0 50px;
  }

  .map-introduction,
  .map-section,
  .map-notice {
    padding: 20px;
  }

  .category-filters {
    gap: 8px;
  }

  .filter-button {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 0.9rem;
  }

  .map-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .reset-button {
    width: 100%;
  }

  .map,
  #map {
    height: 480px;
    border-radius: 14px;
  }

  .leaflet-popup-content {
    width: 240px !important;
  }

  .dorf-popup-image {
    height: 135px;
  }
}
