/* Farbvariablen – an Logo angelehnt (Grün-Töne) */
:root {
  --color-bg: #f7f4e9;          /* leicht warmes Creme */
  --color-bg-alt: #ffffff;
  --color-primary: #2f5c29;     /* dunkles Grün */
  --color-primary-soft: #d9e2c4;/* sanfter Grün-Ton */
  --color-text: #1f261b;
  --color-muted: #555555;
  --color-border: #d6d6c8;
  --color-footer-bg: #263220;
}

/* Basis-Reset */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

/* Logo-Bild */
.logo-link img {
  height: 80px;
  width: auto;
}

@media (max-width: 480px) {
  .logo-link img {
    height: 60px;
  }
}

.main-nav a {
  margin-left: 16px;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-bg-alt));
  padding: 40px 0 50px;
}

.hero-inner {
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2rem;
  margin: 0 0 8px;
  color: var(--color-primary);
}

.hero-text p {
  margin: 0 0 16px;
  color: var(--color-muted);
}

.btn-primary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 4px;
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(0.9);
}

/* Hero-Bild */
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

/* Platzhalter-Bilder */
.image-placeholder {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
  border-radius: 8px;
  padding: 40px 16px;
  text-align: center;
  font-size: 0.9rem;
}

/* Abschnitte */
.section {
  padding: 40px 0;
  background-color: var(--color-bg);
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.6rem;
  color: var(--color-primary);
}

.section p {
  margin: 0 0 12px;
}

/* Grid für Wohnungen */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 16px;
}

.wohnung-card {
  background-color: var(--color-bg-alt);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  display: grid;
  gap: 12px;
  border: 1px solid var(--color-border);
}

.wohnung-content h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.wohnung-kurztext {
  margin: 0 0 8px;
  color: var(--color-muted);
}

.wohnung-details {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.wohnung-details li {
  margin-bottom: 4px;
}

.wohnung-preis {
  font-weight: 500;
  margin: 8px 0 4px;
}

/* Kontaktbereich */
.kontakt-info p {
  margin: 4px 0;
}

.kontakt-info a {
  color: var(--color-primary);
}

/* Karte */
.map-embed {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
}

/* ==== GALERIE FÜR WOHNUNGEN ==== */
.wohnung-gallery {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}


.wohnung-gallery img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wohnung-gallery img:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transform: translateY(-3px);   /* verschiebt nur, skaliert nicht */
}



/* ==== LIGHTBOX ==== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Lightbox Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  font-size: 1.6rem;
  cursor: pointer;
  border-radius: 999px;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Footer */
.site-footer {
  background-color: var(--color-footer-bg);
  color: #dddddd;
  padding: 16px 0;
  margin-top: 24px;
}

.footer-inner {
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: #dddddd;
  text-decoration: underline;
}

/* Responsive */
@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1.3fr 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wohnung-card {
    grid-template-columns: 0.9fr 1.5fr;
  }
}

@media (max-width: 600px) {
  .main-nav a {
    margin-left: 10px;
    font-size: 0.9rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }
}
/* ------------------------------
   Kontaktformular
------------------------------ */

.contact-wrapper {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 30px;
  align-items: flex-start;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e0d7c5;
  padding: 20px 20px 24px;
}

.contact-info-box {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0d7c5;
  padding: 20px;
}

.contact-form .form-row {
  margin-bottom: 14px;
}

.contact-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="date"],
.contact-form input[type="number"],
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}

.contact-form textarea {
  resize: vertical;
}

.form-row-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 700px) {
  .form-row-inline {
    grid-template-columns: 1fr;
  }
}

.checkbox-row label {
  font-weight: normal;
  font-size: 14px;
}

.checkbox-row input[type="checkbox"] {
  margin-right: 6px;
}

.btn-primary {
  background-color: #2d4c2f;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary:hover {
  background-color: #39643b;
}

/* Honeypot-Feld verstecken */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Formular-Statusmeldungen */
.form-success {
  margin-top: 12px;
  color: #2f7d32;
  font-weight: bold;
}

.form-error {
  margin-top: 12px;
  color: #b00020;
  font-weight: bold;
}

/* Mobile: erst Text, dann Bilder in den Wohnungsboxen */
@media (max-width: 768px) {
  .wohnung-card {
    display: flex;
    flex-direction: column;
  }

  .wohnung-card .wohnung-content {
    order: 1; /* Textblock nach oben */
  }

  .wohnung-card .wohnung-gallery {
    order: 2;           /* Bilder darunter */
    margin-top: 12px;   /* kleiner Abstand zum Text */
  }

  .wohnung-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
  }
}
.gallery-button {
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: 0.2s;
  background: #fff;
  margin-bottom: 20px;
}

.gallery-button:hover {
  border-color: #8a9b61;
  background: #f8f8f2;
}

.gallery-thumb-row {
  display: flex;
  gap: 6px;
  overflow: hidden;
}

.gallery-thumb-row img {
  width: 33%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-label {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-weight: bold;
  color: #4b5c2f;
}
.wohnung-gallery {
  display: none;
}

