/* =====================================================================
   Dili Appartement - Kopfbereich, Fussbereich, Formulare, Lightbox
   Werte 1:1 aus der Kadence-Header- und Footer-Konfiguration.
   ===================================================================== */

/* ================================================================== *
   Kopfbereich
   Der Header liegt transparent ueber dem Hero (transparent-header).
 * ================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition:
    transform var(--dur-slow) var(--ease-out),
    background-color var(--dur-slow) var(--ease),
    box-shadow var(--dur-slow) var(--ease);
  will-change: transform;
}

/* Ganz oben liegt der Kopfbereich ueber dem Foto. Ein sehr weicher
   Verlauf sorgt dafuer, dass die weisse Schrift auch ueber hellem
   Himmel lesbar bleibt. Sichtbar ist der Verlauf kaum. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  opacity: 1;
  transition: opacity var(--dur-slow) var(--ease);
  pointer-events: none;
}
.site-header.is-stuck::before { opacity: 0; }

/* Sobald gescrollt wurde, bekommt der Kopfbereich seine Flaeche.
   Der Farbwert stammt aus der Kadence-Konfiguration der Vorlage. */
.site-header.is-stuck {
  background: var(--header-bg);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.site-header.is-stuck .site-header__inner { min-height: var(--header-h); padding-block: 8px; }
.site-header.is-stuck .site-branding img { width: 46px; }

/* Beim Scrollen nach unten faehrt der Kopfbereich weg, beim Scrollen
   nach oben kommt er zurueck. Das gibt auf kleinen Geraeten Platz. */
.site-header.is-hidden { transform: translateY(-100%); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100px;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 20px 100px 20px 75px;
  transition: min-height var(--dur-slow) var(--ease), padding var(--dur-slow) var(--ease);
}

.site-branding img { transition: width var(--dur-slow) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__inner,
  .site-branding img { transition: none; }
}

/* Logo */
.site-branding {
  padding: 0 20px 0 57px;
  flex: 0 0 auto;
}

.site-branding img {
  max-width: 59px;
  width: 59px;
  height: auto;
}

/* Hauptnavigation */
.main-nav { margin-right: auto; }

.main-nav__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav__list a {
  display: block;
  padding: 1.8em calc(2.03em / 2);
  color: #ffffff;
  font-family: var(--font-nav);
  font-size: 19px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.main-nav__list a:hover,
.main-nav__list a:focus-visible { color: var(--palette-10); }

.main-nav__list .is-current > a { color: var(--palette-10); }

/* WhatsApp-Element rechts im Header */
.header-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: #ffffff;
  font-size: 19px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.header-contact:hover,
.header-contact:focus-visible { color: var(--palette-10); }
.header-contact svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: 0 0 auto; }

/* Sprachumschalter */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}
.lang-switch a {
  display: block;
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-switch a:hover { color: var(--palette-10); }
.lang-switch a[aria-current="true"] {
  background: var(--palette-10);
  color: var(--palette-1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

/* Menue-Schalter fuer kleine Bildschirme */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.6em;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--palette-9);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.nav-toggle:hover,
.nav-toggle:focus-visible { color: var(--palette-8); }
.nav-toggle__icon { font-size: 30px; line-height: 1; display: block; }

/* Schublade */
.mobile-nav[hidden] { display: none; }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--palette-1);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
}
.nav-open .mobile-nav { transform: translateX(0); }
.nav-open { overflow: hidden; }

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-nav__header img { width: 44px; height: auto; }
.mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--palette-9);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease-spring);
}
.mobile-nav__close:hover { background: rgba(255, 255, 255, 0.16); transform: rotate(90deg); }

.mobile-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-nav__list li { font-size: 20px; line-height: 1.3; font-style: normal; }
.mobile-nav__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 1em 1.25em;
  background: var(--palette-1);
  color: var(--palette-9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.2s var(--ease);
}
.mobile-nav__list a:hover,
.mobile-nav__list a:focus-visible,
.mobile-nav__list .is-current a { color: var(--palette-10); }

.mobile-nav__foot {
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.7;
}
.mobile-nav__foot a { color: #ffffff; text-decoration: none; }
.mobile-nav__foot a:hover { color: var(--palette-10); }
.mobile-nav__foot .btn { width: 100%; margin-bottom: 20px; }
.mobile-nav__foot .lang-switch { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav { transition: none; }
  .mobile-nav__close:hover { transform: none; }
}

/* Umbruch auf die mobile Navigation */
@media all and (max-width: 1024px) {
  .site-header__inner { min-height: 78px; padding: 10px 20px; gap: 12px; }
  .site-header.is-stuck .site-header__inner { min-height: 64px; }
  .site-branding { padding: 0; }
  .site-branding img { width: 46px; }
  .site-header.is-stuck .site-branding img { width: 40px; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-tools { gap: 10px; }
}

@media all and (max-width: 767px) {
  /* Nur Symbol statt Rufnummer: sonst draengeln sich drei Elemente */
  .header-contact span { display: none; }
  .header-contact {
    width: 44px;
    height: 44px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
  }
  .header-contact svg { width: 20px; height: 20px; }
  .lang-switch a { min-width: 30px; padding: 6px 7px; font-size: 12px; }
}

/* ================================================================== *
   Fussbereich
 * ================================================================== */
.site-footer {
  background: var(--palette-3);
  color: var(--palette-9);
}

.site-footer a { color: var(--palette-9); text-decoration: none; }

.footer-top {
  background: var(--palette-1);
  padding-top: 58px;
  padding-bottom: 30px;
  text-align: center;
}
.footer-top img {
  max-width: 122px;
  width: 100%;
  margin-inline: auto;
}

.footer-middle {
  background: var(--palette-1);
  padding-bottom: 45px;
  color: var(--palette-9);
}

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav__list a {
  display: block;
  padding: calc(0.6em / 2) calc(1.8em / 2);
  color: var(--palette-9);
  font-family: Roboto, sans-serif;
  font-size: 19px;
  font-weight: 400;
  font-style: normal;
  transition: color 0.2s var(--ease);
}
.footer-nav__list a:hover,
.footer-nav__list a:focus-visible { color: var(--palette-10); }
.footer-nav__list .is-current a { color: var(--palette-10); }

.footer-bottom {
  background: var(--palette-1);
  border-top: 1px solid var(--palette-4);
  padding: 10px 0;
  text-align: center;
  color: var(--palette-9);
}
.footer-bottom p { margin: 0; }
.footer-bottom a:hover,
.footer-bottom a:focus-visible { color: var(--palette-10); }
/* Tippflaeche mindestens 44px hoch, wie es die Zugaenglichkeit verlangt */
.footer-bottom .footer-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom p:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 8px;
}

@media all and (max-width: 1024px) {
  .footer-top { padding-top: 10px; padding-bottom: 0; }
}
@media all and (max-width: 767px) {
  .footer-top { padding-top: 20px; padding-bottom: 1px; }
}

/* ================================================================== *
   Formulare
 * ================================================================== */
/* Sechs Spalten, damit Drittel (normale Felder) und Haelften (Datumsfelder)
   im selben Raster moeglich sind, wie in der Vorlage. */
.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 24px;
}

.field { display: flex; flex-direction: column; min-width: 0; grid-column: span 2; }
.field--wide { grid-column: 1 / -1; }
.field--half { grid-column: span 3; }

/* Anreise und Abreise stehen im Original nebeneinander, je halbe Breite */
.field--date { grid-column: span 3; }

.field > label {
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  color: #000;
}

.field .required { color: #b82105; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d5dbd6;
  border-radius: 2px;
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: #000;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea { min-height: 96px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--palette-2);
  box-shadow: 0 0 0 2px rgba(55, 102, 89, 0.18);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #b82105; }

.field__error {
  margin: 6px 0 0;
  color: #b82105;
  font-size: 15px;
  line-height: 1.4;
}

/* Honeypot: fuer Menschen unsichtbar, fuer Bots verlockend */
.field--trap {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 17px;
  line-height: 1.5;
}
.form-consent input { margin-top: 4px; flex: 0 0 auto; width: auto; }
.form-consent a { color: inherit; text-decoration: underline; }

.form-actions { grid-column: 1 / -1; }

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  border-radius: 2px;
  font-size: 17px;
  line-height: 1.5;
}
.form-status--success { background: #dff0e4; color: #13612e; }
.form-status--error   { background: #fbe3df; color: #b82105; }
.form-status--pending { background: var(--palette-7); color: var(--palette-1); }

@media all and (max-width: 1024px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field,
  .field--half,
  .field--date { grid-column: span 1; }
  .field--wide { grid-column: 1 / -1; }
}
@media all and (max-width: 767px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .field,
  .field--half,
  .field--date,
  .field--wide { grid-column: 1 / -1; }
}

/* ================================================================== *
   Lightbox
 * ================================================================== */
/* Ohne diese Regel wuerde display:flex das hidden-Attribut ueberstimmen
   und die Lightbox waere dauerhaft sichtbar. */
.lightbox[hidden] { display: none !important; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
}
.lightbox-open { overflow: hidden; }

.lightbox__figure {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  object-fit: contain;
}
.lightbox__caption {
  color: #fff;
  font-size: 15px;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 32px;
}
.lightbox__nav {
  width: 48px;
  height: 64px;
  font-size: 34px;
  flex: 0 0 auto;
}

@media all and (max-width: 767px) {
  .lightbox__nav { width: 40px; height: 52px; font-size: 28px; }
}
