/* Medienbiber – styles (mobile rework v5) */
:root{
  /* Breite der weichen Ausblendung an den Seiten */
  --edge-fade-size: 48px; /* gern 24–64px testen */
  --active-mix: 25%;
}

@media (max-width: 1200px){ 
:root{
  /* Breite der weichen Ausblendung an den Seiten */
  --edge-fade-size: 24px; /* gern 24–64px testen */
}
}

/* ====== Lokale Fonts ====== */
@font-face{
  font-family:"Baloo2";
  src:url("../fonts/Baloo2-ExtraBold.ttf") format("truetype");
  font-weight:800;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"Nunito Sans";
  src:url("../fonts/NunitoSans-VariableFont.ttf") format("truetype");
  font-weight:200 900; /* Variable Font */
  font-style:normal;
  font-display:swap;
}

/* ====== Reset / Basis ====== */
*,*::before,*::after{ box-sizing:border-box; }
html{ font-size:18px;
overflow-y: auto;
  scrollbar-gutter: stable both-edges; }
  @supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll; /* zeigt die vertikale Leiste immer – ebenfalls ohne Layout-Sprung */
  }
}
body{
  margin:0;
  font-family:"Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
               "Segoe UI Emoji", sans-serif !important;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  background:#fffdf7;
  color:#0f172a;
  line-height:1.35;
}

img:not(.no-zoom) {
  cursor: zoom-in;
}
.wrap{ max-width:1100px; margin:0 auto; padding:0 1rem; }


h1,h2,h3{
  font-family:"Baloo2","Nunito Sans",system-ui,sans-serif;
  font-weight:800; letter-spacing:.2px; color:#0f172a;
  margin:.2rem 0 .6rem;
}

/* ====== Header / Branding ====== */
.site-header{ background:#fff; border-top:8px solid #ff6a00; }
.brand{ display:flex; align-items:center; gap:1rem; padding:1.5rem 1rem; }
.brand-logo{ height:auto; border-radius:14px; box-shadow:none; }
.brand-text h1{ margin:0; color:#ff6a00; text-transform:uppercase; font-weight:800; font-size: calc(14px + 2.5vw); line-height: 0.9;}
.brand-text p{ margin:.15rem 0 0; font-weight:800; color:#163457; }

/* ====== Hauptnavigation – Pills (Desktop) ====== */
.primary-nav ul{
  display:flex; flex-wrap:wrap; gap:.75rem;
  list-style:none; margin:0; padding:0 0 1rem;
}
.primary-nav a,
.primary-nav .pill{
  display:inline-flex; align-items:center;
  gap:.5rem;
  text-decoration:none; color:#1b2a4a; background:#fff;
  padding:.75rem .5rem; border-radius:999px; font-weight:800;
  border:3px solid rgba(0,0,0,.06);
  box-shadow:0 3px 0 rgba(0,0,0,.12);
  transform:translateY(0);
  transition:transform .08s ease, box-shadow .08s ease, background .2s ease;
}
.primary-nav a:hover,
.primary-nav .pill:hover{
  transform:translateY(-5px);
  box-shadow:0 6px 0 rgba(0,0,0,.12);
}
.primary-nav a[aria-current="page"],
.primary-nav .pill[aria-current="page"]{
  background: linear-gradient(180deg,#fff,#f7f7ff);
  border-color: var(--ring);
}
@supports (color: color-mix(in srgb, white 25%, black)) {
  .primary-nav .pill[aria-current="page"]{
    background: color-mix(in srgb, var(--ring) var(--active-mix), white);
  }
}

@supports (background: rgb(from red r g b / 25%)) {
  .primary-nav .pill[aria-current="page"]{
    background: rgb(from var(--ring) r g b / 25%);
  }
}

.primary-nav .pill[aria-current="page"]:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0,0,0,.12);
}

.primary-nav .pill-icon .icon{ width:1.25em; height:1.25em; }

/* Farbe nur aus Konfiguration/Frontmatter */
.primary-nav a{ border-color:var(--ring) !important; }

/* ====== Subnavigation ====== */
.sub-nav{ background:#fff6c7; border-top:1px solid #ffe36b; border-bottom:1px solid #ffe36b; }
.sub-nav .wrap{ padding-left:1rem; padding-right:1rem; }
.sub-nav ul{
  display:flex; flex-wrap:wrap; gap:.55rem;
  list-style:none; margin:0; padding:.7rem 0;
}
.sub-nav a{
  display:inline-block; background:#fff; color:#1b2a4a; text-decoration:none;
  padding:.48rem .9rem; border-radius:14px; border:2px dashed #ffd200; font-weight:800;
}
.sub-nav a[aria-current="page"]{ background:#1b2a4a; color:#fff; border-color:#1b2a4a; }
.sub-nav.is-sticky{ position:sticky; top:0; z-index:50; }
/* Toggle standardmäßig (Desktop) verstecken – harte Vorgabe */
.subnav-toggle{ display:none !important; }

/* ====== Cards / Grid / Buttons ====== */
.content .card{
  background:#fff; border:2px solid #ffefcc; border-radius:16px;
  padding:1rem 1.25rem; box-shadow:0 10px 0 rgba(0,0,0,.06); margin:1rem 0;
}
.card-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  gap:1rem 1.2rem; margin-top:.5rem;
}
.card-grid .card{ margin:0; min-height:160px; display:flex; flex-direction:column; justify-content:space-between; }
.card h3{ display:flex; align-items:center; gap:.6rem; margin:0 0 .25rem; }
.card h3 .icon{ width:1.35em; height:1.35em; color:#0e2347; }

.button{
  display:inline-block; background:#0f172a; color:#fff; text-decoration:none; font-weight:800;
  padding:.55rem .9rem; border-radius:12px; box-shadow:0 4px 0 rgba(0,0,0,.17);
  transition:transform .08s ease;
}
.button:hover{ transform:translateY(-1px); }
.button:focus-visible{ outline:3px solid #1a66ff; outline-offset:2px; }

/* ====== Footer ====== */
.site-footer{ color:#4b5563; font-size:.95rem; padding:2rem 0; }
.site-footer .footer-links{
  display:flex; flex-wrap:wrap; gap:.6rem 1rem;
  padding:0; margin:.5rem 0 0; list-style:none;
}

/* ====== Icons/States ====== */
.icon{ width:1.1em; height:1.1em; vertical-align:-.125em; }
#content.is-loading{ opacity:.6; transition:opacity .15s ease; }

/* ====== Lightbox ====== */
.lb-overlay{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.8);
  opacity:0; visibility:hidden; pointer-events:none;
  z-index:1000;
  transition:opacity .15s ease, visibility .15s ease;
}
.lb-overlay.open{ opacity:1; visibility:visible; pointer-events:auto; }
.lb-overlay .lb-image{
  max-width:min(92vw,1100px);
  max-height:90vh;
  border-radius:12px; background:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.lb-overlay .lb-close{
  position:absolute; top:12px; right:12px;
  background:#0f172a; color:#fff; border:0; border-radius:999px;
  font-size:28px; line-height:1; width:44px; height:44px; cursor:pointer;
  box-shadow:0 3px 0 rgba(0,0,0,.2);
}

/* Bild zentrieren + max. Breite */
.prose img.img-center { 
  display:block; 
  margin:.25rem auto 1rem; 
  max-width:520px; 
  height:auto; 
}

/* Text unter dem Bild zentrieren */
.prose .center-text { 
  text-align:center; 
}


/* Page Title */
.page-title { margin: .2rem 0 .6rem; }
.kicker {
  font: 800 .9rem/1.2 "Nunito Sans", system-ui, sans-serif;
  color: #6b7280; /* grau */
  text-transform: none;
  letter-spacing: .2px;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }


/* ====== Responsive – Mobile Navigation im Internet-ABC-Stil ====== */
@media (max-width: 768px){
	
  .brand{ align-items:flex-start; gap:.6rem; }
  .brand-logo{ width:76px; }
  .brand-text h1{ font-size:1.6rem; }
  .brand-text p{ font-size:1rem; }

  /* Hauptnav: einspaltige „Riegel“, kompakter */
  .primary-nav .wrap{ overflow:visible; }
  .primary-nav ul{
    display:flex; flex-direction:column; gap:.55rem;
  }
  .primary-nav li{ margin:0; }

  .primary-nav a, .primary-nav .pill {
    width:100%;
    justify-content:flex-start;
    white-space:normal; text-align:left;
    padding:.25rem .3rem;                 /* kompakter */
    border-width:2px !important;          /* dünnerer Ring */
    box-shadow:0 2px 0 rgba(0,0,0,.12);   /* flacher Schatten */
    font-size:1.05rem;
    background:linear-gradient(180deg, #ffffff, #fdfdfd);
  }
  /* linke Icon-Bubble – an Internet-ABC angelehnt */
  .primary-nav .pill-icon{
    width:2.2rem; height:2.2rem; min-width:2.2rem;
	margin-left: 2px;
    border-radius:999px;
    border:2px solid var(--ring);
    display:inline-flex; align-items:center; justify-content:center;
    box-shadow:0 2px 0 rgba(0,0,0,.12);
    background:#fff;
  }
  .primary-nav .pill-icon .icon{ width:1.1em; height:1.1em; }

  /* Hover/active mobil dezenter */
  .primary-nav a:hover{ transform:none; box-shadow:0 3px 0 rgba(0,0,0,.12); }
  .primary-nav a[aria-current="page"]{ background:linear-gradient(180deg, #fff, #f7f7ff); }

  /* Subnav mobil einklappbar + zum Stil passend */
  .sub-nav.is-collapsible .subnav-toggle{
    display:inline-flex !important;
    align-items:center; justify-content:center;
    margin:.6rem .25rem; padding:.45rem .75rem;
    background:#fff; color:#1b2a4a; border:2px dashed #ffd200; border-radius:14px;
    font-weight:800; font-size:.95rem;
    box-shadow:0 2px 0 rgba(0,0,0,.12);
  }
  .sub-nav.is-collapsible .subnav-toggle[aria-expanded="true"]{
    background:#1b2a4a; color:#fff; border-color:#1b2a4a;
  }
  .sub-nav.is-collapsible ul{ display:none; }
  .sub-nav.is-collapsible.open ul{ display:flex; }

  /* Karten einspaltig */
  .card-grid{ grid-template-columns:1fr; }
}

@media (max-width: 380px){
  .primary-nav a{ font-size:1rem; padding:.65rem .8rem; }
  .primary-nav .pill-icon{ width:2rem; height:2rem; min-width:2rem; }
}


/* ============================
   Kanten weich ausfaden
   ============================ */


/* Modern: mask-image (inkl. -webkit- für Safari/Chromium) */
@supports ((mask-image: linear-gradient(#000,#000)) or (-webkit-mask-image: linear-gradient(#000,#000))) {
  .site-header,
  .sub-nav,
  .site-footer{
    -webkit-mask-image: linear-gradient(to right,
      transparent 0,
      #000 var(--edge-fade-size),
      #000 calc(100% - var(--edge-fade-size)),
      transparent 100%);
            mask-image: linear-gradient(to right,
      transparent 0,
      #000 var(--edge-fade-size),
      #000 calc(100% - var(--edge-fade-size)),
      transparent 100%);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
  }
}

/* Fallback: Overlay-Gradients, die zu --bg ausblenden */
@supports not ((mask-image: linear-gradient(#000,#000)) or (-webkit-mask-image: linear-gradient(#000,#000))) {
  .site-header,
  .sub-nav,
  .site-footer{
    position: relative;
  }
  .site-header::after,
  .sub-nav::after,
  .site-footer::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    /* Links und rechts je ein schmaler Verlauf ins Seiten-Background */
    background:
      linear-gradient(to right, var(--bg), transparent) 0 0 / var(--edge-fade-size) 100% no-repeat,
      linear-gradient(to left,  var(--bg), transparent) 100% 0 / var(--edge-fade-size) 100% no-repeat;
    z-index: 1; /* über der orangen Linie, aber ohne Klicks zu blockieren */
  }
}

/* Sicherheit: Inhalt innerhalb des Headers/Subnav bleibt über der Top-Linie */
.site-header > *, .sub-nav > * { position: relative; z-index: 2; }
