/* ==========================================================================
   SANGU modern hero slider — self-contained, no framework.
   Brand #E32D44. Replaces the legacy Owl header slider.
   ========================================================================== */

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(440px, 64vh, 660px);
    overflow: hidden;
    background: #14141a;
    isolation: isolate;
    border-top: 5px solid var(--brand, #E32D44);
    border-bottom: 5px solid var(--brand, #E32D44);
}

/* --- slides ------------------------------------------------------------- */
.hero-slider__track { position: absolute; inset: 0; }

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease;
    z-index: 1;
}
.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    will-change: transform;
}
/* slow Ken-Burns zoom only on the visible slide */
.hero-slide.is-active .hero-slide__bg {
    animation: heroKenBurns 7s ease-out forwards;
}
@keyframes heroKenBurns {
    from { transform: scale(1.06); }
    to   { transform: scale(1.16); }
}
/* single-slide mode: keep the hero gently alive with an endless drift */
.hero-slider--single .hero-slide.is-active .hero-slide__bg {
    animation: heroDrift 22s ease-in-out infinite alternate;
}
@keyframes heroDrift {
    from { transform: scale(1.03); }
    to   { transform: scale(1.12); }
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    /* readable text column on the left, image stays clean on the right */
    background:
        linear-gradient(90deg, rgba(16,16,22,.72) 0%, rgba(16,16,22,.38) 44%, rgba(16,16,22,.04) 72%),
        linear-gradient(0deg, rgba(16,16,22,.5) 0%, rgba(16,16,22,0) 26%);
}

/* --- text --------------------------------------------------------------- */
.hero-slide__content {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    padding-right: 90px; /* keep clear of the fixed social rail */
    padding-bottom: 34px; /* optical: shift text up, clear of the control bar */
}
.hero-slide__accent {
    display: block;
    width: 52px;
    height: 4px;
    border-radius: 2px;
    background: var(--brand, #E32D44);
    margin-bottom: 22px;
}
.hero-slide__title {
    max-width: 700px;
    margin: 0 0 16px;
    font-size: clamp(26px, 3.4vw, 48px);
    line-height: 1.16;
    color: #fff;
    text-shadow: 0 2px 26px rgba(0,0,0,.45);
}
.hero-slide__desc {
    max-width: 560px;
    margin: 0 0 28px;
    font-size: clamp(15px, 1.25vw, 18px);
    line-height: 1.65;
    color: rgba(255,255,255,.88);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-slide__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--brand, #E32D44);
    color: #fff !important;
    text-decoration: none;
    border-radius: 100px;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(227,45,68,.35);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.hero-slide__cta svg { transition: transform .25s ease; }
.hero-slide__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(227,45,68,.5);
    color: #fff !important;
}
.hero-slide__cta:hover svg { transform: translateX(5px); }

/* entrance animation for the active slide's text */
.hero-slide.is-active .hero-slide__accent,
.hero-slide.is-active .hero-slide__title,
.hero-slide.is-active .hero-slide__desc,
.hero-slide.is-active .hero-slide__cta {
    animation: heroRise .7s cubic-bezier(.22,.61,.36,1) both;
}
.hero-slide.is-active .hero-slide__title { animation-delay: .12s; }
.hero-slide.is-active .hero-slide__desc  { animation-delay: .22s; }
.hero-slide.is-active .hero-slide__cta   { animation-delay: .32s; }
@keyframes heroRise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- control bar: progress bars left, arrows right, one baseline -------- */
.hero-slider__arrow {
    position: absolute;
    bottom: 26px;
    z-index: 6;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.hero-slider__arrow:hover {
    background: var(--brand, #E32D44);
    border-color: var(--brand, #E32D44);
    transform: scale(1.08);
}
.hero-slider__arrow--prev { right: 86px; }
.hero-slider__arrow--next { right: 28px; }

/* minimal progress bars, vertically centered on the arrows' axis */
.hero-slider__dots {
    position: absolute;
    left: 0; right: 0;
    bottom: 37px; /* bar center (37 + 12) == arrow center (26 + 23) */
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}
.hero-dot {
    flex: 0 0 auto;
    width: 44px;
    background: none;
    border: 0;
    padding: 10px 0; /* comfortable hit area around the 4px bar */
    text-align: left;
    cursor: pointer;
    transition: width .3s ease;
}
.hero-dot.is-active { width: 76px; }
.hero-dot__label { display: none; }
.hero-dot__bar {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,.3);
    overflow: hidden;
    transition: background .25s ease;
}
.hero-dot:hover .hero-dot__bar { background: rgba(255,255,255,.55); }
.hero-dot__fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--brand, #E32D44);
    border-radius: 4px;
}
.hero-dot.is-active .hero-dot__fill { width: 100%; }
.hero-dot.is-active.is-animating .hero-dot__fill {
    transition: width linear;
    transition-duration: var(--hero-autoplay, 6s);
}

/* --- responsive --------------------------------------------------------- */
@media (max-width: 991px) {
    .hero-slider { height: clamp(420px, 68vh, 560px); }
}
@media (max-width: 575px) {
    .hero-slider { height: 440px; }
    .hero-slide__desc { display: none; }
    .hero-slide__content { padding-right: 16px; padding-bottom: 20px; }
    .hero-slider__arrow { display: none; } /* swipe + bars are enough on phones */
    .hero-slider__dots { justify-content: center; bottom: 26px; }
    .hero-dot { width: 34px; }
    .hero-dot.is-active { width: 58px; }
}

/* accessibility: honour reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide.is-active .hero-slide__bg { animation: none; transform: scale(1.06); }
    .hero-slide.is-active .hero-slide__accent,
    .hero-slide.is-active .hero-slide__title,
    .hero-slide.is-active .hero-slide__desc,
    .hero-slide.is-active .hero-slide__cta { animation: none; }
    .hero-dot.is-active.is-animating .hero-dot__fill { transition: none; width: 100%; }
}
