:root {
    --primary-purple: #6b46c1;
    --light-purple: #9f7aea;
    --dark-purple: #553c9a;
    --hover-purple: #805ad5;
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
}

.customer-reviews-container {
    padding: 4rem 2rem;
    width: 100%;
    max-width: 100%; /* حذف max-width محدود کننده */
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 30px;
}

.customer-reviews-container * {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.customer-reviews-container .reviews-title {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
}

.customer-reviews-container .reviews-title h2 {
    color: #ffffff !important;
    font-size: 2rem !important;
    margin: 0 !important;
    font-weight: 700 !important;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.reviews-swiper {
    padding: 20px 40px 50px 40px; /* Increased bottom padding */
    padding-bottom: 60px !important;
    width: 100%;
}

.swiper-pagination {
    bottom: 20px !important; /* Force override Swiper's default */
    position: absolute !important;
    z-index: 10;
}

.review-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    min-height: 180px;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.review-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: rgba(17, 12, 46, 0.25) 0px 48px 100px 0px;
}

.swiper-button-next,
.swiper-button-prev {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    color: var(--gradient-start);
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.customer-image {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.customer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gradient-start);
    margin: 0;
}

.attachment-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.attachment-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.review-content {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar styling */
.review-content::-webkit-scrollbar {
    width: 4px;
}

.review-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.review-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.review-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.review-attachment {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-attachment img,
.review-attachment video {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Modal Styles */
.attachment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: 2rem auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
    color: var(--primary-purple);
}

.modal-close:hover {
    background: var(--light-purple);
    color: white;
}

.modal-body {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-body img,
.modal-body video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.review-attachment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.review-attachment-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1;
    color: var(--primary-purple);
}

.modal-close:hover {
    background: var(--light-purple);
    color: white;
}

.modal-body {
    margin-top: 20px;
    text-align: center;
}

.modal-body img,
.modal-body video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.attachment-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.attachment-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .customer-reviews-container {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .customer-reviews-container {
        padding: 2rem 1rem;
        border-radius: 20px;
    }

    .customer-reviews-container .reviews-title {
        margin-bottom: 1rem;
    }
    
    .customer-reviews-container .reviews-title h2 {
        font-size: 1.5rem !important;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-card {
        min-height: 160px;
        max-height: 200px;
        padding: 1rem;
    }

    .reviews-swiper {
        padding-bottom: 50px !important;
    }
    
    .swiper-pagination {
        bottom: 15px !important;
    }
}

@media (max-width: 767px) {
    .review-card {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .reviews-swiper {
        padding: 20px 30px;
    }
}

.swiper-slide {
    height: auto;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    width: 20px;
    border-radius: 5px;
    background: white;
    opacity: 1;
}
