/**
 * Hero Slider Widget CSS
 *
 * Design: Luxury Editorial — warm, artisanal, distinctive.
 * Uses Caveat handwritten subtitles, dramatic Playfair Display titles
 * with decorative underline accents, DM Sans descriptions, and
 * warm accent-toned buttons.
 *
 * Scoped under .snpa-hero-slider to avoid conflicts.
 *
 * Includes Swiper base structural styles to ensure proper rendering
 * even when Elementor's Swiper CSS is not loaded for custom widgets.
 */

/* ==========================================
   SWIPER BASE STRUCTURAL STYLES
   (Required for proper slider layout)
   ========================================== */

.snpa-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;
}

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

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

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

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

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

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

/* Auto-height */
.snpa-hero-slider .swiper-autoheight,
.snpa-hero-slider .swiper-autoheight .swiper-slide {
    height: auto;
}

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

/* Backface hidden (3D transforms fix) */
.snpa-hero-slider .swiper-backface-hidden .swiper-slide {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

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

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

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

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

/* ==========================================
   SLIDE STYLES
   ========================================== */

.snpa-hero-slider .swiper-slide {
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #F3EFEA; /* --brand-bg-secondary fallback */
}

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

/* ==========================================
   SLIDE OVERLAY — Warm gradient matching theme
   Left-to-right: warm off-white → transparent
   ========================================== */

.snpa-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    /* Default: warm left-to-right gradient matching Shopnex theme */
    background: linear-gradient(
        to right,
        rgba(251, 249, 246, 0.94) 0%,
        rgba(251, 249, 246, 0.7) 35%,
        rgba(251, 249, 246, 0.3) 65%,
        transparent 100%
    );
}

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

.snpa-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 matching theme's max-width 1440px centered layout */
.snpa-slide-content {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Inner content block — generous max-width for luxury feel */
.snpa-slide-content-wrap {
    max-width: 620px;
}

/* ==========================================
   CONTENT ANIMATIONS (only when Swiper is active)
   ========================================== */

.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-subtitle,
.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-title,
.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-description,
.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-buttons {
    animation: snpaFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-title {
    animation-delay: 0.12s;
}

.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-description {
    animation-delay: 0.24s;
}

.snpa-hero-slider.swiper-initialized .swiper-slide-active .snpa-slide-buttons {
    animation-delay: 0.36s;
}

@keyframes snpaFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   SUBTITLE — Theme: Caveat handwritten, warm accent, personal touch
   A completely different feel from the old mono/uppercase label
   ========================================== */

.snpa-slide-subtitle {
    margin: 0 0 12px;
    font-family: 'Caveat', cursive;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: #B8977E; /* --brand-accent-warm */
    display: inline-block;
    position: relative;
    padding-left: 28px;
}

/* Decorative dash before subtitle */
.snpa-slide-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background: #B8977E;
    border-radius: 1px;
}

@media (min-width: 1024px) {
    .snpa-slide-subtitle {
        font-size: 22px;
        margin-bottom: 16px;
        padding-left: 32px;
    }

    .snpa-slide-subtitle::before {
        width: 22px;
    }
}

/* ==========================================
   TITLE — Theme: Playfair Display, dramatic editorial style
   With a warm decorative underline accent bar
   ========================================== */

.snpa-slide-title {
    margin: 0 0 20px;
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1C1C1C; /* --brand-dark */
    position: relative;
    display: block;
    padding-bottom: 18px;
}

/* Warm decorative underline accent */
.snpa-slide-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: #B8977E; /* --brand-accent-warm */
    border-radius: 2px;
}

@media (min-width: 1024px) {
    .snpa-slide-title {
        font-size: 72px;
        margin-bottom: 24px;
        padding-bottom: 22px;
    }

    .snpa-slide-title::after {
        width: 64px;
        height: 3px;
    }
}

/* ==========================================
   DESCRIPTION — Theme: DM Sans, modern geometric, warm muted
   Different from the old Inter body text
   ========================================== */

.snpa-slide-description {
    margin: 0 0 40px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.75;
    color: #6B6560; /* --brand-muted */
    max-width: 480px;
    letter-spacing: 0.0em;
}

@media (min-width: 1024px) {
    .snpa-slide-description {
        font-size: 16px;
        margin-bottom: 44px;
    }
}

/* ==========================================
   BUTTONS — New editorial style
   Primary: Warm accent background, pill shape
   Secondary: Text link with arrow, no box
   ========================================== */

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

.snpa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    box-sizing: border-box;
}

/* Primary Button — warm accent bg, white text, pill */
.snpa-btn--primary {
    padding: 16px 36px;
    font-size: 13px;
    color: #ffffff;
    background-color: #B8977E; /* --brand-accent-warm */
    border-radius: 9999px; /* --radius-full */
    box-shadow: 0 8px 28px rgba(184, 151, 126, 0.3);
}

.snpa-btn--primary:hover {
    color: #ffffff;
    background-color: #A0785E; /* --brand-accent-warm-hover */
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(184, 151, 126, 0.4);
}

/* Secondary Button — text link with arrow, no background */
.snpa-btn--secondary {
    padding: 0;
    font-size: 13px;
    color: #1C1C1C; /* --brand-dark */
    background: none;
    border: none;
    border-radius: 0;
    position: relative;
    gap: 8px;
}

/* Arrow icon for secondary button */
.snpa-btn--secondary::after {
    content: '→';
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.snpa-btn--secondary:hover {
    color: #B8977E; /* --brand-accent-warm */
    background: none;
}

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

/* ==========================================
   NAVIGATION ARROWS — Warm, refined, minimal
   ========================================== */

.snpa-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1C1C1C;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(232, 228, 223, 0.6); /* --brand-border with opacity */
    outline: none;
}

.snpa-slider-arrow svg {
    width: 18px;
    height: 18px;
}

.snpa-slider-arrow:hover {
    background-color: #1C1C1C;
    color: #FBF9F6; /* --brand-bg */
    border-color: #1C1C1C;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 8px 24px rgba(28, 28, 28, 0.15);
}

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

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

/* ==========================================
   PAGINATION DOTS — Warm pill-shaped bars
   ========================================== */

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

.snpa-hero-slider .snpa-pagination-bottom {
    bottom: 36px;
}

.snpa-hero-slider .snpa-pagination-top {
    top: 36px;
}

.snpa-hero-slider .swiper-pagination-bullet {
    width: 28px;
    height: 3px;
    border-radius: 9999px;
    background-color: rgba(28, 28, 28, 0.15); /* --brand-dark with low opacity */
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snpa-hero-slider .swiper-pagination-bullet:hover {
    background-color: rgba(28, 28, 28, 0.3);
}

.snpa-hero-slider .swiper-pagination-bullet-active {
    background-color: #B8977E; /* --brand-accent-warm */
    width: 36px;
    border-radius: 9999px;
}

/* ==========================================
   PROGRESS INDICATOR — Slide counter (optional enhancement)
   ========================================== */

.snpa-slide-counter {
    position: absolute;
    bottom: 36px;
    right: 32px;
    z-index: 10;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #9C9792; /* --brand-text-muted */
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.snpa-slide-counter .current {
    font-size: 24px;
    font-weight: 600;
    color: #1C1C1C;
    font-family: 'Playfair Display', serif;
}

.snpa-slide-counter .separator {
    margin: 0 2px;
    color: #E8E4DF;
}

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

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

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

@media (max-width: 768px) {
    .snpa-slide-title {
        font-size: 32px;
        padding-bottom: 16px;
    }

    .snpa-slide-title::after {
        width: 36px;
    }

    .snpa-slide-description {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .snpa-btn--primary {
        padding: 14px 28px;
        font-size: 12px;
    }

    .snpa-btn--secondary {
        font-size: 12px;
    }

    .snpa-slider-arrow {
        width: 40px;
        height: 40px;
    }

    .snpa-slider-arrow svg {
        width: 16px;
        height: 16px;
    }

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

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

    .snpa-hero-slider .snpa-pagination-bottom {
        bottom: 24px;
    }
}

@media (max-width: 480px) {
    .snpa-slide-title {
        font-size: 28px;
        line-height: 1.12;
        padding-bottom: 14px;
    }

    .snpa-slide-subtitle {
        font-size: 18px;
        margin-bottom: 10px;
        padding-left: 24px;
    }

    .snpa-slide-subtitle::before {
        width: 14px;
    }

    .snpa-slide-description {
        font-size: 13px;
        margin-bottom: 28px;
        line-height: 1.7;
    }

    .snpa-slide-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .snpa-slide-buttons .snpa-btn {
        text-align: center;
    }

    .snpa-slide-buttons .snpa-btn--primary {
        width: 100%;
    }

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

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

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

    .snpa-btn--primary {
        padding: 14px 24px;
    }
}
