#footer-custom {
    background-color: rgba(0, 0, 0, 0.7); /* Transparenz nur auf dem Hintergrund */
    color: white;
    display: flex;
    justify-content: center; /* Zentriert den inside-Container */
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 100;
    box-sizing: border-box;
    height: 50px;
}

/* NEUE KLASSE: Footer ausblenden */
#footer-custom.hidden {
    opacity: 0;
    pointer-events: none; /* Verhindert Interaktionen, wenn ausgeblendet */
    transform: translateY(100%); /* Bewegen nach unten aus dem Viewport */
}


#footer-custom .inside {
    position: relative;
    display: flex;
    justify-content: center; /* Zentriert den footer-content-wrapper auf kleinen Bildschirmen */
    align-items: center;
    max-width: 100%; /* Sicherstellen, dass es die volle Breite einnehmen kann */
    width: 100%; /* Muss 100% haben, um das Padding vom Rand zu nutzen */
    box-sizing: border-box;
    padding: 0 20px; /* Dieser Wert sorgt für 20px festen Abstand von den Bildschirmrändern */
}

#footer-custom .footer-content-wrapper {
    display: flex;
    flex-direction: column; /* Standard: gestapelt auf kleinen Bildschirmen */
    justify-content: center; /* Zentriert die Elemente vertikal */
    align-items: center; /* Zentriert die Elemente horizontal */
    width: 100%; /* Nimmt die volle Breite des .inside-Containers ein */
    position: relative;
    height: 100%; /* Füllt die Höhe des Parent (.inside) aus */
}

/* Media Query für größere Bildschirme (Tablets und Desktops) für den Footer-Inhalt */
@media (min-width: 768px) {
    #footer-custom .footer-content-wrapper {
        flex-direction: row; /* Elemente in einer Reihe ausrichten */
        justify-content: space-between; /* Links ganz links und Copyright ganz rechts */
        align-items: center;
    }

    #footer-custom .footer-links {
        margin-bottom: 0; /* Keinen unteren Abstand auf größeren Bildschirmen */
        text-align: left; /* Textausrichtung für Links */
    }

    #footer-custom p {
        text-align: right; /* Textausrichtung für Copyright */
    }
}

/* Styling für die Gruppe der Footer-Links */
#footer-custom .footer-links {
    margin-bottom: 10px; /* Abstand unter den Links auf kleinen Bildschirmen */
    white-space: nowrap; /* Verhindert, dass Links umbrechen */
    text-align: center; /* Zentriert auf kleinen Bildschirmen */
}

/* Styling für einzelne Footer-Links */
#footer-custom .footer-links a {
    color: white;
    text-decoration: none;
    padding: 0 15px; /* Horizontaler Abstand zwischen den Links */
    transition: color 0.3s ease;
}

#footer-custom .footer-links a:hover {
    color: #ccc;
}

/* Styling für den Copyright-Text */
#footer-custom p {
    margin: 0;
    font-size: clamp(14px, 1.5vw, 20px);
    text-align: center; /* Zentriert auf kleinen Bildschirmen */
}

/* Footer Modal Overlay */
.fullscreen-overlay.footer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1.0);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 160;
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

.fullscreen-overlay.footer-modal.is-active {
    transform: translateX(0);
    visibility: visible;
    display: flex;
}

.footer-modal .overlay-content {
    background-color: rgba(0, 0, 0, 1.0);
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: calc(100% - 80px);
    overflow-y: auto;
    position: relative;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.footer-modal .overlay-content h2 {
    color: white;
    text-align: center;
    font-size: clamp(24px, 5vw, 45px);
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.footer-modal .overlay-text-content {
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.6;
}

/* Spezifische Formatierungen für Textinhalte innerhalb von .overlay-text-content */
.footer-modal .overlay-text-content p {
    margin-bottom: 1em;
}

.footer-modal .overlay-text-content ul,
.footer-modal .overlay-text-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.footer-modal .overlay-text-content li {
    margin-bottom: 0.5em;
}

.footer-modal .overlay-text-content a {
    color: rgb(129, 196, 255);
    text-decoration: underline;
}

.footer-modal .close-overlay-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    color: white;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.footer-modal .close-overlay-button:hover,
.footer-modal .close-overlay-button:focus {
    opacity: 1;
    transform: rotate(90deg);
}

/* Media Queries für Footer und Modal */
@media screen and (max-width: 767px) {
    #footer-custom {
        height: 40px;
    }
    .footer-modal .overlay-content {
        padding: 20px;
        width: 95%;
        max-height: calc(100% - 40px);
    }
    .footer-modal .close-overlay-button {
        font-size: 35px;
        top: 10px;
        right: 15px;
    }
}

@media screen and (max-width: 479px) {
    #footer-custom {
        height: 30px;
    }
    .footer-modal .overlay-content {
        padding: 15px;
        width: 95%;
        max-height: calc(100% - 30px);
    }
    .footer-modal .overlay-text-content {
        font-size: 15px;
    }
    .footer-modal .close-overlay-button {
        font-size: 30px;
        top: 5px;
        right: 10px;
    }
}
/* Header-Anpassungen */
#header-custom {
    display: flex;
    justify-content: flex-start; /* Angepasst, da .inside den Haupt-Flex macht */
    align-items: center;
    position: fixed; /* Bleibt fixiert */
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Transparenz nur auf dem Hintergrund */
    color: white;
    padding: 0 20px; /* Etwas Padding an den Seiten für Inhalt */
    text-align: center;
    z-index: 200; /* Hoher z-index, damit er über allem liegt */
    box-sizing: border-box;
    height: 70px; /* Standardhöhe für große Bildschirme */
}

#header-custom .inside {
    display: flex;
    justify-content: center; /* **WICHTIG: Zentriert den H1-Titel primär** */
    align-items: center;
    width: 100%;
    position: relative; /* **WICHTIG für die absolute Positionierung des Burgers** */
    height: 100%;
    padding: 0;
    box-sizing: border-box;
}

#header-custom h1 {
    font-size: clamp(24px, 4vw, 60px);
    margin: 0;
    /* h1 wird jetzt nur zentriert, da der Burger absolut positioniert ist und die Navi versteckt wird */
    flex-grow: 0; /* Stellt sicher, dass h1 nicht übermäßig wächst */
    white-space: nowrap; /* Verhindert Zeilenumbruch des Titels */
}

/* Styling für den Header-Home-Link */
#header-custom h1 .header-home-link {
    color: inherit; /* Nimmt die Textfarbe des Eltern-Elements (h1) an, also Weiß */
    text-decoration: none; /* Entfernt die Unterstreichung */
    cursor: pointer; /* Zeigt an, dass es klickbar ist */
    transition: color 0.3s ease; /* Sanfter Übergang beim Hover */
}

#header-custom h1 .header-home-link:hover,
#header-custom h1 .header-home-link:focus {
    color: grey; /* Ändert die Farbe beim Darüberfahren oder Fokussieren */
}

/* Spezifische Farben (falls in deinem HTML verwendet) */
#farbe1 {
    color: rgb(129, 196, 255);
}

#farbe2 {
    color: rgb(22, 88, 142);
}

#farbe3 {
    color: rgb(231, 34, 46);
}

/* --- Hamburger Navigation Styling --- */

/* Hamburger Icon */
.hamburger-menu {
    position: absolute; /* Absolut positioniert, um den Fluss nicht zu stören */
    right: 20px; /* Am rechten Rand platzieren */
    top: 50%; /* Vertikal zentrieren */
    transform: translateY(-50%); /* Vertikal zentrieren */
    display: flex; /* **IMMER display: flex, damit er sichtbar ist** */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200; /* Muss über dem Fullscreen-Menü liegen */
    outline: none; /* Keine Outline beim Fokus */
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Fullscreen Navigation Menü (Deine bestehende Nav-Klasse + fullscreen-nav) */
.fullscreen-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1.0); /* Schwarzer Hintergrund */
    justify-content: center;
    align-items: center;
    transform: translateX(100%); /* Startet außerhalb des Bildschirms (rechts) */
    transition: transform 0.5s ease-in-out;
    z-index: 150; /* Zwischen Header und dem Rest des Inhalts */
    visibility: hidden; /* Standardmäßig ausgeblendet */
    overflow: hidden; /* Verhindert Scrollen des Menüs selbst */
}

/* Menü ist aktiv (durch JavaScript hinzugefügt) */
.fullscreen-nav.is-active {
    transform: translateX(0); /* Schiebt das Menü in den Viewport */
    visibility: visible;
    display: flex !important; /* **WICHTIG: Setzt display: flex mit hoher Priorität, wenn aktiv** */
}

.fullscreen-nav ul.level_1 { /* Spezifischer auf deine ul abzielen */
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    width: 100%; /* Wichtig, damit li und a sich zentrieren können */
}

.fullscreen-nav ul.level_1 li {
    margin: 20px 0;
}

.fullscreen-nav ul.level_1 a {
    color: white; /* Weiße Schrift */
    text-decoration: none;
    font-size: clamp(30px, 8vw, 60px); /* Responsive Schriftgröße */
    transition: color 0.3s ease-in-out;
    display: block; /* Für größere Klickfläche */
    text-align: center; /* Text im Link zentrieren */
}

.fullscreen-nav ul.level_1 a:hover,
.fullscreen-nav ul.level_1 a:focus {
    color: grey; /* Hover-Effekt für Links */
}

/* Contao "invisible" Klasse anpassen, damit sie nicht das Menü beeinflusst */
.fullscreen-nav .invisible {
    display: none;
}

/* Animation des Hamburgers zu einem "X" */
.hamburger-menu.is-active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.is-active .bar:nth-child(2) {
    opacity: 0; /* Mittlerer Strich verschwindet */
}

.hamburger-menu.is-active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Media Queries für Header */
@media screen and (max-width: 767px) {
    #header-custom {
        height: 50px;
        padding: 0 15px;
    }
    .hamburger-menu {
        right: 15px;
    }
}

@media screen and (max-width: 479px) {
    #header-custom {
        height: 40px;
        padding: 0 10px;
    }
    .hamburger-menu {
        right: 10px;
    }
}
/*
======================================================================
  GRUNDEINSTELLUNGEN (ESSENZIELL)
======================================================================
*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: sans-serif;
}

/*
======================================================================
  MAIN-BEREICH
======================================================================
*/
#main-custom {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.image-gallery-container {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-gallery-container .content-image {
    position: relative;
    flex: 1 1 33.333%;
    max-width: 33.333%;
    height: 100%;
    overflow: hidden;
}

/*
======================================================================
  BILDER, TEXT & BUTTONS
======================================================================
*/
.image-gallery-container .content-image figure {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

.image-gallery-container .content-image figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease-in-out;
}

.image-gallery-container .content-image figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease-in-out;
}

.image-gallery-container .content-image h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 10;
    color: white;
    font-size: clamp(39px, 8vw, 80px);
    text-align: center;
    width: 90%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

/* Button-Styling mit vergrößertem Abstand und Skalierung */
.image-gallery-container .content-image .js-image-button {
    position: absolute;
    top: 50%;
    left: 50%;
    /* KORREKTUR: Abstand auf 80px erhöht UND um 30% skaliert */
    transform: translate(-50%, 80px) scale(1.3);
    z-index: 11;
    font-size: 1rem;
    font-weight: normal;
    padding: 5px 15px;
    border-radius: 0;
    border: 1px solid white;
    color: white;
    text-decoration: none;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

/*
======================================================================
  HOVER-EFFEKTE
======================================================================
*/
.image-gallery-container .content-image:hover figure::before {
    opacity: 0;
}

.image-gallery-container .content-image:hover figure img {
    transform: scale(1.1);
}

.image-gallery-container .content-image .js-image-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    /* Leichter zusätzlicher Zoom beim Hover */
    transform: translate(-50%, 80px) scale(1.35);
}

/*
======================================================================
  ANIMATIONEN (FLY-IN)
======================================================================
*/
.image-gallery-container .content-image h2,
.image-gallery-container .content-image .js-image-button {
    opacity: 0;
    transition: opacity 1.5s ease, transform 1.5s ease;
}

/* KORREKTUR: Beide Elemente starten UNTEN */
.image-gallery-container .content-image h2 {
    transform: translate(-50%, 0%);
}
.image-gallery-container .content-image .js-image-button {
    /* Skalierung muss auch im Startzustand vorhanden sein */
    transform: translate(-50%, 150px) scale(1.3);
}

/* Endposition der Animation (wenn .is-visible gesetzt wird) */
.image-gallery-container .content-image.is-visible h2 {
    opacity: 1;
    transform: translate(-50%, -100%);
    transition-delay: 0.5s;
}

.image-gallery-container .content-image.is-visible .js-image-button {
    opacity: 1;
    /* Fliegt zur neuen, skalierten Endposition */
    transform: translate(-50%, 80px) scale(1.3);
    transition-delay: 0.7s;
}

/*
======================================================================
  RESPONSIVE (für mobile Geräte)
======================================================================
*/
@media (max-width: 767px) {
    .image-gallery-container {
        flex-direction: column;
    }

    .image-gallery-container .content-image {
        max-width: 100%;
        height: 33.333%;
    }
}
