/* ==========================================================
   Home page hero - United Auto Body
   Mobile first: photo on top, text below (phones & tablets).
   From 992px up: text overlays the right side of the photo.
   ========================================================== */

.uab-hero {
    position: relative;
    overflow: hidden;
    background: #131313;
    color: #fff;
}

/* ---------- Photo ---------- */
.uab-hero__media {
    position: relative;
    height: 62vw;              /* keeps the sign + car in frame on small screens */
    min-height: 220px;
    max-height: 560px;
    overflow: hidden;
}

.uab-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% 30%;
    animation: uab-hero-zoom 9s ease-out both;
}

/* Fade the photo into the dark page background */
.uab-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(19, 19, 19, 0) 55%, #131313 100%);
    pointer-events: none;
}

/* ---------- Text ---------- */
.uab-hero__content {
    position: relative;
    z-index: 2;
    margin-top: -36px;
    padding: 0 5px 40px;
}

.uab-hero__inner {
    max-width: 560px;
    margin: 0 auto;
}

.uab-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(19, 19, 19, 0.75);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e6e6e6;
}

.uab-hero__eyebrow .fa {
    color: #fe0010;
}

.uab-hero__title {
    margin: 0 0 14px;
    font-size: clamp(30px, 8vw, 58px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #fff;
}

.uab-hero__title span {
    color: #fe0010;
}

.uab-hero__lead {
    margin: 0 0 24px;
    font-size: clamp(15px, 2.2vw, 18px);
    line-height: 1.6;
    font-weight: 400;
    color: #d0d0d0;
}

/* ---------- Buttons ---------- */
.uab-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}

.uab-hero__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.uab-hero__btn:hover,
.uab-hero__btn:focus {
    text-decoration: none;
    transform: translateY(-1px);
}

.uab-hero__btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.uab-hero__btn--primary {
    background: #fe0010;
    border-color: #fe0010;
    color: #fff;
}

.uab-hero__btn--primary:hover,
.uab-hero__btn--primary:focus {
    background: #d6000d;
    border-color: #d6000d;
    color: #fff;
}

.uab-hero__btn--ghost {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.uab-hero__btn--ghost:hover,
.uab-hero__btn--ghost:focus {
    background: #fff;
    border-color: #fff;
    color: #131313;
}

.uab-hero__btn small {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
}

/* ---------- Quick facts ---------- */
.uab-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
    color: #cfcfcf;
}

.uab-hero__facts li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.uab-hero__facts .fa {
    margin-top: 3px;
    color: #fe0010;
}

.uab-hero__facts a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Entrance animation ---------- */
.uab-hero__inner > * {
    animation: uab-hero-rise 0.7s ease-out both;
}
.uab-hero__inner > :nth-child(2) { animation-delay: 0.08s; }
.uab-hero__inner > :nth-child(3) { animation-delay: 0.16s; }
.uab-hero__inner > :nth-child(4) { animation-delay: 0.24s; }
.uab-hero__inner > :nth-child(5) { animation-delay: 0.32s; }

@keyframes uab-hero-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes uab-hero-zoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .uab-hero__media img,
    .uab-hero__inner > * {
        animation: none;
    }
    .uab-hero__btn {
        transition: none;
    }
}

/* ---------- Large phones: buttons side by side ---------- */
@media (min-width: 480px) {
    .uab-hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .uab-hero__btn {
        flex: 1 1 200px;
    }
}

/* ---------- Tablets ---------- */
@media (min-width: 768px) {
    .uab-hero__media {
        height: 56vw;
    }
    .uab-hero__content {
        margin-top: -60px;
        padding-bottom: 56px;
    }
    .uab-hero__inner {
        max-width: 680px;
    }
}

/* ---------- Desktop: text over the photo ---------- */
@media (min-width: 992px) {
    .uab-hero {
        display: flex;
        align-items: center;
        min-height: clamp(560px, calc(100vh - 90px), 820px);
    }

    .uab-hero__media {
        position: absolute;
        inset: 0;
        height: auto;
        max-height: none;
    }

    .uab-hero__media img {
        object-position: 30% 35%;
    }

    /* Darken the right side for the text, keep the car and sign visible */
    .uab-hero__media::after {
        background:
            linear-gradient(to left, rgba(12, 12, 12, 0.94) 0%, rgba(12, 12, 12, 0.82) 36%, rgba(12, 12, 12, 0.25) 62%, rgba(12, 12, 12, 0) 80%),
            linear-gradient(to bottom, rgba(19, 19, 19, 0) 75%, #131313 100%);
    }

    .uab-hero__content {
        width: 100%;
        margin: 0;
        padding: 60px 0;
    }

    .uab-hero__content > .container {
        display: flex;
        justify-content: flex-end;
    }

    .uab-hero__inner {
        width: 52%;
        max-width: 540px;
        margin: 0;
    }

    .uab-hero__title {
        font-size: clamp(40px, 3.6vw, 58px);
    }

    .uab-hero__btn {
        flex: 0 0 auto;
    }
}

@media (min-width: 1200px) {
    .uab-hero__inner {
        width: 46%;
    }
}

/* ---------- Shorter hero for inner pages ---------- */
.uab-hero--page .uab-hero__media {
    height: 46vw;
    max-height: 420px;
}

@media (min-width: 992px) {
    .uab-hero--page {
        min-height: clamp(420px, 60vh, 560px);
    }
    .uab-hero--page .uab-hero__media {
        height: auto;
        max-height: none;
    }
}
