/* --- Globale Stile & Mobile First --- */
body {
    margin: 0;
    font-family: 'Comfortaa', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f8f8;
    color: #555;
    overflow-x: hidden;
    padding-top: 20px;
    padding-bottom: 20px;
}

.header-wrapper {
    width: 90%;
    max-width: 500px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.main-title {
    font-family: 'Quicksand', sans-serif;
    color: orange;
    text-align: center;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0;
    white-space: normal;
    font-size: 1.8em;
}

.container {
    position: relative;
    max-width: 1200px;
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    overflow: hidden;
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

.background-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

.text-bubble {
    position: static;
    width: 90%;
    max-width: 500px;
    padding: 20px 25px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    color: #666;
    line-height: 1.2;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    font-size: 1.05em;
    margin-bottom: 20px;
    box-sizing: border-box;
    text-align: left;
    z-index: 10;
}

.text-bubble p {
    margin-bottom: 4px;
}

.text-bubble a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.text-bubble a:hover {
    text-decoration: underline;
}

.qr-code-bubble {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
}

.qr-code-container {
    margin: 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.qr-code {
    width: 100px;
    height: 100px;
    display: block;
}


/* --- Desktop-Anpassungen (ab 901px Breite) --- */
@media (min-width: 901px) {
    body {
        justify-content: center;
        padding: 0;
    }

    .header-wrapper {
        position: absolute;
        top: 2%;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: none;
        margin: 0;
        z-index: 20;
    }

    .main-title {
        font-size: 2.5em;
        background-color: rgba(255, 255, 255, 0.75);
        padding: 12px 30px;
        border-radius: 20px;
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
        white-space: nowrap;
    }

    .container {
        display: block;
        width: 100%;
        margin: 20px;
    }

    .background-image {
        margin-bottom: 0;
    }

    .text-bubble {
        position: absolute;
        margin: 0;
        width: auto;
        max-width: 45%;
    }

    .bottom-left {
        bottom: 2%;
        left: 2%;
    }

    .bottom-right {
        bottom: 2%;
        right: 2%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .qr-code-bubble {
        bottom: 24%;
        right: 2%;
        max-width: fit-content;
        padding: 15px;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
        border-radius: 25px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .qr-code-container {
        margin: 0;
        padding: 0;
    }
}

/* --- Kleinere Mobile Anpassungen --- */
@media (max-width: 500px) {
    .main-title {
        font-size: 1.4em;
        white-space: normal;
        padding: 10px;
    }
    .text-bubble p {
        font-size: 0.9em;
    }
    .qr-code {
        width: 80px;
        height: 80px;
    }
    .qr-code-bubble {
        padding: 10px;
    }
}


/* --- Impressum Modal Stile --- */
.footer {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

.impressum-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.impressum-link:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

.impressum-link i {
    margin-right: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    /* padding-top: 60px; <-- ENTFERNT */
    box-sizing: border-box;
}

.modal-content {
    background-color: #fefefe;
    /* margin: 5% auto; <-- ENTFERNT, da Flexbox zentriert */
    padding: 30px; /* Standard-Padding für Mobile */
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #333;
    line-height: 1.6;
    font-size: 1em;
    overflow-y: auto; /* Scrollen innerhalb des Modals, falls Inhalt zu lang */
    max-height: 90vh; /* Begrenzt die Höhe des Modals auf 90% der Viewport-Höhe */
    box-sizing: border-box; /* Wichtig für Padding/Width Berechnung */
}

/* NEUE KLASSE FÜR DEN IMPRESSUM-INHALT */
.impressum-inner-content {
    padding: 0; /* Keinen Standard-Padding von hier */
    max-width: 100%; /* Stellt sicher, dass es nicht überläuft */
    box-sizing: border-box;
}

.modal-content h1 {
    font-family: 'Quicksand', sans-serif;
    color: #4CAF50;
    font-size: 2.2em;
    margin-bottom: 10px;
}
/* NEU: Stile für die Überschrift im Impressum, wenn sie die Bootstrap-Klasse fw-bold hat */
.modal-content .fw-bold {
    font-weight: 700 !important; /* !important um Bootstrap-Styles zu überschreiben */
}
/* NEU: Stile für den Text im Impressum, wenn er die Bootstrap-Klasse text-muted hat */
.modal-content .text-muted {
    color: #6c757d !important; /* !important um Bootstrap-Styles zu überschreiben */
}


.modal-content h2 {
    font-family: 'Quicksand', sans-serif;
    color: #FF9800;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 8px;
}

.modal-content p {
    margin-bottom: 10px;
}
/* NEU: Anpassung für Bootstrap-Klassen mb-4 und mb-5, falls sie noch da sind */
.modal-content .mb-4 {
    margin-bottom: 1.5rem !important; /* Standard Bootstrap-Abstand */
}
.modal-content .mb-5 {
    margin-bottom: 3rem !important; /* Standard Bootstrap-Abstand */
}


.modal-content a {
    color: #2196F3;
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}


.close-button {
    color: #aaa;
    float: right; /* Könnte bei Flexbox-Zentrierung Probleme machen, daher absolute Positionierung sicherer */
    font-size: 35px;
    font-weight: bold;
    position: absolute; /* Absolut im Modal-Content positioniert */
    top: 10px;
    right: 20px;
    z-index: 1001; /* Über dem Inhalt des Modals */
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Responsivität für Impressum-Modal */
@media (min-width: 601px) { /* Hier anpassen, ab welcher Breite das Padding greifen soll */
    .modal-content {
        padding: 30px; /* Einheitliches Padding rundherum */
    }
    .impressum-inner-content {
        /* Hier steuern wir jetzt die Einrückung des Inhalts */
        padding: 0 2%; /* 2% links und rechts Einrückung des Impressumstextes */
    }
}

@media (max-width: 600px) {
    .modal-content {
        margin: 20px auto;
        padding: 20px;
        width: 95%;
    }
    .modal-content h1 {
        font-size: 1.8em;
    }
    .modal-content h2 {
        font-size: 1.1em;
    }
    .impressum-inner-content {
        padding: 0; /* Auf kleinen Bildschirmen keinen extra Innen-Padding */
    }
}
