/* Magazin-Karten — gleiche Sprache wie Top Events */

.eeg-mag {
  --eeg-mag-pink: #e6007e;
  --eeg-mag-pink-soft: rgba(230, 0, 126, 0.2);
  --eeg-mag-bg: #09090b;
  --eeg-mag-panel: #121216;
  --eeg-mag-line: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  container-type: inline-size;
  container-name: eeg-mag;
  color: #fff;
  background:
    radial-gradient(1100px 420px at 92% -12%, var(--eeg-mag-pink-soft), transparent 55%),
    var(--eeg-mag-bg);
  border-radius: 28px;
  padding: clamp(16px, 2vw, 24px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 28px 80px rgba(0, 0, 0, 0.28);
}

.eeg-mag__layout,
.eeg-mag__grid,
.eeg-mag__side {
  position: relative;
  z-index: 1;
}

.eeg-mag a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.eeg-mag__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.78fr);
  gap: 16px;
  align-items: stretch;
}

.eeg-mag__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.eeg-mag__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eeg-mag-card--lead {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  border-radius: 22px;
  overflow: hidden;
  min-height: 420px;
  background: #101014;
  border: 1px solid var(--eeg-mag-line);
}

.eeg-mag-card--lead .eeg-mag-card__media {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  background: #000;
}

.eeg-mag-card--lead .eeg-mag-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.88) contrast(1.04);
  transform: scale(1.03);
  transition: transform 0.7s ease;
}

.eeg-mag-card--lead .eeg-mag-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 55%, rgba(16, 16, 20, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.eeg-mag-card--lead .eeg-mag-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    480px circle at var(--mx, 40%) var(--my, 30%),
    rgba(255, 255, 255, 0.14),
    transparent 42%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
}

.eeg-mag-card--lead .eeg-mag-card__media:hover img,
.eeg-mag-card--lead .eeg-mag-card__media:focus-visible img {
  transform: scale(1.07);
}

.eeg-mag-card--lead .eeg-mag-card__media:hover .eeg-mag-card__shine,
.eeg-mag-card--lead .eeg-mag-card__media:focus-visible .eeg-mag-card__shine {
  opacity: 1;
}

.eeg-mag-card__panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px 26px 26px;
  background: linear-gradient(180deg, #16161c 0%, #0d0d11 100%);
}

.eeg-mag-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eeg-mag-card--lead .eeg-mag-cal {
  align-self: flex-start;
}

.eeg-mag-card--lead .eeg-mag-card__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.eeg-mag-card--lead .eeg-mag-card__title a {
  color: #fff;
  text-decoration: none;
}

.eeg-mag-card--lead .eeg-mag-card__title a:hover,
.eeg-mag-card--lead .eeg-mag-card__title a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.eeg-mag-card--lead .eeg-mag-card__excerpt {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.45;
}

.eeg-mag-card--lead .eeg-mag-card__date {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  font-weight: 600;
}

.eeg-mag-card--lead .eeg-btn {
  margin-top: 8px;
  align-self: flex-start;
}

.eeg-mag-badge {
  align-self: flex-start;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.eeg-mag-cal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1;
}

.eeg-mag-cal__day {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.eeg-mag-cal__month {
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eeg-mag-pink);
}

.eeg-mag-card--row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.eeg-mag-card__main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: var(--eeg-mag-panel);
  border: 1px solid var(--eeg-mag-line);
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.eeg-mag-card__main:hover,
.eeg-mag-card__main:focus-visible {
  border-color: rgba(230, 0, 126, 0.55);
  background: #16161c;
}

.eeg-mag-card--row .eeg-mag-card__media {
  position: relative;
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a1f;
}

.eeg-mag-card--row .eeg-mag-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.eeg-mag-card__main:hover .eeg-mag-card__media img,
.eeg-mag-card__main:focus-visible .eeg-mag-card__media img {
  transform: scale(1.06);
}

.eeg-mag-card--row .eeg-mag-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eeg-mag-card--row .eeg-mag-badge {
  padding: 3px 8px;
  font-size: 10px;
}

.eeg-mag-card--row .eeg-mag-card__title {
  margin: 0;
  color: #fff;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eeg-mag-card--row .eeg-mag-card__date {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  font-weight: 600;
}

.eeg-mag-card--row .eeg-mag-cal {
  flex-shrink: 0;
  min-width: 50px;
  padding: 7px 8px 8px;
}

.eeg-mag-card--tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--eeg-mag-panel);
  border: 1px solid var(--eeg-mag-line);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.eeg-mag-card--tile:hover,
.eeg-mag-card--tile:focus-within {
  border-color: rgba(230, 0, 126, 0.55);
}

.eeg-mag-card--tile .eeg-mag-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.eeg-mag-card--tile .eeg-mag-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.88) contrast(1.04);
  transform: scale(1.02);
  transition: transform 0.55s ease;
}

.eeg-mag-card--tile:hover .eeg-mag-card__media img,
.eeg-mag-card--tile:focus-within .eeg-mag-card__media img {
  transform: scale(1.07);
}

.eeg-mag-cal--overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  min-width: 52px;
  background: rgba(12, 12, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.eeg-mag-card--tile .eeg-mag-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
}

.eeg-mag-card--tile .eeg-btn {
  margin-top: auto;
  align-self: center;
  width: auto;
  min-width: 0;
  min-height: 42px;
  padding: 11px 22px;
}

.eeg-mag-card--row .eeg-btn {
  align-self: center;
  flex-shrink: 0;
}

.eeg-mag-card--tile .eeg-mag-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eeg-mag-card--tile .eeg-mag-card__title a {
  color: #fff;
  text-decoration: none;
}

.eeg-mag-card--tile .eeg-mag-card__title a:hover,
.eeg-mag-card--tile .eeg-mag-card__title a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.eeg-mag-card--tile .eeg-mag-card__excerpt {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eeg-mag-card--tile .eeg-mag-card__date {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 600;
}

.eeg-mag.eeg-te-animate .eeg-mag-card {
  opacity: 0;
  transform: translateY(16px);
}

.eeg-mag.is-visible .eeg-mag-card {
  animation: eeg-mag-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.eeg-mag.is-visible .eeg-mag-card:nth-child(2),
.eeg-mag.is-visible .eeg-mag__side .eeg-mag-card:nth-child(1) {
  animation-delay: 0.07s;
}

.eeg-mag.is-visible .eeg-mag-card:nth-child(3),
.eeg-mag.is-visible .eeg-mag__side .eeg-mag-card:nth-child(2) {
  animation-delay: 0.14s;
}

@keyframes eeg-mag-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@container eeg-mag (max-width: 860px) {
  .eeg-mag__layout,
  .eeg-mag-card--lead {
    grid-template-columns: 1fr;
  }

  .eeg-mag-card--lead {
    min-height: 0;
  }

  .eeg-mag-card--lead .eeg-mag-card__media {
    min-height: 220px;
    aspect-ratio: 16 / 10;
  }
}

@container eeg-mag (max-width: 720px) {
  .eeg-mag__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .eeg-mag__layout,
  .eeg-mag-card--lead,
  .eeg-mag__grid {
    grid-template-columns: 1fr;
  }

  .eeg-mag-card--lead {
    min-height: 0;
  }

  .eeg-mag-card--lead .eeg-mag-card__media {
    min-height: 240px;
    aspect-ratio: 16 / 10;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eeg-mag.eeg-te-animate .eeg-mag-card,
  .eeg-mag.is-visible .eeg-mag-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .eeg-mag-card--lead .eeg-mag-card__media img,
  .eeg-mag-card--row .eeg-mag-card__media img,
  .eeg-mag-card--tile .eeg-mag-card__media img {
    transition: none;
    transform: none;
  }
}
