/* ============================================
   Haus Bläsi – Ferienwohnungen in Ehrwald
   ============================================ */

:root {
  --ink: #26282a;
  --ink-soft: #4c5054;
  --paper: #ffffff;
  --paper-warm: #f6f4ef;
  --accent: #3e5c46;      /* alpine green */
  --accent-dark: #2e4534;
  --line: #e3e0d8;
  --footer-bg: #263129;
  --footer-text: #e6ebe6;
  --footer-muted: #c3cdc3;
  --max: 1140px;
  --radius: 8px;
  --shadow: 0 2px 16px rgba(38, 49, 41, .07);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
}

img { max-width: 100%; }

/* ---------- Language toggle ---------- */
html[data-lang="de"] .en { display: none !important; }
html[data-lang="en"] .de { display: none !important; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.35rem; margin-bottom: .75rem; }

p { margin-bottom: 1rem; color: var(--ink-soft); }
strong { color: var(--ink); }

a { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Section heading with small accent rule */
.section h2 {
  position: relative;
  padding-bottom: .7rem;
}
.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section h2.center::after,
.center h2::after { left: 50%; transform: translateX(-50%); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section.warm { background: var(--paper-warm); }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: .95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  margin-left: -2rem;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 150px;
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
}

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 500;
  letter-spacing: .015em;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.main-nav a:hover, .main-nav a.active { border-bottom-color: var(--accent); }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-left: .5rem;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: .4rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.lang-switch button.active { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: .3rem .5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-color: #3a4a3f;
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 26, 20, .38), rgba(18, 26, 20, .50));
}
.hero-content { position: relative; z-index: 1; padding: 2rem 1.5rem 1.5rem; max-width: 820px; }
.hero h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero p {
  color: #f2f1eb;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  margin: .9rem 0 1.5rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
}

/* Page hero (subpages) */
.page-hero {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--line);
  padding: 3.8rem 1.5rem;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: .85rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn.ghost:hover { background: var(--accent); color: #fff; }
.btn-row { display: flex; gap: .9rem; flex-wrap: wrap; }

/* ---------- Two-column feature (image + text) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.feature.reverse .feature-img { order: 2; }
.feature-img img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.feature .meta {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}

/* ---------- Amenity list ---------- */
.amenities {
  list-style: none;
  margin: 1.2rem 0 1.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem 1.5rem;
}
.amenities li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--ink-soft);
  font-size: .96rem;
  line-height: 1.55;
}
.amenities li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.gallery-grid a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--paper-warm);
  box-shadow: var(--shadow);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery-grid a:hover img { transform: scale(1.045); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 10, .93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 10px 50px rgba(0,0,0,.5);
}
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: 0;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
  transition: opacity .2s, background .2s;
}
.lightbox button:hover { opacity: 1; background: rgba(255,255,255,.18); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: .8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .8rem; top: 50%; transform: translateY(-50%); }

/* ---------- Price tables ---------- */
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.2rem;
}
.price-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
}
.price-card h3 {
  border-bottom: 2px solid var(--accent);
  padding-bottom: .6rem;
  margin-bottom: 1.2rem;
}
.price-card table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.price-card td {
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}
.price-card tr:last-child td { border-bottom: 0; }
.price-card td:last-child { text-align: right; white-space: nowrap; color: var(--ink); font-weight: 700; }
.price-note { font-size: .88rem; color: var(--ink-soft); margin-top: 1rem; margin-bottom: 0; }

.notice {
  background: var(--paper-warm);
  border-left: 4px solid var(--accent);
  padding: 1.3rem 1.6rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 2.5rem;
  font-size: .97rem;
  color: var(--ink-soft);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2.2rem;
}
.contact-card {
  background: var(--paper-warm);
  border-radius: var(--radius);
  padding: 2.2rem;
}
.contact-card p { margin-bottom: .7rem; }
.contact-card .big {
  font-size: 1.25rem;
  color: var(--ink);
  font-family: var(--serif);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 0 2rem;
  margin-top: 4.5rem;
  font-size: 1rem;
  line-height: 1.8;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.site-footer p { color: var(--footer-text); }
.site-footer h4 {
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  margin-bottom: .9rem;
  font-size: 1.2rem;
  letter-spacing: .02em;
}
.site-footer a {
  color: var(--footer-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.site-footer a:hover { color: #fff; border-bottom-color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .5rem; }
.footer-bottom {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding: 1.4rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,.18);
  font-size: .95rem;
  color: var(--footer-muted);
}

/* ---------- Legal pages ---------- */
.legal { max-width: 800px; }
.legal h2 { margin-top: 2.6rem; font-size: 1.45rem; }
.legal h3 { margin-top: 1.6rem; }

/* ---------- Reviews ---------- */
.review-score {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: .7rem 1.3rem;
  margin-bottom: 2rem;
  font-weight: 600;
}
.review-score .num {
  font-size: 1.5rem;
  font-family: var(--serif);
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
  text-align: left;
}
.review-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.review-card blockquote {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 1rem;
  flex: 1;
}
.review-card cite {
  font-style: normal;
  font-size: .9rem;
  color: var(--ink-soft);
}
.review-card cite strong { display: block; color: var(--ink); }
.stars { color: #d9a441; letter-spacing: .1em; margin-bottom: .8rem; }

/* ---------- Facts table ---------- */
.facts {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: .98rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.facts th, .facts td {
  text-align: left;
  padding: .8rem 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th {
  width: 38%;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-warm);
}
.facts td { color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 2rem auto 0; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: .8rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }

/* ---------- Verfügbarkeitskalender ---------- */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}
.cal-month {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.cal-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.cal-nav {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
}
.cal-nav:hover:not(:disabled) { background: var(--accent); color: #fff; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
  font-size: .85rem;
}
.cal-dow { color: var(--ink-soft); font-size: .72rem; padding-bottom: .2rem; }
.cal-day {
  padding: .3rem 0;
  border-radius: 4px;
  background: #eef3ee;
  color: var(--ink);
}
.cal-day.cal-busy {
  background: #e8d2cc;
  color: #9c4a3c;
  text-decoration: line-through;
}
.cal-day.cal-past { background: transparent; color: #c0bdb6; }
.cal-day.cal-free { cursor: pointer; }
.cal-day.cal-free:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-day.cal-sel { background: #cdddd0; }
.cal-day.cal-sel-edge { background: var(--accent); color: #fff; font-weight: 700; }
.cal-summary {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-top: .8rem;
  font-size: .95rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.cal-summary .btn { display: inline-block; }
.cal-form .form-row { display: flex; gap: .8rem; margin-bottom: .7rem; }
.cal-form .form-row[hidden] { display: none; }
.cal-form label { flex: 1; font-size: .82rem; font-weight: 600; color: var(--ink); }
.cal-form input, .cal-form select, .cal-form textarea {
  display: block;
  width: 100%;
  margin-top: .25rem;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
}
.cal-form input:focus, .cal-form select:focus, .cal-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.cal-form button:disabled { opacity: .45; cursor: default; transform: none; }
.cal-picked { color: var(--ink-soft); margin-bottom: .8rem; }
.cal-status { text-align: center; color: var(--ink-soft); }
.cal-key {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  vertical-align: -1px;
}
.cal-key-free { background: #eef3ee; border: 1px solid var(--line); }
.cal-key-busy { background: #e8d2cc; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.15);
}
.sticky-cta:active { background: var(--accent-dark); }

/* ============================================
   Responsive
   ============================================ */

/* --- Tablet (iPad portrait & small landscape) --- */
@media (max-width: 1024px) {
  .feature { gap: 2.2rem; }
  .section { padding: 4rem 0; }
  .main-nav { gap: 1.1rem; }
  .main-nav a { font-size: .9rem; }
  .price-grid, .contact-grid { gap: 1.5rem; }
}

/* --- Phones & iPad portrait narrow --- */
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .section { padding: 3.2rem 0; }
  .hero { min-height: 62vh; }

  .feature, .price-grid, .contact-grid { grid-template-columns: 1fr; }
  .feature.reverse .feature-img { order: 0; }
  .feature-img img { min-height: 240px; max-height: 380px; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

  .brand { margin-left: 0; }
  .brand-logo { height: 44px; }
  .brand small { font-size: .58rem; max-width: 130px; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
    flex-direction: column;
    padding: .6rem 1.5rem 1.4rem;
    align-items: stretch;
    gap: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    font-size: 1.05rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a:hover, .main-nav a.active {
    border-bottom-color: var(--line);
    color: var(--accent);
  }
  .lang-switch { margin: 1rem 0 0; align-self: flex-start; }
  .lang-switch button { padding: .55rem 1.1rem; font-size: .9rem; }

  .amenities { grid-template-columns: 1fr; }
  .price-card, .contact-card { padding: 1.6rem; }

  .btn { display: block; text-align: center; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn { display: inline-block; }

  .lb-prev { left: .3rem; }
  .lb-next { right: .3rem; }
  .lightbox button { width: 46px; height: 46px; font-size: 1.9rem; }

  .review-grid { grid-template-columns: 1fr; }
  .facts th { width: 45%; }
  .cal-wrap { grid-template-columns: 1fr; gap: 1.5rem; }

  .sticky-cta { display: block; }
  body { padding-bottom: 3.6rem; }
  .site-footer { margin-bottom: 0; }
}

/* --- Small phones --- */
@media (max-width: 400px) {
  .brand-logo { height: 40px; }
  .brand small { display: none; }
  .wrap, .header-inner { padding-left: 1.1rem; padding-right: 1.1rem; }
  .gallery-grid { grid-template-columns: 1fr; }
}
