/* Contenedor principal */
.testimonios-wrapper {
    width: 100%;
}

.testimonios-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Elemento de testimonio */
.testimonio-item {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonio-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Header del testimonio */
.testimonio-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

/* Avatar */
.testimonio-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.testimonio-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-iniciales {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
}

/* Info del testimonio - CONTENEDOR PRINCIPAL */
.testimonio-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Header top - TODO EN UNA LINEA HORIZONTAL */
.testimonio-h-top {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

.testimonio-nombre {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    white-space: nowrap;
}

.testimonio-tiempo {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    margin-left: auto;
}

/* Rating (Estrellas) */
.testimonio-rating {
    display: flex;
    gap: 2px;
    align-items: center;
}

.star {
    color: #ffc107;
    font-size: 16px;
    line-height: 1;
}

.star {
    color: #ffc107;
    display: inline-block;
    font-size: 16px;
}

/* Texto del testimonio */
.testimonio-texto {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: justify;
}

/* Cargo/posición */
.testimonio-cargo {
    margin: 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Botón Cargar Más */
.testimonios-boton-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.cargar-mas-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cargar-mas-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cargar-mas-btn:active {
    transform: translateY(0);
}

.cargar-mas-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Spinner de carga */
.cargando {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error message */
.testimonios-error {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .testimonio-item {
        padding: 15px;
    }

    .testimonio-avatar {
        min-width: 45px;
    }

    .testimonio-avatar img,
    .avatar-iniciales {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }

    .testimonio-nombre {
        font-size: 15px;
    }

    .testimonio-texto {
        font-size: 13px;
    }

    .cargar-mas-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .testimonio-header {
        gap: 10px;
    }

    .testimonio-item {
        padding: 12px;
    }

    .testimonio-avatar img,
    .avatar-iniciales {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .testimonio-nombre {
        font-size: 14px;
    }

    .testimonio-texto {
        font-size: 12px;
    }

    .testimonio-rating {
        font-size: 14px;
    }
}