/* =========================
   :ROOT – Farben & Layout
========================= */
:root {
  /* Vertikale Abstände */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Horizontaler Seitenrand */
  --page-padding: 5%;

  --bg-main: #f4f1ec;
  --bg-alt: #ffffff;
  --green: #5b745f; /* minimal wärmer */
  --green-soft: #7f9a85; /* weicher Hover */
  --accent: #c8b89a;

  --text-main: #2f2f2f;
  --text-muted: #666;

  --radius: 12px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

main {
  max-width: 1200px;
  margin: auto;
}
/* =========================
   HERO – 16:9, 2400 × 1350 px

========================= */
.hero-onepager {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 70vh;

  background-image: url("../images/hero-dreisam.jpg");
  background-position: center center;
  background-size: cover;
  background-attachment: scroll;
  transition: filter 0.3s ease;

  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5% 4rem;
}

@media (min-width: 992px) {
  .hero-onepager {
    background-attachment: fixed;
  }
}

.hero-onepager + .section {
  margin-top: var(--space-lg);
}

.hero-onepager::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.2));
  z-index: 0;
}

.hero-onepager > * {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  padding-left: 5%; /* bündig mit Sections */
  padding-right: 5%;
}

/* =========================
   HEADER FIX OBEN
========================= */
.site-header {
  position: absolute; /* am Hero kleben, scrollt mit Hero */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10; /* über Hero */
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  position: relative;
}

/* ============================= */
/* Sprache Wechsler Container    */
/* ============================= */

.language-switcher {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 2000;
  font-family: sans-serif;
  text-transform: uppercase;
  font-size: 0.85rem;
  display: inline-block;
  min-width: 70px; /* verhindert Breiten-Sprünge */
}

/* ============================= */
/* Aktuelle Sprache Button       */
/* ============================= */

.current-lang {
  width: 100%;
  background: #4a6c97;
  color: #fff;
  border: none;
  padding: 0.55rem 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;

  transition: background 0.2s ease;
}

/* Offener Zustand */
.language-switcher.open .current-lang {
  border-radius: 6px 6px 0 0;
  background: #3b5a87;
}

/* ============================= */
/* Dropdown                      */
/* ============================= */

.lang-dropdown {
  list-style: none;
  margin: 0;
  padding: 0;

  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;

  background: #3b5a87;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);

  display: none;
  flex-direction: column;
  overflow: hidden;
}

/* Anzeigen */
.language-switcher.open .lang-dropdown {
  display: flex;
}

/* ============================= */
/* Dropdown Links                */
/* ============================= */

.lang-dropdown li {
  width: 100%;
}

.lang-dropdown a {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  padding: 0.55rem 0;

  color: #fff;
  text-decoration: none;
  font-weight: 600; /* gleiche Stärke wie current */
  font-size: 0.85rem;

  transition: background 0.2s ease;
}

/* Trennlinie */
.lang-dropdown li:not(:last-child) a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.lang-dropdown a:hover {
  background: #2e486c;
}

/* ============================= */
/* Pfeil                         */
/* ============================= */

.arrow {
  font-size: 0.6rem;
  transition: transform 0.25s ease;
}

.language-switcher.open .arrow {
  transform: rotate(180deg);
}

/* ============================= */
/* Mobile Optimierung            */
/* ============================= */

@media (max-width: 600px) {
  .language-switcher {
    top: 1rem;
    right: 1rem;
    font-size: 0.9rem;
  }

  .current-lang,
  .lang-dropdown a {
    padding: 0.8rem 0; /* größere Klickfläche */
    font-size: 0.9rem;
  }
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: 4rem 5%;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* Abstand oben für bestimmte Sections reduzieren */
#wohnungen,
#umgebung,
#faq {
  padding-top: 1.6rem; /* 40% weniger als 4rem */
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   CARDS – Wohnungen & Umgebung
========================= */
.cards.apartments,
.cards.environment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0 0 0;
  max-width: none;
  padding: 0;
}

.cards.apartments .card,
.cards.environment .card {
  overflow: hidden;
  border-radius: var(--radius);
}

.cards.apartments img,
.cards.environment img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* =========================
   BUTTONS – EINHEITLICH
========================= */
.button-container {
  margin-top: 2rem;
  text-align: center;
}

.button,
.button-primary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px; /* weich */
  text-decoration: none;
  color: white;
  background: var(--green);
  transition:
    background 0.3s ease,
    transform 0.3s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.button:hover,
.button-primary:hover {
  background: var(--green-soft);
  transform: translateY(-2px);
}

.contact-form button {
  width: auto;
  margin-top: 1rem;
}

.cta-note {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* =========================
   FAQ / ACCORDION – Modern
========================= */

.accordion {
  width: 100%;
  padding: 1.4rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  background: white;
  border: none;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  color: var(--text-main);
  position: relative;
}

/* Hover */
.accordion:hover {
  background: #f7f6f4;
}

/* Aktiver Zustand */
.accordion.active {
  color: var(--green);
}

/* Pfeil rechts */
.accordion::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-50%) rotate(45deg);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

/* Pfeil rotiert bei aktiv */
.accordion.active::after {
  transform: translateY(-50%) rotate(-135deg);
  border-color: var(--green);
}

/* Panel */
.panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s ease;
}

.panel.open {
  max-height: 2000px;
  opacity: 1;
  padding: 1.2rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

/* =========================
   PREIS-CARDS
========================= */
.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.price-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.price-card h3 {
  margin-bottom: 1rem;
  color: var(--green);
  font-size: 1.3rem;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.price-card li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.price-card li:last-child {
  border-bottom: none;
}

.price-card li span {
  font-weight: 600;
  color: var(--green);
}

.price-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================
   KALENDER
========================= */
.panel-calendar {
  background: white;
  padding: 1rem;
}

.calendar-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  height: 500px; /* Mobil-Höhe */
}

@media (min-width: 768px) {
  .calendar-wrapper {
    height: 650px; /* Desktop-Höhe */
  }
}

.calendar-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Umschaltung der Kalender-Modi */
.mobile-cal {
  display: block;
}
.desktop-cal {
  display: none;
}

@media (min-width: 768px) {
  .mobile-cal {
    display: none;
  }
  .desktop-cal {
    display: block;
  }
}

/* Verhindert Scroll-Hänger */
.calendar-wrapper iframe {
  pointer-events: auto;
}

/* ========================= lädt inhalte von google ========================= */
.google-hint {
  color: var(--text-muted); /* gleiche Farbe wie Footer */
  font-size: 0.85rem; /* etwas kleiner als Button-Text */
  font-weight: 400; /* normal statt fett */
  margin-left: 0.3rem; /* Abstand zum Haupttext */
  opacity: 0.7; /* leicht transparent, subtiler */
}

/* =========================
   KONTAKTFORMULAR
========================= */
.contact-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.6s ease,
    opacity 0.6s ease,
    padding 0.6s ease;
  padding: 0;
}

.contact-section.active {
  max-height: 2000px;
  opacity: 1;
  padding: 2rem 0;
}

.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-form .form-group {
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.contact-section.active .form-group {
  opacity: 1;
  transform: translateY(0);
}

.contact-section.active .form-group:nth-child(1) {
  transition-delay: 0.1s;
}
.contact-section.active .form-group:nth-child(2) {
  transition-delay: 0.2s;
}
.contact-section.active .form-group:nth-child(3) {
  transition-delay: 0.3s;
}
.contact-section.active .form-group:nth-child(4) {
  transition-delay: 0.4s;
}
.contact-section.active .form-group:nth-child(5) {
  transition-delay: 0.5s;
}
.contact-section.active .form-group:nth-child(6) {
  transition-delay: 0.6s;
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--green);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(79, 107, 87, 0.2);
}

.contact-form .checkbox-group {
  display: flex;
  align-items: center;
}

.contact-form .checkbox-group input {
  width: auto;
  margin-right: 0.6rem;
}

.contact-form button {
  display: inline-block;
  margin-top: 1rem;
}

/* =========================
   WhatsApp Inline im Kontakt
========================= */

.contact-alt {
  text-align: center;
  margin: 1.5rem 0 2rem 0;
}

.alt-text {
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  opacity: 0.8;
}

.whatsapp-inline {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  background: #25D366;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.whatsapp-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
/* WhatsApp Button im Kontaktbereich */
.button-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #5b745f; /* dein ruhiges Grün */
  color: #fff;
  border-radius: 30px;
  padding: 0.8rem 1.6rem;
  transition: all 0.3s ease;
}

.button-whatsapp:hover {
  background: #4c6352;
  transform: translateY(-2px);
}

.wa-icon {
  width: 18px;
  height: 18px;
}

/* =============== WhatsApp – nur echte Mobile Geräte =============== */
/* Standard: immer unsichtbar */
.whatsapp-mobile-float {
  display: none !important;
  transition: transform 0.3s ease;
}

/* Nur echte Touch-Geräte */
@media (hover: none) and (pointer: coarse) {

  .whatsapp-mobile-float {
    display: flex !important;
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    width: 52px;
    height: 52px;
    background: #5b745f;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  }

  .whatsapp-mobile-float svg {
    width: 22px;
    height: 22px;
  }
}

/* Scroll-Effekt */
body.scrolled .whatsapp-mobile-float {
  transform: scale(0.9);
}

@media (hover: hover) {
  .whatsapp-mobile-float:hover {
    transform: scale(1.08);
  }
}

/* =========================
   LIGHTBOX
========================= */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
  .cards.apartments,
  .cards.environment {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .cards.apartments,
  .cards.environment {
    grid-template-columns: 1fr;
  }

  .cards.apartments img,
  .cards.environment img {
    height: 220px;
  }

  /* =========================
   Formular Highlight / Glow
   – nur Desktop
========================= */
  @media (min-width: 992px) {
    .contact-section {
      transition: box-shadow 0.6s ease;
    }

    .contact-section.highlight {
      animation: formGlow 2.5s ease-out;
    }

    @keyframes formGlow {
      0% {
        box-shadow: 0 0 0 0 rgba(167, 155, 142, 0);
      }
      30% {
        box-shadow: 0 0 35px 6px rgba(167, 155, 142, 0.35);
      }
      100% {
        box-shadow: 0 0 0 0 rgba(167, 155, 142, 0);
      }
    }
  }
}

/* =========================
   Formular „Ankommen“-Animation
========================= */
@media (min-width: 992px) {
  .contact-section {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity 0.6s ease,
      transform 0.6s ease;
  }

  .contact-section.active {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Formular – Submit States
========================= */
.privacy-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 10px;
}

.contact-form button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success Message */
.form-success {
  display: none;
  text-align: center;
  padding: 40px 30px;
  border-radius: 12px;
  background: #f7f6f4;
  animation: fadeInUp 0.6s ease forwards;
}

.form-success h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.form-success p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}
/* sanftes Einblenden */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Accessibility – Fokus
========================= */

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(167, 155, 142, 0.45);
  border-radius: 12px;
}