

html {
    scroll-padding-top: 180px;
}


*{    margin:0;
    padding:0;
    box-sizing:border-box;
}
:root {
	
    /* Hauptfarben – passend zur Vorlage */
    --primary: #aa2421;
    --primary-dark: #861b19;
}



	
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  color: var(--primary);
  font-weight: 600;
  line-height: 1.2;
}

strong {
  font-weight: 700;
  color: var(--primary);
}

.btn-primary {
  color: #fff !important;
}

.btn-primary strong {
  color: inherit;
}

small {
  color: var(--text-light);
}


/* Navigation */
nav,
.mainnav,
.navbar,
.navigation {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
}


/* Textauswahl */
::selection {
  background: var(--primary);
  color: var(--white);
}

.beige {background: #efefe9;}

.kontakt {background:#dddcd6; padding: 8px auto;}

.site-logo img {
  width: 240px;
  height: auto;
}
#pageid1 .kopfbild .frame-inner {
  padding-top: 0px;
}

header .textmedia {gap:0;}

main h1 {    font-size: 3rem;  }


/* Normale Links im Hauptinhalt */
main .frame a:not(.btn),
main .frame a:not(.btn):visited {
  color: #861b19;
}

main .frame a:not(.btn):hover,
main .frame a:not(.btn):focus-visible {
  color: #aa2421;
}

.site-header {
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 99999;

 box-shadow: 0 8px 35px rgba(0,0,0,.08);
	  background-color: #9c1915;
}


	.headerimage-outer {display: none;}
#pageid1 .headerimage-outer {display: block;}


/* mmenu Fix */
.mm-page .site-header,
.mm-wrapper .site-header {
  position: sticky;
  top: 0;
	z-index: 10000;
}


main h4 {
  font-family: 'Marck Script', cursive;
  font-size: 2rem;
  text-align: center;
  color: #c2433a;
  border-bottom: 1px solid #c2433a;
  border-top: 1px solid #c2433a;
  padding: 20px 0;
}


.rot * {color:#f9e2bc !important;}

/* Tablet */
@media (max-width: 991.98px) {
    .headerimage-outer.kopfbild .headerimage-inner img {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        object-position: center center;
    }
}

/* Smartphone */
@media (max-width: 575.98px) {
    .headerimage-outer.kopfbild .headerimage-inner img {
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 4;      /* Hochformat */
        object-fit: cover;
        object-position: center center;
    }
}


.headerimage-outer.kopfbild .textmedia-text{
    position:absolute;
    left:8%;
    bottom:14%;
    z-index:50;
    max-width:520px;
}

.headerimage-outer.kopfbild .textmedia-text h1{
    margin:0;
    color:#fff;
    font-family:var(--font-headline);
    font-size:clamp(3rem,5vw,4.8rem);
    font-weight:600;
    line-height:1.05;
}



.headerimage-outer.kopfbild .textmedia-text h2{
    margin:.5rem 0 0;
    color:#fff;
    font-family:var(--font-body);
    font-size:clamp(1.5rem,2vw,2rem);
    font-weight:400;
    line-height:1.35;
}

.headerimage-outer.kopfbild .textmedia-text h2::after{
    content:"";
    display:block;
    width:110px;
    height:4px;
    background:var(--primary);
    margin-top:22px;
}



.frame-custom-10 .image img,
.frame-custom-11 .image img,
.frame-custom-12 .image img {
  width: 100%;
  height: auto;
}

.frame-custom-10 .image {
  max-width: 50%;
}

.frame-custom-11 .image {
  max-width: 65%;
}

.frame-custom-12 .image {
  max-width: 80%;
}


@media (max-width: 768px) {
  .frame-custom-10 .image,
  .frame-custom-11 .image,
  .frame-custom-12 .image {
    max-width: 100%;
  }
}


.frame-space-before-extra-small { margin-top: 0.5rem; display: block; }
.frame-space-before-small { margin-top: 1rem !important; display: block; }
.frame-space-before-medium { margin-top: 2rem !important; display: block; }
.frame-space-before-large { margin-top: 3rem !important; display: block; }




.frame-custom-22 .gallery-item img {  width: 80%;}
.frame-custom-23 .gallery-item img {  width: 60%;}
.frame-custom-24 .gallery-item img {  width: 40%;}
.frame-custom-25 .gallery-item img {  width: 20%;}
.frame-custom-26 .gallery-item img {  width: 10%;}

/* TYPO3 Logo Frames neutralisieren */
.site-logo .frame,
.site-logo .frame-group-container,
.site-logo .frame-group-inner,
.site-logo .frame-container,
.site-logo .frame-inner,
.site-logo .textmedia,
.site-logo .textmedia-item,
.site-logo .gallery-row,
.site-logo .gallery-item,
.site-logo figure,
.site-logo picture {
  margin: 0;
  padding: 0;
}


/* Menü */
.desktop-menu {
  display: flex;
  justify-content: center;
}

.desktop-menu .navilo {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-menu .navilo > li {
  position: relative;
}

.desktop-menu .navilo > li > a {
  display: flex;
  align-items: center;
  color: #15372b;
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}

/* Mobile */
.mobile-toggle {
  display: none;
}

@media (max-width: 1199.98px) {
  body {
    padding-top: 82px;
  }

  .site-header,
  .site-header .container,
  .header-inner {
    height: 82px;
  }

  .header-inner {
    display: flex;
    justify-content: space-between;
  }

  .desktop-menu,
  .amtstafel-btn {
    display: none;
  }

  .site-logo img,
  .site-logo svg {
    width: 300px;
  }

  .mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
  }

  .mobile-toggle span {
    width: 30px;
    height: 2px;
    background: #fff;
  }
}


.hunderter .megazeil,
.hunderter .ce-outer,
.hunderter .ce-row,
.hunderter .ce-gallery,
.hunderter .ce-textpic,
.hunderter .image { width: 100% !important;}
.hunderter .container {padding: 0 !important;}
.hunderter .frame {width: 100%; height: auto; margin: 0;
padding: 0;}

.hunderter .ce-gallery[data-ce-columns="3"] .ce-column {
    width: 33.33333% !important;}

.hunderter {max-width: 100% !important; padding: 0 !important; z-index: 0;}
.hunderter .ce-gallery img {padding: 0;width: 100%; }
.hunderter .ce-column {padding: 0 !important ;}
.hunderter .textmedia {gap:0;}
.hunderter hr {height: 0; padding: 2% 0; background:none !important;}
.hunderter .frame-container-default {
  max-width: 100%; padding: 0; margin:0;
}
.headerimage-outer {margin-top: -130px;}

.headerimage {position: relative; width: 100%; overflow: hidden; margin-bottom: 0.5%;}
.headerimage .carousel-image picture {width: 100%;}
.headerimage .carousel .carousel-content-inner,
.headerimage  .frame-container {min-width: 100% !important; max-width: inherit !important; padding: 0; margin:0; }


.headerimage .carousel .carousel-content {  height: inherit;}
.headerimage .carousel-item-type-image .carousel-image img {	width: 100%;}
.headerimage .frame {padding: 0;}
.headerimage .carousel .item {height: auto;}


.headerimage .carousel-image {
  display: block;
	z-index: 1;
  width: 100%;
}

.headerimage .carousel-text p {text-align: center; background-color: rgba(255,255,255,0.55); font-size: 3rem; padding: 1% 0.5%; }

.headerimage  .carousel-image img {
	width: 100%;}


/* =========================================
   TYPO3 FRAME SPACING – RESPONSIV
========================================= */

/* Abstand oben */
.frame-space-before-extra-small {
  margin-top: clamp(8px, 1vw, 16px) !important;
}

.frame-space-before-small {
  margin-top: clamp(20px, 3vw, 48px) !important;
}

.frame-space-before-medium {
  margin-top: clamp(36px, 6vw, 90px) !important;
}

.frame-space-before-large {
  margin-top: clamp(56px, 9vw, 135px) !important;
}

/* Abstand unten */
.frame-space-after-extra-small {
  margin-bottom: clamp(8px, 1vw, 16px) !important;
}

.frame-space-after-small {
  margin-bottom: clamp(20px, 3vw, 48px) !important;
}

.frame-space-after-medium {
  margin-bottom: clamp(36px, 6vw, 90px) !important;
}

.frame-space-after-large {
  margin-bottom: clamp(56px, 9vw, 135px) !important;
}

.footergrid .gallery-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}

.footergrid .gallery-item {
    width: 100%;
    min-height: 180px;
    padding: 30px;

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

    background: #fff;
    border-radius: 22px;
    border: 1px solid rgba(194,67,58,.08);
    box-shadow: 0 15px 40px rgba(0,0,0,.08);

    transition: all .3s ease;
}

.footergrid .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(0,0,0,.12);
}

.footergrid figure {
    width: 100%;
    margin: 0;

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

.footergrid img {
    width: 100%;
    max-width: 240px;
    max-height: 100px;
    object-fit: contain;
}




/* =========================================
   Moderne H1 im Card-Group-Stil
========================================= */

h1 {
    margin: 0 0 40px;
    text-align: center;
    color: #403d3b;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    position: relative;
}

/* Dekorative Linie */
h1::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: var(--primary);
}


/* =========================================
   LOGO GRÖSSE
========================================= */

/* Desktop ab 992px */
@media (min-width: 992px) {
  .site-header .site-logo img,
  .site-header .site-logo svg {
    width: 288px !important; /* 240px + 20% */
    max-width: none !important;
    height: auto !important;
  }
}

/* Mobile Logo */
@media (max-width: 991.98px) {
  .site-header .kontakt img,
  .site-header .kontakt svg {
    width: 240px !important;
    max-width: 100%;
    height: auto !important;
  }
}

/* =========================================
   HEADER KONTAKTLEISTE
========================================= */

.header-contactbar {
  background: #861b19;
  color: #fff;
  font-size: 14px;
}

.header-contactbar-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  min-height: 42px;
  text-align: right;
}

.header-contact-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  white-space: nowrap;
}

.header-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f9e2bc;
  flex: 0 0 auto;
}

.header-contact-icon svg {
  display: block;
}


/* ===================================
   BUTTONS
   =================================== */

.btn,
.frame-type-felogin input[type="submit"],
.cc-btn {
  border-radius: 6px;
  font-weight: 600;
  padding: 10px 18px;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}

/* Primary */
.btn-primary,
.frame-type-felogin input[type="submit"] {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #9c1915;
  --bs-btn-border-color: #9c1915;

  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #861b19;
  --bs-btn-hover-border-color: #861b19;

  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #741512;
  --bs-btn-active-border-color: #741512;

  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #9c1915;
  --bs-btn-disabled-border-color: #9c1915;

  --bs-btn-focus-shadow-rgb: 156, 25, 21;
}

/* Hover */
.btn-primary:hover,
.frame-type-felogin input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(156, 25, 21, .22);
}

/* Focus */
.btn-primary:focus,
.btn-primary:focus-visible,
.frame-type-felogin input[type="submit"]:focus {
  box-shadow:
    0 0 0 3px rgba(156, 25, 21, .22);
}

/* Outline Button */
.btn-outline-primary {
  --bs-btn-color: #9c1915;
  --bs-btn-border-color: #9c1915;

  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #9c1915;
  --bs-btn-hover-border-color: #9c1915;

  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #861b19;
  --bs-btn-active-border-color: #861b19;

  --bs-btn-focus-shadow-rgb: 156, 25, 21;
}

/* Links als Button */
a.btn {
  text-decoration: none;
}

/* Optional: etwas moderner */
.btn-primary,
.btn-outline-primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===================================
   BUTTON HOVER – Text immer sichtbar
   =================================== */

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.frame-type-felogin input[type="submit"]:hover,
.frame-type-felogin input[type="submit"]:focus,
.frame-type-felogin input[type="submit"]:active {
  color: #ffffff !important;
  background-color: #861b19 !important;
  border-color: #861b19 !important;
}

/* Falls im Button ein Link/Span/Icon steckt */
.btn-primary:hover *,
.btn-primary:focus *,
.btn-primary:active * {
  color: #ffffff !important;
}

/* Outline Button */
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #ffffff !important;
  background-color: #9c1915 !important;
  border-color: #9c1915 !important;
}

.btn-outline-primary:hover *,
.btn-outline-primary:focus *,
.btn-outline-primary:active * {
  color: #ffffff !important;
}


.beige .frame {padding-top: 0; padding-bottom: 0;}


/* =========================================
   KIRCHEN SCHNELL-LINKS
========================================= */

.kirchen-links {
  background: #efefe9;
  padding: 46px 0 42px;
}

.kirchen-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 20px;
}

.kirchen-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 210px;
  padding: 25px 20px;

  color: #403d3b;
  text-align: center;
  text-decoration: none;

  border-radius: 8px;

  transition:
    background-color .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
}

/* Icon */
.kirchen-icon {
  min-height: 90px;

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

  margin-bottom: 12px;

  color: #aa2421;
  font-size: 76px;
  line-height: 1;
}

.kirchen-icon i {
  display: block;
}

/* Überschrift */
.kirchen-link h2 {
  margin: 0;

  color: #403d3b;

  font-family: var(--font-body);
  font-size: clamp(1.35rem, 1.7vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;

  text-transform: uppercase;
}

/* Untertitel */
.kirchen-link h3 {
  margin: 2px 0 0;

  color: #5b5754;

  font-family: var(--font-body);
  font-size: clamp(1rem, 1.3vw, 1.45rem);
  font-weight: 300;
  line-height: 1.15;

  text-transform: uppercase;
}

/* Keine globale H1/H2-Dekoration */
.kirchen-link h2::after,
.kirchen-link h3::after {
  display: none;
}

/* Hover */
.kirchen-link:hover {
  color: #403d3b;

  background: rgba(255,255,255,.55);

  transform: translateY(-4px);

  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}

.kirchen-link:hover h2 {
  color: #9c1915;
}

.kirchen-link:hover h3 {
  color: #403d3b;
}

.kirchen-link:hover .kirchen-icon {
  color: #861b19;
}

/* Tastatur */
.kirchen-link:focus-visible {
  outline: 2px solid #9c1915;
  outline-offset: 4px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991.98px) {

  .kirchen-links {
    padding: 30px 0;
  }

  .kirchen-links-grid {
    gap: 10px;
  }

  .kirchen-link {
    min-height: 180px;
    padding: 20px 12px;
  }

  .kirchen-icon {
    min-height: 70px;
    font-size: 60px;
  }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 767.98px) {

  .kirchen-links-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .kirchen-link {
    min-height: auto;
    padding: 25px 15px;

    border-bottom: 1px solid rgba(156,25,21,.15);
    border-radius: 0;
  }

  .kirchen-link:last-child {
    border-bottom: 0;
  }

  .kirchen-icon {
    min-height: auto;
    margin-bottom: 10px;
    font-size: 58px;
  }
}

.kirchen-icon {
  width: 86px;
  height: 86px;
  margin-bottom: 14px;

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

  color: #aa2421;
}

.kirchen-icon svg {
  width: 100%;
  height: 100%;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition:
    transform .25s ease,
    color .25s ease;
}

.kirchen-link:hover .kirchen-icon svg {
  transform: translateY(-3px);
}

/* =========================================
   HEADERBILD + TERMINE
========================================= */

.headerimage-outer.kopfbild {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.headerimage-outer.kopfbild .headerimage-inner {
  position: relative;
  z-index: 1;
}

.headerimage-outer.kopfbild .headerimage-inner img {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================
   TERMINE – DESKTOP
========================================= */

.headerimage-outer.kopfbild .termine {
  position: absolute;
  z-index: 50;

  top: 50%;
  right: clamp(24px, 4vw, 70px);

  width: clamp(360px, 26vw, 480px);
  max-width: calc(100% - 48px);

  transform: translateY(-50%);
}

.headerimage-outer.kopfbild .termine-card {
  padding: 24px 28px;

  background: rgba(255,255,255,.96);

  border-top: 4px solid #9c1915;
  border-radius: 8px;

  box-shadow:
    0 18px 50px rgba(0,0,0,.22),
    0 3px 10px rgba(0,0,0,.08);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* TYPO3 Wrapper neutralisieren */
.termine .frame,
.termine .frame-group-container,
.termine .frame-group-inner,
.termine .frame-container,
.termine .frame-inner {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}


/* =========================================
   ÜBERSCHRIFT
========================================= */

.termine h1 {
  margin: 0 0 16px;

  color: #9c1915;

  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1.15;

  text-align: left;
}

.termine h1::after {
  display: none;
}


/* =========================================
   TABELLE
========================================= */

.termine .table-responsive {
  overflow: visible;
}

.termine table,
.termine .table {
  width: 100%;
  margin: 0;

  border-collapse: collapse;

  color: #403d3b;

  font-size: 13px;
  line-height: 1.35;
}

.termine table tr {
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.termine table td,
.termine table th {
  padding: 7px 6px;
  vertical-align: top;
  border: 0;
}

.termine table td:first-child,
.termine table th:first-child {
  padding-left: 0;
  font-weight: 600;
}

.termine table td:last-child,
.termine table th:last-child {
  padding-right: 0;
}

.termine p {
  margin: 12px 0 0;

  color: #403d3b;

  font-size: 13px;
  line-height: 1.4;
}


/* =========================================
   NOTEBOOK / KLEINER DESKTOP
========================================= */

@media (max-width: 1399.98px) {

  .headerimage-outer.kopfbild .termine {
    right: 24px;
    width: 390px;
  }

  .headerimage-outer.kopfbild .termine-card {
    padding: 20px 22px;
  }

  .termine table,
  .termine .table {
    font-size: 12px;
  }

  .termine table td,
  .termine table th {
    padding: 5px 4px;
  }
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1199.98px) {

  .headerimage-outer.kopfbild .termine {
    right: 18px;
    width: 350px;
  }

  .headerimage-outer.kopfbild .termine-card {
    padding: 18px;
  }

  .termine h1 {
    margin-bottom: 12px;
    font-size: 1.2rem;
  }

  .termine table,
  .termine .table {
    font-size: 11px;
    line-height: 1.25;
  }

  .termine table td,
  .termine table th {
    padding: 4px 3px;
  }

  .termine p {
    font-size: 11px;
  }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 991.98px) {

  .headerimage-outer.kopfbild {
    overflow: visible;
  }

  .headerimage-outer.kopfbild .termine {
    position: relative;

    top: auto;
    right: auto;

    width: 100%;
    max-width: none;

    transform: none;

    background: #f2f1ec;
  }

  .headerimage-outer.kopfbild .termine-card {
    width: 100%;

    padding: 24px 20px;

    background: #f2f1ec;

    border-top: 4px solid #9c1915;
    border-radius: 0;

    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .termine h1 {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }

  .termine .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .termine table,
  .termine .table {
    min-width: 620px;
    font-size: 13px;
  }

  .termine table td,
  .termine table th {
    padding: 7px 6px;
  }

  .termine p {
    font-size: 13px;
  }
}
.btn-primary {color:#fff !important;}

/* =========================================
   SMARTPHONE
========================================= */

@media (max-width: 575.98px) {

  .headerimage-outer.kopfbild .termine-card {
    padding: 20px 15px;
  }

  .termine h1 {
    font-size: 1.2rem;
  }

  .termine table,
  .termine .table {
    min-width: 560px;
    font-size: 12px;
  }
}

/* =========================================
   HINWEIS UNTER DER TERMIN-TABELLE
========================================= */

/* Tabelle sauber abschließen */
.termine #c12 {
  display: block;
  width: 100%;
  margin-bottom: 0 !important;
}

.termine #c12 .table-responsive {
  display: block;
  width: 100%;
  margin-bottom: 0 !important;
}

/* Hinweis wirklich unter die Tabelle setzen */
.termine #c13 {
  display: block;
  clear: both;

  width: 100%;

  margin: 14px 0 0 !important;
  padding: 0 !important;

  position: relative;
  z-index: 2;
}

/* TYPO3 Wrapper des Hinweistextes neutralisieren */
.termine #c13 .frame-group-container,
.termine #c13 .frame-group-inner,
.termine #c13 .frame-container,
.termine #c13 .frame-inner,
.termine #c13 .textmedia,
.termine #c13 .textmedia-item {
  display: block;
  width: 100%;

  margin: 0 !important;
  padding: 0 !important;
}

/* Hinweistext */
.termine #c13 p {
  display: block;

  margin: 0 !important;
  padding: 12px 0 0 !important;

  border-top: 1px solid rgba(156, 25, 21, .18);

  color: #5a5552;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}


.pdf-vorschau-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.pdf-vorschau-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e7e2df;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.pdf-vorschau-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.13);
}

.pdf-vorschau-titel {
    order: 2;
    display: block;
    padding: 16px 20px;
    background: #861b19;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.pdf-vorschau-preview {
    order: 1;
    display: block;
    width: 100%;
    height: 360px;
    overflow: hidden;
    background: #f5f5f5;
}

.pdf-vorschau-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Tablet */
@media (max-width: 991px) {
    .pdf-vorschau-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Handy */
@media (max-width: 600px) {
    .pdf-vorschau-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pdf-vorschau-preview {
        height: 420px;
    }
}

.pfarrblatt .textmedia-gallery {
  display: none;
}

.pfarrblatt {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 48px;
    align-items: stretch;
    margin-right: 0;
    margin-left: 0;
}

/*
 * Die drei TYPO3-Spalten werden für das Layout aufgelöst.
 * Dadurch liegen die jeweils zusammengehörenden Pfarrblätter
 * in derselben CSS-Grid-Zeile und bleiben exakt auf einer Höhe.
 */
.pfarrblatt > .col-12.col-md-4 {
    display: contents;
}

.pfarrblatt > .col-12.col-md-4 > .frame {
    width: 100%;
    margin: 0;
    min-width: 0;
}

/* Spaltenzuordnung */
.pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame { grid-column: 1; }
.pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame { grid-column: 2; }
.pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame { grid-column: 3; }

/* Zeilenzuordnung – genügend Reserve für weitere Pfarrblätter */
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(1)  { grid-row: 1; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(2)  { grid-row: 2; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(3)  { grid-row: 3; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(4)  { grid-row: 4; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(5)  { grid-row: 5; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(6)  { grid-row: 6; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(7)  { grid-row: 7; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(8)  { grid-row: 8; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(9)  { grid-row: 9; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(10) { grid-row: 10; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(11) { grid-row: 11; }
.pfarrblatt > .col-12.col-md-4 > .frame:nth-child(12) { grid-row: 12; }

.pfarrblatt .col-md-4 .frame-header {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 104px;
    text-align: center;
    margin-bottom: 25px;
}

.pfarrblatt .col-md-4 .element-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    width: 100%;
    color: #861b19;
    font-size: clamp(24px, 2vw, 30px);
    line-height: 1.2;
    margin: 0;
    text-align: center;
    text-wrap: balance;
}

.pfarrblatt .col-md-4 .element-header span {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    white-space: normal;
}

.pfarrblatt .col-md-4 .frame-header::after {
    content: "";
    display: block;
    width: 55px;
    height: 4px;
    margin: 18px auto 0;
    background: #861b19;
    border-radius: 10px;
}

.pfarrblatt .col-md-4 .textmedia-text .pdf-vorschau-grid {
    display: flex;
    justify-content: center;
}

.pfarrblatt .col-md-4 .textmedia-text .pdf-vorschau-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 340px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
    text-decoration: none !important;
    transition: transform .25s ease, box-shadow .25s ease;
}

.pfarrblatt .col-md-4 .textmedia-text .pdf-vorschau-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 35px rgba(0,0,0,.15);
}

.pfarrblatt .col-md-4 .pdf-vorschau-preview {
    order: 1;
    display: block;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #f5f5f5;
}

.pfarrblatt .col-md-4 .pdf-vorschau-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.pfarrblatt .col-md-4 .pdf-vorschau-titel {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 15px 20px;
    background: #861b19;
    color: #fff !important;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
}

@media (max-width: 991px) {
    .pfarrblatt .col-md-4 .pdf-vorschau-preview {
        height: 380px;
    }
}

@media (max-width: 767px) {
    .pfarrblatt {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .pfarrblatt > .col-12.col-md-4 > .frame {
        grid-column: 1;
    }

    /* Mobil chronologisch zeilenweise: links, Mitte, rechts */
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(1) { grid-row: 1; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(1) { grid-row: 2; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(1) { grid-row: 3; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(2) { grid-row: 4; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(2) { grid-row: 5; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(2) { grid-row: 6; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(3) { grid-row: 7; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(3) { grid-row: 8; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(3) { grid-row: 9; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(4) { grid-row: 10; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(4) { grid-row: 11; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(4) { grid-row: 12; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(5) { grid-row: 13; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(5) { grid-row: 14; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(5) { grid-row: 15; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(6) { grid-row: 16; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(6) { grid-row: 17; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(6) { grid-row: 18; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(7) { grid-row: 19; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(7) { grid-row: 20; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(7) { grid-row: 21; }
    .pfarrblatt > .col-12.col-md-4:nth-child(1) > .frame:nth-child(8) { grid-row: 22; }
    .pfarrblatt > .col-12.col-md-4:nth-child(2) > .frame:nth-child(8) { grid-row: 23; }
    .pfarrblatt > .col-12.col-md-4:nth-child(3) > .frame:nth-child(8) { grid-row: 24; }

    .pfarrblatt .col-md-4 .element-header {
        min-height: 60px;
        font-size: 25px;
    }

    .pfarrblatt .col-md-4 .pdf-vorschau-card {
        max-width: 420px;
    }

    .pfarrblatt .col-md-4 .pdf-vorschau-preview {
        height: 500px;
    }
}
