/*
  CME-PARTNER – Zusätzliche Gestaltung im gemeinsamen MedLearning-Relaunch.

  pp01 – Partnerbühne, Banner und Informationsleiste
  pp02 – Informationsfeld und responsives Kartenkarussell

  Die Regeln sind vollständig auf die Partneransicht begrenzt und verwenden
  keine Darstellungsregeln aus style.css.
*/

.pp01-partnerseite .ac01-katalog {
  padding-top: 0;
}

/* Der allgemeine Katalog blendet seine bereits aktive Hauptaktion aus.
   Partner- und Medienpartnerdetails führen jedoch zurück zu Aktuelle CME. */
.pp01-partnerseite .kb01-aktuelle-cme {
  display: inline-flex;
}

/* Ohne den per sponsor.select_list gesteuerten Filter beginnt das
   Kartenraster direkt unter der Serviceleiste. */
.pp01-partnerseite .ac01-katalog--ohne-filter .ac03-ergebnisse {
  margin-top: 0;
}

.pp01-buehne {
  --pp01-leistenhoehe: 43px;
  --pp01-bannerabstand: 14px;
  position: relative;
  z-index: 10;
  width: 100%;
  padding-top: var(--pp01-bannerabstand);
  background: linear-gradient(to bottom,
    #fff calc(100% - var(--pp01-leistenhoehe)),
    var(--bs01-hintergrund) calc(100% - var(--pp01-leistenhoehe)));
}

.pp01-partnerbereich {
  position: relative;
  width: 100%;
}

.pp01-bannerrahmen {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: var(--pp01-bannerabstand);
}

.pp01-banner {
  width: min(100%, 1130px);
}

.pp01-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1130 / 110;
  object-fit: contain;
}

.pp01-logovariante {
  display: none;
}

.pp01-serviceleiste {
  display: flex;
  min-height: var(--pp01-leistenhoehe);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
  background: transparent;
}

/* Die Leistenhöhe bleibt beim Öffnen erhalten, damit der Katalog nicht springt. */
.pp01-partnerbereich[data-partner-offen="true"] .pp01-serviceleiste > * {
  visibility: hidden;
  pointer-events: none;
}

.pp01-partnerhinweis {
  color: #97a0b0;
  font-size: 12px;
  font-weight: 540;
  line-height: 1.4;
}

.pp01-oeffner {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 0 4px 8px;
  border: 0;
  background: transparent;
  color: var(--bs01-rot);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.pp01-oeffner:hover { color: var(--bs01-rot-dunkel); }
.pp01-oeffner:focus-visible { outline-offset: 2px; }

.pp01-pfeil-abwaerts {
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
}

/* ============================================================
   pp02 – Informationsfeld und ausschließlich nach unten wirkende Abdunklung
   ============================================================ */
.pp02-ueberlagerung {
  position: fixed;
  z-index: 1;
  top: var(--pp02-ueberlagerung-oben, 100vh);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(246, 248, 252, .78);
  backdrop-filter: blur(2px);
}

.pp02-servicemenue {
  position: absolute;
  z-index: 2;
  top: var(--pp02-panel-oben, 110px);
  right: 0;
  left: 0;
  max-height: calc(100dvh - var(--pp02-ueberlagerung-oben, 0px) - 12px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  border: 0;
  background: transparent;
  scrollbar-color: #c9d5e6 transparent;
}

.pp02-ueberlagerung[hidden],
.pp02-servicemenue[hidden],
.pp02-steuerung[hidden] {
  display: none !important;
}

.pp02-kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.pp02-schliessen {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(214, 0, 42, .16);
  border-radius: 50%;
  background: #fff;
  color: var(--bs01-rot);
  line-height: 1;
  cursor: pointer;
}

.pp02-schliessen:hover { background: #fff0f3; }
.pp02-schliessen svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.pp02-servicemenue:has(.pp02-karussell[data-partner-navigation="true"]) .pp02-kopfzeile {
  padding-left: 34px;
}

.pp02-titel {
  margin: 0;
  color: var(--bs01-blau);
  font-size: clamp(18px, 1.3vw, 20px);
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.pp02-karussell {
  --pp02-sichtbar: 4;
  --pp02-kartenabstand: 16px;
  position: relative;
  min-width: 0;
}

.pp02-sichtfenster {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.pp02-sichtfenster::-webkit-scrollbar { display: none; }
.pp02-sichtfenster:focus-visible { outline-offset: -2px; }

.pp02-kartenraster {
  display: flex;
  align-items: stretch;
}

.pp02-gruppe {
  display: flex;
  min-width: 0;
  flex: 0 0 100%;
  justify-content: center;
  gap: var(--pp02-kartenabstand);
  scroll-snap-align: start;
}

/* Bei mehreren Gruppen bleibt der Kartenrand der vorherigen Seite einen
   Pixel innerhalb seiner Gruppe und kann am Viewportrand nicht durchscheinen. */
.pp02-karussell[data-partner-navigation="true"] .pp02-gruppe {
  box-sizing: border-box;
  padding-inline: 1px;
}

.pp02-gruppe > .pp02-karte {
  flex: 0 0 calc((100% - (var(--pp02-sichtbar) - 1) * var(--pp02-kartenabstand)) / var(--pp02-sichtbar));
}

.pp02-karte {
  display: flex;
  min-width: 0;
  min-height: 234px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #fff;
}

.pp02-karteninhalt {
  display: flex;
  width: 100%;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 18px 18px 16px;
}

.pp02-servicebildrahmen {
  position: relative;
  width: 100%;
  min-height: 120px;
  flex: 1 1 120px;
  overflow: hidden;
  background: #eef3f8;
}

.pp02-servicebildlink {
  position: absolute;
  inset: 0;
}

.pp02-servicebildlink[data-partner-html-bildlink] { z-index: 1; }
.pp02-servicebildlink[hidden] { display: none; }

.pp02-servicebildlink:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #65b1d1;
  pointer-events: none;
}

.pp02-servicebild {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Alte Bild- oder HTML-Blöcke bleiben ohne historische CSS-Klassen sichtbar. */
.pp02-servicebild-legacy {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 120px;
  place-items: center;
  overflow: hidden;
}
.pp02-servicebild-legacy img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pp02-kartenkopf {
  display: flex;
  width: 100%;
  min-height: 37px;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
.pp02-kartenkopf--ohne-symbol { min-height: 0; }

.pp02-kartenicon {
  display: block;
  width: 36px;
  height: 36px;
  flex: none;
}

.pp02-kartenkategorie {
  color: #778495;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
  letter-spacing: .055em;
  text-transform: uppercase;
}

/* Leere optionale Werte dürfen auch bei noch nicht neu geladenem Perl-Prozess
   weder Platz belegen noch die Erkennung eines reinen Linkabschlusses stören. */
.pp02-kartenkategorie:empty,
.pp02-karteninhalt > h3:empty,
.pp02-kartenkopf--ohne-symbol:not(:has(.pp02-kartenkategorie:not(:empty))) {
  display: none;
}

.pp02-karte h3 {
  margin: 0 0 12px;
  color: var(--bs01-blau);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.pp02-kartentext {
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--bs01-schrift);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.48;
}

/* Historische Partnertexte verwenden teils p, span oder font. Ihre
   Typografie wird innerhalb der neuen Karten einheitlich vererbt. */
.pp01-partnerseite .pp02-kartentext p,
.pp01-partnerseite .pp02-kartentext span,
.pp01-partnerseite .pp02-kartentext font,
.pp01-partnerseite .pp02-kartentext b,
.pp01-partnerseite .pp02-kartentext strong,
.pp01-partnerseite .pp02-kartentext u,
.pp01-partnerseite .pp02-kartentext a {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.pp01-partnerseite .pp02-kartentext p {
  margin: 0 0 10px !important;
  padding: 0 !important;
}
.pp01-partnerseite .pp02-kartentext p:last-child {
  margin-bottom: 0 !important;
}
.pp02-kartentext ul,
.pp02-kartentext ol { margin: 0; padding-left: 20px; }
.pp02-kartentext img { max-width: 100%; height: auto; }
.pp02-kartentext a,
.pp02-kartentext a:visited {
  color: var(--bs01-blau);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.pp02-kartentext a:hover,
.pp02-kartentext a:focus-visible {
  color: var(--bs01-rot);
}

.pp02-karteninhalt > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--bs01-dunkelblau);
  font-size: 13px;
  font-weight: 730;
  text-decoration: none;
}
.pp02-karteninhalt > a::after { content: "→"; font-size: 17px; line-height: 1; }
.pp02-karteninhalt > a:hover { color: var(--bs01-rot); }

/* Bildkarten mit ausschließlich einem Ziel-Link benötigen keine vollständige
   Textfläche. Das Bild füllt die Karte, der Link bleibt als kompakter Abschluss. */
.pp02-karte--nur-bildlink .pp02-karteninhalt,
.pp02-karte--service .pp02-karteninhalt:has(> a):not(:has(.pp02-kartenicon, .pp02-kartenkategorie:not(:empty), h3:not(:empty), .pp02-kartentext:not(:empty))) {
  flex: 0 0 auto;
  padding-block: 12px;
}
.pp02-karte--nur-bildlink .pp02-karteninhalt > a,
.pp02-karte--service .pp02-karteninhalt:has(> a):not(:has(.pp02-kartenicon, .pp02-kartenkategorie:not(:empty), h3:not(:empty), .pp02-kartentext:not(:empty))) > a {
  margin-top: 0;
  padding-top: 0;
}

.pp02-karussell[data-partner-navigation="true"] .pp02-sichtfenster {
  margin-inline: 34px;
}

.pp02-pfeil {
  position: absolute;
  top: calc((100% - 33px) / 2);
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(36, 48, 94, .16);
  border-radius: 50%;
  background: #edf2f8;
  color: var(--bs01-blau);
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}
.pp02-pfeil--zurueck { left: 0; }
.pp02-pfeil--weiter { right: 0; }
.pp02-pfeil:disabled { opacity: .32; cursor: default; }
.pp02-pfeil:not(:disabled):hover { background: var(--bs01-blau); color: #fff; }

.pp02-punkte {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 7px;
}

.pp02-punkt {
  display: grid;
  width: 25px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pp02-punkt::before {
  width: 7px;
  height: 7px;
  border-radius: 9px;
  background: #b7c6df;
  content: "";
  transition: width 180ms ease, background-color 180ms ease;
}
.pp02-punkt[aria-current="true"]::before {
  width: 19px;
  background: var(--bs01-blau);
}

@media (max-width: 1100px) {
  .pp02-karussell { --pp02-sichtbar: 3; }
}
@media (max-width: 920px) {
  .pp02-karussell { --pp02-sichtbar: 2; }
}
@media (max-width: 740px) {
  .pp01-banner { display: none; }
  .pp01-logovariante {
    display: flex;
    min-height: 73px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
  }
  .pp01-logovariante img {
    display: block;
    width: 124px;
    max-width: 100%;
    height: auto;
  }
  .pp01-partnerhinweis { font-size: 11px; }
}
@media (max-width: 620px) {
  .pp02-karussell { --pp02-sichtbar: 1; }
  .pp01-buehne { --pp01-leistenhoehe: 48px; --pp01-bannerabstand: 8px; }
  .pp01-serviceleiste { gap: 9px; }
  .pp01-partnerhinweis { max-width: 47%; font-size: 10.5px; }
  .pp01-oeffner { font-size: 12px; text-align: right; white-space: normal; }
  .pp02-servicemenue { padding: 14px 0 12px; }
  .pp02-titel { font-size: 17px; }
  .pp02-servicemenue:has(.pp02-karussell[data-partner-navigation="true"]) .pp02-kopfzeile { padding-left: 30px; }
}
@media (max-width: 380px) {
  .pp02-karussell[data-partner-navigation="true"] .pp02-sichtfenster { margin-inline: 30px; }
  .pp02-pfeil { width: 26px; height: 26px; font-size: 21px; }
  .pp02-karteninhalt { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pp02-sichtfenster { scroll-behavior: auto; }
  .pp02-punkt::before { transition: none; }
}
