/* styles.css – Die Schmugglerhütte (neu, mobile-first) */

/* =========================
   CSS VARIABLES
   ========================= */
:root{
  --bg: #F6F1E8;
  --surface: #FFFFFF;
  --text: #2B2B2B;
  --muted: #5A5A5A;

  --green-900: #2F3F2F;
  --green-700: #6E7F5C;
  --green-300: #AEB89A;

  --accent: #C45A2E;
  --accent-2: #9A5A2E;

  --border: rgba(43,43,43,0.14);
  --shadow: 0 10px 28px rgba(0,0,0,0.08);

  --radius: 14px;
  --container: 70rem;
  --space: 1.25rem;

  --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================
   BASE / RESET
   ========================= */
*,
*::before,
*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}

img{
  display: block;
  max-width: 100%;
  height: auto;
}

a{
  color: inherit;
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* Utility anchor for sticky header offset */
.anchor{
  display: block;
  scroll-margin-top: 5.75rem;
}

/* =========================
   LAYOUT
   ========================= */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

.section{ padding: 2.5rem 0; }

.section-header{ margin-bottom: 1.25rem; }
.section-header h2{
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.55rem;
}
.section-subtitle{
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Prose width aligns with cards visually */
.prose{
  max-width: 62rem;
}
.prose p{ margin: 0 0 1rem; }

.hint{ margin-top: 0.75rem; }
.link-muted{ color: var(--green-900); text-decoration: underline; }

/* =========================
   HEADER / NAV
   ========================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,241,232,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.75rem;
  gap: 1rem;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0; /* wichtig für ellipsis */
}
.brand-logo{ width: 38px; height: auto; }
.brand-title{
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

/* Mobile nav toggle */
.nav-toggle{
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle-bar{ height: 2px; width: 100%; background: var(--text); }

/* Nav */
.site-nav{
  display: flex;
  gap: 0.9rem;
}
.site-nav[data-collapsible="true"]{
  display: none;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.site-nav.is-open{ display: grid; }
.site-nav a{
  font-size: 0.95rem;
  padding: 0.4rem;
}

/* =========================
   HERO
   ========================= */
.hero{
  position: relative;
  min-height: auto; /* mobile: nicht 70vh */
  display: flex;
  align-items: stretch;
  padding: 1.25rem 0 1.75rem;
}

.hero-bg{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(47,63,47,0.20), rgba(47,63,47,0.32)),
    url("assets/hero-wald.png");
  background-size: cover;
  background-position: center;
}

.hero-inner{ position: relative; z-index: 1; }

.hero-card{
  background: rgba(246,241,232,0.93);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 0 auto;
  width: 100%;
}

.hero-card--split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 66rem;
}

.hero-left{
  display: grid;
  gap: 0.9rem;
  align-items: center;
}

.hero-copy{ width: 100%; }

.hero-copy h1{
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 9vw, 2.4rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.lead{
  margin: 0.6rem 0 0;
  max-width: 65ch;
  font-size: 1.05rem;
}

.hero-photo{
  margin: 0;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  width: 100%;
}
.hero-photo img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-widget{
  background: #fff;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow: visible;
}

/* =========================
   CARDS / PANELS
   ========================= */
.cards{
  display: grid;
  gap: 0.9rem;
}
.card{
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
}
.card-title{
  margin: 0 0 0.5rem;
  font-family: var(--serif);
}

.list{ padding-left: 1.15rem; margin: 0; }
.list li{ margin: 0.25rem 0; }

.two-col{
  display: grid;
  gap: 1rem;
}

.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.panel-muted{ background: rgba(255,255,255,0.7); }
.panel-title{
  font-family: var(--serif);
  margin: 0 0 0.75rem;
}

/* =========================
   FLOORPLAN
   ========================= */
.floorplan{
  margin: 1rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}
.floorplan img{
  width: 100%;
  height: auto;
  display: block;
}

/* =========================
   BUTTONS
   ========================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary{
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover{
  background: var(--accent-2);
  text-decoration: none;
}
.booking-cta{ margin-top: 1.25rem; }

/* =========================
   GALLERY (Swipe auf Mobile)
   ========================= */

/* Desktop / Tablet Default */
.gallery-grid{
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(4, 1fr);
}

.gallery-item{
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
}

.gallery-link{
  display: block;
}

.gallery-item img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Mobile: Swipe + Snap (WICHTIG: grid-template-columns deaktivieren!) */
@media (max-width: 719px){
  .gallery-grid{
    grid-template-columns: none;      /* <- entscheidend, sonst bleiben 2 Spalten aktiv */
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    gap: 0.9rem;
  }

  .gallery-item{
    scroll-snap-align: start;
  }
}

/* Optional: etwas größer auf sehr kleinen Geräten */
@media (max-width: 420px){
  .gallery-grid{
    grid-auto-columns: 92%;
  }
}


/* =========================
   LIGHTBOX
   ========================= */
.lightbox{
  border: none;
  background: transparent;
  max-width: min(96vw, 1100px);
  padding: 0;
}
.lightbox::backdrop{ background: rgba(0,0,0,0.72); }
.lightbox-img{
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
  display: block;
}
.lightbox-close{
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  cursor: pointer;
}

/* =========================
   FOOTER
   ========================= */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}
.footer-inner{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links,
.footer-social{
  display: flex;
  gap: 1rem;
}

/* =========================
   RESPONSIVE (Desktop)
   ========================= */
@media (min-width: 720px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid{ grid-template-columns: repeat(4, 1fr); }
  .footer-inner{ flex-direction: row; justify-content: space-between; }
}

@media (min-width: 900px){
  .nav-toggle{ display: none; }
  .site-nav[data-collapsible="true"]{
    display: flex !important;
    border: none;
    padding: 0;
    background: transparent;
    width: auto;
  }

  .hero{
    min-height: 70vh;        /* Desktop darf groß sein */
    align-items: center;
    padding: 2.5rem 0;
  }

  .hero-card{ padding: 1.35rem; }

  .hero-card--split{
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 1.25rem;
  }

  .two-col{ grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 980px){
  .cards{ grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}

/* =========================================
   HERO (ruhiger): Text links, Bild klein rechts
   Widget darunter volle Breite
   ========================================= */

.hero-card--quiet{
  max-width: 66rem;
  margin: 0 auto;
}

/* Layout: mobile untereinander */
.hero-quiet{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}



/* Widget-Bereich: außerhalb der beigen Box */
.hero-booking{
  max-width: 66rem;
  margin: 1rem auto 0;
}

.hero-booking-panel{
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  overflow: visible;
}

/* =========================================
   Smoobu Widget – feste, reduzierte Höhe
   ========================================= */

#apartmentIframeAll iframe{
  width: 100% !important;
  height: 360px !important;   /* Desktop */
  border: 0 !important;
  display: block !important;
}

/* Tablet */
@media (max-width: 1024px){
  #apartmentIframeAll iframe{
    height: 420px !important;
  }
}

/* Mobile */
@media (max-width: 768px){
  #apartmentIframeAll iframe{
    height: 520px !important;
  }
}

/* Desktop: Text links, Bild rechts oben */
@media (min-width: 900px){
  .hero-quiet{
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
    align-items: start;
  }

}

/* Hero: zwei getrennte Boxen nebeneinander (Desktop), mobil untereinander */
.hero-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 900px){
  .hero-split{
    grid-template-columns: 1fr 1fr; /* links Inhalt, rechts Widget */
    gap: 1.25rem;
  }

  .hero-card--quiet,
  .hero-booking{
    max-width: none;  /* damit beide Spalten sauber füllen */
    margin: 0;        /* kein auto-centering in Spalten */
  }
}
@media (min-width: 900px){
  /* Beide Spalten gleich hoch */
  .hero-split{
    align-items: stretch;
  }

  .hero-card--quiet,
  .hero-booking-panel{
    height: 100%;
  }
}
@media (min-width: 900px){
  /* Linke Box: Text oben, Foto unten mittig */
  .hero-quiet{
    display: grid;
    grid-template-rows: auto 1fr auto; /* Text oben, Spacer, Foto unten */
    grid-template-columns: 1fr;        /* kein 2-Spalten-Layout mehr in der linken Box */
    gap: 1rem;
    height: 100%;
  }

  .hero-copy{
    grid-row: 1;
  }



}
@media (min-width: 900px){
  /* Booking-Box bewusst höher, damit Datepicker Platz hat */
  .hero-booking-panel{
    min-height: 450px;
  }

  /* iframe selbst ebenfalls höher */
  #apartmentIframeAll iframe{
    height: 420px !important;
  }
}
@media (min-width: 900px){
  /* Linke Box: Text oben, Bild vertikal mittig */
  .hero-quiet{
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .hero-copy{
    flex: 0 0 auto;   /* Text bleibt oben */
  }


}

/* Hero Bild – eine saubere, eindeutige Definition */
.hero-photo--small{
  margin: 0 auto;              /* horizontal zentriert */
  display: flex;
  align-items: center;         /* vertikal zentriert */
  justify-content: center;
}

.hero-photo--small img{
  display: block;
  max-width: 100%;
  height: auto;
}
