/* ========================================
   TRUSTPILOT CAROUSEL - EXACT REPLICA
   Based on Trustpilot's actual implementation
   ======================================== */

/* =============================================
   ESTRELLAS GRANDES DEL CARRUSEL
   Aplica tanto a HTML estático como a JS dinámico
   ============================================= */
.carousel-stars-big,
.carousel-star-img {
    height: 160px !important;
    width: auto !important;
    display: block !important;
    position: relative !important;
    z-index: 100 !important;
}

/* Ajuste en móvil */
@media (max-width: 768px) {

    .carousel-stars-big,
    .carousel-star-img {
        height: 120px !important;
    }
}




/* Container wrapper with relative positioning for arrows and gradient */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 756px;
}

/* Scrollable track - horizontal flex with hidden scrollbar */
.review-cards-track {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    padding: 4px 0;

    /* Hide scrollbar - all browsers */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.review-cards-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Individual review cards - fixed width = 308px */
.review-cards-track .review-card {
    flex: 0 0 308px;
    min-width: 308px;
    max-width: 308px;
    height: 360px;
    background: #fffffe;
    border: 1px solid #dcd6d1;
    border-radius: 16px;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Card header with avatar and user info */
.review-cards-track .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0px;
    flex-shrink: 0;
}

.review-cards-track .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
    position: relative;
    flex-shrink: 0;
}

.review-cards-track .verified-badge-wrap {
    position: absolute;
    top: -2px;
    right: -2px;
}

.review-cards-track .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-cards-track .user-name {
    font-family: 'TrustpilotReviews', 'Inter', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #1a1a1a;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.review-cards-track .review-date {
    font-size: 15px;
    color: #737373;
    line-height: 1.2;
}

/* Star rating row */
.review-cards-track .rating-row {
    margin-bottom: 8px;
    position: relative;
    height: 0;
    overflow: visible;
}

.review-cards-track .stars-box {
    display: inline-block;
}

/* =============================================
   ESTRELLAS DEL CARRUSEL - TAMAÑO AUMENTADO
   ============================================= */

/* DESKTOP - Estrellas grandes */
@media (min-width: 769px) {

    /* Contenedor de estrellas */
    .carousel-container .review-cards-track .review-card .rating-row .stars-box .star-icon-row,
    .review-cards-track .star-icon-row,
    .carousel-container .review-card .star-icon-row,
    .carousel-star-row {
        position: absolute !important;
        top: -10px !important;
        left: -8px !important;
        z-index: 50 !important;
    }
}

/* MOBILE - Estrellas grandes */
@media (max-width: 768px) {

    /* Contenedor de estrellas */
    .carousel-container .review-cards-track .review-card .rating-row .stars-box .star-icon-row,
    .review-cards-track .star-icon-row,
    .carousel-container .review-card .star-icon-row,
    .carousel-star-row {
        position: absolute !important;
        top: -8px !important;
        left: -5px !important;
        z-index: 50 !important;
    }
}

.review-cards-track .review-card {
    position: relative;
    /* Context for absolute positioning */
}

/* Ensure container doesn't take up space */
.review-cards-track .rating-row {
    height: 0px;
    margin-bottom: 0px;
}

/* Review text content */
.review-cards-track .card-content {
    margin-bottom: 0;
    margin-top: -10px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.review-cards-track .review-body {
    font-family: 'TrustpilotReviews', 'Inter', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #2b2b2b;
    font-weight: 500;
    letter-spacing: -0.2px;
    -webkit-text-stroke: 0.3px #2b2b2b;
    margin: 0;
    overflow: hidden;
}

.review-cards-track .see-more {
    color: #0366d6;
    text-decoration: none;
    font-weight: 500;
}

.review-cards-track .see-more:hover {
    text-decoration: underline;
}

/* Card footer with buttons */
.review-cards-track .card-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 0;
    border-top: none;
    flex-shrink: 0;
    margin-top: auto;
}

.review-cards-track .footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #737373;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.review-cards-track .footer-btn:hover {
    color: #1a1a1a;
}

.review-cards-track .flag-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    padding: 0;
}

/* ========================================
   GRADIENT OVERLAY - RIGHT SIDE FADE
   Starts at 90% of container width
   ======================================== */
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0) 85%,
            rgba(255, 255, 254, 1) 100%);
    pointer-events: none;
    z-index: 5;
}

/* ========================================
   NAVIGATION ARROWS
   ======================================== */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(121, 157, 250, 0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    transition: background-color 0.2s ease;
}

.carousel-nav-btn:hover {
    background-color: rgba(121, 157, 250, 0.4);
}

.carousel-nav-btn svg {
    width: 16px;
    height: 16px;
    stroke: #4a6cf7;
    fill: none;
    stroke-width: 2;
}

/* Left arrow - hidden by default, shown when scrolled */
.carousel-nav-btn.prev-btn {
    left: -16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.carousel-nav-btn.prev-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Right arrow - visible by default */
.carousel-nav-btn.next-btn {
    right: -16px;
    opacity: 1;
    pointer-events: auto;
}

.carousel-nav-btn.next-btn.hidden {
    opacity: 0;
    pointer-events: none;
}