@font-face {
    font-family: Poppins-Bold;
    src: url("../fonts/Poppins-Bold.ttf");
    font-display: block;
    /* text is invisible if font is not loaded */
}

@font-face {
    font-family: Poppins-Light;
    src: url("../fonts/Poppins-Light.ttf");
    font-display: block;
    /* text is invisible if font is not loaded */
}

@font-face {
    font-family: Poppins-ExtraLight;
    src: url("../fonts/Poppins-ExtraLight.ttf");
    font-display: block;
    /* text is invisible if font is not loaded */
}

::-moz-selection {
    /* Code for Firefox */
    color: rgb(255, 255, 255);
    background: #534b42;
}

::selection {
    color: rgb(255, 255, 255);
    background: #534b42;
}

html {
    -webkit-text-size-adjust: 100%;
    /* Prevent font scaling in landscape while allowing user zoom */
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
}

.brown-box {
    background-color: rgb(225, 219, 209);
    position: absolute;
    inset: 35px;
    border-radius: 35px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Footer Buttons */
.footer-buttons {
    position: absolute;
    bottom: 50px;
    left: 50px;
    display: flex;
    flex-direction: column;
}

.footer-btn {
    background: none;
    border: none;
    font-family: Poppins-ExtraLight;
    font-size: 11px;
    color: #534b42 !important; /* !important für mobile Browser */
    cursor: pointer;
    text-align: left;
    padding: 2px 0;
    transition: opacity 0.3s ease;
    -webkit-appearance: none; /* Entfernt Safari/iOS Styling */
    -moz-appearance: none; /* Entfernt Firefox Styling */
    appearance: none; /* Entfernt Standard-Button-Styling */
    text-decoration: none; /* Entfernt mögliche Unterstreichungen */
}

.footer-btn:hover {
    opacity: 0.7;
    color: #534b42 !important; /* Auch bei Hover */
}

.footer-btn:focus {
    color: #534b42 !important; /* Auch bei Focus */
    outline: none; /* Entfernt Focus-Outline */
}

.footer-btn:active {
    color: #534b42 !important; /* Auch bei Active */
}

/* Spezifisch für die Spans innerhalb der Buttons */
.footer-btn span {
    color: #534b42 !important;
}

/* Seiten Content - Scrollbar früher aktivieren */
.page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    text-align: center;
    padding: 0px;
    /* Mehr Platz unten für Back-Button */
    overflow-y: auto;
    /* Scrollbar immer verfügbar */
    max-height: calc(100vh - 30px);
    /* Begrenzt die Höhe früher */
    justify-content: center;
}

.page-content.hidden {
    display: none;
}

.content-text {
    max-width: 900px;
    /* Vergrößert für 3 Spalten */
    margin: 0px;
}

.content-text p {
    font-family: Poppins-ExtraLight;
    font-size: 14px;
    color: #534b42;
    line-height: 1.6;
}

/* Spezielle Styling für Datenschutz-Seite */
#privacy-content .content-text {
    max-width: 1000px;
}

#privacy-content .content-text p {
    column-count: 3;
    column-gap: 30px;
    column-rule: 1px solid rgba(83, 75, 66, 0.2);
    text-align: justify;
    font-size: 12px;
    /* Etwas kleiner für bessere Lesbarkeit */
}

/* Back-Button sticky positionieren */
.back-btn {
    margin-top: 30px;
    padding: 10px 20px;
    background-color: rgba(185, 182, 174, 0.95);
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 12px;
    font-family: Poppins-Bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: sticky;
    bottom: 0px;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background-color: rgba(185, 182, 174, 0.3);
}

.logo {
    position: absolute;
    top: 50px;
    left: 50px;
    font-size: 16px;
    font-family: Poppins-Bold;
}

.language-switcher {
    position: absolute;
    top: 45px;
    right: 50px;
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: Poppins-Bold;
    font-size: 16px;
    color: #5d5d5d;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #000000;
    background-color: rgba(185, 182, 174, 0.3);
}

.lang-btn.active {
    color: #000000;
    background-color: rgb(185, 182, 174);
}

/* Standardmäßig Englisch anzeigen */
.lang-en {
    display: block;
}

.lang-de {
    display: none;
}

/* Wenn Deutsch aktiv ist */
body.german .lang-de {
    display: block;
}

body.german .lang-en {
    display: none;
}

h1 {
    font-size: 30px;
    font-family: Poppins-Bold;
    line-height: 1.2;
    margin: 50px 0 40px 0;
    text-align: center;
    /* Explizit zentrieren */
    width: 100%;
}

h2 {
    font-size: 16px;
    font-family: Poppins-ExtraLight;
    line-height: 1.2;
    margin: 0 0 12px 0;
    text-align: center;
    /* Explizit zentrieren */
    width: 100%;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 0px;
    width: 100%;
    max-width: 500px;
    /* Vergrößert von 300px auf 500px */
}

.form-container {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    /* Begrenzt nur das E-Mail-Feld + Button */
}

input[type="email"] {
    padding: 10px;
    border: 0px;
    border-radius: 12px;
    font-size: 14px;
    background-color: rgb(185, 182, 174);
    font-family: Poppins-ExtraLight;
    color: #534b42;
    flex: 1;
    max-width: 250px;
    /* Maximale Breite hinzufügen */
}

.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    background-color: rgb(185, 182, 174);
    color: rgb(0, 0, 0);
    font-family: Poppins-Bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-width: 200px;
    /* Maximale Breite hinzufügen */
}

.submit-btn:hover {
    background-color: rgba(185, 182, 174, 0.3);
    color: #000000;
}

input[type="email"]::placeholder {
    color: #5d5d5d;
    font-size: 14px;
    font-family: Poppins-ExtraLight;
}

.privacy-notice {
    margin-top: 0px;
    text-align: center;
    width: 100%;
    /* Ändert von 500px auf 100% */
    max-width: 500px;
    /* Maximale Breite bleibt */
}

.privacy-notice p {
    font-family: Poppins-ExtraLight;
    font-size: 11px;
    color: #534b42;
    margin: 0;
    opacity: 0.8;
}

.feedback {
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#message {
    display: none;
    font-size: 16px;
    font-family: Poppins-ExtraLight;
    font-weight: bold;
    opacity: 1;
    transition: opacity 1s ease;
    margin-top: -10px;
}

.spinner {
    margin: auto 0;
}

.hidden {
    display: none;
}

/* Spezielle Styling für Impressum-Seite */
#impressum-content .content-text {
    max-width: 1000px;
}

#impressum-content .content-text p {
    column-count: 2;
    column-gap: 40px;
    column-rule: 1px solid rgba(83, 75, 66, 0.2);
    text-align: justify;
    font-size: 13px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Anpassungen - Footer Buttons früher ausblenden */
@media only screen and (max-height: 700px) {
    /* NUR bei aktiven Textseiten ausblenden */
    #impressum-content:not(.hidden) ~ .footer-buttons,
    #privacy-content:not(.hidden) ~ .footer-buttons {
        display: none;
    }
}
/*
@media only screen and (max-height: 800px) {
    .page-content {
        justify-content: flex-start;
    }
}    */

/* Tablet/Laptop Anpassungen */
@media only screen and (max-width: 1200px) {
    .page-content {
        max-height: calc(100vh - 40px);
    }
}

/* Für kleinere Bildschirme auf 2 Spalten reduzieren */
@media only screen and (max-width: 900px) {
    #privacy-content .content-text p {
        column-count: 2;
        column-gap: 20px;
    }
}

@media only screen and (max-width: 1420px) {
    /* Footer Buttons nur bei aktiven Textseiten ausblenden */
    #impressum-content:not(.hidden) ~ .footer-buttons,
    #privacy-content:not(.hidden) ~ .footer-buttons {
        display: none;
    }
}

@media only screen and (max-width: 768px) {    
    /* Impressum und Datenschutz auf 1 Spalte */
    #impressum-content .content-text p,
    #privacy-content .content-text p {
        column-count: 1;
        column-gap: 0;
        column-rule: none;
        font-size: 12px;
    }
    
    .content-text {
        max-width: 100%;
        margin: 0px;
    }
}

/* Für kleinere Bildschirme auf 1 Spalte reduzieren */
@media only screen and (max-width: 700px) {
    #impressum-content .content-text p {
        column-count: 1;
        column-gap: 0;
        column-rule: none;
    }
}

@media only screen and (max-width: 619px) {
    h1 {
        max-width: 300px;
        margin: 50px auto 40px auto;
        /* Auto-Margin für Zentrierung */
        text-align: center;
    }
}

@media only screen and (max-width: 534px) {
    #h2DE {
        max-width: 250px;
        margin: 0 auto 12px auto;
        /* Auto-Margin für Zentrierung hinzufügen */
        text-align: center;
        /* Explizit zentrieren */
    }
}

@media only screen and (max-width: 530px) {
    .brown-box {
        inset: 10px;
    }

    .logo {
        top: 25px;
        left: 25px;
    }

    .language-switcher {
        top: 20px;
        right: 25px;
    }

    .footer-buttons {
        bottom: 25px;
        left: 25px;
    }
}

@media only screen and (max-width: 480px) {
    /* Form responsive machen */
    .form-container {
        max-width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    input[type="email"] {
        width: 100%;
        max-width: 250px;
        font-size: 16px;
    }

    .submit-btn {
        width: 100%;
        width: 270px;
        max-width: 270px;
    }

    /* Noch kleinere Schrift für sehr kleine Displays */
    #impressum-content .content-text p,
    #privacy-content .content-text p {
        font-size: 11px;
        line-height: 1.4;
    }

    /* Footer Buttons nur bei aktiven Seiten ausblenden */
    #impressum-content:not(.hidden) ~ .footer-buttons,
    #privacy-content:not(.hidden) ~ .footer-buttons {
        display: none;
    }

    .back-btn {
        font-size: 12px;
    }

    h2 {
        max-width: 200px;
        margin: 0 auto 12px auto;
        /* Auto-Margin für Zentrierung */
        text-align: center;
    }
}

@media only screen and (max-height: 600px) {
    .brown-box {
        inset: 10px;
    }

    .logo {
        top: 25px;
        left: 25px;
    }

    #privacy-content .content-text p {
        column-count: 1;
        column-gap: 0;
        column-rule: none;
    }

    .language-switcher {
        top: 20px;
        right: 25px;
    }

    .footer-buttons {
        bottom: 25px;
        left: 25px;
    }
}

@media only screen and (max-height: 480px) {
    .logo {
        display: none;
    }
}

@media only screen and (max-width: 350px) {
    input[type="email"] {
        max-width: 200px;
        padding: 8px;
        font-size: 14px;
    }

    .submit-btn {
        max-width: 216px;
        padding: 8px 15px;
        font-size: 13px;
    }

    .privacy-notice p {
        font-size: 10px;
    }

    #impressum-content .content-text p,
    #privacy-content .content-text p {
        font-size: 10px;
        line-height: 1.3;
    }
}