/**
 * Hero Slider Widget CSS
 *
 */

/* ==========================================
   SWIPER BASE STRUCTURAL STYLES
   ========================================== */

.sbpa-hero-slider .swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
    display: block;
}

.sbpa-hero-slider .swiper-vertical > .swiper-wrapper {
    flex-direction: column;
}

.sbpa-hero-slider .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.sbpa-hero-slider .swiper-android .swiper-slide,
.sbpa-hero-slider .swiper-wrapper {
    transform: translate3d(0, 0, 0);
}

.sbpa-hero-slider .swiper-horizontal {
    touch-action: pan-y;
}

.sbpa-hero-slider .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    display: block;
}

.sbpa-hero-slider .swiper-slide-invisible-blank {
    visibility: hidden;
}

.sbpa-hero-slider .swiper-autoheight,
.sbpa-hero-slider .swiper-autoheight .swiper-slide {
    height: auto;
}

.sbpa-hero-slider .swiper-autoheight .swiper-wrapper {
    align-items: flex-start;
    transition-property: transform, height;
}

.sbpa-hero-slider .swiper-backface-hidden .swiper-slide {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ==========================================
   SLIDER WRAPPER
   ========================================== */

.sbpa-hero-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Cap the slider width when placed inside a boxed Elementor container. */
.e-con-boxed .sbpa-hero-slider,
.elementor-section-boxed .sbpa-hero-slider {
    max-width: 1310px;
    margin: 0 auto;
}

/* Default viewport height: 75vh mobile, 85vh desktop */
.sbpa-hero-slider .swiper,
.sbpa-hero-slider .swiper-slide {
    height: 75vh;
}

@media (min-width: 1024px) {
    .sbpa-hero-slider .swiper,
    .sbpa-hero-slider .swiper-slide {
        height: 85vh;
    }
}

/* ==========================================
   SLIDE + KEN BURNS BACKGROUND LAYER
   ========================================== */

.sbpa-hero-slider .swiper-slide {
    overflow: hidden;
    background-color: #1A1A1F;
}

.sbpa-hero-slider .swiper-slide-active {
    z-index: 1;
}

.sbpa-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 6s ease;
    transform-origin: center center;
    will-change: transform;
}

.sbpa-hero-slider .swiper-slide-active .sbpa-slide-bg {
    transform: scale(1.14);
}

/* ==========================================
   SLIDE OVERLAY
   ========================================== */

.sbpa-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to right,
        rgba(11, 11, 15, 0.85) 0%,
        rgba(11, 11, 15, 0.35) 100%
    );
}

/* ==========================================
   SLIDE INNER / CONTENT WRAPPER
   ========================================== */

.sbpa-slide-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 24px;
}

/* Content container capped at 1310px */
.sbpa-slide-content {
    width: 100%;
    max-width: 1310px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Inner content block */
.sbpa-slide-content-wrap {
    max-width: 640px;
}

/* ==========================================
   CONTENT ANIMATIONS
   ========================================== */

/* Base (hidden) state for all animated elements on non-active slides */
.sbpa-hero-slider.swiper-initialized .swiper-slide .sbpa-slide-subtitle,
.sbpa-hero-slider.swiper-initialized .swiper-slide .sbpa-slide-title,
.sbpa-hero-slider.swiper-initialized .swiper-slide .sbpa-slide-description,
.sbpa-hero-slider.swiper-initialized .swiper-slide .sbpa-slide-buttons {
    opacity: 0;
}

/* Active slide: trigger the staggered reveal */
.sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-subtitle {
    animation: sbpaEyebrowIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-title {
    animation: sbpaTitleIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-description {
    animation: sbpaDescIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-buttons {
    animation: sbpaBtnsIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

/* Eyebrow — wipe in from the left while the accent bar grows */
@keyframes sbpaEyebrowIn {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
}

/* Title — masked vertical reveal with upward motion */
@keyframes sbpaTitleIn {
    from {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
        transform: translateY(0.4em);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translateY(0);
    }
}

/* Description — fade + drift up from below */
@keyframes sbpaDescIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons — rise and settle */
@keyframes sbpaBtnsIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   SUBTITLE / EYEBROW — Warm-tan accent label
   ========================================== */

.sbpa-slide-subtitle {
    margin: 0 0 18px;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.3px;
    color: #B8977E;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

/* Growing accent bar leads the eyebrow */
.sbpa-slide-subtitle::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 2px;
    background-color: #B8977E;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ==========================================
   TITLE — Fraunces (--font-display) 800, white, tight leading
   ========================================== */

.sbpa-slide-title {
    margin: 0 0 22px;
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 60px;
    font-weight: 800;
    line-height: 1.12em;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    display: block;
}

/* ==========================================
   DESCRIPTION — Light body text
   ========================================== */

.sbpa-slide-description {
    margin: 0 0 32px;
    font-family: var(--font-sans, 'Hanken Grotesk', sans-serif);
    font-weight: 400;
    line-height: 1.6;
    color: #F5F5F5;
    max-width: 520px;
}

/* ==========================================
   BUTTONS — White primary (arrow + warm-tan hover), transparent text secondary
   ========================================== */

.sbpa-slide-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.sbpa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans, 'Hanken Grotesk', sans-serif);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1;
    box-sizing: border-box;
}

/* Primary Button — white background, dark text, arrow glyph */
.sbpa-btn--primary {
    padding: 15px 28px;
    color: #1C1C1C;
    background-color: #FFFFFF;
    border-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.sbpa-btn--primary::after {
    content: "\2192";
    margin-left: 10px;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.sbpa-btn--primary:hover {
    color: #FFFFFF;
    background-color: #B8977E;
    border-color: #B8977E;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(184, 151, 126, 0.45);
}

.sbpa-btn--primary:hover::after {
    transform: translateX(4px);
}

/* Secondary Button — transparent text-only link */
.sbpa-btn--secondary {
    padding: 15px 28px;
    color: #FFFFFF;
    background-color: transparent;
    border: none;
    border-radius: 8px;
}

.sbpa-btn--secondary:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.sbpa-btn--secondary::after {
    content: "\2192";
    margin-left: 10px;
    font-size: 15px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.sbpa-btn--secondary:hover::after {
    transform: translateX(4px);
}

/* ==========================================
   NAVIGATION ARROWS
   ========================================== */

.sbpa-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.92);
    color: #1C1C1C;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.sbpa-slider-arrow svg {
    width: 40%;
    height: 40%;
    flex-shrink: 0;
}

.sbpa-slider-arrow:hover {
    background-color: #1C1C1C;
    color: #FFFFFF;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

.sbpa-slider-arrow--prev {
    left: 24px;
}

.sbpa-slider-arrow--next {
    right: 24px;
}

/* ==========================================
   PAGINATION DOTS — Warm-tan active bars
   ========================================== */

.sbpa-hero-slider .swiper-pagination {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 1;
}

.sbpa-hero-slider .sbpa-pagination-bottom {
    bottom: 32px;
    top: auto;
}

.sbpa-hero-slider .sbpa-pagination-top {
    top: 32px;
    bottom: auto;
}

/* Override Elementor's bundled Swiper pagination styles so top/bottom + spacing
   always apply regardless of stylesheet load order. */
.sbpa-hero-slider .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bottom,
.sbpa-hero-slider .swiper-pagination-bullets.swiper-pagination-bottom {
    bottom: 32px;
    top: auto;
}

.sbpa-hero-slider .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-top,
.sbpa-hero-slider .swiper-pagination-bullets.swiper-pagination-top {
    top: 32px;
    bottom: auto;
}

.sbpa-hero-slider .swiper-pagination-bullet {
    width: 28px;
    height: 4px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.35);
    opacity: 1;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s ease;
}

.sbpa-hero-slider .swiper-pagination-bullet:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

.sbpa-hero-slider .swiper-pagination-bullet-active {
    background-color: #B8977E;
    width: 44px;
}

/* ==========================================
   PROGRESS INDICATOR — Slide counter
   ========================================== */

.sbpa-slide-counter {
    position: absolute;
    bottom: 32px;
    right: 32px;
    z-index: 10;
    font-family: var(--font-sans, 'Hanken Grotesk', sans-serif);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sbpa-slide-counter .current {
    font-size: 26px;
    font-weight: 800;
    color: #FFFFFF;
}

.sbpa-slide-counter .separator {
    margin: 0 2px;
    color: rgba(255, 255, 255, 0.35);
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .sbpa-slide-bg {
        transition: none;
        transform: scale(1.04);
    }
    .sbpa-hero-slider .swiper-slide-active .sbpa-slide-bg {
        transform: scale(1.04);
    }
    .sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-subtitle,
    .sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-title,
    .sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-description,
    .sbpa-hero-slider.swiper-initialized .swiper-slide-active .sbpa-slide-buttons {
        animation: none;
        opacity: 1;
        clip-path: none;
        transform: none;
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (min-width: 1024px) {
    .sbpa-slide-inner {
        padding: 48px 32px;
    }

    .sbpa-slide-content {
        padding: 0 48px;
    }
}

@media (max-width: 768px) {
    .sbpa-slide-title {
        margin-bottom: 18px;
    }

    .sbpa-slide-description {
        margin-bottom: 28px;
    }

    .sbpa-btn--primary,
    .sbpa-btn--secondary {
        padding: 13px 24px;
        font-size: 13px;
    }

    .sbpa-slider-arrow {
        width: 36px;
        height: 36px;
    }

    .sbpa-slider-arrow svg {
        width: 40%;
        height: 40%;
    }

    .sbpa-slider-arrow--prev {
        left: 12px;
    }

    .sbpa-slider-arrow--next {
        right: 12px;
    }

    .sbpa-hero-slider .sbpa-pagination-bottom,
    .sbpa-hero-slider .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bottom,
    .sbpa-hero-slider .swiper-pagination-bullets.swiper-pagination-bottom {
        bottom: 24px;
    }

    .sbpa-hero-slider .sbpa-pagination-top,
    .sbpa-hero-slider .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-top,
    .sbpa-hero-slider .swiper-pagination-bullets.swiper-pagination-top {
        top: 24px;
    }
}

@media (max-width: 480px) {
    .sbpa-slide-title {
        line-height: 1.1;
    }

    .sbpa-slide-subtitle {
        margin-bottom: 14px;
    }

    .sbpa-slide-description {
        margin-bottom: 24px;
        line-height: 1.55;
    }

    .sbpa-slide-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sbpa-slide-buttons .sbpa-btn {
        text-align: center;
        justify-content: center;
    }

    .sbpa-slide-buttons .sbpa-btn--primary,
    .sbpa-slide-buttons .sbpa-btn--secondary {
        width: 100%;
    }

    .sbpa-slide-buttons .sbpa-btn + .sbpa-btn {
        margin-left: 0 !important;
    }

    .sbpa-slide-inner {
        padding: 20px 16px;
    }

    .sbpa-slide-content {
        padding: 0 8px;
    }
}
