/* ================================================================
   ZERTIFIKATE — zrt- Präfix
   Baut auf reise.css (Tokens, Buttons) und legal.css (Seitenrahmen, Intro) auf.
   ================================================================ */
.zrt-main { padding: 80px 0 120px; background: var(--r-cream); flex: 1; }
.zrt-shell { max-width: 1160px; }

.zrt-intro { margin-bottom: 56px; }
.zrt-lead {
  max-width: 60ch; margin: 20px 0 0;
  font-size: var(--fs-lg); line-height: 1.7; color: var(--r-fg2);
}

/* Urkunden-Raster */
.zrt-grid {
  display: grid; gap: 40px 28px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.zrt-card {
  display: flex; flex-direction: column; gap: 16px; width: 100%;
  padding: 0; border: 0; background: none; text-align: left;
  font: inherit; color: inherit; cursor: zoom-in;
}
.zrt-sheet {
  display: block; padding: 10px; background: var(--r-white);
  border: 1px solid var(--r-line); border-radius: 12px;
  box-shadow: var(--r-shadow-sm);
  transition: box-shadow .3s var(--r-ease), transform .3s var(--r-ease);
}
.zrt-sheet img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 1811; }
.zrt-card:hover .zrt-sheet { box-shadow: var(--r-shadow-md); transform: translateY(-4px); }

.zrt-meta { display: flex; flex-direction: column; gap: 4px; }
.zrt-meta .eyebrow { margin: 0; color: var(--r-beige-700); }
.zrt-title { font-family: var(--r-font-disp); font-size: var(--fs-xl); line-height: 1.25; color: var(--r-ink); }
.zrt-zoom {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  font-family: var(--r-font-geo); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--r-beige);
}
.zrt-zoom svg, .zrt-close svg, .zrt-nav svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.zrt-card:focus-visible { outline: 2px solid var(--r-beige); outline-offset: 6px; border-radius: 12px; }

/* Großansicht */
.zrt-dialog {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  box-sizing: border-box; margin: 0; padding: 24px; border: 0; background: transparent; overflow: hidden;
}
.zrt-dialog[open] { display: flex; align-items: center; justify-content: center; gap: 16px; }
/* ::backdrop erbt keine :root-Variablen, daher der Ocean-Wert (--r-green-800) direkt */
.zrt-dialog::backdrop { background: color-mix(in srgb, #0F2B3A 95%, transparent); }
.zrt-full {
  display: block; width: auto; height: auto;
  max-width: min(100%, 760px); max-height: calc(100dvh - 48px);
  background: var(--r-white); border-radius: 12px; box-shadow: var(--r-shadow-lg);
}
.zrt-close, .zrt-nav {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border: 1px solid rgba(250,249,246,.3); border-radius: 50%;
  background: rgba(250,249,246,.1); color: var(--r-cream); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.zrt-close svg, .zrt-nav svg { width: 18px; height: 18px; }
.zrt-close:hover, .zrt-nav:hover { background: rgba(250,249,246,.22); border-color: rgba(250,249,246,.6); }
.zrt-close:focus-visible, .zrt-nav:focus-visible { outline: 2px solid var(--r-beige-300); outline-offset: 3px; }
.zrt-close { position: absolute; top: 16px; right: 16px; }
html.zrt-lock { overflow: hidden; }

/* Abschluss-CTA */
.zrt-cta {
  margin-top: 96px; padding: 48px 40px; text-align: center;
  background: var(--r-white); border: 1px solid var(--r-line);
  border-radius: 18px; box-shadow: var(--r-shadow-sm);
}
.zrt-cta h2 { margin: 0 auto; max-width: 24ch; font-size: var(--fs-h2-xs); }
.zrt-cta p { margin: 14px auto 26px; max-width: 52ch; color: var(--r-fg2); line-height: 1.7; }

@media (max-width: 640px) {
  .zrt-main { padding: 48px 0 80px; }
  .zrt-intro { margin-bottom: 40px; }
  .zrt-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .zrt-sheet { padding: 6px; }
  .zrt-title { font-size: var(--fs-lg); }
  .zrt-zoom { display: none; }
  .zrt-cta { margin-top: 64px; padding: 32px 22px; }

  /* Großansicht: Bild füllt die Breite, Pfeile unten */
  .zrt-dialog { padding: 12px; }
  .zrt-dialog[open] { flex-wrap: wrap; align-content: center; }
  .zrt-full { order: 1; flex: 0 0 100%; max-width: 100%; max-height: calc(100dvh - 112px); width: auto; margin: 0 auto; object-fit: contain; }
  .zrt-prev { order: 2; margin-top: 12px; }
  .zrt-next { order: 3; margin-top: 12px; }
  .zrt-dialog[open] { justify-content: center; gap: 24px; }
  .zrt-full { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .zrt-sheet, .zrt-close, .zrt-nav { transition: none; }
  .zrt-card:hover .zrt-sheet { transform: none; }
}
