/* ===========================================================
   Skifreunde Altertheim – modernes Redesign
   =========================================================== */

:root {
  --color-orange: #ff7a1a;
  --color-orange-dark: #e8620a;
  --color-navy: #12233c;
  --color-navy-light: #1f3859;
  --color-bg: #f6f7f9;
  --color-white: #ffffff;
  --color-text: #263042;
  --color-muted: #6b7484;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(18, 35, 60, 0.08);
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

a { color: var(--color-orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--color-navy); line-height: 1.25; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Navigation ---------- */

.site-header {
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--color-white);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.3px;
}
.brand:hover { text-decoration: none; color: var(--color-white); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: #d8e0ee;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-orange);
  color: var(--color-white);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-white);
  border-radius: 2px;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-light);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav ul {
    flex-direction: column;
    padding: 10px 20px 20px;
    gap: 4px;
  }
  .main-nav a { display: block; }
}

/* ---------- Hero / Slideshow ---------- */

.hero {
  position: relative;
  height: 60vh;
  min-height: 380px;
  max-height: 620px;
  overflow: hidden;
  color: var(--color-white);
}

.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.active { opacity: 1; }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,35,60,0.55) 0%, rgba(18,35,60,0.25) 45%, rgba(18,35,60,0.75) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.hero__content h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.hero__content p {
  font-size: 1.15rem;
  margin: 0 0 22px;
  color: #eef2f8;
}

.btn {
  display: inline-block;
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--color-orange-dark); text-decoration: none; transform: translateY(-1px); }
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-white);
}
.btn--outline:hover { background: rgba(255,255,255,0.15); }

/* ---------- Sections / Cards ---------- */

.section {
  padding: 60px 0;
}
.section--alt {
  background: var(--color-white);
}
.section__title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}
.section__subtitle {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.teaser-card {
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.teaser-card h3 { color: var(--color-white); margin-top: 0; }
.teaser-card p { color: #cfd9ea; }

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.gallery img {
  border-radius: var(--radius);
  height: 220px;
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* ---------- Timeline (Bisherige Fahrten) ---------- */

.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 800px;
  padding-left: 24px;
  border-left: 3px solid var(--color-orange);
}

.timeline__item {
  position: relative;
  padding: 6px 0 6px 20px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--color-orange);
  border-radius: 50%;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-orange);
}
.timeline__year {
  font-weight: 800;
  color: var(--color-navy);
  margin-right: 10px;
}
.timeline__place {
  color: var(--color-text);
}
.timeline__item--clickable {
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.timeline__item--clickable:hover,
.timeline__item--clickable:focus-visible {
  background: #fff3e8;
  outline: none;
}
.timeline__photo-hint {
  display: inline-block;
  margin-left: 10px;
  font-size: 0.85rem;
  color: var(--color-orange-dark);
  font-weight: 600;
}

/* ---------- Lightbox ---------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 35, 60, 0.85);
}
.lightbox__content {
  position: relative;
  max-width: 95vw;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__content img {
  display: block;
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox__caption {
  color: var(--color-white);
  text-align: center;
  margin-top: 14px;
  font-weight: 600;
}
.lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Forms ---------- */

.form-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 720px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: 0.92rem; color: var(--color-navy); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 11px 14px;
  border: 1.5px solid #dde2ea;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  background: var(--color-white);
}
.form-field--radio-group {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.form-field--radio-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px; /* ausreichend große Tippfläche auf dem Handy */
}
.form-field input[type="radio"],
.form-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-orange);
}

/* Straße + Hausnummer bzw. PLZ + Ort nebeneinander, auch auf dem Handy */
.form-row--breit-schmal { grid-template-columns: minmax(0, 3fr) minmax(90px, 1fr); }
.form-row--schmal-breit { grid-template-columns: minmax(90px, 1fr) minmax(0, 3fr); }

/* Radio-Gruppen als fieldset: Browser-Rahmen entfernen, Legende wie ein Label */
fieldset.form-field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
fieldset.form-field legend {
  padding: 0;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-navy);
}

.form-field--checkbox { margin-bottom: 24px; }
.form-field--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  color: var(--color-text);
}
.form-field--checkbox input { margin-top: 3px; }

/* Fehler- und Hinweistexte an einzelnen Feldern */
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #d93025;
  background: #fff8f7;
}
.form-error {
  margin: 0;
  font-size: 0.88rem;
  color: #c5221f;
}
.form-hint {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  background: #e8f0fe;
  color: var(--color-navy);
}
.form-hint--warnung {
  background: #fce8e6;
  border-left: 3px solid #d93025;
  color: #c5221f;
}

/* Auswahlgruppe mit Fehler rot umranden */
.form-field--fehler .form-field--radio-group {
  border: 1.5px solid #d93025;
  border-radius: 10px;
  background: #fff8f7;
  padding: 0 12px;
}
fieldset.form-field--fehler legend { color: #c5221f; }

@media (max-width: 560px) {
  .form-card { padding: 22px 18px; }
  .form-card .btn { width: 100%; text-align: center; }
}

.info-box {
  border-radius: var(--radius);
  padding: 24px 28px;
  max-width: 720px;
  margin: 0 auto;
}
.info-box--closed {
  background: #fdeee0;
  border: 1.5px solid var(--color-orange);
}
.info-box--success {
  background: #e6f6ec;
  border: 1.5px solid #34a853;
}
.info-box--error {
  background: #fce8e6;
  border: 1.5px solid #d93025;
}

/* ---------- Fahrt-Detailseite ---------- */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}
.fact-grid .card h4 { margin: 0 0 6px; color: var(--color-orange-dark); }
.fact-grid .card p { margin: 0; color: var(--color-text); }
.fact-grid .card ul { margin: 0; padding-left: 18px; color: var(--color-text); }

/* Link in normaler Textfarbe, nur unterstrichen (statt orange) */
.link-plain { color: inherit; text-decoration: underline; }

.disclaimer {
  font-size: 0.88rem;
  color: var(--color-muted);
  border-top: 1px solid #e3e6ec;
  margin-top: 40px;
  padding-top: 20px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-navy);
  color: #b7c2d6;
  padding: 32px 0;
  margin-top: 40px;
}
.footer-nav {
  text-align: center;
  margin-bottom: 12px;
}
.footer-nav a { color: #d8e0ee; margin: 0 4px; }
.footer-nav span { color: #56607a; }
.footer-meta {
  text-align: center;
  font-size: 0.88rem;
  margin: 0;
}
.footer-meta a { color: var(--color-orange); }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
