/* Google-Style Reviews Section */
.ehs-reviews {
    padding: 80px 0;
    background: var(--ehs-color-light);
    overflow: hidden;
}

.ehs-reviews__header {
    text-align: center;
    margin-bottom: 60px;
}

.ehs-reviews__title {
    font-size: var(--ehs-font-size-h2);
    color: var(--ehs-color-dark);
    margin: 0 0 16px;
    text-transform: uppercase;
    font-family: var(--ehs-font-family-heading);
    line-height: var(--ehs-line-height-tight);
}

.ehs-reviews__subtitle {
    font-size: var(--ehs-font-size-subtitle);
    color: var(--ehs-color-muted);
    margin: 0;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--ehs-line-height-normal);
}

.ehs-reviews__carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    cursor: grab;
}

.ehs-reviews__carousel:active {
    cursor: grabbing;
}

.ehs-reviews__navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    transform: translateY(-50%);
}

.ehs-reviews__nav-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ehs-reviews__nav-btn:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ehs-reviews__nav-btn--prev {
    left: 20px;
}

.ehs-reviews__nav-btn--next {
    right: 20px;
}

.ehs-reviews__wrapper {
    overflow: hidden;
}

.ehs-reviews__track {
    display: flex;
    gap: 24px;
    /* Removed animation for manual control */
    width: calc((320px + 24px) * 12 * 2); /* 12 reviews * 2 copies */
}

.ehs-review {
    flex-shrink: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e8e8e8;
}

.ehs-review:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.ehs-review__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

.ehs-review__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4 0%, #ea4335 50%, #fbbc04 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 18px;
    position: relative;
    /* Remove overflow: hidden to allow Google icon to show */
}

.ehs-review__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ehs-review__google-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 15;
    border: 1px solid #e0e0e0;
}

.ehs-review__google-icon svg {
    width: 14px;
    height: 14px;
}

.ehs-review__author-info {
    flex: 1;
}

.ehs-review__author-name {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ehs-review__verified-badge {
    width: 16px;
    height: 16px;
    color: #1976d2;
}

.ehs-review__date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.ehs-review__rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.ehs-review__star {
    width: 16px;
    height: 16px;
    color: #ffc107;
}

.ehs-review__content {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ehs-review__content.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}

.ehs-review__read-more {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
}

.ehs-review__read-more:hover {
    text-decoration: underline;
}

/* Carousel Animation */
@keyframes reviewsScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.ehs-reviews__carousel:hover .ehs-reviews__track {
    animation-play-state: paused;
}

/* Google Colors */
.ehs-google-blue { color: #4285f4; }
.ehs-google-red { color: #ea4335; }
.ehs-google-yellow { color: #fbbc04; }
.ehs-google-green { color: #34a853; }

/* Responsive Design */
@media (max-width: 768px) {
    .ehs-reviews {
        padding: 60px 0;
    }
    
    .ehs-reviews__title {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .ehs-reviews__subtitle {
        font-size: 1rem;
    }
    
    .ehs-reviews__header {
        margin-bottom: 40px;
    }
    
    .ehs-reviews__track {
        gap: 16px;
        width: calc((280px + 16px) * 12 * 2);
    }
    
    .ehs-review {
        width: 280px;
        padding: 20px;
    }
    
    .ehs-reviews__nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .ehs-reviews__nav-btn--prev {
        left: 10px;
    }
    
    .ehs-reviews__nav-btn--next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .ehs-reviews {
        padding: 40px 0;
    }
    
    .ehs-reviews__title {
        font-size: 1.75rem;
    }
    
    .ehs-reviews__track {
        width: calc((260px + 16px) * 12 * 2);
    }
    
    .ehs-review {
        width: 260px;
        padding: 18px;
    }
    
    .ehs-reviews__nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .ehs-reviews__nav-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ehs-reviews__track {
        animation: none;
    }
    
    .ehs-reviews__carousel {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    .ehs-reviews__track {
        width: max-content;
        padding-bottom: 10px;
    }
}

/* Touch improvements for better swipe experience */
.ehs-reviews__carousel {
    touch-action: pan-x;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: grab;
}

.ehs-reviews__carousel:active {
    cursor: grabbing;
}

.ehs-reviews__track {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}