/* ==========================================================================
   StayGalm – Shared Stylesheet
   Palette: Navy / Beige, inspired by das StayGalm Logo
   ========================================================================== */

:root {
  --navy: #1B2A41;
  --navy-deep: #101A2B;
  --navy-soft: #435870;
  --beige: #F1E9DC;
  --beige-warm: #E4D6BE;
  --tan: #B99B6B;
  --tan-deep: #9C7C4C;
  --cream: #FBF8F3;
  --white: #FFFFFF;
  --ink: #1B2A41;
  --ink-muted: #5B6472;
  --line: #DCD2BF;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1120px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink); }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tan-deep);
  font-weight: 600;
  margin-bottom: 14px;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 640px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--cream);
}
.btn-primary:hover { background: var(--navy-deep); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--cream); }

.btn-tan {
  background: var(--tan);
  color: var(--navy-deep);
}
.btn-tan:hover { background: var(--tan-deep); color: var(--cream); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.logo .gable {
  width: 26px;
  height: 22px;
  flex-shrink: 0;
}

.logo .gable path { stroke: var(--tan-deep); }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

nav.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy-soft);
  position: relative;
  padding: 4px 0;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--navy);
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--tan);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 34px;
  height: 34px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  display: block;
}

/* ---------- Gable divider (signature motif) ---------- */

.gable-divider {
  width: 100%;
  height: 34px;
  display: block;
}
.gable-divider path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.gable-divider.on-navy path { stroke: rgba(241,233,220,0.35); }

/* ---------- Hero (home) ---------- */

.hero {
  background: linear-gradient(180deg, var(--beige) 0%, var(--cream) 100%);
  padding: 88px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 32px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-mark {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(27,42,65,0.05) 26px 27px),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.hero-mark svg { width: 100%; height: auto; opacity: 0.9; }

.hero-mark .caption {
  position: relative;
  color: var(--beige);
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
}

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

section { padding: 80px 0; }
.section-tight { padding: 56px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-beige { background: var(--beige); }
.section-navy { background: var(--navy); color: var(--cream); }
.section-navy h2, .section-navy h3 { color: var(--cream); }
.section-navy p { color: rgba(241,233,220,0.82); }

/* ---------- Apartment cards (home) ---------- */

.apartment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.apartment-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.apartment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(27,42,65,0.1);
}

.photo-placeholder {
  aspect-ratio: 4/3;
  width: 100%;
  background:
    repeating-linear-gradient(45deg, var(--beige-warm) 0 2px, transparent 2px 14px),
    var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photo-placeholder .gable-icon {
  width: 46px; height: 40px;
  opacity: 0.55;
}
.photo-placeholder .gable-icon path { stroke: var(--navy-soft); }
.photo-placeholder .label {
  position: absolute;
  bottom: 14px; left: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-soft);
  background: rgba(251,248,243,0.85);
  padding: 4px 10px;
  border-radius: var(--radius);
}

.card-body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-tag {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tan-deep);
  font-weight: 600;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 6px 0 4px;
}

.card-body .btn { align-self: flex-start; margin-top: 10px; }

/* ---------- Feature / amenity grid ---------- */

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.amenity-group h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tan-deep);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.amenity-group ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.amenity-group li {
  font-size: 0.92rem;
  color: var(--ink);
  padding-left: 20px;
  position: relative;
}
.amenity-group li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 1px;
  background: var(--tan);
}

/* ---------- Info strip (checkin/checkout, distances) ---------- */

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 26px 24px;
  border-radius: var(--radius);
}

.info-card .eyebrow { margin-bottom: 10px; }

.distance-list { list-style: none; margin: 0; padding: 0; }
.distance-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.distance-list li:last-child { border-bottom: none; }
.distance-list span:last-child { color: var(--ink-muted); }

/* ---------- Apartment hero ---------- */

.apt-hero {
  background: var(--beige);
  padding: 56px 0 0;
}

.apt-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}

.apt-hero .photo-placeholder {
  aspect-ratio: 5/4;
  border-radius: var(--radius);
}

.apt-badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.badge {
  font-size: 0.8rem;
  border: 1px solid var(--navy-soft);
  color: var(--navy-soft);
  padding: 6px 12px;
  border-radius: 100px;
}

/* ---------- Two-column description ---------- */

.two-col {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

/* ---------- Booking form ---------- */

.booking-panel {
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 48px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.booking-panel h2, .booking-panel p { color: var(--cream); }
.booking-panel .lede { color: rgba(241,233,220,0.75); }

.booking-facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.booking-facts li {
  font-size: 0.92rem;
  padding-left: 22px;
  position: relative;
  color: rgba(241,233,220,0.85);
}
.booking-facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 10px; height: 1px;
  background: var(--tan);
}

form.booking-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(241,233,220,0.75);
}

.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(251,248,243,0.06);
  border: 1px solid rgba(241,233,220,0.3);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(241,233,220,0.45); }

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--tan);
  outline-offset: 1px;
}

.form-status {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: var(--tan);
  min-height: 20px;
}

form.booking-form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}

.gallery-grid button.gallery-item {
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-grid button.gallery-item:hover img { transform: scale(1.05); }

.gallery-grid button.gallery-item:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 2px;
}

.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.apt-hero .photo-placeholder.has-image {
  padding: 0;
  background: var(--navy);
}
.apt-hero .photo-placeholder.has-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.card-photo {
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 26, 43, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 40px;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(920px, 90vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(251,248,243,0.1);
  border: 1px solid rgba(241,233,220,0.4);
  color: var(--cream);
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 24px; right: 24px;
  width: 42px; height: 42px;
  font-size: 1.3rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 1.4rem;
}
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }
.lightbox-nav:hover,
.lightbox-close:hover { background: rgba(251,248,243,0.22); }

.lightbox-caption {
  position: absolute;
  bottom: 28px; left: 0; right: 0;
  text-align: center;
  color: rgba(241,233,220,0.75);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-item.wide { grid-column: span 2; }
  .lightbox-nav { width: 40px; height: 40px; }
}

/* ---------- Verfügbarkeitskalender ---------- */

.avail-cal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px 24px;
  max-width: 420px;
}

.avail-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.avail-cal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
}

.avail-nav {
  width: 34px; height: 34px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--navy);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.avail-nav:hover { background: var(--beige); }

.avail-cal-weekdays,
.avail-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.avail-cal-weekdays span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding-bottom: 6px;
}

.avail-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: var(--radius);
}

.avail-day.empty { visibility: hidden; }
.avail-day.past { color: var(--line); }
.avail-day.unknown { color: var(--ink-muted); background: var(--cream); }

.avail-day.free {
  background: rgba(185,155,107,0.12);
  color: var(--navy);
  font-weight: 600;
}

.avail-day.blocked {
  background: var(--navy);
  color: rgba(241,233,220,0.55);
  text-decoration: line-through;
}

.avail-day.today {
  outline: 1.5px solid var(--tan-deep);
  outline-offset: -1.5px;
}

.avail-cal-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.avail-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 100px;
  margin-right: 6px;
  vertical-align: middle;
}
.avail-dot.free { background: var(--tan); }
.avail-dot.blocked { background: var(--navy); }

.avail-cal-status {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ---------- WhatsApp Floating Button ---------- */

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(16,26,43,0.28);
  z-index: 150;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(16,26,43,0.34);
}
.whatsapp-float svg { width: 30px; height: 30px; }

@media (max-width: 520px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

/* ---------- FAQ Accordion ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--navy);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 100px;
  border: 1px solid var(--tan);
  color: var(--tan-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s ease;
}
.faq-item[open] summary .faq-icon { transform: rotate(45deg); }

.faq-item .faq-answer {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

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

footer.site-footer {
  background: var(--navy-deep);
  color: rgba(241,233,220,0.7);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(241,233,220,0.14);
}

.footer-grid .logo { color: var(--beige); margin-bottom: 12px; }
.footer-grid .logo .gable path { stroke: var(--tan); }

footer h4 {
  color: var(--beige);
  font-family: var(--font-body);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
footer a { font-size: 0.9rem; }
footer a:hover { color: var(--tan); }

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  nav.main-nav {
    position: fixed;
    top: 84px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.25s ease;
  }
  nav.main-nav.open { transform: translateY(0); }
  .nav-toggle { display: flex; }

  .hero-grid, .apt-hero-grid, .two-col, .booking-panel, .footer-grid {
    grid-template-columns: 1fr;
  }
  .apartment-grid { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: 1fr 1fr; }
  .info-strip { grid-template-columns: 1fr; }
  form.booking-form { grid-template-columns: 1fr; }
  .booking-panel { padding: 32px 24px; }
  section { padding: 56px 0; }
}

@media (max-width: 520px) {
  .amenity-grid { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
}

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