﻿/* --- CSS Reset & Base Styles --- */

.category-section {
    max-width: 1200px;
    margin: 0 auto 20px auto;
}

/* --- Navigation Tabs --- */
.category-nav {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-tab {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    text-align: center;
    background: #fff;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border: 1px solid black;
    font-size: 0.95rem;
}

    .category-tab:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    }

    .category-tab.active {
        background: radial-gradient(circle at 70% 30%, #f0309d, #0f172a 60%);
        color: #fff;
        border-color: #0056b3;
    }

/* --- Gallery Container --- */
.gallery-container {
    position: relative;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-height: 300px;
    display: none; /* مخفی در ابتدا */
}

    .gallery-container.active {
        display: block;
        animation: fadeIn 0.8s ease-in-out;
    }

/* --- Slider Logic --- */
.slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.slides-wrapper {
    display: flex;
    width: 500%; /* چون هر گالری 5 عکس دارد */
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.45, 0, 0.55, 1);
}

.slide {
    width: 20%; /* 100% تقسیم بر 5 */
    position: relative;
}

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.slide-caption {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
    animation: fadeInCaption 0.8s ease-in-out forwards; /* انیمیشن ظاهر شدن */
}

/* --- Dots Navigation --- */
.dots-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .dot.active {
        background: radial-gradient(circle at 50% 50%, #f0309d, #4f46e5 90%);
        width: 30px;
        border-radius: 10px;
    }

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .category-nav {
        flex-direction:inherit;
    }

    .category-tab {
        width: 100%;
    }

    .slider {
        height: 300px;
    }

    .slide-caption {
        font-size: 0.9rem;
    }
}
