:root{
  --accent: #b11f1f;

  --text: #111;
  --muted: #666;
  --border: #e5e7eb;

  --max: 1100px;
  --font: Arial, Helvetica, sans-serif;

  /* Light defaults */
  --bg: #fff;
  --surface: #fff;

  /* Header bleibt IMMER hell */
  --header-bg: #fff;
  --header-text: #111;
  --header-border: #e5e7eb;
}

*{ box-sizing: border-box; }
img{ max-width: 100%; height: auto; }

html, body{ overflow-x: hidden; }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main{ flex: 1; }

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-decoration-color: var(--accent); }

.wrapper,
.container{
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* =========================
   Header + Navigation
========================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

.site-header .header-inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Logo + Nav Gruppe mittig */
  padding: 10px 0;
}

.site-header .header-group{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.brand img{
  height: 44px;
  width: auto;
  display: block;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 18px;
  background: transparent; /* Desktop: nimmt Header-Farbe */
}

.site-nav a{
  text-decoration: none;
  color: var(--header-text);
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}

.site-nav a:hover{ background: #f3f4f6; }

.site-nav a[aria-current="page"]{
  background: #111;
  color: #fff;
}

/* Burger rechts, ohne Zentrierung zu stören */
.nav-toggle{
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);

  border: 1px solid var(--header-border);
  background: var(--header-bg);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--header-text);
  margin: 4px 0;
}

/* Theme Toggle Button (Icon-Button) */
.theme-toggle{
  position: absolute;
  right: 64px; /* links neben Burger */
  top: 50%;
  transform: translateY(-50%);

  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;

  border-radius: 12px;
  border: 1px solid var(--header-border);
  background: var(--header-bg);
  color: var(--header-text);
  cursor: pointer;

  font-size: 18px;
  line-height: 1;
}

/* Mobile Dropdown */
@media (max-width: 720px){
  .nav-toggle{ display: inline-flex; flex-direction: column; justify-content: center; }

  .site-nav{
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;

    /* exakt wie Header */
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  }

  .site-nav a{ padding: 12px 12px; }

  body.nav-open .site-nav{ display: flex; }

  .theme-toggle{ right: 64px; }
}

/* =========================
   Footer
========================= */
.site-footer{
  margin-top: 60px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  background: #fafafa;
  width: 100%;
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-left{ white-space: nowrap; color: #555; }
.footer-right{ display: flex; gap: 18px; }

.footer-right a{
  text-decoration: none;
  color: #111;
}

.footer-right a:hover{ text-decoration: underline; }

@media (max-width: 640px){
  .footer-inner{ flex-direction: column; text-align: center; }
  .footer-left{ white-space: normal; }
}

/* =========================
   Typography
========================= */
h1{ font-size: 28px; margin: 30px 0 14px; }
h2{ font-size: 20px; margin: 24px 0 10px; }
p{ line-height: 1.5; }

.lead{
  font-size: 1.15rem;
  line-height: 1.6;
}

.subtitle{
  color: var(--muted);
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.icon-list li{ margin-bottom: 0.5rem; }

/* =========================
   Buttons
========================= */
.btn{
  margin-top: 12px;
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.btn:hover{
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* =========================
   Angebote Grid + Cards
========================= */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 18px 0 40px;
}

@media (max-width: 900px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card img{
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.card-body{
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.badge{
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-title{ font-weight: 700; margin: 0 0 6px; }
.card-addr{ color: var(--muted); font-size: 13px; margin: 0 0 10px; }

.facts{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.fact{
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
}

.card-price{ margin-top: 10px; font-weight: 700; }

.card .btn{ margin-top: auto; }

/* =========================
   Angebot Detail (Hero + Layout)
========================= */
.hero{
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.hero-img{
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  background: #f2f2f2;
}

.hero-body{ padding: 14px; }

.hero-title{
  font-size: 28px;
  margin: 10px 0 8px;
}

.hero-sub{
  margin: 0 0 10px;
  color: var(--muted);
}

.hero-price{
  margin-top: 10px;
  font-size: 18px;
  font-weight: 800;
}

.layout{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 900px){
  .layout{ grid-template-columns: 1fr; }
}

.card2{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
  margin-bottom: 16px;
}

.card2-title{
  font-size: 18px;
  margin: 0 0 10px;
}

.pre{
  margin: 0;
  white-space: pre-line;
  line-height: 1.6;
}

.kv{
  width: 100%;
  border-collapse: collapse;
}

.kv td{
  padding: 8px 0;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

.kv tr:first-child td{ border-top: none; }

.kv-k{ width: 42%; padding-right: 12px; }
.kv-v{ color: var(--text); }

.clean-ul{
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

/* Gallery */
.gallery{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 600px){
  .gallery{ grid-template-columns: 1fr; }
}

.gallery-item img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: block;
  background: #f2f2f2;
}

.bigimg img{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: block;
  background: #f2f2f2;
}

/* =========================
   Lightbox
========================= */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.lightbox.open{ display: flex; }

.lightbox-inner{
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 90vh;
  width: 100%;
  display: grid;
  place-items: center;
}

.lightbox-img{
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: #111;
}

.lightbox-close{
  position: absolute;
  top: -12px;
  right: -12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-close:hover{ background: rgba(0,0,0,0.7); }

.lightbox-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox-nav:hover{ background: rgba(0,0,0,0.7); }

.lightbox-prev{ left: -8px; }
.lightbox-next{ right: -8px; }

@media (max-width: 700px){
  .lightbox-prev{ left: 6px; }
  .lightbox-next{ right: 6px; }
  .lightbox-close{ top: 6px; right: 6px; }
}

.lightbox-caption{
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-align: center;
  user-select: none;
}

/* =========================
   Startseite (Intro + Teaser)
========================= */
.home-intro{
  max-width: 900px;
  margin: 28px auto 40px;
  padding: 20px 22px 24px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.home-intro h1{
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.home-intro p{
  margin: 0 0 12px;
  max-width: 78ch;
  line-height: 1.7;
}

.home-intro a{
  font-weight: 600;
  text-decoration: none;
}

.home-intro a:hover{ text-decoration: underline; }

/* Teaser Bild oben */
.teaser-img{
  margin: -20px -22px 12px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.teaser-img img{
  width: 100%;
 height: clamp(140px, 18vw, 260px); /* Desktop: größer, aber begrenzt */
  object-fit: cover;
	object-position: center 35%;        /* Fokus etwas nach oben */
  display: block;
  background: #f2f2f2;
}

@media (max-width: 640px){
  .home-intro{
    margin: 20px auto 28px;
    padding: 16px;
  }
  .home-intro h1{ font-size: 24px; }

  .teaser-img img{ height: 120px; }
}

.teaser{
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0 10px;
}

@media (max-width: 700px){
  .teaser{ grid-template-columns: 1fr; }
}

.teaser-card{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.teaser-card h2{
  margin: 0 0 8px;
  font-size: 18px;
}

.teaser-card p{
  margin: 0 0 12px;
  line-height: 1.6;
  max-width: 70ch;
}

.teaser-card .btn{
  margin-top: auto;
  min-width: 180px;
  text-align: center;
  align-self: flex-start;
}

/* =========================
   Content / Legal Seiten
========================= */
.content{
  padding: 28px 0 60px;
}

.page-card{
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 22px 26px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.page-card h1{
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 14px;
}

.page-card h2{
  font-size: 22px;
  margin: 26px 0 10px;
}

.page-card p{
  max-width: 78ch;
  line-height: 1.75;
  margin: 0 0 14px;
}

.page-card ul{
  max-width: 78ch;
  margin: 0 0 18px 18px;
}

.page-card li{
  margin: 6px 0;
  line-height: 1.6;
}

.legal h1{ margin-bottom: 20px; }
.legal h2{ margin-top: 28px; margin-bottom: 8px; }
.legal p{ max-width: 800px; line-height: 1.6; }

/* =========================
   Kontakt
========================= */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 800px){
  .contact-grid{ grid-template-columns: 1fr; }
}

.contact-card{
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 16px;
}

.contact-card h2{
  margin: 0 0 10px;
  font-size: 18px;
}

.contact-form label{
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea{
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #111;
}

.contact-form textarea{ resize: vertical; }

.contact-form .checkbox{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.contact-form .checkbox input{
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.contact-form .checkbox span{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.form-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.muted{
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

/* =========================
   Modal (Datenschutz-Overlay)
========================= */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.is-open{ display: block; }

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal__panel{
  position: relative;
  width: min(920px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.modal__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal__header h2{
  margin: 0;
  font-size: 18px;
}

.modal__close{
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.modal__body{
  padding: 16px;
  overflow: auto;
}

.modal__body h1{ display: none; }
.modal__body h2{ margin-top: 18px; }
.modal__body p{ line-height: 1.7; max-width: 78ch; }

/* =========================
   Dark Mode (Content dunkel, Header bleibt hell)
========================= */
body.dark{
  --bg: #1c1f24;
  --surface: #242830;
  --text: #f1f3f5;
  --muted: #a0a4aa;
  --border: #333;

  /* Header bleibt hell */
  --header-bg: #ffffff;
  --header-text: #111111;
  --header-border: #e5e7eb;
}

body.dark .home-intro{ background: var(--surface); }

body, .card, .card2, .teaser-card, .home-intro, .hero, .modal__panel{
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}