/* ============================================================
   Spensa Elements – Hero Slider & Floating Stats Bar
   BEM: .spensa-hero-slider__[element]--[modifier]
        .spensa-hero-stats__[element]--[modifier]
   ============================================================ */

/*
 * Full-Width Breakout untuk Elementor Container Box.
 * Hero Slider adalah full-bleed section — harus melebar penuh viewport.
 * Tanpa ini, hero akan terpotong sesuai lebar Container Box parent.
 */
.elementor-widget-spensa-hero-slider {
	width: 100%;
}

/* ── Outer Wrapper ───────────────────────────────────────── */
.spensa-hero-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* ── Slider Wrapper ──────────────────────────────────────── */
.spensa-hero-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 480px;
    background-color: #111827;
}

/* ── Slide ───────────────────────────────────────────────── */
.spensa-hero-slider__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.spensa-hero-slider__slide--active {
    opacity: 1;
    z-index: 1;
}

/* ── Overlay ─────────────────────────────────────────────── */
.spensa-hero-slider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 60%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

/* ── Content ─────────────────────────────────────────────── */
.spensa-hero-slider__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 3rem 4rem;
    z-index: 3;
    box-sizing: border-box;
}

.spensa-hero-slider__inner {
    position: relative;
    max-width: 720px;
}

/* ── Badge ───────────────────────────────────────────────── */
.spensa-hero-slider__badge {
    display: inline-block;
    padding: 0.25rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.spensa-hero-slider__badge--blue {
    background-color: #0F52BA;
    color: #ffffff;
}

.spensa-hero-slider__badge--accent {
    background-color: #F59E0B;
    color: #111827;
}

.spensa-hero-slider__badge--green {
    background-color: #16A34A;
    color: #ffffff;
}

.spensa-hero-slider__badge--white {
    background-color: rgba(255, 255, 255, 0.9);
    color: #111827;
}

/* ── Title ───────────────────────────────────────────────── */
.spensa-hero-slider__title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

/* ── Description ─────────────────────────────────────────── */
.spensa-hero-slider__desc {
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 2.25rem;
    max-width: 620px;
    line-height: 1.75;
    font-size: 1.05rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.spensa-hero-slider__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.spensa-hero-slider__btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #0F52BA;
    color: #ffffff !important;
    padding: 0.85rem 1.85rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(15, 82, 186, 0.35);
}

.spensa-hero-slider__btn-primary:hover {
    background-color: #0A387E;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 82, 186, 0.45);
}

.spensa-hero-slider__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.45);
    padding: 0.85rem 1.85rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.spensa-hero-slider__btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    transform: translateY(-2px);
}

/* ── Navigation Arrows ───────────────────────────────────── */
.spensa-hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none !important;
    color: #ffffff !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0 !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.spensa-hero-slider__nav:hover {
    background-color: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.08);
}

.spensa-hero-slider__nav--prev {
    left: 1.5rem;
}

.spensa-hero-slider__nav--next {
    right: 1.5rem;
}

/* ── Dots ────────────────────────────────────────────────── */
.spensa-hero-slider__dots {
    position: absolute;
    bottom: 4.5rem; /* Raised to accommodate floating stats below */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.65rem;
    z-index: 10;
}

.spensa-hero-slider__dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spensa-hero-slider__dot--active {
    background-color: #ffffff;
    width: 2.25rem;
}

/* ── Integrated Floating Statistics Bar ─────────────────── */
.spensa-hero-stats {
    position: relative;
    margin-top: -3.5rem; /* Natural overlap onto the hero slider */
    z-index: 20;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.spensa-hero-stats__card {
    background-color: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 1.75rem 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    border: 1px solid #f1f5f9;
    box-sizing: border-box;
}

.spensa-hero-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

/* Subtle separator between items on desktop */
.spensa-hero-stats__item + .spensa-hero-stats__item::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: #f1f5f9;
}

.spensa-hero-stats__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    transition: transform 0.25s ease;
}

.spensa-hero-stats__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: currentColor;
    display: block;
}

.spensa-hero-stats__icon i {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
    color: inherit;
}

.spensa-hero-stats__item:hover .spensa-hero-stats__icon {
    transform: scale(1.08);
}

.spensa-hero-stats__number {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.spensa-hero-stats__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0.35rem 0 0;
}

/* ── Responsive Queries ──────────────────────────────────── */
@media (max-width: 991px) {
    .spensa-hero-slider__content {
        padding: 2.5rem;
    }

    .spensa-hero-stats__card {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
        padding: 1.5rem;
    }

    .spensa-hero-stats__item + .spensa-hero-stats__item::before {
        display: none;
    }

    .spensa-hero-stats {
        margin-top: -2.75rem;
    }
}

@media (max-width: 768px) {
    .spensa-hero-slider__content {
        padding: 2rem 1.5rem;
    }

    .spensa-hero-slider__nav {
        display: none; /* Hide arrows on touch devices; use dots */
    }

    .spensa-hero-slider__dots {
        bottom: 3.75rem;
    }
}

@media (max-width: 575px) {
    .spensa-hero-stats__card {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem 0.75rem;
        padding: 1.25rem 0.75rem;
    }

    .spensa-hero-stats__icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.1rem;
    }

    .spensa-hero-stats__number {
        font-size: 1.45rem;
    }

    .spensa-hero-stats__label {
        font-size: 0.72rem;
    }

    .spensa-hero-stats {
        margin-top: -2.25rem;
        padding: 0 1rem;
    }
}
