/**
 * Home Slider - Modern & Professional Styles
 * Version: 2.0
 * Override parent theme slider styles
 */

/* ============================================
   CSS Variables for Slider
============================================ */
:root {
    --slider-height: 85vh;
    --slider-min-height: 550px;
    --slider-max-height: 800px;
    --slider-transition-speed: 0.8s;
    --slider-overlay-gradient: linear-gradient(
        135deg,
        rgba(255, 107, 107, 0.75) 0%,
        rgba(255, 142, 83, 0.65) 25%,
        rgba(167, 139, 250, 0.7) 75%,
        rgba(99, 102, 241, 0.8) 100%
    );
    --slider-text-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    --slider-content-max-width: 1100px;
}

/* ============================================
   Main Slider Container
============================================ */
.home-slider {
    position: relative;
    width: 100%;
    height: var(--slider-height);
    min-height: var(--slider-min-height);
    max-height: var(--slider-max-height);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.home-slider__wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.home-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ============================================
   Individual Slides
============================================ */
.home-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: 
        opacity var(--slider-transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
        visibility var(--slider-transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.home-slider__slide.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Background Image with Ken Burns Effect
============================================ */
.home-slider__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    transform: scale(1.02);
    transition: transform 10s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.home-slider__slide.active .home-slider__bg {
    transform: scale(1.12);
}

/* Smooth image loading */
.home-slider__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ============================================
   Minimal Overlay - Keep Image Visible
============================================ */
.home-slider__overlay {
    position: absolute;
    inset: 0;
    /* Very subtle overlay only at bottom for text area */
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        transparent 60%
    );
    z-index: 1;
}

/* ============================================
   Content Container - With Background Box
============================================ */
.home-slider__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 60px;
    max-width: var(--slider-content-max-width);
    margin: 0 auto;
    left: 0;
    right: 0;
    z-index: 3;
}

/* Inner content box with background */
.home-slider__content-inner {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 50px;
    border-radius: 20px;
    max-width: 700px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Fallback when no inner wrapper exists */
.home-slider__content:not(:has(.home-slider__content-inner)) {
    background: rgb(0 0 0 / 28%);
    /* backdrop-filter: blur(12px); */
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 50px;
    border-radius: 20px;
    max-width: 700px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    inset: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Alignment Variations */
.home-slider__content--left {
    align-items: flex-start;
    text-align: left;
    left: 60px;
    right: auto;
    transform: translateY(-50%);
}

.home-slider__content--center {
    align-items: center;
    text-align: center;
}

.home-slider__content--right {
    align-items: flex-end;
    text-align: right;
    right: 60px;
    left: auto;
    transform: translateY(-50%);
}

/* ============================================
   Subtitle - Clean Badge Style
============================================ */
.home-slider__subtitle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mn-primary, #ff6b6b);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateY(30px);
}

.home-slider__subtitle::before {
    content: '✨';
    font-size: 14px;
}

/* ============================================
   Title - Bold & Clear
============================================ */
.home-slider__title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

/* Title highlight effect */
.home-slider__title strong,
.home-slider__title span {
    color: var(--mn-secondary, #fbbf24);
}

/* ============================================
   Description - Clean & Readable
============================================ */
.home-slider__desc {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 30px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

/* ============================================
   CTA Button - Clean Style
============================================ */
.home-slider__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--mn-primary, #ff6b6b);
    color: #fff;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.35);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
    border: none;
    cursor: pointer;
}

.home-slider__btn:hover {
    background: var(--mn-primary-dark, #e55a5a);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.45);
    color: #fff;
}

/* Button arrow icon */
.home-slider__btn::after {
    content: '→';
    font-size: 18px;
    transition: transform 0.3s ease;
}

.home-slider__btn:hover::after {
    transform: translateX(4px);
}

/* ============================================
   Main Animation Keyframe
============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reset animations when slide is not active */
.home-slider__slide:not(.active) .home-slider__subtitle,
.home-slider__slide:not(.active) .home-slider__title,
.home-slider__slide:not(.active) .home-slider__desc,
.home-slider__slide:not(.active) .home-slider__btn {
    animation: none;
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   Navigation Arrows - Glassmorphism Style
============================================ */
.home-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-slider__arrow--prev {
    left: 40px;
}

.home-slider__arrow--next {
    right: 40px;
}

.home-slider__arrow:hover {
    background: var(--mn-primary, #ff6b6b);
    border-color: var(--mn-primary, #ff6b6b);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 
        0 15px 40px rgba(255, 107, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.home-slider__arrow:active {
    transform: translateY(-50%) scale(1.05);
}

/* Arrow icons - use SVG-like characters */
.home-slider__arrow--prev::before {
    
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
} 

.home-slider__arrow--next::before {
    
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
}

/* Hide default arrow content */
.home-slider__arrow {
    font-size: 0;
}

/* ============================================
   Dots Navigation - Modern Pills
============================================ */
.home-slider__dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 10;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-slider__dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.home-slider__dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.home-slider__dot.active {
    background: #fff;
    width: 36px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.home-slider__dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

/* ============================================
   Progress Bar (Optional - for autoplay)
============================================ */
.home-slider__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.home-slider__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--mn-primary, #ff6b6b), var(--mn-secondary, #a78bfa));
    width: 0;
    animation: progressFill 5s linear infinite;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

/* ============================================
   Responsive Styles
============================================ */
@media (max-width: 1200px) {
    .home-slider {
        --slider-height: 75vh;
    }
    
    .home-slider__content {
        padding: 60px 50px;
    }
    
    .home-slider__arrow--prev {
        left: 30px;
    }
    
    .home-slider__arrow--next {
        right: 30px;
    }
}

@media (max-width: 992px) {
    .home-slider {
        --slider-height: 70vh;
        --slider-min-height: 500px;
    }
    
    .home-slider__content {
        padding: 50px 40px;
    }
    
    .home-slider__title {
        margin-bottom: 20px;
    }
    
    .home-slider__desc {
        margin-bottom: 32px;
    }
    
    .home-slider__arrow {
        width: 54px;
        height: 54px;
    }
    
    .home-slider__arrow--prev {
        left: 20px;
    }
    
    .home-slider__arrow--next {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .home-slider {
        --slider-height: 65vh;
        --slider-min-height: 450px;
    }
    
    .home-slider__content {
        padding: 30px 25px;
        max-width: 90%;
    }
    
    .home-slider__content--left,
    .home-slider__content--right {
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }
    
    .home-slider__subtitle {
        padding: 8px 18px;
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .home-slider__subtitle::before {
        font-size: 12px;
    }
    
    .home-slider__title {
        font-size: 28px;
        margin-bottom: 14px;
    }
    
    .home-slider__desc {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.6;
    }
    
    .home-slider__btn {
        padding: 14px 28px;
        font-size: 14px;
    }
    
    .home-slider__arrow {
        width: 44px;
        height: 44px;
    }
    
    .home-slider__arrow--prev {
        left: 10px;
    }
    
    .home-slider__arrow--next {
        right: 10px;
    }
    
    .home-slider__dots {
        bottom: 25px;
        padding: 8px 16px;
        gap: 8px;
    }
    
    .home-slider__dot {
        width: 8px;
        height: 8px;
    }
    
    .home-slider__dot.active {
        width: 24px;
    }
}

@media (max-width: 576px) {
    .home-slider {
        --slider-height: 70vh;
        --slider-min-height: 400px;
        --slider-max-height: 550px;
    }
    
    .home-slider__content {
        padding: 25px 20px;
        max-width: 95%;
        border-radius: 16px;
    }
    
    .home-slider__content--left,
    .home-slider__content--center,
    .home-slider__content--right {
        align-items: center;
        text-align: center;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }
    
    .home-slider__subtitle {
        padding: 6px 14px;
        font-size: 11px;
        margin-bottom: 12px;
    }
    
    .home-slider__title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .home-slider__desc {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .home-slider__btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    /* Hide arrows on mobile */
    .home-slider__arrow {
        display: none;
    }
    
    .home-slider__dots {
        bottom: 20px;
    }
}

/* ============================================
   Accessibility & Reduced Motion
============================================ */
@media (prefers-reduced-motion: reduce) {
    .home-slider__slide,
    .home-slider__bg,
    .home-slider__subtitle,
    .home-slider__title,
    .home-slider__desc,
    .home-slider__btn,
    .home-slider__arrow,
    .home-slider__dot {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    .home-slider__slide.active .home-slider__bg {
        transform: none;
    }
    
    .home-slider__overlay::before,
    .home-slider__overlay::after {
        animation: none;
    }
}

/* Focus states for keyboard navigation */
.home-slider__arrow:focus,
.home-slider__dot:focus,
.home-slider__btn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

/* ============================================
   Print Styles
============================================ */
@media print {
    .home-slider {
        height: auto;
        min-height: 300px;
    }
    
    .home-slider__arrow,
    .home-slider__dots {
        display: none;
    }
    
    .home-slider__overlay {
        background: rgba(0, 0, 0, 0.3);
    }
}
