/* ==========================================================================
   Blueopth Health Care — animated homepage hero
   ========================================================================== */

.hero {
    position: relative;
    background: var(--dark-blue);
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: clamp(560px, 82vh, 780px);
}

.hero-track {
    position: relative;
    height: 100%;
    min-height: inherit;
}

/* ---- Slide ------------------------------------------------------------- */

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .85s ease, visibility .85s;
    z-index: 1;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: transform 9s ease-out;
}

/* Slow Ken Burns push while the slide is on screen. */
.hero-slide.is-active .hero-bg {
    transform: scale(1.16);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(3, 12, 36, .92) 6%, rgba(3, 12, 36, .62) 46%, rgba(3, 12, 36, .18) 100%);
}

.hero-inner {
    position: relative;
    z-index: 3;
    padding-block: 72px 116px;
}

/* ---- Copy -------------------------------------------------------------- */

.hero-copy {
    color: #fff;
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #0c2340;
    background: linear-gradient(135deg, #7ff0e0, #34d1bb);
    padding: 7px 15px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero-eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #8fd6ff;
    margin-bottom: 12px;
}

.hero-title {
    color: #fff;
    font-size: clamp(32px, 4.6vw, 60px);
    line-height: 1.08;
    letter-spacing: -.025em;
    margin: 0 0 18px;
    text-wrap: balance;
}

.hero-text {
    font-size: clamp(15.5px, 1.35vw, 18.5px);
    line-height: 1.66;
    color: #cfe0f0;
    margin: 0 0 30px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-hero {
    background: linear-gradient(135deg, #14b8a6, #0b74c4);
    border: 0;
    color: #fff;
    padding: 13px 28px;
    font-weight: 700;
    border-radius: 11px;
    box-shadow: 0 12px 30px rgba(11, 116, 196, .38);
}

.btn-hero:hover,
.btn-hero:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(11, 116, 196, .48);
}

.btn-hero-ghost {
    border: 2px solid rgba(255, 255, 255, .42);
    color: #fff;
    background: rgba(255, 255, 255, .06);
    padding: 11px 24px;
    font-weight: 700;
    border-radius: 11px;
    backdrop-filter: blur(4px);
}

.btn-hero-ghost:hover,
.btn-hero-ghost:focus {
    background: #fff;
    border-color: #fff;
    color: var(--dark-blue);
}

.hero-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 0;
    margin: 28px 0 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #9fc4de;
}

.hero-chips li {
    display: inline-flex;
    align-items: center;
}

.hero-chips i {
    color: var(--cyan);
    font-size: 20px;
    margin-left: -6px;
}

/* ---- Product stage ----------------------------------------------------- */

.hero-stage {
    position: relative;
    height: clamp(320px, 38vw, 430px);
}

.hero-stage-glow {
    position: absolute;
    inset: 12% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 220, 255, .30), transparent 68%);
    filter: blur(22px);
}

.hero-pack {
    position: absolute;
    display: block;
    width: 46%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 60px rgba(2, 10, 30, .55);
    border: 1px solid rgba(255, 255, 255, .22);
    text-decoration: none;
}

.hero-pack img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-pack-label {
    display: block;
    padding: 9px 12px 11px;
    background: #fff;
}

.hero-pack-label strong {
    display: block;
    font-size: 14px;
    color: var(--dark-blue);
    line-height: 1.2;
}

.hero-pack-label small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
    margin-top: 2px;
}

/* Staggered depth: centre pack forward, side packs tucked behind. */
.hero-pack-1 {
    left: 26%;
    top: 4%;
    width: 50%;
    z-index: 3;
}

.hero-pack-2 {
    left: 0;
    top: 30%;
    width: 42%;
    z-index: 2;
}

.hero-pack-3 {
    right: 0;
    top: 38%;
    width: 42%;
    z-index: 1;
}

/* Gentle continuous float once the slide has settled. */
.hero-slide.is-active .hero-pack-1 { animation: heroFloat 6s ease-in-out 1.1s infinite; }
.hero-slide.is-active .hero-pack-2 { animation: heroFloat 7s ease-in-out 1.4s infinite; }
.hero-slide.is-active .hero-pack-3 { animation: heroFloat 6.5s ease-in-out 1.7s infinite; }

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
    50%      { transform: translateY(-13px) rotate(var(--tilt, 0deg)); }
}

.hero-pack-2 { --tilt: -5deg; }
.hero-pack-3 { --tilt: 5deg; }

/* ---- Entrance animation ------------------------------------------------ */

[data-anim] {
    opacity: 0;
    transform: translateY(26px);
}

.hero-slide.is-active [data-anim] {
    animation: heroIn .8s cubic-bezier(.22, .68, .28, 1) forwards;
}

.hero-slide.is-active [data-anim="1"] { animation-delay: .12s; }
.hero-slide.is-active [data-anim="2"] { animation-delay: .20s; }
.hero-slide.is-active [data-anim="3"] { animation-delay: .30s; }
.hero-slide.is-active [data-anim="4"] { animation-delay: .42s; }
.hero-slide.is-active [data-anim="5"] { animation-delay: .54s; }
.hero-slide.is-active [data-anim="6"] { animation-delay: .66s; }

/* Packs fly in from the right, then hand over to the float loop. */
.hero-slide.is-active [data-anim="7"],
.hero-slide.is-active [data-anim="8"],
.hero-slide.is-active [data-anim="9"] {
    animation: heroPackIn .9s cubic-bezier(.22, .68, .28, 1) forwards;
}

.hero-slide.is-active [data-anim="7"] { animation-delay: .34s; }
.hero-slide.is-active [data-anim="8"] { animation-delay: .50s; }
.hero-slide.is-active [data-anim="9"] { animation-delay: .64s; }

@keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes heroPackIn {
    from { opacity: 0; transform: translateY(40px) scale(.9) rotate(var(--tilt, 0deg)); }
    to   { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt, 0deg)); }
}

/* ---- Controls ---------------------------------------------------------- */

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(6, 20, 45, .42);
    color: #fff;
    font-size: 20px;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
    transition: background .2s, transform .2s;
    opacity: 0;
}

.hero-slider:hover .hero-nav,
.hero-nav:focus-visible {
    opacity: 1;
}

.hero-nav:hover {
    background: var(--cyan);
    border-color: var(--cyan);
}

.hero-prev { left: 18px; }
.hero-next { right: 18px; }

.hero-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 128px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 46px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, .28);
    overflow: hidden;
    cursor: pointer;
}

.hero-dot-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--cyan), #7ff0e0);
}

/* The active dot doubles as an autoplay progress bar. */
.hero-dot.is-active .hero-dot-fill {
    animation: heroProgress var(--hero-interval, 7000ms) linear forwards;
}

.hero-slider.is-paused .hero-dot.is-active .hero-dot-fill {
    animation-play-state: paused;
}

@keyframes heroProgress {
    from { width: 0; }
    to   { width: 100%; }
}

/* ---- Trust strip ------------------------------------------------------- */

.hero-trust-wrap {
    position: relative;
    z-index: 7;
    margin-top: -68px;
}

.hero-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(7, 89, 133, .16);
}

.hero-trust-item {
    background: #fff;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.hero-trust-item i {
    font-size: 24px;
    color: var(--teal);
    flex: 0 0 auto;
}

.hero-trust-item strong {
    display: block;
    font-size: 15.5px;
    color: var(--dark-blue);
    line-height: 1.2;
}

.hero-trust-item small {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 991.98px) {
    .hero-slider {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-inner {
        padding-block: 56px 96px;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-stage {
        height: 300px;
        margin-top: 26px;
    }

    .hero-dots {
        bottom: 34px;
    }

    .hero-nav {
        display: none;
    }

    .hero-trust-wrap {
        margin-top: 24px;
    }

    .hero-trust {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .hero-trust {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        height: 250px;
    }

    .hero-pack-label small {
        display: none;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Respect a reduced-motion preference: show everything, animate nothing. */
@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero-slide,
    [data-anim] {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-dot.is-active .hero-dot-fill {
        animation: none;
        width: 100%;
    }
}
