/* =========================================
   ELEMENTOR CUSTOM FAQ - STYLE.CSS (V 1.1.0)
   ========================================= */

/* Contenedor principal */
.ecf-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Fila individual */
.ecf-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 0;

    /* --- CAMBIO CLAVE PARA LA FRANJA VERDE --- */
    /* Usamos 'gap' para el espacio real entre columnas. 
       El valor se sobrescribe desde el panel de Elementor. */
    gap: 30px; 
    
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, gap 0.3s ease;
}

.ecf-row:hover {
    background-color: rgba(0,0,0,0.02); /* Sutil efecto hover */
}

/* Columna Izquierda: Pregunta */
.ecf-col-left {
    /* Ancho base (controlable desde Elementor) */
    width: 35%;
    
    /* Importante: flex-shrink 0 evita que la pregunta se 'aplaste' 
       cuando el espacio se reduce */
    flex-shrink: 0; 
    
    /* --- CAMBIO: Eliminamos el padding-right antiguo --- */
    /* padding-right: 20px; (Ya no es necesario, usamos gap) */
}

.ecf-question {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50; 
    line-height: 1.3;
}

/* Columna Derecha: Respuesta e Icono */
.ecf-col-right {
    /* --- CAMBIO: Ocupar todo el espacio restante --- */
    flex: 1;      /* Crecimiento automático */
    width: auto;  /* Reseteamos el ancho fijo del 65% */
    
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    
    /* Gap interno entre el texto de la respuesta y el icono + */
    gap: 15px; 
}

/* Contenedor de la respuesta (Máscara) */
.ecf-answer-wrapper {
    /* Dejamos que ocupe el espacio disponible menos el icono */
    flex: 1; 
    padding-right: 0; /* Limpiamos paddings viejos */
}

/* Texto de la respuesta con CLAMP */
.ecf-answer-content {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    
    /* Magia para las 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Estado ACTIVO (Expandido) */
.ecf-row.ecf-active .ecf-answer-content {
    -webkit-line-clamp: unset; /* Elimina límite */
    display: block; /* Fallback */
}

/* Párrafos dentro de la respuesta */
.ecf-answer-content p {
    margin-bottom: 10px;
}
.ecf-answer-content p:last-child {
    margin-bottom: 0;
}

/* Icono */
.ecf-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #999;
    
    /* Evita que el icono se aplaste si hay mucho texto */
    flex-shrink: 0; 
    
    transition: transform 0.3s ease;
}

/* Rotación del icono al abrir */
.ecf-row.ecf-active .ecf-icon {
    transform: rotate(45deg);
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .ecf-row {
        flex-direction: column;
        /* En móvil, el 'gap' actuará como espacio vertical */
        gap: 15px; 
    }
    
    .ecf-col-left, .ecf-col-right {
        width: 100% !important; /* Forzamos ancho completo */
    }
    
    .ecf-col-left {
        /* Eliminamos margen inferior manual, ya que 'gap' lo hace ahora */
        margin-bottom: 0; 
    }
    
    .ecf-answer-wrapper {
        width: 100%;
    }
}

/* ACCESIBILIDAD: Foco visible para navegación por teclado */
.ecf-row:focus {
    outline: 2px dashed #333;
    outline-offset: -2px;
    background-color: rgba(0,0,0,0.03);
}

/* Eliminar outline si se usa ratón */
.ecf-row:focus:not(:focus-visible) {
    outline: none;
}