/*
 * Cabeçalho do site (menu.php + js/cabecalho.js)
 * Paleta igual à da home (css/secoes-home.css). Prefixo fh- para não colidir com o tema EdCare.
 */
:root {
    --fh-verde: #07a698;
    --fh-verde-escuro: #05786e;
    --fh-verde-claro: #e6f6f4;
    --fh-petroleo: #0f2a2e;
    --fh-titulo: #12201f;
    --fh-texto: #5b6463;
    --fh-borda: rgba(15, 42, 46, .1);
    --fh-barra-h: 40px;
    --fh-ease: cubic-bezier(.22, .61, .36, 1);
}

.fh {
    position: sticky;
    top: calc(var(--fh-barra-h) * -1);   /* a barra superior sobe e o menu fica preso no topo */
    z-index: 1000;
    font-family: 'Outfit', system-ui, sans-serif;
}
.fh *,
.fh *::before,
.fh *::after { box-sizing: border-box; }
.fh ul { list-style: none; margin: 0; padding: 0; }
.fh a { text-decoration: none; }
.fh-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- barra superior ---------- */
.fh-barra {
    height: var(--fh-barra-h);
    background: var(--fh-petroleo);
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}
.fh-barra-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}
.fh-contato {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}
.fh-contato li,
.fh-contato a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}
.fh-contato i { color: #2fd0bf; font-size: 12px; }
.fh-contato a:hover { color: #fff; }
.fh-acessos { margin-left: auto; }
.fh-acessos ul { display: flex; align-items: center; gap: 4px; }
.fh-acessos a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .82);
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.fh-acessos a i { font-size: 12px; color: #2fd0bf; }
.fh-acessos a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.fh-sociais {
    display: flex;
    gap: 2px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, .15);
}
.fh-sociais a {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, .82);
    transition: background .2s, color .2s;
}
.fh-sociais a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- linha principal ---------- */
.fh-principal {
    position: relative;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--fh-borda);
    transition: box-shadow .3s var(--fh-ease);
}
.fh.rolado .fh-principal { box-shadow: 0 10px 30px -18px rgba(15, 42, 46, .45); }
.fh-principal-inner {
    height: 84px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: height .3s var(--fh-ease);
}
.fh.rolado .fh-principal-inner { height: 70px; }
.fh-logo { flex: 0 0 auto; display: block; line-height: 0; }
.fh-logo img { width: auto; height: 56px; transition: height .3s var(--fh-ease); }
.fh.rolado .fh-logo img { height: 46px; }

/* menu */
.fh-nav { margin: 0 auto; }
.fh-nav-lista { display: flex; align-items: center; gap: 2px; }
.fh-item { position: relative; }
.fh-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--fh-titulo);
    font: 500 15.5px/1 'Outfit', system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.fh-link i { font-size: 10px; opacity: .55; transition: transform .25s var(--fh-ease); }
.fh-link:hover,
.fh-item.aberto > .fh-link { background: var(--fh-verde-claro); color: var(--fh-verde-escuro); }
.fh-item.aberto > .fh-link i { transform: rotate(180deg); }
.fh-item.ativo > .fh-link { color: var(--fh-verde-escuro); font-weight: 600; }
.fh-item.ativo > .fh-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--fh-verde);
    transform: translateX(-50%);
}

/* painel do submenu */
.fh-painel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: 340px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--fh-borda);
    border-radius: 18px;
    box-shadow: 0 2px 6px rgba(15, 42, 46, .06), 0 30px 60px -24px rgba(15, 42, 46, .4);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .2s var(--fh-ease), transform .2s var(--fh-ease), visibility 0s .2s;
}
.fh-painel::before {   /* ponte invisível para o mouse não "cair" entre o botão e o painel */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}
.fh-item.aberto > .fh-painel {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .2s var(--fh-ease), transform .2s var(--fh-ease), visibility 0s;
}
.fh-painel a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--fh-titulo);
    transition: background .2s;
}
.fh-painel a:hover,
.fh-painel a:focus-visible { background: var(--fh-verde-claro); }
.fh-painel a[aria-current="page"] { background: var(--fh-verde-claro); }
.fh-painel-icone {
    flex: 0 0 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--fh-verde-claro);
    color: var(--fh-verde-escuro);
    font-size: 16px;
    transition: background .2s, color .2s;
}
.fh-painel a:hover .fh-painel-icone { background: var(--fh-verde); color: #fff; }
.fh-painel-texto { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.fh-painel-texto strong { font-size: 15px; font-weight: 600; }
.fh-painel-texto small { font-size: 13px; color: var(--fh-texto); }
.fh-nova-aba { margin-left: 4px; font-size: 10px; opacity: .55; }

/* ações */
.fh-acoes { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.fh-icone-botao,
.fh-whats {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--fh-borda);
    border-radius: 50%;
    background: #fff;
    color: var(--fh-titulo);
    font-size: 17px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.fh-icone-botao:hover,
.fh-icone-botao[aria-expanded="true"] { background: var(--fh-verde-claro); color: var(--fh-verde-escuro); border-color: transparent; }
.fh-whats { color: #fff; background: #25d366; border-color: #25d366; font-size: 21px; }
.fh-whats:hover { background: #1ebe5b; color: #fff; }
.fh-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--fh-verde-escuro);   /* 5,3:1 com o branco */
    color: #fff;
    font-weight: 600;
    font-size: 15.5px;
    white-space: nowrap;
    box-shadow: 0 10px 22px -12px rgba(5, 120, 110, .8);
    transition: background .2s, transform .2s var(--fh-ease), box-shadow .2s;
}
.fh-cta i { font-size: 13px; transition: transform .2s var(--fh-ease); }
.fh-cta:hover { background: #046158; color: #fff; transform: translateY(-1px); }
.fh-cta:hover i { transform: translateX(3px); }
.fh-hamburguer { display: none; }

/* busca */
.fh-busca {
    border-top: 1px solid var(--fh-borda);
    background: #fff;
    padding: 16px 0;
    animation: fh-desce .25s var(--fh-ease);
}
.fh-busca[hidden] { display: none; }
.fh-busca form {
    position: relative;
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
}
.fh-busca form > i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fh-texto);
}
.fh-busca input[type="search"] {
    flex: 1;
    height: 52px;
    padding: 0 20px 0 50px;
    border: 1.5px solid var(--fh-borda);
    border-radius: 999px;
    background: #f5f9f8;
    color: var(--fh-titulo);
    font: 400 16px 'Outfit', system-ui, sans-serif;
}
.fh-busca input[type="search"]:focus { outline: none; border-color: var(--fh-verde); background: #fff; }
.fh-busca button {
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--fh-petroleo);
    color: #fff;
    font: 600 15px 'Outfit', system-ui, sans-serif;
    cursor: pointer;
}
.fh-busca button:hover { background: #1b4247; }
@keyframes fh-desce { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- gaveta (celular) ---------- */
.fh-fundo {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(15, 42, 46, .5);
    backdrop-filter: blur(2px);
    animation: fh-aparece .25s ease;
}
.fh-gaveta {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1002;
    width: min(380px, 92vw);
    overflow-y: auto;
    padding: 18px 20px 28px;
    background: #fff;
    box-shadow: -20px 0 50px -20px rgba(15, 42, 46, .5);
    animation: fh-entra .3s var(--fh-ease);
}
.fh-fundo[hidden],
.fh-gaveta[hidden] { display: none; }
@keyframes fh-entra { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fh-aparece { from { opacity: 0; } to { opacity: 1; } }
.fh-gaveta-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.fh-gaveta-topo img { height: 46px; width: auto; }
.fh-gaveta-lista > li { border-bottom: 1px solid var(--fh-borda); }
.fh-gaveta-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--fh-titulo);
    font: 600 17px 'Outfit', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}
.fh-gaveta-link[aria-current="page"] { color: var(--fh-verde-escuro); }
.fh-gaveta-link i { font-size: 12px; transition: transform .25s var(--fh-ease); }
.fh-gaveta-link[aria-expanded="true"] { color: var(--fh-verde-escuro); }
.fh-gaveta-link[aria-expanded="true"] i { transform: rotate(180deg); }
.fh-gaveta-sub { padding: 0 0 12px; }
.fh-gaveta-sub[hidden] { display: none; }
.fh-gaveta-sub a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--fh-texto);
    font-size: 15.5px;
}
.fh-gaveta-sub a i { width: 18px; color: var(--fh-verde); text-align: center; }
.fh-gaveta-sub a:hover { background: var(--fh-verde-claro); color: var(--fh-titulo); }
.fh-cta-largo { width: 100%; justify-content: center; margin: 22px 0 8px; height: 52px; }
.fh-gaveta-titulo {
    margin: 22px 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fh-texto);
}
.fh-gaveta-acessos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.fh-gaveta-acessos a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f5f9f8;
    color: var(--fh-titulo);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}
.fh-gaveta-acessos a i { color: var(--fh-verde-escuro); }
.fh-gaveta-acessos a:hover { background: var(--fh-verde-claro); }
.fh-gaveta-contato {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--fh-borda);
    display: grid;
    gap: 12px;
    font-size: 14.5px;
    color: var(--fh-texto);
}
.fh-gaveta-contato li,
.fh-gaveta-contato a { display: flex; align-items: flex-start; gap: 12px; color: inherit; }
.fh-gaveta-contato i { width: 16px; margin-top: 3px; color: var(--fh-verde-escuro); text-align: center; }
html.fh-travado { overflow: hidden; }
/* com a gaveta aberta, os botões flutuantes (acessibilidade e VLibras) não ficam por cima dela */
html.fh-travado .a11y-caixa,
html.fh-travado [vw].enabled { visibility: hidden; }

/* ---------- responsivo ---------- */
@media (max-width: 1439px) {
    .fh-contato li:nth-child(2) { display: none; }   /* e-mail da barra só em telas largas */
}
@media (max-width: 1279px) {
    /* telas médias: só os acessos mais usados na barra (os demais ficam na gaveta) */
    .fh-acessos li:nth-child(n+4) { display: none; }
    .fh-nav,
    .fh-whats { display: none; }
    .fh-hamburguer { display: grid; }
    .fh-acoes { margin-left: auto; }
}
@media (max-width: 991px) {
    .fh { --fh-barra-h: 0px; }
    .fh-barra { display: none; }
    .fh-principal-inner,
    .fh.rolado .fh-principal-inner { height: 68px; }
    .fh-logo img,
    .fh.rolado .fh-logo img { height: 44px; }
}
@media (max-width: 575px) {
    .fh-container { padding: 0 16px; }
    .fh-cta { height: 42px; padding: 0 16px; font-size: 14.5px; }
    .fh-cta i { display: none; }
    .fh-icone-botao { width: 42px; height: 42px; }
    .fh-busca form { flex-direction: column; }
    .fh-busca button { height: 46px; }
}
@media (max-width: 374px) {
    .fh-acoes > #fhBuscaBotao { display: none; }
}

/* sem animações quando o visitante pede menos movimento */
@media (prefers-reduced-motion: reduce) {
    .fh *, .fh-gaveta, .fh-fundo { animation: none !important; transition: none !important; }
}
@media print {
    .fh { display: none; }
}
