:root {
  --bg-alt: #ffffff;
  --bg-main: #f4f1ec;
  --text-main: #2f2f2f;
  --text-muted: #666;
  --green: #5b745f;       /* minimal wärmer */
  --green-soft: #7f9a85;  /* weicher Hover */
  --radius: 12px;
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.12);
}

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

body {
  margin: 0;
  font-family: 'Lato', system-ui, sans-serif; /* leichte, elegante Basis */
  background: var(--bg-main);
  color: var(--text-main);
}

main {
  max-width: 1200px;
  margin: auto;
  padding: 0 5%;
}

.section {
  padding: 4rem 0;
  padding-top: 0;     /* oben kein extra Abstand */
}

.icon-section {
  padding-bottom: 0.1rem; /* vorher z. B. 4rem */
  margin-bottom: 1rem; /* vorher evtl 2rem oder 4rem */
}

.apartment-features {
  padding-top: 0.1rem; /* vorher z. B. 4rem */
  margin-top: 1rem; /* vorher evtl 2rem oder 4rem */
}

/* ================= Buttons Global ================= */
.button,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button-primary:hover {
  background: var(--green-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.button:active,
.button-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ================= Icons ================= */
.icon-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 2.5rem;
  justify-items: center;
}

@media (max-width: 500px) {
  .icon-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.icon-box {
  text-align: center;
}

.icon-box img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem;
}

.icon-box h3 {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ================= Umgebung Icons ================= */

.environment-highlights h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4rem;
  /*color: var(--green);*/
}

.environment-highlights ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.environment-highlights li {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  gap: 0.6rem;
}

.environment-highlights li img {
  width: 24px;   /* kleinere Icons */
  height: 24px;
}

.environment-highlights li span {
  font-size: 0.95rem;
  color: var(--text-main);
}


/* ================= Flip Icons ================= */

.icon-box {
  perspective: 1000px;
  cursor: pointer;
}

.icon-inner {
  position: relative;
  width: 140px;          /* feste Breite */
  height: 140px;         /* feste Höhe */
  margin: 0 auto;        /* zentriert im Grid */
  transition: transform 0.55s ease;
  transform-style: preserve-3d;
}

.icon-box.active .icon-inner {
  transform: rotateY(180deg);
}

.icon-front,
.icon-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  padding: 1rem 0.5rem;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.icon-box:hover .icon-front {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Rückseite */
.icon-back {
  transform: rotateY(180deg);
  font-size: 0.9rem;
  color: var(--text-main);
}

.icon-back p {
  margin: 0.3rem 0;
}
/* ================= Galerie Basis ================= */

.apartment-gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.apartment-gallery img.gallery-thumb {
  width: calc(50% - 0.25rem); /* 2 pro Reihe */
  cursor: pointer;
  border-radius: 12px;
  object-fit: cover;
  height: 180px;
}

.gallery-thumb.hidden {
  display: none;
}

.gallery {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 2rem;
}

.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
}

.gallery-track img {
  min-width: 100%;
  height: 420px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

/* Pfeile */
.gallery .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 2;
}
.gallery .prev { left: 1rem; }
.gallery .next { right: 1rem; }

/* Dots */
.gallery-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
}
.gallery-dots button {
  width: 5px;               /* Etwas kleiner */
  height: 5px;              /* Gleich wie width für perfekte Rundung */
  border-radius: 50%;       /* 50% statt 83% für einen perfekten Kreis */
  border: none;
  background: rgba(255, 255, 255, 0.5); /* Etwas dezenter */
  cursor: pointer;
  padding: 0;               /* Verhindert Browser-Standard-Padding */
}

.gallery-dots button.active {
  background: var(--green);
}

/* ================= Lightbox ================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 5000;
  flex-direction: column;  /* 👈 wichtige Zeile: alles untereinander */
  padding: 1rem;           /* optional, Abstand zum Rand */
}

.lightbox.open {
  display: flex;
}
.lightbox .lightbox-image {
  max-width: 90%;
  max-height: 80%;
  border-radius: var(--radius);
  cursor: zoom-in;
  display: block;
}

.lightbox .lightbox-caption {
  display: block;          /* Block unter dem Bild */
  margin-top: 0.5rem;
  text-align: center;      /* zentriert unter dem Bild */
  color: white;
  font-size: 1rem;         /* nach Wunsch anpassen */
}

.lightbox .lightbox-close,
.lightbox .lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox .lightbox-close { top: 1rem; right: 1rem; transform: none; }
.lightbox .lightbox-nav.prev { left: 1rem; }
.lightbox .lightbox-nav.next { right: 1rem; }

/* ================= Ausstattung & Anfrage ================= */
.apartment-meta {
  display: block;       /* Blockelement, also unter dem Bild */
  margin-top: 0.5rem;   /* Abstand zum Bild */
  text-align: center;   /* optional: zentriert */
  font-size: 0.9rem;    /* Schriftgröße anpassen */
  color: #555;          /* dezente Farbe */
}

.features-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
  margin-bottom: 3rem; /* Abstand zwischen Tabs/Content und Booking-Box */
}

/* ================= Tabs ================= */
.tabs {
  margin-top: 1rem;
  position: relative; /* für Gradient-Hinweis */
}

.tab-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem; /* Platz für Scrollbar */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--green-soft) transparent; /* Firefox */
}

/* Scrollbar für Chrome, Safari, Edge */
.tab-buttons::-webkit-scrollbar {
  height: 6px;
}

.tab-buttons::-webkit-scrollbar-track {
  background: transparent;
}

.tab-buttons::-webkit-scrollbar-thumb {
  background-color: var(--green-soft);
  border-radius: 3px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.tab-buttons::-webkit-scrollbar-thumb:hover {
  background-color: var(--green);
}

.tab-buttons button {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.tab-buttons button.active {
  background: var(--green);
  color: #fff;
  transform: translateY(-1px);
}

/* Subtiler Gradient rechts für Scroll-Hinweis */
.tabs::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 2rem;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, var(--bg-main), transparent);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .tab-buttons {
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Firefox */
  }

  .tab-buttons::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
}


/* Tab Content Animation */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  padding-left: 0; /* 🔑 wichtig für Links-Bündigkeit */
}

.tab-content.active {
  display: block;
  animation: tabFadeSlide 0.22s ease-out forwards;
}

@keyframes tabFadeSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Feature-Liste ================= */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-size: 0.95rem;
}

.feature-list li img {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  flex-shrink: 0;
}


/* ================ Booking Box ================= */
.booking-box {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 2rem;
  /* Sticky entfernen, da die Box unten steht */
  position: static;
  margin-bottom: 4rem; /* Abstand zum Footer */
}

.booking-box h4 {
  margin-top: 0;
}

.booking-box .button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  background: var(--green);
  color: white;
  transition: background 0.3s ease, transform 0.3s ease;
}

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

@media (max-width: 768px) {
  .booking-box {
    margin-bottom: 2rem; /* kleiner auf Mobile */
  }
}

/* Modaler Dialog zum Buchen Basis */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

/* Responsive Form inside Modal */
.modal-content .form-group {
  margin-bottom: 1rem;
}

.modal-content label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 12px;
}

.modal-content button.button-primary {
  margin-top: 1rem;
  width: 100%;
  border-radius: 12px; /* weich */
  font-weight: 500;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal.show .modal-overlay {
  opacity: 1;
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  z-index: 10;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal.show {
  transform: scale(1);
  opacity: 1;
}

/* Scroll Lock ohne Layout-Sprung */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width);
}



/* iOS Zoom Fix */
.modal-content input,
.modal-content textarea,
.modal-content select {
  font-size: 16px;
}

/* ================= Footer ================= */
footer {
  background: var(--bg-alt);
  padding: 2rem 5%;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-main);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .features-layout { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .features-layout { display: block; }
}
