/* ============================================================
   PNEUMOLOGIE – echtes Tablet- und Mobil-Layout
   ------------------------------------------------------------
   „Wann sollten Sie einen Pneumologen aufsuchen?" (.wsp2) und
   „Unsere Diagnostik" (.dg2) waren feste Grafikplatten:
   Hintergrundbild mit Seitenverhältnis, alle Texte absolut in
   calc(var(--u)*N). Unter 1200 px wurde alles mitskaliert –
   winzige Schrift, Text über dem Foto, Karten übereinander.

   Ab hier: Foto als eigenes <img>, Überschrift, Einleitung und
   Karten in eigenen Containern, echtes Grid, automatische Höhen.
   Kein zoom, kein transform:scale(), keine negativen Ränder,
   keine festen Desktop-Breiten.

   ≥1200 px  Desktop – unverändert
   768–1199  Tablet, Innenabstand 24–32 px, zwei Spalten
   ≤767      Mobil, Innenabstand 16–20 px, eine Spalte
   ============================================================ */

/* ============================================================
   1 · DESKTOP UNVERÄNDERT
   ============================================================ */
.rw-photo{display:none;}
@media (min-width:1200px){
  .dg2 .rw-card{display:contents;position:static;}
  .dg2 .rw-card > *{position:absolute;margin:0;}
}

/* ============================================================
   2 · TABLET UND MOBIL – Platte auflösen
   ============================================================ */
@media (max-width:1199.98px){

  .wsp2-wrap, .dg2-wrap{
    width:100% !important;
    position:static !important;
    left:auto !important;transform:none !important;
    overflow:hidden;
  }
  html body .wsp2,
  html body .dg2{
    position:relative;
    width:100% !important;max-width:100%;
    height:auto !important;min-height:0 !important;
    aspect-ratio:auto !important;
    background-image:none !important;
    overflow:visible;
    --u:1px;                     /* Design-Pixel statt Bruchteile */
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:clamp(14px,2vw,20px);
    box-sizing:border-box;
    padding:clamp(30px,4vw,48px) 28px clamp(34px,4.4vw,54px);
  }
  html body .wsp2{background-color:#F7F5EF;}
  html body .dg2{background-color:#FAF8F2;}

  html body .wsp2 > *,
  html body .dg2 > *{
    position:static !important;
    left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;
    transform:none !important;
    width:auto !important;max-width:100%;
    height:auto !important;
    white-space:normal !important;
    margin:0;
  }

  /* ---- Fotos als echte, flüssige Bilder ---- */
  .wsp2 .rw-photo,
  .dg2 .rw-photo{
    display:block;
    width:100%;max-width:100%;height:auto;
    aspect-ratio:16 / 8;
    object-fit:cover;
    border-radius:clamp(14px,1.8vw,22px);
    grid-column:1 / -1;
  }
  .wsp2 .rw-photo{object-position:center 55%;margin-bottom:clamp(6px,1.2vw,14px);}
  .dg2 .rw-photo{object-position:center 50%;margin-top:clamp(10px,1.8vw,20px);}

  /* ---- Überschriften und Einleitung: volle Breite ---- */
  html body .wsp2 .wsp2-title,
  html body .dg2 .dg2-title{
    grid-column:1 / -1;
    font-size:clamp(28px,4.4vw,46px) !important;
    line-height:1.16 !important;
  }
  html body .wsp2 .wsp2-sub{
    grid-column:1 / -1;
    font-size:clamp(17px,2.2vw,22px) !important;line-height:1.4 !important;
    margin-top:clamp(8px,1.2vw,14px);
  }
  html body .dg2 .dg2-eyebrow{
    grid-column:1 / -1;
    font-size:15px !important;letter-spacing:3px !important;
    margin-bottom:clamp(6px,1vw,12px);
  }
  html body .wsp2 .wsp2-lead,
  html body .dg2 .dg2-lead{
    grid-column:1 / -1;
    font-size:16px !important;line-height:1.75 !important;
    margin:clamp(10px,1.6vw,18px) 0 clamp(6px,1.2vw,14px);
    max-width:70ch;
  }
  html body .wsp2 .wsp2-lead br,
  html body .dg2 .dg2-lead br,
  html body .wsp2 .wsp2-d br,
  html body .dg2 .dg2-d br{display:none;}

  /* ============================================================
     WARNSIGNALE – Karten mit Icon, Titel, Beschreibung
     ============================================================ */
  html body .wsp2 a.wsp2-card{
    position:static !important;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    column-gap:16px;row-gap:4px;
    width:auto !important;height:auto !important;
    min-width:0;
    padding:clamp(15px,2vw,20px) clamp(14px,1.8vw,20px);
    background:#FCFBF7;
    border:1px solid rgba(120,140,120,.18);
    border-radius:clamp(14px,1.6vw,18px);
    box-shadow:0 10px 26px -20px rgba(52,67,58,.40);
    transform:none !important;
  }
  html body .wsp2 a.wsp2-card:hover{
    transform:none !important;
    box-shadow:0 14px 30px -20px rgba(52,67,58,.55);
  }
  /* Icon aus der ehemaligen Grafik – jetzt echtes Bild */
  html body .wsp2 a.wsp2-card::before{
    content:"";
    grid-row:1 / span 2;grid-column:1;
    width:clamp(48px,6.4vw,60px);height:clamp(48px,6.4vw,60px);
    border-radius:50%;
    background-repeat:no-repeat;background-position:center;background-size:100% 100%;
  }
  .wsp2 .wcard-1::before{background-image:url("../img/wsp2-ico-husten.webp");}
  .wsp2 .wcard-2::before{background-image:url("../img/wsp2-ico-atemnot.webp");}
  .wsp2 .wcard-3::before{background-image:url("../img/wsp2-ico-pfeifen.webp");}
  .wsp2 .wcard-4::before{background-image:url("../img/wsp2-ico-schmerz.webp");}
  .wsp2 .wcard-5::before{background-image:url("../img/wsp2-ico-infekt.webp");}
  .wsp2 .wcard-6::before{background-image:url("../img/wsp2-ico-belastung.webp");}
  html body .wsp2 .wsp2-card .wsp2-t,
  html body .wsp2 .wsp2-card .wsp2-d{
    position:static !important;
    left:auto !important;top:auto !important;transform:none !important;
    grid-column:2;white-space:normal !important;
  }
  html body .wsp2 .wsp2-card .wsp2-t{
    font-size:clamp(19px,2.3vw,23px) !important;line-height:1.25 !important;
  }
  html body .wsp2 .wsp2-card .wsp2-d{
    font-size:clamp(15px,1.55vw,17px) !important;line-height:1.55 !important;
  }
  html body .wsp2 .wsp2-card:hover .wsp2-t,
  html body .wsp2 .wsp2-card:hover .wsp2-d{transform:none !important;}

  /* ============================================================
     UNSERE DIAGNOSTIK – Nummer, Icon, Titel, Beschreibung
     ============================================================ */
  html body .dg2 .rw-card{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:auto auto auto;
    align-items:start;
    column-gap:16px;row-gap:2px;
    height:auto;min-width:0;
    padding:clamp(15px,2vw,20px) clamp(14px,1.8vw,20px);
    background:#FCFBF7;
    border:1px solid rgba(120,140,120,.18);
    border-radius:clamp(14px,1.6vw,18px);
    box-shadow:0 10px 26px -20px rgba(52,67,58,.40);
  }
  html body .dg2 .rw-card::before{
    content:"";
    grid-row:1 / span 3;grid-column:1;
    align-self:center;
    width:clamp(46px,6vw,58px);height:clamp(46px,6vw,58px);
    border-radius:50%;
    background-repeat:no-repeat;background-position:center;background-size:100% 100%;
  }
  .dg2 .rw-dg1::before{background-image:url("../img/dg2-ico-spiro.webp");}
  .dg2 .rw-dg2::before{background-image:url("../img/dg2-ico-body.webp");}
  .dg2 .rw-dg3::before{background-image:url("../img/dg2-ico-dlco.webp");}
  .dg2 .rw-dg4::before{background-image:url("../img/dg2-ico-feno.webp");}
  .dg2 .rw-dg5::before{background-image:url("../img/dg2-ico-diagnose.webp");}
  .dg2 .rw-dg6::before{background-image:url("../img/dg2-ico-therapie.webp");}
  html body .dg2 .rw-card > *{
    position:static !important;
    left:auto !important;top:auto !important;transform:none !important;
    grid-column:2;white-space:normal !important;
    width:auto !important;max-width:100%;
  }
  html body .dg2 .rw-card .dg2-n{
    grid-row:1;
    font-size:14px !important;letter-spacing:1.6px !important;
  }
  html body .dg2 .rw-card .dg2-t{
    grid-row:2;
    font-size:clamp(19px,2.3vw,23px) !important;line-height:1.25 !important;
  }
  html body .dg2 .rw-card .dg2-d{
    grid-row:3;
    font-size:clamp(15px,1.55vw,17px) !important;line-height:1.55 !important;
    margin-top:3px;
  }

  /* ============================================================
     HERO – Vorteile lesbar halten
     ============================================================ */
  html body.pneumologie-page .pnh .pnh-f{font-size:15px !important;}
  html body.pneumologie-page .pnh .pnh-feats{width:min(100%,320px) !important;}
  /* Unterlänge des „g" braucht etwas mehr Zeilenhöhe */
  html body.pneumologie-page .pnh .pnh-title{line-height:1.14 !important;}
  /* Eyebrow über den Schwerpunkten lesbar halten */
  html body .schwerpunkte .sw-eyebrow{font-size:13px !important;letter-spacing:2.6px !important;}
  /* Rechtliche Links im Fußbereich – nur auf dieser Seite */
  html body.pneumologie-page .kfr-bottom a{font-size:15px !important;}
}

/* ============================================================
   3 · TABLET 768–1199 – Innenabstand 24–32 px
   ============================================================ */
@media (min-width:768px) and (max-width:1199.98px){
  html body .wsp2,
  html body .dg2{padding-left:32px;padding-right:32px;}
}

/* ============================================================
   4 · MOBIL ≤767 – Innenabstand 16–20 px, eine Spalte
   ============================================================ */
@media (max-width:767.98px){
  html body .wsp2,
  html body .dg2{
    grid-template-columns:minmax(0,1fr);
    padding-left:18px;padding-right:18px;
    padding-top:clamp(26px,6vw,34px);padding-bottom:clamp(30px,7vw,40px);
  }
  .wsp2 .rw-photo,
  .dg2 .rw-photo{aspect-ratio:16 / 10;}
  /* Vorteile im Hero: lesbare Schrift, etwas mehr Raum */
  html body.pneumologie-page .pnh .pnh-feats{width:min(100%,340px) !important;}
  html body.pneumologie-page .pnh .pnh-f{font-size:15px !important;}
  html body.pneumologie-page .pnh .pnh-f img{width:40px !important;height:40px !important;}
}

@media (max-width:379.98px){
  html body .wsp2,
  html body .dg2{padding-left:16px;padding-right:16px;}
  html body.pneumologie-page .pnh .pnh-feats{width:min(100%,320px) !important;}
}
