/* =========================================================
   Sicherheitstage 2026 – Brenner Basistunnel · ARGE H53 BBT
   Mobile-first, zero-dependency stylesheet
   ========================================================= */

:root {
  --navy:      #0e2438;
  --navy-2:    #16344f;
  --slate:     #4a5a6c;
  --ink:       #16212e;
  --muted:     #5c6b7a;
  --line:      #e3e8ee;
  --bg:        #eef2f6;
  --card:      #ffffff;
  --yellow:    #ffd200;   /* PORR yellow */
  --yellow-d:  #d9b200;
  --green:     #1f9d57;
  --red:       #d62828;
  --red-d:     #b51f1f;
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 6px 24px rgba(14, 36, 56, .10);
  --shadow-lg: 0 18px 48px rgba(14, 36, 56, .22);
  --maxw:      980px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: hidden;
}

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

a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- Sticky top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 36, 56, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 15px;
}
.brand img { height: 34px; width: auto; }
.brand span { white-space: nowrap; }
@media (max-width: 430px) { .brand span { display: none; } }

/* ---------- Language switcher (pure CSS) ---------- */
.lang { position: relative; }
.lang > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 999px;
  user-select: none;
  min-height: 40px;
}
.lang > summary::-webkit-details-marker { display: none; }

/* ---------- Sprachflaggen (Inline-SVG) ---------- */
.flag {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  vertical-align: -0.18em;
  flex: none;
  position: relative;
}
.flag .flag__svg {
  display: block;
  height: 1.15em;
  width: auto;
  border-radius: .24em;
  box-shadow:
    0 0 0 .5px rgba(0, 0, 0, .2),
    0 .08em .18em rgba(0, 0, 0, .35);
}
/* Emoji-typischer Glanz/Wölbung – funktioniert rein per CSS überall */
.flag::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: .24em;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .38) 0%,
    rgba(255, 255, 255, .08) 34%,
    rgba(255, 255, 255, 0) 55%,
    rgba(0, 0, 0, .13) 100%
  );
}

.lang > summary .flag { font-size: 18px; line-height: 1; }
.lang > summary .caret { font-size: 11px; opacity: .7; }
.langmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: min(86vw, 360px);
}
.langmenu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.langmenu a .flag { font-size: 20px; }
.langmenu a:hover { background: var(--bg); }
.langmenu a[aria-current="true"] {
  background: var(--navy);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 52px 18px 64px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 34%, rgba(255, 210, 0, .20), rgba(255, 210, 0, 0) 60%),
    repeating-radial-gradient(circle at 50% 40%, rgba(255,255,255,.045) 0 2px, rgba(255,255,255,0) 2px 26px),
    radial-gradient(circle at 50% 40%, #33485d 0%, #1d3247 34%, #122334 62%, #0a1825 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero__logo {
  height: 84px; width: auto; margin: 0 auto 22px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));
}
.hero__kicker {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--yellow);
  margin: 0 0 10px;
}
.hero__title {
  font-size: clamp(34px, 9vw, 60px);
  line-height: 1.02;
  margin: 0 0 14px;
  font-weight: 900;
  letter-spacing: -.5px;
}
.hero__subtitle {
  font-size: clamp(16px, 4.4vw, 20px);
  max-width: 620px;
  margin: 0 auto 22px;
  color: #d8e2ec;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 26px;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  padding: 7px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: 17px;
  padding: 14px 26px; border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(255,210,0,.30);
  min-height: 52px;
}
.hero__cta:active { transform: translateY(1px); }

/* ---------- Sections ---------- */
.section { padding: 38px 0; }
.section__head { margin-bottom: 22px; }
.section h2 {
  font-size: clamp(24px, 6.4vw, 32px);
  margin: 0 0 6px; font-weight: 900; letter-spacing: -.3px;
}
.section h2 .bar {
  display: inline-block; width: 38px; height: 5px; border-radius: 3px;
  background: var(--yellow); margin-bottom: 12px;
}
.lead { color: var(--muted); font-size: 16px; margin: 0; max-width: 640px; }

/* ---------- Welcome ---------- */
.welcome {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  border-left: 6px solid var(--yellow);
}
.welcome p { margin: 0 0 .85em; font-size: 17px; line-height: 1.6; }
.welcome p:last-child { margin-bottom: 0; }

/* ---------- Video (einklappbar) ---------- */
.videobox {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow);
  overflow: hidden;
}
.videobox__summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  font-weight: 800; font-size: 19px; letter-spacing: -.2px;
  user-select: none;
}
.videobox__summary::-webkit-details-marker { display: none; }
.videobox__icon { font-size: 24px; line-height: 1; }
.videobox__h { flex: 1 1 auto; }
.videobox__caret {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; color: #102233;
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: transform .2s ease, background .15s ease;
}
.videobox__summary:hover .videobox__caret { background: #ffd633; }
.videobox[open] .videobox__caret { transform: rotate(180deg); }
.videobox__body { padding: 0 22px 24px; }
.videobox__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: url("VideoBild.png") center / cover no-repeat, #0a1825;
  border-radius: var(--radius-sm);
  display: flex; align-items: flex-end; justify-content: center;
  color: #fff;
  margin-bottom: 18px;
  overflow: hidden;
}
.videobox__cap {
  font-size: 14px; color: #e8eef4;
  padding: 6px 16px; margin-bottom: 16px;
  background: rgba(8,18,28,.6);
  border-radius: 999px;
  backdrop-filter: blur(2px);
}
.videobox__lines { text-align: center; }
.videobox__lines p {
  margin: 0 0 .5em; font-size: 18px; font-weight: 600; line-height: 1.5; color: var(--ink);
}
.videobox__lines p:last-child { margin-bottom: 0; }

/* ---------- Stations grid ---------- */
.stations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.station {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  position: relative;
  border: 1px solid var(--line);
}
.station__top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.station__num {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--navy); color: var(--yellow);
  display: grid; place-items: center;
  font-weight: 900; font-size: 19px;
}
.station__icon { font-size: 30px; line-height: 1; }
.station__title {
  font-size: 19px; font-weight: 800; margin: 0; line-height: 1.2;
  letter-spacing: -.2px;
}
/* Eigene Kachel "Du bist wichtig – Pass auf dich auf" (Durchgangsstation) */
.station--passage {
  grid-column: 1 / -1;          /* am PC über die Breite zweier Kacheln */
  border: none;
  border-left: 6px solid var(--yellow);
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  display: flex; align-items: center; gap: 16px;
  padding: 20px 22px;
}
.station--passage__icon { font-size: 34px; line-height: 1; flex: 0 0 auto; }
.station--passage__body { display: flex; flex-direction: column; gap: 6px; }
.station--passage .station__title { color: #fff; font-size: 18px; }
.station--passage__note { margin: 0; color: rgba(255,255,255,.85); font-size: 14px; line-height: 1.45; }

.block + .block { margin-top: 14px; }
.block__label {
  display: inline-block;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--slate);
  margin: 0 0 8px;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--line);
}
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  position: relative;
  padding-left: 26px;
  margin: 7px 0;
  font-size: 15.5px;
}
.list.learn li::before {
  content: "›";
  position: absolute; left: 6px; top: -1px;
  color: var(--slate); font-weight: 900; font-size: 18px;
}
.list.goals li::before {
  content: "✓";
  position: absolute; left: 2px; top: 0;
  color: var(--green); font-weight: 900; font-size: 15px;
}

/* ---------- Emergency ---------- */
.emergency {
  background: linear-gradient(135deg, #b51f1f, #d62828);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px 22px;
}
.emergency h2 { color: #fff; }
.emergency h2 .bar { background: #fff; }
.emergency .lead { color: rgba(255,255,255,.92); }
.emerg__numbers { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0 4px; }
.emerg__num {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.emerg__num .big { font-size: 38px; font-weight: 900; line-height: 1; }
.emerg__num .txt b { display: block; font-size: 15px; }
.emerg__num .txt span { font-size: 13px; opacity: .9; }
.emerg__steps { margin: 18px 0 0; }
.emerg__steps h3 { margin: 0 0 8px; font-size: 16px; }
.emerg__steps ol { margin: 0; padding-left: 20px; }
.emerg__steps li { margin: 5px 0; font-size: 15.5px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: #c7d3de;
  padding: 30px 0 40px;
  margin-top: 14px;
}
.footer .org {
  color: #fff; font-weight: 800; font-size: 15px; margin: 0 0 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.footer .org img { height: 30px; }
.footer p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.footer .langlinks { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer .langlinks a { color: var(--yellow); text-decoration: none; font-size: 13.5px; font-weight: 600; }

/* ---------- Back to top ---------- */
.backtop {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
  background: rgba(255,255,255,.10); padding: 10px 16px; border-radius: 999px;
}

/* =========================================================
   Language picker (index.html)
   ========================================================= */
.picker { min-height: 100dvh; display: flex; flex-direction: column; }
.picker .hero { flex: 1; display: flex; align-items: center; }
.picker .hero__inner { width: 100%; }
.picker__grid {
  display: grid;
  /* minmax(0,1fr) lässt die Spalten unter ihre Inhaltsbreite schrumpfen –
     ohne das überlaufen die Karten auf schmalen Handys (≤ ~390px) nach
     rechts aus dem Viewport und wirken "rechts angedockt ohne Rand". */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin: 30px auto 0;
}
.lang-card {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;                 /* Grid-Item darf schrumpfen statt zu überlaufen */
  overflow-wrap: break-word;    /* Notbremse für sehr schmale Geräte */
  background: rgba(255,255,255,.96);
  color: var(--ink);
  text-decoration: none;
  border-radius: 14px;
  padding: 15px 16px;
  font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow);
  transition: transform .08s ease;
  min-height: 58px;
}
.lang-card .flag { font-size: 26px; line-height: 1; }
.lang-card:active { transform: scale(.98); }
/* Schmale Handys: kompaktere Karten, damit auch lange Sprachnamen
   ("Slovenščina") mit Flagge sicher in zwei Spalten passen. */
@media (max-width: 480px) {
  .picker__grid { gap: 8px; }
  .lang-card { padding: 13px 11px; gap: 8px; font-size: 15px; min-height: 54px; }
  .lang-card .flag { font-size: 18px; }
}
.picker__note { margin-top: 22px; font-size: 13px; color: #b9c6d2; text-align: center; }

/* ---------- Plan viewer (Stationsübersicht) ---------- */
.planviewer {
  position: relative;
  background: #0e2438;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.planviewer__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3200 / 2262;
  min-height: 300px;
  max-height: 76vh;
  overflow: hidden;
  background: #fff;
  touch-action: pan-y;
  cursor: zoom-in;
}
.planviewer.is-zoomed .planviewer__stage { cursor: grab; touch-action: none; }
.planviewer__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  display: block;
}
.planviewer__controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.pv-btn {
  width: 46px; height: 46px;
  border: none; border-radius: 50%;
  background: rgba(14, 36, 56, .88);
  color: #fff; font-size: 24px; font-weight: 800; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.pv-btn:active { transform: translateY(1px); }
.planviewer__dl {
  position: absolute;
  left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--yellow); color: var(--navy);
  font-weight: 800; font-size: 14px; text-decoration: none;
  padding: 11px 15px; border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 190px);
}

/* ---------- Floating "to plan" button ---------- */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 54px; height: 54px;
  border: none; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  font-size: 25px; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  animation: fab-in .18s ease;
}
.fab[hidden] { display: none; }
.fab:active { transform: translateY(1px); }
@keyframes fab-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

/* ---------- Footer legal (Impressum/Datenschutz/Kontakt) ---------- */
.legal { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.legal details {
  border-top: 1px solid rgba(255,255,255,.12);
}
.legal summary {
  list-style: none; cursor: pointer;
  padding: 11px 0;
  color: var(--yellow); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.legal summary::-webkit-details-marker { display: none; }
.legal summary::before { content: "›"; font-weight: 900; font-size: 17px; transition: transform .15s ease; }
.legal details[open] summary::before { transform: rotate(90deg); }
.legal__body { padding: 2px 0 12px; }
.legal__body p { color: #c7d3de; font-size: 13px; line-height: 1.55; margin: 0 0 8px; }
.legal__body b { color: #fff; }
.legal__body a { color: var(--yellow); text-decoration: none; }
.legal__body a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  body { font-size: 17px; }
  .stations { grid-template-columns: 1fr 1fr; }
  .emerg__numbers { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 920px) {
  .section { padding: 52px 0; }
  .hero { padding: 70px 18px 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
