/* Logo-Styling mit responsiven Eigenschaften */

/* Grundeinstellungen für Logo-Container */
.logo-container {
    display: block;
    width: 100%;
    height: auto;
    max-width: 180px;
    margin: 0 auto 25px auto;
    background-image: url('../img/Logo1.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    position: relative;
}

/* Logo als Hintergrundbild mit festgelegtem Seitenverhältnis */
.logo-background {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* Seitenverhältnis anpassen (Höhe/Breite * 100%) */
}

/* Logo im Footer */
footer .logo-container {
    max-width: 120px;
    margin: 0 auto 15px auto;
}

/* Logo-Hover-Effekt */
.logo-container:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 5px 15px rgba(0, 131, 143, 0.2));
}

/* Flexible Kopfzeile für alle Modals */
.modal-header-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.modal-header-flex .content-text {
    flex: 2;
}

.modal-header-flex .logo-container {
    flex: 1;
    max-width: 250px;
    /* 75% größer als ursprünglich */
    margin: 0;
    align-self: flex-start;
}

/* Spezifische Anpassungen für verschiedene Modals */
#aboutModal .modal-header-flex,
#kontaktModal .modal-header-flex,
#impressumModal .modal-header-flex,
#datenschutzModal .modal-header-flex {
    display: flex;
    flex-direction: row;
    margin-bottom: 25px;
}

/* Vergrößerung auf Desktop */
@media (min-width: 992px) {
    .modal-header-flex .logo-container {
        max-width: 300px;
        /* Noch größer auf Desktop */
    }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .modal-header-flex {
        flex-direction: column;
    }

    .modal-header-flex .logo-container {
        order: -1;
        /* Logo erscheint zuerst auf mobilen Geräten */
        max-width: 200px;
        margin: 0 auto 20px auto;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .modal-header-flex .logo-container {
        max-width: 180px;
    }

    footer .logo-container {
        max-width: 100px;
    }
}

/* Responsive Bildanpassungen */

/* Responsive Bildanpassungen für .bild, .bild1 und .bild2 Klassen - mit 8K-Unterstützung */

/* Logo-Styling mit responsiven Eigenschaften */

/* Grundeinstellungen für Logo-Container */
.logo-container {
    display: block;
    width: 100%;
    height: auto;
    max-width: 180px;
    margin: 0 auto 25px auto;
    background-image: url('../img/Logo1.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    position: relative;
}

/* Logo als Hintergrundbild mit festgelegtem Seitenverhältnis */
.logo-background {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* Seitenverhältnis anpassen (Höhe/Breite * 100%) */
}

/* Logo im Footer */
footer .logo-container {
    max-width: 120px;
    margin: 0 auto 15px auto;
}

/* Logo-Hover-Effekt */
.logo-container:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 5px 15px rgba(0, 131, 143, 0.2));
}

/* Flexible Kopfzeile für alle Modals */
.modal-header-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.modal-header-flex .content-text {
    flex: 2;
}

.modal-header-flex .logo-container {
    flex: 1;
    max-width: 250px;
    /* 75% größer als ursprünglich */
    margin: 0;
    align-self: flex-start;
}

/* Spezifische Anpassungen für verschiedene Modals */
#aboutModal .modal-header-flex,
#kontaktModal .modal-header-flex,
#impressumModal .modal-header-flex,
#datenschutzModal .modal-header-flex {
    display: flex;
    flex-direction: row;
    margin-bottom: 25px;
}

/* Vergrößerung auf Desktop */
@media (min-width: 992px) {
    .modal-header-flex .logo-container {
        max-width: 300px;
        /* Noch größer auf Desktop */
    }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .modal-header-flex {
        flex-direction: column;
    }

    .modal-header-flex .logo-container {
        order: -1;
        /* Logo erscheint zuerst auf mobilen Geräten */
        max-width: 200px;
        margin: 0 auto 20px auto;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .modal-header-flex .logo-container {
        max-width: 180px;
    }

    footer .logo-container {
        max-width: 100px;
    }
}

/* ========================== */
/* RESPONSIVE BILDANPASSUNGEN */
/* ========================== */

/* UNIVERSELLE SICHERHEITSREGEL - Diese Regel stellt sicher, dass die Bilder IMMER angezeigt werden */
.bild,
.bild1,
.bild1 img,
.bild2 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Basiseinstellungen für den äußeren Bildcontainer */
.bild {
    width: 100%;
    overflow: hidden;
    margin: 0 0 15px 0;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
    max-width: 100%;
}

.bild:hover {
    box-shadow: 0 6px 15px rgba(21, 101, 192, 0.2);
    transform: scale(1.01);
}

/* Innerer Container für das Bild */
.bild1 {
    position: relative;
    width: 100%;
    min-height: 160px;
    /* Minimale Höhe verringert für bessere Konsistenz */
    max-height: 400px;
    height: clamp(160px, 30vw, 400px);
    /* Clamp für bessere Responsivität */
    overflow: hidden;
}

/* Farbverlauf-Overlay */
.bild2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(21, 101, 192, 0.4), rgba(100, 181, 246, 0.1));
    z-index: 1;
}

/* Bildformatierung innerhalb des Containers */
.bild1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 0;
}

.bild1 img:hover {
    transform: scale(1.05);
}

/* ==================== */
/* 8K und größere Displays (ab 3840px) */
/* ==================== */
@media (min-width: 3840px) {
    .bild1 {
        min-height: 220px;
        max-height: 500px;
        height: clamp(220px, 15vw, 500px);
    }
}

/* 4K Displays (2560px - 3839px) */
@media (min-width: 2560px) and (max-width: 3839px) {
    .bild1 {
        min-height: 200px;
        max-height: 450px;
        height: clamp(200px, 18vw, 450px);
    }
}

/* Große Desktop-Bildschirme */
@media (min-width: 1440px) and (max-width: 2559px) {
    .bild1 {
        min-height: 200px;
        max-height: 400px;
        height: clamp(200px, 20vw, 400px);
    }
}

/* Standard Desktop-Bildschirme */
@media (min-width: 1200px) and (max-width: 1439px) {
    .bild1 {
        min-height: 190px;
        max-height: 350px;
        height: clamp(190px, 22vw, 350px);
    }
}

/* Kleine Desktop-Bildschirme und Laptops */
@media (min-width: 992px) and (max-width: 1199px) {
    .bild1 {
        min-height: 180px;
        max-height: 300px;
        height: clamp(180px, 25vw, 300px);
    }
}

/* Tablets im Querformat und kleinere Laptops */
@media (min-width: 781px) and (max-width: 991px) {
    .bild1 {
        min-height: 170px;
        max-height: 280px;
        height: clamp(170px, 30vw, 280px);
    }
}

/* ==================== */
/* KRITISCHE BREAKPOINTS - Spezielle Behandlung für problematische Bildschirmgrößen */
/* ==================== */

/* KRITISCHES FENSTER: Um den 769px Breakpoint (769px-780px) */
@media (min-width: 769px) and (max-width: 780px) {
    .bild {
        display: block !important;
        visibility: visible !important;
        margin-bottom: 15px !important;
    }

    .bild1 {
        min-height: 160px !important;
        height: 45vw !important;
        max-height: none !important;
    }

    .bild1 img {
        object-fit: cover !important;
    }
}

/* Lösung für genau 769px - punktgenau für diesen Breakpoint */
@media (width: 769px) {
    .bild1 {
        height: 45vw !important;
        min-height: 160px !important;
    }
}

/* ÜBERGANGSBEREICH: 768px-769px - Extra-Sicherheit für den häufigsten Bootstrap-Breakpoint */
@media (min-width: 767px) and (max-width: 769px) {

    .bild,
    .bild1,
    .bild2,
    .bild1 img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .bild1 {
        min-height: 160px !important;
        height: 45vw !important;
        max-height: none !important;
    }
}

/* ==================== */
/* MOBILE GERÄTE - Konsistente Darstellung auf kleineren Bildschirmen */
/* ==================== */

/* Tablets im Hochformat und große Smartphones */
@media (min-width: 576px) and (max-width: 768px) {
    .bild1 {
        min-height: 160px !important;
        height: 40vw !important;
        max-height: none !important;
    }

    .bild1 img {
        object-fit: cover !important;
    }
}

/* Spezifisch für 768px genau */
@media (width: 768px) {
    .bild1 {
        min-height: 160px !important;
        height: 40vw !important;
        max-height: none !important;
        display: block !important;
        visibility: visible !important;
    }
}

/* Smartphones im Querformat */
@media (min-width: 481px) and (max-width: 575px) {
    .bild1 {
        min-height: 150px !important;
        height: 45vw !important;
        max-height: none !important;
    }
}

/* Smartphones im Hochformat */
@media (min-width: 361px) and (max-width: 480px) {
    .bild1 {
        min-height: 140px !important;
        height: 50vw !important;
        max-height: none !important;
    }
}

/* Sehr kleine Smartphones */
@media (max-width: 360px) {
    .bild1 {
        min-height: 130px !important;
        height: 55vw !important;
        max-height: none !important;
    }
}

/* ABSOLUTE FALLBACK-LÖSUNG für alle Geräte */
@media all {

    .bild,
    .bild1,
    .bild2,
    .bild1 img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}