/* Trustpilot Reviews Carousel Styles */
/* Auto-scrolling horizontal carousel with Trustpilot branding */

.trustpilot-section {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    overflow: hidden; /* Prevent horizontal page overflow */
}

/* Header Section */
.trustpilot-header {
    text-align: center;
    margin-bottom: 30px;
}

.trustpilot-header h2 {
    color: #1e40af;
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Trustpilot Rating Summary */
.trustpilot-rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Trustpilot Logo */
.tp-logo {
    background: #00b67a;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
}

.tp-logo-text::before {
    content: "★ ";
    margin-right: 4px;
}

/* Stars */
.tp-stars-container {
    display: flex;
    gap: 2px;
}

.tp-star {
    color: #dcdce6;
    font-size: 24px;
    line-height: 1;
}

.tp-star.filled {
    color: #00b67a;
}

/* Rating Text */
.tp-rating-text {
    color: #191919;
    font-size: 16px;
    margin: 0;
}

/* Carousel Container */
.trustpilot-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 30px 0;
}

/* Carousel Track */
.trustpilot-carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px 0;
    
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.trustpilot-carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Individual Review Card */
.tp-review-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 340px;
    max-width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: grab;
}

.tp-review-card:active {
    cursor: grabbing;
}

.tp-review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Review Header */
.tp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tp-stars {
    display: flex;
    gap: 1px;
}

.tp-review-header .tp-star {
    font-size: 18px;
}

/* Verified Badge */
.tp-verified {
    background: #f5f5f5;
    color: #00b67a;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Review Title */
.tp-review-title {
    color: #191919;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Review Text */
.tp-review-text {
    color: #4a4a4a;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex-grow: 1;
    min-height: 60px;
}

/* Review Footer */
.tp-review-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #6b6b6b;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.tp-reviewer-name {
    font-weight: 600;
    color: #191919;
}

.tp-reviewer-location {
    padding: 0 8px;
    position: relative;
}

.tp-reviewer-location::before,
.tp-reviewer-location::after {
    content: "•";
    position: absolute;
    color: #dcdce6;
}

.tp-reviewer-location::before {
    left: -2px;
}

.tp-reviewer-location::after {
    right: -2px;
}

.tp-review-date {
    color: #8b8b8b;
    margin-left: auto;
}

/* Carousel Controls */
.trustpilot-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.carousel-btn {
    background: white;
    border: 2px solid #00b67a;
    color: #00b67a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.carousel-btn:hover {
    background: #00b67a;
    color: white;
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Footer */
.trustpilot-footer {
    text-align: center;
    margin-top: 30px;
}

.tp-view-all-btn {
    display: inline-flex;
    align-items: center;
    background: #00b67a;
    color: white;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 182, 122, 0.25);
}

.tp-view-all-btn:hover {
    background: #00a269;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 182, 122, 0.35);
}

/* Gradient fade effects for carousel edges */
.trustpilot-carousel-container::before,
.trustpilot-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.trustpilot-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.trustpilot-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .trustpilot-section {
        padding: 0 10px;
        margin: 30px auto;
    }
    
    .trustpilot-header h2 {
        font-size: 1.75rem;
    }
    
    .trustpilot-rating-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .tp-review-card {
        min-width: 280px;
        max-width: 280px;
        padding: 16px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .trustpilot-carousel-container::before,
    .trustpilot-carousel-container::after {
        width: 30px;
    }
    
    .tp-view-all-btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 90%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .trustpilot-header h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .tp-logo {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .tp-star {
        font-size: 20px;
    }
    
    .tp-review-header .tp-star {
        font-size: 16px;
    }
    
    .tp-review-card {
        min-width: 260px;
        max-width: 260px;
        padding: 14px;
    }
    
    .tp-review-title {
        font-size: 15px;
    }
    
    .tp-review-text {
        font-size: 13px;
        min-height: 50px;
    }
    
    .tp-review-footer {
        font-size: 12px;
    }
    
    /* Hide gradient fade on very small screens */
    .trustpilot-carousel-container::before,
    .trustpilot-carousel-container::after {
        display: none;
    }
}

/* Loading animation */
@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.tp-review-card {
    animation: slideIn 0.5s ease-out;
}

/* Smooth auto-scroll animation */
@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .trustpilot-carousel-track {
        scroll-behavior: auto;
    }
    
    .tp-review-card {
        animation: none;
    }
    
    .carousel-btn,
    .tp-review-card,
    .tp-view-all-btn {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tp-review-card {
        border: 2px solid #000;
    }
    
    .carousel-btn {
        border-width: 3px;
    }
}