/* =========================================================
   Fixes for phones and tablets + company name "BEXRecycling GmbH"
   Loaded after main.css on every page.
   ========================================================= */

/* ---------- Company name in the homepage hero ----------
   "BEX" + "Recycling" always stay together on one line,
   "GmbH" sits underneath, right-aligned to the end of "Recycling". */
.hero-content > .company-name {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    direction: ltr;
    font-size: 150px;
    line-height: 0.8;
}
.company-name > div:first-child {
    white-space: nowrap;
}
.company-name .name-part {
    padding-left: 0;
}
/* X and R touch: pull "Recycling" left by the gap after the X
   (measured 0.127em in Syne bold, plus a hair of overlap; in em so it scales) */
.company-name .name-part.second {
    margin-left: -0.135em;
}
.company-name .name-part.third {
    margin-left: 0;
}

@media (max-width: 1199px) {
    .hero-content > .company-name {
        font-size: 120px;
    }
}

/* ---------- Slanted white corners of the menu bar ----------
   They stick out 40px on each side; on tablets that is past the
   screen edge. Clip sideways only (menus can still open downwards). */
.header {
    overflow-x: clip;
}

/* ---------- Language dropdown in the green top bar ----------
   The box is 92px wide but the input inside was 100-150px,
   which pushed the page sideways on tablets. */
.header-1 .ddl .ddl-input {
    width: 100% !important;
}

@media (max-width: 991px) {
    .hero-content > .company-name {
        font-size: 84px;
        line-height: 1;
    }
}

@media (max-width: 767px) {
    .hero-content > .company-name {
        font-size: 60px;
        line-height: 1.1;
    }

    /* "For a Better World" + its green line: keep the line inside the screen */
    .hero-content h1 {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 26px;
    }
    .hero-content h1:before {
        position: static;
        order: 2;
        flex: 0 1 60px;
        min-width: 24px;
        transform: none;
    }
}

@media (max-width: 575px) {
    .hero-content > .company-name {
        /* fits "BEXRecycling" on any phone width */
        font-size: min(56px, calc((100vw - 48px) / 7.8));
        line-height: 1.15;
    }
    /* small text rounds to whole pixels, so overlap a little more */
    .company-name .name-part.second {
        margin-left: -0.15em;
    }
}
