/* =====================================================================
   Dili Appartement - Unterseiten
   Hero der Unterseiten, Tabs, FAQ-Akkordeon, Textseiten
   ===================================================================== */

/* ------------------------------------------------------------------ *
   Hero der Unterseiten
   Kadence: max-width 1290, padding 120px oben und unten,
   Overlay-Bild mit 35% Deckkraft, Bergsilhouette als Abschluss.
 * ------------------------------------------------------------------ */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--palette-5);
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
}

.page-hero__inner {
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 120px var(--content-edge-padding);
  text-align: center;
}

.page-hero__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 90px;
  line-height: 75px;
  color: #ffffff;
}

.page-hero__text {
  max-width: 750px;
  margin: 28px auto 0;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.6;
}

@media all and (max-width: 767px) {
  .page-hero__inner { padding: 100px 20px 90px; }
  .page-hero__title { font-size: 60px; line-height: 50px; }
}

/* ------------------------------------------------------------------ *
   Abschnitt mit Tabs (Appartement / Preise / Info)
 * ------------------------------------------------------------------ */
.tabs-section {
  padding-top: 80px;
  padding-bottom: 80px;
}

.tabs {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  max-width: 900px;
  margin: 40px auto 0;
}

/* Linke Spalte: Reiter und der Anfrage-Knopf. Der Knopf steht damit
   ausserhalb des wechselnden Inhalts und springt beim Umschalten nicht. */
.tabs__aside {
  display: flex;
  flex-direction: column;
}

.tabs__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  padding: 48px 24px;
  border: 0;
  background: var(--palette-8);
  color: #000000;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.tabs__tab:hover { color: var(--palette-2); }

.tabs__tab {
  position: relative;
}
/* Aktiver Reiter bekommt eine Markierung, nicht nur eine andere Flaeche */
.tabs__tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--palette-2);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease-out);
}
.tabs__tab.is-active::before { transform: scaleY(1); }

.tabs__tab.is-active {
  background: var(--palette-7);
  font-weight: 500;
}

.tabs__panels {
  background: var(--palette-8);
  /* Feste Mindesthoehe: der Abschnitt behaelt seine Hoehe, egal welcher
     Reiter aktiv ist. Sonst springt alles darunter. */
  min-height: 520px;
}

.tabs__panel { padding: 40px 32px; }
.tabs__panel[hidden] { display: none; }

/* Inhalt weich einblenden statt hart umschalten */
.tabs__panel.is-active { animation: tab-in var(--dur-slow) var(--ease-out) both; }
@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tabs__panel.is-active { animation: none; }
}

.tabs__panel h2,
.tabs__panel h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 18px;
}

.tabs__panel ul {
  margin: 0;
  padding-left: 1.2em;
}
.tabs__panel li { margin-bottom: 6px; }

.tabs__panel .price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.tabs__panel .price-row h3 { margin-bottom: 4px; }
.tabs__panel .price-note { font-size: 17px; line-height: 1.6; }

/* Kleine Bildergalerie im ersten Tab */
.tabs__gallery {
  display: flex;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0 0 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.tabs__gallery li { flex: 0 0 auto; scroll-snap-align: start; }
.tabs__gallery img {
  height: 120px;
  width: auto;
  max-width: none;
  object-fit: cover;
  border-radius: 1px;
}

.tabs-section__cta { margin-top: 20px; }
.tabs-section__cta .btn { width: 100%; }

@media all and (max-width: 1024px) {
  .tabs-section { padding-inline: 40px; }
}

@media all and (max-width: 767px) {
  .tabs-section { padding: 56px 0; }
  .tabs-section__cta { margin: 16px 0 20px; }
  .tabs { grid-template-columns: minmax(0, 1fr); max-width: none; margin-top: 28px; }
  .tabs__list { flex-direction: row; }
  /* Die Reiter liegen in <li>-Elementen, deshalb muss die Breite dort
     verteilt werden und nicht am Knopf selbst. */
  .tabs__list > li { flex: 1 1 0; display: flex; min-width: 0; }
  .tabs__tab {
    width: 100%;
    min-height: 52px;
    padding: 14px 8px;
    font-size: 14px;
    line-height: 1.25;
  }
  /* Markierung wandert auf die Unterkante, wenn die Reiter nebeneinander stehen */
  .tabs__tab::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; transform: scaleX(0); }
  .tabs__tab.is-active::before { transform: scaleX(1); }
  .tabs__panels { min-height: 0; }
  .tabs__panel { padding: 24px 20px; }
  .tabs__panel h2, .tabs__panel h3 { font-size: 30px; }
  .tabs__panel .price-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ------------------------------------------------------------------ *
   Familienabschnitt
 * ------------------------------------------------------------------ */
.family {
  padding-top: 80px;
  padding-bottom: 80px;
  background: var(--palette-8);
}

.family__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-edge-padding);
}

.family__text .display { margin-bottom: 24px; }
.family__text p { margin-bottom: 1.2em; }

@media all and (max-width: 1024px) {
  .family__grid { grid-template-columns: minmax(0, 1fr); padding-inline: 60px; text-align: center; }
  .family__text .btn { margin-inline: auto; }
}
@media all and (max-width: 767px) {
  .family { padding: 56px 0; }
  .family__grid { max-width: none; padding-inline: 20px; gap: 28px; text-align: left; }
  .family__text .btn { margin-inline: 0; }
}

/* ------------------------------------------------------------------ *
   FAQ-Akkordeon
 * ------------------------------------------------------------------ */
.faq {
  padding-top: 80px;
  padding-bottom: 80px;
}

.accordion {
  max-width: var(--content-width);
  margin: 40px auto 0;
  border-radius: 20px;
  overflow: hidden;
}

.accordion__item { background: var(--palette-7); }

.accordion__trigger { transition: background-color var(--dur) var(--ease); }
.accordion__trigger:hover { background: #b9cdbf; }

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 20px 16px;
  border: 0;
  border-bottom: 0.8px solid var(--palette-6);
  background: var(--palette-7);
  color: #000000;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.accordion__item:last-child .accordion__trigger { border-bottom: 0; }

.accordion__icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}
.accordion__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }

.accordion__item.is-open .accordion__icon { transform: rotate(180deg); }

.accordion__panel {
  height: 0;
  overflow: hidden;
  background: var(--palette-7);
  transition: height 0.3s var(--ease);
}
.accordion__panel-inner { padding: 20px; }

@media (prefers-reduced-motion: reduce) {
  .accordion__panel,
  .accordion__icon { transition: none; }
}

@media all and (max-width: 1024px) {
  .faq { padding-inline: 40px; }
}
@media all and (max-width: 767px) {
  .faq { padding: 56px 0; }
  .accordion { max-width: none; border-radius: 14px; }
  .accordion__trigger { min-height: 60px; padding: 18px 16px; font-size: 17px; }
}

/* ------------------------------------------------------------------ *
   Textseiten (Impressum, Datenschutz, Danke)
 * ------------------------------------------------------------------ */
.text-page {
  padding-top: 80px;
  padding-bottom: 80px;
}

.text-page__inner {
  max-width: var(--content-narrow-width);
  margin-inline: auto;
  padding-inline: var(--content-edge-padding);
}

.text-page h2 {
  margin: 2em 0 0.6em;
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.2;
}
.text-page h2:first-child { margin-top: 0; }

.text-page h3 {
  margin: 1.6em 0 0.5em;
  font-size: 22px;
}

.text-page p { margin-bottom: 1.2em; }
.text-page ul { margin: 0 0 1.4em; padding-left: 1.3em; }
.text-page li { margin-bottom: 6px; }
.text-page a { color: var(--palette-2); }

@media all and (max-width: 767px) {
  .text-page { padding: 56px 0; }
  .text-page__inner { max-width: none; padding-inline: 20px; }
  .text-page h2 { font-size: 30px; margin-top: 1.6em; }
}

/* ------------------------------------------------------------------ *
   Kontaktseite
 * ------------------------------------------------------------------ */
.contact {
  padding-top: 80px;
  padding-bottom: 80px;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--content-edge-padding);
}

.contact__platforms {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 0;
}
.contact__platforms a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--palette-1);
  border-radius: 50%;
  color: var(--palette-1);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contact__platforms a:hover { background: var(--palette-1); color: #fff; }
.contact__platforms svg { width: 22px; height: 22px; fill: currentColor; }

.contact-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  max-width: var(--content-width);
  margin: 40px auto 0;
  padding-inline: var(--content-edge-padding);
}
.contact-details__label {
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 22px;
  color: var(--palette-4);
}
.contact-details a { color: inherit; }
.contact-details a:hover { color: var(--palette-2); }

@media all and (max-width: 1024px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media all and (max-width: 767px) {
  .contact { padding: 56px 0; }
  .contact__grid,
  .contact-details { max-width: none; padding-inline: 20px; }
  .contact-details { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ------------------------------------------------------------------ *
   Aktivitaeten (Ski & Wandern)
 * ------------------------------------------------------------------ */
.activities {
  padding-top: 80px;
  padding-bottom: 80px;
}

.activity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  align-items: center;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 40px var(--content-edge-padding);
}

/* Winterblock: Bild links, Text rechts, wie in der Vorlage.
   Im Markup steht der Text zuerst, damit er auf Mobilgeräten oben steht. */
.activity--reverse .activity__media { order: -1; }

.activity__title { margin-bottom: 20px; }
.activity__text p { margin-bottom: 1.2em; }
.activity__text a { color: var(--palette-2); text-decoration: underline; }

@media all and (max-width: 1024px) {
  .activity { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-inline: 60px; }
  .activity--reverse .activity__media { order: 0; }
}
@media all and (max-width: 767px) {
  .activities { padding: 56px 0; }
  .activity { max-width: none; padding: 28px 20px; gap: 24px; }
}

/* ------------------------------------------------------------------ *
   Karussell (Bildstreifen mit Pfeilen und Punkten)
 * ------------------------------------------------------------------ */
.carousel { position: relative; }

.carousel__track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 calc((100% - 20px) / 3);
  scroll-snap-align: start;
}
.carousel__slide img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 1px;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 48px;
  border: 0;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.3s ease-in-out;
}
.carousel:hover .carousel__arrow { opacity: 1; }
.carousel__arrow:disabled { opacity: 0.2; cursor: not-allowed; }
.carousel__arrow--prev { left: clamp(0.05rem, 1vw, 1rem); }
.carousel__arrow--next { right: clamp(0.05rem, 1vw, 1rem); }

.carousel__dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
/* Der Punkt bleibt 10px gross, die Tippflaeche ist aber 32px breit.
   Dafuer sorgt der Innenabstand zusammen mit background-clip. */
.carousel__dot {
  width: 32px;
  height: 32px;
  padding: 11px;
  border: 0;
  border-radius: 50%;
  background: #000;
  background-clip: content-box;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}
.carousel__dot:hover { opacity: 1; }
.carousel__dot.is-active { opacity: 0.75; background: #000; }

@media all and (max-width: 767px) {
  .carousel__slide { flex: 0 0 calc((100% - 10px) / 2); }
  .carousel__slide img { height: 130px; }
}
