/* Pfarreiengemeinschaft Dießen – Grundgestaltung
   Farben aus dem Logo: Blau als Aktionsfarbe, Goldocker als Akzent, Nachtblau als ruhige Fläche. */

@font-face {
  font-family: "Jost";
  src: url("../Fonts/jost-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../Fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --blue: #1f4fd1;
  --blue-dark: #183fa8;
  --ink: #16233f;
  --text: #1e2433;
  --muted: #4a5266;
  --gold: #b08a4a;
  --gold-text: #7a5e2c;
  --gold-light: #d9bc85;
  --stone: #f6f4ef;
  --line: #e4e1d8;
  --line-strong: #c9c4b6;
  --white: #ffffff;
  --footer-text: #c9cfdd;
  --radius: 6px;
  --wrap: 1320px;
  --font-head: "Jost", "Futura", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); margin: 2rem 0 0.75rem; }
h3 { font-size: 1.375rem; margin: 1.5rem 0 0.5rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 2rem; }
@media (max-width: 640px) { .wrap { padding-inline: 1rem; } }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.75rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Servicezeile */
.servicebar { background: var(--ink); color: #e9ecf4; font-size: 0.9375rem; }
.servicebar a { color: var(--white); text-decoration: none; }
.servicebar a:hover { text-decoration: underline; color: var(--white); }
.servicebar__inner { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; align-items: center; justify-content: space-between; padding-block: 0.5rem; }
.servicebar p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.servicebar__contact a { font-weight: 600; }
.servicebar__search { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid #5a6788; border-radius: var(--radius); padding: 0.3rem 0.75rem; }
@media (max-width: 760px) { .servicebar__address, .servicebar__links { display: none !important; } }

/* Kopf und Navigation */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: relative; z-index: 20; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; padding-block: 1.125rem; }
.site-header__logo img { display: block; height: 72px; width: auto; }
.nav-toggle { display: none; }
.mainnav { flex: 1 1 600px; min-width: 0; }
.mainnav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 0.8rem; }
.mainnav__item { position: relative; }
.mainnav__link, .mainnav__toggle {
  display: inline-flex; align-items: center; gap: 0.2rem; min-height: 44px;
  font: 500 1rem var(--font-head); color: var(--ink); text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.mainnav__link:hover, .mainnav__toggle:hover, .mainnav__item.is-active > .mainnav__toggle { color: var(--blue); }
.mainnav__item.is-active > .mainnav__toggle { box-shadow: inset 0 -2px 0 var(--gold); }
.icon--chevron { transition: transform 0.15s; }
.mainnav__toggle[aria-expanded="true"] .icon--chevron { transform: rotate(180deg); }
.mainnav__sub {
  display: none; list-style: none; margin: 0; padding: 0.5rem 0;
  position: absolute; top: 100%; left: -1rem; min-width: 260px;
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 16px 32px rgba(22, 35, 63, 0.14);
}
.mainnav__toggle[aria-expanded="true"] + .mainnav__sub { display: block; }
.mainnav__sub a { display: block; padding: 0.5rem 1.25rem; color: var(--ink); text-decoration: none; }
.mainnav__sub a:hover, .mainnav__sub a[aria-current="page"] { background: var(--stone); color: var(--blue); }
.mainnav__item:nth-last-child(-n+3) .mainnav__sub { left: auto; right: -1rem; }

@media (max-width: 1100px) {
  .site-header__logo img { height: 52px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.9rem;
    background: var(--ink); color: var(--white); border: 0; border-radius: var(--radius);
    font: 500 1rem var(--font-head); cursor: pointer;
  }
  .mainnav { display: none; flex-basis: 100%; }
  .mainnav.is-open { display: block; }
  .mainnav__list { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .mainnav__item { border-bottom: 1px solid var(--line); }
  .mainnav__link, .mainnav__toggle { width: 100%; justify-content: space-between; min-height: 52px; }
  .mainnav__sub { position: static; box-shadow: none; border: 0; border-left: 3px solid var(--gold); border-radius: 0; margin: 0 0 0.75rem; padding: 0; }
  .mainnav__item:nth-last-child(-n+3) .mainnav__sub { right: auto; }
}

/* Seitenkopf der Inhaltsseiten */
.pagehead { background: var(--stone); border-bottom: 1px solid var(--line); padding: 2rem 0 1.75rem; }
.pagehead__title { margin: 0.25rem 0 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.9375rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.35rem; color: var(--gold-text); }
.breadcrumb a { color: var(--muted); }
.content { padding-block: 2.5rem 4rem; max-width: calc(var(--wrap) - 220px); }
/* Bereichsnavigation neben dem Inhalt */
.with-subnav { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.with-subnav .content { max-width: 900px; padding-inline: 0; margin: 0; }
.with-subnav__aside { padding-block: 2.5rem; }
.subnav__title {
  display: block; margin-bottom: 0.75rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--gold);
  font: 500 1.125rem var(--font-head); color: var(--ink); list-style: none; cursor: default;
}
.subnav__title::-webkit-details-marker { display: none; }
.subnav__list { list-style: none; margin: 0; padding: 0; }
.subnav__list .subnav__list { margin: 0.15rem 0 0.4rem 0.9rem; padding-left: 0.6rem; border-left: 1px solid var(--line); font-size: 0.9375rem; }
.subnav__item a { display: block; padding: 0.35rem 0.5rem; border-radius: 4px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.subnav__item a:hover { background: var(--stone); color: var(--blue); }
.subnav__item.is-active > a { font-weight: 600; }
.subnav__item a[aria-current="page"] { background: var(--stone); color: var(--blue); box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 900px) {
  .with-subnav { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .with-subnav__aside { position: static; padding-block: 1.25rem 0; }
  .subnav { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.25rem 1rem; }
  .subnav__title { margin: 0; padding: 0.75rem 0; border-bottom: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
  .subnav__title::after { content: "▾"; color: var(--gold-text); }
  .subnav[open] .subnav__title { border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
  .subnav[open] .subnav__title::after { content: "▴"; }
  .subnav nav { padding-bottom: 0.75rem; }
}

/* Dritte Ebene im Aufklappmenü */
.mainnav__subsub { list-style: none; margin: 0 0 0.25rem; padding: 0; }
.mainnav__subsub a { padding: 0.3rem 1.25rem 0.3rem 2.1rem !important; font-size: 0.9375rem; color: var(--muted) !important; }
.mainnav__subsub a:hover, .mainnav__subsub a[aria-current="page"] { color: var(--blue) !important; }
.mainnav__sub { max-height: calc(100vh - 160px); overflow-y: auto; }
@media (max-width: 1100px) { .mainnav__sub { max-height: none; } }

.pagehead__title--secondary { font: 500 clamp(1.4rem, 1.2rem + 1vw, 1.75rem) var(--font-head); color: var(--ink); }

/* Nachrichten */
.news-list .cards { margin-top: 0.5rem; }
.card__title a { display: block; }
.card__text { margin: 0.6rem 0 0; font-size: 1rem; color: var(--muted); }
.pagination ul { list-style: none; margin: 2.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pagination__page, .pagination__step {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 0.9rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px; color: var(--ink); text-decoration: none; font: 500 1rem var(--font-head);
}
.pagination__page:hover, .pagination__step:hover { border-color: var(--ink); color: var(--ink); }
.pagination__page.is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.news-detail { max-width: 820px; }
.news-detail .eyebrow { margin-bottom: 0.25rem; }
.news-detail__title { margin: 0 0 1.5rem; }
.news-detail__teaser { font-size: 1.25rem; color: var(--ink); }
.news-detail__teaser p { margin-top: 0; }
.news-detail .mediaelement, .news-detail .news-img-wrap { margin: 1.5rem 0; }
.news-detail img { border-radius: 4px; }
.news-detail__subtitle { font-size: 1.375rem; }
.news-detail__back { margin-top: 2.5rem; }

/* Startseite */
.hero { position: relative; background: var(--stone); }
.hero__image {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; max-height: 760px;
  object-fit: cover; object-position: center top;
}
@media (max-width: 640px) { .hero__image { aspect-ratio: 4 / 3; } }
.hero__credit { position: absolute; right: 1rem; top: 0.75rem; margin: 0; font-size: 0.8125rem; color: var(--white); background: rgba(22, 35, 63, 0.6); padding: 0.1rem 0.5rem; border-radius: 3px; }
.hero__wrap { position: relative; }
.hero__card {
  position: relative; margin-top: -10rem; max-width: 620px; padding: 2.25rem 2.5rem;
  background: var(--white); border-top: 4px solid var(--gold); border-radius: 4px;
  box-shadow: 0 18px 40px rgba(22, 35, 63, 0.18);
}
.hero__card h1 { margin: 0 0 0.875rem; }
.hero__card p { color: #3d4559; }
@media (max-width: 640px) {
  .hero__card { margin-top: -2.5rem; padding: 1.5rem 1.25rem; }
}
.eyebrow { margin: 0 0 0.5rem; font: 500 0.9375rem var(--font-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text) !important; }
.eyebrow--light { color: var(--gold-light) !important; }

.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.button {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.7rem 1.4rem;
  background: var(--blue); color: var(--white); border: 1.5px solid var(--blue); border-radius: 4px;
  font: 500 1rem var(--font-head); text-decoration: none;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.button--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.button--outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.button--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.button--light:hover { background: var(--stone); color: var(--ink); border-color: var(--stone); }

.band { padding: 5rem 0; }
.band--stone { background: var(--stone); }
.band--after-hero { padding-top: 3.5rem; }
.section-title { margin: 0 0 1.75rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: baseline; margin-bottom: 1.75rem; }
.section-head .section-title { margin: 0; }
.more-link { display: inline-block; margin-top: 1.25rem; font: 500 1rem var(--font-head); text-decoration: none; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.6rem; min-height: 140px; height: 100%; padding: 1.5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  color: var(--gold-text); transition: border-color 0.15s, box-shadow 0.15s;
}
.tile:hover { border-color: var(--gold); box-shadow: 0 8px 20px rgba(22, 35, 63, 0.08); color: var(--gold-text); }
.tile__title { font: 500 1.25rem var(--font-head); color: var(--ink); }
.tile__text { font-size: 1rem; color: var(--muted); }
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .tile { min-height: 110px; padding: 1rem; }
  .tile__text { display: none; }
}

.services { display: flex; flex-wrap: wrap; gap: 3rem; }
.services__intro { flex: 1 1 280px; min-width: 0; }
.services__list { flex: 2 1 560px; min-width: 0; }
/* Gottesdienste aus dem Bistumskalender */
.worship { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.worship__item {
  display: grid; grid-template-columns: 8.5rem 4.5rem minmax(0, 1fr); gap: 0.25rem 1.25rem; align-items: baseline;
  padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line);
}
.worship__item[hidden], [data-worship-day][hidden] { display: none; }
.worship__day { font: 500 1rem var(--font-head); color: var(--ink); }
.worship__time { font-weight: 600; color: var(--blue); }
.worship__title { display: block; font-weight: 600; }
.worship__church { display: block; font-size: 0.9375rem; color: var(--muted); }
a.worship__title { color: var(--ink); text-decoration: none; }
a.worship__title:hover { color: var(--blue); text-decoration: underline; }
.worship__info { display: block; margin-top: 0.15rem; font-size: 0.875rem; font-style: italic; color: var(--muted); }
.worship__empty { margin: 1rem 0; color: var(--muted); }
.worship__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; }
.worship-week .chips { margin-bottom: 1.5rem; }
.worship-week__day { margin-bottom: 1.75rem; }
.worship-week__date { margin: 0 0 0.5rem; font-size: 1.25rem; }
.worship-week .worship__item { grid-template-columns: 6.5rem minmax(0, 1fr); }
@media (max-width: 640px) {
  .worship__item { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .services .worship__item .worship__day { grid-column: 1 / -1; }
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  min-height: 44px; padding: 0 1rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 1rem; background: var(--white); color: var(--ink); border: 1.5px solid var(--line-strong);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card__image { display: block; width: 100%; aspect-ratio: 32 / 21; height: auto; object-fit: cover; }
.card__image--empty { background: linear-gradient(135deg, var(--stone), var(--line)); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; }
.card__date { margin: 0 0 0.4rem; font-size: 0.9375rem; font-weight: 600; color: var(--gold-text); }
.card__title { margin: 0; font-size: 1.375rem; line-height: 1.25; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--blue); text-decoration: underline; }

.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.panel { border-radius: var(--radius); padding: 2.25rem; }
.panel--dark { background: var(--ink); color: #e9ecf4; }
.panel--dark .panel__title { color: var(--white); }
.panel--outline { border: 1px solid var(--line); }
.panel__title { margin: 0 0 1rem; font-size: 1.875rem; }
.panel__note { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Inhaltselemente (fluid_styled_content) */
.content > .frame:first-child > header > :first-child, .content > .frame:first-child > :first-child { margin-top: 0; }
.frame { margin-bottom: 2rem; }
.frame-space-before-extra-small { margin-top: 0.5rem; } .frame-space-before-small { margin-top: 1rem; }
.frame-space-before-medium { margin-top: 2rem; } .frame-space-before-large { margin-top: 3rem; } .frame-space-before-extra-large { margin-top: 4rem; }
.frame-space-after-extra-small { margin-bottom: 0.5rem; } .frame-space-after-small { margin-bottom: 1rem; }
.frame-space-after-medium { margin-bottom: 2rem; } .frame-space-after-large { margin-bottom: 3rem; } .frame-space-after-extra-large { margin-bottom: 4rem; }
.frame-type-div hr, hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.ce-bodytext > :first-child { margin-top: 0; }
/* Tabellen im Fließtext und Tabellen-Elemente */
.frame table, .contenttable {
  width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.contenttable th, .contenttable td, .frame td, .frame th {
  padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line);
}
.frame td > p, .contenttable td > p { margin: 0; }
.frame tbody tr:nth-child(even), .contenttable tbody tr:nth-child(even) { background: var(--stone); }
.frame thead th, .contenttable thead th {
  background: var(--ink); color: var(--white); font: 500 1rem var(--font-head); border-bottom: 0;
}
.frame .align-center, .contenttable .align-center { text-align: left; }
/* Zweispaltige Zeitpläne: erste Spalte immer gleich breit, damit mehrere Tabellen fluchten */
.frame table.table-striped { table-layout: fixed; }
.frame table.table-striped td:first-child { width: 13.5rem; white-space: normal; }
/* Tabellen mit Kopfzeile (z. B. Wochenplan): gleich breite Spalten */
.frame table:has(thead) { table-layout: fixed; }
.frame table:has(thead) td + td, .frame table:has(thead) th + th { border-left: 1px solid var(--line); }
/* Harte Zeilenumbrüche aus dem alten, schmaleren Layout ignorieren, der Text fließt in der Spalte */
.frame table:has(thead) td br { display: none; }
@media (max-width: 640px) {
  .frame table.table-striped td:first-child { width: 8.5rem; }
  /* Tabellen mit Kopfzeile als Karten untereinander, Beschriftung kommt aus data-label */
  .frame table:has(thead), .frame table:has(thead) tbody, .frame table:has(thead) tr, .frame table:has(thead) td { display: block; width: auto; }
  .frame table:has(thead) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .frame table:has(thead) td { border-left: 0 !important; border-bottom: 1px solid var(--line); }
  .frame table:has(thead) td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 0.25rem; font: 500 1rem var(--font-head); color: var(--ink);
  }
  .frame table:has(thead) tbody tr { background: none; }
}
.ce-gallery img { border-radius: 4px; }
.ce-gallery figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.4rem; }
.ce-uploads { list-style: none; padding: 0; }
.ce-uploads li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
iframe { max-width: 100%; }

/* Spaltenraster */
.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3, .grid--4, .grid--5, .grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: minmax(0, 1fr) !important; } }
.grid__column > .frame:last-child { margin-bottom: 0; }

/* Reiter */
.tabs__list { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 2px solid var(--line); }
.tabs__tab {
  flex: 0 0 auto; min-height: 48px; padding: 0 1.1rem; background: none; border: 0; border-bottom: 3px solid transparent;
  margin-bottom: -2px; font: 500 1rem var(--font-head); color: var(--muted); cursor: pointer;
}
.tabs__tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.tabs__panel { padding-top: 1.5rem; }

/* Fußzeile */
.site-footer { background: var(--ink); color: var(--footer-text); font-size: 1rem; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-block: 3.5rem 1.75rem; }
.site-footer__title { margin: 0 0 0.5rem; font: 500 1.25rem var(--font-head); color: var(--white); }
.site-footer__heading { margin: 0 0 0.5rem; font-weight: 600; color: var(--white); }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer__bottom { padding-block: 1.1rem 1.75rem; border-top: 1px solid #2e3b5c; font-size: 0.875rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Bildlayout des alten Templates (grid_layout) */
.pgd-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem 2rem; align-items: start; }
.pgd-layout__part { grid-column: span var(--span, 12); }
.pgd-layout__part.ce-bodytext > :first-child { margin-top: 0; }
.pgd-gallery { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1000px) { .pgd-gallery { grid-template-columns: repeat(var(--cols-md, var(--cols, 1)), minmax(0, 1fr)); } }
.pgd-gallery__item { margin: 0; }
.pgd-gallery__item video, .pgd-gallery__item iframe { display: block; width: 100%; height: auto; border-radius: 4px; }
/* Bilder nie über ihre Originalgröße hinaus vergrößern */
.pgd-gallery__item img { display: block; width: auto; max-width: 100%; height: auto; border-radius: 4px; }
.pgd-gallery__item figcaption { font-size: 0.9375rem; color: var(--muted); margin-top: 0.4rem; }
@media (max-width: 640px) {
  .pgd-layout__part { grid-column: span 12; }
  .pgd-gallery { grid-template-columns: repeat(var(--cols-xs, 1), minmax(0, 1fr)); }
}

/* Layout "Personen": einheitliche Fotos, Karten der Spalten in bündigen Zeilen */
.grid--people { grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 1), auto); row-gap: 2.25rem; }
.grid--people .grid__column { display: contents; }
.grid--people .frame { margin: 0; }
.grid--people .ce-gallery, .grid--people .ce-textpic .ce-gallery { float: none; margin: 0 0 0.9rem; }
.grid--people .ce-outer, .grid--people .ce-inner { float: none; right: auto; }
.grid--people .ce-gallery { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.grid--people .ce-outer, .grid--people .ce-inner, .grid--people .ce-row { display: contents; }
.grid--people .ce-column { float: none; margin: 0; padding: 0; }
.grid--people figure.image { margin: 0; }
.grid--people .ce-gallery img {
  width: 200px; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%;
  border-radius: 6px;
}
.grid--people .ce-bodytext p, .grid--people .ce-textpic p { margin: 0 0 0.35rem; }
.grid--people ul { margin: 0.25rem 0 0.5rem; padding-left: 1.2rem; }
.grid--people li { margin: 0.1rem 0; }
@media (max-width: 1000px) {
  .grid--people { grid-auto-flow: row; grid-template-rows: none; }
}
@media (max-width: 640px) {
  /* Personenkarten auch auf dem Smartphone zu zweit nebeneinander */
  .grid.grid--people { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.5rem 1rem; }
  .grid--people .ce-gallery { gap: 0.5rem; }
  .grid--people .ce-gallery img { width: 100%; }
  .grid--people .ce-gallery .ce-column { flex: 1 1 0; min-width: 0; }
  .grid--people p, .grid--people li { font-size: 0.9375rem; overflow-wrap: anywhere; }
}
