/* style.css – bereinigt und für Desktop/Mobil optimiert */

/* =========================================================
   Grundlayout
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0 0 100px;
    width: 100%;
    background-color: #000;
    color: grey;
    font-size: 16px;
    line-height: 1.5;
}

/* Bilder und Videos niemals breiter als ihr Container */
img,
video {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   Header / Logo
   ========================================================= */

.header,
.logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================================================
   Allgemeine Boxen
   ========================================================= */

.box,
.box-frame {
    width: 90%;
    max-width: 600px;
    height: auto !important;
    min-height: 0 !important;
    margin: 16px auto;
    padding: 12px;
    display: flow-root;
    background-color: rgba(128, 128, 128, 0.7);
}

.boxtext1 {
    text-align: center;
    color: #f5f5f5;
    overflow-wrap: anywhere;
}


/* =========================================================
   Fließtext / Inhalte
   ========================================================= */

.content-text {
    padding: 0 8px;
    color: #f5f5f5;
    text-align: left;
}

.content-image {
    float: right;
    max-width: 40%;
    height: auto;
    margin: 0 0 15px 15px;
    background-color: #c7d177;
    box-shadow: 10px 20px 15px silver;
    border-radius: 20px;
}

h4 {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #f0f0f0;
}


/* =========================================================
   Navigation
   ========================================================= */

nav {
    width: 100%;
    background-color: #221e1f;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
}

nav a:hover,
nav a:focus {
    background-color: #575757;
}


/* =========================================================
   Startbild
   ========================================================= */

.startbild {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   Zoom / Bildvergrößerung
   ========================================================= */

.zoom-hover {
    cursor: pointer;
}

.zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.zoom-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
}


/* =========================================================
   Spacer / Video
   ========================================================= */

.spacer {
    width: 100%;
    height: 80px;
}

video {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}


/* =========================================================
   Footer
   ========================================================= */

/*
   Der Footer bleibt am unteren Bildschirmrand.
   Das ADAC-Bild wird auf großen Bildschirmen auf max. 650px
   begrenzt, damit es nicht übermäßig groß dargestellt wird.
*/

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    padding: 6px 10px;
    background-color: #5c5e5d;
    text-align: center;
}

.footer img {
    display: block;
    width: 100%;
    max-width: 650px;
    max-height: 150px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}


/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width: 480px) {
    .content-image {
        float: none;
        display: block;
        max-width: 60%;
        margin: 0 auto 15px;
    }
}


/* =========================================================
   Kleine / mittlere Bildschirme
   ========================================================= */

@media (max-width: 800px) {
    .box,
    .box-frame {
        width: auto !important;
        max-width: 100% !important;
        margin-right: 10px !important;
        margin-left: 10px !important;
        padding: 10px !important;
    }

    .zoom img {
        float: none !important;
        display: block;
        margin: 15px auto !important;
    }
}


/* =========================================================
   Tablet / Desktop
   ========================================================= */

@media (min-width: 600px) {
    .box {
        width: 80%;
    }

    nav a {
        padding: 14px 20px;
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    /*
       Der Footer kann auf Desktop bis zu ca. 160px hoch werden.
       Deshalb etwas mehr Platz am unteren Seitenende reservieren.
    */
    body {
        padding-bottom: 170px;
    }

    .spacer {
        height: 250px;
    }

    .zoom-hover {
        transition: transform 0.9s ease;
    }

    .zoom-hover:hover {
        position: relative;
        z-index: 100;
        transform: scale(2.2);
    }
}
