/**
 * geo-additions.css
 * Ergänzende Styles für die GEO/LLMO-Erweiterungen der Eibinger Weinwanderung:
 * Datums-Badge im Header, Faktenblock "Auf einen Blick", Speisen/Website in den
 * Winzerkarten und FAQ-Akkordeon. Wird nach style.css geladen.
 */

/* Datums-Badge im Header (ersetzt den früheren Inline-Style) */
.header-date {
  margin: 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: #8ea579;
  font-weight: 700;
}

/* Faktenblock "Auf einen Blick"
   Hierarchie: Einleitungssatz → 4 Kernfakten als Kacheln → Detailzeilen → Aktionen.
   Mobil: Kacheln 2×2, Detailzeilen als Liste, Aktionen als volle Breite. */
.facts {
  --facts-green: #203d24;
  --facts-sage: #8ea579;
  --facts-sage-soft: rgba(142, 165, 121, 0.16);
  --facts-line: rgba(32, 61, 36, 0.12);
  --facts-radius: 18px;
  --facts-shadow: 0 1px 2px rgba(32, 61, 36, 0.06), 0 10px 30px rgba(32, 61, 36, 0.08);
}

.facts__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: #ffffff;
  border: 1px solid var(--facts-line);
  border-radius: var(--facts-radius);
  box-shadow: var(--facts-shadow);
}

.facts__head {
  max-width: 960px;
  margin: 0 auto 2rem;
  text-align: center;
}

.facts__head .eyebrow {
  justify-content: center;
}

.facts__head h2 {
  margin-bottom: 0.75rem;
}

.facts__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(32, 61, 36, 0.85);
}

/* Kernfakten als Kacheln */
.facts__primary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.facts__tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--facts-sage-soft);
  border-radius: 14px;
}

.facts__tile--accent {
  background: var(--facts-green);
  color: #ffffff;
}

.facts__tile dt {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--facts-green);
}

.facts__tile--accent dt {
  color: var(--facts-sage);
}

.facts__icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: #ffffff;
  fill: none;
  stroke: var(--facts-green);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts__tile--accent .facts__icon {
  background: rgba(255, 255, 255, 0.12);
  stroke: #ffffff;
}

.facts__tile dd {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
}

.facts__tile dd strong {
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--facts-green);
}

.facts__tile--accent dd strong {
  color: #ffffff;
}

.facts__tile dd span {
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.8;
}

/* Detailzeilen */
.facts__secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 1.75rem 0 0;
}

.facts__secondary > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--facts-line);
}

.facts__secondary dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--facts-green);
  padding-top: 0.15rem;
}

.facts__secondary dd {
  margin: 0;
  line-height: 1.5;
}

/* Aktionen */
.facts__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--facts-line);
}

.facts__action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px; /* WCAG 2.2 Zielgröße */
  padding: 0.625rem 1.125rem;
  border: 1px solid rgba(32, 61, 36, 0.25);
  border-radius: 999px;
  color: var(--facts-green);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.facts__action svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts__action:hover {
  background: var(--facts-sage-soft);
  border-color: var(--facts-sage);
}

.facts__action--primary {
  background: var(--facts-green);
  border-color: var(--facts-green);
  color: #ffffff;
}

.facts__action--primary:hover {
  background: #2c5232;
  border-color: #2c5232;
}

.facts__action:focus-visible {
  outline: 2px solid var(--facts-green);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .facts__primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts__secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .facts__inner {
    border-radius: 14px;
  }

  .facts__primary {
    gap: 0.625rem;
  }

  .facts__tile {
    padding: 1rem;
  }

  .facts__tile dd strong {
    font-size: 1.05rem;
  }

  .facts__secondary > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .facts__action {
    justify-content: center;
    width: 100%;
  }
}

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

/* Speisen und Website in den Winzerkarten */
.wine-card__food {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* FAQ-Akkordeon
   Karten mit weichem Schatten, Chevron links in einem Kreis,
   sanftes Auf- und Zuklappen (progressive Enhancement über ::details-content). */
.faq {
  --faq-green: #203d24;
  --faq-sage: #8ea579;
  --faq-sage-soft: rgba(142, 165, 121, 0.16);
  --faq-surface: #ffffff;
  --faq-radius: 16px;
  --faq-shadow: 0 1px 2px rgba(32, 61, 36, 0.06), 0 8px 24px rgba(32, 61, 36, 0.08);
  --faq-shadow-hover: 0 2px 4px rgba(32, 61, 36, 0.08), 0 14px 36px rgba(32, 61, 36, 0.14);
}

.faq .section-head {
  max-width: 880px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.faq .section-head .eyebrow {
  justify-content: center;
}

.faq__list {
  display: grid;
  gap: 0.875rem;
  max-width: 880px;
  margin: 0 auto;
}

.faq__item {
  overflow: hidden;
  background: var(--faq-surface);
  border: 1px solid rgba(32, 61, 36, 0.08);
  border-radius: var(--faq-radius);
  box-shadow: var(--faq-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.faq__item:hover {
  box-shadow: var(--faq-shadow-hover);
  transform: translateY(-1px);
}

.faq__item[open] {
  border-color: rgba(142, 165, 121, 0.55);
  box-shadow: var(--faq-shadow-hover);
}

.faq__item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px; /* WCAG 2.2 Zielgröße */
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  list-style: none;
  color: var(--faq-green);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

/* Chevron links: Kreis mit Pfeil, dreht beim Öffnen nach unten */
.faq__item summary::before {
  content: "";
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--faq-sage-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203d24' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.faq__item[open] summary::before {
  transform: rotate(90deg);
  background-color: var(--faq-sage);
}

.faq__item summary:hover::before {
  background-color: rgba(142, 165, 121, 0.32);
}

.faq__item[open] summary:hover::before {
  background-color: var(--faq-sage);
}

.faq__item summary:focus-visible {
  outline: 2px solid var(--faq-green);
  outline-offset: -4px;
  border-radius: var(--faq-radius);
}

.faq__item summary h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq__item p {
  max-width: 68ch;
  margin: 0;
  padding: 0 1.5rem 1.375rem calc(1.5rem + 2rem + 1rem); /* bündig mit dem Fragetext */
  line-height: 1.6;
  color: rgba(32, 61, 36, 0.85);
}

/* Sanftes Auf- und Zuklappen in Browsern mit ::details-content-Support */
@supports selector(::details-content) {
  .faq__list {
    interpolate-size: allow-keywords;
  }

  .faq__item::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.35s ease, content-visibility 0.35s allow-discrete;
  }

  .faq__item[open]::details-content {
    height: auto;
  }
}

@media (max-width: 600px) {
  .faq__item summary {
    padding: 1rem 1.125rem;
    gap: 0.75rem;
  }

  .faq__item summary h3 {
    font-size: 1rem;
  }

  .faq__item p {
    padding: 0 1.125rem 1.25rem calc(1.125rem + 2rem + 0.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__item,
  .faq__item summary::before,
  .faq__item::details-content {
    transition: none;
  }

  .faq__item:hover {
    transform: none;
  }
}

/* Veranstalter / Kontakt
   Karte im Stil von Faktenblock und FAQ, Kontaktdaten als <address> mit <dl>. */
.organizer__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: #ffffff;
  border: 1px solid rgba(32, 61, 36, 0.12);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(32, 61, 36, 0.06), 0 10px 30px rgba(32, 61, 36, 0.08);
}

/* H2 in der Kontaktkarte: die Display-Größe aus style.css sprengt die halbe Kartenbreite,
   daher an die Spalte gekoppelt und mit Silbentrennung abgesichert */
.organizer__head {
  min-width: 0;
}

.organizer__head h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.organizer__head p:last-child {
  margin: 0;
  line-height: 1.6;
  color: rgba(32, 61, 36, 0.85);
}

.organizer__details {
  font-style: normal;
}

.organizer__details dl {
  margin: 0;
}

.organizer__details dl > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid rgba(32, 61, 36, 0.12);
}

.organizer__details dl > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.organizer__details dt {
  padding-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #203d24;
}

.organizer__details dd {
  margin: 0;
  line-height: 1.5;
}

.organizer__details a {
  color: #203d24;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(142, 165, 121, 0.8);
  text-underline-offset: 3px;
}

.organizer__details a:focus-visible {
  outline: 2px solid #203d24;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .organizer__card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .organizer__details dl > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Impressum: Adressblöcke ohne Kursivschrift */
.legal-content address {
  font-style: normal;
}

/* Sektionswechsel Infos → FAQ → Kontakt
   Jede Sektion bekommt einen eigenen, randlosen Hintergrund (Full-Bleed über ::before,
   unabhängig von der Containerbreite in style.css), damit sich die Bereiche wie im Rest
   der Seite klar voneinander absetzen:
   Infos   – warmes Sand
   FAQ     – helles Weiß mit feiner Salbei-Tönung
   Kontakt – dunkles Weingrün, Kontaktkarte hell darauf */
.section.info,
.section.faq,
.section.organizer {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.section.info::before,
.section.faq::before,
.section.organizer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
}

.section.info::before {
  background: #f4f1ea;
}

.section.faq::before {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(142, 165, 121, 0.14), transparent 70%),
    #fbfaf7;
  border-top: 1px solid rgba(32, 61, 36, 0.08);
}

.section.organizer::before {
  background:
    radial-gradient(90% 70% at 85% 0%, rgba(142, 165, 121, 0.28), transparent 65%),
    #203d24;
}

/* Kontakt auf dunklem Grund: Karte bleibt hell, Schatten kräftiger */
.section.organizer .organizer__card {
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 24px 60px rgba(0, 0, 0, 0.28);
}

/* Infos-Kacheln auf Sand: weiße Karten im Stil der übrigen Komponenten */
.section.info .info-tile {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(32, 61, 36, 0.06), 0 8px 24px rgba(32, 61, 36, 0.08);
}

/* Horizontales Scrollen durch die Full-Bleed-Flächen verhindern */
html,
body {
  overflow-x: clip;
}

/* Sektionswechsel Hero → Auf einen Blick → Erlebnis/Route
   Gleiche Full-Bleed-Technik wie bei Infos/FAQ/Kontakt:
   Auf einen Blick – helles Salbeigrün, die weiße Faktenkarte hebt sich ab
   Erlebnis        – warmes Sand mit feiner Trennlinie */
.section.facts,
.section.premium-route {
  position: relative;
  isolation: isolate;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.section.facts::before,
.section.premium-route::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
}

.section.facts::before {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    #e9eee2;
}

.section.premium-route::before {
  background: #f4f1ea;
  border-top: 1px solid rgba(32, 61, 36, 0.08);
}

/* Faktenkarte auf Salbei: etwas kräftigerer Schatten */
.section.facts .facts__inner {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(32, 61, 36, 0.06), 0 16px 40px rgba(32, 61, 36, 0.12);
}

/* H2 im Faktenblock an die Kartenbreite gekoppelt (Display-Größe aus style.css) */
.facts__head h2 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  /* keine Silbentrennung: Zeilenumbruch nur zwischen Wörtern, Zeilen ausgewogen */
  hyphens: manual;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.facts__lead {
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

/* Links in den Detailzeilen des Faktenblocks */
.facts__secondary a {
  color: var(--facts-green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(142, 165, 121, 0.8);
  text-underline-offset: 3px;
}

.facts__secondary a:focus-visible {
  outline: 2px solid var(--facts-green);
  outline-offset: 2px;
}

/* ==========================================================================
   Winzer-Carousel (#winzer)
   Horizontales Karten-Carousel nach dem Muster von apple.com/mac:
   - Kopf links mit H2, Textlink rechts
   - Karten starten bündig mit dem Content-Raster und laufen rechts aus dem Viewport
   - Natives Scrollen mit Scroll-Snap, Pfeil-Buttons unten rechts
   - Plus-Button öffnet den bestehenden Kontakt-Dialog (.contact-btn)
   Überschreibt bewusst die Kachel-Styles von .wine-card aus style.css.
   ========================================================================== */
.vintner-section {
  --vc-green: #203d24;
  --vc-sage: #8ea579;
  --vc-bg: #f5f5f2;
  --vc-card: #ffffff;
  --vc-radius: 22px;
  --vc-card-width: clamp(280px, 30vw, 372px);
  --vc-gap: 1.25rem;
  /* Abstand vom Viewport-Rand zum Content-Raster:
     die Sektion ist Container, 100cqw = Breite des Content-Rasters */
  --vc-gutter: max(1rem, calc((100vw - 100cqw) / 2));
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.vintner-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background: var(--vc-bg);
}

/* Kopf: Überschrift links, Link rechts unten bündig */
.vintner-section .vintner-section__head {
  text-align: left;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.vintner-section__head h2 {
  max-width: 18ch;
  margin: 0;
}

.vintner-section__intro {
  max-width: 56ch;
  margin: 0.875rem 0 0;
  line-height: 1.55;
  color: rgba(32, 61, 36, 0.8);
}

.vintner-section__more {
  flex-shrink: 0;
  padding-bottom: 0.4rem;
  color: var(--vc-green);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.vintner-section__more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Carousel: volle Viewport-Breite, Start bündig mit dem Raster */
.vintner-carousel {
  --vc-gutter: max(1rem, calc((100vw - 100cqw) / 2));
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.vintner-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--vc-card-width);
  column-gap: var(--vc-gap);
  margin: 0;
  padding: 0.75rem var(--vc-gutter-end, var(--vc-gutter)) 2.5rem var(--vc-gutter-start, var(--vc-gutter));
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--vc-gutter-start, var(--vc-gutter));
  scroll-padding-right: var(--vc-gutter-end, var(--vc-gutter));
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.vintner-carousel__track::-webkit-scrollbar {
  display: none;
}

.vintner-carousel__track:focus-visible {
  outline: 2px solid var(--vc-green);
  outline-offset: -2px;
  border-radius: 8px;
}

.vintner-carousel__item {
  scroll-snap-align: start;
  display: flex;
}

/* Kacheln: Aufbau und Gestaltung unverändert aus style.css, nur auf Spaltenbreite gesetzt */
.vintner-carousel__item > .wine-card {
  width: 100%;
  margin: 0;
}

/* Pfeil-Buttons unten rechts, bündig mit dem Raster */
.vintner-carousel__controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0 var(--vc-gutter-end, var(--vc-gutter)) 0 var(--vc-gutter-start, var(--vc-gutter));
}

.vintner-carousel__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(32, 61, 36, 0.08);
  color: var(--vc-green);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.vintner-carousel__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vintner-carousel__btn:hover:not(:disabled) {
  background: rgba(32, 61, 36, 0.16);
}

.vintner-carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.vintner-carousel__btn:focus-visible {
  outline: 2px solid var(--vc-green);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .vintner-section .vintner-section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .vintner-section {
    --vc-card-width: min(82vw, 340px);
    --vc-gap: 0.875rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .vintner-carousel__track {
    scroll-behavior: auto;
  }
}
