/*
 * Pflaster Story CSS v3
 * Zentral geladen durch das Plugin "Pflaster Helper".
 * Gilt nur für einzelne Geschichten: body.single-pflaster_story
 */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --pflaster-blau: #246A99;
  --pflaster-dunkel: #13283b;
  --pflaster-rot: #D71920;
  --pflaster-bg: #F4F7F9;
  --pflaster-text: #1B1B1B;
  --max-weite: 960px;
  --max-pflaster: 400px;
  --seitenrand-mobil: 40px;
  --schrift-text: 18px;
  --zeile-text: 1.55;
  --schrift-kategorie: 18px;
  --schrift-titel-min: 38px;
  --schrift-titel-max: 64px;
}

body.single-pflaster_story {
  font-family: 'Inter', sans-serif;
  color: var(--pflaster-text);
  background: var(--pflaster-bg);
}

body.single-pflaster_story .entry-content {
  max-width: none !important;
}

body.single-pflaster_story .pflaster-story {
  max-width: var(--max-weite) !important;
  width: min(var(--max-weite), calc(100vw - var(--seitenrand-mobil))) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 48px 0 90px !important;
  color: var(--pflaster-text);
}

/* Kategorie */
body.single-pflaster_story .story-kategorie,
body.single-pflaster_story .story-kategorie a {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-rot) !important;
  font-size: var(--schrift-kategorie) !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  text-decoration: underline !important;
}

body.single-pflaster_story .story-kategorie {
  margin: 0 0 20px !important;
}

/* Titel */
body.single-pflaster_story .story-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(var(--schrift-titel-min), 5vw, var(--schrift-titel-max)) !important;
  line-height: 0.95 !important;
  letter-spacing: 0.01em !important;
  color: var(--pflaster-blau) !important;
  margin: 0 0 28px !important;
  text-align: left !important;
}

/* Kurztext */
body.single-pflaster_story .story-kurztext {
  font-family: 'Inter', sans-serif !important;
  font-size: 20px !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  color: var(--pflaster-dunkel) !important;
  margin: 0 0 36px !important;
}

/* Beitragsbild */
body.single-pflaster_story .story-featured-image {
  width: 100% !important;
  max-width: var(--max-weite) !important;
  margin: 0 auto 8px !important;
}

body.single-pflaster_story .story-featured-image img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* Bildnachweis */
body.single-pflaster_story .story-bildnachweis {
  font-family: 'Inter', sans-serif !important;
  text-align: left !important;
  font-size: 12px !important;
  color: var(--pflaster-blau) !important;
  opacity: 0.75 !important;
  margin: 9px 0 34px !important;
}

/* Fließtext */
body.single-pflaster_story .story-bericht {
  font-family: 'Inter', sans-serif !important;
  font-size: var(--schrift-text) !important;
  line-height: var(--zeile-text) !important;
  font-weight: 500 !important;
  color: var(--pflaster-text) !important;
  margin: 0 auto 0 !important;
}

body.single-pflaster_story .story-bericht p {
  margin: 0 0 1.15em !important;
}

/* Mittelzitat und Schlusszitat */
body.single-pflaster_story .story-mittelzitat,
body.single-pflaster_story .story-schlusszitat {
  max-width: var(--max-weite) !important;
  width: 100% !important;
  margin: 40px auto !important;
  padding: 30px 38px !important;
  border: none !important;
  text-align: center !important;
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-blau) !important;
  font-size: clamp(34px, 4vw, 56px) !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  background: transparent !important;
}

body.single-pflaster_story .story-mittelzitat p,
body.single-pflaster_story .story-schlusszitat p {
  margin: 0 !important;
}

body.single-pflaster_story .story-schlusszitat {
  margin-top: 58px !important;
  margin-bottom: 32px !important;
}

/* Pflastergrafik unten */
body.single-pflaster_story .story-pflaster {
  max-width: var(--max-weite) !important;
  width: min(var(--max-weite), calc(100vw - var(--seitenrand-mobil))) !important;
  margin: 0 auto 0 !important;
  overflow: visible !important;
  min-height: 170px;
}

body.single-pflaster_story .story-pflaster img {
  width: var(--max-pflaster) !important;
  max-width: var(--max-pflaster) !important;
  min-width: var(--max-pflaster) !important;
  height: auto !important;
  position: relative !important;
  left: calc(100% - var(--max-pflaster) + 20px) !important;
  top: -90px !important;
  transform: rotate(-12deg) !important;
  z-index: 10 !important;
  display: block !important;
}

@media (min-width: 768px) and (max-width: 900px) {
  body.single-pflaster_story .story-title {
    transform: translateX(-20px) !important;
  }

  body.single-pflaster_story .story-pflaster img {
    left: calc(100% - 350px) !important;
    width: 350px !important;
    max-width: 350px !important;
    min-width: 350px !important;
  }
}

@media (max-width: 767px) {
  :root {
    --seitenrand-mobil: 32px;
    --schrift-text: 16px;
    --zeile-text: 1.45;
    --max-pflaster: 260px;
  }

  body.single-pflaster_story .pflaster-story {
    padding: 34px 0 70px !important;
  }

  body.single-pflaster_story .story-title {
    transform: none !important;
  }

  body.single-pflaster_story .story-mittelzitat,
  body.single-pflaster_story .story-schlusszitat {
    padding: 24px 0 !important;
    margin: 32px auto !important;
  }

  body.single-pflaster_story .story-pflaster {
    min-height: 120px;
  }

  body.single-pflaster_story .story-pflaster img {
    width: var(--max-pflaster) !important;
    max-width: var(--max-pflaster) !important;
    min-width: 0 !important;
    left: calc(100% - var(--max-pflaster)) !important;
    top: -55px !important;
    transform: rotate(-10deg) !important;
  }
}


/* =========================================================
   PFLASTER – Landingpage / Story-Kacheln
   Shortcodes: [pflaster_story_landing], [pflaster_story_grid]
   ========================================================= */

.pflaster-landing {
  max-width: 1180px;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 56px 0 90px;
}

.pflaster-landing-hero {
  margin-bottom: 54px;
}

.pflaster-landing-hero h1 {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-blau) !important;
  font-size: clamp(48px, 7vw, 96px) !important;
  line-height: 0.92 !important;
  margin: 0 0 20px !important;
  max-width: 900px;
}

.pflaster-landing-subtitle {
  font-size: clamp(22px, 3vw, 34px) !important;
  line-height: 1.18 !important;
  font-weight: 800 !important;
  color: var(--pflaster-dunkel) !important;
  max-width: 900px;
  margin: 0 0 18px !important;
}

.pflaster-landing-intro {
  font-size: 19px !important;
  line-height: 1.55 !important;
  max-width: 760px;
  margin: 0 !important;
  color: var(--pflaster-text) !important;
}

.pflaster-landing-section-title {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-rot) !important;
  font-size: 26px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 22px;
}

.pflaster-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.pflaster-story-card {
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(19, 40, 59, 0.10);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.pflaster-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  background: #dce5eb;
  overflow: hidden;
}

.pflaster-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.pflaster-story-card:hover .pflaster-card-image img {
  transform: scale(1.035);
}

.pflaster-card-body {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pflaster-card-category,
.pflaster-card-category a {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-rot) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: underline !important;
}

.pflaster-card-pflaster {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-dunkel) !important;
  font-size: 18px !important;
  line-height: 1 !important;
  letter-spacing: .03em;
  margin-top: 10px;
}

.pflaster-card-title {
  margin: 16px 0 12px !important;
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(30px, 3vw, 42px) !important;
  line-height: .98 !important;
  color: var(--pflaster-blau) !important;
}

.pflaster-card-title a {
  color: inherit !important;
  text-decoration: none !important;
}

.pflaster-card-excerpt {
  font-size: 16px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  color: var(--pflaster-text) !important;
  margin: 0 0 22px !important;
}

.pflaster-card-button {
  margin-top: auto;
  display: inline-block;
  align-self: flex-start;
  background: var(--pflaster-rot);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
}

.pflaster-card-button:hover {
  background: var(--pflaster-blau);
}

.pflaster-grid-empty {
  font-size: 18px;
  font-weight: 600;
}

@media (max-width: 1024px) {
  .pflaster-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .pflaster-landing {
    width: min(100% - 32px, 1180px);
    padding-top: 38px;
  }

  .pflaster-story-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pflaster-card-body {
    padding: 22px 20px 24px;
  }
}


/* =========================
   LANDINGPAGE – gruppierte Story-Kacheln
========================= */
.pflaster-grouped-landing {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 56px 0 90px;
}

.pflaster-landing-title {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-blau) !important;
  font-size: clamp(46px, 6vw, 86px) !important;
  line-height: .95 !important;
  margin: 0 0 44px !important;
  letter-spacing: .01em;
}

.pflaster-category-section {
  margin: 0 0 56px;
}

.pflaster-group-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(28px, 3.2vw, 46px) !important;
  line-height: 1 !important;
  letter-spacing: .03em;
  color: var(--pflaster-rot) !important;
  text-transform: uppercase;
  margin: 0 0 22px !important;
}

.pflaster-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.pflaster-overlay-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 420px;
  background: #111;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 14px 34px rgba(19, 40, 59, .12);
  transition: transform .22s ease, box-shadow .22s ease;
}

.pflaster-overlay-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(19, 40, 59, .18);
}

.pflaster-overlay-card img,
.pflaster-card-placeholder {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  filter: grayscale(8%) brightness(.96) contrast(1.04) saturate(.92);
  transform: scale(1.01);
  transition: transform .28s ease, filter .28s ease;
}

.pflaster-overlay-card:hover img {
  transform: scale(1.055);
  filter: grayscale(5%) brightness(1.02) contrast(1.08) saturate(.96);
}

.pflaster-card-placeholder {
  background: linear-gradient(135deg, #1d3448, #0f1e2b);
}

.pflaster-overlay-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.58) 42%, rgba(0,0,0,.18) 100%), linear-gradient(180deg, rgba(0,0,0,.56) 0%, rgba(0,0,0,.30) 48%, rgba(0,0,0,.08) 100%);
  z-index: 1;
}

.pflaster-overlay-card .content {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  bottom: auto;
  z-index: 2;
}

.pflaster-overlay-card .cat {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-rot) !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 18px;
  line-height: 1;
  margin-bottom: 10px;
  text-decoration: underline;
  text-shadow: 0 3px 12px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.95);
}

.pflaster-overlay-card h3 {
  font-family: 'Bebas Neue', sans-serif !important;
  color: #fff !important;
  text-shadow: 0 3px 12px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.95) !important;
  font-size: clamp(34px, 3.4vw, 52px) !important;
  line-height: .95 !important;
  letter-spacing: .01em;
  margin: 0 0 14px !important;
}

.pflaster-overlay-card p {
  color: #fff !important;
  text-shadow: 0 3px 12px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.95) !important;
  font-size: 16px !important;
  line-height: 1.38 !important;
  font-weight: 600 !important;
  margin: 0 !important;
}



/* Fertige Geschichtskachel aus Pflaster Social OG: kein Overlay, kein Zusatztext, keine Abdunklung */
.pflaster-overlay-card.pflaster-generated-card {
  min-height: 0 !important;
  background: transparent !important;
  aspect-ratio: 1 / 1 !important;
}

.pflaster-overlay-card.pflaster-generated-card img.pflaster-generated-card-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
  filter: none !important;
  transform: none !important;
}

.pflaster-overlay-card.pflaster-generated-card:hover img.pflaster-generated-card-img {
  transform: none !important;
  filter: none !important;
}

@media (max-width: 1040px) {
  .pflaster-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .pflaster-grouped-landing {
    width: min(100% - 28px, 1180px);
    padding: 34px 0 60px;
  }
  .pflaster-group-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pflaster-overlay-card,
  .pflaster-overlay-card img,
  .pflaster-card-placeholder {
    min-height: 360px;
    height: 360px;
  }
  .pflaster-overlay-card .content {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
}

/* Landingpage: normalen Seitentitel ausblenden, wenn der Pflaster-Landing-Shortcode verwendet wird */
body.pflaster-landing-page .entry-header,
body.pflaster-landing-page .hero-section,
body.pflaster-landing-page .page-title,
body.pflaster-landing-page .entry-title {
  display: none !important;
}


/* =========================
   LANDINGPAGE FIX v10
   Lesbarer Verlauf hinter Text bei allen Bildern
========================= */
body:has(.pflaster-grouped-landing) .entry-header,
body:has(.pflaster-grouped-landing) .hero-section,
body:has(.pflaster-grouped-landing) .page-title,
body:has(.pflaster-grouped-landing) .entry-title,
body.pflaster-landing-page .entry-header,
body.pflaster-landing-page .hero-section,
body.pflaster-landing-page .page-title,
body.pflaster-landing-page .entry-title {
  display: none !important;
}

.pflaster-grouped-landing .pflaster-overlay-card > .content {
  top: 24px !important;
  bottom: auto !important;
  left: 24px !important;
  right: 24px !important;
  transform: none !important;
  display: block !important;
  text-align: left !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}

.pflaster-grouped-landing .pflaster-overlay-card > .overlay {
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.58) 42%, rgba(0,0,0,.18) 100%), linear-gradient(180deg, rgba(0,0,0,.56) 0%, rgba(0,0,0,.30) 48%, rgba(0,0,0,.08) 100%) !important;
}

.pflaster-grouped-landing .pflaster-overlay-card h3 {
  margin-top: 0 !important;
}


/* =========================
   LANDINGPAGE FIX v10 FINAL
   Stabile Lesbarkeit auf hellen und dunklen Fotos
========================= */
.pflaster-grouped-landing .pflaster-overlay-card img {
  filter: grayscale(8%) brightness(.96) contrast(1.04) saturate(.92) !important;
}
.pflaster-grouped-landing .pflaster-overlay-card > .overlay {
  background:
    linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.58) 42%, rgba(0,0,0,.18) 100%),
    linear-gradient(180deg, rgba(0,0,0,.56) 0%, rgba(0,0,0,.30) 48%, rgba(0,0,0,.08) 100%) !important;
}
.pflaster-grouped-landing .pflaster-overlay-card .cat,
.pflaster-grouped-landing .pflaster-overlay-card h3,
.pflaster-grouped-landing .pflaster-overlay-card p {
  text-shadow: 0 3px 12px rgba(0,0,0,.85), 0 1px 2px rgba(0,0,0,.95) !important;
}
.pflaster-grouped-landing .pflaster-overlay-card h3,
.pflaster-grouped-landing .pflaster-overlay-card p {
  color: #fff !important;
}

/* =========================
   LANDINGPAGE v13 – kompaktes Kategorien-Raster
========================= */
.pflaster-category-landing {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 54px 0 90px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.pflaster-category-landing .pflaster-landing-title {
  grid-column: 1 / -1;
  margin: 0 0 18px !important;
}

.pflaster-category-card {
  display: block;
  position: relative;
  text-decoration: none !important;
  color: inherit !important;
  min-height: 320px;
  background: #fff;
  border: 1px solid rgba(36, 106, 153, .10);
  box-shadow: 0 20px 44px rgba(19, 40, 59, .08);
  overflow: hidden;
  padding: 26px 24px 22px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.pflaster-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 58px rgba(19, 40, 59, .14);
  border-color: rgba(215, 25, 32, .28);
}

.pflaster-category-card-inner {
  position: relative;
  min-height: 272px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}

.pflaster-category-copy {
  position: relative;
  z-index: 2;
  order: 1;
}

.pflaster-category-copy h2 {
  font-family: 'Bebas Neue', sans-serif !important;
  color: var(--pflaster-blau) !important;
  font-size: clamp(36px, 3.2vw, 58px) !important;
  line-height: .92 !important;
  letter-spacing: .01em;
  margin: 0 0 10px !important;
  text-transform: uppercase;
}

.pflaster-category-copy p {
  font-family: 'Inter', sans-serif !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
  color: var(--pflaster-rot) !important;
  margin: 0 !important;
}

.pflaster-category-image {
  order: 2;
  width: min(92%, 330px);
  max-width: 330px;
  height: auto;
  align-self: center;
  margin: 26px auto 0;
  transform: rotate(var(--rot));
  filter: drop-shadow(0 16px 24px rgba(19, 40, 59, .18));
  transition: transform .22s ease, filter .22s ease;
}

.pflaster-category-card:hover .pflaster-category-image {
  transform: rotate(var(--rot)) translateY(-5px) scale(1.035);
  filter: drop-shadow(0 22px 32px rgba(19, 40, 59, .25));
}

.pflaster-category-image-placeholder {
  order: 2;
  display: block;
  height: 110px;
}

.pflaster-cat-pos-2 .pflaster-category-image { margin-left: 4px; }
.pflaster-cat-pos-3 .pflaster-category-image { margin-right: 8px; }
.pflaster-cat-pos-4 .pflaster-category-image { margin-left: 12px; }

.pflaster-back-link {
  display: inline-block;
  grid-column: 1 / -1;
  margin: 0 0 6px;
  font-weight: 800;
  color: var(--pflaster-rot) !important;
  text-decoration: underline !important;
}

.pflaster-category-landing > .pflaster-group-grid {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .pflaster-category-landing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pflaster-category-landing {
    width: min(100% - 28px, 1180px);
    padding: 36px 0 64px;
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .pflaster-category-card {
    min-height: 280px;
    padding: 24px 22px 20px;
  }
  .pflaster-category-card-inner {
    min-height: 238px;
  }
  .pflaster-category-copy h2 {
    font-size: clamp(40px, 13vw, 62px) !important;
  }
  .pflaster-category-image {
    width: min(310px, 88%);
  }
}
