/*
 * Startseitenmodul „Aktionen“ (modules/module-promotions.php).
 * Die Karten ragen von unten in das Startbild, damit sie ohne Scrollen sichtbar sind.
 */

/* Startbild nicht höher als der Bildschirm, damit die Karten auch am Laptop ganz sichtbar sind. */
.has-promos .header {
  min-height: 600px;
}

.has-promos .header::after {
  content: "";
  position: absolute;
  z-index: 40;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, rgba(11, 15, 16, 0.85));
  pointer-events: none;
}

.has-promos .header_scroll {
  display: none;
}

.module_promos {
  position: relative;
  z-index: 60;
  clear: both;
  margin-top: -401px;
  padding-bottom: 60px;
}

.module_promos,
.module_promos *,
.module_promos *::before,
.module_promos *::after {
  box-sizing: border-box;
}

.module_promos-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  width: calc(100% - 60px);
  max-width: 1170px;
  margin: 0 auto;
}

.module_promos-inner[data-promo-count="1"] {
  grid-template-columns: minmax(280px, 580px);
  justify-content: center;
}

.module_promos-card {
  --promo-accent: #a10005;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 30px 34px 32px 40px;
  overflow: hidden;
  color: #fff;
  background: rgba(11, 15, 16, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
  animation: module_promos-in 0.6s ease both;
}

.module_promos-card:nth-child(2) { animation-delay: 0.12s; }
.module_promos-card:nth-child(3) { animation-delay: 0.24s; }
.module_promos-card:nth-child(4) { animation-delay: 0.36s; }

.module_promos-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--promo-accent);
}

.module_promos-card:hover,
.module_promos-card:focus-within {
  transform: translateY(-6px);
}

.module_promos-card--highlight {
  --promo-accent: #fff;
  background:
    repeating-linear-gradient(116deg, transparent 0 38px, rgba(255, 255, 255, 0.05) 39px, transparent 40px),
    linear-gradient(135deg, #c1060c, #a10005 55%, #7a0004);
  border-color: rgba(255, 255, 255, 0.25);
}

.module_promos-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.module_promos-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 4px;
  color: #fff;
  background: #a10005;
  font-family: "Quicksand Regular", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.module_promos-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: module_promos-pulse 1.8s ease-in-out infinite;
}

.module_promos-card--highlight .module_promos-badge {
  color: #a10005;
  background: #fff;
}

.module_promos-countdown {
  color: rgba(255, 255, 255, 0.75);
  font-family: "Quicksand Regular", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

body .module_promos-title {
  margin: 0;
  color: #fff;
  font-family: "Quicksand Light", sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 2px;
  text-align: left;
  text-transform: uppercase;
}

body .module_promos-meta {
  margin: 12px 0 0;
  color: #fff;
  font-family: "Quicksand Regular", sans-serif;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 1px;
}

body .module_promos-text {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.module_promos-card--highlight .module_promos-text {
  color: rgba(255, 255, 255, 0.92);
}

.module_promos-button {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 14px 34px 13px 28px;
  color: #fff;
  background: #a10005;
  font-family: "Quicksand Regular", sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Der Button sitzt immer am Kartenende, mit Mindestabstand zum Text darüber. */
body .module_promos-card > :nth-last-child(2) {
  margin-bottom: 24px;
}

/* Ganze Karte klickbar, Fokus bleibt auf dem Button. */
.module_promos-button::after {
  content: "";
  position: absolute;
  inset: 0;
}

.module_promos-button:hover,
.module_promos-button:focus {
  color: #0b0f10;
  background: #fff;
  text-decoration: none;
}

.module_promos-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.module_promos-card--highlight .module_promos-button {
  color: #a10005;
  background: #fff;
}

.module_promos-card--highlight .module_promos-button:hover,
.module_promos-card--highlight .module_promos-button:focus {
  color: #fff;
  background: #0b0f10;
}

.module_promos-arrow {
  transition: transform 0.25s ease;
}

.module_promos-card:hover .module_promos-arrow {
  transform: translateX(5px);
}

@keyframes module_promos-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes module_promos-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/*
 * Handy: Karten untereinander. Das Startbild wird niedriger, damit die erste Karte
 * ohne Scrollen sichtbar ist; die weiteren folgen auf dunklem Grund darunter.
 */
@media (max-width: 767px) {
  .has-promos .header {
    height: 52vh;
    height: 52svh;
    min-height: 300px;
  }

  .module_promos {
    margin-top: -70px;
    padding-bottom: 30px;
    background: linear-gradient(180deg, transparent 70px, #0b0f10 70px);
  }

  .module_promos-inner,
  .module_promos-inner[data-promo-count="1"] {
    grid-template-columns: 1fr;
    gap: 14px;
    width: calc(100% - 32px);
  }

  .module_promos-card {
    min-height: 0;
    padding: 20px 18px 22px 26px;
  }

  .module_promos-button {
    padding: 13px 28px 12px 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  body .module_promos-meta {
    font-size: 14px;
  }

  body .module_promos-title {
    font-size: clamp(19px, 5.6vw, 24px);
    letter-spacing: 1px;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  body .module_promos-card > .module_promos-button {
    margin-top: 18px;
  }

  /* Am Handy zählt jeder Zentimeter im Startbild – der Kurztext steht auf der Zielseite. */
  body .module_promos-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module_promos-card,
  .module_promos-badge::before,
  .module_promos-arrow {
    animation: none;
    transition: none;
  }
}
