/* ============================================================
   WALCHSEER HOF — Angebote hervorheben
   · Angebots-Bereich auf der Startseite als dunkler Spotlight-Block
   · Gold-Badges („2 Tage geschenkt") auf Angebotsbildern
   · Schwebendes, rotierendes Angebots-Siegel (nur Startseite)
   ============================================================ */

/* ── Spotlight-Bereich (Kaiser-Schwarz) ───────────────────── */
section.angebote-spotlight {
  background: var(--surface-block);
  color: var(--text-inverse);
  border-top: 1px solid rgba(230,204,134,.25);
}
.angebote-spotlight .angebote-head { align-items: flex-end; }
.angebote-spotlight .section-eyebrow { color: var(--wh-bronze-300); }
.angebote-spotlight .section-heading { color: var(--wh-off-white); max-width: 18ch; }
.angebote-intro {
  margin-top: var(--space-3);
  max-width: 52ch;
  color: var(--text-inverse-muted);
}
.angebote-spotlight .angebot-card {
  background: var(--wh-sand-50);
  box-shadow: none;
}

/* Preis groß in der Titelschrift */
.angebot-card__price {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1;
  color: var(--text-display);
}
.angebot-card__price-from,
.angebot-card__price-unit {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--text-meta);
  color: var(--text-muted);
}

/* ── Gold-Badge auf Angebotsbildern ───────────────────────── */
.angebot-card__img,
.angebot-detail__img { position: relative; }
.offer-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 11px;
  border-radius: 12px;                       /* Style Guide: Sticker 12 px */
  background: var(--wh-bronze);
  color: var(--wh-black);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-bold);
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(20,18,16,.28);
}
.offer-badge svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.angebot-card:hover .offer-badge svg,
.angebot-detail:hover .offer-badge svg { animation: seal-wiggle 700ms ease-in-out; }

/* ── Schwebendes Angebots-Siegel ──────────────────────────── */
.offer-seal {
  --seal: 124px;
  position: fixed;
  right: clamp(16px, 2.5vw, 36px);
  bottom: calc(var(--bb-h) + 84px);
  z-index: 47;                                /* unter Header (50) & Buchungsleiste (48) */
  width: var(--seal);
  height: var(--seal);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wh-bronze);
  color: var(--wh-black);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(20,18,16,.35), inset 0 0 0 1px rgba(20,18,16,.12);
  animation: seal-in 700ms var(--ease-out) .9s backwards;   /* backwards: danach wirken Hover/Burst-Transforms */
  transition: transform 450ms var(--ease-out), opacity 350ms ease, visibility 350ms;
}
.offer-seal:hover { transform: scale(1.07); }
.offer-seal:focus-visible { outline: 2px solid var(--wh-bronze-300); outline-offset: 4px; }

.offer-seal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: seal-spin 18s linear infinite;
}
.offer-seal__ring text {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  fill: var(--wh-black);
}
.offer-seal__core {
  position: relative;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wh-black);
  color: var(--wh-bronze-300);
}
.offer-seal__core svg {
  width: 52%;
  height: 52%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: seal-wiggle-pause 4s ease-in-out 2s infinite;
}

/* Ausgeblendet im Angebots-Bereich / bei offenem Menü oder Anfrage */
.offer-seal.is-hidden,
body:has(.booking-panel.is-open) .offer-seal,
body:has(.mobile-menu.is-open) .offer-seal {
  opacity: 0;
  visibility: hidden;
  transform: scale(.6);
  pointer-events: none;
}

@keyframes seal-spin { to { transform: rotate(360deg); } }
@keyframes seal-in {
  from { opacity: 0; transform: scale(.4) rotate(-40deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes seal-wiggle {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-12deg) scale(1.08); }
  50%      { transform: rotate(10deg) scale(1.08); }
  75%      { transform: rotate(-6deg); }
}
/* Geschenk wackelt kurz, dann Pause (4 s Zyklus) */
@keyframes seal-wiggle-pause {
  0%, 80%, 100% { transform: rotate(0); }
  84%           { transform: rotate(-14deg) scale(1.1); }
  88%           { transform: rotate(12deg) scale(1.1); }
  92%           { transform: rotate(-8deg); }
  96%           { transform: rotate(4deg); }
}

/* Handy: kleiner, rechts unten über der Buchungsleiste */
@media (max-width: 600px) {
  .offer-seal {
    --seal: 96px;
    right: 12px;
    bottom: calc(var(--bb-h) + 14px);
  }
  .offer-seal__ring text { font-size: 10.5px; }
  .offer-badge { top: 12px; left: 12px; font-size: 10px; padding: 7px 11px 7px 9px; }
}

/* ── Übergang: Siegel → Angebote (js/offers.js) ───────────── */
.offer-seal.is-bursting { transform: scale(1.18); }
.offer-seal.is-bursting .offer-seal__ring { animation-duration: .9s; }
.offer-seal.is-bursting .offer-seal__core svg { animation: seal-wiggle 450ms ease-in-out 2; }

.ot-confetti {
  position: fixed;
  inset: 0;
  z-index: 62;
  pointer-events: none;
}
.ot-confetti span { position: absolute; display: block; }

.offer-transition {
  position: fixed;
  inset: 0;
  z-index: 61;                                 /* über Header (50) und Leiste (48) */
  display: grid;
  place-items: center;
  background: var(--wh-black);
  color: var(--wh-off-white);
  clip-path: circle(0 at 50% 50%);
  pointer-events: none;
}
.offer-transition__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--gutter);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out);
}
.offer-transition.is-shown .offer-transition__inner { opacity: 1; transform: none; }
.offer-transition__icon {
  width: 84px;
  height: 84px;
  padding: 20px;
  margin-bottom: var(--space-2);
  border-radius: 50%;
  border: 1px solid rgba(230,204,134,.45);
  color: var(--wh-bronze-300);
}
.offer-transition__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.offer-transition__icon .ot-lid { transform-box: fill-box; transform-origin: 50% 100%; }
.offer-transition.is-shown .ot-lid { animation: ot-lid 900ms var(--ease-out) 150ms both; }
@keyframes ot-lid {
  0%   { transform: none; }
  45%  { transform: translateY(-5px) rotate(-10deg); }
  70%  { transform: translateY(-2px) rotate(4deg); }
  100% { transform: none; }
}
.offer-transition__kicker {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--wh-bronze-300);
}
.offer-transition__title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 1.05;
}

/* Ankunft im Angebots-Bereich: Kopf + Karten steigen gestaffelt auf, Badges springen hinein */
.angebote-spotlight.is-arriving .angebote-head {
  animation: offer-rise 800ms var(--ease-out) 60ms both;
}
.angebote-spotlight.is-arriving .angebot-card {
  animation: offer-rise 900ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 110ms + 220ms);
}
.angebote-spotlight.is-arriving .offer-badge {
  animation: badge-pop 650ms cubic-bezier(.34,1.56,.64,1) both;
  animation-delay: calc(var(--i, 0) * 110ms + 700ms);
}
@keyframes offer-rise {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: none; }
}
@keyframes badge-pop {
  from { opacity: 0; transform: scale(.4) rotate(-12deg); }
  to   { opacity: 1; transform: none; }
}

/* ── Angebots-Videos (js/video.js) ─────────────────────────── */
.has-video { position: relative; overflow: hidden; cursor: pointer; }
.offer-video__bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
  z-index: 0;
}
.offer-video__bg.is-ready { opacity: 1; }
.offer-video__bg--file { inset: 0; top: 0; left: 0; transform: none; width: 100%; height: 100%; object-fit: cover; }
.has-video .offer-badge { z-index: 2; }
.offer-video__btn {
  position: absolute;
  right: 14px; bottom: 14px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 11px;
  border: 0; border-radius: 12px;
  background: rgba(20,18,16,.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--wh-off-white);
  font: 600 13px/1 var(--font-sans);
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.offer-video__btn svg { width: 18px; height: 18px; fill: var(--wh-bronze-300); }
.has-video:hover .offer-video__btn { background: var(--wh-black); transform: scale(1.04); }
.offer-video__btn:focus-visible { outline: 2px solid var(--wh-bronze-300); outline-offset: 3px; }

.video-modal {
  /* Mittig im Bildschirm (der globale Reset * { margin: 0 } hebt die Browser-Zentrierung auf) */
  position: fixed; inset: 0; margin: auto;
  height: fit-content; max-height: calc(100dvh - 32px);
  width: min(1100px, calc(100vw - 32px), calc((100dvh - 120px) * 16 / 9));
  padding: 0; border: 0; border-radius: 14px; overflow: visible;
  background: var(--wh-black);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.video-modal::backdrop { background: rgba(20,18,16,.82); backdrop-filter: blur(3px); }
.video-modal[open] { animation: vm-in .35s cubic-bezier(.2,.7,.3,1); }
@keyframes vm-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.video-modal__frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.video-modal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal__close {
  position: absolute; top: -18px; right: -18px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--wh-bronze); color: var(--wh-black);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.video-modal__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 600px) {
  .video-modal__close { top: -54px; right: 0; }
  .offer-video__btn span { font-size: 12px; }
}

/* Angebots-Siegel am PC größer (Marcel 07.10.2026; vorher 124 px) – Handy bleibt 96 px */
@media (min-width: 941px) {
  .offer-seal { --seal: 158px; }
}

/* Ungerade Anzahl Angebote (z. B. 5 mit „Stiller Advent“, 26.11.2026): letzte Karte am PC über die ganze Breite,
   Foto links + Text rechts – sonst bleibt rechts eine leere Lücke */
@media (min-width: 681px) {
  .angebote-grid > .angebot-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: 1fr 1fr;
  }
  .angebote-grid > .angebot-card:last-child:nth-child(odd) .angebot-card__img { aspect-ratio: auto; min-height: 100%; position: relative; }
  .angebote-grid > .angebot-card:last-child:nth-child(odd) .angebot-card__img img { position: absolute; inset: 0; }
  .angebote-grid > .angebot-card:last-child:nth-child(odd) .angebot-card__body { justify-content: center; padding: clamp(1.75rem, 3.5vw, 3rem); }
}
