/*
    
## ## ## ## ##  ##              ## ## ## ## ##  ## ## ## ## ##  ## ## ## ## ##  ##          ##  ## ## ## ## ##  ## ## ## ## ##
##              ##              ##          ##  ##          ##  ##          ##  ## ##       ##  ##                    ##
##              ##              ##          ##  ##          ##  ##          ##  ##  ##      ##  ##                    ##
##    ## ## ##  ##              ##          ##  ## ## ## ##     ##          ##  ##    ##    ##  ## ## ## ## ##        ##
##          ##  ##              ##          ##  ##          ##  ##          ##  ##      ##  ##  ##                    ##
##          ##  ##              ##          ##  ##          ##  ##          ##  ##        ##    ##                    ##
## ## ## ## ##  ## ## ## ## ##  ## ## ## ## ##  ## ## ## ## ##  ## ## ## ## ##  ##          ##  ## ## ## ## ##        ##

/**** BURGER MENU ****/
@media all and (max-width: 1200px) {

    /* Padding reduzieren damit Logo + Burger Platz haben */
    .bottommenu,
    .topmenu {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Logo kleiner auf Mobile */
    .logo {
        width: auto;
        flex-shrink: 1;
        min-width: 0;
        padding: 0.25rem 0;
    }
    .logo img,
    #logo-btn {
        width: auto !important;
        max-width: calc(100vw - 4.5rem);
        height: auto !important;
        max-height: 48px;
        object-fit: contain;
        margin: 0 !important;
    }

    /* Burger immer sichtbar, nicht verdraengen lassen */
    #burgermenu {
        display: block;
        flex-shrink: 0;
        margin-left: auto;
    }

    /* bottommenu inner: Logo links, Burger rechts */
    .bottommenu .inner {
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow: visible;
    }

    /* Nav: geschlossen versteckt, mit Hintergrund */
    .bottommenu nav {
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        padding: 1.5rem 0;
        z-index: 9999;
        background: var(--black, #000);
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
        transform: translateY(-6px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    /* Geoeffnet */
    .bottommenu nav.visible {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto;
        transform: translateY(0);
    }

    .bottommenu nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .menuitem {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .dropdown {
        position: relative; /* Schiebt die anderen Elemente nach unten (Akkordeon) */
        padding: 0.5rem 1rem;
        margin: 0;
        width: 100%;
        top: 0 !important; /* Ueberschreibt das top: 60px !important von der Desktop-Version */
        left: 0;
        transform: none;
    }
    
    .dropdown .menuitem a {
        text-align: left !important; /* Text linksbuendig */
    }
    .bottommenu {
        position: relative;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    nav li {
        height: fit-content;
    }

    /* Hero: gestapelt - erst Text, dann Bild */
    #hero {
        position: relative;
        background: var(--black, #000);
    }
    #hero .inner {
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    /* Content (H1 + Button) unten */
    #hero .content {
        position: relative;
        z-index: 1;
        text-align: center;
        padding: 2rem 1.5rem 1.5rem;
        order: 2; /* <-- nach unten geschoben */
        background: var(--black, #000);
    }
    #hero h1 {
        font-size: calc(1.3rem + 2vw);
        width: 100%;
        margin: 0 0 1.5rem 0;
    }
    /* Truck-Foto: VOR dem Text, volle Breite */
    #truck_logo {
        order: 1; /* <-- nach oben geschoben */
        margin-top: 0 !important;
        width: 100% !important;
        display: block;
    }

    /* Hero-Button: zentriert, kein Desktop-Margin */
    #hero-btn {
        margin-left: 0;
        display: inline-block;
    }
}
/**** LAPTOP ****/
@media all and (max-width: 1300px) {
    #hero h1 {
        width: 100%;
    }
    .content.flex {
        gap: 3em;
    }
    #all {
        grid-column: 1 / 3;
    }
    .box:nth-child(1) {
        grid-row: 1;
    }
    .box:nth-child(2) {
        grid-row: 1;
    }
    .box:nth-child(3) {
        grid-row: 2;
    }
    .box:nth-child(4) {
        grid-row: 2;
    }
    .grid {
        justify-content: normal;
    }
}

/**** TABLET *****/
@media all and (max-width: 1000px) {
    .info.flex {
        flex-direction: row;
        gap: .5rem;
    }
    .right img {
        display: none;
    }
    .flex:not(.option) {
        flex-direction: column;
        gap: 1em;
    }
    .select {
        flex-direction: row;
    }
    #popup .select {
        flex-direction: row;
    }
    .teaser div {
        margin: auto;
        text-align: center;
        width: 100%;
        margin: auto;
    }
    .teaser div:nth-of-type(1) {
        grid-row: 1;
        grid-column: 1;
    }
    .teaser div:nth-of-type(2) {
        grid-row: 2;
        grid-column: 1;
    }
    .teaser div:nth-of-type(3) {
        grid-row: 3;
        grid-column: 1;
    }
    .teaser i {
        margin: auto;
    }
    .content {
        padding: calc(1rem + 5vw) calc(1rem + 3vw);
    }
    #popup {
        left: calc(1rem + 3vw);
        width: calc(100% - calc(calc(1rem + 3vw) * 2));
        transform: translateY(-50%);
        max-width: none;
    }
    #popup .select {
        flex-direction: row;
    }

    /* Kein negativer Abstand auf Mobile - wuerde Inhalt hinter Header schieben */
    #about {
        margin-top: 0;
    }}

/**** SMARTPHONE ****/
@media all and (max-width: 600px) {
    .info.flex {
        flex-direction: column;
    }
    input {
        padding: .5rem 0rem;
        text-align: center;
    }
    textarea::placeholder {
        text-align: center;
    }
    nav,
    .menuitem a {
        transition: none;
    }
    #all {
        grid-column: 1 / 2;
    }
    .box:nth-child(1) {
        grid-row: 1;
    }
    .box:nth-child(2) {
        grid-row: 2;
    }
    .box:nth-child(3) {
        grid-row: 3;
    }
    .box:nth-child(4) {
        grid-row: 4;
    }
    .all a span {
        display: none;
    }
    #recaptcha {
        flex-direction: column;
        align-items: start;
        gap: 1rem
    }
    #popup {
        top: auto;
        bottom: 0;
        left: 0;
        margin: 0;
        padding: 2rem 1.5rem;
        width: 100%;
        transform: none;
        border-radius: 0;
    }
}

/**** FOOTER MOBILE ****/
@media all and (max-width: 600px) {

    /* Top Footer: Boxen gestapelt */
    #topfooter .inner {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    #topfooter .box {
        width: 100%;
    }

    /* Stray-Bullet fix: <br> im Tel./Fax-Absatz ausblenden */
    #topfooter .box p:nth-child(2) br {
        display: none;
    }

    /* Elvis Logo groesser */
    #elvis_logo {
        width: 80% !important;
        max-width: 280px;
    }

    /* Truck Logo volle Breite */
    #mini_truck {
        width: 100% !important;
        max-width: 100%;
    }

    /* Bottom Footer: Links als Block nach rechts gesetzt, in sich aber linksbuendig */
    #bottomfooter .inner ul {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin: 0 !important;
        padding: 1rem 0 !important;
        width: max-content !important;
    }
    #bottomfooter .inner ul li { width: auto !important; text-align: left !important; margin: 0 !important; }
    #bottomfooter .inner ul li a {
        display: block !important;
        text-align: left !important;
        width: auto !important;
        padding: 0 !important;
    }
}

/**** MOBILE ****/
@media all and (max-width: 450px) {
    .topmenu {
        display: none;
    }
    .select.flex {
        flex-direction: column;
    }
    .flex {
        flex-direction: column;
    }
    .option {
        align-items: start;
    }
    #popup .select {
        flex-direction: column;
    }
    #popup button{
        width: 100%;
    }
}
