
/* Customer Reviews Display Plugin Styles */

/* CSS Variables for Elementor Global Colors */
:root {
    --crd-accent-color: var(--e-global-color-accent, #3b82f6);
    --crd-accent-hover: var(--e-global-color-accent, #2563eb);
}

/* Container Styles */
.crd-reviews-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Grid Style */
.crd-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* List Style */
.crd-style-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Slider Style */
.crd-style-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.crd-style-slider .crd-review-card {
    flex: 0 0 350px;
    scroll-snap-align: start;
}

/* Review Card */
.crd-review-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.crd-review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--crd-accent-color);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.crd-review-card:hover::before {
    transform: translateX(0);
}

.crd-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: #ddd6fe;
}

/* Review Content */
.crd-review-content {
    margin-bottom: 25px;
}

/* Star Rating */
.crd-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 15px;
}

.crd-star {
    font-size: 20px;
    color: #e5e7eb;
    transition: color 0.2s ease;
}

.crd-star.filled {
    color: #fbbf24;
    animation: starPop 0.3s ease;
}

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Review Text */
.crd-review-text {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    position: relative;
    padding-left: 20px;
    font-style: italic;
}

.crd-review-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 48px;
    color: #e0e7ff;
    font-family: Georgia, serif;
}

/* Author Section */
.crd-review-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

/* Author Avatar */
.crd-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--crd-accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.crd-author-avatar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

.crd-review-card:hover .crd-author-avatar::after {
    transform: translateX(100%) rotate(45deg);
}

/* Author Info */
.crd-author-info {
    flex: 1;
}

.crd-author-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.crd-author-location {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
}

.crd-location-icon {
    font-size: 12px;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
    .crd-style-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .crd-review-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .crd-review-text {
        font-size: 14px;
        line-height: 1.5;
        padding-left: 15px;
    }
    
    .crd-review-text::before {
        font-size: 36px;
    }
    
    .crd-author-name {
        font-size: 16px;
    }
    
    .crd-author-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .crd-stars {
        gap: 2px;
        margin-bottom: 10px;
    }
    
    .crd-star {
        font-size: 18px;
    }
    
    /* Better touch targets for mobile */
    .crd-review-card {
        min-height: auto;
        touch-action: manipulation;
    }
    
    /* Adjust slider for mobile */
    .crd-style-slider {
        scroll-padding: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .crd-style-slider .crd-review-card {
        flex: 0 0 280px;
    }
}

@media (max-width: 480px) {
    .crd-reviews-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .crd-review-card {
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .crd-review-content {
        margin-bottom: 15px;
    }
    
    .crd-author-location {
        font-size: 13px;
    }
    
    .crd-location-icon {
        font-size: 11px;
    }
    
    /* Stack author info on very small screens */
    .crd-review-author {
        padding-top: 15px;
    }
    
    /* Full width slider cards on mobile with padding */
    .crd-style-slider {
        margin-left: -15px;
        margin-right: -15px;
        padding: 0 15px;
    }
    
    .crd-style-slider .crd-review-card {
        flex: 0 0 calc(100vw - 50px);
        max-width: 320px;
    }
    
    /* Sidebar specific on small screens */
    .crd-style-sidebar {
        padding: 20px 15px;
    }
    
    .crd-style-sidebar .crd-reviews-wrapper {
        height: 240px;
    }
    
    .crd-style-sidebar .crd-review-nav {
        margin-top: 15px;
    }
}

/* Improve touch interactions */
@media (hover: none) and (pointer: coarse) {
    .crd-review-card:hover {
        transform: none;
    }
    
    .crd-review-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Animation Classes for AOS-like effects */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.crd-loading {
    text-align: center;
    padding: 40px;
}

.crd-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Service Area Sidebar Style - Complete */
.crd-style-sidebar {
    background: #1e3856;
    background: linear-gradient(135deg, #1e3856 0%, #172943 100%);
    border-radius: 8px;
    padding: 30px;
    max-width: 100%;
    margin: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Reviews Wrapper - CRITICAL FOR SLIDER */
.crd-style-sidebar .crd-reviews-wrapper {
    position: relative !important;
    overflow: hidden !important;
    height: 300px !important;
}

.crd-style-sidebar .crd-reviews-inner {
    position: relative !important;
    height: 100% !important;
}

/* Hide all cards by default - VERY IMPORTANT */
.crd-style-sidebar .crd-review-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show only active card */
.crd-style-sidebar .crd-review-card.active,
.crd-style-sidebar .crd-review-card:first-child {
    opacity: 1 !important;
    visibility: visible !important;
}

.crd-style-sidebar .crd-review-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.crd-style-sidebar .crd-review-card::before {
    display: none;
}

.crd-style-sidebar .crd-stars .crd-star.filled {
    color: #fbbf24;
}

.crd-style-sidebar .crd-stars .crd-star {
    color: rgba(255, 255, 255, 0.3);
}

.crd-style-sidebar .crd-review-text {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
    padding-left: 0;
    font-style: normal;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crd-style-sidebar .crd-review-text::before {
    display: none;
}

.crd-style-sidebar .crd-author-name {
    color: white;
    font-size: 16px;
}

.crd-style-sidebar .crd-author-location {
    color: #94a3b8;
    font-size: 13px;
}

.crd-style-sidebar .crd-review-author {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.crd-style-sidebar .crd-author-avatar {
    background: var(--e-global-color-accent, #52a8e8);
    width: 36px;
    height: 36px;
    font-size: 16px;
}

/* Navigation Dots */
.crd-style-sidebar .crd-review-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.crd-style-sidebar .crd-review-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.crd-style-sidebar .crd-review-dot.active {
    background: var(--e-global-color-accent, #52a8e8);
    width: 24px;
    border-radius: 4px;
}

/* Custom Scrollbar for Slider */
.crd-style-slider::-webkit-scrollbar {
    height: 8px;
}

.crd-style-slider::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.crd-style-slider::-webkit-scrollbar-thumb {
    background: var(--crd-accent-color);
    border-radius: 4px;
}

.crd-style-slider::-webkit-scrollbar-thumb:hover {
    background: var(--crd-accent-hover);
    filter: brightness(0.9);
}