/**
 * ConlineWeb — Tipografía móvil sitio completo (≤968px)
 * Carga al final del footer (después de cw-type-global y cw-design-system).
 */

@media (max-width: 968px) {
    :root {
        --cw-ds-title: var(--cw-title-section);
        --cw-ds-title-sm: var(--cw-title-card);
    }

    /* ——— H1 / hero (blanco) ——— */
    body :is(
        .hero-title,
        h1.hero-title,
        .main-title,
        .hero-section .main-title,
        .hero-section .hero-title,
        .blog-hero .hero-title,
        .blog-article-title,
        .mx-directory-hero .hero-title,
        .mx-hub-hero-wrap .hero-title,
        .demos-hub-hero__title,
        .legal-hero h1,
        .terms-hero h1,
        .policy-hero h1,
        .container .header h1,
        .asesoria-hero-intro .hero-title,
        .proyec-step-head h1
    ) {
        font-size: var(--cw-title-hero) !important;
        line-height: 1.18 !important;
        letter-spacing: 0.2px !important;
    }

    body.mx-mexico .container.mx-directory-hero .hero-title,
    body.mx-mexico .container.mx-hub-hero-wrap .hero-title {
        font-size: var(--cw-title-hero) !important;
        line-height: 1.18 !important;
    }

    /* ——— H2 sección (gradiente / Poiret) ——— */
    body :is(
        .section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .mx-svc-faq > h2,
        .sw-section-title,
        .demos-hub-section-title,
        .portfolio-header h2,
        .mx-hub-heading,
        .mx-directory .section-title,
        .mx-svc-related-title,
        .mx-svc-geo-title,
        .content-section > h2,
        .sw-section > h2,
        .prose-blog h2,
        .doc-prose h2,
        .seo-content > h2,
        .checkout-section > h2,
        .transfer-panel > h2,
        .centro-politicas-hero h2,
        .site-directory-section-title,
        .mx-hub-block-head h2,
        .neon-title,
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title,
        .home-demos-section__title,
        .reviews-title
    ):not(.blog-related .section-title) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.22 !important;
        letter-spacing: 1px !important;
    }

    body.page-home .home-flow :is(
        .section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .home-demos-section__title,
        .reviews-title
    ),
    body.page-home :is(
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title
    ),
    body.page-home .cards-section--solutions .section-title,
    body.page-home .cards-section--bridge .section-title {
        font-size: var(--cw-title-section) !important;
        line-height: 1.22 !important;
        letter-spacing: 1px !important;
    }

    /* Design system (páginas secundarias con body.cw-ds) */
    body.cw-ds:not(.page-home) :is(
        .hero-title,
        h1.hero-title,
        .main-title,
        .legal-hero h1,
        .terms-hero h1,
        .policy-hero h1
    ) {
        font-size: var(--cw-title-hero) !important;
        line-height: 1.18 !important;
        letter-spacing: 0.2px !important;
    }

    body.cw-ds:not(.page-home) :is(
        .section-title,
        .faq-title,
        .sw-section-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .personal-consult-module h3,
        .cta-module h3,
        .demos-hub-section-title,
        .portfolio-header h2,
        .neon-title
    ) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.22 !important;
        letter-spacing: 1px !important;
    }

    /* Módulos CTA / consulta */
    body :is(
        .personal-consult-module h3,
        .cta-module h3,
        .contact-band__title,
        .hero-pillars-label
    ) {
        font-size: var(--cw-title-section) !important;
        line-height: 1.22 !important;
        letter-spacing: 1px !important;
    }

    /* ——— H3 en cards (todos los tipos del sitio) ——— */
    body :is(
        .legal-card h2,
        .terms-card .card-header h2,
        .policy-card .card-header h2,
        .card-content h3,
        .cards-grid-balanced .card h3,
        .sw-signals-title,
        .prose-blog h3,
        .doc-prose h3,
        .terms-card h3,
        .legal-card-body h3,
        .seo-content h3,
        .feature-text h3,
        .highlight h3,
        .sw-section h3,
        .sw-use-card h3,
        .sw-process-step h3,
        .corp-diff-card h3,
        .ia-highlight h4,
        .home-benefits__card-title,
        .home-why__item-title,
        .cw-home-deliver__title-row h3,
        .service-title,
        .guarantee-title,
        .mx-hub-service h3,
        .mx-hub-portal-body h3,
        .integration-card .card-inner h3,
        .benefit-card h3,
        .plan-header-top h3
    ) {
        font-size: var(--cw-title-card) !important;
        line-height: 1.32 !important;
    }

    /* ——— Strong como título en mx-svc-links ——— */
    .mx-svc-links-body strong {
        font-size: var(--cw-title-card) !important;
        line-height: 1.3 !important;
    }

    /* Layout icono+título en cards → cw-cards-mobile.css (carga después) */

    /* Gradiente unificado en H2 de sección (prioridad sobre CSS de página/home) */
    body :is(
        .section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .mx-svc-faq > h2,
        .sw-section-title,
        .demos-hub-section-title,
        .portfolio-header h2,
        .mx-hub-heading,
        .mx-directory .section-title,
        .mx-svc-related-title,
        .mx-svc-geo-title,
        .content-section > h2,
        .sw-section > h2,
        .prose-blog h2,
        .doc-prose h2,
        .seo-content > h2,
        .checkout-section > h2,
        .transfer-panel > h2,
        .centro-politicas-hero h2,
        .site-directory-section-title,
        .mx-hub-block-head h2,
        .neon-title,
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title,
        .home-demos-section__title,
        .reviews-title,
        .cards-section--bridge .section-title,
        .cards-section--solutions .section-title,
        .cards-section > .section-title
    ):not(.blog-related .section-title):not(.swal2-title) {
        font-family: 'Poiret One', sans-serif !important;
        font-weight: 400 !important;
        background: linear-gradient(
            135deg,
            var(--neon-blue, #00f3ff),
            var(--neon-purple, #b967ff),
            var(--matrix-green, #00ff9d)
        ) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
        text-shadow: none !important;
    }

    /* Títulos de sección — centrado uniforme (sitio completo) */
    body :is(
        .section-title,
        .sw-section-title,
        .faq-title,
        .ia-title,
        .integrations-title,
        .services-text h2,
        .faq-section > h2,
        .mx-svc-faq > h2,
        .demos-hub-section-title,
        .portfolio-header h2,
        .mx-hub-heading,
        .mx-svc-related-title,
        .mx-svc-geo-title,
        .content-section > h2,
        .sw-section > h2,
        .centro-politicas-hero h2,
        .site-directory-section-title,
        .mx-hub-block-head h2,
        .neon-title:not(.swal2-title),
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title,
        .home-demos-section__title,
        .reviews-title,
        .cards-section--bridge .section-title,
        .cards-section--solutions .section-title,
        .cards-section > .section-title,
        .personal-consult-module h3,
        .cta-module h3,
        .contact-band__title,
        .hero-pillars-label
    ) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Subtítulos y párrafos principales de sección — centrado uniforme */
    body :is(
        .section-subtitle,
        .sw-section-lead,
        .ia-subtitle,
        .integrations-subtitle,
        .home-benefits__lead,
        .home-why__lead,
        .cw-home-deliver__lead,
        .cw-home-deliver__tagline,
        .home-demos-section__lead,
        .reviews-lead,
        .faq-section > .section-subtitle,
        .faq-section > .section-label,
        .faq-subtitle,
        .hero-intro,
        .hero-intro p,
        .hero-subtitle,
        .demos-hub-hero__lead,
        .demos-hub-hero__subtitle,
        .cards-section > .section-subtitle,
        .cards-section .section-subtitle,
        .services-section > .section-subtitle,
        .mx-geo-services .section-subtitle,
        .mx-geo-solutions .section-subtitle,
        .mx-geo-related .section-subtitle,
        .mx-directory-subtitle,
        .services-text > p,
        .personal-consult-module > p,
        .cta-module > p
    ) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ——— Coherencia: secciones centradas siguen centradas en móvil ——— */

    /* Home */
    body.page-home :is(
        .home-benefits__head,
        .home-why__head,
        .cw-home-deliver__head,
        .home-demos-section__header,
        .home-flow .faq-section,
        .home-flow__services,
        .cards-section--bridge,
        .cards-section--solutions,
        .personal-consult-module,
        .reviews-hero,
        .cw-home-deliver__summary
    ) {
        text-align: center !important;
    }

    body.page-home :is(
        .home-benefits__title,
        .home-why__title,
        .cw-home-deliver__title,
        .home-demos-section__title,
        .home-flow .section-title,
        .home-flow .faq-title,
        .home-flow .ia-title,
        .home-flow .integrations-title,
        .reviews-title,
        .reviews-lead
    ) {
        text-align: center !important;
    }

    body.page-home :is(
        .home-benefits__lead,
        .home-why__lead,
        .cw-home-deliver__lead,
        .cw-home-deliver__tagline,
        .home-benefits__scope,
        .home-demos-section__lead,
        .section-subtitle,
        .home-flow .section-subtitle,
        .home-flow .faq-section > .section-subtitle
    ) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.page-home :is(
        .home-benefits__eyebrow,
        .home-why__eyebrow,
        .cw-home-deliver__eyebrow,
        .cards-section__eyebrow,
        .home-demos-section__badge,
        .reviews-eyebrow
    ) {
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    body.page-home .home-benefits__tags {
        justify-content: center !important;
    }

    /* Sitio completo: encabezados y módulos que van centrados por diseño */
    body :is(
        .sw-section-title,
        .sw-section-lead,
        .faq-section :is(.faq-title, > h2),
        .faq-section :is(.section-subtitle, > .section-subtitle, .section-label, .faq-subtitle),
        .cards-section > .section-title,
        .cards-section > .section-subtitle,
        .services-section > .section-title,
        .services-section > .section-subtitle,
        .integrations-section :is(.integrations-title, .integrations-subtitle),
        .integrations-header,
        .ia-module :is(.ia-title, .ia-subtitle),
        .portfolio-header,
        .portfolio-header h2,
        .demos-hub-section-title,
        .demos-hub-hero__subtitle,
        .contact-band,
        .contact-band__title,
        .contact-band p,
        .sw-section-lead,
        .mx-svc-related-title,
        .mx-hub-heading,
        .mx-directory .section-title,
        .section-label,
        .google-link,
        .footer-cta-copy,
        .footer-cta-title,
        .legal-hero,
        .terms-hero,
        .policy-hero,
        .blog-hero,
        .centro-politicas-hero,
        .asesoria-hero-intro,
        .mx-directory-hero,
        .mx-hub-hero-wrap,
        .demos-hub-hero
    ) {
        text-align: center !important;
    }

    body :is(
        .legal-hero :is(h1, p),
        .terms-hero :is(h1, p),
        .policy-hero :is(h1, p),
        .blog-hero :is(.hero-title, p),
        .centro-politicas-hero :is(h1, h2, p),
        .asesoria-hero-intro :is(.hero-title, p),
        .mx-directory-hero .hero-title,
        .mx-hub-hero-wrap .hero-title,
        .demos-hub-hero__title,
        .demos-hub-hero__lead
    ) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body :is(
        .personal-consult-module,
        .cta-module,
        .hero-intro,
        .contact-form__actions,
        .contact-form__note,
        .sw-section-intro,
        .services-highlights .highlight
    ) {
        text-align: center !important;
    }

    body :is(
        .personal-consult-module :is(h3, p),
        .cta-module :is(h3, p),
        .hero-intro :is(.hero-title, .hero-subtitle, p, h1),
        .services-highlights .highlight :is(h3, p)
    ) {
        text-align: center !important;
    }

    body :is(
        .integrations-badge,
        .home-demos-section__badge,
        .cards-section__eyebrow
    ) {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.mx-mexico.page-home :is(
        .mx-geo-services .section-title,
        .mx-geo-solutions .section-title,
        .mx-geo-related .section-title,
        .mx-geo-services .section-subtitle,
        .mx-geo-solutions .section-subtitle,
        .mx-geo-related .section-subtitle
    ) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: none !important;
    }

    /* Hero principal home — centrado en móvil (coherente con el resto del sitio) */
    body.page-home .home-hero-zone :is(
        .content-section,
        .hero-title,
        .hero-subtitle
    ) {
        text-align: center !important;
        align-items: center !important;
    }

    body .hero-section :is(.hero-title, .hero-subtitle, .main-title, .hero-intro) {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Contenido que debe quedar alineado a la izquierda en móvil */
    body :is(
        .hero-showcase-cta,
        .hero-showcase-cta__copy,
        .hero-showcase-cta__copy strong,
        .hero-showcase-cta__copy span,
        .home-demos-section__footer,
        .home-demos-section__link,
        .hero-section .features,
        .feature-text,
        .feature-text h3,
        .feature-text p,
        .sw-signals,
        .sw-signals-list li,
        .accordion-header,
        .accordion-content,
        .accordion-content p,
        .prose-blog,
        .doc-prose,
        .legal-card-body,
        .terms-card,
        .policy-card,
        .seo-content,
        .card-content p,
        .card-svc p,
        .home-benefits__card-text,
        .cw-home-deliver__body > p,
        .home-why__item-text,
        .review-card,
        .review-text,
        .mx-svc-geo-lead,
        .mx-svc-geo-context
    ) {
        text-align: left !important;
    }

    body .hero-section .features {
        text-align: left !important;
    }
}

/* Demos embebidas: no alterar tipografía interna */
:is(.gweb, .eshop, .web-demo-modal__frame, #webDemoSite, #shopDemoSite) :is(
    .hero-title,
    .sw-section-title,
    .section-title,
    .main-title
) {
    font-size: revert !important;
    line-height: revert !important;
    letter-spacing: revert !important;
}
