/* Abstand von oben: Höhe der Kopfzeile der Website */
:root { --stoerer-top: 180px; }
@media (max-width: 800px) {
  :root { --stoerer-top: 100px; }
}
/* Breites Querformat: dort ist die Kopfzeile 125 px hoch */
@media (max-height: 500px) and (min-width: 801px) {
  :root { --stoerer-top: 125px; }
}

@font-face {
  font-family: 'Montserrat Stoerer';
  src: url('../../fonts/montserrat-400.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat Stoerer';
  src: url('../../fonts/montserrat-700.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

.stoerer {
  position: absolute;
  z-index: 2; /* unter Header und Menü der Website (3) */
  top: var(--stoerer-top, 180px);
  right: 0;
  width: min(480px, 100% - 16px);
  color: #fff;
  font-family: 'Montserrat Stoerer', Arial, sans-serif;
  line-height: 1.25;
  text-align: left;
}
.stoerer [hidden] { display: none !important; }

.stoerer__karte { position: relative; }

/* Grundzustand: alle Texte statisch untereinander (ohne JavaScript, reduzierte Bewegung) */
.stoerer__banner {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: #a00016 url('../img/motiv-preis.webp') right center / cover;
}
.stoerer__banner:first-child { padding-right: 104px; }
.stoerer__banner + .stoerer__banner { border-top: 1px solid rgb(255 255 255 / .35); }
.stoerer__banner--countdown { background-image: url('../img/motiv-award.webp'); }
.stoerer__banner--termin { background-image: url('../img/motiv-beide.webp'); }
/* Englisch: Friedenspreis-Logo übersetzt */
.stoerer__banner:first-child:lang(en) { background-image: url('../img/motiv-preis-en.webp'); }
.stoerer__banner--termin:lang(en) { background-image: url('../img/motiv-beide-en.webp'); }
/* Ohne Animation sind die Tafeln flach: Motiv nur auf der letzten, dort mit Platz für beide Logos */
.stoerer:not(.stoerer--animiert) .stoerer__banner:not(.stoerer__banner--termin) { background-image: none; }
.stoerer:not(.stoerer--animiert) .stoerer__banner--termin { min-height: 270px; justify-content: flex-end; }

.stoerer__titel,
.stoerer__text,
.stoerer__countdown { margin: 0; padding: 0; color: inherit; font-family: inherit; font-weight: 400; line-height: 1.25; letter-spacing: 0; text-transform: none; }
.stoerer__titel { max-width: 12em; font-size: clamp(22px, 7.4vw, 36px); font-weight: 700; line-height: 1.15; }
.stoerer__banner--termin .stoerer__titel { max-width: none; font-size: 19px; }
.stoerer__datum { display: block; font-size: clamp(22px, 7.4vw, 36px); white-space: nowrap; }
.stoerer__countdown { font-size: 19px; font-weight: 700; }
.stoerer__zahl { display: block; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.stoerer__text { font-size: 15px; }

.stoerer__steuerung {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}
.stoerer__knopf {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / .45);
  color: #fff;
  cursor: pointer;
}
.stoerer__knopf:hover { background: rgb(0 0 0 / .7); }
.stoerer__knopf--pause::before {
  content: '';
  box-sizing: content-box; /* die Website setzt global border-box */
  width: 5px;
  height: 14px;
  border: solid #fff;
  border-width: 0 4px;
}
.stoerer__knopf--pause[aria-pressed='true']::before {
  width: 0;
  height: 0;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}
.stoerer__knopf--zu::before { content: '×'; font: 400 28px/1 Arial, sans-serif; }

.stoerer__lasche {
  display: block;
  margin-left: auto;
  padding: 16px 20px;
  border: 0;
  background: #a00016;
  box-shadow: 0 8px 24px rgb(0 0 0 / .35);
  color: #fff;
  font: 700 15px/1.25 'Montserrat Stoerer', Arial, sans-serif;
  cursor: pointer;
}
.stoerer__knopf:focus-visible,
.stoerer__lasche:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }

/* Animation: Banner liegen übereinander und fahren von rechts ein */
.stoerer--animiert .stoerer__karte { display: grid; overflow: hidden; }
.stoerer--animiert .stoerer__banner {
  grid-area: 1 / 1;
  min-height: 280px;
  justify-content: flex-end;
  gap: 10px;
  padding: 48px 32px 24px;
  border: 0;
  transform: translateX(101%);
  transition: transform .8s cubic-bezier(.22, .8, .24, 1);
}
.stoerer--animiert .stoerer__banner--aktiv { transform: none; }
.stoerer--animiert .stoerer__countdown { font-size: clamp(15px, 4.4vw, 19px); }
.stoerer--animiert .stoerer__zahl { display: inline; font-size: clamp(56px, 18vw, 76px); line-height: .9; }
.stoerer--animiert .stoerer__steuerung { opacity: 0; transition: opacity .3s; }
.stoerer--sichtbar .stoerer__steuerung,
.stoerer--animiert .stoerer__steuerung:focus-within { opacity: 1; }
.stoerer--animiert .stoerer__lasche { animation: stoerer-einfahren .5s ease-out; }

@keyframes stoerer-einfahren {
  from { transform: translateX(100%); }
}

@media (max-width: 700px) {
  .stoerer--animiert .stoerer__banner { min-height: 250px; gap: 6px; padding: 48px 20px 16px; }
  .stoerer:not(.stoerer--animiert) .stoerer__banner--termin { min-height: 250px; }
}

/* Kleine Schirme: kompaktere Knöpfe, damit die Logos frei bleiben */
@media (max-width: 700px), (max-height: 500px) {
  .stoerer__steuerung { top: 2px; right: 2px; }
  .stoerer__knopf { width: 36px; height: 36px; }
}

/* Sehr schmal: der englische Termin braucht drei Zeilen unter den Logos */
@media (max-width: 360px) {
  .stoerer--animiert .stoerer__banner--termin { gap: 2px; padding-bottom: 10px; }
}

/* Handy im Querformat */
@media (max-height: 500px) {
  .stoerer { width: min(360px, 100% - 16px); }
  .stoerer--animiert .stoerer__banner { min-height: 220px; gap: 4px; padding: 44px 20px 12px; }
  .stoerer--animiert .stoerer__countdown { font-size: 16px; }
  .stoerer--animiert .stoerer__zahl { font-size: 60px; }
  .stoerer__datum { font-size: 26px; }
  .stoerer__titel { font-size: 26px; }
}
