/*
    PROJETO ATLAS — QSMS ALLIANCE V2.0
    ARQUIVO: css/responsive.css
    FUNÇÃO: adaptação para notebooks, tablets e celulares.

    Os códigos [QSMS-XX] correspondem aos mesmos comentários do index.html,
    style.css e arquivos JavaScript.
*/

/* ============================================================================
   NOTEBOOKS E TABLETS GRANDES — ATÉ 1180px
   ============================================================================ */
@media (max-width: 1180px) {
    .nav-menu ul {
        gap: 22px;
    }

    .nav-menu a {
        font-size: 0.82rem;
    }

    .hero-text-box h1 {
        font-size: 4rem;
    }

    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .badge-col {
        grid-column: 2 / 4;
    }
}

/* ============================================================================
   TABLETS E NOTEBOOKS PEQUENOS — ATÉ 1024px
   ============================================================================ */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 5%;
    }

    .hero-text-box h1 {
        font-size: 3.5rem;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pillars-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .strategy-row {
        gap: 28px;
    }
}

/* ============================================================================
   CELULARES E TABLETS VERTICAIS — ATÉ 768px
   ============================================================================ */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    /* [QSMS-01] CABEÇALHO E MENU MOBILE */
    header,
    header.scrolled {
        padding: 12px 0;
    }

    .logo img,
    header.scrolled .logo img,
    #navbar.scrolled .logo img {
        height: 58px;
    }

    .mobile-menu-icon {
        display: flex;
    }

    .nav-menu {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: min(88vw, 370px);
        height: 100vh;
        height: 100dvh;
        padding: 110px 30px 40px;
        background: linear-gradient(160deg, #0D1B2A 0%, #132C48 100%);
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform 340ms cubic-bezier(0.165, 0.84, 0.44, 1), visibility 340ms;
        z-index: 1001;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-menu li,
    .nav-menu a {
        width: 100%;
    }

    .nav-menu a {
        padding: 14px 4px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-menu a:not(.btn-cta-nav)::after {
        bottom: 4px;
    }

    .nav-menu .btn-cta-nav {
        margin-top: 18px;
        padding: 15px 18px;
        text-align: center;
        border-bottom: 2px solid var(--accent-green);
    }

    /* [QSMS-02] HERO */
    .hero-section {
        min-height: 700px;
        height: 100svh;
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        padding: 90px 22px 40px;
    }

    .hero-text-box h1 {
        font-size: clamp(2.35rem, 10vw, 3.2rem);
        margin-bottom: 20px;
    }

    .hero-text-box p {
        max-width: 620px;
        margin: 0 auto 30px;
        font-size: 1.05rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 14px;
        margin-top: 30px;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        width: min(100%, 360px);
        min-width: 0;
    }

    .pattern-hexagons {
        width: 420px;
        height: 420px;
        right: -22%;
        bottom: -4%;
        opacity: 0.65;
    }

    .hero-credits {
        right: 14px;
        bottom: 12px;
        max-width: 56%;
        text-align: right;
        font-size: 0.56rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* [QSMS-03] NOSSA ORIGEM */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text-content h2,
    .contact-section h2 {
        font-size: 2rem;
    }

    .dna-flow {
        flex-direction: column;
        align-items: center;
    }

    .flow-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .about-image-box {
        border-left: 0;
        border-top: var(--border-accent);
        margin-top: 20px;
    }

    .experience-badge {
        right: 10px;
        bottom: -20px;
        padding: 18px;
    }

    /* [QSMS-04] SOLUÇÕES */
    .solutions-section,
    .pillars-section,
    .segments-section,
    .contact-section {
        padding: 70px 0;
    }

    .solutions-grid {
        gap: 24px;
    }

    .solution-card {
        padding: 38px 28px;
    }

    /* Em telas de toque o card não deve saltar 20px ao receber foco. */
    .solution-card:hover {
        transform: translate3d(0, -6px, 0);
    }

    /* [QSMS-05] ESTRATÉGIA E DIFERENCIAIS */
    .strategy-row {
        grid-template-columns: 1fr;
    }

    .pillars-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .values-flex {
        align-items: stretch;
        flex-direction: column;
    }

    /* [QSMS-06] SETORES ESTRATÉGICOS */
    .segment-grid {
        grid-template-columns: 1fr;
    }

    .segment-card {
        height: 360px;
    }

    .section-header h2 {
        font-size: 1.9rem;
    }

    .section-header.text-center,
    .section-header.center {
        margin-bottom: 42px !important;
    }

    /* [QSMS-07] CTA */
    .cta-final-section {
        padding: 85px 0;
    }

    .cta-title,
    .cta-final-section h3 {
        font-size: 2rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-actions .btn-large {
        width: min(100%, 390px);
        min-width: 0;
        margin-top: 0;
    }

    /* [QSMS-08] CONTATO */
    .contact-grid {
        margin-top: 42px;
    }

    .contact-info,
    .contact-form-box {
        padding: 30px 24px;
    }

    /* [QSMS-09] RODAPÉ */
    .footer-main {
        padding: 75px 0 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 42px;
        text-align: center;
    }

    .badge-col {
        grid-column: auto;
    }

    .footer-col h5::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-logo {
        height: 80px !important;
        margin: 0 auto 20px;
    }

    .social-icons-flex {
        justify-content: center;
    }

    .footer-bottom {
        margin-top: 55px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ============================================================================
   CELULARES PEQUENOS — ATÉ 480px
   ============================================================================ */
@media (max-width: 480px) {
    .container {
        padding-inline: 20px;
    }

    .hero-section {
        min-height: 660px;
    }

    .hero-text-box h1 {
        font-size: 2.25rem;
    }

    .hero-text-box p {
        font-size: 0.98rem;
    }

    .section-tag,
    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 1.4px;
    }

    .solution-card {
        padding: 32px 22px;
    }

    .segment-card {
        height: 335px;
    }

    .segment-content {
        padding: 26px 22px;
    }

    .cta-title,
    .cta-final-section h3 {
        font-size: 1.75rem;
    }

    .contact-phone {
        font-size: 1.05rem;
    }

    .contact-email {
        overflow-wrap: anywhere;
    }
}

/* ============================================================================
   QSMS ALLIANCE V2.2 — RESPONSIVIDADE DOS AJUSTES CONSOLIDADOS
   HTML/CSS/JS: mesmos endereçamentos [QSMS-01], [QSMS-04A] e [QSMS-09]
   ============================================================================ */

@media (max-width: 1024px) {
    /* [QSMS-01] Logo amplo sem comprometer a navegação em tablets. */
    #navbar .logo img {
        height: 70px;
    }

    #navbar.scrolled .logo img {
        height: 58px;
    }

    #navbar .nav-menu ul {
        gap: 22px;
    }

    /* [QSMS-04/06] Reposiciona as marcas-d'água vetoriais. */
    .brand-hex-bg::before {
        background-position: left -260px top 5%, right -290px bottom 3% !important;
        background-size: 600px auto, 640px auto !important;
    }

    .brand-hex-bg::after {
        background-position: right -90px top 52% !important;
        background-size: 390px auto !important;
    }
}

@media (max-width: 768px) {
    /* [QSMS-01] Navbar e logo no celular. */
    #navbar,
    #navbar.scrolled {
        padding: 8px 0;
        background: rgba(7, 16, 23, 0.94);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    #navbar .logo img,
    #navbar.scrolled .logo img {
        height: 64px;
    }

    /* [QSMS-04A] Portfólio ampliado em uma coluna. */
    .service-scope-section {
        margin-top: 64px;
        padding-top: 42px;
    }

    .scope-card summary {
        grid-template-columns: 44px minmax(0, 1fr) 22px;
        gap: 13px;
        min-height: 78px;
        padding: 16px 18px;
    }

    .scope-icon {
        width: 42px;
        height: 42px;
    }

    .scope-title {
        font-size: 0.98rem;
    }

    .scope-content {
        padding: 0 18px 24px;
    }

    .scope-list {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .technical-responsibility-note {
        margin-top: 20px;
    }

    /* [QSMS-04/06] Menos elementos ao fundo para priorizar leitura no celular. */
    .brand-hex-bg::before {
        inset: -2%;
        background-position: left -330px top 7%, right -350px bottom 2% !important;
        background-size: 560px auto, 590px auto !important;
    }

    .brand-hex-bg::after {
        display: none;
    }

    /* [QSMS-09] Logo maior, mas limitado à largura útil. */
    .footer-main .footer-logo {
        height: 108px !important;
        max-width: 300px !important;
        margin-inline: auto;
    }
}

@media (max-width: 430px) {
    #navbar .logo img,
    #navbar.scrolled .logo img {
        height: 58px;
    }

    .service-scope-heading h3 {
        font-size: 1.55rem;
    }

    .scope-card summary {
        grid-template-columns: 38px minmax(0, 1fr) 20px;
        gap: 11px;
        padding: 15px 14px;
    }

    .scope-icon {
        width: 38px;
        height: 38px;
    }

    .scope-icon svg {
        width: 23px;
        height: 23px;
    }

    .scope-title {
        font-size: 0.91rem;
    }
}
