/* ============================================================
 *  Mitte Vision – Custom Styles
 *  (CSS not expressible with Tailwind utility classes)
 * ============================================================ */

/* ── Right panel ──────────────────────────────────────────────── */
#right-panel {
  left: var(--map-width, 50%);
  background: linear-gradient(170deg, #001226 0%, #001f3a 30%, #002a4a 60%, #001a30 100%);
}
#right-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 25% 15%, rgba(59,142,208,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 75% 85%, rgba(255,153,0,0.05) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.012) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Map ──────────────────────────────────────────────────────── */
#map {
  width: var(--map-width, 50%);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: none;
  background: linear-gradient(165deg, #e8f4fc 0%, #dceef8 35%, #d0e8f5 70%, #c5e0f0 100%);
}
#map::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 70% 20%, rgba(255,255,255,0.5) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 30% 80%, rgba(59,142,208,0.06) 0%, transparent 50%);
  pointer-events: none;
}
#map-frame {
  position: relative;
  height: 100%;
  width: auto;
  display: inline-block;
  flex: 0 0 auto;
}
#map-frame img {
  height: 100%;
  width: auto;
  display: block;
  opacity: 1;
}
#path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#map::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(200,225,240,0.7));
  z-index: 6;
  pointer-events: none;
}

/* ── Station info (JS-generated) ──────────────────────────────── */
.station-info {
  text-align: center;
  margin-bottom: 1.2rem;
}
.station-info .station-number {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,153,0,0.7);
  margin-bottom: 0.5rem;
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: rgba(255,153,0,0.06);
  border: 1px solid rgba(255,153,0,0.12);
  border-radius: 2rem;
}
.station-info .station-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* ── Station images (JS-generated) ────────────────────────────── */
.station-images {
  position: fixed;
  top: 50%;
  left: calc((100% + var(--map-width, 50%)) / 2);
  transform: translate(-50%, calc(-50% + 60px));
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.station-images.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
.station-images.exit-up {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 60px));
}
.station-images.enter-above {
  transform: translate(-50%, calc(-50% - 60px));
}
.station-images.enter-above.active {
  transform: translate(-50%, -50%);
}
.station-images.exit-down {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 60px));
}

.station-images .featured {
  position: relative;
  width: calc(100vw - var(--map-width, 50%) - 15rem);
  max-width: 980px;
  aspect-ratio: 16 / 9;
  background: #0a1929;
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 100px rgba(0,0,0,0.25);
}
.station-images .featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.station-images .featured img.visible {
  opacity: 1;
}

.station-images .image-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.6rem;
  border-radius: 2rem;
  z-index: 3;
  pointer-events: none;
}
.station-images[data-count="1"] .image-counter { display: none; }

.station-images .gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: all 0.25s ease;
  backdrop-filter: blur(16px);
}
.station-images .gallery-arrow:hover {
  background: rgba(255,153,0,0.15);
  border-color: rgba(255,153,0,0.35);
  transform: translateY(-50%) scale(1.1);
  color: #fff;
}
.station-images .gallery-prev { left: 0.8rem; }
.station-images .gallery-next { right: 0.8rem; }
.station-images[data-count="1"] .gallery-arrow { display: none; }

.station-images .thumbnails {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.8rem;
  justify-content: center;
}
.station-images[data-count="1"] .thumbnails { display: none; }
.station-images .thumb {
  width: 4rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.35rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.35;
  transition: all 0.3s ease;
}
.station-images .thumb.active {
  border-color: rgba(255,255,255,0.5);
  opacity: 1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.station-images .thumb:hover {
  opacity: 0.75;
  transform: scale(1.06);
}
.station-images .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Station text (JS-generated) ────────────────────────────── */
.station-text {
  margin-top: 3.2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.station-text-scroll {
  max-height: 9.5rem;
  overflow-y: auto;
  padding-right: 0.4rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.station-text-scroll::-webkit-scrollbar {
  width: 6px;
}
.station-text-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.station-text-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
}
.station-text-scroll p {
  color: rgba(255,255,255,0.6);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 0.9rem;
}
.station-text-scroll p:last-child { margin-bottom: 0; }
.landing .landing-subtitle p { margin-bottom: 0.9rem; }
.landing .landing-subtitle p:last-child { margin-bottom: 0; }

/* ── Map dots (JS-generated) ──────────────────────────────────── */
.dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #1976D2;
  transform: translate(-50%, -50%);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 10;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(25,118,210,0.25);
}
.dot:hover {
  background: #e3f0fc;
  border-color: #1565C0;
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 3px 12px rgba(25,118,210,0.35);
}
.dot::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  white-space: nowrap;
  color: rgba(0,40,80,0.5);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 3px rgba(255,255,255,0.8);
  pointer-events: none;
  transition: all 0.5s ease;
}
.dot.active::before {
  color: #cc7a00;
  text-shadow: 0 1px 3px rgba(255,255,255,0.9);
}
.dot.reached::before {
  color: rgba(0,40,80,0.65);
}
.dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.5s ease;
}
.dot.reached {
  background: #3b8ed0;
  border-color: #2979C4;
  box-shadow: 0 2px 10px rgba(59,142,208,0.4);
}
.dot.active {
  background: #f90;
  border-color: #e68a00;
  box-shadow:
    0 0 24px rgba(255,153,0,0.7),
    0 0 50px rgba(255,153,0,0.3),
    0 2px 8px rgba(255,153,0,0.8);
  transform: translate(-50%, -50%) scale(1.5);
}
.dot.active::after {
  inset: -8px;
  background: rgba(255,153,0,0.2);
  border: 2px solid rgba(255,153,0,0.4);
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  50% { opacity: 0.3; }
  100% { transform: scale(4.5); opacity: 0; }
}

/* ── Progress bar ─────────────────────────────────────────────── */
.progress-bar {
  left: var(--map-width, 50%);
  height: 3px;
}
.progress-bar .fill {
  background: linear-gradient(90deg, #f90, #ffb84d);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 16px rgba(255,153,0,0.5), 0 0 4px rgba(255,153,0,0.8);
  border-radius: 0 2px 2px 0;
}

/* ── Header ───────────────────────────────────────────────────── */
.header {
  left: var(--map-width, 50%);
}
.header-logo img {
  transition: opacity 0.2s ease;
}
.header-logo img:hover {
  opacity: 0.85;
}

/* ── Burger button ────────────────────────────────────────────── */
.burger-btn {
  transition: background 0.25s ease;
}
.burger-btn:hover {
  background: rgba(255,153,0,0.08);
  border-radius: 10px;
}
.burger-btn span {
  display: block;
  height: 2px;
  background: #f90;
  border-radius: 1px;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;
}
.burger-btn span:nth-child(1) { width: 22px; }
.burger-btn span:nth-child(2) { width: 16px; }
.burger-btn span:nth-child(3) { width: 22px; }
.burger-btn:hover span:nth-child(2) { width: 22px; }
.burger-btn.open span:nth-child(1) {
  width: 22px;
  transform: translateY(8px) rotate(45deg);
}
.burger-btn.open span:nth-child(2) {
  width: 0;
  opacity: 0;
}
.burger-btn.open span:nth-child(3) {
  width: 22px;
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Menu overlay ─────────────────────────────────────────────── */
.menu-overlay {
  background: rgba(0, 16, 32, 0.94);
  backdrop-filter: blur(40px) saturate(1.3);
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  border-left: 1px solid rgba(255,255,255,0.06);
}
.menu-overlay.open {
  transform: translateX(0);
}
.menu-overlay-header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.menu-overlay-header .menu-title {
  color: rgba(255,255,255,0.35);
}
.menu-close {
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  transition: all 0.2s ease;
}
.menu-close:hover {
  color: #f90;
  border-color: rgba(255,153,0,0.3);
  background: rgba(255,153,0,0.06);
}
.menu-overlay-nav a {
  color: rgba(255,255,255,0.75);
  transition: all 0.2s ease;
}
.menu-overlay-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.04);
}
.menu-overlay-nav a .link-arrow {
  color: rgba(255,255,255,0.2);
  transition: all 0.2s ease;
}
.menu-overlay-nav a:hover .link-arrow {
  color: #f90;
  transform: translateX(3px);
}
.menu-overlay-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.menu-overlay-footer .footer-text {
  color: rgba(255,255,255,0.25);
}

/* ── Station nav arrows (desktop) ─────────────────────────────── */
.station-nav {
  position: fixed;
  top: 50%;
  z-index: 21;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.station-nav.visible {
  opacity: 1;
  pointer-events: auto;
}
.station-nav-prev {
  left: calc(var(--map-width, 50%) + 1rem);
}
.station-nav-next {
  right: 1rem;
}
.station-nav .nav-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,14,28,0.5);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.station-nav:hover .nav-circle {
  border-color: rgba(255,153,0,0.45);
  background: rgba(255,153,0,0.1);
  box-shadow: 0 0 20px rgba(255,153,0,0.12);
}
.station-nav .nav-circle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(255,255,255,0.6);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease;
}
.station-nav:hover .nav-circle svg {
  stroke: #f90;
}
.station-nav .nav-label {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  transition: color 0.25s ease;
}
.station-nav:hover .nav-label {
  color: rgba(255,255,255,0.5);
}

/* ── Landing screen ───────────────────────────────────────────── */
.landing {
  left: var(--map-width, 50%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.landing.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.landing .landing-label {
  color: rgba(255,153,0,0.75);
  background: rgba(255,153,0,0.06);
  border: 1px solid rgba(255,153,0,0.12);
  border-radius: 2rem;
  padding: 0.3rem 1rem;
  display: inline-block;
}
.landing .landing-title {
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 20%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing .landing-subtitle {
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.landing .landing-cta:hover .cta-circle {
  border-color: rgba(255,153,0,0.8);
  box-shadow: 0 0 40px rgba(255,153,0,0.25);
  background: rgba(255,153,0,0.08);
}
.landing .landing-cta:hover .cta-text {
  color: rgba(255,255,255,0.6);
}
.landing .cta-circle {
  border: 1.5px solid rgba(255,153,0,0.35);
  background: rgba(255,153,0,0.04);
  transition: all 0.3s ease;
  animation: cta-bob 2.5s ease-in-out infinite;
}
.landing .cta-circle svg {
  stroke: #f90;
  animation: arrow-bounce 2.5s ease-in-out infinite;
}
@keyframes cta-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(3px); opacity: 1; }
}
.landing .cta-text {
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
}

/* ── Station navigation (down arrow) ─────────────────────────── */
.station-nav-down {
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.station-nav-down.visible {
  opacity: 1;
  pointer-events: auto;
}
.station-nav-down .nav-down-circle {
  border: 1.5px solid rgba(255,153,0,0.35);
  background: rgba(255,153,0,0.04);
  transition: all 0.3s ease;
  animation: cta-bob 2.5s ease-in-out infinite;
}
.station-nav-down .nav-down-circle svg {
  stroke: #f90;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: arrow-bounce 2.5s ease-in-out infinite;
}
.station-nav-down:hover .nav-down-circle {
  border-color: rgba(255,153,0,0.8);
  box-shadow: 0 0 40px rgba(255,153,0,0.25);
  background: rgba(255,153,0,0.08);
}
.station-nav-down .nav-down-text {
  color: rgba(255,255,255,0.35);
  transition: color 0.3s ease;
}
.station-nav-down:hover .nav-down-text {
  color: rgba(255,255,255,0.6);
}

/* ── Station nav placement (under featured image) ─────────────── */
.station-nav-slot {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}
.station-nav-slot .station-nav-down {
  position: static;
  transform: none;
}

/* ============================================================
 *  RESPONSIVE – Tablet (≤1024px)
 * ============================================================ */
@media (max-width: 1024px) {
  #map { padding: 1.6rem 1.4rem 1.6rem 1.8rem; }
  .station-info .station-title { font-size: 1.25rem; }
  .station-info .station-number { font-size: 0.58rem; padding: 0.2rem 0.6rem; }
  .station-images .featured { border-radius: 0.75rem; }
  .station-images .gallery-arrow { width: 2.2rem; height: 2.2rem; font-size: 1.1rem; }
  .station-images .thumb { width: 3.5rem; }
  .header-logo { height: 60px; }
  .header { padding: 1.2rem 1.5rem; }
}

/* ============================================================
 *  RESPONSIVE – Mobile (≤768px)
 * ============================================================ */
@media (max-width: 768px) {
  #map { display: none !important; }

  #right-panel {
    top: 0 !important;
    left: 0 !important;
    right: 0;
    height: 100vh;
    padding-bottom: 5rem;
  }

  .header {
    left: 0 !important;
    padding: 1rem 1.2rem;
    background: linear-gradient(to bottom, rgba(0,26,46,0.85), transparent);
  }
  .header-logo { height: 50px; }

  .station-images {
    left: 50% !important;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .station-images.active { transform: translate(-50%, -50%); }
  .station-images.exit-up { transform: translate(-50%, calc(-50% - 60px)); }
  .station-images.enter-above { transform: translate(-50%, calc(-50% - 60px)); }
  .station-images.enter-above.active { transform: translate(-50%, -50%); }
  .station-images.exit-down { transform: translate(-50%, calc(-50% + 60px)); }

  .station-images .featured { width: calc(100vw - 2rem); border-radius: 0.65rem; }
  .station-info { margin-bottom: 0.7rem; }
  .station-info .station-number { font-size: 0.55rem; padding: 0.2rem 0.6rem; }
  .station-info .station-title { font-size: 1.05rem; }
  .station-images .gallery-arrow { width: 2.2rem; height: 2.2rem; font-size: 1rem; }
  .station-images .gallery-prev { left: 0.5rem; }
  .station-images .gallery-next { right: 0.5rem; }
  .station-images .thumbnails { gap: 0.4rem; margin-top: 0.5rem; }
  .station-images .thumb { width: 3rem; }
  .station-images .image-counter {
    font-size: 0.6rem;
    padding: 0.2rem 0.5rem;
    bottom: 0.5rem;
    right: 0.5rem;
  }
  .station-nav-slot { margin-top: 1rem; }
  .station-text { margin-top: 2rem; }
  .station-text-scroll { max-height: 7.8rem; }
  .station-text-scroll p { font-size: 0.92rem; }

  .dot { display: none !important; }
  .progress-bar { left: 0 !important; }
  .menu-overlay { width: 100%; }

  .landing { left: 0 !important; top: 0; height: 100vh; }
  .landing .landing-title { font-size: 1.7rem; }
  .landing .landing-subtitle { font-size: 0.9rem; margin-bottom: 2.5rem; }
  .landing .cta-circle { width: 46px; height: 46px; }

}

/* ============================================================
 *  RESPONSIVE – Small phones (≤420px)
 * ============================================================ */
@media (max-width: 420px) {
  .station-images .featured { width: calc(100vw - 1.5rem); }
  .station-info .station-title { font-size: 1.05rem; }
  .station-images .thumb { width: 2.8rem; }
  .header { padding: 0.8rem 1rem; }
  .header-logo { height: 45px; }
  .landing .landing-title { font-size: 1.35rem; }
  .station-text-scroll { max-height: 7rem; }
  .station-text-scroll p { font-size: 0.88rem; }

  .station-nav-down { gap: 0.5rem; }
  .station-nav-down .nav-down-circle { width: 46px; height: 46px; }
  .station-nav-down .nav-down-circle svg { width: 16px; height: 16px; }
}

/* ============================================================
 *  Impressum page
 * ============================================================ */
.page-header {
  background: rgba(0, 16, 32, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.back-link {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease;
}
.back-link:hover {
  color: #f90;
}

.content p {
  color: rgba(255,255,255,0.6);
}
.content h2 {
  color: rgba(255,255,255,0.85);
}
.content a {
  color: #f90;
  text-decoration: none;
  transition: color 0.2s ease;
}
.content a:hover {
  color: #ffb84d;
}

.divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .content {
    padding: 3rem 1.5rem 4rem;
  }
  .content h1 {
    font-size: 1.6rem;
  }
}
