/* styles - glsr review carousel */
.glsr-carousel-wrapper {
    position: relative;
    margin: 20px auto;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    overflow: hidden;
}

.glsr-reviews.glsr-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.glsr-carousel-track {
    position: relative;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.glsr-carousel-slides {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

/* Grid para cuando no se necesita carousel */
.glsr-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 -10px;
}

/* Botones de navegación */
.glsr-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.glsr-carousel-nav:hover {
    opacity: 0.8;
}

.glsr-carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.glsr-carousel-prev {
    left: -20px;
}

.glsr-carousel-next {
    right: -20px;
}

/* Contenedor principal de reviews */
.glsr-reviews {
    position: relative !important;
    overflow: hidden !important;
    min-height: 200px; /* Ajusta esto según tus necesidades */
}

/* Reviews */
.glsr-carousel-review {
    flex: 0 0 25%;
    padding: 0 10px;
    box-sizing: border-box;
    transition: transform 0.5s ease;
}

/* Responsive breakpoints */
@media (max-width: 960px) {
    .glsr-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .glsr-carousel-review {
        flex: 0 0 33.333%;
    }
}

@media (max-width: 720px) {
    .glsr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .glsr-carousel-review {
        flex: 0 0 50%;
    }
}

@media (max-width: 480px) {
    .glsr-carousel-wrapper {
        width: 320px !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .glsr-reviews.glsr-carousel {
        width: 320px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .glsr-carousel-track {
        width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .glsr-carousel-slides {
        width: calc(320px * var(--total-reviews)) !important;
        display: flex !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .glsr-review.glsr-carousel-review {
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        flex: 0 0 320px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Ocultar navegación en móvil */
    .glsr-carousel-nav {
        display: none !important;
    }

    /* Ajustes para el contenido interno */
    .glsr-review-content {
        padding: 0 !important;
    }

    .glsr-review-title,
    .glsr-review-content,
    .glsr-review-rating,
    .glsr-review-date,
    .glsr-review-author {
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }

    /* Asegurar que todo el contenido sea responsivo */
    .glsr-review img,
    .glsr-review video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Resetear grid en móvil */
    .glsr-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 0 !important;
    }

    /* Forzar contenedor a ancho completo */
    .glsr-review {
        width: 100% !important;
        margin: 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    /* Asegurar que todo el contenido interno se ajuste */
    .glsr-review * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 360px) {
    .glsr-carousel-wrapper,
    .glsr-reviews.glsr-carousel,
    .glsr-carousel-track {
        width: 280px !important;
        max-width: 280px !important;
    }
    
    .glsr-carousel-slides {
        width: calc(280px * var(--total-reviews)) !important;
    }
    
    .glsr-review.glsr-carousel-review {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
        flex: 0 0 280px !important;
    }
}

/* Aseguramos que los reviews tengan un espaciado consistente */
.glsr-review {
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

h4.glsr-tag-value {
    color: var(--blue);
    text-align: center;
}

span.glsr-tag-value {
    color: var(--blue);
}

.glsr-review-author {
    width: 100%;
    justify-content: center;
}

.glsr-review-rating {
    width: 100%;
}

.glsr-review-date {
    text-align: center;
    justify-content: center;
}