/* =============================================================
   HidroLab · PROPOSTA MOBILE (experimental)
   -------------------------------------------------------------
   Camada por cima de style.css, só para ecrãs até 820px.
   Não mexe em cores, fontes nem textos: muda a composição.

   Ligar / desligar:  MOBILE_PROPOSTA em includes/config.php
   Comparar no browser: acrescentar ?proposta=0 ao URL
   Remover de vez (4 passos):
     1. apagar este ficheiro
     2. apagar assets/js/mobile-proposta.js
     3. apagar includes/partials/mobile-proposta-bar.php
     4. apagar as linhas marcadas "PROPOSTA MOBILE" em
        includes/header.php, includes/footer.php e includes/config.php
   ============================================================= */

/* Barra de ações rápidas: nunca aparece fora do telemóvel. */
.mp-bar { display: none; }

@media (max-width: 820px) {

    /* ---------- Ritmo geral ---------- */
    .container { padding-inline: 20px; }
    .section { padding: 2.9rem 0; }
    .section-head { text-align: left; max-width: none; margin: 0 0 1.5rem; }
    .section-head .eyebrow,
    .coverage-copy .eyebrow { display: none; }
    .section-head h2,
    .coverage-copy h2 { font-size: 1.65rem; line-height: 1.12; letter-spacing: -.025em; }
    .section-lead { font-size: 1rem; line-height: 1.6; }
    .section-foot { text-align: left; margin-top: 1.25rem; }
    .section-foot .btn { width: 100%; }
    .chips-grid { justify-content: flex-start; }

    /* Em ecrã tátil o hover fica "preso" depois do toque. */
    .card:hover, .service-row:hover, .btn:hover { transform: none; }
    .card:active, .btn:active { transform: scale(.98); }

    /* ---------- Cabeçalho ---------- */
    .header-inner { height: 62px; }
    .brand-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
    .brand-name { font-size: 1.15rem; }
    .lang-switch a { padding: .32em .66em; font-size: .7rem; }
    .btn-call { display: none; }

    /* Menu em ecrã inteiro, links grandes */
    .main-nav { width: 100vw; border-left: 0; padding: 5.2rem 20px calc(1.5rem + env(safe-area-inset-bottom)); background: var(--char-900); }
    .main-nav > ul li { border-bottom: 1px solid var(--line); }
    .main-nav > ul a { font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; letter-spacing: -.02em; padding: .7em 0; color: var(--ivory); }
    .main-nav > ul a[aria-current="page"] { color: var(--amber-400); }
    .nav-close { top: 10px; right: 14px; }
    .nav-cta .btn { padding: 1.05em 1.5em; font-family: var(--font-head); font-size: 1.05rem; }

    /* ---------- Hero: compacto, botões à vista sem fazer scroll ----------
       O HidroLab ainda não tem fotos de obra: em vez da foto do LumineLab
       fica o brilho azul da marca. Quando houver fotos, pôr uma aqui. */
    .hero {
        background:
            radial-gradient(520px 360px at 92% -8%, rgba(47,128,237,.30), transparent 66%),
            linear-gradient(170deg, #131920 0%, #10151B 60%, #0B0E12 100%);
    }
    .hero::after, .hero-visual { display: none; }
    .hero-inner {
        display: flex; flex-direction: column;
        padding-block: 2.6rem 2rem;
    }
    .hero-copy { display: flex; flex-direction: column; }
    .hero-copy .eyebrow { order: 1; margin-bottom: .85rem; font-size: .7rem; }
    .hero-copy .eyebrow::before { display: none; }
    .hero-copy h1 { order: 2; max-width: none; font-size: clamp(1.8rem, 7.9vw, 2.25rem); line-height: 1.06; letter-spacing: -.03em; margin-bottom: .8rem; }
    .hero-lead { order: 3; font-size: 1rem; line-height: 1.55; color: rgba(234,241,247,.74); margin-bottom: 1.35rem; }
    .hero-actions { order: 4; display: grid; grid-template-columns: 1.25fr 1fr; gap: .6rem; }
    .hero-actions .btn { width: 100%; padding: .95em .8em; font-size: .95rem; }
    .hero-actions .btn-primary .icon { display: none; }
    .hero-actions .btn-ghost { background: rgba(234,241,247,.07); }

    /* Os 3 pontos passam a uma faixa compacta por baixo dos botões */
    .hero-points {
        order: 5; display: grid; grid-template-columns: repeat(3, 1fr);
        gap: 0; margin: 1.35rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line);
    }
    .hero-points li {
        display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
        background: none; border: 0; border-radius: 0; padding: 0 .7rem;
        font-size: .76rem; line-height: 1.3; color: var(--muted);
    }
    .hero-points li:first-child { padding-left: 0; }
    .hero-points li + li { border-left: 1px solid var(--line); }
    .hero-points .icon { width: 16px; height: 16px; }

    /* ---------- Hero das páginas interiores ---------- */
    .page-hero { padding: 2.4rem 0 2.2rem; }
    .page-hero h1 { font-size: clamp(1.75rem, 7.4vw, 2.1rem); line-height: 1.08; }
    .page-hero-lead { font-size: 1rem; }
    .page-hero .hero-actions { margin-top: 1.4rem; grid-template-columns: 1fr 1fr; }

    /* ---------- Serviços: grelha de 2 colunas ----------
       8 serviços: o 1.º e o de aquecimento de água ocupam a largura
       toda, com fundo azul; os outros 6 ficam em pares. */
    .cards:not(.cards-posts) { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .service-card {
        display: flex; flex-direction: column; justify-content: space-between;
        min-height: 128px; padding: 1rem; border-radius: var(--radius);
        box-shadow: none;
    }
    .service-card .card-icon { width: 40px; height: 40px; border-radius: 11px; margin-bottom: .9rem; }
    .service-card .card-icon .icon { width: 21px; height: 21px; }
    .service-card h3 { font-size: .97rem; line-height: 1.25; margin: 0; }
    .service-card p { display: none; }

    .service-card:nth-child(1),
    .service-card:nth-child(5) {
        grid-column: 1 / -1; min-height: 172px; justify-content: flex-end;
        border-color: var(--line-strong);
    }
    .service-card:nth-child(5) { order: 9; }
    .service-card:nth-child(1) { background: radial-gradient(340px 220px at 100% 0%, rgba(47,128,237,.34), transparent 70%), var(--char-800); }
    .service-card:nth-child(5) { background: radial-gradient(340px 220px at 0% 100%, rgba(47,128,237,.26), transparent 70%), var(--char-800); }
    .service-card:nth-child(1) .card-icon,
    .service-card:nth-child(5) .card-icon { margin-bottom: auto; }
    .service-card:nth-child(1) h3,
    .service-card:nth-child(5) h3 { font-size: 1.12rem; margin-top: 1.6rem; }
    .service-card:nth-child(1) p,
    .service-card:nth-child(5) p { display: block; font-size: .88rem; line-height: 1.45; margin-top: .3rem; color: rgba(234,241,247,.72); }

    /* Página Serviços: acordeões mais juntos */
    .service-list { gap: .6rem; }
    .service-row { border-radius: var(--radius); box-shadow: none; }

    /* ---------- Vantagens: lista com ícone à esquerda ---------- */
    .features, .features-3,
    .section-why .features { display: grid; grid-template-columns: 1fr; gap: 0; }
    .feature, .section-why .feature {
        display: grid; grid-template-columns: 44px 1fr; column-gap: 1rem;
        padding: 1.05rem 0; border-top: 1px solid var(--line);
    }
    .feature-icon { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 12px; margin: 0; }
    .feature-icon .icon { width: 21px; height: 21px; }
    .feature h3 { grid-column: 2; font-size: 1.02rem; margin: .1rem 0 .2rem; }
    .feature p { grid-column: 2; font-size: .93rem; line-height: 1.55; }

    /* ---------- Zona de atuação ---------- */
    .coverage-inner { gap: 1.6rem; }
    .coverage-copy .btn { width: 100%; margin-top: 1.4rem; }
    .coverage-map { aspect-ratio: 16 / 11; border-radius: var(--radius); }
    .area-map { aspect-ratio: 4 / 3; border-radius: var(--radius); }

    /* ---------- Processo: linha do tempo vertical ---------- */
    .steps { grid-template-columns: 1fr; gap: 0; padding: 0; margin: 0; }
    .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; padding: 0 0 1.5rem; }
    .step:last-child { padding-bottom: 0; }
    .step-num { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; font-size: 1rem; margin: 0; box-shadow: none; }
    .step h3 { grid-column: 2; font-size: 1.05rem; margin: .5rem 0 .25rem; }
    .step p { grid-column: 2; font-size: .93rem; }
    .step::after {
        display: block; top: 46px; bottom: 6px; left: 19px; right: auto;
        width: 2px; height: auto; background: rgba(47,128,237,.28);
    }
    .step:last-child::after { display: none; }

    /* ---------- Perguntas frequentes ---------- */
    .faq { gap: .55rem; }
    .faq-item summary { padding: 1rem 1.1rem; font-size: .98rem; line-height: 1.35; }
    .faq-answer { padding: 0 1.1rem 1.1rem; font-size: .95rem; }

    /* ---------- Banda final ---------- */
    .cta-band-inner { padding-block: 2.6rem; gap: 1.4rem; }
    .cta-band h2 { font-size: 1.55rem; }
    .cta-band-actions { display: grid; grid-template-columns: 1fr; width: 100%; gap: .6rem; }
    .cta-band-actions .btn { width: 100%; }

    /* ---------- Contactos ---------- */
    .contact-form-wrap { padding: 1.35rem; border-radius: var(--radius); }

    /* ---------- Rodapé em 2 colunas ---------- */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.2rem; padding-block: 2.6rem 2rem; }
    .footer-brand,
    .footer-contact,
    .footer-grid > .footer-col:nth-child(4) { grid-column: 1 / -1; }
    .footer-grid > .footer-col:nth-child(4) ul { display: block; columns: 2; column-gap: 1.2rem; }
    .footer-grid > .footer-col:nth-child(4) li { break-inside: avoid; margin-bottom: .6rem; }
    .footer-col a, .footer-col span { font-size: .92rem; }
    .footer-legal { flex-wrap: wrap; gap: .5rem 1.2rem; }

    /* ---------- Barra de ações fixa (substitui os botões flutuantes) ---------- */
    .mp-bar {
        display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: .3rem;
        position: fixed; z-index: 92;
        left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
        padding: 6px; border-radius: var(--radius-full);
        background: rgba(22,29,37,.88);
        -webkit-backdrop-filter: blur(16px) saturate(160%);
        backdrop-filter: blur(16px) saturate(160%);
        border: 1px solid var(--line-strong);
        box-shadow: 0 18px 40px -16px rgba(0,0,0,.85), inset 0 1px 0 rgba(234,241,247,.06);
        transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
    }
    .mp-bar.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
    .mp-bar-btn {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
        min-width: 62px; height: 48px; padding: 0 .6rem; border-radius: var(--radius-full);
        font-family: var(--font-body); font-size: .7rem; font-weight: 600; color: var(--ivory-dim);
        text-decoration: none;
    }
    .mp-bar-btn:hover { color: var(--ivory); text-decoration: none; }
    .mp-bar-btn:active { background: rgba(234,241,247,.08); }
    .mp-bar-btn .icon { width: 20px; height: 20px; color: var(--amber-400); }
    .mp-bar .mp-bar-cta { height: 48px; padding: 0 1rem; font-size: .95rem; box-shadow: none; }

    /* Na página de contactos o formulário já está à vista: só Ligar e WhatsApp. */
    body[data-page="contact"] .mp-bar { grid-template-columns: 1fr 1fr; }
    body[data-page="contact"] .mp-bar-cta { display: none; }
    body[data-page="contact"] .mp-bar-btn { flex-direction: row; gap: .5rem; font-size: .9rem; }

    .mp-bar ~ .wa-float,
    .mp-bar ~ .to-top { display: none; }
    body:has(.mp-bar) .footer-bottom { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    /* O style.css reservava espaço para o botão flutuante, que aqui desaparece. */
    body:has(.mp-bar) .footer-bottom-inner { padding-right: 20px; padding-bottom: 1.3rem; }
}

@media (max-width: 360px) {
    .hero-actions { grid-template-columns: 1fr; }
    .hero-points li { font-size: .72rem; padding: 0 .5rem; }
    .mp-bar-btn { min-width: 54px; padding: 0 .4rem; }
}

@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
    .mp-bar { transition: none; }
}
