:root {
    --color-red: #b70b32;
    --color-grey: #e6e6e6;
    --color-text: #333333;
    --font-main: Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0; padding: 0;
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-grey);
    scroll-behavior: smooth;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background-color: var(--color-grey);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-right: 1px solid #999;
    border-left: 1px solid #999;
}

/* --- HEADER --- */
.header {
    background-color: #999999;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
  margin-left: 15px;
}

.logo img {
    height: 120px;
}

.header-right {
    display: flex;
    align-items: center;
}

a {
  color: #990000;
}
a:hover {
  color: #000000;
  font-weight: bold;
  text-decoration: underline;
}

/* Typo3 Standard */
/* 1. Zentrierung für TYPO3-Text-Elemente erzwingen */
.text-center,
.text-center p,
.text-center ul,
.text-center li,
.ce-bodytext.text-center {
    text-align: center !important;
}

/* Zentrierte Listen (falls verwendet) sauber darstellen */
.text-center ul {
    list-style-position: inside;
    padding-left: 0;
}

/* 2. Abstände (Paddings/Margins) für TYPO3 Standard-Module fixen */
/* Verhindert das Kleben am Rand und gibt dem Text Luft zum Atmen */
.frame-type-text .frame-inner,
.frame-type-textmedia .frame-inner,
.ce-bodytext {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Optional: Abstand zwischen Text und dem darunterliegenden Bild vergrößern */
.ce-bodytext {
    margin-bottom: 30px;
}

/* Kontakt-Bereich */
.contact-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.contact-btn {
    background: #fff;
    color: var(--color-red);
    border: 2px solid var(--color-red);
    border-radius: 20px;
    padding: 5px 25px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}

.contact-subtext {
    font-size: 12px;
    font-style: italic;
    color: var(--color-text);
    margin-top: 4px;
}

/* Hamburger Menü */
.menu-toggle { display: none; }
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.hamburger span {
    display: block;
    width: 35px;
    height: 4px;
    background-color: var(--color-red);
    border-radius: 2px;
}

.nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 90px;
    right: 20px;
    background: #fff;
    border: 2px solid var(--color-red);
    padding: 15px 30px;
    list-style: none;
    z-index: 200;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.menu-toggle:checked ~ .nav-list {
    display: flex;
}

.nav-list a {
    text-decoration: none;
    color: var(--color-red);
    font-weight: bold;
    font-size: 16px;
    padding: 8px 0;
    display: block;
}

/* --- MAIN CONTENT --- */
.onepager-content {
    flex-grow: 1;
    padding: 0; /* Padding für DCE-Elemente steuerst du am besten in den DCEs selbst */
}

/* --- FOOTER --- */
.footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

/* Weißes Partner-Band */
.partner-band {
    /*background: #fff;*/
    padding: 30px 0 20px 0;
}

.partner-title {
    text-align: center;
    color: var(--color-red);
    font-size: 22px;
    margin: 0 0 20px 0;
}

/* --- FOOTER LOGO ANIMATION --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center; /* Zentriert die Logos vertikal im weißen Band */
    padding: 10px 0;
}

.marquee-content {
    display: flex; /* Zwingt alle Logos in eine exakte Reihe ohne HTML-Leerzeichen */
    align-items: center;
    width: max-content; /* Container wird exakt so breit wie der Inhalt */
    animation: marquee 80s linear infinite;
}

.marquee-content a.marquee-link {
    display: flex;
    text-decoration: none;
}

.marquee-content img {
    height: 110px;
    width: auto;
    margin: 0 30px;
    display: block;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

/* Grauer Abschluss mit Logo */
.footer-bottom {
    background-color: #999999;
    position: relative;
    padding-top: 50px;
    padding-bottom: 20px; /* Abstand unter dem roten Balken */
}

.footer-logo-wrapper {
    text-align: right;
    padding-right: 15%;
    position: relative;
    z-index: 10;
    margin-top: -90px;
    margin-bottom: -40px; /* Lässt das Logo leicht über den roten Balken ragen */
}

.footer-logo-img {
    height: 160px;
    width: auto;
    display: inline-block;
}

.footer-red-bar {
    background-color: var(--color-red);
    height: 15px; /* Höhe des Balkens */
    width: 90%; /* Kürzer als die volle Breite */
    max-width: 1000px; /* Maximale Breite auf großen Bildschirmen */
    margin: 0 auto; /* Zentriert den Balken horizontal */
    position: relative;
    z-index: 1;
    min-height: 20px;
    margin-bottom: 40px;
}

/* --- FOOTER META MENÜ --- */
.footer-meta-nav {
    background-color: var(--color-grey);
    text-align: center;
    padding: 0px 20px 40px 0px; /* Sorgt für etwas Luft zum roten Balken */
    width: 100%;
    box-sizing: border-box;
}

.footer-meta-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px; /* Abstand zwischen den beiden Links */
}

.footer-meta-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-meta-nav a:hover {
    color: var(--color-red);
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .footer-meta-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
      margin-left: 0px;
    }

    .image-embed-item {
        width: 100%;
        height: auto;
    }
}

/* --- SCROLL TO TOP BUTTON --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-red);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #333;
    transform: translateY(-3px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* Mobile Anpassung für den Button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* DCE´s */

/* --- DCE: HERO BILD --- */
.dce-hero-section {
    position: relative;
    width: 100%;
    margin-top: 15px; /* Leichter Abstand zum Header */
    margin-bottom: 50px; /* Abstand zum nächsten Inhaltselement */
    padding: 0 20px; /* Orientiert sich am Rand des site-wrappers */
    box-sizing: border-box;
}

.hero-image-wrapper {
    position: relative;
    /* Verhindert minimale Lücken unter dem Bild: */
    font-size: 0;
    line-height: 0;
}

.hero-main-img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border: 1px solid #ccc; /* Optionale leichte Kontur, falls das Bild hell ist */
    border-bottom: none;
}

.hero-red-bar {
    background-color: var(--color-red);
    height: 30px;
    width: 100%;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.hero-logo-overlay {
    position: absolute;
    bottom: -23px; /* Zieht das Logo exakt über den roten Balken */
    left: 40px; /* Einrückung von links */
    height: 180px; /* Passe diese Größe an die echten Logo-Maße an */
    width: auto;
    z-index: 10;
}

/* Mobile Anpassung für das Hero-Logo */
@media (max-width: 768px) {
    .hero-logo-overlay {
        height: 100px;
        left: 20px;
        bottom: -10px;
    }
}


/* --- DCE: 3-SPALTEN VERANSTALTUNGEN --- */
.dce-events-section {
    background-color: #fff; /* Weißer Hintergrund für diesen Bereich */
    padding: 60px 20px;
    margin: 0;
    box-sizing: border-box;
}

.events-main-title {
    text-align: center;
    color: var(--color-red);
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 40px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Einzelne graue Box */
.event-card {
    background-color: #cccccc; /* Dunkleres Grau für Kontrast zum Hintergrund */
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
}

.event-headline {
    color: var(--color-red);
    text-align: center;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}

.event-text {
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: justify; /* Blocksatz wie in der Vorlage */
    flex-grow: 1; /* Drückt den Button immer ganz nach unten */
    margin-bottom: 25px;
}

/* Button Container & Styling */
.event-btn-wrapper {
    text-align: center;
}

.event-btn {
    background-color: #fff;
    color: var(--color-red);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 30px;
    border-radius: 20px; /* Erzeugt die typische Pillenform */
    display: inline-block;
    transition: background-color 0.3s;
}

.event-btn:hover {
    background-color: var(--color-red);
    color: #fff;
}

/* --- DCE 3-SPALTEN BILDER --- */
.event-image-wrapper {
    margin-bottom: 20px; /* Abstand zur Überschrift */
    width: 100%;
}

.event-card-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* border-radius: 5px; -> Optional einkommentieren, falls die Bilder abgerundet sein sollen */
}

/* Mobile Anpassung: Grid bricht in eine Spalte um */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}

/* --- DCE: ROTER HINTERGRUND (TEXT LINKS, BILD RECHTS) --- */
.dce-red-section {
    background-color: var(--color-red);
    color: #fff;
    padding: 60px 20px;
    box-sizing: border-box;
    width: 100%;
}

.red-headline {
    text-align: center;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 40px;
    color: #fff;
}

.red-section-container {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}

.red-text-col {
    flex: 1; /* Nimmt 50% der Breite ein */
}

.red-text {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify; /* Blocksatz wie in der PDF/JPG Vorlage */
}

/* Anpassungen für Typo3 RTE Absätze im roten Bereich */
.red-text p {
    margin-top: 0;
    color: #fff;
}

.red-image-col {
    flex: 1;
    display: flex;
    flex-direction: column; /* Zwingt alle Bilder untereinander */
    gap: 30px; /* Erzeugt einen sauberen Abstand zwischen den Bildern */
}

.red-img {
    width: 100%;
    height: auto;
    display: block;
}

.red-img-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1; /* Erzeugt ein Quadrat */
    background-color: #fff;
}

/* Mobile Anpassung: Spalten untereinander */
@media (max-width: 768px) {
    .red-section-container {
        flex-direction: column;
    }
}

/* --- DCE: GRAUER HINTERGRUND MIT DUNKLEREN BOXEN --- */
.dce-grey-section {
    background-color: var(--color-grey); /* Hellgrauer Hintergrund der ganzen Sektion */
    /*padding: 60px 20px;*/
    padding: 40px 0px 0px 0px;
    width: 100%;
    box-sizing: border-box;
    /*border: 1px solid #ccc;*/
    /*
    border-right: 1px solid #999;
    border-left: 1px solid #999;
    */
}

.grey-headline {
    text-align: center;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 40px;
    color: var(--color-red);
}

.grey-content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.grey-columns {
    display: flex;
    gap: 40px;
    margin-bottom: 20px; /* Platzhalter für das überlappende Logo */
    align-items: stretch;
}

.grey-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Dunklere graue Boxen für Bild und Text */
.grey-box {
    background-color: #cccccc;
    flex-grow: 1;
    box-sizing: border-box;
}

.grey-image-box {
    padding: 0;
    display: flex;
    flex-direction: column; /* Zwingt alle Bilder untereinander */
    gap: 30px; /* Erzeugt einen sauberen Abstand zwischen den Bildern */
}

.grey-text-box {
    padding: 30px;
}

.grey-img {
    width: 100%;
    height: auto;
    display: block;
}

.grey-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background-color: #cccccc;
}

.grey-text-box p {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
    color: var(--color-text);
    margin-top: 0;
}

/* Logo und roter Balken am unteren Rand */
.grey-bottom-bar {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -80px; /* Zieht das Konstrukt nach oben über die grauen Boxen */
}

.grey-center-logo {
    height: 150px;
    position: relative;
    z-index: 10;
    margin-bottom: -15px; /* Lässt das Logo leicht über den roten Balken ragen */
    margin-left: -50px; /* Positioniert das Logo leicht nach links versetzt (wie in Vorlage) */
}

.grey-full-red-bar {
    background-color: var(--color-red);
    height: 20px;
    width: 100%; /* Spans exact width of the 1000px container */
    position: relative;
    z-index: 1;
    margin-bottom: -20px;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .grey-columns {
        flex-direction: column-reverse; /* Zeigt den Text (2. Spalte) vor dem Bild (1. Spalte) an */
    }

    .grey-bottom-bar {
        margin-top: -40px;
    }

    .grey-center-logo {
        height: 100px;
        margin-left: 0;
    }
}

.weiss1 {
  height: 40px;
  background-color: #fff;
}
.weiss2 {
  height: 60px;
  background-color: #fff;
}

/* --- DCE: 3-SPALTEN EXPAND --- */
.dce-events-expand-section {
    background-color: #fff;
    padding: 60px 20px;
    box-sizing: border-box;
    width: 100%;
}

/* --- DCE: 3-SPALTEN EXPAND (Sanfte Animation) --- */

.event-text-clamp {
    position: relative;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 25px;
    flex-grow: 1;

    /* Sanftes Aufklappen über max-height */
    max-height: 210px; /* Entspricht exakt 5 Zeilen (5 * 14px * 1.5) */
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
}

/* Der Fade-Out Verlauf am Ende des Textes */
.event-text-clamp::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    /* Der Verlauf endet in der exakten Hintergrundfarbe der Box (#cccccc) */
    background: linear-gradient(to bottom, rgba(204,204,204,0), rgba(204,204,204,1));
    pointer-events: none; /* Verhindert, dass der Verlauf Klicks blockiert */
    transition: opacity 0.4s ease;
}

/* Zustand nach dem Klick */
.event-text-clamp.is-expanded {
    max-height: 1500px; /* Ein Pufferwert, der groß genug für jeden langen Text ist */
}

/* Blendet den Fade-Out Verlauf weich aus, wenn aufgeklappt ist */
.event-text-clamp.is-expanded::after {
    opacity: 0;
}

.event-text-clamp p:first-child {
    margin-top: 0;
}

/* Styling für den Button (da es jetzt ein <button> und kein <a> Tag mehr ist) */
.event-expand-btn {
    background-color: #fff;
    color: var(--color-red);
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 30px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    outline: none;
}

.event-expand-btn:hover {
    background-color: var(--color-red);
    color: #fff;
}


/*TYPO 3 */
/* --- STANDARD TYPO3 INHALTSELEMENTE (z.B. Datenschutz, Impressum) --- */
.frame-type-text,
.frame-type-header,
.frame-type-html,
.frame-type-textmedia {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px; /* Erzeugt den nötigen Abstand links und rechts */
    box-sizing: border-box;
}

/* Zeilenabstand und Ausrichtung für Standard-Texte optimieren */
.frame-type-text p,
.frame-type-textmedia p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    text-align: justify;
}

/* Mobile Anpassung für Standard-Elemente */
@media (max-width: 768px) {
    .frame-type-text,
    .frame-type-header,
    .frame-type-html,
    .frame-type-textmedia {
        padding: 20px 15px; /* Etwas weniger Abstand auf dem Smartphone */
    }
}
