﻿/* Hero Slider Container */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #f5f5f5;
    direction: rtl; /* اضافه شده */
}

/* Slider Wrapper */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .slide.active {
        opacity: 1;
        visibility: visible;
        z-index: 2;
    }

/* Slide Background Image */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

    .slide-bg::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    }

/* Slide Content */
.slide-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    padding: 0 40px;
    color: white;
    text-align: right; /* تغییر از left به right */
    animation: slideInUp 0.8s ease-out;
}

.slide.active .slide-content {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Labels */
.slide-label {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Title */
.slide-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInRight 0.8s ease-out 0.3s both; /* تغییر از fadeInLeft به fadeInRight */
}

@keyframes fadeInRight { /* تغییر نام و جهت انیمیشن */
    from {
        opacity: 0;
        transform: translateX(50px); /* تغییر از -50px به +50px */
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide Description */
.slide-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    animation: fadeInRight 0.8s ease-out 0.4s both; /* تغییر از fadeInLeft به fadeInRight */
}

/* Slide Buttons */
.slide-buttons {
    display: flex;
    gap: 15px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-btn {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slide-btn-primary {
    background: var(--primary-color);
    color: white;
}

    .slide-btn-primary:hover {
        background: var(--primary-dark);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }

.slide-btn-secondary {
    background: white;
    color: var(--primary-color);
}

    .slide-btn-secondary:hover {
        background: #f0f0f0;
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    }

.slide-btn i {
    transition: transform 0.3s ease;
}

.slide-btn:hover i {
    transform: translateX(-5px); /* تغییر جهت از +5px به -5px برای RTL */
}

/* Slider Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.slider-arrow {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    color: var(--primary-color);
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

    .slider-arrow:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

    .slider-arrow:active {
        transform: scale(0.95);
    }

/* Slider Pagination Dots */
.slider-pagination {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s ease;
}

    .slider-dot:hover {
        background: rgba(255, 255, 255, 0.8);
        transform: scale(1.2);
    }

    .slider-dot.active {
        width: 35px;
        border-radius: 10px;
        background: white;
    }

/* Autoplay Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary-color);
    z-index: 11;
    transition: width 0.1s linear;
}

    .slider-progress.active {
        animation: progressBar 5s linear;
    }

@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Slide Counter */
.slide-counter {
    position: absolute;
    top: 30px;
    left: 30px; /* تغییر از right به left برای RTL */
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

/* Pause/Play Button */
.slider-control {
    position: absolute;
    bottom: 30px;
    left: 30px; /* تغییر از right به left برای RTL */
    z-index: 10;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-size: 1.1rem;
}

    .slider-control:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-slider {
        height: 500px;
    }

    .slide-title {
        font-size: 2.8rem;
    }

    .slide-description {
        font-size: 1.1rem;
    }

    .slider-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 450px;
    }

    .slide-content {
        padding: 0 25px;
        text-align: center;
    }

    .slide-title {
        font-size: 2.2rem;
    }

    .slide-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .slide-buttons {
        flex-direction: column;
        align-items: center;
    }

    .slide-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .slider-nav {
        padding: 0 15px;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .slide-counter,
    .slider-control {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 400px;
    }

    .slide-title {
        font-size: 1.8rem;
    }

    .slide-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .slide-label {
        font-size: 0.8rem;
        padding: 6px 15px;
    }

    .slide-btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    .slider-pagination {
        bottom: 20px;
    }

    .slider-dot {
        width: 10px;
        height: 10px;
    }

        .slider-dot.active {
            width: 28px;
        }
}

/* Animation Variants */
.slide[data-animation="fade"] .slide-content {
    animation: fadeIn 1s ease-out;
}

.slide[data-animation="zoom"] .slide-content {
    animation: zoomIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Touch Swipe Indicator */
.swipe-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    display: none;
    animation: bounce 2s infinite;
}

@media (max-width: 768px) {
    .swipe-indicator {
        display: block;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}
