/* ================================
   Punkfish Deco – Base Styles
   ================================ */

/* --- Design Tokens --- */
:root {
  /* Ink & Surfaces */
  --pf-ink: #1a1c22;
  --pf-ink-soft: #4a4f63;
  --pf-bg: #f7f8ff;
  --pf-card: #ffffff;

  /* Brand / Accent */
  --pf-accent: #ffea00;      /* Punkfish-Gelb */
  --pf-accent-ink: #000;

  /* Lines & Elevation */
  --pf-line: rgba(66,45,162,.18);
  --pf-shadow: 0 10px 28px rgba(14,16,40,.08);

  /* Layout */
  --pf-content-width: 1400px;
  --pf-gap: 1.25rem;
  --pf-gap-lg: 2rem;
  --pf-gap-xl: 3rem;
  --pf-radius: 14px;
  --pf-border: 1px solid rgba(0,0,0,.08);
}

/* --- Base Reset / Typography --- */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--pf-bg);
  color: var(--pf-ink);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* A11y helper */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* ================================
   Layout & Sections
   ================================ */

.pf-wrap {
  max-width: var(--pf-content-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

.pf-sec {
  margin-block: var(--pf-gap-xl);
  scroll-margin-top: 100px; /* kompensiert fixen Header beim Ankersprung */
}

/* Headline-Section (Einleitung) */
.pf-head { margin-block: var(--pf-gap-xl); }
.pf-sub { color: var(--pf-ink-soft); max-width: none; } /* nicht schmaler als restlicher Content */

/* Card-Optik (auch für Einleitung nutzbar) */
.pf-card {
  background: var(--pf-card);
  border: var(--pf-border);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

/* Optionaler H2-Akzent */
.pf-card > h2 {
  position: relative;
  padding-bottom: .25rem;
}
.pf-card > h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 3px;
  background: var(--pf-accent);
  border-radius: 2px;
}

/* ================================
   TOC – kleine Inhaltsübersicht
   ================================ */

.pf-toc {
  background: #fff;
  border: var(--pf-border);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  padding: 1rem 1.25rem;
  margin-block: var(--pf-gap-lg);
}
.pf-toc__title {
  font-size: 1.05rem;
  margin: 0 0 .75rem 0;
}
.pf-toc__list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pf-toc__list li { margin: 0; }
.pf-toc a {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 999px;           /* pill look */
  border: 1px solid rgba(0,0,0,.1);
  text-decoration: none;
  background: #f7f7f7;
  color: inherit;
}
.pf-toc a:hover {
  background: #fffce0;
  border-color: rgba(0,0,0,.25);
}
.pf-toc a.active {
  font-weight: 600;
  background: #fff476;
  border-color: rgba(0,0,0,.35);
}

/* ================================
   Buttons & Language
   ================================ */

.pf-btn {
  display: inline-block;
  background: var(--pf-accent);
  color: var(--pf-accent-ink);
  border: none;
  border-radius: 12px;
  padding: .55rem .9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.pf-btn:hover { filter: brightness(1.05); }

.pf-lang {
  background: #fff;
  border: 1px solid var(--pf-line);
  border-radius: 10px;
  padding: .35rem .6rem;
  cursor: pointer;
}
.pf-lang[aria-current="true"] { outline: 2px solid var(--pf-accent); }

/* ================================
   Embeds / iframes
   ================================ */

/* Embeds: außen Luft (oben/unten) */
.pf-embed{
  display: block;
  margin-block: var(--pf-gap-xl, 18px); /* fallback falls Variable fehlt */
}
.pf-embed--wide  { max-width: var(--pf-content-width); margin-inline: auto; }
.pf-embed--narrow{ max-width: 760px; margin-inline: auto; }

/* Sichtbarer Rahmen nur am iframe selbst */
.pf-iframe {
  display: block;
  width: 100%;
  min-height: 540px;
  border: var(--pf-border);
  border-radius: var(--pf-radius);
  box-shadow: var(--pf-shadow);
  background: #fff;
}

/* Quiz-Sektionen außen vollständig neutralisieren */
#dcs-myths,
#dcs-ampel-quiz,
#dcs-myths.pf-embed,
#dcs-ampel-quiz.pf-embed {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-block: var(--pf-gap-xl);
}

/* ================================
   Utilities
   ================================ */

.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 14px 0 24px; }
.pf-block h3 { margin: .1rem 0 .35rem; font-size: 1.15rem; }
.pf-block p { margin: .2rem 0 .6rem; color: var(--pf-ink-soft); }

/* ================================
   Responsive
   ================================ */

@media (max-width: 720px) {
  .pf-iframe { min-height: 620px; }
}


/* Punkfish Video-Embed – Rahmen + Layout */
.pf-video {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 30px auto;
  cursor: pointer;

  /* Rahmen & Form */
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  background: #000;

  /* 16:9 Format */
  aspect-ratio: 16 / 9;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Thumbnail */
.pf-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play-Button */
.pf-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.45);

  background: radial-gradient(circle at 30% 30%, #ffe37a, #f5b500);
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 42px;
  line-height: 1;
  color: #222;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);

  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pf-video:hover .pf-video-play {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  filter: brightness(1.05);
}

/* Hinweistext unten */
.pf-video-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  font-size: 14px;
  text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Wenn das iframe geladen ist, gilt das noch – braucht keine Extra-Styles,
   das <iframe> wird 100% breit/hoch gesetzt */
.pf-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Dekotheorie: Tool-Rahmen breiter machen */
.pf-tool-main .pf-tool-frame {
  max-width: 1280px;      /* oder 1280px, wie du magst */
}

/* Iframe erst zeigen, wenn Höhe gesetzt wurde */
.pf-iframe{
  opacity: 0;
  transition: opacity .15s ease;
}

/* Sobald JS eine Höhe gesetzt hat */
.pf-iframe.is-ready{
  opacity: 1;
}

/* ─────────────────────────────────────────────
   Zweispaltiges Inline-Layout für Infoboxen
   Gilt nur innerhalb der pf-tool-frame
   ───────────────────────────────────────────── */

.pf-tool-frame .pf-inline-wrapper {
  display: flex;
  gap: 2rem;              /* Abstand zwischen Text und Box */
  align-items: flex-start;
  margin: 2rem 0;         /* nur oben/unten, außen bleibt alles wie im Grundlayout */
}

.pf-tool-frame .pf-inline-text {
  flex: 3;                /* breitere Textspalte */
  min-width: 0;           /* verhindert komische Überläufe */
}

.pf-inline-text img.pf-image-full{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
}


.pf-tool-frame .pf-info-box {
  flex: 1;                /* schmalere Infospalte */
  max-width: 320px;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* ── Variante 1: Begriffsdefinition ─────────── */

.pf-tool-frame .pf-info-box.pf-def {
  background: #f0f5ff;
  border-left: 4px solid #3b22a3; /* Punkfish-Lila */
}

.pf-tool-frame .pf-info-box.pf-def h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #3b22a3;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ── Variante 2: Zusatzinfo / False Precision ─ */

.pf-tool-frame .pf-info-box.pf-warning {
  background: #fff7e6;
  border-left: 4px solid #f4c542; /* Punkfish-Gold */
}

.pf-tool-frame .pf-info-box.pf-warning h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #a67c00;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ── Responsive: untereinander auf schmalen Screens ─ */

@media (max-width: 900px) {
  .pf-tool-frame .pf-inline-wrapper {
    flex-direction: column;
  }

  .pf-tool-frame .pf-info-box {
    max-width: 100%;
  }
}


/* ─────────────────────────────────────────────
   Responsive Bildgrößen im Dekotheorie-Kurs
   ───────────────────────────────────────────── */

.pf-tool-frame img {
  display: block;
  max-width: 70%;        /* Desktop: angenehm klein */
  height: auto;
  margin: 1.5rem auto;   /* zentriert; oben/unten schöner Abstand */
  border-radius: 6px;    /* optional, aber sieht sauber aus */
}

/* Mobil: Bild darf den Bildschirm ausfüllen */
@media (max-width: 900px) {
  .pf-tool-frame img {
    max-width: 100%;
    margin: 1rem 0;
  }
}

.pf-image-full {
  width: 100%;
  height: auto;
  display: block;
}

.pf-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 18px 0 26px;
  flex-wrap: wrap;
}

.pf-nav__right{
  display:flex;
  gap:10px;
  align-items:center;
  margin-left:auto;
}

/* Home-Button: andersfarbig */
.pf-btn--home{
  background: var(--pf-accent);
  color: #111;
  border: 1px solid rgba(0,0,0,.12);
}

/* Optional: dezenter Button (für "nach oben") */
.pf-btn--ghost{
  background: transparent;
  border: 1px solid rgba(0,0,0,.18);
}

/* Mobile: bleibt schön, Home oben/links, rechts-Buttons darunter */
@media (max-width: 520px){
  .pf-nav{
    align-items: stretch;
  }
  .pf-nav__right{
    justify-content: flex-end;
    width: 100%;
  }
}

.pf-to-top{
  display: inline-block;

  /* 👉 rechtsbündig */
  margin-left: auto;
  margin-top: 16px;



  /* Button-Look, grau */
  padding: .5rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #f7f7f7;

  font-size: .85rem;
  color: #6b7280;        /* schönes hellgrau */
  text-decoration: none;

  opacity: .9;
}

/* Hover ruhig, nicht CTA-mäßig */
.pf-to-top:hover{
  background: #eeeeee;
  color: #374151;
  opacity: 1;
}

/* Fokus sichtbar, aber dezent */
.pf-to-top:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}

.pf-to-top{
  display: block;
  width: fit-content;
  margin-left: auto;
}

/* Blog-Teaser-Kachel */
.pf-blog-teaser{
  display: block;
  text-decoration: none;
  color: inherit;

  padding: 14px 16px;
  margin: 1.25rem 0;
  border-radius: var(--pf-radius);
  border: var(--pf-border);
  background: #fff;
  box-shadow: var(--pf-shadow);

  transition: transform .12s ease, box-shadow .12s ease;
}

/* Hover: dezent, nicht CTA-schreiend */
.pf-blog-teaser:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Titel */
.pf-blog-teaser__title{
  margin: 0 0 6px;
  font-size: .95rem;
  font-weight: 600;
}

/* Beschreibung */
.pf-blog-teaser__text{
  margin: 0;
  font-size: .85rem;
  color: var(--pf-muted);
}

/* Optional: kleines Icon andeuten „externer Link“ */
.pf-blog-teaser__title::after{
  content: "↗";
  font-size: .8em;
  margin-left: .35em;
  opacity: .6;
}

/* Blog-Teaser-Kachel (Fallback, falls noch nicht vorhanden) */
.pf-blog-teaser{
  display:block;
  text-decoration:none;
}
.pf-blog-teaser__title{ margin:0 0 .25rem 0; }
.pf-blog-teaser__text{ margin:0; opacity:.85; }

/* pf-image-full soll wirklich voll breit sein (überschreibt 70%-Deckel) */
.pf-tool-frame img.pf-image-full{
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}


.pf-info-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 900px){
  .pf-info-grid{
    grid-template-columns: 1fr;
  }
}

.pf-aff-teaser__grid{
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

/* Bild-Link wie Block behandeln */
.pf-aff-teaser__media{
  display: block;
  text-decoration: none;
}

.pf-aff-teaser__media img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--pf-radius) - 4px);
}

/* Text-Spacing */
.pf-aff-teaser__title{ margin: 0 0 .4rem 0; }
.pf-aff-teaser__text{ margin: 0 0 .6rem 0; }
.pf-aff-teaser__note{
  margin: 0 0 .8rem 0;
  font-size: .9em;
  opacity: .75;
}

/* Mobil untereinander */
@media (max-width: 700px){
  .pf-aff-teaser__grid{ grid-template-columns: 1fr; }
  .pf-aff-teaser__media{ max-width: 420px; }
}


.pf-aff-teaser__media img{
  transition: transform .12s ease;
}
.pf-aff-teaser__media:hover img{
  transform: scale(1.02);
}

