/* Ajustes exclusivos de las tres landing pages de Softmat. */

/* En móvil, la pregunta del selector queda fuera del campo. */
@media (max-width: 768px) {
    .lead-form .floating-select {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        min-width: 0;
        margin-bottom: 1rem;
    }

    .lead-form .floating-select .floating-select__label {
        order: -1;
        position: static !important;
        display: block;
        left: auto;
        top: auto;
        max-width: 100%;
        padding: 0;
        margin: 0;
        transform: none !important;
        background: transparent !important;
        font-size: 0.875rem;
        font-weight: 600;
        line-height: 1.45;
        white-space: normal;
        overflow-wrap: anywhere;
        pointer-events: auto;
        transition: none;
    }

    .lead-form .floating-select .floating-select__field {
        display: block;
        width: 100%;
        min-width: 0;
        min-height: 56px;
        height: auto;
        padding: 0.9rem 2.75rem 0.9rem 1rem;
        font-size: 16px;
        line-height: 1.4;
        white-space: nowrap;
        text-overflow: ellipsis;
        -webkit-appearance: none;
        appearance: none;
    }

    .lead-form .floating-select .form-error:empty {
        display: none;
    }
}

/* Logos de clientes sin tarjeta de fondo. */
.companies-logos__item--client {
    flex: 0 0 180px;
    min-width: 180px;
    height: 88px;
    padding: 8px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.companies-logos__item--client .company-logo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.companies-logos__item--client .company-logo-img--client {
    display: block;
    max-width: 100%;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 1;
    filter: none !important;
    background: transparent !important;
}

/* WhatsApp: verde y blanco, independiente del tema. */
.softmat-whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    padding: 14px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.softmat-whatsapp-float:hover {
    background: #128c7e;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.softmat-whatsapp-float:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px #128c7e;
}

.softmat-whatsapp-float svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Ajustes de logos y WhatsApp en móvil. */
@media (max-width: 768px) {
    .companies-logos__item--client {
        flex-basis: 148px;
        min-width: 148px;
        height: 76px;
    }

    .companies-logos__item--client .company-logo-img--client {
        max-height: 56px;
    }

    .softmat-whatsapp-float {
        width: 56px;
        height: 56px;
        padding: 13px;
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/*
 * Restaurar los botones del hero en computador.
 * No afecta al botón del formulario ni al del encabezado.
 */
@media (min-width: 769px) {
    body[data-page="diagnostico"] .hero .hero__cta,
    body[data-page="nube"] .hero .hero__cta,
    body[data-page="infra"] .hero .hero__cta {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--spacing-md, 2rem) !important;
    }

    body[data-page="diagnostico"] .hero .hero__cta > .btn,
    body[data-page="nube"] .hero .hero__cta > .btn,
    body[data-page="infra"] .hero .hero__cta > .btn {
        display: inline-flex !important;
        flex: 0 1 auto !important;
        width: auto !important;
        inline-size: auto !important;
        min-width: 0;
        max-width: 100%;
        margin: 0 !important;
        align-self: auto !important;
        border-radius: var(--radius-md, 8px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .softmat-whatsapp-float {
        transition: none;
    }
}