/**
 * ConlineWeb — Compactación global en pantallas pequeñas y laptops (1366×768)
 * Reduce tipografía, badges, botones y espaciado de secciones en todo el sitio.
 * Cargado al final (footer) para aplicar sobre CSS de cada página.
 */

/* ── Laptop / viewport compacto (1366×768, 1280×720, etc.) ── */
@media (max-width: 1366px) {
    body {
        padding-top: 5.5rem !important;
    }

    .main-navbar {
        padding: 1rem 2rem !important;
    }

    :is(
        .hero-title,
        .main-title,
        .hero-section .main-title
    ) {
        font-size: clamp(2.2rem, 3.2vw, 3rem) !important;
        margin-bottom: 1rem !important;
        letter-spacing: 1.5px !important;
    }

    :is(
        .sw-section-title,
        .section-title,
        .faq-title,
        .ia-title,
        .services-text h2,
        .integrations-title,
        .faq-section > h2,
        .mx-hub-heading,
        .portfolio-header h2,
        .personal-consult-module h3
    ) {
        font-size: clamp(1.65rem, 2.2vw, 2.15rem) !important;
        margin-bottom: 0.85rem !important;
    }

    :is(
        .hero-subtitle,
        .sw-section-lead,
        .description-text,
        .section-subtitle
    ) {
        font-size: clamp(0.95rem, 1.4vw, 1.08rem) !important;
        line-height: 1.6 !important;
    }

    .section-label {
        font-size: 0.72rem !important;
        margin-bottom: 0.75rem !important;
    }

    .badge {
        font-size: 0.78rem !important;
        padding: 0.65rem 1.2rem !important;
        margin-bottom: 1.5rem !important;
    }

    :is(.cta-button, .footer-btn, .contact-directions-btn) {
        padding: 0.85rem 1.55rem !important;
        font-size: 0.9rem !important;
    }

    :is(
        .hero-section,
        .contact-band,
        .full-width-section
    ) {
        padding-top: clamp(1.75rem, 3vw, 2.25rem) !important;
        padding-bottom: clamp(1.75rem, 3vw, 2.25rem) !important;
    }

    :is(
        .content-section,
        .cards-section,
        .services-section,
        .faq-section,
        .reviews-section,
        .integrations-section
    ) {
        padding: clamp(2rem, 3.5vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem) !important;
    }

    .sw-section {
        margin-bottom: 2.25rem !important;
    }

    .sw-section-lead {
        margin-bottom: 2rem !important;
    }

    .hero-intro {
        margin-bottom: 1.5rem !important;
    }

    .cta-module {
        padding: 2rem 1.75rem !important;
    }

    .cta-module h3 {
        font-size: 1.65rem !important;
    }

    .accordion-header {
        padding: 1.1rem 1.35rem !important;
        font-size: 0.92rem !important;
    }

    body:not(.demos-hub-page) .visual-section,
    body:not(.demos-hub-page) .web-sim-section {
        min-height: 520px !important;
    }

    .corp-about-visual {
        margin-bottom: 1.75rem !important;
        padding: 1rem 0 !important;
    }

    .footer-cta-line {
        font-size: clamp(1.05rem, 1.8vw, 1.35rem) !important;
    }

    .footer-cta-line--muted {
        font-size: clamp(0.9rem, 1.4vw, 1.05rem) !important;
    }
}

/* Viewport bajo (altura ≤820px): menos scroll, más contenido visible */
@media (max-width: 1400px) and (max-height: 820px) {
    :is(
        .hero-title,
        .main-title,
        .hero-section .main-title
    ) {
        font-size: clamp(2rem, 2.8vw, 2.65rem) !important;
        margin-bottom: 0.75rem !important;
    }

    :is(
        .sw-section-title,
        .section-title,
        .faq-title,
        .ia-title,
        .services-text h2,
        .faq-section > h2
    ) {
        font-size: clamp(1.5rem, 2vw, 1.9rem) !important;
    }

    :is(.hero-subtitle, .sw-section-lead) {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
    }

    .hero-section,
    .contact-band,
    .full-width-section {
        padding-top: 1.35rem !important;
        padding-bottom: 1.35rem !important;
    }

    .hero-intro {
        margin-bottom: 1rem !important;
    }

    body:not(.demos-hub-page) .visual-section {
        min-height: 440px !important;
    }

    body:not(.demos-hub-page) .web-sim-section {
        min-height: 0 !important;
        margin-bottom: 1.25rem !important;
    }

    .badge {
        padding: 0.55rem 1rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 1024px) {
    :is(.hero-title, .main-title, .hero-section .main-title) {
        font-size: clamp(2rem, 3.8vw, 2.65rem) !important;
    }

    :is(.sw-section-title, .section-title, .faq-title, .faq-section > h2) {
        font-size: clamp(1.5rem, 2.8vw, 1.95rem) !important;
    }

    body:not(.demos-hub-page) .visual-section {
        min-height: 460px !important;
    }
}

@media (max-width: 768px) {
    :is(
        .hero-title,
        .main-title,
        .hero-section .main-title
    ) {
        font-size: clamp(1.65rem, 6.2vw, 2.25rem) !important;
        letter-spacing: 1px !important;
        margin-bottom: 0.85rem !important;
    }

    :is(
        .sw-section-title,
        .section-title,
        .faq-title,
        .ia-title,
        .services-text h2,
        .integrations-title,
        .faq-section > h2,
        .mx-hub-heading,
        .portfolio-header h2,
        .personal-consult-module h3
    ) {
        font-size: clamp(1.4rem, 4.8vw, 1.85rem) !important;
        margin-bottom: 0.75rem !important;
    }

    :is(
        .hero-subtitle,
        .sw-section-lead,
        .description-text,
        .section-subtitle
    ) {
        font-size: clamp(0.86rem, 2.5vw, 0.98rem) !important;
        line-height: 1.55 !important;
    }

    .section-label {
        font-size: 0.66rem !important;
        margin-bottom: 0.6rem !important;
        letter-spacing: 0.1em !important;
    }

    .badge {
        font-size: 0.7rem !important;
        padding: 0.5rem 0.95rem !important;
    }

    :is(.cta-button, .footer-btn, .contact-directions-btn) {
        padding: 0.72rem 1.25rem !important;
        font-size: 0.86rem !important;
    }

    :is(
        .hero-section,
        .contact-band,
        .full-width-section
    ) {
        padding-top: clamp(1.25rem, 3.5vw, 2rem) !important;
        padding-bottom: clamp(1.25rem, 3.5vw, 2rem) !important;
    }

    :is(
        .content-section,
        .cards-section,
        .services-section,
        .faq-section,
        .reviews-section,
        .integrations-section
    ) {
        padding: clamp(1.25rem, 3.5vw, 2rem) clamp(0.85rem, 3vw, 1.25rem) !important;
    }

    .contact-band,
    .container--hero,
    .full-width-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .sw-section {
        margin-bottom: 1.75rem !important;
    }

    .sw-section-lead {
        margin-bottom: 1.75rem !important;
    }

    .cta-module {
        padding: 1.5rem 1.15rem !important;
        border-radius: 18px !important;
    }

    .cta-module h3 {
        font-size: 1.4rem !important;
    }

    .cta-module p {
        font-size: 0.88rem !important;
        margin-bottom: 1.15rem !important;
    }

    .accordion-header {
        padding: 0.95rem 1.1rem !important;
        font-size: 0.86rem !important;
    }

    .accordion-content p {
        font-size: 0.84rem !important;
    }

    .contact-form-panel {
        padding: 1.25rem 1rem !important;
        border-radius: 16px !important;
    }

    .contact-form__field input,
    .contact-form__field select,
    .contact-form__field textarea {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.88rem !important;
    }

    .contact-quick {
        gap: 0.65rem !important;
    }

    .contact-quick__card {
        padding: 1rem 0.75rem !important;
    }

    .contact-quick__icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .contact-quick__card strong {
        font-size: 0.82rem !important;
    }

    .contact-quick__hint {
        font-size: 0.7rem !important;
    }

    .contact-info-card {
        padding: 1.15rem !important;
    }

    .feature-text h3,
    .card h3 {
        font-size: 0.95rem !important;
    }

    .feature-text p,
    .card p {
        font-size: 0.84rem !important;
    }
}

@media (max-width: 480px) {
    :is(.hero-title, .main-title, .hero-section .main-title) {
        font-size: clamp(1.45rem, 5.8vw, 1.75rem) !important;
    }

    :is(
        .sw-section-title,
        .section-title,
        .faq-title,
        .ia-title,
        .services-text h2,
        .integrations-title,
        .faq-section > h2,
        .mx-hub-heading,
        .portfolio-header h2
    ) {
        font-size: clamp(1.25rem, 4.5vw, 1.55rem) !important;
    }

    :is(.hero-subtitle, .sw-section-lead, .description-text) {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
    }

    .badge {
        font-size: 0.62rem !important;
        padding: 0.42rem 0.8rem !important;
        letter-spacing: 0.06em !important;
    }

    :is(.cta-button, .footer-btn) {
        padding: 0.65rem 1.05rem !important;
        font-size: 0.8rem !important;
    }

    .section-label {
        font-size: 0.6rem !important;
    }

    .cta-module h3 {
        font-size: 1.25rem !important;
    }

    .contact-quick {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 360px) {
    :is(.hero-title, .main-title) {
        font-size: 1.38rem !important;
    }

    :is(.sw-section-title, .section-title, .faq-title) {
        font-size: 1.18rem !important;
    }

    .contact-quick {
        grid-template-columns: 1fr !important;
    }
}

/* Demos embebidas: no aplicar overrides de landings dentro de simuladores */
:is(.gweb, .eshop, .web-demo-modal__frame, #webDemoSite, #shopDemoSite) :is(
    .hero-title,
    .sw-section-title,
    .section-title,
    .badge,
    .cta-button
) {
    font-size: revert !important;
    padding: revert !important;
    margin: revert !important;
    letter-spacing: revert !important;
}

@media (max-width: 768px) {
    .footer-cta-panel {
        padding: 1.35rem 1rem !important;
    }

    .footer-cta-line {
        font-size: clamp(0.95rem, 3.8vw, 1.2rem) !important;
    }

    .footer-cta-line--muted {
        font-size: clamp(0.82rem, 3.2vw, 1rem) !important;
    }

    .footer-main {
        padding: 2rem 0 1.75rem !important;
    }

    .footer-col h3:not(.footer-heading) {
        font-size: 0.72rem !important;
    }

    .footer-col a,
    .footer-col p {
        font-size: 0.8rem !important;
    }
}

/* ── Home en laptop 1366×768: escala ligeramente mayor ── */
@media (max-width: 1366px) and (min-width: 1025px) {
    html:has(body.page-home) {
        font-size: 97.5%;
    }

    body.page-home {
        padding-top: 5.35rem !important;
    }

    body.page-home .hero-title {
        font-size: clamp(2.5rem, 3.45vw, 3.35rem) !important;
        margin-bottom: 1.05rem !important;
    }

    body.page-home .hero-subtitle {
        font-size: clamp(1.05rem, 1.5vw, 1.2rem) !important;
        line-height: 1.62 !important;
    }

    body.page-home .section-title {
        font-size: clamp(1.85rem, 2.45vw, 2.35rem) !important;
        margin-bottom: 1rem !important;
    }

    body.page-home .section-subtitle {
        font-size: clamp(0.98rem, 1.35vw, 1.1rem) !important;
    }

    body.page-home .badge {
        font-size: 0.84rem !important;
        padding: 0.7rem 1.3rem !important;
    }

    body.page-home .badge-mexico {
        font-size: 0.82rem !important;
    }

    body.page-home .hero-pillars-band .feature-head h3,
    body.page-home .hero-pillars-band .feature-text h3 {
        font-size: 0.96rem !important;
    }

    body.page-home .hero-pillars-band .feature-desc,
    body.page-home .hero-pillars-band .feature-text p {
        font-size: 0.82rem !important;
    }

    body.page-home .hero-pillars-label {
        font-size: 0.72rem !important;
    }

    body.page-home .card h3 {
        font-size: 1.06rem !important;
    }

    body.page-home .card p {
        font-size: 0.88rem !important;
    }

    body.page-home .quantum-orb {
        width: clamp(228px, 44vmin, 540px) !important;
        height: clamp(228px, 44vmin, 540px) !important;
    }

    body.page-home .hero-trust__copy strong {
        font-size: 1.05rem;
    }

    body.page-home .hero-trust__copy span {
        font-size: 0.72rem;
    }

    body.page-home .hero-btn {
        padding: 0.9rem 1.45rem;
        font-size: 0.95rem;
    }

    body.page-home .hero-showcase-cta__copy strong {
        font-size: 1.02rem;
    }

    body.page-home .hero-showcase-cta__copy span {
        font-size: 0.82rem;
    }
}

@media (max-width: 1400px) and (max-height: 820px) {
    body.page-home .hero-title {
        font-size: clamp(2.35rem, 3.15vw, 3.05rem) !important;
        margin-bottom: 0.9rem !important;
    }

    body.page-home .hero-subtitle {
        font-size: clamp(1rem, 1.45vw, 1.12rem) !important;
    }

    body.page-home :is(.sw-section-title, .section-title, .faq-title) {
        font-size: clamp(1.75rem, 2.35vw, 2.15rem) !important;
    }

    body.page-home .quantum-orb {
        width: clamp(215px, 42vmin, 500px) !important;
        height: clamp(215px, 42vmin, 500px) !important;
    }
}

/* ── Móvil: sin carruseles rotos — grid o lista apilada ── */
@media (max-width: 768px) {
    .cards-scroll-hint {
        display: none !important;
    }

    .cards-section--bridge::after {
        display: none !important;
    }

    .cards-container:not(.cards-container--rail):not(.cards-grid-balanced) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row !important;
        overflow: visible !important;
        scroll-snap-type: none !important;
    }

    .reviews-viewport {
        overflow: visible !important;
    }

    .reviews-track {
        flex-direction: column !important;
        transform: none !important;
    }

    .review-card {
        width: 100% !important;
    }

    .carousel-controls,
    .review-counter {
        display: none !important;
    }

    .eshop-carousel__track {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        transform: none !important;
    }

    .eshop-carousel-wrap__nav {
        display: none !important;
    }
}
