﻿* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    margin: 0; padding: 0; font-size: 100%; scroll-behavior: smooth;
    background: var(--color-header-bg) url('../img/fundo-bg.png') center top / cover no-repeat fixed;
    min-height: 100%;
}
body { margin: 0; padding: 0; }

/* ── Skip link ── */
.rb-skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--color-header-bg);
    color: #d0e4f5;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: top .1s;
}
.rb-skip-link:focus { top: 0; }

body.rb-body {
    font-family: 'Roboto', system-ui, sans-serif;
    background: transparent;
    color: #123;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.rb-header-wrapper {
    background-color: var(--color-header-bg);
    width: 100%;
    flex-shrink: 0;
    padding: 0;
    margin-top: 0;
    position: sticky;
    top: 0;
    z-index: 1001; /* acima do Leaflet (max 1000) e outros overlays */
    box-shadow: 0 -20px 0 20px var(--color-header-bg); /* cobre gap de renderizacao acima do sticky */
}


.rb-header {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 24px;
    color: #fff;
}

.rb-header-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
    padding: 6px 0 30px; /* 30px = gap(4) + pill(26) — FNP centrado na linha de 74px, pill alinhado */
}

.rb-header-title {
    grid-column: 2 / 3;
    justify-self: center;
    text-align: center;
}

.rb-header-title h1 {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.rb-header-title p {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.rb-header-logo-radar {
    grid-column: 1 / 2;
    justify-self: start;
}

.rb-header-logo-radar a {
    display: block;
}

.rb-header-radar-img {
    height: 74px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity var(--transition-base);
}

.rb-header-logo-radar a:hover .rb-header-radar-img {
    opacity: 1;
}

.rb-header-logo {
    grid-column: 3 / 4;
    justify-self: end;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 16px;
}

.rb-header-logo a {
    display: block;
}

.rb-header-logo-img {
    height: 62px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: opacity var(--transition-base);
}

.rb-header-logo a:hover .rb-header-logo-img {
    opacity: 1;
}

.rb-lang-form {
    position: absolute;
    top: 100%;
    margin-top: 4px;
    right: 16px;
    margin-right: 0;
}

.rb-lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 20px;
    padding: 3px;
    gap: 0;
}

.rb-lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.60);
    font-family: 'DM Sans', 'Roboto', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 16px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.rb-lang-btn:hover {
    color: #fff;
}

.rb-lang-btn.active {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.rb-lang-sep {
    display: none;
}

/* MENU NAV — variáveis definidas em tokens.css */

.rb-main-nav {
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 16px;
    gap: 0;
    height: 100%;
}

.rb-nav-link {
    text-decoration: none;
    color: rgba(255,255,255,0.78);
    font-family: 'DM Sans', 'Roboto', sans-serif;
    font-size: 1.051rem;
    font-weight: 500;
    padding: 8px 18px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.rb-nav-link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255,255,255,0.45);
}

.rb-nav-link.active {
    color: #ffffff;
    font-weight: 600;
    border-bottom-color: #ffffff;
}

.rb-nav-link:focus-visible {
    outline: 2px solid rgba(255,255,255,0.7);
    outline-offset: -2px;
    border-radius: 4px;
}

.rb-nav-hamburger:focus-visible,
.rb-social-icon:focus-visible {
    outline: 2px solid #d0e4f5;
    outline-offset: 3px;
    border-radius: 4px;
}

/* MAIN - CARDS*/
.rb-main {
    max-width: 1000px;
    margin: 16px auto 0;
    padding: 24px;
    background: var(--color-bg-page);
    border-radius: 16px;
    min-height: 0;
    flex-grow: 1;
}

/* RODAPÉ */
.rb-footer-landing {
    position: relative;
    width: 100%;
    background-color: var(--color-header-bg);
    overflow: hidden;
    flex-shrink: 0;
}

.rb-footer-wave {
    line-height: 0;
    display: block;
}

.rb-footer-wave svg {
    display: block;
    width: 100%;
    height: 50px;
}

.rb-footer-wave svg path {
    fill: #101d4f;
}

/* Links dentro do footer */
.rb-footer-landing a[href^="tel"],
.rb-footer-landing a[href^="mailto"],
.rb-footer-landing a[href^="https://wa"] {
    color: rgba(122, 174, 212, 0.85) !important;
}

/* Container principal: posição texto rodape */
.rb-footer-inner {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 40px 0 40px;
    min-height: 80px;
    box-sizing: border-box;
}

/* ---- COLUNA ESQUERDA ---- */
.rb-footer-col-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-bottom: 0;
}

.rb-footer-col-left h3 {
    font-size: 1.3125rem;
    font-weight: 900;
    color: rgba(255,255,255, 0.90);
    margin-bottom: 6px;
}

.rb-footer-col-left p {
    font-size: 1rem;
    color: rgba(255,255,255, 0.65);
    line-height: 1.5;
    margin-bottom: 4px;
}

.rb-footer-fone {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: rgba(255,255,255, 0.65);
    flex-wrap: wrap;
    margin-top: 4px;
}

.rb-footer-fone-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rb-icon-fone,
.rb-icon-whats {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    display: inline-block;
}

.rb-footer-sep {
    color: rgba(255,255,255, 0.40);
    font-size: 1rem;
}

.rb-footer-whats {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    color: rgba(255,255,255, 0.65);
}

/* ---- BARRA DE COPYRIGHT ---- */
.rb-footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 12px;
}

.rb-footer-copy {
    font-size: 0.875rem;
    color: rgba(255,255,255, 0.38);
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
}

/* ---- COLUNA DIREITA ---- */
.rb-footer-col-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
}

.rb-footer-social-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.rb-footer-social-block h3 {
    font-size: 1.3125rem;
    font-weight: 900;
    color: rgba(255,255,255, 0.90);
}

.rb-footer-social {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rb-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    color: rgba(255,255,255, 0.70);
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.2s, border-color 0.2s;
}

.rb-social-icon svg {
    width: 16px !important;
    height: 16px !important;
    display: block;
    flex-shrink: 0;
}

.rb-social-icon:hover {
    background: rgba(16,29,79, 0.40);
    border-color: rgba(255, 255, 255, 0.40);
}

.rb-footer-logos {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.rb-footer-logo {
    height: 44px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.75;
    transition: opacity .15s;
}

.rb-footer-logo:hover {
    opacity: 1;
}

/* ── Hamburger (oculto no desktop) ───────────────────── */
.rb-nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    margin: 4px 8px 4px auto;
    border-radius: 6px;
    transition: background 0.2s;
}
.rb-nav-hamburger:hover {
    background: rgba(38,69,132, 0.15);
}
.rb-nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
    transform-origin: center;
}
.rb-main-nav.nav-open .rb-nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rb-main-nav.nav-open .rb-nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.rb-main-nav.nav-open .rb-nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Wrapper dos links (sempre visível no desktop) ───── */
.rb-nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

/* Seção idioma no dropdown mobile — oculta no desktop */
.rb-nav-lang-section { display: none; }

/* ---- NAV DESKTOP FLUIDO — notebooks/telas menores continuam em UMA LINHA ----
   Os 7 itens do menu com fonte cheia (1.051rem/18px) só cabem numa linha a
   partir de ~1570px de largura efetiva. Em vez de colapsar pra hamburger,
   fonte/padding dos links e altura das logos encolhem em degraus conforme a
   tela estreita — assim a versão desktop continua parecendo desktop em
   qualquer notebook comum (1600/1440/1366/1280/1024...), incluindo quando o
   usuário usa zoom do navegador ou escala de SO que reduz a largura efetiva.
   Medido empiricamente com Playwright headless em cada degrau. */
@media (max-width: 1600px) {
    .rb-nav-link { font-size: 0.95rem; padding: 8px 14px; }
    .rb-header-radar-img { height: 68px; }
    .rb-header-logo-img { height: 56px; }
}
@media (max-width: 1440px) {
    .rb-nav-link { font-size: 0.875rem; padding: 8px 12px; }
    .rb-header-radar-img { height: 64px; }
    .rb-header-logo-img { height: 52px; }
}
@media (max-width: 1300px) {
    .rb-nav-link { font-size: 0.8125rem; padding: 8px 10px; }
    .rb-header-radar-img { height: 58px; }
    .rb-header-logo-img { height: 48px; }
}
@media (max-width: 1180px) {
    .rb-nav-link { font-size: 0.75rem; padding: 8px 8px; }
    .rb-header-radar-img { height: 52px; }
    .rb-header-logo-img { height: 42px; }
}
@media (max-width: 1080px) {
    .rb-nav-link { font-size: 0.6875rem; padding: 8px 6px; }
    .rb-header-radar-img { height: 46px; }
    .rb-header-logo-img { height: 38px; }
}
@media (max-width: 980px) {
    .rb-nav-link { font-size: 0.625rem; padding: 8px 5px; }
    .rb-header-radar-img { height: 42px; }
    .rb-header-logo-img { height: 34px; }
}

/* Abaixo de ~900px nem 10px de fonte cabe mais numa linha (janela estreita
   ou tablet, nao notebook real) -- ai sim colapsa pra hamburger, igual ao
   padrao mobile abaixo. */
@media (max-width: 900px) {
    .rb-main-nav {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .rb-nav-hamburger {
        display: flex;
        margin: 0;
    }
    .rb-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        background: #0d1640;
        box-shadow: 0 16px 48px rgba(0,0,0,0.5);
        border-top: 2px solid rgba(255,255,255,0.12);
        padding: 4px 0 16px;
        max-height: calc(100vh - 68px);
        overflow-y: auto;
    }
    .rb-main-nav.nav-open .rb-nav-links {
        display: flex;
    }
    .rb-nav-link {
        padding: 11px 18px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        border-left: 3px solid transparent;
        border-bottom-right-radius: 0;
        white-space: normal;
        text-align: left;
        font-size: 0.9375rem;
        font-weight: 500;
    }
    .rb-nav-link.active {
        border-bottom-color: rgba(255,255,255,0.08);
        border-left-color: #ffffff;
        padding-left: 15px;
        color: #ffffff;
    }
}

/* ---- RESPONSIVO ---- */
@media (max-width: 768px) {
    /* Rodapé oculto no mobile — mapas e conteúdo ocupam a viewport inteira */
    .rb-footer-landing { display: none; }

    /* Header compacto */
    .rb-header-wrapper {
        padding: 6px 0;
    }
    .rb-header {
        padding: 0 12px;
    }
    .rb-header-top {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 4px 0;
    }

    /* Radar logo — mobile */
    .rb-header-logo-radar {
        display: block;
        grid-column: 1 / 2;
        justify-self: start;
    }
    .rb-header-radar-img {
        height: 43px;
    }

    /* FNP logo — pill oculta no mobile (idioma vai no dropdown do hamburger) */
    .rb-header-logo {
        grid-column: 3 / 4;
        justify-self: end;
        padding-right: 8px;
        align-items: center;
    }
    .rb-header-logo-img {
        height: 36px;
    }
    /* Pill PT|EN oculta no header mobile — substituída pelo globo no dropdown */
    .rb-lang-form {
        display: none;
    }

    /* Conteúdo principal */
    .rb-main {
        margin: 8px;
        padding: 14px;
        border-radius: 12px;
    }

    /* Footer — redesign mobile */
    .rb-footer-wave svg {
        height: 35px;
    }

    .rb-footer-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 20px 28px;
        gap: 0;
    }

    /* Contato */
    .rb-footer-col-left {
        align-items: flex-start;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
    .rb-footer-col-left h3 {
        font-size: 0.9375rem;
        margin-bottom: 8px;
    }
    .rb-footer-col-left p {
        font-size: 0.8125rem;
        line-height: 1.55;
        margin-bottom: 4px;
    }
    .rb-footer-fone {
        font-size: 0.8125rem;
        gap: 5px;
        margin-top: 6px;
    }
    .rb-footer-sep {
        font-size: 0.8125rem;
    }
    .rb-footer-whats {
        font-size: 0.8125rem;
    }

    /* Copyright — separado como bloco central */
    .rb-footer-col-center {
        order: 3;
        align-self: center;
        padding: 16px 0 0;
        border-top: 1px solid rgba(255,255,255,.10);
        width: 100%;
        justify-content: center;
    }
    .rb-footer-copy {
        white-space: normal;
        font-size: 0.6875rem;
        text-align: center;
        line-height: 1.5;
    }

    /* Siga-nos + logos */
    .rb-footer-col-right {
        order: 2;
        align-items: flex-start;
        padding: 20px 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
        gap: 14px;
    }

    .rb-footer-social-block {
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    .rb-footer-social-block h3 {
        font-size: 0.9375rem;
    }
    .rb-footer-social {
        gap: 8px;
        justify-content: space-between;
        width: 100%;
    }
    .rb-social-icon {
        width: 44px;
        height: 44px;
        border-radius: 9px;
        flex: 1;
        max-width: 54px;
    }

    /* Touch targets mínimos de 44px */
    .rb-nav-hamburger {
        padding: 13px 10px;
    }

    /* Seção idioma no fundo do dropdown — globo + PT | EN */
    .rb-nav-lang-section {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 18px 10px;
        margin-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.12);
        color: rgba(255,255,255,0.6);
    }
    .rb-nav-lang-form-mobile {
        display: flex;
        gap: 6px;
    }
    .rb-nav-lang-btn {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.28);
        color: rgba(255,255,255,0.65);
        padding: 5px 14px;
        border-radius: 4px;
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: .08em;
        cursor: pointer;
        min-height: 36px;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
    }
    .rb-nav-lang-btn.active {
        background: rgba(255,255,255,0.14);
        border-color: rgba(255,255,255,0.55);
        color: #ffffff;
    }
    .rb-nav-lang-btn:hover {
        background: rgba(255,255,255,0.10);
        border-color: rgba(255,255,255,0.45);
        color: rgba(255,255,255,0.9);
    }
    .rb-nav-globe-icon {
        flex-shrink: 0;
        opacity: 0.7;
    }

    /* Logos parceiros */
    .rb-footer-logos {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        align-items: center;
    }
    .rb-footer-logo {
        height: 34px;
        max-width: none;
        flex: 1;
        object-fit: contain;
    }
}