/* =============================================
   MOBILE GLOBAL FIX — Minimal & Targeted
   Último CSS carregado — tem prioridade natural
   ============================================= */

/* Prevenir scroll horizontal */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Touch devices — desativar cursor custom */
@media (hover: none) and (pointer: coarse) {

    .custom-cursor,
    .custom-cursor-follower {
        display: none !important;
    }

    body {
        cursor: auto !important;
    }
}

/* ==============================
   TABLET e MOBILE (até 991px)
   ============================== */
@media (max-width: 991px) {

    /* Esconder a navegação de jornada (pontinhos laterais) no mobile */
    .journey-navigation {
        display: none !important;
    }

    /* Hero: empilhar texto + code em coluna */
    .hero-content {
        flex-direction: column;
        gap: 30px;
    }

    .hero-text-content {
        flex: 1 1 100%;
        order: 1;
        text-align: center;
    }

    .hero-img-container {
        flex: 1 1 100%;
        order: 2;
        max-width: 100%;
        perspective: none;
    }

    .hero-img-container img {
        transform: none;
    }

    /* Limitar bg elements que vazam */
    .hero-bg-1 {
        width: 300px;
        height: 300px;
        left: -50px;
        top: -100px;
    }

    .hero-bg-2 {
        width: 200px;
        height: 200px;
        right: -30px;
    }

    .hero-bg-3 {
        width: 150px;
        height: 150px;
    }

    /* Stats em wrap */
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Botões em wrap */
    .hero-btns {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Hero badge */
    .hero-badge {
        right: 10px;
    }

    /* About: coluna única */
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-img {
        max-width: 100%;
    }

    /* Grids em coluna */
    .services-grid,
    .differentials-grid,
    .results-cards,
    .steps-container {
        grid-template-columns: 1fr;
    }

    /* Floating badges do terminal — podem vazar */
    .floating-badges {
        display: none;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    /* Fix para o CTA do menu mobile não sobrepor o Chatwoot */
    .mobile-cta {
        margin-bottom: 90px !important;
        display: block;
        /* Garantir que margin funcione */
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .mobile-nav {
        padding-bottom: 40px;
    }
}

/* ==============================
   MOBILE PEQUENO (até 576px)
   ============================== */
@media (max-width: 576px) {
    .hero {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero h1,
    .creative-text {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stat {
        min-width: 80px;
        padding: 8px;
    }

    .hero-stat-number {
        font-size: 1.3rem;
    }

    .hero-stat-text {
        font-size: 0.7rem;
    }

    /* Code animation menor */
    .code-animation-container,
    .code-window {
        max-width: 100%;
    }

    .code-content {
        font-size: 0.7rem;
        padding: 15px;
    }

    /* Terminal menor */
    .terminal-body {
        font-size: 0.7rem;
        padding: 12px;
        min-height: 200px;
    }

    /* About badge */
    .about-experience-badge {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 15px;
        text-align: center;
    }
}

/* ==============================
   TELAS MUITO PEQUENAS (até 375px)
   ============================== */
@media (max-width: 375px) {

    .hero h1,
    .creative-text {
        font-size: 1.25rem;
    }

    .hero-stats {
        gap: 5px;
    }

    .hero-stat {
        min-width: 70px;
    }

    .logo a {
        font-size: 0.8rem;
    }
}