/* ==========================================================================
   Flammenwelt Beelen · Mobil- und Header-Optimierung
   Wird als letztes Stylesheet geladen und ueberschreibt gezielt main.css.
   Aenderungen bleiben dadurch an einer Stelle und sind rueckbaubar.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Grundlagen: kein horizontaler Ueberlauf, Bilder skalieren mit
   -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   2. Kopfleiste
   Die Leiste war 57px hoch fixiert und ohne Stapelkontext. Dadurch lag das
   aufgeklappte Menue hinter dem Slider und war unsichtbar. sticky ersetzt das
   JS-gesteuerte position:fixed, damit der Inhalt beim Scrollen nicht springt.
   -------------------------------------------------------------------------- */

.fixed-nav-bar,
.fixed-nav-bar.fixed {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 57px;
    /* muss ueber den Pfeiltasten des Sliders liegen, die z-index 9999 fuehren */
    z-index: 100000;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}

.fixed-nav-bar .container {
    position: relative;
}

.navheader {
    margin: 0;
    line-height: 0;
}

.navheader img {
    max-width: 150px;
    height: auto;
}

/* Das Icon der Aufklappflaeche mittig zur Logohoehe */
.slide-trigger .fa-bars {
    line-height: 57px;
    padding-right: 5px;
}

/* --------------------------------------------------------------------------
   3. Navigation
   Der Hamburger erschien erst ab 560px, die waagerechte Leiste braucht aber
   rund 1000px. Dazwischen ueberlappten sich "Angebote/News" und "Steinwaende"
   und die Punkte liefen ins Logo. Umschaltpunkt daher auf 1000px.
   -------------------------------------------------------------------------- */

.navigation {
    position: static;
    margin: 0;
}

@media only screen and (min-width: 1001px) {
    .slide-trigger {
        display: none;
    }

    .navigation {
        display: block !important;
    }

    .navigation li a {
        padding: 8px 12px 0 12px;
        white-space: nowrap;
    }

    nav ul li a {
        font-size: 17px;
    }
}

@media only screen and (max-width: 1000px) {
    /* Logo in der Leiste, Aufklappflaeche rechts */
    .slide-trigger {
        display: block;
        min-height: 57px;
        margin-right: 0;
        padding-right: 15px;
    }

    .navheader img {
        margin: 8px 0 0 10px !important;
        max-width: 140px;
    }

    /* Menue als Ebene ueber dem Inhalt statt im Textfluss */
    .navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 0 0 8px 0;
        background: #fff;
        border-top: 1px solid #e8e8e8;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
        max-height: calc(100vh - 57px);
        overflow-y: auto;
    }

    .navigation li {
        float: none;
        display: block;
        width: 100%;
    }

    /* Das Logo im Menue selbst ist auf schmalen Schirmen doppelt */
    .navigation li:first-child {
        display: none;
    }

    .navigation li a {
        display: block;
        padding: 15px 20px;
        font-size: 18px;
        line-height: 1.3;
        color: #4b4b4b;
        border-bottom: 1px solid #ededed;
    }

    .navigation li:last-child a {
        border-bottom: none;
    }

    .navigation li a:active,
    .navigation li a:hover {
        background: #f6f6f6;
        color: #c2001b;
    }
}

/* Die Kontaktzeile ueberlagerte auf mittleren Breiten die Menuepunkte */
@media screen and (max-width: 1200px) {
    .nav-info {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   4. Slider und Startbild
   Die Bildunterschriften waren mit festen Prozentwerten und Breiten in Pixeln
   positioniert und liefen auf schmalen Schirmen aus dem Bild.
   -------------------------------------------------------------------------- */

@media screen and (max-width: 980px) {
    .bx-wrapper,
    .bx-viewport,
    .bxslider,
    .bxslider li {
        height: 78vh !important;
        min-height: 460px;
    }

    /* Startfolie: Logo und Oeffnungszeiten mittig statt bei left:52% */
    .bxslider li > div[style*="position:absolute"] {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        width: 100%;
        padding: 0 18px;
        box-sizing: border-box;
    }

    .slide01-caption {
        position: relative;
        left: 0 !important;
        top: 0 !important;
        max-width: 460px;
        margin: 0 auto;
        text-align: center;
    }

    .slide01-caption img {
        max-width: 260px;
        width: 100%;
        margin: 0 auto;
        display: block;
    }

    .slide01-caption p {
        font-size: 15px !important;
        line-height: 1.55 !important;
        margin-top: 22px !important;
    }

    /* Der Pfeil nach unten sass bei margin-top:30% weit ausserhalb */
    .slide01-caption > div[style*="margin-top"] {
        margin-top: 26px !important;
    }

    .slide01-caption > div[style*="margin-top"] img {
        max-width: 42px;
    }

    /* Produktfolien: feste Breiten von 360/560px aufheben */
    .caption.slidecap {
        left: 4% !important;
        right: 4% !important;
        width: auto !important;
        max-width: none !important;
    }

    .caption.slidecap h1 {
        font-size: 24px !important;
        line-height: 1.2 !important;
        padding: 8px 14px !important;
    }

    .caption.slidecap p {
        font-size: 14px !important;
        padding: 8px 14px 0 14px !important;
        margin-bottom: 4px !important;
    }

    /* Hintergrundvideo der zweiten Folie beschneiden statt verzerren */
    #video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    /* Pfeiltasten des Sliders vergroessern */
    .bx-wrapper .bx-controls-direction a {
        width: 42px;
        height: 42px;
    }
}

@media screen and (max-width: 480px) {
    .bx-wrapper,
    .bx-viewport,
    .bxslider,
    .bxslider li {
        height: 82vh !important;
        min-height: 420px;
    }

    .slide01-caption img {
        max-width: 215px;
    }

    .slide01-caption p {
        font-size: 14px !important;
    }

    .caption.slidecap h1 {
        font-size: 20px !important;
    }
}

/* --------------------------------------------------------------------------
   5. Markenuebersicht
   Jedes Herstellerlogo nahm auf dem Telefon die volle Breite ein; die Seite
   war dadurch ueber 14.000px lang. Zwei Spalten verkuerzen sie deutlich.
   -------------------------------------------------------------------------- */

@media screen and (max-width: 736px) {
    /* Nebeneinander schwebende Kacheln verhaken sich, sobald eine
       Bildunterschrift zweizeilig wird. Als Reihe mit gleicher Zeilenhoehe
       bleiben die Spalten auf einer Linie. */
    #sortiment .row {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
    }

    #sortiment .row > div {
        width: 50% !important;
        float: none !important;
        display: flex;
        flex-direction: column;
        padding: 0 8px 18px 8px !important;
        box-sizing: border-box;
    }

    /* Die Ueberschriftzeile bleibt ueber die volle Breite */
    #sortiment .row > div.\31 2u {
        width: 100% !important;
        float: none !important;
        padding-bottom: 4px !important;
    }

    #sortiment figure {
        float: none;
        margin: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Der Beschriftungsstreifen fuellt den Rest der Kachel aus, damit alle
       Kacheln einer Reihe unten buendig abschliessen. */
    #sortiment figure > a:last-of-type {
        flex: 1 1 auto;
        display: flex;
    }

    #sortiment figure img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* main.css setzt hier eine Zeilenhoehe von 60px, die fuer einzeilige
       Beschriftungen als Innenabstand gedacht war. Bei zwei Zeilen reisst sie
       die Kachel auseinander. */
    #sortiment figure figcaption {
        width: 100%;
        font-size: 13px;
        line-height: 1.35;
        min-height: 52px;
        padding: 10px 8px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #sortiment h2 {
        font-size: 26px;
    }
}

/* --------------------------------------------------------------------------
   6. Abstaende und Schriftgroessen der Inhaltsabschnitte
   -------------------------------------------------------------------------- */

@media screen and (max-width: 736px) {
    section.main {
        padding: 45px 0 !important;
    }

    .container {
        padding: 0 18px !important;
        box-sizing: border-box;
    }

    header.major h2 {
        font-size: 27px !important;
        line-height: 1.25 !important;
    }

    section.main h2 {
        font-size: 25px;
        line-height: 1.25;
    }

    section.main h3 {
        font-size: 18px;
        line-height: 1.3;
    }

    section.main p {
        font-size: 15px;
        line-height: 1.65;
        text-align: left !important;
        hyphens: auto;
    }

    /* Der Textblock unter "Ueber Uns" stand im Blocksatz mit grossen Luecken */
    #team p[style*="justify"] {
        text-align: left !important;
    }

    /* Parallaxflaechen kosten auf dem Telefon nur Hoehe */
    #parallax_01,
    #parallax_02 {
        display: none;
    }

    /* Teamfotos nicht bildschirmfuellend */
    #team .row > div {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        float: none;
    }

    #stein .image.fit img {
        margin-bottom: 14px;
    }
}

/* --------------------------------------------------------------------------
   7. Kontaktformular
   Schriftgroesse 16px verhindert das automatische Zoomen von iOS beim
   Antippen eines Feldes.
   -------------------------------------------------------------------------- */

.signup-input {
    width: 100%;
    max-width: 100%;
    padding: 13px 14px;
    font-size: 16px;
    line-height: 1.4;
    color: #2b2b2b;
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 3px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.signup-input:focus {
    border-color: #c2001b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(194, 0, 27, 0.15);
}

textarea.signup-input {
    min-height: 140px;
    resize: vertical;
}

/* Die Kennzeichnung ueber die Sektion schlaegt die Vorgabe
   ".main.style2 input[type=submit]" aus main.css, die den Knopf durchsichtig
   liess und nur einen weissen Rahmen als Schatten zeichnete. */
#kontakt .submit-btn,
.main.style2 .submit-btn {
    display: inline-block;
    width: 100%;
    max-width: 280px;
    min-height: 52px;
    padding: 15px 28px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff !important;
    background: #c2001b;
    border: none;
    border-radius: 3px;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#kontakt .submit-btn:hover,
#kontakt .submit-btn:focus,
.main.style2 .submit-btn:hover,
.main.style2 .submit-btn:focus {
    background: #9d0016;
    box-shadow: none;
}

/* Falle fuer automatische Eintraege, fuer Besucher unsichtbar */
.hp-feld {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.formhinweis {
    margin: 12px 0 0 0;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 3px;
}

.formhinweis.fehler {
    background: rgba(255, 255, 255, 0.92);
    color: #9d0016;
    border-left: 4px solid #c2001b;
}

@media screen and (max-width: 736px) {
    #kontakt .row > div:first-child {
        margin-bottom: 34px;
    }

    #kontakt h2 {
        font-size: 22px;
    }

    #kontakt p {
        font-size: 15px;
    }

    /* Telefonnummer und Adresse mit Abstand fuers Antippen */
    #kontakt a[href^="tel:"],
    #kontakt a[href^="mailto:"] {
        display: inline-block;
        padding: 4px 0;
    }
}

/* --------------------------------------------------------------------------
   8. Fusszeile
   -------------------------------------------------------------------------- */

@media screen and (max-width: 736px) {
    #footer {
        padding: 34px 18px !important;
    }

    #footer .copyright li {
        display: block;
        margin: 0 0 8px 0;
        padding: 0;
        border-left: none;
        line-height: 1.6;
    }
}

/* --------------------------------------------------------------------------
   9. News- und Angebote-Reiter
   -------------------------------------------------------------------------- */

@media screen and (max-width: 736px) {
    .tabs nav ul li a {
        padding: 12px 8px;
        font-size: 14px;
    }

    .tabs nav ul li {
        min-width: 0;
    }
}
