/* ============================================================
   CARRUSEL DE RESEÑAS HORIZONTAL — CalidoHogar
   Agregar a estilos.css o como archivo separado
============================================================ */

/* ── Contenedor del carrusel ────────────────────────────── */

.reviews-section {
    padding: 80px 0;
    overflow: hidden; /* Importante para el carrusel */
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Carrusel horizontal ────────────────────────────────── */

.reviews-carrusel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
}

.reviews-carrusel {
    display: flex;
    gap: 24px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Tarjeta de reseña ──────────────────────────────────── */

.review-card {
    flex: 0 0 100%;
    max-width: 600px; /* Ancho máximo de cada card */
    margin: 0 auto;
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 68, 0, 0.15);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.review-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4400, #ff6b3d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.review-info {
    flex: 1;
    min-width: 0;
}

.review-author {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-stars {
    display: flex;
    gap: 4px;
    font-size: 1rem;
    color: #ffa500;
}

.review-date {
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
}

.review-text {
    color: #ccc;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 20px;
}

.review-google-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.85rem;
}

.review-google-logo img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* ── Controles del carrusel ─────────────────────────────── */

.carrusel-controles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 32px;
}

.carrusel-btn {
    background: rgba(255, 68, 0, 0.15);
    border: 1px solid rgba(255, 68, 0, 0.3);
    color: #ff4400;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.carrusel-btn:hover {
    background: #ff4400;
    color: #fff;
    transform: scale(1.1);
}

.carrusel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carrusel-indicadores {
    display: flex;
    gap: 10px;
}

.carrusel-indicador {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 68, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carrusel-indicador.active {
    background: #ff4400;
    width: 32px;
    border-radius: 5px;
}

.carrusel-indicador:hover {
    background: rgba(255, 68, 0, 0.6);
}

/* ── Progreso automático ────────────────────────────────── */

.carrusel-progreso {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #ff4400;
    width: 0;
    transition: width 0.1s linear;
}

.reviews-carrusel-wrapper.autoplay .carrusel-progreso {
    animation: progreso 5s linear infinite;
}

@keyframes progreso {
    0%   { width: 0; }
    100% { width: 100%; }
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
    .review-card {
        padding: 24px;
    }

    .review-header {
        gap: 12px;
    }

    .review-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .review-author {
        font-size: 1rem;
    }

    .review-text {
        font-size: 0.95rem;
    }

    .carrusel-btn {
        width: 40px;
        height: 40px;
    }
}

/* ── Animación de entrada ───────────────────────────────── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card {
    animation: fadeInUp 0.6s ease backwards;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }
