/* =========================================================
   PDF & Broschüren – Apple inspired cards + modal
   Layout-critical structure is handled with Tailwind in HTML.
   This file only adds specific polish, scrollbars and fallbacks.
   ========================================================= */

.pdf-library-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 370px);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pdf-library-track::-webkit-scrollbar { display: none; }

.pdf-feature-card {
  min-height: 460px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  border-radius: 2.25rem;
  isolation: isolate;
  background: #1d1d1f;
  color: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.10);
  transform: translateZ(0);
}

.pdf-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 25% 15%, rgba(0,113,227,0.38), transparent 34%),
    radial-gradient(circle at 90% 88%, rgba(242,183,89,0.18), transparent 42%),
    linear-gradient(145deg, #1d1d1f 0%, #2d2d30 60%, #111113 100%);
}

.pdf-feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
  opacity: 0.72;
}

.pdf-feature-card .pdf-card-inner {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.6rem;
}

.pdf-feature-card .pdf-card-kicker {
  color: rgba(255,255,255,0.58);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pdf-feature-card h3 {
  margin-top: 1rem;
  max-width: 11ch;
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
  font-weight: 750;
}

.pdf-feature-card p {
  margin-top: 1rem;
  max-width: 32ch;
  color: rgba(255,255,255,0.70);
  font-size: 0.98rem;
  line-height: 1.65;
}

.pdf-document-visual {
  margin-top: 2rem;
  align-self: flex-end;
  width: min(72%, 220px);
  aspect-ratio: 0.72;
  border-radius: 1.7rem;
  background: rgba(255,255,255,0.92);
  color: #1d1d1f;
  padding: 1.2rem;
  box-shadow: 0 30px 60px rgba(0,0,0,0.28);
  transform: rotate(-2deg);
}

.pdf-document-visual .doc-line {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(29,29,31,0.12);
  margin-bottom: 0.75rem;
}

.pdf-document-visual .doc-line.is-blue { background: rgba(0,113,227,0.84); width: 64%; }
.pdf-document-visual .doc-line.is-short { width: 48%; }
.pdf-document-visual .doc-line.is-mid { width: 78%; }

.pdf-card-open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  color: #1d1d1f;
  box-shadow: 0 18px 34px rgba(0,0,0,0.18);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), background 300ms ease;
}

@media (hover:hover) {
  .pdf-feature-card { transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1); }
  .pdf-feature-card:hover { transform: translateY(-4px); }
  .pdf-feature-card:hover .pdf-card-open { transform: scale(1.06); background: #fff; }
}

/* ---------- Modal shell ---------- */

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.pdf-modal.is-open { display: flex; }

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29,29,31,0.66);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

/* Width/radius/padding are Tailwind utilities on the HTML element.
   These fallback rules keep old browsers stable and fix grid overflow. */
.pdf-modal-panel {
  position: relative;
  color: #1d1d1f;
  isolation: isolate;
}

.pdf-modal-scroll,
.pdf-modal-grid,
.pdf-modal-hero,
.pdf-modal-content {
  min-width: 0;
}

.pdf-modal-grid {
  width: 100%;
}

/* Left cinematic panel */
.pdf-modal-hero {
  color: white;
  background:
    radial-gradient(circle at 16% 16%, rgba(0,113,227,0.46), transparent 36%),
    radial-gradient(circle at 92% 92%, rgba(242,183,89,0.24), transparent 44%),
    linear-gradient(145deg, #1d1d1f 0%, #28282c 56%, #101012 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pdf-modal-hero .eyebrow {
  color: rgba(255,255,255,0.56);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pdf-modal-hero p,
.pdf-modal-hero h2 {
  overflow-wrap: anywhere;
}

/* Right content panel */
.pdf-modal-scroll,
.pdf-modal-content {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.pdf-modal-content {
  box-shadow: inset 1px 0 0 rgba(0,0,0,0.05);
}

.pdf-modal-text p {
  margin: 0;
}

.pdf-modal-text p + p {
  margin-top: 1.2rem;
}

.pdf-modal-content::-webkit-scrollbar,
.pdf-modal-scroll::-webkit-scrollbar {
  width: 10px;
}

.pdf-modal-content::-webkit-scrollbar-track,
.pdf-modal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.pdf-modal-content::-webkit-scrollbar-thumb,
.pdf-modal-scroll::-webkit-scrollbar-thumb {
  border: 3px solid #fbfbfd;
  border-radius: 999px;
  background: rgba(29,29,31,0.16);
}

.pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 0.9rem;
  background: rgba(10,74,60,0.10);
  color: #0A4A3C;
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pdf-actions a {
  text-decoration: none;
}

/* ---------- Compact cards on page ---------- */

.pdf-compact-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 1.75rem;
  background: rgba(255,255,255,0.86);
  padding: 1.35rem;
  min-height: 230px;
  box-shadow: 0 14px 42px rgba(0,0,0,0.045);
  border: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition:
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 300ms ease,
    border-color 300ms ease;
}

.pdf-compact-card * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pdf-compact-kicker {
  color: #86868b;
  font-size: 0.66rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pdf-compact-plus {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
  color: #1d1d1f;
  font-weight: 700;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), background-color 300ms ease;
}

@media (hover:hover) {
  .pdf-compact-card:hover {
    transform: translateY(-3px) scale(1.01);
    background: #fff;
    border-color: rgba(0,113,227,0.16);
  }

  .pdf-compact-card:hover .pdf-compact-plus {
    transform: scale(1.05);
    background: rgba(0,113,227,0.10);
    color: #0071e3;
  }
}


.pdf-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #1d1d1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), background 300ms ease;
}

@media (hover:hover) {
  .pdf-close:hover { transform: scale(1.05); background: #fff; }
}

body.pdf-modal-open { overflow: hidden; }

@media (max-width: 1023px) {
  .pdf-modal-content { box-shadow: inset 0 1px 0 rgba(0,0,0,0.05); }
  .pdf-modal-hero { min-height: 420px; }
}

@media (max-width: 640px) {
  .pdf-modal { align-items: flex-end; padding: 0.75rem; }
  .pdf-modal-panel { border-radius: 2rem !important; }
  .pdf-modal-hero { min-height: 360px; }
  .pdf-close { top: 0.75rem; right: 0.75rem; width: 40px; height: 40px; }
}

@media (hover: none) {
  .pdf-feature-card:hover,
  .pdf-close:hover,
  .pdf-actions a:hover { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-feature-card,
  .pdf-card-open,
  .pdf-close,
  .pdf-actions a { transition: none !important; }
}
