/* Grundlegendes Reset für ein konsistentes Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Sanftes Scrollen, wenn man auf einen Menüpunkt klickt */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    padding-top: 65px; /* Schiebt die Website exakt unter die fixierte Navbar */
    background-color: #001017; /* Verhindert den weißen Blitzer beim Scrollen */
    color: #001017; /* Setzt die Standard-Textfarbe auf das dunkle Blau */
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Links in der Leiste rechtsbündig ausrichten */
    align-items: center;
    padding: 1rem 2rem; /* Schmaleres Design */
    background-color: #001017;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Leichter Schatten */
    z-index: 1000;
    transition: top 0.3s ease-in-out; /* Weiche Animation beim Scrollen */
    min-height: 65px; /* Verhindert das Ruckeln der Navbar, wenn die Links ein-/ausgeblendet werden */
}

/* Logo in der Navbar */
.nav-logo {
    position: absolute;
    left: 2rem; /* Exakt spiegelverkehrt zum Burger-Menü (right: 2rem) */
    z-index: 1001;
    display: flex;
    align-items: center;
}

.nav-logo img {
    width: 28px; /* Exakt gleiche Breite wie die Striche des Burger-Menüs */
    height: 28px;
    object-fit: contain; /* Verhindert, dass das Bild verzerrt wird, falls es nicht exakt quadratisch ist */
    transition: transform 0.2s ease;
}

.nav-logo:hover img {
    transform: scale(1.1); /* Kleiner Hover-Effekt, wenn man mit der Maus darüber fährt */
}

/* Der Burger-Button */
.menu-toggle {
    position: absolute;
    right: 2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    transition: transform 0.2s ease;
}

.menu-toggle:hover {
    transform: scale(1.1); /* Gleicher Hover-Effekt wie beim Logo */
}

.bar {
    width: 28px;
    height: 3px;
    background-color: #50bdc1;
    transition: all 0.3s ease-in-out;
}

/* Aus 3 Strichen wird ein 'X', wenn aktiv */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: -100px; /* Standardmäßig versteckt (außerhalb des Bildschirms) */
    right: calc(2rem - 8px); /* Exakt zentriert unter dem 28px breiten Burger-Menü */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* Kompaktere Pille / Kreis */
    height: 44px; /* Kreisförmig */
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    transition: bottom 0.3s ease-in-out;
}

.arrow-up {
    width: 14px;
    height: 14px;
    border-top: 3px solid #50bdc1;
    border-left: 3px solid #50bdc1;
    transform: translateY(3px) rotate(45deg); /* Erzeugt einen nach oben zeigenden Pfeil und zentriert ihn optisch */
}

/* Navigations-Links */
.nav-list {
    display: none; /* Standardmäßig versteckt */
    flex-direction: row;
    justify-content: flex-end; /* Links rechtsbündig ausrichten */
    flex-wrap: wrap; /* Falls auf dem Handy nicht genug Platz ist */
    align-items: center;
    gap: 2rem; /* Etwas mehr Abstand zwischen den Wörtern */
    list-style: none;
    padding-right: 50px; /* Platz für das Burger-Menü lassen, damit nichts überlappt */
    padding-left: 50px; /* Platz für das neue Logo lassen */
}

.nav-list.active {
    display: flex; /* Einblenden, wenn das Burger-Menü geklickt wird */
}

.nav-list li {
    margin: 0;
}

.nav-list a {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    transition: color 0.2s;
}

.nav-list a:hover {
    color: #50bdc1; /* Hover Effekt */
}

/* Styling für den Header mit großem Bild */
.hero-header {
    background-color: #000;
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-content {
    width: 100%;
}

.header-content a {
    display: block;
    width: 100%;
}

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

/* Stellt sicher, dass der Textbereich wieder auf einem weißen Hintergrund liegt */
main {
    background-color: #ffffff;
}

/* Layout für Content-Sektionen */
.content-section {
    padding: 4rem 20px;
    width: 100%;
}

/* Alternierende Hintergrundfarbe zur optischen Trennung der Sektionen */
.alt-bg {
    background-color: rgba(80, 189, 193, 0.1); /* Sehr helle Variante von #50bdc1 (10% Deckkraft) */
}

/* Container zur Begrenzung der Textbreite (für bessere Lesbarkeit) */
.container {
    max-width: 850px;
    margin: 0 auto;
}

/* Begrenzt die maximale Zeilenbreite für die "Jetzt handeln"-Sektion, damit es auf dem Desktop stimmig bleibt */
#jetzt-handeln .container {
    max-width: 1100px;
}

.container h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #001017;
}

.container p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.container ul,
.container ol {
    margin: 1rem 0 1.5rem 2rem;
    font-size: 1.1rem;
}

.container li {
    margin-bottom: 0.5rem;
}

.action-container {
    display: flex;
    gap: 2.5rem; /* Einheitlicher Abstand für ein harmonisches Gesamtbild */
    align-items: stretch; /* Zieht beide Spalten auf die exakt gleiche Höhe */
}

.action-text {
    flex: 1;
    background-image: url('images/NKG_Verlauf.webp');
    background-size: cover;
    background-position: center;
    padding: 2.5rem;
    border-radius: 15px;
}

.action-text h2,
.action-text p,
.action-text li,
.action-text strong {
    color: #ffffff;
}

.action-qr {
    flex: 1; /* Teilt den Platz nun exakt 50:50 mit dem Textkasten auf */
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriert QR-Code und Button horizontal */
    justify-content: space-between; /* Verteilt Elemente an den oberen und unteren Rand */
    gap: 2.5rem; /* Einheitlicher Abstand, der auch beim Umbrechen greift */
}

.action-qr a {
    display: block;
    width: 100%; /* Stellt sicher, dass die Elemente die volle Spaltenbreite nutzen können */
}

.qr-code-container {
    position: relative;
    width: 100%; /* Skaliert auf die volle Breite seiner Spalte */
    max-width: 100%;
    border: 4px solid #50bdc1;
    border-radius: 15px; /* Gleiche Rundung wie beim Textkasten */
    overflow: hidden; /* Stellt sicher, dass die Ecken der Bilder nicht über den Rahmen ragen */
}

.qr-code-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease-in-out; /* Weiche Einblendung für den Hover-Effekt */
}

/* Das Hover-Bild, welches standardmäßig unsichtbar direkt über dem ersten liegt */
.qr-code-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; 
}

.qr-code-container:hover .qr-code-hover {
    opacity: 1; /* Blendet das Hover-Bild beim Darübergleiten mit der Maus ein */
}

/* Styling für den neuen Illustrator-Button */
.action-button-img {
    width: 106.69%; /* Skaliert die SVG, sodass die Pille genau 100% der Box einnimmt */
    max-width: none; /* Überschreibt das Standardverhalten, damit die Grafik größer als 100% sein darf */
    margin-left: -1.26%; /* Zentriert die Pille, indem der freie Platz links ausgeglichen wird */
    margin-top: -1.3%; /* Zieht die Pille oben bündig an den Rand */
    height: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.action-button-link:hover .action-button-img {
    transform: translateY(-3px); /* Fährt beim Drübergehen leicht nach oben */
    filter: brightness(1.1); /* Wird leicht heller */
}

/* --- Footer --- */
.site-footer {
    background-color: #001017;
    padding: 3rem 20px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center; /* Zentriert Text und Logo vertikal auf einer Linie */
    gap: 2rem;
}

.footer-content a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    width: 28px; /* Exakt gleiche Breite wie in der Navbar */
    height: 28px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.footer-logo:hover img {
    transform: scale(1.1); /* Gleicher sanfter Hover-Effekt wie in der Navbar */
}

.footer-content a:hover {
    color: #50bdc1;
}

/* Responsives Navigations-Layout für Smartphones und Tablets */
@media (max-width: 768px) {
    .nav-list {
        gap: 1rem; /* Weniger Abstand auf kleinen Bildschirmen */
    }
    .nav-list a {
        font-size: 1rem; /* Auf kleinen Displays minimal kleiner, damit alles nebeneinander passt */
    }
}

/* Umbruch für die "Jetzt handeln"-Sektion auf Tablets (iPad) und Smartphones */
@media (max-width: 900px) {

    .action-container {
        flex-direction: column;
        align-items: stretch; /* Zieht den Textkasten auf die volle Breite */
    }

    .qr-code-container {
        margin: 0 auto;
        max-width: 380px; /* Verhindert, dass der Code auf dem Tablet riesig wird, und hält ihn in seiner vorherigen Größe */
    }

    .action-button-link {
        margin: 0 auto;
        max-width: 380px; /* Verhindert, dass auch der Button auf kleinen Displays zu groß wird */
    }
}

/* --- Cookie / Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #001017;
    color: #ffffff;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    padding: 1.5rem 20px;
    border-top: 3px solid #50bdc1;
    display: none; /* Standardmäßig versteckt, wird via JS eingeblendet */
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 850px;
    margin: 0 auto;
}

.cookie-content h3 {
    color: #50bdc1;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.cookie-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.cookie-content a {
    color: #50bdc1;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn-primary, .cookie-btn-secondary {
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn-primary {
    background-color: #50bdc1;
    color: #ffffff;
}

.cookie-btn-primary:hover {
    background-color: #ffffff;
    color: #001017;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #50bdc1;
}

.cookie-btn-secondary:hover {
    background-color: rgba(80, 189, 193, 0.1);
}