/* === Reset & Basics === */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #f7f9fb;
  color: #222;
  line-height: 1.6;
}

/* === Header === */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #fff;
  padding: 18px 20px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.branding {
  display: flex;
  align-items: center;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 2.5px;
}

.globe-icon {
  font-size: 1.8rem;
  margin-right: 10px;
  color: #22d3ee; /* Türkis-Akzent */
}

/* === Headings === */
h1 {
  text-align: center;
  font-size: 2 rem;
  font-weight: 700;
  color: #0f172a;
  margin: 25px 0 10px 0;
  background: linear-gradient(90deg, #0284c7, #22d3ee);
  background-clip: text;                /* Standard */
  -webkit-background-clip: text;        /* WebKit */
  -webkit-text-fill-color: transparent; /* Für Chrome/Safari */
  color: transparent;                   /* Für Firefox */
}

h3 {
  text-align: center;
  font-weight: 400;
  color: #334155;
  margin: 0 auto 40px auto;
}

a {
  text-align: center;
}

/* === Layout === */
.page-layout {
  display: flex;
  gap: 20px;
  margin: 20px;
  justify-content: center;
}

.content, .content_info {
  flex: 1 1 1200px;
  max-width: 1200px;
  margin: 0 auto;
}

/* === Ads === */
.ad {
  width: 160px;
  background: #f1f5f9;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.ad-mobile {
  display: none;
}

/* === Filters === */

.filters form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap; /* falls auf Mobile umbricht */
  justify-content: center; /* zentriert auf mobilen Geräten */
}

.filters select {
  flex: 1 1 250px;     /* gleiche Mindestbreite für beide */
  padding: 10px;
  min-width: 180px;    /* verhindert zu schmale Darstellung auf Mobile */
  box-sizing: border-box; /* sorgt dafür, dass padding in die Breite eingerechnet wird */
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background-color: #fff;
  transition: all 0.2s ease;
}

.filters select:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

/* === Action Button === */
.action-button {
  background: linear-gradient(90deg, #0284c7, #22d3ee);
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 42px;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

/* === Map === */
.map-wrapper {
  display: flex;
  justify-content: center;
  margin: 25px 0;
}

#map {
  width: 100%;
  max-width: 1200px;
  height: 550px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* === Info Text === */
.info-text {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 30px;
}

.info-text p {
  font-size: 0.98rem;
  color: #334155;
}

/* === Footer === */
footer {
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9rem;
}

footer nav a {
  color: #38bdf8;
  text-decoration: none;
  margin: 0 8px;
}

footer nav a:hover {
  text-decoration: underline;
}

/* === Detail Header === */

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 15px;
  flex-wrap: wrap; /* wichtig für mobiles Umbruchverhalten */
}

.detail-header .titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-header h1,
.detail-header h3 {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.detail-header h1 {
  font-size: 1.6rem;
}

.detail-header h3 {
  font-size: 1.2rem;
  font-weight: 500;
  color: #334155;
}

.new-search {
  background: linear-gradient(90deg, #0284c7, #22d3ee);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.new-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}



/* === Person Text === */
.person-text {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin: 30px 0;
}

/* === 2-Spalten-Layout: eventDescription + eventSummary === */

.event-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 40px;
  position: relative;
}

.event-layout::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #e2e8f0; /* dezente graue Linie */
  transform: translateX(-50%);
}

.event-text, .event-summary {
  background: #fff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 1;
}

.event-text p, .summary-block {
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* === Tabellen-Styling (event-summary) === */
.event-summary table {
  width: 100%;
  border-collapse: collapse;
}

.event-summary th,
.event-summary td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

/* Spaltenausrichtung für THs */
.event-summary th:first-child { text-align: left; }   /* Kontinent */
.event-summary th:nth-child(2) { text-align: left; }  /* Besuche/Länder */
.event-summary th:last-child { text-align: center; }  /* Städte gesamt */

/* Spaltenausrichtung für TDs */
.event-summary td:first-child { text-align: left; }
.event-summary td:nth-child(2) { text-align: left; }
.event-summary td:last-child { text-align: center; }

/* für Impressum und Datenschutz */

.back-home {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #0284c7;
  font-weight: 600;
  transition: color 0.2s ease;
}

.back-home:hover {
  color: #0369a1;
  text-decoration: underline;
}

.error-page {
  text-align: center;
  padding: 80px 20px;
}

.error-page h1 {
  font-size: 2rem;
  color: #0f172a;
  margin-bottom: 20px;
}

.error-page p {
  color: #475569;
  margin-bottom: 30px;
  font-size: 1rem;
}

/* --- Map Tooltip Styling (mit Scrollbereich) --- */
.maplibregl-popup {
  max-width: 280px;
  font-family: system-ui, sans-serif;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.maplibregl-popup-content {
  background: #fff;
  padding: 10px 14px;
  font-size: 0.75rem;
  line-height: 1.1;
  border-radius: 10px;
  color: #333;
  animation: fadeIn 0.2s ease-in-out;
}

/* Überschrift (Ort + Land) */
.maplibregl-popup-content strong {
  display: block;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 6px;
}

/* Scrollbarer Bereich */
.maplibregl-popup-content .popup-scroll {
  max-height: 120px;  /* Höhe, ab der gescrollt wird */
  overflow-y: auto;
  padding-right: 6px;
}

/* Optional: schöner Scrollbalken */
.maplibregl-popup-content .popup-scroll::-webkit-scrollbar {
  width: 6px;
}
.maplibregl-popup-content .popup-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 3px;
}
.maplibregl-popup-content .popup-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.35);
}

/* sanfte Einblendung */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* === Mobile === */
@media (max-width: 760px) {
  .ad-left, .ad-right { display: none; }
  .ad-mobile { display: block; margin-top: 15px; }

.content_info {
  margin-left: 15px;
  margin-right: 15px;
}
  h1 { font-size: 1.6rem; }
  h3 { font-size: 1rem; }
  .filters form { flex-direction: column; }

  .filters select {
    flex: 1 1 auto;
    width: 100%;
    max-width: 380px; /* verhindert zu breite Dropdowns */
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filters form {
    flex-direction: column;
    align-items: stretch; /* volle Breite auf Mobile */
  }
  .detail-header {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .new-search {
    justify-self: start;
    margin-top: 10px;
  }

  .event-layout {
    grid-template-columns: 1fr;
  }
  
  .event-layout::before {
    display: none; /* Linie entfernen auf Mobile */
  }

    .detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .detail-header .titles {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .new-search {
    display: block;
    width: 100%;
    max-width: 300px;
    text-align: center;
    padding: 12px 0;
  }
}


