/* Ausverkauf-Banner Ramsauer Radsport (Auftrag Jairo 30.09.2026).
   Eingehängt von ausverkauf.js als erstes Element in <main> auf jeder Seite.
   Abschalten: mu-plugin wwd-ausverkauf.php löschen und die zwei Zeilen in der Startseite entfernen. */

.av {
  --av-rot: #e10600;
  --av-gelb: #ffd200;
  --av-tinte: #0b0b0c;
  --av-karte: 200px;
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #3a0503 0%, #150606 45%, var(--av-tinte) 100%);
  color: #fff;
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  padding-bottom: 72px;
}
.av *, .av *::before, .av *::after { box-sizing: border-box; }

/* Drehlicht: langsamer Lichtkegel wie eine Warnleuchte, kein Blinken */
.av-licht {
  position: absolute; inset: -60% -30%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(225, 6, 0, .38) 80%, transparent 90%, transparent 100%);
  animation: av-dreh 6s linear infinite;
  mix-blend-mode: screen;
}
@keyframes av-dreh { to { transform: rotate(360deg); } }

/* Warnbänder mit Lauftext */
.av-band {
  position: relative; z-index: 3; overflow: hidden; white-space: nowrap;
  font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(15px, 1.7vw, 22px); line-height: 1; padding: 11px 0;
}
.av-band--gelb {
  background: var(--av-gelb); color: #111; transform: rotate(-1.2deg); margin: 10px -12px 0;
  box-shadow: 0 6px 0 -2px #111, 0 -6px 0 -2px #111;
}
.av-band--gelb::before, .av-band--gelb::after {
  content: ""; position: absolute; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(-45deg, #111 0 10px, var(--av-gelb) 10px 20px);
}
.av-band--gelb::before { top: 0; } .av-band--gelb::after { bottom: 0; }
.av-band--gelb .av-lauf { padding: 4px 0; }
.av-band--rot {
  position: absolute; left: -12px; right: -12px; bottom: 16px;
  background: var(--av-rot); color: #fff; transform: rotate(1deg);
}
.av-lauf { display: inline-flex; width: max-content; animation: av-lauf 38s linear infinite; }
.av-band--rot .av-lauf { animation-direction: reverse; animation-duration: 46s; }
.av-lauf span { display: inline-flex; align-items: center; gap: .9em; padding-right: .9em; }
.av-lauf span::after { content: "✦"; font-size: .8em; }
@keyframes av-lauf { to { transform: translateX(-50%); } }

/* Kopfzeile des Banners */
.av-kopf {
  position: relative; z-index: 2;
  width: min(100% - 32px, 1320px); margin: 26px auto 0;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: end;
}
.av-kopf > * { min-width: 0; }
.av-titel {
  margin: 0; font-weight: 800; line-height: .86; letter-spacing: -.02em;
  font-size: clamp(52px, 11vw, 168px); text-transform: uppercase;
  color: #fff; animation: av-glut 2.4s ease-in-out infinite;
}
.av-titel em { font-style: normal; color: var(--av-gelb); }
@keyframes av-glut {
  0%, 100% { text-shadow: 0 0 0 rgba(225, 6, 0, 0), 0 0 18px rgba(225, 6, 0, .35); }
  50% { text-shadow: 0 0 22px rgba(225, 6, 0, .95), 0 0 60px rgba(225, 6, 0, .6); }
}
.av-unter { margin: 14px 0 0; max-width: 46ch; font-family: 'Inter', system-ui, sans-serif; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.45; color: #f3e9e7; }
.av-unter strong { color: #fff; }

.av-stempel {
  width: clamp(112px, 15vw, 190px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--av-gelb); color: #111; font-weight: 800; line-height: .95;
  box-shadow: 0 0 0 6px #111, 0 0 0 10px var(--av-gelb), 0 18px 50px rgba(0, 0, 0, .55);
  animation: av-wippen 3.2s ease-in-out infinite; transform-origin: 50% 60%;
}
.av-stempel b { display: block; font-size: clamp(30px, 4.4vw, 56px); letter-spacing: -.03em; }
.av-stempel small { display: block; font-size: clamp(11px, 1.1vw, 14px); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
@keyframes av-wippen { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(6deg) scale(1.06); } }

/* 3D-Drehring */
.av-buehne {
  position: relative; z-index: 1; margin-top: 8px;
  height: calc(var(--av-karte) * 1.25 + 120px);
  perspective: 1500px; perspective-origin: 50% 30%;
  touch-action: pan-y; cursor: grab; user-select: none;
}
.av-buehne.zieht { cursor: grabbing; }
.av-ring {
  position: absolute; left: 50%; top: 34px; width: var(--av-karte); height: calc(var(--av-karte) * 1.25);
  margin-left: calc(var(--av-karte) / -2); transform-style: preserve-3d; will-change: transform;
}
.av-karte {
  position: absolute; inset: 0; margin: 0; padding: 0; border: 0; cursor: pointer;
  background: #fff; border-radius: 14px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .55);
  -webkit-box-reflect: below 10px linear-gradient(transparent 70%, rgba(255, 255, 255, .18));
  transition: box-shadow .25s;
}
.av-karte img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.av-karte:hover, .av-karte:focus-visible { box-shadow: 0 0 0 4px var(--av-gelb), 0 24px 60px rgba(225, 6, 0, .6); outline: none; }
.av-karte .av-name {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 5px 8px; border-radius: 8px;
  background: rgba(11, 11, 12, .82); color: #fff; font: 700 12px/1.2 'Inter', system-ui, sans-serif; text-align: left;
}

/* Adresse und Knöpfe */
.av-fuss {
  position: relative; z-index: 3;
  width: min(100% - 32px, 1320px); margin: 6px auto 0;
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between;
  font-family: 'Inter', system-ui, sans-serif;
}
.av-fuss > * { min-width: 0; }
.av-adresse { display: flex; gap: 12px; align-items: center; font-size: 16px; line-height: 1.35; }
.av-adresse svg { flex: none; width: 34px; height: 34px; color: var(--av-gelb); }
.av-adresse strong { display: block; font-size: 18px; }
.av-adresse span { color: #e8dcda; }
.av-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.av-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 999px; font: 700 16px/1 'Inter', system-ui, sans-serif; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, background-color .15s;
}
.av-knopf:hover { transform: translateY(-2px); }
.av-knopf:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.av-knopf--gelb { background: var(--av-gelb); color: #111; }
.av-knopf--rand { border-color: rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.av-steuer { display: flex; gap: 8px; }
.av-klein {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(11, 11, 12, .6); color: #fff; font: 600 13px/1 'Inter', system-ui, sans-serif; cursor: pointer;
}
.av-klein:focus-visible { outline: 3px solid var(--av-gelb); outline-offset: 2px; }

/* Instagram-Leiste */
.av-insta {
  position: relative; z-index: 3; width: min(100% - 32px, 1320px); margin: 18px auto 0;
  display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: center;
  font-family: 'Inter', system-ui, sans-serif;
}
.av-insta > * { min-width: 0; }
.av-insta-kopf {
  display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
}
.av-insta-kopf:hover { background: rgba(255, 255, 255, .13); }
.av-insta-kopf:focus-visible { outline: 3px solid var(--av-gelb); outline-offset: 3px; }
.av-insta-kopf svg { flex: none; width: 34px; height: 34px; padding: 6px; border-radius: 10px; color: #fff;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.av-insta-kopf span { font-size: 13px; line-height: 1.3; color: #e8dcda; }
.av-insta-kopf strong { display: block; font-size: 15px; color: #fff; }
.av-insta-kopf em { font-style: normal; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: #fff; color: #111; }
.av-insta-reihe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.av-insta-reihe a { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: #222; }
.av-insta-reihe img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.av-insta-reihe a:hover img { transform: scale(1.07); }
.av-insta-reihe a:focus-visible { outline: 3px solid var(--av-gelb); outline-offset: 2px; }
.av-play { position: absolute; right: 6px; top: 6px; font-size: 11px; line-height: 1; padding: 5px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; }

/* Eingeklappt: nur das gelbe Band mit Adresse */
.av.ist-zu { padding-bottom: 0; background: var(--av-tinte); }
.av.ist-zu > :not(.av-band--gelb):not(.av-zu-leiste) { display: none; }
.av-zu-leiste { display: none; }
.av.ist-zu .av-zu-leiste {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center;
  padding: 12px 16px 14px; font: 600 15px/1.3 'Inter', system-ui, sans-serif;
}
.av-zu-leiste a { color: var(--av-gelb); }

/* Grossansicht */
.av-gross {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 560px); width: 100%; color: #fff;
}
.av-gross::backdrop { background: rgba(8, 0, 0, .86); }
.av-gross figure { margin: 0; }
.av-gross img { display: block; width: 100%; height: auto; max-height: 78vh; object-fit: contain; border-radius: 14px; background: #fff; }
.av-gross figcaption { margin-top: 10px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font: 700 17px/1.3 'Inter', system-ui, sans-serif; }
.av-gross .av-nav { display: flex; gap: 8px; }

.av-nurleser { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pause (Knopf) und weniger Bewegung (System) */
.av.ist-still .av-licht, .av.ist-still .av-lauf, .av.ist-still .av-titel, .av.ist-still .av-stempel { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .av-licht, .av-lauf, .av-titel, .av-stempel { animation: none; }
}

@media (max-width: 760px) {
  .av { --av-karte: 138px; padding-bottom: 64px; }
  .av-kopf { grid-template-columns: 1fr; margin-top: 18px; }
  .av-stempel { position: absolute; right: 0; top: -6px; width: 96px; }
  .av-stempel b { font-size: 26px; }
  .av-stempel small { font-size: 10px; }
  .av-titel { font-size: clamp(38px, 12vw, 64px); padding-right: 100px; }
  .av-buehne { perspective: 900px; perspective-origin: 50% 45%; margin-top: -8px; height: calc(var(--av-karte) * 1.25 + 70px); }
  .av-ring { top: 14px; }
  .av-steuer { justify-content: center; }
  .av-fuss { flex-direction: column; align-items: stretch; }
  .av-knoepfe .av-knopf { flex: 1 1 140px; }
  .av-insta { grid-template-columns: 1fr; }
  .av-insta-reihe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 4px; }
  .av-insta-reihe li { flex: 0 0 31%; scroll-snap-align: start; }
}
