﻿/* Slider Styles - Optimized Version */
.slider-section {
    margin-top: 70px;
    position: relative;
    height: 350px; /* ارتفاع ثابت و معقول */
    overflow: hidden;
}

#mainSlider {
    height: 100%;
    border-radius: 0 0 20px 20px; /* گوشه‌های گرد پایین */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.carousel-item {
    height: 100%;
}

.slide-container {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.slide-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.85) 0%, rgba(139, 115, 85, 0.75) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

    .slide-content.slide-right {
        text-align: right;
        margin-right: 10%;
    }

    .slide-content.slide-center {
        text-align: center;
        margin: 0 auto;
    }

    .slide-content.slide-left {
        text-align: left;
        margin-left: 10%;
    }

.slide-subtitle {
    display: inline-block;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.slide-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.slide-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
}

.slide-btn {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color);
    font-size: 0.9rem;
}

    .slide-btn:hover {
        background: transparent;
        color: white;
        border-color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

/* Carousel Controls - More Elegant */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    top: 40%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#mainSlider:hover .carousel-control-prev,
#mainSlider:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev {
    right: 20px;
    left: auto;
}

.carousel-control-next {
    left: 20px;
    right: auto;
}

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-50%) scale(1.05);
    }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Carousel Indicators - Modern */
.carousel-indicators {
    bottom: 15px;
    margin: 0;
}

    .carousel-indicators button {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
        border: 2px solid transparent;
        margin: 0 6px;
        transition: all 0.3s ease;
    }

        .carousel-indicators button.active {
            background: var(--accent-color);
            border-color: white;
            transform: scale(1.3);
            box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
        }

/* Slider Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.slider-progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 5s linear;
}

#mainSlider:hover .slider-progress-bar {
    animation-play-state: paused;
}

/* Responsive Slider */
@media (max-width: 1200px) {
    .slider-section {
        height: 450px;
    }

    .slide-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 992px) {
    .slider-section {
        height: 400px;
    }

    .slide-title {
        font-size: 2.2rem;
    }

    .slide-description {
        font-size: 1rem;
        max-width: 400px;
    }

    .slide-content.slide-right {
        margin-right: 5%;
    }

    .slide-content.slide-left {
        margin-left: 5%;
    }
}

@media (max-width: 768px) {
    .slider-section {
        height: 350px;
        margin-top: 60px;
    }

    .slide-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .slide-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        max-width: 300px;
    }

    .slide-content {
        padding: 0 0.5rem;
        text-align: center !important;
        margin: 0 auto !important;
    }

    .slide-btn {
        padding: 10px 25px;
        font-size: 0.85rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-indicators {
        bottom: 10px;
    }

        .carousel-indicators button {
            width: 8px;
            height: 8px;
            margin: 0 4px;
        }
}

@media (max-width: 576px) {
    .slider-section {
        height: 300px;
    }

    .slide-title {
        font-size: 1.5rem;
    }

    .slide-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .slide-description {
        display: none; /* در موبایل کوچک توصیف را مخفی می‌کنیم */
    }
}

/* Animation for Slider Content */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-content.slide-right {
    animation: slideInRight 0.8s ease;
}

.slide-content.slide-left {
    animation: slideInLeft 0.8s ease;
}

.slide-content.slide-center {
    animation: slideInUp 0.8s ease;
}
