/* ===================================================================
   1. Estilos Globales para la Sección de Reseñas (Carrusel)
   =================================================================== */
.dah-reviews-section {
    min-width: 100%;
    max-width: 100%;
    /* margin: 40px auto;
    padding: 60px 20px 80px;*/
    /* Fondo que imita el beige suave */
    background-color: #fcf8f3;
    border-radius: 12px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.dah-reviews-header {
    margin-bottom: 40px;
}

.dah-icon-heart {
    font-size: 30px;
    color: #e57373;
    /* Rojo suave */
    display: block;
    margin-bottom: 10px;
}

.dah-reviews-title {
    font-family: 'Georgia', serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

/* ===================================================================
   2. Estilos del Carrusel (Track y Tarjetas)
   =================================================================== */
.dah-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
    /* Espacio para las flechas */
}

.dah-carousel-track {
    display: flex;
    /* Mostrar solo 3 tarjetas a la vez y usar transform para deslizar */
    transform: translateX(0);
    transition: transform 0.5s ease-in-out;
}

.dah-review-card {
    flex: 0 0 calc(33.333% - 40px);
    /* Mostrar 3, con margen */
    min-width: calc(33.333% - 40px);
    margin: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* Sombra más suave */
    text-align: center;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Alinear arriba */
}

/* --- ESTILOS DEL AVATAR Y LA INFORMACIÓN DEL REVISOR --- */
.dah-reviewer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centrado horizontal en la tarjeta */
    margin-bottom: 20px;
    width: 100%;
}

.dah-reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #d46a6a;
    /* Color del CTA o primario */
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.dah-reviewer-meta {
    text-align: left;
}

.dah-reviewer-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 1em;
}

.dah-review-date {
    font-size: 0.75em;
    color: #999;
    margin-top: 2px;
}

/* -------------------------------------------------------- */


.dah-star-rating {
    color: #ffc107;
    /* Dorado/Amarillo Ámbar */
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.dah-review-comment {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
    /* Permite que el comentario tome el espacio necesario */
}


/* Responsive para tabletas y móviles */
@media (max-width: 1024px) {
    .dah-review-card {
        flex: 0 0 calc(50% - 20px);
        /* 2 tarjetas en tabletas */
        min-width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .dah-review-card {
        flex: 0 0 90%;
        /* 1 tarjeta en móvil */
        min-width: 90%;
        margin: 20px 5%;
    }

    .dah-carousel-container {
        padding: 0;
    }
}

/* ===================================================================
   3. Navegación del Carrusel (Flechas y Puntos)
   =================================================================== */
.dah-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    /* Más opaco */
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 10;
    color: #333;
    /* transition: background 0.3s, border-color 0.3s; Removed to avoid non-composed animation warning */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dah-carousel-nav:hover {
    background: #fff;
    border-color: #d46a6a;
}

.dah-carousel-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dah-prev-btn {
    left: 10px;
}

.dah-next-btn {
    right: 10px;
}

.dah-carousel-nav svg {
    width: 20px;
    height: 20px;
    display: block;
    margin: 0 auto;
}

.dah-carousel-dots {
    display: flex;
    justify-content: center;
    /* margin-top: 30px;*/
}

.dah-carousel-dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dah-carousel-dot.active {
    background-color: #d46a6a;
    /* Color del CTA */
    transform: scale(1.2);
}

/* ===================================================================
   4. Botón de Llamada a la Acción (CTA)
   =================================================================== */
.dah-cta-button {
    display: inline-block;
    padding: 12px 30px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    /* Degradado del botón que imita el estilo de la imagen */
    background: linear-gradient(135deg, #f5a892 0%, #d46a6a 100%);
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(212, 106, 106, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dah-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(212, 106, 106, 0.5);
}

/* ===================================================================
   5. Estilos del Widget Flotante
   =================================================================== */
/* ===================================================================
   5. Estilos del Widget Flotante (Actualizado 2025)
   =================================================================== */
.dah-google-widget-container {
    position: fixed;
    bottom: 125px;
    /* Encima del asistente AI */
    right: 25px;
    z-index: 99998;
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    display: none;
    /* Controlado por JS */
    animation: slideInUpGoogle 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dah-floating-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered alignment */
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
    color: #333 !important;
    transition: transform 0.3s;
    position: relative;
    width: 150px;
    /* Fixed width */
    text-align: center;
    min-height: 150px;
}

.dah-floating-widget:hover {
    transform: translateY(-5px);
}

.dah-widget-close {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    background: #fff;
    color: #333;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 10;
}

.dah-widget-close:hover {
    opacity: 1;
    background: #f0f0f0;
}

.dah-widget-stars {
    color: #ffc107;
    /* Dorado */
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 3px;
}

.dah-widget-average {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-right: 0;
    /* Reset margin */
    min-height: 28px;
    /* Reserve space */
    display: block;
}

.dah-widget-text {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    margin-bottom: 5px;
    display: block;
    line-height: normal;
    min-height: 14px;
    /* Reserve space */
}

.dah-google-icon-img {
    width: 24px;
    height: 24px;
    /* Revert to original positioning if it was inline or block, but based on previous CSS it was likely separate. 
       However, the previous CSS had it as: width: 100%; bg: #fff; border-radius: 50%; padding: 2px;
       Let's restore that specific style if it was the desired one, or the one from the "previous selection" 
       The user said "me has cambiado el diseño", referring to the CSS I just overwrote.
       The CSS I overwrote had:
       .dah-google-icon-img { width: 100%; background-color: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; }
       I will restore THAT specific style.
    */
    width: 20px;
    /* actually the php code uses width="24" height="24" inline, but let's match the css class */
    height: auto;
    position: absolute;
    /* Keep it absolute as per the NEW structure requirement */
    top: 10px;
    right: 10px;
    opacity: 0.8;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* Wait, the user wants the PREVIOUS design. 
   Previous design in CSS file WAS:
   .dah-google-icon-img { width: 100%; background-color: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; } 
   BUT the structure in PHP uses a small icon top-right. 
   Let's check the HTML generation in functions.php...
   It uses: <img ... class="dah-google-icon-img" width="24" height="24" />
   And the text says: "Confianza de clientes en los últimos 30 días" (in my modification) vs "Excelente servicio y calidad" (in previous CSS context implication?).
   The user says "texto que se mostraba en la reseñas de google".
   In the function I just wrote, I put: "Excelente servicio y calidad".
   In the PREVIOUS function (step 68), it was "Confianza de clientes en los últimos 30 días".
   I will fix the CSS first to look like the card the user liked (centered, boxy).
*/

.dah-google-icon-img {
    width: 28px;
    /* Slightly larger as requested */
    height: auto;
    position: relative;
    /* Back to normal flow to be centered */
    display: block;
    margin: 8px auto 0;
    /* Centered with top margin */
    opacity: 1;
    /* Remove transparency for better visibility */
    top: auto;
    right: auto;
}

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

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

/* Responsividad para móviles */
@media (max-width: 768px) {
    .dah-google-widget-container {
        right: 20px;
        bottom: 115px;
    }
}

/* ===================================================================
   6. Botón "Ver más/Ver menos" - Estilo Compacto con Reset Total
   =================================================================== */
.dah-review-card-compact .dah-see-more-btn {
    /* Reset completo de estilos del theme */
    all: unset;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Estilos personalizados compactos */
    display: inline !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    box-sizing: border-box !important;
    /* Tipografía compacta */
    color: #d46a6a !important;
    font-size: 0.8em !important;
    font-weight: 500 !important;
    font-family: 'Lato', sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    line-height: 1.2 !important;
    text-align: left !important;
    /* Espaciado mínimo */
    padding: 0 !important;
    margin: 5px 0 0 0 !important;
    width: auto !important;
    height: auto !important;
    /* Decoración */
    text-decoration: none !important;
    border-bottom: 1px solid #d46a6a !important;
    box-shadow: none !important;
    /* Interacción */
    cursor: pointer !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
    position: static !important;
}

.dah-review-card-compact .dah-see-more-btn:hover {
    color: #c05555 !important;
    border-bottom-color: #c05555 !important;
    background: transparent !important;
    background-color: transparent !important;
    transform: none !important;
}

.dah-review-card-compact .dah-see-more-btn:focus {
    outline: 1px dotted #d46a6a !important;
    outline-offset: 2px !important;
    background: transparent !important;
}

.dah-review-card-compact .dah-see-more-btn:active {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ajuste para tarjetas expandidas */
.dah-review-card-compact.is-expanded {
    min-height: auto !important;
}

.dah-review-card-compact.is-expanded .dah-review-comment-compact {
    white-space: normal !important;
    overflow: visible !important;
    margin-bottom: 8px !important;
}