@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,700;1,800&display=swap');

/* ==========================================================================
   Banner — fluid & responsive
   Design reference: 1280 x 800.
   Sizes use clamp(min, Nvw, max): pixel-perfect at >=1280px, scale down
   proportionally on smaller screens, then reflow to a stack on phones.
   N = designPx / 1280 * 100.
   ========================================================================== */

.banner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    aspect-ratio: 1280 / 800;
    display: flex;
    background: #ffffff;
    font-family: 'Rubik', sans-serif;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
    border: 1px solid #e3e6ea;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* LEFT: image 50% */
.banner__media {
    width: 50%;
    height: 100%;
    position: relative;
    background: #0c1116;
}

.banner__photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* RIGHT: text 50% */
.banner__content {
    width: 50%;
    height: 100%;
    box-sizing: border-box;
    padding: clamp(31px, 4.0625vw, 52px) clamp(36px, 4.6875vw, 60px);
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    background-image: repeating-linear-gradient(135deg, #ffffff 0px, #ffffff 22px, #f3f4f6 22px, #f3f4f6 24px);
}

.banner__logo-row {
    display: flex;
    align-items: center;
    padding-bottom: clamp(16px, 2.03125vw, 26px);
    border-bottom: 2px dotted #d3d7dd;
}

.banner__logo {
    height: clamp(72px, 9.375vw, 120px);
    width: auto;
    display: block;
}

.banner__headline {
    margin: clamp(20px, 2.65625vw, 34px) 0 0;
    font-size: clamp(30px, 3.90625vw, 50px);
    line-height: 1.08;
    font-weight: 800;
    color: #1a1d21;
    letter-spacing: -0.5px;
    text-wrap: balance;
}

.banner__headline-accent {
    color: #E4002B;
}

.banner__text {
    margin: clamp(17px, 2.1875vw, 28px) 0 0;
    font-size: clamp(16px, 2.109375vw, 27px);
    line-height: 1.34;
    font-weight: 600;
    color: #23262b;
    text-wrap: pretty;
}

.banner__text--tight {
    margin-top: clamp(8px, 1.09375vw, 14px);
}

.banner__cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(7px, 0.9375vw, 12px);
}

.banner__phone,
.banner__phone:link,
.banner__phone:visited,
.banner__phone:hover,
.banner__phone:focus,
.banner__phone:active {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.25vw, 16px);
    align-self: flex-start;
    background: #E4002B;
    /* forced white: defends against the host site's global link colors */
    color: #ffffff !important;
    text-decoration: none;
    padding: clamp(12px, 1.5625vw, 20px) clamp(19px, 2.5vw, 32px);
    border-radius: clamp(5px, 0.625vw, 8px);
    box-shadow: 0 8px 20px rgba(228, 0, 43, 0.28);
}

.banner__phone svg {
    width: clamp(18px, 2.34375vw, 30px);
    height: auto;
    flex-shrink: 0;
}

.banner__phone svg path {
    fill: #ffffff;
}

.banner__phone-number {
    font-size: clamp(20px, 2.65625vw, 34px);
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: #ffffff !important;
}

.banner__note {
    font-size: clamp(13px, 1.640625vw, 21px);
    font-weight: 500;
    color: #7b818a;
    padding-left: 4px;
}

/* ==========================================================================
   Popup overlay (#backdrop) — centers the banner over the page.
   Visibility is toggled by popup.js via inline display (none <-> flex).
   ========================================================================== */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(12, 17, 22, 0.72);
    overflow: auto;
    animation: backdrop-fade-in 0.3s ease both;
}

.backdrop.closing {
    animation: backdrop-fade-out 0.4s ease both;
}

.backdrop .banner {
    /* margin:auto centers in the flex overlay and stays scrollable when tall */
    margin: auto;
    /* fit inside the viewport while keeping the 1280:800 ratio */
    width: min(1280px, calc(100vw - 40px), calc((100vh - 40px) * 1.6));
    animation: banner-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.popup_close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 17, 22, 0.5);
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.popup_close:hover {
    background: rgba(12, 17, 22, 0.8);
    transform: rotate(90deg);
}

@keyframes backdrop-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes backdrop-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes banner-pop-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Mobile — reflow to a vertical stack (image on top, text below).
   ========================================================================== */
@media (max-width: 767px) {
    .backdrop {
        padding: 12px;
    }

    .backdrop .banner {
        width: 100%;
    }

    .banner {
        flex-direction: column;
        aspect-ratio: auto;
    }

    .banner__media {
        width: 100%;
        height: clamp(200px, 56vw, 380px);
    }

    .banner__photo {
        object-position: center 20%;
    }

    .banner__content {
        width: 100%;
        height: auto;
        padding: clamp(22px, 6vw, 34px);
    }

    .banner__logo {
        height: clamp(56px, 15vw, 96px);
    }

    .banner__headline {
        margin-top: clamp(20px, 5.5vw, 30px);
        font-size: clamp(26px, 7.2vw, 40px);
    }

    .banner__text {
        margin-top: clamp(16px, 4.6vw, 24px);
        font-size: clamp(17px, 4.6vw, 22px);
    }

    .banner__text--tight {
        margin-top: clamp(8px, 2.6vw, 14px);
    }

    .banner__cta {
        margin-top: clamp(22px, 6vw, 32px);
        gap: clamp(8px, 2.6vw, 12px);
    }

    .banner__phone {
        padding: clamp(15px, 4vw, 20px) clamp(22px, 6vw, 32px);
    }

    .banner__phone svg {
        width: clamp(22px, 6.4vw, 28px);
    }

    .banner__phone-number {
        font-size: clamp(22px, 6.4vw, 32px);
    }

    .banner__note {
        font-size: clamp(14px, 3.8vw, 18px);
    }
}
