/* ==========================================================================
   AHURABI — CAMADA RESPONSIVA (carregada depois de style.css)
   Uma única fonte de verdade para ecrãs: telemóvel, tablet, portátil e desktop.
   Breakpoints:
     ≤ 480px   telemóvel pequeno
     ≤ 767px   telemóvel
     ≤ 1024px  tablet (sem zoom; o desktop usa zoom 0.8 em style.css)
     ≤ 1279px  portátil — menu passa a hambúrguer
     ≤ 1700px  ecrã médio — cabeçalho mais compacto
   ========================================================================== */

/* ---------- Base: nada pode criar scroll horizontal ---------- */
html, body { max-width: 100%; overflow-x: clip; }
img, video, canvas, svg, iframe { max-width: 100%; }
#hero-gestao, .hero-web, .premium-hero { overflow-x: clip; }

/* ==========================================================================
   CABEÇALHO
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1700px) {
    .premium-header .logo-container {
        width: auto !important;
        min-width: 300px !important;
        max-width: 340px !important;
    }
    .premium-header .nav-links { gap: 1.1rem !important; }
    .premium-header .nav-link-effect { font-size: 15px !important; white-space: nowrap; }
    .premium-header .nav-links + .nav-cta, .premium-header nav ~ .nav-cta { margin-left: 1.25rem !important; white-space: nowrap; padding-left: 1.2rem !important; padding-right: 1.2rem !important; }
}

/* Portátil: menu hambúrguer (o menu completo não cabe abaixo de 1280px) */
@media (min-width: 1025px) and (max-width: 1279px) {
    .premium-header .nav-links,
    .premium-header .nav-cta { display: none !important; }

    .premium-header .mobile-menu-btn {
        display: block !important;
        position: absolute !important;
        right: 28px !important;
        top: 50% !important;
        transform: translateY(-50%);
        z-index: 999999 !important;
        cursor: pointer;
        font-size: 2.4rem;
        color: #fff !important;
        background: transparent !important;
        border: none !important;
    }
    .premium-header.mobile-active .nav-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1.6rem !important;
        position: fixed !important;
        top: 110px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(7, 11, 25, 0.98);
        backdrop-filter: blur(20px);
        padding: 2.5rem 5% 3rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 99998 !important;
    }
    .premium-header.mobile-active .mobile-only-cta { display: inline-block !important; }
}

/* Tablet e telemóvel: menu aberto com scroll se for mais alto que o ecrã */
@media (max-width: 1024px) {
    .premium-header .header-container { padding: 1rem 1.25rem !important; }
    .premium-header.mobile-active .nav-links {
        top: 80px !important;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: 2rem 5% 2.5rem !important;
    }
    .premium-header .mobile-menu-btn {
        top: 50% !important;
        transform: translateY(-50%);
    }
}

/* ==========================================================================
   HOME — HERO
   ========================================================================== */
/* Ecrãs médios (até ~1900px): título em cima, prova social por baixo */
@media (min-width: 1281px) and (max-width: 1899px) {
    .premium-hero .hero-container {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
    .premium-hero .hero-content-left { max-width: 1100px !important; }
    .premium-hero .hero-proof-column {
        margin-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        justify-content: center !important;
    }
    .premium-hero .hero-cards-col,
    .premium-hero .hero-comprovado-col,
    .premium-hero #typewriter-numeros { min-height: 640px !important; }
}

/* Tablet e abaixo */
@media (max-width: 1280px) {
    .premium-hero .hero-proof-column {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .premium-hero .hero-cards-col { width: 100% !important; flex-shrink: 1 !important; }
    .premium-hero .hero-comprovado-col { flex-wrap: wrap !important; }
}

@media (max-width: 1024px) {
    .hero-title-mass { font-size: clamp(2.3rem, 9vw, 5rem) !important; line-height: 1.05 !important; }
    .premium-hero { padding-top: 130px !important; }
    .hero-container { padding: 0 1.25rem !important; }
    .hero-desc-premium { font-size: 1.05rem !important; }
}

@media (max-width: 767px) {
    .premium-hero .proof-card { padding: 1.1rem 1.25rem !important; }
    .premium-hero .proof-label { font-size: 0.8rem !important; }
    .premium-hero .proof-value { font-size: clamp(2.4rem, 12vw, 3.5rem) !important; }
    .premium-hero .proof-desc { font-size: 15px !important; line-height: 1.55 !important; }
    .premium-hero .hero-comprovado-col { font-size: clamp(1.8rem, 9vw, 3rem) !important; letter-spacing: 0 !important; }
    .premium-hero #typewriter-numeros { font-size: clamp(1.8rem, 9vw, 3rem) !important; letter-spacing: -1px !important; gap: 0.5rem !important; }
}

/* ==========================================================================
   HOME — SOLUÇÕES (cartões tinham zoom 1.2 fixo)
   ========================================================================== */
@media (max-width: 1024px) {
    .service-card { zoom: 1 !important; max-width: 100% !important; }
}
@media (max-width: 767px) {
    .service-card { flex-basis: 100% !important; padding: 28px 22px !important; }
}

/* ==========================================================================
   HOME — CFO PREMIUM
   ========================================================================== */
@media (max-width: 767px) {
    .cfo-premium .cfo-title { font-size: clamp(1.9rem, 8.5vw, 3rem) !important; word-break: break-word; }
    .cfo-premium .cfo-desc { font-size: 1rem !important; padding: 24px 18px !important; }
    .cfo-premium-container, .cfo-premium .container { padding-left: 1rem !important; padding-right: 1rem !important; }
    .cfo-premium-container > * { min-width: 0; }
    .mockup-title { font-size: 0.8rem !important; white-space: normal !important; }
    .slide-kpi { min-width: 0 !important; }
}

/* ==========================================================================
   PÁGINAS DE SERVIÇO — HERO EM GRELHA (Web & Tráfego, Automação, Financeiro)
   ========================================================================== */
.hero-data > *, .hero-grid > * { min-width: 0; }

@media (min-width: 993px) and (max-width: 1365px) {
    #hero-gestao .hero-grid {
        grid-template-columns: 1fr 420px !important;
        gap: 48px !important;
    }
}

@media (max-width: 992px) {
    #hero-gestao .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        padding: 140px 1.25rem 60px !important;
    }
    #hero-gestao .hero-data-left { padding-left: 0 !important; border-left: none !important; }
    #hero-gestao .hero-data-left > div:first-child { display: none !important; }
    #hero-gestao .right-tower { width: 100% !important; max-width: 560px; margin: 0 auto; }
}

@media (max-width: 1024px) {
    .hero-data {
        grid-template-columns: 1fr !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    .hero-data-left { padding-left: 0 !important; border-left: none !important; }
}

@media (max-width: 767px) {
    .massive-title,
    .hero-data .massive-title,
    #hero-gestao .massive-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem) !important;
        letter-spacing: -1px !important;
        line-height: 1.1 !important;
    }
    .hero-data .hero-support-text { font-size: 1.05rem !important; }
    .title-agressive { font-size: clamp(2rem, 9vw, 3rem) !important; }
    .hero-desc { font-size: 1rem !important; }

    .glass-card, .data-card, .premium-card { padding: 1.4rem 1.25rem !important; }
    .card-value, .hero-data-right .card-value { font-size: clamp(2.6rem, 13vw, 3.6rem) !important; }
    .cards-grid-2x2 { grid-template-columns: 1fr !important; }
    .cards-grid-2x2 > * { min-width: 0; }
    .right-tower { width: 100% !important; }
}

/* ==========================================================================
   FINANCEIRO — PROTOCOLO / ORGANOGRAMA / ANALISADOR
   ========================================================================== */
@media (max-width: 767px) {
    .protocol-module-wrapper { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    .organogram-row-double, .organogram-row-triple { grid-template-columns: 1fr !important; }
    .org-top-connection .line-horizontal,
    .org-bottom-connection .line-horizontal { display: none; }
    .protocol-bg-number { font-size: 6rem !important; right: 0 !important; }
    .analyzer-copy, .pdf-simulation-sheet { min-width: 0 !important; max-width: 100% !important; }
}

/* ==========================================================================
   GENÉRICO TELEMÓVEL
   ========================================================================== */
@media (max-width: 767px) {
    h1, h2, h3 { overflow-wrap: break-word; }
    .modal-content { width: calc(100% - 24px) !important; max-height: calc(100vh - 24px); overflow-y: auto; }
    .form-row.split, .form-row.split-3 { grid-template-columns: 1fr !important; display: grid; }
    .cookie-banner-content { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
    .splash-logo { font-size: 2.6rem !important; }
    .splash-line-1 { font-size: 1.7rem !important; }
    .splash-line-2 { font-size: 1.15rem !important; }
    .splash-slogan { font-size: 0.7rem !important; letter-spacing: 0.15em !important; }
}

/* Filhos de grelhas podem encolher (evita que conteúdo largo empurre a grelha) */
.split-container > *, .cards-grid-2x2 > *, .hero-container > * { min-width: 0; }
@media (max-width: 767px) {
    .protocol-card { padding: 40px 22px !important; }
    .cards-grid-2x2 > div { padding: 26px 20px !important; }
    table { display: block; max-width: 100%; overflow-x: auto; }
}

/* Web & Tráfego: título do hero (antes inline com !important) */
.massive-title-wt { font-size: clamp(4rem, 6vw, 7rem); line-height: 1.1; letter-spacing: normal; text-transform: none; }
.audit-container > * { min-width: 0; }

/* ==========================================================================
   CONTACTO (45% + 55% + gap transbordava sempre)
   ========================================================================== */
.contact-grid { grid-template-columns: 9fr 11fr !important; }
.contact-grid > * { min-width: 0; }
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 767px) {
    .contact-section { padding-left: 1.1rem !important; padding-right: 1.1rem !important; }
    .contact-right { padding: 1.5rem 1.1rem !important; }
}

/* Web & Tráfego: selos flutuantes do comparativo ficam dentro do ecrã */
@media (max-width: 480px) {
    .floating-badge { font-size: 11px !important; padding: 6px 10px !important; max-width: 70%; white-space: normal !important; }
    .floating-badge[style*="right: -10px"] { right: 6px !important; }
    .floating-badge[style*="left: -10px"] { left: 6px !important; }
}

/* ==========================================================================
   TELEMÓVEL — títulos de secção e timeline de engenharia
   ========================================================================== */
@media (max-width: 767px) {
    section h2 { font-size: clamp(1.8rem, 8.5vw, 2.6rem) !important; line-height: 1.12 !important; }
    .cfo-premium .cfo-title { font-size: clamp(1.9rem, 8.5vw, 3rem) !important; }
    /* textos justificados abrem buracos em colunas estreitas */
    [style*="justify"] { text-align: left !important; }
    #manifesto p, #manifesto div { text-align: left !important; }

    .engineering-timeline > div[style*="display: flex"] { flex-direction: column !important; gap: 14px !important; }
    .engineering-timeline > div > div:first-child { width: 56px !important; height: 56px !important; }
    .engineering-timeline > div > div:last-child { padding: 22px 18px !important; flex-direction: column !important; gap: 20px !important; }
    .engineering-timeline > div:first-child[style*="dashed"] { display: none !important; }
}

@media (max-width: 767px) {
    .contact-h1 { font-size: clamp(2rem, 9vw, 3rem) !important; line-height: 1.1 !important; }
    .contact-right { padding: 0 !important; }
    .contact-form-card { padding: 26px 18px !important; }
}
@media (max-width: 1024px) {
    .premium-header.mobile-active .mobile-only-cta { display: inline-block !important; }
}
@media (max-width: 767px) {
    section.legal-page .legal-wrap h2 { font-size: 1.3rem !important; line-height: 1.25 !important; }
}

/* Automação & Data Analytics — título do hero cabe na coluna (desktop) */
@media (min-width: 1025px) {
    .hero-data-left { min-width: 0; }
    .title-agressive { font-size: clamp(3.2rem, 4.3vw, 5.4rem) !important; line-height: 1.05 !important; }
}

/* ==========================================================================
   MENU — submenu "Serviços"
   ========================================================================== */
.nav-dd { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.premium-header .nav-dd-toggle {
    background: none; border: 0; padding: 0; cursor: pointer;
    font-family: 'Futura Bk', 'Jost', sans-serif; color: #d1d5db;
    display: inline-flex; align-items: center; gap: 6px; line-height: inherit;
}
.nav-dd-toggle i { font-size: 0.75em; transition: transform .25s ease; }
.nav-dd:hover .nav-dd-toggle i, .nav-dd.open .nav-dd-toggle i { transform: rotate(180deg); }
.nav-dd-menu {
    position: absolute; top: calc(100% + 22px); left: 50%;
    transform: translate(-50%, 10px);
    min-width: 290px; padding: 10px 0;
    background: rgba(7, 11, 25, 0.98); backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 229, 255, 0.25); border-top: 2px solid #00E5FF;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s;
    z-index: 100000;
}
.nav-dd-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu, .nav-dd.open .nav-dd-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.nav-dd-item {
    display: block; padding: 13px 24px; white-space: nowrap; text-decoration: none;
    font-family: 'Futura Bk', 'Jost', sans-serif; font-size: 17px; color: #d1d5db;
    border-left: 2px solid transparent; transition: color .2s, background .2s, border-color .2s;
}
.nav-dd-item:hover, .nav-dd-item.active { color: #00FF88; background: rgba(0, 229, 255, 0.06); border-left-color: #00FF88; }

/* Menu completo a partir de 1200px: cabeçalho em 3 colunas (logótipo | menu centrado | botão) */
@media (min-width: 1280px) {
    .premium-header .header-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        column-gap: 2rem;
        align-items: center !important;
    }
    .premium-header .logo-container { width: auto !important; min-width: 0 !important; max-width: none !important; }
    .premium-header .nav-links { justify-self: center; gap: 2.4rem !important; }
    .premium-header .desktop-only-cta { justify-self: end; }
    .premium-header .nav-link-effect { font-size: 20px !important; }
    .premium-header .nav-dd-item { font-size: 19px; }
}
@media (min-width: 1280px) and (max-width: 1439px) {
    .premium-header .nav-links { gap: 1.7rem !important; }
    .premium-header .nav-link-effect { font-size: 18.5px !important; }
}

/* Menu hambúrguer aberto: submenu em lista, abre ao tocar em "Serviços" */
@media (max-width: 1279px) {
    .premium-header .nav-dd-menu {
        position: static; transform: none !important; opacity: 1; visibility: visible;
        display: none; min-width: 0; padding: 8px 0 0;
        background: transparent; border: 0; box-shadow: none; backdrop-filter: none; text-align: center;
    }
    .premium-header .nav-dd-menu::before { display: none; }
    .premium-header .nav-dd.open .nav-dd-menu { display: block; }
    .premium-header .nav-dd-item { border-left: 0; padding: 10px 16px; font-size: 16px; color: #9aa6b8; }
}
@media (max-width: 1279px) { .premium-header .nav-dd-item.active { color: #00FF88; } }


/* ---------- HOME: secções novas (ax-) ---------- */
@media (max-width: 1279px) {
    .ax-pilares .ax-wrap { grid-template-columns: 1fr; }
    .ax-pil-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ax-ways { grid-template-columns: 1fr 1fr; }
    .ax-ways .ax-way:last-child { grid-column: 1 / -1; }
    .ax-proc { grid-template-columns: 1fr; gap: 50px; }
    .ax-princ { grid-template-columns: 1fr 1fr; }
    .ax-cases { grid-template-columns: 1fr 1fr; }
    .ax-cases .ax-case:last-child { grid-column: 1 / -1; }
    .ax-areas { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 860px) {
    .ax-sec { padding: 90px 0; }
    .ax-wrap { padding: 0 1.1rem; }
    .ax-h2 { font-size: clamp(2rem, 8vw, 2.6rem); }
    .ax-lead { font-size: 17px; margin-bottom: 40px; }
    .ax-eyebrow { font-size: 12px; letter-spacing: .16em; }
    .ax-pil-grid, .ax-ways, .ax-cases, .ax-princ, .ax-facts, .ax-areas { grid-template-columns: 1fr; }
    .ax-ways .ax-way:last-child, .ax-cases .ax-case:last-child { grid-column: auto; }
    .ax-pil-cta b { font-size: 17px; }
    .ax-head-split { grid-template-columns: 1fr; gap: 0; margin-bottom: 36px; }
    .ax-way { padding: 26px 20px 22px; }
    .ax-viz { height: 196px; }
    .ax-va-col span { font-size: 11px; padding: 5px 6px; }
    .ax-hex { width: 62px; height: 70px; }
    .ax-unsure { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
    .ax-unsure .ax-btn { white-space: normal; }
    .ax-steps { grid-template-columns: 1fr; gap: 26px; }
    .ax-steps::before { left: 31px; right: auto; top: 30px; bottom: 30px; width: 1px; height: auto; background-image: linear-gradient(180deg, rgba(0,229,255,0.55) 50%, transparent 50%); background-size: 1px 10px; }
    .ax-steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; text-align: left; }
    .ax-steps small { grid-column: 2; margin: 0 0 2px; }
    .ax-circ { grid-row: 1 / span 3; grid-column: 1; margin: 0; }
    .ax-steps b, .ax-steps p { grid-column: 2; }
    .ax-princ { margin-top: 70px; }
    .ax-facts div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,0.07); }
    .ax-stack { flex-direction: column; align-items: flex-start; gap: 18px; }
    .ax-stack span { font-size: 16px; }
    .ax-final { padding: 100px 0 150px; }
    .ax-final h2 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
    .ax-final p { font-size: 17px; }
}
@media (max-width: 420px) {
    .ax-viz-agent { gap: 4px; padding: 10px 8px; }
    .ax-va-core em { display: none; }
    .ax-viz-web { grid-template-columns: 1fr; }
    .ax-viz-web .ax-browser { display: none; }
    .ax-mini { width: 66%; }
    .ax-chat { width: 72%; }
}


/* ---------- variantes por página (axv-) ---------- */
@media (max-width: 1279px) {
    .axv-web .ax-proc { grid-template-columns: 1fr; }
    .axv-web .ax-proc-head { position: static; }
    .axv-eng.ax-pilares .ax-wrap { grid-template-columns: 1fr; }
    .axv-eng .ax-steps { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .axv-eng .ax-steps li::after, .axv-eng .ax-steps li::before { display: none; }
    .axv-eng .ax-princ-item { grid-template-columns: 70px 220px 1fr; }
    .axv-ges .ax-steps li { grid-template-columns: 56px 50px 200px 1fr; }
    .axv-ges .ax-princ { grid-template-columns: 1fr; }
    .axv-ges .ax-princ-quote { grid-row: auto; margin-bottom: 20px; }
}
@media (max-width: 860px) {
    .axv-web .ax-pil { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 4px; }
    .axv-web .ax-pil:first-child { border-top: 0; }
    .axv-web .ax-steps li { grid-template-columns: 70px 1fr; column-gap: 16px; }
    .axv-web .ax-steps small { font-size: 44px; }
    .axv-web .ax-steps b { grid-column: 2; }
    .axv-web .ax-steps p { grid-column: 2; font-size: 16px; }
    .axv-web .ax-princ, .axv-web .ax-facts { grid-template-columns: 1fr; gap: 24px; }
    .axv-web .ax-princ-quote { text-align: left; padding-bottom: 20px; }
    .axv-web .ax-facts b { font-size: 44px; }
    .axv-web.ax-final .ax-final-in { grid-template-columns: 1fr; }
    .axv-web.ax-final p { grid-column: 1; grid-row: auto; }
    .axv-eng .ax-proc-head { grid-template-columns: 1fr; }
    .axv-eng .ax-steps { grid-template-columns: 1fr; gap: 12px; }
    .axv-eng .ax-princ-item { grid-template-columns: 1fr; row-gap: 6px; }
    .axv-eng .ax-princ-quote { flex-direction: column; align-items: flex-start; }
    .axv-eng .ax-princ-quote p { font-size: 16px; }
    .axv-eng .ax-facts { flex-direction: column; }
    .axv-eng .ax-stack > div { grid-template-columns: 1fr 1fr; width: 100%; }
    .axv-ges .ax-steps::before { padding: 12px 16px; font-size: 11px; }
    .axv-ges .ax-steps li { grid-template-columns: 46px 1fr; column-gap: 14px; row-gap: 4px; padding: 18px 16px; }
    .axv-ges .ax-steps small { grid-column: 1; grid-row: 1 / span 2; align-self: start; font-size: 20px; line-height: 1.3; }
    .axv-ges .ax-steps b { grid-column: 2; grid-row: 1; }
    .axv-ges .ax-steps p { grid-row: 2; }
    .axv-ges .ax-circ { display: none; }
    .axv-ges .ax-steps b { font-size: 18px; }
    .axv-ges .ax-steps p { grid-column: 2; font-size: 16px; }
    .axv-ges .ax-facts { grid-template-columns: 1fr; }
    .axv-ges .ax-facts div + div { border-left: 0; border-top: 1px solid #D5DED8; }
}
@media (max-width: 860px) { .ax-sp .ax-princ { grid-template-columns: 1fr; } }

/* =====================================================================
   LEGIBILIDADE — tamanhos mínimos de letra
   Muitos textos têm font-size fixo (inline ou Tailwind text-sm). No desktop
   o body tem zoom 0.8, por isso 12–14px apareciam com 10–11px.
   O cabeçalho, o splash e o crédito da foto ficam de fora.
   ===================================================================== */
@media (min-width: 1025px) {
    :is([style*="font-size: 10px"], [style*="font-size:10px"]):not(.premium-header *, .splash-screen *) { font-size: 14.5px !important; }
    :is([style*="font-size: 11px"], [style*="font-size:11px"]):not(.premium-header *, .splash-screen *) { font-size: 14.5px !important; }
    :is([style*="font-size: 12px"], [style*="font-size:12px"]):not(.premium-header *, .splash-screen *) { font-size: 15px !important; }
    :is([style*="font-size: 13px"], [style*="font-size:13px"]):not(.premium-header *, .splash-screen *) { font-size: 15.5px !important; }
    :is([style*="font-size: 14px"], [style*="font-size:14px"], [style*="font-size: 0.85rem"], [style*="font-size:0.85rem"]):not(.premium-header *, .splash-screen *, .premium-header) { font-size: 16.5px !important; }
    :is(.text-sm, .text-\[0\.85rem\]):not(.premium-header *, .splash-screen *, .premium-header) { font-size: 16.5px !important; line-height: 1.55; }
    .text-xs:not(.premium-header *, .splash-screen *) { font-size: 14.5px !important; }
    .card-label { font-size: 14.5px !important; }
    .sp-for { font-size: 15.5px !important; }
    .nd small { font-size: 14.5px !important; }
    #contact-form label, .contact-form label, form label { font-size: 15.5px !important; }
    footer p, footer li, footer a { font-size: 16px; }
    #manifesto div[class*="md:w-[2"], #manifesto div[class*="md:ml-[7rem]"] { font-size: 16px !important; }
    .floating-badge { font-size: 14.5px !important; }
    .ax-eyebrow { font-size: 15px; }
}
@media (max-width: 1024px) {
    :is([style*="font-size: 10px"], [style*="font-size:10px"], [style*="font-size: 11px"], [style*="font-size:11px"]):not(.premium-header *, .splash-screen *) { font-size: 13px !important; }
    :is([style*="font-size: 12px"], [style*="font-size:12px"]):not(.premium-header *, .splash-screen *) { font-size: 13.5px !important; }
}

/* ---------- rodapé (ft-) ---------- */
@media (max-width: 1279px) {
    .ft-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 40px 32px; }
    .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .ft-grid { grid-template-columns: 1fr 1fr; padding: 0 1.1rem; }
}
@media (max-width: 480px) {
    .ft-grid { grid-template-columns: 1fr; gap: 34px; }
}

/* ---------- seletor de língua no menu do telemóvel/tablet ---------- */
@media (max-width: 1279px) {
    .premium-header .lang-dd .lang-btn { display: none !important; }
    .premium-header .lang-dd .lang-menu { position: static !important; opacity: 1 !important; visibility: visible !important; transform: none !important;
        display: flex !important; gap: 10px; min-width: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; }
    .premium-header .lang-dd .lang-menu::before { display: none; }
    .premium-header .lang-item { padding: 9px 14px !important; border: 1px solid rgba(255,255,255,.14) !important; font-size: 16px !important; gap: 8px; }
    .premium-header .lang-item.active { border-color: #00FF88 !important; }
    .premium-header .lang-item span { display: none; }
}
/* Catálogo em PDF */
@media (max-width: 1023px) {
    .cat-sec { padding: 90px 0; }
    .cat-in { grid-template-columns: 1fr; gap: 50px; }
    .cat-cover { max-width: 300px; margin: 0 auto; transform: none; }
    .cat-band { grid-template-columns: 100px minmax(0,1fr); gap: 24px 28px; padding: 28px; margin-top: 60px; }
    .cat-band img { width: 100px; }
    .cat-band > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .cat-sec { padding: 70px 0; }
    .cat-cover { max-width: 230px; }
    .cat-cover::after { left: -8px; }
    .cat-list { grid-template-columns: 1fr; }
    .cat-actions .ax-btn-white { width: 100%; justify-content: space-between; }
    .cat-band { grid-template-columns: 1fr; }
    .cat-band img { width: 110px; }
    .cat-band .ax-btn-ghost { width: 100%; justify-content: center; white-space: normal; }
}

/* Manifesto (Home): no telemóvel os quadros ficam empilhados; texto sempre ao centro para manter a simetria */
@media (max-width: 767px) {
    #manifesto .backdrop-blur-md { text-align: center !important; justify-content: center; }
}

/* Menu hambúrguer: o botão "Solicitar Auditoria" fica centrado, como os links e as línguas */
@media (max-width: 1279px) {
    .premium-header.mobile-active .mobile-only-cta {
        display: flex !important; align-items: center; justify-content: center; text-align: center !important;
        width: min(100%, 320px) !important; margin: 18px auto 0 !important; padding: 14px 24px !important; box-sizing: border-box;
    }
}

/* Cabeçalho desktop: o botão de auditoria nunca parte em duas linhas */
.premium-header .desktop-only-cta { white-space: nowrap; }
@media (min-width: 1280px) and (max-width: 1439px) {
    .premium-header .premium-nav { gap: 1.4rem !important; }
    .premium-header .hdr-right { gap: 16px; }
}

/* LEGIBILIDADE (2) — etiquetas e ilustrações que ficaram abaixo do mínimo combinado.
   Desktop (zoom 0,8): etiquetas >= 14,5px CSS; texto dentro de ilustrações >= 13px CSS. */
@media (min-width: 1025px) {
    .ax-way-foot small, .ax-chips-row > small, .ax-stack > small, .ax-princ-quote small,
    .ax-steps small, .ft-cta { font-size: 14.5px !important; }
    .ft-h { font-size: 15px !important; }
    .ft-soon { font-size: 14.5px !important; }
    .ax-facts b span { font-size: 14.5px !important; }
    .ax-va-col span, .ax-field, .ax-mini-btn, .ax-funnel span, .ax-va-core em,
    .ax-kpis small, .ax-mini small, .ax-sk-btn, .ax-bar span { font-size: 13px !important; }
    .ax-hex small { font-size: 13px !important; letter-spacing: .08em; }
    .ax-mini b { font-size: 15px !important; }
    .ax-mini span { font-size: 13.5px !important; }
}
@media (max-width: 1024px) {
    .ax-hex small, .ax-kpis small, .ax-mini small, .ax-bar span, .ax-sk-btn { font-size: 11px !important; }
}

/* LEGIBILIDADE (3) — restantes etiquetas encontradas pela revisão visual (mínimo 14,5px CSS no desktop) */
@media (min-width: 1025px) {
    .vertical-label, #pdf-page-indicator, .legal-kicker, .legal-btn, section.legal-page th, .legal-wrap th,
    .sp-credit, .sp-ba-head > div { font-size: 14.5px !important; }
}
@media (max-width: 1024px) {
    .sp-credit { font-size: 12px !important; }
    .ax-va-core em { font-size: 11px !important; }
    .floating-badge { font-size: 12px !important; }
}

/* Sobre — "O Caos / E a Ordem": até 1024px o título fica por cima do texto (na coluna de 25% cortava e tocava no texto) */
@media (max-width: 1024px) {
    .md\:grid-cols-12:has(> .md\:col-span-3 > h2) { grid-template-columns: 1fr !important; gap: 28px !important; }
    .md\:grid-cols-12:has(> .md\:col-span-3 > h2) > div { grid-column: 1 / -1 !important; }
    .md\:grid-cols-12 > .md\:col-span-3 > h2 .block { display: inline !important; margin: 0 .25em 0 0 !important; }
}

/* Planos: botões dos cartões com folga lateral e sempre numa linha */
#pricing-plans .pricing-card .open-modal-btn { padding: 0 14px !important; white-space: nowrap; overflow: visible; }

/* Rodapé: o botão "Fale connosco" nunca parte em duas linhas (es "Hable con nosotros" é o mais comprido) */
.ft-cta { white-space: nowrap; }
@media (max-width: 1279px) {
    .ft-cta { padding: 10px 16px !important; letter-spacing: .06em !important; }
}

/* Web & Tráfego — maquetas "site antigo vs site novo" */
@media (max-width: 1024px) {
    .browsers-container > .browser-window { min-width: 0; }
}
@media (min-width: 768px) {
    /* o selo do meio tapava o texto da maqueta (em todas as larguras): sobe para o canto livre do topo */
    .bad-site > .floating-badge[style*="top: 50%"] { top: -15px !important; left: auto !important; right: 20px !important; transform: none !important; }
    .good-site > .floating-badge[style*="top: 75%"] { top: -15px !important; right: auto !important; left: 20px !important; transform: none !important; }
}
@media (max-width: 767px) {
    /* no telemóvel os selos ficam numa fila no topo do cartão, sem sair do ecrã nem tapar texto */
    .browsers-container .floating-badge { position: static !important; transform: none !important; align-self: flex-start; margin: 10px 14px 0 !important; white-space: nowrap; }
    .browsers-container .floating-badge + .floating-badge + .floating-badge { margin-bottom: 12px !important; }
    .bad-site > div:not(.floating-badge) > div[style*="justify-content: space-between"] { flex-wrap: wrap; gap: 6px; }
}

/* Setor Público — cabeçalho "Antes / Com a Ahurabi" no mínimo combinado (o estilo da página empatava em especificidade) */
@media (min-width: 1025px) { .sp-ba-row.sp-ba-head > div { font-size: 14.5px !important; } }
/* Política de privacidade — botão das cookies numa linha no telemóvel */
@media (max-width: 480px) { .legal-btn { width: 100%; letter-spacing: .04em !important; padding: 12px 10px !important; font-size: 12.5px !important; } }

/* Automação — os 4 pilares: 2 colunas no tablet, 1 no telemóvel (a regra própria da página ganhava à geral) */
.axv-eng .ax-pil-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 860px) { .axv-eng .ax-pil-grid { grid-template-columns: minmax(0,1fr); } }
@media (min-width: 1025px) { .pdf-toolbar span { font-size: 14.5px !important; } }

/* =====================================================================
   ACABAMENTO — correções da revisão visual (/revisao-visual)
   ===================================================================== */
/* botões e campos herdam a fonte do site (estavam em Arial) */
button, input, select, textarea { font-family: inherit; }
/* títulos com linhas equilibradas (sem palavra órfã na última linha); parágrafos sem órfãs */
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
/* selos posicionados por cima de cartões ("Mais Popular") nunca partem */
.pricing-card > div[style*="translateX(-50%)"] { white-space: nowrap; }
/* manifesto da Home: justificado abria "rios" de espaço em coluna estreita */
#manifesto p.text-justify { text-align: left !important; }

/* Gestão — maqueta do relatório (balanço): valores nunca separados do "€"; no telemóvel tudo cabe na folha */
.pdf-simulation-sheet table td:not(:first-child), .pdf-simulation-sheet table th:not(:first-child) { white-space: nowrap; }
@media (max-width: 767px) {
    .pdf-simulation-sheet { padding: 22px 12px !important; }
    .pdf-simulation-sheet table { font-size: 12px !important; }
    .pdf-simulation-sheet table td, .pdf-simulation-sheet table th { font-size: 12px !important; padding-left: 2px !important; padding-right: 2px !important; letter-spacing: -0.01em; }
    .pdf-simulation-sheet table td:first-child { hyphens: auto; }
    .pdf-simulation-sheet .pdf-toolbar { flex-wrap: wrap; gap: 12px; justify-content: center !important; text-align: center; }
    .pdf-simulation-sheet .pdf-toolbar > span:first-child { width: 100%; letter-spacing: 1px !important; }
}

/* Gestão — árvore de 3 ramos (Tesouraria): colunas iguais e linha horizontal sempre do centro da 1.ª ao centro da 3.ª caixa */
@media (min-width: 1101px) {
    .organogram-row-triple { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }
    .org-top-connection.triple .line-horizontal,
    .org-bottom-connection.triple .line-horizontal { width: calc((100% - 20px) * 2 / 3 + 21px) !important; }
    .organogram-row-triple .organogram-node { padding: 16px 8px !important; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
    .organogram-row-triple .organogram-node h5 { font-size: 16px !important; line-height: 1.25; }
    .organogram-row-triple .organogram-node p { font-size: 14.5px !important; line-height: 1.45 !important; }
}

/* Web & Tráfego — relatório simulado: página sempre inteira (sem corte em baixo) e grelhas que se reorganizam em vez de cortar à direita */
.pdf-reader-ui { max-height: none !important; }
.pdf-reader-ui .pdf-document-body { overflow: visible !important; }
@media (max-width: 1024px) {
    #live-audit-report .lg\:sticky { position: static !important; }
    .pdf-reader-ui { overflow: hidden !important; padding-bottom: 0 !important; }
    .pdf-reader-ui > div { min-width: 0 !important; }
}
@media (max-width: 767px) {
    .pdf-reader-ui .pdf-toolbar { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; font-size: 12px; }
    .pdf-reader-ui .pdf-toolbar > div:first-child { min-width: 0; flex: 1 1 100%; }
    .pdf-reader-ui .pdf-toolbar > div:first-child span { overflow-wrap: anywhere; }
    .pdf-reader-ui .pdf-toolbar > div:last-child { margin-left: auto; }
    .pdf-reader-ui .pdf-document-body { padding: 8px !important; }
    .pdf-reader-ui .pdf-page { padding: 14px !important; }
    .pdf-page > div:first-child { flex-wrap: wrap; gap: 10px; }
    .pdf-page [style*="repeat(3, 1fr)"],
    .pdf-page [style*="repeat(4, 1fr)"],
    .pdf-page [style*="repeat(5, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 14px !important; }
    .pdf-page [style*="2fr 1fr"],
    .pdf-page [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
    .pdf-page [style*="font-size: 24px"] { font-size: 21px !important; }
    .pdf-page [style*="repeat(3, 1fr)"] > div > div:first-child > i { display: none; }
    .pdf-page [style*="repeat(3, 1fr)"] > div > div:first-child > div { font-size: 13px !important; letter-spacing: 0.02em; }
    .pdf-page > div:first-child > div:last-child { text-align: left !important; justify-content: flex-start !important; }
    /* tabela de campanhas: no telemóvel ficam as colunas principais */
    .pdf-page table { font-size: 12px !important; }
    .pdf-page table th, .pdf-page table td { padding-left: 3px !important; padding-right: 3px !important; }
    .pdf-page table th:nth-child(3), .pdf-page table td:nth-child(3),
    .pdf-page table th:nth-child(4), .pdf-page table td:nth-child(4),
    .pdf-page table th:nth-child(5), .pdf-page table td:nth-child(5),
    .pdf-page table th:nth-child(6), .pdf-page table td:nth-child(6) { display: none; }
}
/* bolha "W" da maqueta antiga: sobe para não ficar por baixo do selo "Custo por Lead" */
.bad-site [style*="right: 10px; bottom: 20px"] { bottom: 46px !important; }

/* Sobre — "O diagnóstico" / "A matemática do retorno": a coluna do título só fica fixa (sticky) quando está ao lado dos cartões */
@media (max-width: 1023px) {
    body:has(#codigo-engenharia) .self-start.sticky { position: relative !important; top: auto !important; }
    #codigo-engenharia .md\:grid-cols-3 { grid-template-columns: minmax(0, 1fr) !important; max-width: 640px; }
}
@media (max-width: 767px) {
    #codigo-engenharia > h2 { font-size: 1.75rem !important; line-height: 1.2; padding: 0 24px; letter-spacing: .02em !important; margin-bottom: 40px !important; }
}
/* Sobre — as secções de baixo alinham pelo mesmo contentor (1450 px) que as de cima */
body:has(#codigo-engenharia) section > .max-w-7xl.mx-auto.px-6 { max-width: 1450px; }

/* Setor Público — faixa 24h / 45 min / 1 proposta empilha no telemóvel (a regra da página era mais específica) */
@media (max-width: 860px) {
    .ax-sp .ax-facts { grid-template-columns: minmax(0, 1fr) !important; }
    .ax-sp .ax-facts div + div { border-left: 0 !important; border-top: 1px solid rgba(255,255,255,0.07) !important; }
}

/* Gestão — cabeçalho da tabela de fases: traduzido, no tamanho mínimo, e nunca transformado na linha vertical do telemóvel */
html[lang^="es"] .axv-ges .ax-steps::before { content: 'Fase · Qué hacemos · Resultado'; }
html[lang^="en"] .axv-ges .ax-steps::before { content: 'Phase · What we do · Result'; }
@media (min-width: 1025px) { .axv-ges .ax-steps::before { font-size: 14.5px; } }
@media (max-width: 860px) {
    .axv-ges .ax-steps::before { position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
        width: auto !important; height: auto !important; background: rgba(0,255,136,0.06) !important; background-size: auto !important;
        padding: 12px 18px !important; font-size: 12px !important; letter-spacing: .14em !important; line-height: 1.5; }
}

/* Home — "Três formas de trabalhar": os cartões partilham as linhas da grelha (subgrid), por isso títulos, ilustrações e rodapés ficam alinhados entre si em qualquer língua */
@media (min-width: 861px) {
    .ax-ways .ax-way { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
    .ax-ways .ax-way-foot { margin-top: 0; align-items: flex-start; }
}

/* Home — diagrama "Agentes de IA": as linhas ligam sempre o hexágono aos quadros (medem exatamente o intervalo entre colunas) */
.ax-viz-agent { --va-gap: 22px; column-gap: var(--va-gap) !important; }
.ax-va-core em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 6px; }
.ax-va-core::before, .ax-va-core::after { top: 50% !important; width: var(--va-gap) !important; }
@media (max-width: 420px) { .ax-viz-agent { --va-gap: 6px; } }
.ax-va-core em { width: calc(100% + 2 * var(--va-gap) - 4px); white-space: normal !important; text-align: center; justify-content: center; flex-wrap: wrap; line-height: 1.25; }
/* barra vertical na aresta interior de cada coluna: a linha do hexágono liga-se a ela e ela liga todos os quadros */
.ax-viz-agent > .ax-va-col::after { content: ''; position: absolute; top: 14px; bottom: 14px; width: 1px; background: var(--accent-cyan); opacity: .55; }
.ax-viz-agent > .ax-va-col:first-child::after { right: 0; }
.ax-viz-agent > .ax-va-col:last-child::after { left: 0; background: var(--accent-green); }
.ax-va-core::before { background: var(--accent-cyan) !important; opacity: .55; }
.ax-va-core::after { background: var(--accent-green) !important; opacity: .55; }

/* Home — manifesto no telemóvel: a linha vai da caixa de texto até ao primeiro quadro (sem folga) e os quadros têm a mesma largura das caixas de cima e de baixo */
@media (max-width: 767px) {
    #manifesto .md\:hidden.w-\[2px\] { margin-top: -3rem !important; margin-bottom: -3rem !important; height: 3rem !important; }
    #manifesto .xl\:ml-\[8rem\] > .relative.flex.flex-col.gap-4 { width: 100%; }
}

/* Engenharia de Dados — "O Ciclo de Dados": sem deslocações forçadas, alinhado com o resto da página */
@media (min-width: 1025px) {
    .process-diagram-wrapper > div:first-child { transform: none !important; }
    #data-analytics-process-diagram h2 { transform: none !important; margin-bottom: 56px !important; }
}
@media (min-width: 1025px) {
    #data-analytics-process-diagram { padding-left: 0 !important; padding-right: 0 !important; }
    #data-analytics-process-diagram > div { max-width: 1560px !important; padding: 0 5%; box-sizing: border-box; }
}

/* "Trabalhamos com" — linhas completas, sem item sozinho na última linha */
body:has(#manifesto) .ax-stack > div { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 14px 34px; flex: 1; }
.axv-eng .ax-stack > div { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.axv-eng .ax-stack > div span:nth-child(5) { grid-column: span 2; }
.axv-eng .ax-stack > div span { white-space: nowrap; }
@media (max-width: 1100px) {
    .axv-eng .ax-stack > div { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; width: 100%; }
}
@media (max-width: 860px) {
    body:has(#manifesto) .ax-stack > div { grid-template-columns: repeat(2, auto); justify-content: start; width: 100%; }
}
@media (max-width: 860px) { body:has(#manifesto) .ax-stack > div { column-gap: 16px; } body:has(#manifesto) .ax-stack > div span { white-space: nowrap; } }

/* Planos — o cartão em destaque tem a mesma espessura de borda superior que os outros (o conteúdo ficava 2 px acima) */
#pricing-plans .pricing-card[style*="2px solid #00FF88"] { border-top-width: 4px !important; }
/* Planos — a faixa do catálogo tem a mesma largura que a grelha de planos */
#pricing-plans .cat-band { max-width: 1450px; }

/* Contacto — 45% + 55% + intervalo passava 60 px da largura: usar frações */
@media (min-width: 993px) { .contact-grid { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr) !important; } }

/* Títulos com <br>: a segunda frase é equilibrada sozinha (sem palavra órfã na última linha) */
.ax-final h2 > br + span { display: block; text-wrap: balance; }

/* Engenharia de Dados — "0€ / TSU & Subsídios": o sufixo não se parte; se não couber ao lado do número, passa inteiro para a linha de baixo */
h3 > span[style*="text-transform: uppercase"][style*="margin-left: 5px"] { display: inline-block; white-space: nowrap; }

/* Planos — com os cartões empilhados (uma coluna) as alturas fixas de alinhamento só criavam buracos */
@media (max-width: 768px) {
    #pricing-plans .pricing-card > div[style*="height: 105px"] { height: auto !important; margin-bottom: 14px; }
    #pricing-plans .pricing-card > div[style*="height: 120px"] { height: auto !important; margin-bottom: 26px; }
    #pricing-plans .pricing-card > div[style*="height: 110px"] { height: auto !important; margin-bottom: 26px; }
}
/* Sobre — no tablet/telemóvel, a mesma margem lateral (5%) que as outras páginas */
@media (min-width: 768px) and (max-width: 1024px) { body:has(#codigo-engenharia) section .mx-auto.px-6 { padding-left: 5% !important; padding-right: 5% !important; } }

/* ===== Web e Tráfego: letra maior nos textos informativos (desktop, onde o body tem zoom .8) ===== */
@media (min-width: 1025px) {
    .hero-data-right .premium-card p { font-size: 19px !important; }
    .hero-data-right .data-card p { font-size: 18px !important; }
    .hero-data-right .card-label { font-size: 17px !important; }
    .axv-web .ax-pil span { font-size: 19px; }
    .axv-web .ax-pil-cta span:not(.ax-round) { font-size: 18px; }
    #comparison-section .conversion-explanation-grid p { font-size: 19px !important; }
    .axv-web .ax-princ-item p { font-size: 19px; }
    .axv-web .ax-princ-quote small, .axv-web .ax-stack > small { font-size: 16px !important; }
    .axv-web .ax-facts small { font-size: 18.5px; }
    .axv-web .ax-stack > div span { font-size: 18px; }
}

/* ===== Caixas que não cabem: símbolo de expansão e abertura no lugar (ui-extra.js) ===== */
.ax-more { position: relative; overflow: hidden; cursor: pointer; }
.ax-more::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none; background: linear-gradient(180deg, rgba(10,15,27,0), rgba(10,15,27,.92)); transition: opacity .4s ease; }
.ax-more.ax-more-open { background-color: rgba(11,17,30,.98) !important; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,229,255,.22); }
.ax-more.ax-more-open::after { opacity: 0; }
.ax-more-btn { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: rgba(7,11,25,.85); border: 1px solid rgba(0,229,255,.45); color: #00E5FF; font-size: 17px; padding: 0;
    box-shadow: 0 0 0 0 rgba(0,229,255,.35); transition: transform .4s cubic-bezier(.2,.8,.2,1), background-color .3s ease, box-shadow .3s ease; }
.ax-more-btn:hover, .ax-more-btn:focus-visible { background: rgba(0,229,255,.12); box-shadow: 0 0 0 4px rgba(0,229,255,.12); outline: none; }
.ax-more-open .ax-more-btn { transform: rotate(90deg); }
.ax-more-ph { flex: none; }
@media (prefers-reduced-motion: reduce) { .ax-more, .ax-more-btn { transition: none !important; } }

/* ===== "Trabalhamos com": último item remete para outros, sob consulta ===== */
.ax-stack span.ax-stack-more { color: #8E9BAE; font-weight: 500; font-style: italic; border: 1px dashed rgba(0,229,255,.35); border-radius: 999px; padding: 6px 14px; }
.ax-stack span.ax-stack-more i { color: var(--accent-cyan); }
.axv-web .ax-stack > div span.ax-stack-more { border-style: dashed; border-color: rgba(0,229,255,.35); }
body:has(#manifesto) .ax-stack > div span.ax-stack-more, .axv-eng .ax-stack > div span.ax-stack-more { grid-column: 1 / -1; justify-self: start; }

/* ===== Gestão: faixa de números no tom escuro do resto do site (era branca) ===== */
.axv-ges .ax-facts { background: linear-gradient(180deg, #0E1524, #0A101C) !important; border: 1px solid rgba(255,255,255,0.08) !important; }
.axv-ges .ax-facts div + div { border-left: 1px solid rgba(255,255,255,0.07) !important; }
.axv-ges .ax-facts i, .axv-ges .ax-facts b span { color: var(--accent-green) !important; }
.axv-ges .ax-facts b { color: #FFF !important; }
.axv-ges .ax-facts small { color: #9AA6B8 !important; }
@media (max-width: 860px) { .axv-ges .ax-facts div + div { border-left: 0 !important; border-top: 1px solid rgba(255,255,255,0.07) !important; } }

/* ===== Textura suave nas secções lisas das páginas de serviços (a mesma grelha/pontos do resto do site) ===== */
.ax-pilares { background-image: radial-gradient(ellipse 60% 80% at 100% 0%, rgba(0,229,255,0.05), transparent 70%), radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1.4px); background-size: 100% 100%, 22px 22px; }
#live-audit-report, #balance-sheet-audit {
    background-image: radial-gradient(ellipse 70% 55% at 15% 20%, rgba(0,255,136,0.05), transparent 70%), linear-gradient(rgba(0,229,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,0.035) 1px, transparent 1px) !important;
    background-size: 100% 100%, 64px 64px, 64px 64px !important; background-position: 0 0, center top, center top !important;
}
#data-analytics-process-diagram {
    background-image: radial-gradient(ellipse 70% 55% at 85% 15%, rgba(0,229,255,0.06), transparent 70%), radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.4px) !important;
    background-size: 100% 100%, 20px 20px !important;
}
.ax-sec-glow { background-image: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,229,255,0.07), transparent 70%), linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 100% 100%, 56px 56px, 56px 56px; background-position: 0 0, center top, center top; }

/* Web e Tráfego: relatório de campanhas e texto ao lado com letra legível no desktop (zoom .8) */
@media (min-width: 1025px) {
    #live-audit-report p:not(.pdf-reader-ui p) { font-size: 19px !important; }
    #live-audit-report .pdf-page [style*="font-size: 14px"] { font-size: 17.5px !important; }
    #live-audit-report .pdf-page [style*="font-size: 15px"] { font-size: 18px !important; }
    #live-audit-report .pdf-page [style*="font-size: 16px"] { font-size: 18.5px !important; }
    #live-audit-report .pdf-page td, #live-audit-report .pdf-page th { font-size: 17px !important; }
    #live-audit-report .pdf-toolbar, #live-audit-report .pdf-toolbar * { font-size: 15px !important; }
}
/* Engenharia: o item "e outros" segue o desenho de caixa da grelha, a toda a largura */
.axv-eng .ax-stack > div span.ax-stack-more { justify-self: stretch; justify-content: center; border-radius: 0; padding: 16px 10px; border: 1.25px dashed rgba(0,229,255,.3); background: rgba(0,229,255,.03); }

/* Web e Tráfego: números grandes dos passos 01–05 (a regra de mínimo das etiquetas estava a encolhê-los) */
.axv-web .ax-steps small { font-size: 64px !important; line-height: .9; color: rgba(0,229,255,0.5); -webkit-text-stroke: 0; align-self: start; transition: color .3s ease; }
.axv-web .ax-steps li:hover small { color: #00E5FF; }
@media (max-width: 860px) { .axv-web .ax-steps small { font-size: 44px !important; } }

/* Catálogo na Home: 5.º item (setor público) ocupa a linha inteira no desktop */
@media (min-width: 769px) {
    .cat-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ===== Gestão: letra maior nos textos informativos (desktop, zoom .8: 17,5 px CSS ≈ 14 px visíveis) ===== */
@media (min-width: 1025px) {
    html body #hero-gestao .data-card .card-label { font-size: 17.5px !important; }
    html body #hero-gestao .data-card p { font-size: 20px !important; }
    html body #hero-gestao .data-card p span { font-size: 16px !important; }
    .axv-ges .ax-pil span { font-size: 19.5px; }
    .axv-ges .ax-pil-cta span:not(.ax-round) { font-size: 18.5px; }
    #protocolo-gestao .protocol-card span[style*="font-size: 12px"] { font-size: 17.5px !important; }
    #protocolo-gestao .protocol-card span[style*="font-size: 17px"] { font-size: 20px !important; }
    html body #protocolo-gestao .organogram-node h5 { font-size: 21px !important; }
    html body #protocolo-gestao .organogram-node p { font-size: 19px !important; line-height: 1.45 !important; }
    html body #protocolo-gestao .organogram-row-triple .organogram-node h5 { font-size: 18px !important; }
    html body #protocolo-gestao .organogram-row-triple .organogram-node p { font-size: 16.5px !important; }
    html body #protocolo-gestao .organogram-row-triple .organogram-node { padding: 16px 10px !important; }
    html body #protocolo-gestao .main-card-custom p { font-size: 19px !important; }
    html body #protocolo-gestao .main-card-custom p[style*="font-size: 11px"] { font-size: 17px !important; }
    #balance-sheet-audit .analyzer-copy span[style*="font-size: 12px"] { font-size: 17.5px !important; }
    html body #balance-sheet-audit table td { font-size: 18px !important; }
    html body #balance-sheet-audit .pdf-toolbar span { font-size: 18px !important; }
    .axv-ges .ax-steps p, .axv-eng .ax-steps p { font-size: 19.5px; }
    .axv-ges .ax-princ-item p, .axv-eng .ax-princ-item p { font-size: 19.5px; }
    .axv-ges .ax-princ-quote small, .axv-ges .ax-stack > small, .axv-eng .ax-princ-quote small, .axv-eng .ax-stack > small, .axv-web .ax-princ-quote small, .axv-web .ax-stack > small { font-size: 17px !important; }
    .axv-ges .ax-facts small { font-size: 19px !important; }
    .ax-final-meta span { font-size: 17.5px; }
}

/* Verde da marca em pequenos destaques de títulos (sem exagero) */
.ax-hl { color: var(--accent-green, #00FF88); }

/* ===== Engenharia de Dados: letra maior nos textos informativos (desktop, zoom .8) ===== */
@media (min-width: 1025px) {
    html body .metrics-cluster .metric-card p[style*="font-size: 13px"] { font-size: 17px !important; }
    html body .metrics-cluster .metric-card p span[style*="font-size: 12px"] { font-size: 15px !important; }
    html body .axv-eng .ax-pil span { font-size: 19.5px !important; }
    html body .axv-eng .ax-pil-cta span:not(.ax-round) { font-size: 18.5px !important; }
    #data-architecture span[style*="font-size: 14px"] { font-size: 17.5px !important; }
    #data-architecture p[style*="font-size: 16px"] { font-size: 19.5px !important; }
    #data-architecture p[style*="font-size: 15px"], #data-architecture p[style*="font-size: 15px"] strong { font-size: 19px !important; }
    #data-architecture p[style*="font-size: 13px"] { font-size: 17px !important; }
    html body .axv-eng .ax-facts small { font-size: 18.5px !important; }
    html body .axv-eng .ax-stack > div span { font-size: 17.5px !important; }
}

/* ===== Engenharia de Dados — fluxograma do processo em HTML (substitui a imagem) =====
   Desktop e tablet: duas linhas (4 + 3 etapas) ligadas por uma seta a descer.
   Telemóvel (≤767px): coluna vertical tipo linha do tempo, ícone à esquerda e texto à direita.
   Um impulso de luz corre pelas setas e acende cada etapa à vez (ciclo de 8,4s). */
.dp-wrap { width: 100%; }
.dp-flow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; width: 100%; }
.dp-node { flex: 0 0 calc((100% - 3 * 44px) / 4); min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.dp-ico {
    width: 96px; height: 96px; flex-shrink: 0; border-radius: 26px; display: grid; place-items: center;
    color: var(--c); font-size: 46px; position: relative;
    background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 16%, transparent), rgba(255,255,255,0.02) 70%);
    border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
    animation: dpLit 8.4s infinite; animation-delay: calc(var(--i) * 1.2s);
}
.dp-node b { display: block; color: #E2E8F0; font-size: 21px; font-weight: 700; line-height: 1.3; }
.dp-node small { display: block; margin-top: 6px; color: #8FA3BF; font-size: 17.5px; line-height: 1.4; }
.dp-node[style*="--i:4"] small { color: #00FF88; }

/* setas: linha fina + ponta; o impulso é um gradiente que corre por cima */
.dp-arrow {
    flex: 0 0 44px; height: 96px; position: relative; overflow: hidden;
    --g: linear-gradient(90deg, transparent, #00E5FF, transparent);
    background: var(--g) no-repeat; background-size: 60% 2px; background-position: -100% 50%;
    filter: drop-shadow(0 0 4px rgba(0,229,255,0.9));
    animation: dpPulse 8.4s infinite; animation-delay: calc(var(--i) * 1.2s + 0.6s);
}
.dp-arrow::before { content: ""; position: absolute; left: 4px; right: 10px; top: 50%; height: 2px; margin-top: -1px; background: rgba(176,196,222,0.28); border-radius: 2px; }
.dp-arrow::after { content: ""; position: absolute; right: 5px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-top: 2px solid rgba(176,196,222,0.5); border-right: 2px solid rgba(176,196,222,0.5); transform: rotate(45deg); }
/* passagem da 1.ª para a 2.ª linha: desce da "Filtragem", volta à esquerda e desce para a "Análise" */
.dp-flow .dp-arrow[style*="--i:3"] {
    flex: 0 0 100%; height: 58px; filter: none; animation: none;
    background: linear-gradient(rgba(176,196,222,0.28), rgba(176,196,222,0.28)) no-repeat;
    background-size: 2px 26px; background-position: right calc(12.5% - 17.5px) top 4px;
}
.dp-flow .dp-arrow[style*="--i:3"]::before {
    left: calc(25% - 12px); right: calc(12.5% - 16.5px); top: 28px; bottom: 9px; height: auto; margin: 0;
    background: none; border-top: 2px solid rgba(176,196,222,0.28); border-left: 2px solid rgba(176,196,222,0.28); border-radius: 10px 0 0 0;
}
.dp-flow .dp-arrow[style*="--i:3"]::after { right: auto; left: calc(25% - 16px); top: auto; bottom: 5px; margin: 0; transform: rotate(135deg); }

@keyframes dpPulse { 0% { background-position: -100% 50%; } 9%, 100% { background-position: 200% 50%; } }
@keyframes dpPulseV { 0% { background-position: 50% -100%; } 9%, 100% { background-position: 50% 200%; } }
@keyframes dpLit {
    0%, 16%, 100% { box-shadow: 0 0 0 rgba(0,0,0,0); transform: none; }
    6% { box-shadow: 0 0 28px color-mix(in srgb, var(--c) 45%, transparent); transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .dp-ico, .dp-arrow { animation: none; } }

/* Tablet: o fluxograma fica por baixo da lista, a toda a largura */
@media (max-width: 1024px) and (min-width: 768px) {
    .dp-ico { width: 80px; height: 80px; font-size: 38px; border-radius: 22px; }
    .dp-arrow { height: 80px; }
    .dp-node b { font-size: 19px; }
    .dp-node small { font-size: 16px; }
}
/* Telemóvel: coluna vertical, setas a descer */
@media (max-width: 767px) {
    .process-diagram-wrapper > div:last-child { padding: 0 4px !important; }
    .process-diagram-wrapper .dp-wrap > .dp-flow { width: auto !important; max-width: 440px !important; }
    .dp-flow { flex-direction: column; flex-wrap: nowrap; align-items: stretch; margin: 0 auto; }
    .dp-node { flex: none; flex-direction: row; align-items: center; text-align: left; gap: 18px; }
    .dp-ico { width: 64px; height: 64px; font-size: 30px; border-radius: 18px; }
    .dp-node b { font-size: 19px; }
    .dp-node small { font-size: 15.5px; margin-top: 3px; }
    .dp-flow .dp-arrow, .dp-flow .dp-arrow[style*="--i:3"] {
        flex: none; width: 64px; height: 30px; filter: drop-shadow(0 0 4px rgba(0,229,255,0.9)); animation: dpPulseV 8.4s infinite; animation-delay: calc(var(--i) * 1.2s + 0.6s);
        background: var(--g) no-repeat;
        --g: linear-gradient(180deg, transparent, #00E5FF, transparent);
        background-size: 2px 60%; background-position: 50% -100%; animation-name: dpPulseV;
    }
    .dp-flow .dp-arrow::before, .dp-flow .dp-arrow[style*="--i:3"]::before { left: 50%; right: auto; top: 3px; bottom: 9px; width: 2px; height: auto; margin: 0 0 0 -1px; border: 0; border-radius: 2px; background: rgba(176,196,222,0.28); }
    .dp-flow .dp-arrow::after, .dp-flow .dp-arrow[style*="--i:3"]::after { right: auto; left: 50%; top: auto; bottom: 4px; margin: 0 0 0 -5px; transform: rotate(135deg); }
}
