/* ==========================================================================
   ALTE HÖLLE FESTIVAL — GLOBALE STYLES
   Alle Farben/Fonts als Variablen — hier ändern, wirkt sich überall aus.
   ========================================================================== */

@font-face {
  font-family: 'Super Fashion';
  src: url('../fonts/Super_Fashion.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barata Display';
  src: url('../fonts/BarataDisplay-Regular-_.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Source Code Pro — lokal gehostet, Standard-Body-Schrift */
@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/source-code-pro-v31-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/source-code-pro-v31-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/source-code-pro-v31-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/source-code-pro-v31-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Code Pro';
  src: url('../fonts/source-code-pro-v31-latin-700italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Farben */
  --color-bg: rgb(237, 177, 202);
  --color-accent-1: rgb(11, 26, 218);
  --color-accent-2: rgb(219, 89, 153);
  --color-accent-3: rgb(247, 214, 148); /* warmes Pastellgelb, hier bei Bedarf exakt anpassen */
  --color-accent-4: rgb(173, 201, 255); /* helles Pastellblau, passend zur Kartenillustration */
  --color-accent-5: rgb(247, 150, 214); /* Hot Pink, für Genre-Kategorie "Aktion" */
  --color-accent-6: rgb(160, 60, 200); /* Pastellviolett, für Genre-Kategorie "Kino" */
  --color-accent-7: rgb(240, 200, 160); /* dunkleres Gelb, für Genre-Kategorie "Vortrag" */
  --color-accent-8: rgb(60, 75, 255); /* dunkleres Gelb, für Genre-Kategorie "Vortrag" */
  --color-accent-9: rgb(130, 170, 230); /* dunkleres Gelb, für Genre-Kategorie "Vortrag" */
  --color-text: #1a1a1a;
  --color-surface: #ffffff;
  --color-surface-soft: #fdf1f5;

  /* Fonts */
  --font-heading: 'Barata Display', sans-serif;
  --font-body: 'Source Code Pro', monospace;
  --font-note: 'Barata Display', sans-serif;

  /* Layout */
  --nav-height: 72px;
  --radius-card: 20px;
  --radius-btn: 999px;
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.18);
  --schedule-header-h: 40px;
  --schedule-px-per-hour: 80px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   GLOBALE TEXTSTILE
   Nur diese Klassen im Markup verwenden — Größen je Seite ggf. überschreiben.
   ========================================================================== */

.heading {
  font-family: var(--font-heading);
  color: var(--color-accent-1);
  text-transform: lowercase;
  margin: 0 0 0.3em 0;
  line-height: 1.05;
  font-size: 1.8rem;
  letter-spacing: 0.01em;
}

.subheading {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-accent-2);
  margin: 0 0 0.5em 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.text {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0 0 1em 0;
  font-size: 1rem;
}

.link {
  font-family: var(--font-body);
  color: var(--color-accent-1);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  color: var(--color-accent-2);
}

.note {
  font-family: var(--font-note);
  color: var(--color-accent-2);
  text-transform: lowercase;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-surface);
  background: var(--color-accent-1);
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.7em 1.6em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--color-accent-2);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent-1);
  border: 2px solid var(--color-accent-1);
}

.btn--outline:hover {
  background: var(--color-accent-1);
  color: var(--color-surface);
}

.btn--selected {
  background: var(--color-accent-2);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent-1);
  border: 3px solid var(--color-surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-icon:hover {
  background: var(--color-accent-2);
  transform: scale(1.08);
}

.btn-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--color-surface);
}

.btn-icon svg.icon-outline {
  fill: none;
  stroke: var(--color-surface);
}

.btn-icon--pin {
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.btn-icon--pin svg {
  transform: rotate(45deg);
}

.btn-icon--pin:hover {
  transform: rotate(-45deg) scale(1.08);
}

/* ==========================================================================
   NAVIGATIONSLEISTE (immer sichtbar, unten fixiert)
   ========================================================================== */

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-accent-1);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  z-index: 500;
}

.nav-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--color-surface);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-bar__item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--color-surface);
  stroke-width: 1.8;
}

.nav-bar__item.is-active {
  color: var(--color-accent-2);
}

.nav-bar__item.is-active svg {
  stroke: var(--color-accent-2);
}

/* Platzhalter, damit Seiteninhalt nicht unter der Nav-Leiste verschwindet */
.page-content {
  padding-bottom: calc(var(--nav-height) + 16px);
}

/* ==========================================================================
   POPUP (gleiches Design auf Guide / Karte / Zeitplan)
   ========================================================================== */

/* Solange ein Popup offen ist: nur im Popup scrollen, Hintergrund fixieren */
body.has-popup {
  overflow: hidden;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--nav-height);
  background: rgba(26, 26, 26, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 600;
  pointer-events: none;
  padding: 0 12px;
}

.popup-overlay.is-open {
  display: flex;
  pointer-events: auto;
}

.popup-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 560px;
  max-height: 88%;
  margin-bottom: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding: 1.6rem 1.4rem 1.6rem 1.4rem;
  box-shadow: var(--shadow-soft);
  animation: popup-slide-up 0.2s ease-out;
}

@keyframes popup-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.popup-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: -32px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface-soft);
  color: var(--color-accent-1);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease;
}

.popup-close:hover,
.popup-close:focus-visible {
  background: var(--color-accent-2);
  color: var(--color-surface);
}

.popup-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.popup-photo {
  width: 100%;
  height: auto;
  max-height: 30vh;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.popup-photo--section {
  margin-top: 0.4rem;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

/* Wenn kein Foto vorhanden ist, wird .popup-photo gar nicht erst ins DOM
   eingefügt (siehe script.js) — dadurch entsteht kein Leerraum. */

/* ==========================================================================
   SPRACH-BUTTON (DE/EN)
   ========================================================================== */

.lang-switch {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 550;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-surface);
  color: var(--color-accent-1);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.lang-switch:hover {
  background: var(--color-accent-2);
  color: var(--color-surface);
}

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

.landing {
  height: calc(100vh - var(--nav-height));
  height: calc(100svh - var(--nav-height));
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
  position: relative;
}

.landing__image {
  height: 100%;
  width: 100%;
  max-width: none;
  object-fit: cover;
  object-position: top center;
}

/* ==========================================================================
   GUIDE-SEITE
   ========================================================================== */

.guide-page {
  padding: 1.6rem 0 calc(var(--nav-height) + 24px) 0;
}

.guide-intro {
  padding: 0 2.1rem;
  color: var(--color-accent-1);
}

.guide-page .page-title {
  padding: 0 2.1rem;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 1.2rem 0.9rem 0 0.9rem;
}

.guide-button {
  display: block;
  position: relative;
  min-height: 220px;
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.guide-button__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.2rem;
  pointer-events: none;
}

.guide-button__title {
  font-family: 'Super Fashion', sans-serif;
  text-transform: uppercase;
  color: var(--color-accent-1);
  font-size: 1.35rem;
  -webkit-text-stroke: 5px var(--color-surface);
  paint-order: stroke fill;
  text-shadow: 0 0 6px var(--color-surface), 0 0 6px var(--color-surface);
}

.guide-button__arrow {
  font-family: var(--font-body);
  color: var(--color-accent-2);
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: 0.6rem;
  -webkit-text-stroke: 4px var(--color-surface);
  paint-order: stroke fill;
  text-shadow: 0 0 5px var(--color-surface), 0 0 5px var(--color-surface);
}

.guide-button__illustration {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
}

.guide-button__illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide-button__illustration svg {
  width: 64px;
  height: 64px;
  color: var(--color-accent-2);
  opacity: 0.55;
}

/* ==========================================================================
   KARTEN-SEITE
   ========================================================================== */

.map-page {
  height: calc(100vh - var(--nav-height));
  height: calc(100svh - var(--nav-height));
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #2a2a2a;
}

.map-scroll {
  height: 100%;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  position: relative;
}

.map-canvas {
  position: relative;
  height: 100%;
  transform-origin: top left;
}

.map-canvas img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.map-marker {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 10;
}

.map-marker__icon-anchor {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
}

.map-marker__label {
  position: absolute;
  left: 0;
  top: 8px;
  transform: translate(-50%, 0);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: var(--radius-btn);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

/* pin: null ohne icon -> kein Marker-Grafik, Label sitzt zentriert direkt
   auf dem x/y-Punkt statt (wie sonst) unterhalb eines Pins. */
.map-marker--label-only .map-marker__label {
  top: 0;
  transform: translate(-50%, -50%);
}

.map-marker--highlighted .btn-icon {
  background: var(--color-accent-2);
}

/* --- Handgezeichnete PNG-Pins (mit "alt"-Version fürs Hervorheben) --- */
.map-pin {
  position: relative;
  display: block;
  height: 46px;
  width: 46px; /* Platzhalter, wird per JS exakt nach Bildverhältnis gesetzt */
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

.map-pin__img {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  transition: opacity 0.15s ease;
}

.map-pin__img--alt {
  opacity: 0;
}

.map-marker.is-selected .map-pin__img--alt {
  opacity: 1;
}

.map-marker.is-selected .map-pin__img--normal {
  opacity: 0;
}

/* Hover-Bildwechsel NUR auf Geräten mit echtem Zeiger (Maus). Auf Touch würde
   sonst der erste Tap nur den Hover auslösen und man müsste zweimal tippen. */
@media (hover: hover) {
  .map-pin:hover .map-pin__img--alt {
    opacity: 1;
  }
  .map-pin:hover .map-pin__img--normal {
    opacity: 0;
  }
}

/* Zoom-Pille unten rechts: manuelle Alternative zu Pinch/Wheel */
.map-zoom-pill {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--nav-height) + 1rem);
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-btn);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.map-zoom-pill__btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--color-accent-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.map-zoom-pill__btn:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.map-zoom-pill__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-surface);
  stroke-width: 2.2;
}

.map-zoom-pill__btn:hover {
  background: var(--color-accent-2);
}

.map-zoom-pill__btn:disabled {
  opacity: 0.4;
  cursor: default;
  background: var(--color-accent-1);
}

/* ==========================================================================
   ZEITPLAN-SEITE
   ========================================================================== */

.schedule-page {
  padding-top: 1.2rem;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
}

.schedule-header {
  flex-shrink: 0;
  padding-bottom: 1.2rem;
}

.schedule-intro {
  padding: 0 1.2rem;
  color: var(--color-accent-1);
}

.selector-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.3rem 1.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.selector-row::-webkit-scrollbar {
  display: none;
}

.selector-row .btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 0.4em 0.9em;
}

.selector-label {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  opacity: 0.55;
  margin-right: 0.3rem;
  white-space: nowrap;
}

.schedule-scroll-area {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  background: var(--color-surface-soft);
  padding-bottom: var(--nav-height);
}

.schedule-grid {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
}

.schedule-timeline {
  position: sticky;
  left: 0;
  z-index: 20;
  flex-shrink: 0;
  width: 52px;
  background: var(--color-surface-soft);
  border-right: 1px dashed rgba(0, 0, 0, 0.12);
}

.schedule-timeline__hour {
  position: absolute;
  left: 0;
  width: 100%;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-text);
  opacity: 0.55;
  text-align: center;
  transform: translateY(-50%);
}

.schedule-columns {
  position: relative;
  display: flex;
}

.schedule-column {
  width: 150px;
  flex-shrink: 0;
  position: relative;
  border-left: 1px dashed rgba(0, 0, 0, 0.12);
}

.schedule-column__header {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--color-accent-1);
  color: var(--color-surface);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
  height: var(--schedule-header-h);
  line-height: var(--schedule-header-h);
  overflow: hidden;
  padding: 0 0.3rem;
}

.schedule-timeline__header-spacer {
  position: sticky;
  top: 0;
  z-index: 16;
  height: var(--schedule-header-h);
  background: var(--color-accent-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-timeline__header-spacer svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-surface);
}

.schedule-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.schedule-block {
  position: absolute;
  left: 4px;
  right: 4px;
  background: var(--color-accent-2);
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--color-surface);
}

.schedule-block--light {
  color: var(--color-text);
}

.schedule-block__time {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.68rem;
  opacity: 0.9;
}

.schedule-block__artist {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: lowercase;
  line-height: 1.1;
}

.schedule-block__genre {
  font-family: var(--font-body);
  font-size: 0.65rem;
  opacity: 0.85;
}

/* ==========================================================================
   HILFSKLASSEN
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Element bleibt im Markup/JS erhalten, wird aber nicht angezeigt (z.B. Zeitplan-Titel
   und Art-Filterzeile, aktuell ausgeblendet für mehr Platz im Raster) */
.is-hidden {
  display: none;
}

.page-title {
  padding: 0 1.2rem;
  font-size: 2.4rem;
  font-family: 'Super Fashion', sans-serif;
  text-transform: uppercase;
  -webkit-text-stroke: 6px var(--color-surface);
  paint-order: stroke fill;
  text-shadow: 0 0 8px var(--color-surface), 0 0 8px var(--color-surface);
}
