/* ============================================================
   Ferienwohnung Brehme – Pötzschau
   Main stylesheet — mobile-first
   ============================================================ */

/* ── Design tokens ───────────────────────────────────────── */
:root {
  --color-primary:       #3a6642;
  --color-primary-dark:  #2c4f32;
  --color-primary-light: #eef4f0;
  --color-accent:        #c4811a;
  --color-accent-light:  #fdf5e6;
  --color-bg:            #faf9f6;
  --color-surface:       #ffffff;
  --color-text:          #2a2a2a;
  --color-text-muted:    #666666;
  --color-border:        #ddd9d3;
  --color-booked:        #c0392b;
  --color-booked-light:  #fdecea;

  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 28px rgba(0,0,0,.18);

  --max-width:  1100px;
  --gap:        1.5rem;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-primary-dark);
}
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section {
  padding-block: 3rem;
}
.section--alt {
  background: var(--color-primary-light);
}
.section--accent {
  background: var(--color-accent-light);
}

/* ── Header / Navigation ─────────────────────────────────── */
.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}
.site-logo {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.site-logo__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--color-primary-dark);
  line-height: 1.2;
}
.site-logo__sub {
  font-size: .78rem;
  color: var(--color-text-muted);
}

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav menu */
.site-nav {
  display: none;
  width: 100%;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: .5rem;
}
.site-nav.is-open { display: block; }
.site-nav ul {
  display: flex;
  flex-direction: column;
}
.site-nav a {
  display: block;
  padding: .6rem 1.25rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  text-decoration: none;
}
.site-nav a.active {
  font-weight: 700;
  border-left: 3px solid var(--color-primary);
  padding-left: calc(1.25rem - 3px);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    width: auto;
    border-top: none;
    padding-block: 0;
  }
  .site-nav ul {
    flex-direction: row;
    gap: .25rem;
  }
  .site-nav a {
    padding: .45rem .85rem;
  }
  .site-nav a.active {
    border-left: none;
    border-bottom: 3px solid var(--color-primary);
    border-radius: 0;
    padding-left: .85rem;
  }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  background: var(--color-primary-dark);
  overflow: hidden;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .7;
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.25rem;
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
}
.hero__title {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: .5rem;
}
.hero__sub {
  color: rgba(255,255,255,.9);
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  max-width: 560px;
}

/* Hero slider controls */
.hero {
  cursor: default;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero__slide.active { opacity: .7; }

/* ── Intro strip ─────────────────────────────────────────── */
.intro-strip {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: 1.25rem;
}
.intro-strip p { margin: 0; font-size: 1.05rem; }

/* ── Icon-card grid ──────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  text-align: center;
}
.card__icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: .75rem;
}
.card h3 {
  margin-bottom: .5rem;
  font-size: 1.05rem;
}
.card p {
  font-size: .9rem;
  color: var(--color-text-muted);
}

/* ── Two-column layout ───────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col--wide { grid-template-columns: 3fr 2fr; }
}

/* ── Feature list ────────────────────────────────────────── */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.feature-list li {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  font-size: .95rem;
}
.feature-list li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: bold;
  flex-shrink: 0;
}

/* ── Price table ─────────────────────────────────────────── */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.price-table th,
.price-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.price-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) td { background: var(--color-primary-light); }
.price-table td:not(:first-child) { text-align: center; font-weight: 600; }

/* ── Gallery grid ────────────────────────────────────────── */
.section-heading {
  margin-bottom: 1.5rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-primary-light);
}
.section-heading + p {
  margin-top: -.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem;
}
.gallery__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  background: var(--color-border);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  opacity: 0;
}
.gallery__item:hover .gallery__item__overlay {
  background: rgba(0,0,0,.25);
  opacity: 1;
}

/* Placeholder when no real images available */
.gallery__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-border));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--color-text-muted);
  font-size: .85rem;
  text-align: center;
  padding: .5rem;
}
.gallery__placeholder span { font-size: 2rem; }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox__inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,.3); }
.lightbox__close { top: -16px; right: -16px; }
.lightbox__prev  { left: -22px;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: -22px; top: 50%; transform: translateY(-50%); }
.lightbox__caption {
  color: rgba(255,255,255,.8);
  text-align: center;
  font-size: .9rem;
  margin-top: .75rem;
}

/* ── Info box ────────────────────────────────────────────── */
.info-box {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin-block: 1.5rem;
}
.info-box h4 {
  color: var(--color-accent);
  margin-bottom: .5rem;
}

/* ── Highlight strip (Pötzschau page) ───────────────────── */
.poi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .poi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .poi-grid { grid-template-columns: repeat(3, 1fr); }
}
.poi-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}
.poi-card__icon { font-size: 1.75rem; flex-shrink: 0; }
.poi-card h4 { margin-bottom: .25rem; font-size: 1rem; }
.poi-card p  { font-size: .88rem; color: var(--color-text-muted); margin: 0; }

/* ── Calendar ────────────────────────────────────────────── */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.calendar-controls button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  cursor: pointer;
  font-size: .95rem;
  transition: background .15s;
}
.calendar-controls button:hover { background: var(--color-primary-dark); }
.calendar-controls h2 { font-size: 1.3rem; min-width: 200px; text-align: center; }

.calendar-months {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 700px) {
  .calendar-months { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .calendar-months { grid-template-columns: repeat(3, 1fr); }
}

.cal-month {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.cal-month__header {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  padding: .75rem;
  font-family: var(--font-heading);
  font-weight: bold;
  font-size: 1.05rem;
}
.cal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.cal-month__weekday {
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  padding: .5rem .25rem;
  color: var(--color-text-muted);
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-border);
}
.cal-day {
  text-align: center;
  padding: .5rem .25rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.empty { background: #f9f9f9; }
.cal-day.today {
  background: var(--color-accent-light);
  font-weight: bold;
  color: var(--color-accent);
}
.cal-day.booked {
  background: var(--color-booked-light);
  color: var(--color-booked);
  font-weight: 700;
  position: relative;
}
.cal-day.booked::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-booked);
}
.cal-day.weekend { color: var(--color-text-muted); }

.cal-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: .9rem;
}
.cal-legend__item {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cal-legend__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-legend__dot--booked  { background: var(--color-booked); }
.cal-legend__dot--today   { background: var(--color-accent); }
.cal-legend__dot--free    { background: var(--color-primary); }

#cal-status {
  text-align: center;
  padding: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
}
#cal-status.error { color: var(--color-booked); font-style: normal; }

/* ── Contact page ────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.contact-card h3 {
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-primary-light);
}
.contact-detail {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .9rem;
}
.contact-detail__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.contact-detail__text a { color: var(--color-primary); font-weight: 500; }
.contact-detail__text a:hover { text-decoration: underline; }

.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.map-embed iframe {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
}

/* ── Impressum ───────────────────────────────────────────── */
.impressum {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.impressum h3 { margin: 1.5rem 0 .5rem; }
.impressum h3:first-child { margin-top: 0; }
.impressum p, .impressum address { font-style: normal; font-size: .95rem; }

/* ── Page header banner ──────────────────────────────────── */
.page-banner {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 1.2rem 1.25rem;
  text-align: center;
}
.page-banner h1 { color: #fff; margin-bottom: .4rem; }
.page-banner p  { color: rgba(255,255,255,.8); margin: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,.85);
  padding-block: 2.5rem 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer-col h4 {
  color: #fff;
  margin-bottom: .75rem;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.footer-col p,
.footer-col li {
  font-size: .88rem;
  line-height: 1.8;
}
.footer-col a {
  color: rgba(255,255,255,.75);
  transition: color .15s;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}

/* ── Mini slideshow (inline content area) ────────────────── */
.mini-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-border);
}
.mini-slider__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease;
}
.mini-slider__slide.active { opacity: 1; }
.mini-slider__dots {
  position: absolute;
  bottom: .75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 2;
}
.mini-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s;
}
.mini-slider__dot.active { background: #fff; }

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s, transform .1s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--accent {
  background: var(--color-accent);
}
.btn--accent:hover { background: #a86d14; }
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}
