/* ============================================================
   nquartic Blog: zwei horizontale Reihen (Netflix-Prinzip)
   oben Standpunkte (Grün, 4:5), unten Impulse (Blau, 16:9).
   Links je Reihe ein Themen-Label (Icon, Farbe, Titel, Satz),
   rechts davon die Kacheln, seitlich scrollbar bis an den Rand.
   Baut auf tokens.css + site.css auf (Header, Buttons, Fluid).
   ============================================================ */

/* aktueller Menüpunkt */
.nav-top.is-current { color: var(--accent); }

/* ---------- Intro (zentriert) ---------- */
.blog-intro { padding: clamp(64px, 11vh, 120px) 0 clamp(36px, 6vh, 64px); text-align: center; }
.blog-intro .wrap { display: flex; flex-direction: column; align-items: center; }
.blog-lang-note { margin: 18px auto 0; font-family: var(--font-ui); font-size: 14px; letter-spacing: .04em; color: var(--fg3); }
.blog-lang-note:empty { display: none; }   /* nur in der englischen Ansicht gefüllt (i18n) */
.blog-intro .lead { max-width: 76ch; margin-left: auto; margin-right: auto; text-wrap: balance; }

/* ============================================================
   Reihen (Shelves)
   ============================================================ */
:root { --shelf-max: 1400px; --gutter: clamp(20px, 5vw, 64px);
  /* Inhaltskante links/rechts: an der Seitenbreite ausgerichtet */
  --edge: max(var(--gutter), calc((100vw - var(--shelf-max)) / 2 + var(--gutter))); }
.shelf {
  --col: var(--nq-green-500); --col-soft: rgba(88,184,160,.14); --col-line: rgba(88,184,160,.45);
  position: relative;
  /* links an der Inhaltskante; rechts läuft die Kachel-Reihe bis an den Fensterrand */
  padding-left: var(--edge);
  margin-bottom: clamp(48px, 8vh, 88px);
}
.shelf-impulse { --col: var(--nq-blue-400); --col-soft: rgba(91,134,168,.16); --col-line: rgba(91,134,168,.5); }

/* --- Kopf ÜBER der Reihe: leuchtendes Icon links (so hoch wie Titel + Text),
       daneben Titel (farbig) und darunter die Erklärung (weiß) --- */
.shelf-label {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; column-gap: clamp(14px, 1.6vw, 22px);
  padding-right: var(--edge); margin-bottom: clamp(14px, 2vh, 22px);
}
.shelf-mark {
  /* Höhe = Titelzeile + Abstand + eine Textzeile → schließt beide Textbausteine links ab */
  --mark: calc(clamp(24px, 2.4vw, 32px) * 1.1 + 4px + 16px * 1.45);
  align-self: center; width: var(--mark); height: var(--mark); display: block; color: var(--col);
  filter: drop-shadow(0 0 4px var(--col)) drop-shadow(0 0 14px var(--col-line));
}
.shelf-impulse .shelf-mark { color: var(--nq-blue-300); }
.shelf-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.shelf-mark svg * { vector-effect: non-scaling-stroke; stroke-width: 1.6px; }
.shelf-head { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.shelf-title {
  margin: 0; font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  letter-spacing: .12em; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; color: var(--col);
}
.shelf-text { margin: 0; font-size: 16px; line-height: 1.45; color: var(--fg1); }

/* --- Schiene: Kachel-Spur + Rand-Knöpfe + Fortschritt --- */
.shelf-rail { position: relative; min-width: 0; }
.shelf-track {
  display: flex; gap: clamp(14px, 1.4vw, 22px); align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding: 10px var(--gutter) 18px 4px;          /* oben/unten Luft für den Hover-Lift */
  scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y;
  scroll-padding-left: 4px;   /* Einrasten respektiert das Innen-Padding → Startposition bleibt 0 */
  /* Ränder weich ausblenden, wo es weitergeht */
  --fade-l: 0px; --fade-r: 0px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.shelf.is-scrollable:not(.at-end) .shelf-track   { --fade-r: 150px; }
.shelf.is-scrollable:not(.at-start) .shelf-track { --fade-l: 70px; }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track:focus-visible { outline: 2px solid var(--col); outline-offset: 4px; border-radius: var(--r-md); }

/* Rand-Knopf rechts: gefüllt in Reihenfarbe, mit "+N" darunter, atmet sanft */
.shelf-edge {
  position: absolute; top: calc(10px + var(--edge-y, 38%)); transform: translateY(-50%); z-index: 3;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #0E1318; background: var(--col); border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none;
}
.shelf.is-ready .shelf-edge { transition: opacity .3s ease, transform .2s ease; }
.edge-next { right: calc(var(--gutter) * .5); }
.edge-prev { left: 10px; }
.shelf.is-scrollable:not(.at-end) .edge-next,
.shelf.is-scrollable:not(.at-start) .edge-prev { opacity: 1; pointer-events: auto; }
.shelf-edge:hover { transform: translateY(-50%) scale(1.07); }
.shelf-edge:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.shelf-edge::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--col);
  opacity: 0; animation: edge-breathe 2.6s ease-out infinite; }
@keyframes edge-breathe { 0% { opacity: .55; transform: scale(.9); } 70%, 100% { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .shelf-edge::before { animation: none; } }
.edge-more { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--col); white-space: nowrap; }
.shelf-stand   { --edge-y: 38%; }   /* ~Mitte der hohen 4:5-Kacheln */
.shelf-impulse { --edge-y: 34%; }

/* Fortschritt: zeigt Umfang und Position der Reihe */
.shelf-progress { height: 2px; margin: 4px var(--gutter) 0 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden;
  opacity: 0; }
.shelf.is-ready .shelf-progress { transition: opacity .3s ease; }
.shelf.is-scrollable .shelf-progress { opacity: 1; }
.shelf-progress span { display: block; height: 100%; width: 30%; background: var(--col); border-radius: 2px; transition: transform .15s linear; }

/* ---------- Kachel ---------- */
.tile { font: inherit; color: inherit; text-align: left; cursor: pointer; border: 0; padding: 0; background: none;
  flex: none; display: flex; flex-direction: column; gap: 12px; scroll-snap-align: start; }
.tile-stand   { width: clamp(200px, 17vw, 244px); }
.tile-impulse { width: clamp(300px, 30vw, 440px); }
.tile-img {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  background: #0f171e; border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 34px rgba(0,0,0,.32);
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s ease, box-shadow .3s ease;
}
.tile-stand .tile-img   { aspect-ratio: 4 / 5; }
.tile-impulse .tile-img { aspect-ratio: 16 / 9; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.tile:hover .tile-img, .tile:focus-visible .tile-img {
  transform: translateY(-4px); border-color: var(--col); box-shadow: 0 24px 50px rgba(0,0,0,.46), 0 0 0 1px var(--col-soft);
}
.tile:hover .tile-img img { transform: scale(1.035); }
.tile:focus-visible { outline: none; }
.tile-pages {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: var(--r-pill);
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(14,19,24,.74); border: 1px solid rgba(255,255,255,.16); color: var(--fg1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* Bildunterschrift: Thema (farbig, klein) + ein Satz; wie die Kurzinfo einer Filmvorschau */
.tile-cap { display: flex; flex-direction: column; gap: 5px; padding: 0 2px; border-left: 2px solid transparent; transition: border-color .3s ease; }
.tile-kicker { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--col); }
.tile-text { font-size: 15px; line-height: 1.45; color: var(--fg2); transition: color .25s ease;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-impulse .tile-text { font-size: 16px; -webkit-line-clamp: 3; }
.tile:hover .tile-text, .tile:focus-visible .tile-text { color: var(--fg1); }

/* ============================================================
   Pop-ups (<dialog>)
   ============================================================ */
html.bm-lock { overflow: hidden; }
.bm {
  padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); color: var(--fg1);
  background: rgba(16,22,29,.96); box-shadow: 0 40px 120px rgba(0,0,0,.6);
  max-width: none; max-height: none; overflow: hidden;
}
.bm::backdrop { background: rgba(6,9,12,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bm[open] { animation: bm-in .38s cubic-bezier(.16,1,.3,1); }
@keyframes bm-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bm[open] { animation: none; } }

/* Icon-Knöpfe (Vollbild, Schließen) */
.bm-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none;
  color: var(--fg1); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); text-decoration: none;
  transition: background .18s ease, color .18s ease; }
.bm-icon:hover { background: rgba(88,184,160,.18); color: var(--accent); }
.bm-kind { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* --- Impuls: fast bildschirmfüllend, Deck im Rahmen --- */
.bm-impulse { width: min(1480px, 96vw); height: min(92vh, 960px); }
.bm-impulse[open] { display: flex; flex-direction: column; }
.bm-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.bm-bar-meta { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.bm-impulse .bm-kind { color: var(--nq-blue-300); }
.bm-bar-title { font-family: var(--font-display); font-weight: 300; font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-bar-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.bm-frame { flex: 1; min-height: 0; background: #0E1318; }
.bm-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- Standpunkt: links Grafik fix (volle Höhe), rechts Text scrollbar --- */
.bm-stand { width: min(1240px, 95vw); height: min(90vh, 880px); }
.bm-split { display: flex; height: 100%; }
.bm-media {
  --ar: 4 / 5;
  flex: none; height: 100%; aspect-ratio: var(--ar); max-width: 58%;
  position: relative; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(100% 100% at 50% 0%, #17232e, #0b1015); border-right: 1px solid var(--line);
}
.bm-media.is-wide { aspect-ratio: auto; width: 58%; }
.bm-media video, .bm-media > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bm-side { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.bm-side-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 14px clamp(22px, 3.4vw, 44px); border-bottom: 1px solid var(--line); }
.bm-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--font-ui); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg3); }
.bm-stand .bm-kind { color: var(--accent); }
.bm-kicker { color: var(--nq-green-300); font-weight: 600; }
.bm-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(24px, 3.4vw, 40px) clamp(22px, 3.4vw, 44px) 12px; }
.bm-title { margin: 0 0 22px; font-family: var(--font-display); font-weight: 300; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.12; text-wrap: balance; }
.bm-text p { margin: 0 0 1.05em; font-size: 17px; line-height: 1.68; color: var(--fg2); }
.bm-text p:first-child { color: var(--fg1); font-size: 19px; }
.bm-text .bm-tags { color: var(--hilite); font-size: 15px; }
.bm-foot { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.bm-pager { display: flex; justify-content: space-between; gap: 12px; padding: 10px clamp(22px, 3.4vw, 44px); border-top: 1px solid var(--line); }
.bm-pager button { background: none; border: 0; cursor: pointer; font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); padding: 8px 0; }
.bm-pager button:hover { color: var(--accent); }
.bm-pager #bm-next { margin-left: auto; }

/* Ton-Hinweis über dem Video (nur falls der Browser Ton-Autoplay blockiert) */
.bm-sound { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: #0E1318; background: var(--nq-green-500);
  border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.45); white-space: nowrap; }
.bm-sound[hidden] { display: none; }
.bm-sound:hover { background: var(--nq-green-400); }

/* PDF als Blätteransicht */
/* Bild oben, Steuerleiste darunter (NICHT darüber: die Seitenbilder tragen unten
   selbst schon Seitenzahl und Pfeil aus dem LinkedIn-Karussell) */
.pv { position: absolute; inset: 0; display: flex; flex-direction: column; }
.pv-img { flex: 1; min-height: 0; width: 100%; object-fit: contain; display: block; }
.pv-arrow { position: absolute; top: calc(50% - 30px); transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--fg1);
  background: rgba(14,19,24,.62); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .18s ease, opacity .18s ease; }
.pv-prev { left: 14px; } .pv-next { right: 14px; }
.pv-arrow:hover:not(:disabled) { background: rgba(88,184,160,.3); color: #fff; }
.pv-arrow:disabled { opacity: 0; pointer-events: none; }
.pv-bar { flex: none; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 14px; background: rgba(8,11,15,.6); border-top: 1px solid var(--line); }
.pv-count { font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: .12em; color: var(--fg1);
  padding: 5px 12px; border-radius: var(--r-pill); background: rgba(14,19,24,.7); border: 1px solid rgba(255,255,255,.16); }
.pv-dl { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); text-decoration: none;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: #0E1318; background: var(--nq-green-500); }
.pv-dl:hover { background: var(--nq-green-400); }

/* ============================================================
   Responsive
   ============================================================ */
/* Tablet/Handy: Label über der Reihe, Reihe läuft von Rand zu Rand */
@media (max-width: 860px) {
  .shelf { padding-left: 0; }
  .shelf-label { padding: 0 var(--gutter); }
  .shelf-text { font-size: 15px; }
  .shelf-edge { width: 44px; height: 44px; }
  .edge-next { right: 10px; }
  .shelf-track { padding-left: var(--gutter); scroll-padding-left: var(--gutter); }
  .tile-stand   { width: min(56vw, 230px); }
  .tile-impulse { width: min(82vw, 380px); }
}
/* Pop-up Standpunkt auf schmalen Fenstern: Grafik oben (fix), Text darunter scrollbar */
@media (max-width: 860px) {
  .bm-split { flex-direction: column; }
  .bm-media, .bm-media.is-wide { width: 100%; max-width: none; height: auto; max-height: 46vh; aspect-ratio: var(--ar); border-right: 0; border-bottom: 1px solid var(--line); flex: none; }
  .bm-media.is-wide { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .bm { border-radius: 0; }
  .bm-impulse, .bm-stand { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; }
  .pv-dl span { display: none; }
}
