/**
 * Ascora Theme — Hero Slider Styles
 * File: assets/css/hero-slider.css
 */

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --hero-height: 620px;
    --hero-height-md: 520px;
    --hero-height-sm: 420px;

    --hero-accent: #e63946;
    --hero-accent-dark: #c1121f;
    --hero-white: #ffffff;
    --hero-overlay-dk: rgba(10, 10, 20, 0.55);
    --hero-overlay-lt: rgba(255, 255, 255, 0.45);

    --hero-radius: 12px;
    --hero-transition: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

    /* Progress bar */
    --progress-w: 4px;
    --progress-color: var(--hero-accent);
    --progress-bg: rgba(255, 255, 255, 0.2);
}

/* =============================================
   SECTION WRAPPER
   ============================================= */
.ascora-hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--hero-radius);
}

.ascora-hero-swiper {
    width: 100%;
    height: var(--hero-height);
    border-radius: var(--hero-radius);
    overflow: hidden;
}

/* =============================================
   INDIVIDUAL SLIDE
   ============================================= */
.ascora-hero-slide {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Background Image */
.ascora-hero-slide .slide-bg {
    position: absolute;
    inset: 0;
    background-image: var(--slide-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    transition: transform 8s ease-out;
    will-change: transform;
    z-index: 0;
}

/* Ken Burns on active slide */
.swiper-slide-active .slide-bg {
    transform: scale(1);
}

/* Overlay */
.ascora-hero-slide.overlay-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-dk);
    z-index: 1;
}

.ascora-hero-slide.overlay-light::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-lt);
    z-index: 1;
}

/* =============================================
   SLIDE INNER LAYOUT
   ============================================= */
.slide-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 80px;
    box-sizing: border-box;
}

/* =============================================
   SLIDE CONTENT (TEXT BLOCK)
   ============================================= */
.slide-content {
    max-width: 560px;
    color: var(--hero-white);
}

/* Eyebrow */
.slide-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hero-accent);
    background: rgba(230, 57, 70, 0.12);
    border: 1px solid rgba(230, 57, 70, 0.35);
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 18px;

    /* Animation */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s 0.1s ease, transform 0.5s 0.1s ease;
}

/* Title */
.slide-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.18;
    color: var(--hero-white);
    margin: 0 0 18px;
    letter-spacing: -0.02em;

    /* Animation */
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s 0.2s ease, transform 0.55s 0.2s ease;
}

/* Description */
.slide-description {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 30px;
    max-width: 420px;

    /* Animation */
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s 0.3s ease, transform 0.55s 0.3s ease;
}

/* Buttons */
.slide-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;

    /* Animation */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s 0.4s ease, transform 0.55s 0.4s ease;
}

/* Active slide — reveal all content */
.swiper-slide-active .slide-eyebrow,
.swiper-slide-active .slide-title,
.swiper-slide-active .slide-description,
.swiper-slide-active .slide-actions {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   BUTTONS
   ============================================= */
.slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
}

.slide-btn--primary {
    background: var(--hero-accent);
    color: var(--hero-white);
    border-color: var(--hero-accent);
}

.slide-btn--primary:hover {
    background: var(--hero-accent-dark);
    border-color: var(--hero-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.4);
    color: var(--hero-white);
}

.slide-btn--ghost {
    background: transparent;
    color: var(--hero-white);
    border-color: rgba(255, 255, 255, 0.55);
}

.slide-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--hero-white)!important;
    transform: translateY(-2px);
    color: var(--hero-white);
}

/* =============================================
   BADGE
   ============================================= */
.slide-badge {
    position: absolute;
    top: 40px;
    right: 120px;
    /* leave room for progress bar */
    background: var(--hero-accent);
    color: var(--hero-white);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.45);

    /* Animation */
    opacity: 0;
    transform: scale(0.8) translateY(-8px);
    transition: opacity 0.45s 0.5s ease, transform 0.45s 0.5s ease;
}

.swiper-slide-active .slide-badge {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* =============================================
   NAVIGATION ARROWS
   ============================================= */
.swiper-button-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--hero-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    outline: none;
}

.swiper-button-custom:hover {
    background: var(--hero-accent);
    border-color: var(--hero-accent);
    transform: translateY(-50%) scale(1.08);
}

.ascora-hero-prev {
    left: 24px;
}

.ascora-hero-next {
    right: 70px;
}

/* offset for progress bar */

/* =============================================
   NUMBER PAGINATION
   ============================================= */
.ascora-hero-pagination {
    position: absolute;
    bottom: 28px;
    left: 80px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Swiper will inject .swiper-pagination-bullet elements here */
.ascora-hero-pagination .swiper-pagination-bullet {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    opacity: 1;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 4px 10px;
    border: 1.5px solid transparent;
    border-radius: 6px;
    transition: all 0.25s ease;
    letter-spacing: 0.04em;
}

.ascora-hero-pagination .swiper-pagination-bullet-active {
    color: var(--hero-white);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* =============================================
   AUTOPLAY PROGRESS — RIGHT SIDE VERTICAL BAR
   ============================================= */
.ascora-hero-progress {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Vertical track */
.progress-track {
    width: var(--progress-w);
    height: 160px;
    background: var(--progress-bg);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

/* Animated fill bar — JS sets --progress CSS variable (0 to 1) */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--progress, 0) * 100%);
    background: var(--progress-color);
    border-radius: 99px;
    transition: height 0.1s linear;
    /* On each new slide the JS resets --progress back to 0 */
}

/* Counter: current / total */
.progress-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.progress-current {
    font-size: 18px;
    font-weight: 800;
    color: var(--hero-white);
    line-height: 1;
}

.progress-sep {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1;
}

.progress-total {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .ascora-hero-swiper {
        height: var(--hero-height-md);
    }

    .slide-inner {
        padding: 48px 60px;
    }

    .ascora-hero-prev {
        left: 16px;
    }

    .ascora-hero-next {
        right: 60px;
    }

    .slide-badge {
        right: 100px;
    }
}

@media (max-width: 768px) {
    .ascora-hero-swiper {
        height: var(--hero-height-sm);
    }

    .slide-inner {
        padding: 36px 28px;
        padding-right: 56px;
    }

    .slide-title {
        font-size: 1.75rem;
    }

    .slide-description {
        display: none;
    }

    .ascora-hero-prev {
        display: none;
    }

    .ascora-hero-next {
        right: 50px;
    }

    .ascora-hero-pagination {
        left: 28px;
        bottom: 20px;
    }

    .slide-badge {
        top: 20px;
        right: 60px;
        font-size: 0.7rem;
    }

    .progress-track {
        height: 110px;
    }
}

@media (max-width: 480px) {
    .ascora-hero-swiper {
        height: 360px;
    }

    .slide-inner {
        padding: 28px 20px;
        padding-right: 44px;
    }

    .ascora-hero-progress {
        right: 10px;
    }

    .progress-track {
        height: 80px;
    }

    .progress-current {
        font-size: 14px;
    }

    .progress-sep,
    .progress-total {
        font-size: 10px;
    }

    .slide-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .slide-btn {
        padding: 10px 20px;
        font-size: 0.82rem;
    }
}