/* =========================================================
   Refactor Overrides
   ========================================================= */

:root {
  /* Spacing / timing */
  --ref-transition-fast: 0.35s ease;
  --ref-gap-m: 12px;
  --ref-gap-l: 22px;
  --ref-gap-xl: 24px;

  /* Radius */
  --ref-radius-s: 12px;
  --ref-radius-m: 18px;
  --ref-radius-l: 22px;
  --ref-radius-xl: 24px;
  --ref-radius-round: 999px;

  /* Shadows */
  --ref-shadow-card: 0 10px 28px rgba(0, 0, 0, 0.08);
  --ref-shadow-card-strong: 0 10px 30px rgba(0, 0, 0, 0.08);
  --ref-shadow-popover: 0 10px 26px rgba(0, 0, 0, 0.22);
  --ref-shadow-fab: 0 8px 18px rgba(0, 0, 0, 0.22);

  /* Surfaces */
  --ref-surface-card: #f5f5f7;
  --ref-surface-map: #e9e9e9;
  --ref-surface-poi: #ddd;
  --ref-surface-glossary-light: #fff;
  --ref-surface-glossary-dark: #111;

  /* Text / border */
  --ref-text-muted: #555;
  --ref-text-dark: #222;
  --ref-border-light: #ccc;

  /* Accent colors */
  --ref-accent-dark: #111;
  --ref-accent-dark-hover: #333;
  --ref-accent-close: #ef4b78;
  --ref-accent-glossary-youtube: #a61f2d;
  --ref-accent-glossary-person: #8e1b44;

  /* Sizes */
  --ref-map-min-height: 560px;
  --ref-map-min-height-mobile: 420px;
  --ref-person-poi-min-height: 300px;

  --ref-close-btn-size: 86px;
  --ref-close-btn-font-size: 64px;
  --ref-close-btn-top: 20px;
  --ref-close-btn-right: 28px;

  --ref-close-btn-size-mobile: 62px;
  --ref-close-btn-font-size-mobile: 44px;
  --ref-close-btn-top-mobile: 12px;
  --ref-close-btn-right-mobile: 14px;

  --ref-youtube-play-size: 84px;
  --ref-glossary-popover-max-width: 320px;
  --ref-glossary-close-font-size: 22px;
}

/* =========================================================
   Global / small overrides
   ========================================================= */

h1 {
  column-span: all;
}

/* =========================================================
   Navigation
   ========================================================= */

.nav-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 5px 30px;
  box-sizing: border-box;
  list-style: none;
}

.nav-menu li {
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-nav-menu);
  list-style: none;
}

.nav-menu li > a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 0;
  border-radius: 0;
  cursor: pointer;

  color: var(--color-nav-menu);
  font-family: 'proxima-nova', sans-serif;
  font-size: 35px;
  text-decoration: none;

  transition:
    background-color var(--ref-transition-fast),
    color var(--ref-transition-fast);
}

.nav-menu li > a:hover,
.nav-menu li > a:focus {
  background-color: #ddd;
  color: #000;
  outline: none;
}

.nav-menu li > a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

@media screen and (max-width: 750px) {
  .nav-menu ul {
    padding: 10px 5px;
  }

  .nav-menu li > a {
    font-size: 25px;
  }
}

/* =========================================================
   Footer navigation
   ========================================================= */

.presentation-footer-nav {
  width: 100%;
}

.ref-footer-nav {
  display: flex;
  align-items: center;
  gap: var(--ref-gap-m);
}

.ref-footer-nav .footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

.ref-footer-nav .footer-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =========================================================
   Touren
   ========================================================= */

.tour-overview-container,
.tour-detail-container,
.poi-map-container {
  max-width: 1200px;
}

.tour-intro h1 {
  margin-bottom: 12px;
}

.tour-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ref-gap-xl);
  margin-top: 24px;
}

.tour-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-radius: var(--ref-radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--ref-shadow-card);
}

.tour-card-kicker,
.tour-mode-label {
  margin: 0 0 8px;
  color: var(--ref-text-muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tour-card-title {
  margin: 0 0 12px;
}

.tour-card-text p:last-child,
.tour-description p:last-child {
  margin-bottom: 0;
}

.tour-card-link,
.tour-overview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--ref-radius-round);
  background: var(--ref-accent-dark);
  color: #fff;
  text-decoration: none;
}

.tour-card-link:hover,
.tour-card-link:focus,
.tour-overview-link:hover,
.tour-overview-link:focus {
  background: var(--ref-accent-dark-hover);
}

.tour-map-fallback,
.poi-map-fallback {
  padding: 24px;
}

.tour-overview-link-wrap {
  margin-top: 24px !important;
}

.ref-tour-map-wrapper,
.ref-poi-map-wrapper {
  padding: 0 30px;
}

.ref-tour-map-wrapper #map_wrapper,
.ref-poi-map-wrapper #map_wrapper {
  min-height: var(--ref-map-min-height);
  overflow: hidden;
  border-radius: var(--ref-radius-xl);
  background: var(--ref-surface-map);
  box-shadow: var(--ref-shadow-card);
}

@media screen and (max-width: 750px) {
  .ref-tour-map-wrapper,
  .ref-poi-map-wrapper {
    padding: 0;
  }

  .ref-tour-map-wrapper #map_wrapper,
  .ref-poi-map-wrapper #map_wrapper {
    min-height: var(--ref-map-min-height-mobile);
    border-radius: 0;
  }
}

/* =========================================================
   YouTube
   ========================================================= */

.youtube-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--ref-gap-l);
}

.youtube-card {
  padding: 18px 18px 16px;
  border-radius: var(--ref-radius-l);
  background: var(--ref-surface-card);
  box-shadow: var(--ref-shadow-card-strong);
}

.youtube-card-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.youtube-video-placeholder,
.youtube-video-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ref-radius-m);
}

.youtube-video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: var(--ref-accent-dark);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.youtube-video-placeholder[hidden],
.youtube-video-frame-wrap[hidden] {
  display: none !important;
}

.youtube-video-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ref-youtube-play-size);
  height: var(--ref-youtube-play-size);
  border-radius: var(--ref-radius-round);
  background: rgba(255, 255, 255, 0.95);
  font-size: 2rem;
  line-height: 1;
}

.youtube-card-description {
  margin-top: 14px;
}

/* =========================================================
   Zeitzeugen
   ========================================================= */

.ref-witness-card-link {
  color: inherit;
  text-decoration: none;
}

.ref-witness-overview-grid {
  gap: 0;
}

.ref-gallery-hidden {
  display: none;
}

.person-close-btn {
  position: fixed;
  top: var(--ref-close-btn-top);
  right: var(--ref-close-btn-right);
  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ref-close-btn-size);
  height: var(--ref-close-btn-size);
  border-radius: 50%;

  background: var(--ref-accent-close);
  color: #fff;
  font-size: var(--ref-close-btn-font-size);
  line-height: 1;
  text-decoration: none;

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

.person-close-btn:hover {
  transform: scale(1.03);
  text-decoration: none;
}

.person-poi-section {
  clear: both;
}

.person-poi-map {
  width: 100%;
  min-height: var(--ref-person-poi-min-height);
  overflow: hidden;
  border-radius: var(--ref-radius-s);
  background: var(--ref-surface-poi);
}

@media screen and (max-width: 900px) {
  .person-close-btn {
    top: var(--ref-close-btn-top-mobile);
    right: var(--ref-close-btn-right-mobile);
    width: var(--ref-close-btn-size-mobile);
    height: var(--ref-close-btn-size-mobile);
    font-size: var(--ref-close-btn-font-size-mobile);
  }
}

/* =========================================================
   Startup / Intro
   ========================================================= */

.loader,
.page-intro {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--ref-transition-fast),
    visibility var(--ref-transition-fast);
}

.loader.is-hidden,
.page-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.animated-heading {
  opacity: 1;
}

/* =========================================================
   Glossar
   ========================================================= */

.glossary-term {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.12em;
}

.glossary-popover {
  position: absolute;
  z-index: 10050;
  max-width: var(--ref-glossary-popover-max-width);
  padding: 0;
  border-radius: var(--ref-radius-s);
  box-shadow: var(--ref-shadow-popover);
}

.glossary-popover.is-hidden {
  display: none;
}

.glossary-popover-inner {
  position: relative;
  padding: 14px 16px;
}

.glossary-popover-close {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 1000;

  padding: 2px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--ref-glossary-close-font-size);
  line-height: 1;
  cursor: pointer;
}

.glossary-popover-title {
  margin-bottom: 8px;
  padding-right: 22px;
  font-weight: 700;
}

.glossary-popover-body {
  line-height: 1.45;
}

[data-glossary-theme="youtube"] .glossary-term {
  color: var(--ref-accent-glossary-youtube);
}

[data-glossary-theme="person"] .glossary-term,
[data-glossary-theme="witness-overview"] .glossary-term {
  color: var(--ref-accent-glossary-person);
}

.glossary-popover.theme-youtube {
  background: var(--ref-surface-glossary-dark);
  color: #fff;
}

.glossary-popover.theme-person,
.glossary-popover.theme-witness-overview {
  background: var(--ref-surface-glossary-light);
  color: var(--ref-text-dark);
  border: 1px solid var(--ref-border-light);
}