/* =====================================================================
   BMV DECOR — HOME HERO SLIDER (index.html only)
   Needs css/bmv-header.css first (shared variables: --u, colours, header height).
   Behaviour: js/bmv-hero.js

   Desktop values are design px (1774px-wide design) x --u, so every
   desktop/laptop shows the same composition. Tablet/phone have own layouts.
===================================================================== */

.bmvh-hero {
    position: relative;
    margin-top: var(--bmv-header-h);
    /* fills the screen, but never taller than the design proportion allows */
    height: max(540px, min(calc(100vh - var(--bmv-header-h)), calc(900 * var(--u))));
    height: max(540px, min(calc(100svh - var(--bmv-header-h)), calc(900 * var(--u))));
    overflow: hidden;
    background: rgb(var(--bmv-cream));
    font-family: var(--bmv-font);
}
.bmvh-hero .swiper,
.bmvh-hero .swiper-wrapper,
.bmvh-hero .swiper-slide { height: 100%; }

.bmvh-slide {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Background image with a slow zoom-out while the slide is active */
.bmvh-media { position: absolute; inset: 0; }
.bmvh-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--bmvh-pos, center);
    transform: scale(1.12);
    transition: transform 0s linear 1.4s;          /* reset only after the cross-fade is done */
    will-change: transform;
}
.swiper-slide-active .bmvh-media img {
    transform: scale(1);
    transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Warm wash so the copy stays readable on any photo.
   Per slide: --bmvh-wash (opacity at the text), --bmvh-solid / --bmvh-mid / --bmvh-end (stops) */
.bmvh-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg,
        rgba(var(--bmv-cream), var(--bmvh-wash, 0.92)) 0%,
        rgba(var(--bmv-cream), var(--bmvh-wash, 0.92)) var(--bmvh-solid, 30%),
        rgba(var(--bmv-cream), 0.5) var(--bmvh-mid, 52%),
        rgba(var(--bmv-cream), 0) var(--bmvh-end, 70%));
    pointer-events: none;
}

.bmvh-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--bmv-max);
    margin: 0 auto;
    padding: 0 calc(60 * var(--u)) calc(54 * var(--u)) calc(148 * var(--u));
}
.bmvh-content { max-width: calc(1000 * var(--u)); }

.bmvh-tag {
    display: flex;
    align-items: center;
    gap: calc(18 * var(--u));
    margin-bottom: calc(24 * var(--u));
}
.bmvh-tag-line {
    width: calc(46 * var(--u));
    min-width: 30px;
    height: 3px;
    border-radius: 3px;
    background: var(--bmv-green);
    transform-origin: left center;
    flex-shrink: 0;
}
.bmvh-tag-text {
    color: var(--bmv-ink);
    font-size: max(17px, calc(27 * var(--u)));
    font-weight: 600;
    line-height: 1.1;
}

.bmvh-title {
    margin: 0 0 calc(26 * var(--u));
    color: var(--bmv-ink);
    font-family: var(--bmv-font);
    font-size: max(34px, calc(66 * var(--u)));
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.01em;
}
.bmvh-line { display: block; white-space: nowrap; }   /* two lines exactly, like the design */
.bmvh-line.is-accent { color: var(--bmv-green); }

.bmvh-sub {
    max-width: max(420px, calc(600 * var(--u)));
    margin: 0 0 calc(32 * var(--u));
    color: var(--bmv-body);
    font-size: max(15px, calc(26 * var(--u)));
    font-weight: 400;
    line-height: 1.34;
}

.bmvh-actions {
    display: flex;
    align-items: center;
    gap: calc(24 * var(--u));
}
.bmvh-actions-stack {
    display: flex;
    flex-direction: column;
    gap: calc(16 * var(--u));
}

.bmvh-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(30 * var(--u));
    overflow: hidden;
    isolation: isolate;
    border-radius: 4px;
    font-size: max(14px, calc(20 * var(--u)));
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.45s var(--bmv-ease), border-color 0.45s var(--bmv-ease), transform 0.45s var(--bmv-ease-out), box-shadow 0.45s var(--bmv-ease);
}
.bmvh-btn i { font-size: 0.95em; transition: transform 0.45s var(--bmv-ease-out); }
.bmvh-btn:hover i,
.bmvh-btn:focus-visible i { transform: translateX(6px); }

/* Fill layer that sweeps in from the left on hover */
.bmvh-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.55s var(--bmv-ease-out);
}
.bmvh-btn:hover::before,
.bmvh-btn:focus-visible::before { transform: scaleX(1); }

.bmvh-btn-primary {
    height: max(46px, calc(62 * var(--u)));
    padding: 0 max(20px, calc(32 * var(--u)));
    background: var(--bmv-green);
    color: #ffffff;
}
.bmvh-btn-primary::before { background: var(--bmv-green-dark); }
.bmvh-btn-primary:hover,
.bmvh-btn-primary:focus-visible {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(13, 92, 47, 0.28);
}

.bmvh-btn-outline {
    min-width: calc(310 * var(--u));
    height: max(44px, calc(61 * var(--u)));
    padding: 0 max(18px, calc(30 * var(--u)));
    border: 1.5px solid var(--bmv-green);
    background: rgba(255, 255, 255, 0.4);
    color: var(--bmv-green);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.bmvh-btn-outline::before { background: var(--bmv-green); }
.bmvh-btn-outline:hover,
.bmvh-btn-outline:focus-visible {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(13, 92, 47, 0.18);
}

/* ── Arrows ── */
.bmvh-nav {
    --size: max(40px, calc(54 * var(--u)));
    position: absolute;
    top: 50%;
    z-index: 5;
    width: var(--size);
    height: var(--size);
    margin-top: calc(var(--size) / -2);
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: var(--bmv-ink);
    font-size: max(14px, calc(18 * var(--u)));
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(20, 30, 25, 0.12);
    transition: background 0.4s var(--bmv-ease), color 0.4s var(--bmv-ease), transform 0.45s var(--bmv-ease-out), box-shadow 0.4s var(--bmv-ease);
}
.bmvh-prev { left: max(14px, calc(36 * var(--u))); }
.bmvh-next { right: max(14px, calc(36 * var(--u))); }
.bmvh-nav:hover,
.bmvh-nav:focus-visible {
    background: var(--bmv-green);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(13, 92, 47, 0.3);
}
.bmvh-prev:hover i { animation: bmvh-nudge-left 0.6s var(--bmv-ease-out); }
.bmvh-next:hover i { animation: bmvh-nudge-right 0.6s var(--bmv-ease-out); }
@keyframes bmvh-nudge-left  { 50% { transform: translateX(-4px); } }
@keyframes bmvh-nudge-right { 50% { transform: translateX(4px); } }

/* ── Dots ── */
.bmvh-pagination.swiper-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(24px, calc(58 * var(--u)));
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: max(10px, calc(14 * var(--u)));
}
.bmvh-pagination .swiper-pagination-bullet {
    width: max(11px, calc(15 * var(--u)));
    height: max(11px, calc(15 * var(--u)));
    margin: 0 !important;
    background: #ffffff;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(20, 30, 25, 0.18);
    transition: background 0.45s var(--bmv-ease), transform 0.45s var(--bmv-ease-out);
}
.bmvh-pagination .swiper-pagination-bullet:hover { transform: scale(1.2); }
.bmvh-pagination .swiper-pagination-bullet-active { background: var(--bmv-green); transform: scale(1.1); }

/* Content starts hidden only when JS will animate it in */
.bmvh-hero.is-animated .bmvh-anim { visibility: hidden; }

/* Short laptop screens: keep the content block from touching the dots */
@media (min-width: 992px) and (max-height: 700px) {
    .bmvh-container { padding-bottom: calc(70 * var(--u)); }
}

/* =====================================================================
   TABLET (≤991px)
===================================================================== */
@media (max-width: 991px) {
    .bmvh-hero { height: auto; }
    .bmvh-hero .swiper,
    .bmvh-hero .swiper-wrapper { height: auto; }
    .bmvh-slide {
        min-height: min(calc(100vh - var(--bmv-header-h)), 760px);
        min-height: min(calc(100svh - var(--bmv-header-h)), 760px);
        padding: 64px 0 96px;
    }
    .bmvh-slide::before {
        background: linear-gradient(90deg,
            rgba(var(--bmv-cream), 0.95) 0%,
            rgba(var(--bmv-cream), 0.9) 55%,
            rgba(var(--bmv-cream), 0.7) 78%,
            rgba(var(--bmv-cream), 0.4) 100%);
    }
    .bmvh-container { padding: 0 40px; }
    .bmvh-content { max-width: 640px; }

    .bmvh-tag { gap: 14px; margin-bottom: 18px; }
    .bmvh-tag-line { width: 40px; }
    .bmvh-tag-text { font-size: 20px; }
    .bmvh-title { font-size: clamp(38px, 6vw, 52px); margin-bottom: 20px; }
    .bmvh-sub { font-size: 18px; max-width: 520px; margin-bottom: 30px; }

    .bmvh-actions { gap: 16px; }
    .bmvh-actions-stack { gap: 12px; }
    .bmvh-btn { font-size: 16px; gap: 24px; }
    .bmvh-btn-primary { height: 54px; padding: 0 26px; }
    .bmvh-btn-outline { min-width: 270px; height: 52px; padding: 0 24px; }

    .bmvh-nav { display: none; }
    .bmvh-pagination.swiper-pagination { bottom: 36px; }
}

/* =====================================================================
   PHONE (≤640px)
===================================================================== */
@media (max-width: 640px) {
    .bmvh-slide {
        align-items: flex-start;
        min-height: calc(100vh - var(--bmv-header-h));
        min-height: calc(100svh - var(--bmv-header-h));
        padding: 44px 0 88px;
    }
    .bmvh-slide::before {
        background: linear-gradient(180deg,
            rgba(var(--bmv-cream), 0.96) 0%,
            rgba(var(--bmv-cream), 0.9) 58%,
            rgba(var(--bmv-cream), 0.3) 100%);
    }
    .bmvh-container { padding: 0 20px; }
    .bmvh-tag-line { width: 32px; min-width: 32px; }
    .bmvh-tag-text { font-size: 17px; }
    .bmvh-title { font-size: clamp(30px, 8.6vw, 38px); }
    .bmvh-line { white-space: normal; text-wrap: balance; }
    .bmvh-sub { font-size: 16px; margin-bottom: 26px; }

    .bmvh-actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .bmvh-btn { font-size: 15.5px; }
    .bmvh-btn-primary,
    .bmvh-btn-outline { min-width: 0; width: 100%; height: 52px; padding: 0 20px; }
    .bmvh-pagination.swiper-pagination { bottom: 30px; }
}

@media (max-width: 360px) {
    .bmvh-title { font-size: 28px; }
}

/* Landscape phones: content decides the height */
@media (max-width: 991px) and (max-height: 520px) and (orientation: landscape) {
    .bmvh-slide { min-height: 0; padding: 32px 0 88px; }
    .bmvh-title { font-size: 34px; margin-bottom: 14px; }
    .bmvh-tag { margin-bottom: 12px; }
    .bmvh-sub { font-size: 16px; margin-bottom: 20px; }
    .bmvh-btn-primary,
    .bmvh-btn-outline { height: 46px; }
}

/* =====================================================================
   FEATURE BAR — white card overlapping the bottom edge of the banner
===================================================================== */
:root { --bmvh-feat-overlap: max(40px, calc(56 * var(--u))); }

/* Make room in the banner for the overlapping card */
@media (min-width: 992px) {
    /* banner + the half of the card below it fit in the first screen */
    .bmvh-hero {
        height: max(520px, min(calc(100vh - var(--bmv-header-h) - var(--bmvh-feat-overlap) - max(28px, calc(40 * var(--u)))), calc(900 * var(--u))));
        height: max(520px, min(calc(100svh - var(--bmv-header-h) - var(--bmvh-feat-overlap) - max(28px, calc(40 * var(--u)))), calc(900 * var(--u))));
    }
    .bmvh-container { padding-bottom: calc(54 * var(--u) + var(--bmvh-feat-overlap)); }
    .bmvh-pagination.swiper-pagination { bottom: calc(var(--bmvh-feat-overlap) + max(18px, calc(26 * var(--u)))); }
}
@media (min-width: 992px) and (max-height: 700px) {
    .bmvh-container { padding-bottom: calc(70 * var(--u) + var(--bmvh-feat-overlap)); }
}

.bmvh-features {
    position: relative;
    z-index: 6;
    max-width: var(--bmv-max);
    margin: calc(-1 * var(--bmvh-feat-overlap)) auto 0;
    padding: 0 calc(96 * var(--u));
    font-family: var(--bmv-font);
}
.bmvh-features-list {
    display: flex;
    margin: 0;
    padding: max(16px, calc(26 * var(--u))) 0;
    list-style: none;
    background: #ffffff;
    border-radius: max(12px, calc(18 * var(--u)));
    box-shadow: 0 18px 50px rgba(20, 30, 25, 0.12), 0 2px 6px rgba(20, 30, 25, 0.04);
}
.bmvh-feature {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0 max(12px, calc(26 * var(--u)));
    list-style: none;
    display: flex;
    justify-content: center;
}
.bmvh-feature + .bmvh-feature { border-left: 1px solid #e8e5e0; }

.bmvh-feature,
.bmvh-feature-link {
    align-items: center;
    gap: max(12px, calc(20 * var(--u)));
}
.bmvh-feature-link {
    display: flex;
    color: inherit;
    text-decoration: none;
}
.bmvh-feature-link:hover { color: inherit; text-decoration: none; }

.bmvh-feature-icon {
    flex-shrink: 0;
    width: max(32px, calc(46 * var(--u)));
    height: max(32px, calc(46 * var(--u)));
    color: var(--bmv-green);
    transition: transform 0.5s var(--bmv-ease-out), color 0.35s var(--bmv-ease);
}
.bmvh-feature-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bmvh-feature-text { display: flex; flex-direction: column; min-width: 0; }
.bmvh-feature-text strong {
    color: var(--bmv-ink);
    font-size: max(14px, calc(18 * var(--u)));
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.35s var(--bmv-ease);
}
.bmvh-feature-text span {
    margin-top: 3px;
    color: var(--bmv-body);
    font-size: max(12px, calc(15 * var(--u)));
    line-height: 1.35;
}

.bmvh-feature:hover .bmvh-feature-icon { transform: translateY(-3px) scale(1.06); }
.bmvh-feature:hover .bmvh-feature-text strong { color: var(--bmv-green); }

/* Laptops: tighter spacing so five items keep fitting on one line */
@media (min-width: 992px) and (max-width: 1279px) {
    .bmvh-features { padding: 0 32px; }
    .bmvh-feature { padding: 0 12px; }
}

/* Tablet: 3 + 2 rows */
@media (max-width: 991px) {
    :root { --bmvh-feat-overlap: 44px; }
    .bmvh-slide { padding-bottom: calc(96px + var(--bmvh-feat-overlap)); }
    .bmvh-pagination.swiper-pagination { bottom: calc(var(--bmvh-feat-overlap) + 22px); }

    .bmvh-features { padding: 0 24px; }
    .bmvh-features-list { flex-wrap: wrap; justify-content: center; row-gap: 22px; padding: 22px 0; }
    .bmvh-feature { flex: 0 0 33.333%; justify-content: flex-start; padding: 0 20px; }
    .bmvh-feature + .bmvh-feature { border-left: 1px solid #e8e5e0; }
    .bmvh-feature:nth-child(3n + 1) { border-left: 0; }
}

/* Phone: 2 columns, icon above text */
@media (max-width: 640px) {
    :root { --bmvh-feat-overlap: 36px; }
    .bmvh-slide { padding-bottom: calc(88px + var(--bmvh-feat-overlap)); }
    .bmvh-pagination.swiper-pagination { bottom: calc(var(--bmvh-feat-overlap) + 18px); }

    .bmvh-features { padding: 0 16px; }
    .bmvh-features-list { padding: 18px 0; row-gap: 18px; }
    .bmvh-feature { flex: 0 0 50%; justify-content: center; padding: 0 10px; text-align: center; }
    .bmvh-feature,
    .bmvh-feature-link { flex-direction: column; gap: 8px; }
    .bmvh-feature + .bmvh-feature { border-left: 0; }
    .bmvh-feature:nth-child(2n) { border-left: 1px solid #e8e5e0; }
    .bmvh-feature-text { align-items: center; }
    .bmvh-feature-text strong { font-size: 14px; }
    .bmvh-feature-text span { font-size: 12px; }
}

/* Landscape phones */
@media (max-width: 991px) and (max-height: 520px) and (orientation: landscape) {
    .bmvh-slide { padding-bottom: calc(88px + var(--bmvh-feat-overlap)); }
}

@media (prefers-reduced-motion: reduce) {
    .bmvh-features * { transition-duration: 0.01ms !important; }
    .bmvh-hero * { transition-duration: 0.01ms !important; animation: none !important; }
    .bmvh-media img,
    .swiper-slide-active .bmvh-media img { transform: none; transition: none; }
}
