/* =====================================================================
   HEADER
     Faixa de avisos (ciano, topo) + barra branca: logo | menu em pílula | pesquisa + CTA
   Carregado depois de salvador.css. As animações usam transform/opacity
   e clip-path.
   ===================================================================== */
:root {
    --sh-bar-h: 68px;
    --sh-ticker-h: 34px;
    --sh-ease: cubic-bezier(.22, .8, .24, 1);
    --sh-ease-io: cubic-bezier(.65, 0, .35, 1);
    --sh-teal: #339999;
    --sh-teal-deep: #237d7d;
    --sh-brand: #1f3b4a;      /* cor do logo (como aparece no ecrã) */
    --sh-brand-2: #27495b;
    --sh-brand-3: #18303c;    /* fundo dos resultados da pesquisa */
    --sh-aviso: #339999;      /* faixa dos avisos: ciano para chamar a atenção */
    --sh-aviso-deep: #237d7d;
    --sh-teal-light: #5cc2c2; /* teal para destaques sobre o escuro */
    --sh-ink: #183c50;
    --sh-muted: #647b87;
    --sh-line: #dce8ed;
    --sh-soft: #eef6f7;
    --sh-radius: 16px;
}
@media (max-width: 991.98px) {
    :root { --sh-bar-h: 64px; --sh-ticker-h: 38px; }
}

/* ---------- Folga do conteúdo (medida em JS) ---------- */
main.page-content,
.page-salvador main.page-content { padding-top: var(--header-h, var(--sh-bar-h)); }
/* O texto do slide traz .mgt100 (margem de 100px) que o empurrava para baixo */
body.page-salvador .home-hero .carousel-slide-content .mgt100 { margin-top: 0 !important; }

/* Setas do banner: chevrons num círculo, centradas na mesma área que o texto */
body.page-salvador .home-hero .carousel-control-prev,
body.page-salvador .home-hero .carousel-control-next {
    width: auto; padding: 0 clamp(16px, 3vw, 48px);
    opacity: 1; text-shadow: none;
}
body.page-salvador .home-hero .carousel-arrow-btn .bi {
    display: inline-block;
    color: #fff; font-size: 2rem; line-height: 1;
    filter: drop-shadow(0 1px 6px rgba(10, 30, 42, .45));
    opacity: .75;
    transition: opacity .2s ease, transform .3s var(--sh-ease);
}
body.page-salvador .home-hero .carousel-control-prev:hover .bi { opacity: 1; transform: translateX(-3px); }
body.page-salvador .home-hero .carousel-control-next:hover .bi { opacity: 1; transform: translateX(3px); }
@media (max-width: 575.98px) {
    body.page-salvador .home-hero .carousel-arrow-btn .bi { font-size: 1.5rem; }
}

/* ---------- Base (anula o header genérico de appv2.css) ---------- */
header.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 1100;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transition: none;
}
.site-header *,
.sh-drawer * { box-sizing: border-box; }

/* =====================================================================
   BARRA
   ===================================================================== */
/* Barra sempre com fundo branco sólido (sem transparência nem desfoque);
   no scroll ganha só uma sombra leve */
.sh-bar {
    position: relative; z-index: 2; background: #fff;
    transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled .sh-bar { box-shadow: 0 1px 0 var(--sh-line), 0 6px 18px rgba(24, 60, 80, .06); }

.sh-inner {
    width: 90%; max-width: var(--iu-max-w, 1160px); margin: 0 auto;
    height: var(--sh-bar-h);
    /* colunas laterais iguais: o menu fica centrado no ecrã, não no espaço que sobra */
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.sh-inner > .sh-logo { justify-self: start; }
.sh-inner > .sh-actions { justify-self: end; }

/* Logo: versão escura e branca sobrepostas, troca por opacidade */
.sh-logo { position: relative; top: -3px; display: inline-flex; align-items: center; }
.sh-logo img { display: block; height: 46px; width: auto; max-width: 220px; transition: opacity .35s ease; }
.sh-logo__dark {
    filter: brightness(0) saturate(100%) invert(20%) sepia(18%) saturate(1322%) hue-rotate(157deg) brightness(88%) contrast(91%);
}
.sh-logo__light {
    position: absolute; left: 0; top: 50%; translate: 0 -50%;
    filter: brightness(0) invert(1) drop-shadow(0 1px 8px rgba(0, 0, 0, .35));
}
/* O logo mantém sempre a cor (a barra é branca) */
.sh-logo__light { opacity: 0; }
/* o tema global (app.css / appv2.css) põe "a:hover img { opacity: .8 }":
   mostrava o logo branco por cima do escuro no hover */
.site-header .sh-logo:hover .sh-logo__dark { opacity: 1; }
.site-header .sh-logo:hover .sh-logo__light { opacity: 0; }


/* ---------- Menu em pílula ---------- */
.sh-center { position: relative; align-self: center; justify-self: center; }

.site-header .sh-nav {
    position: relative; z-index: 3;
    display: flex; align-items: center; flex-wrap: nowrap; /* o tema global põe wrap: a lupa saltava de linha */
    margin: 0 !important; padding: 0 8px;
    height: 48px;
    background: #fff;
    border-radius: var(--sh-radius);
    text-align: left;
}
.sh-nav__list { position: relative; z-index: 1; display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.site-header .sh-nav__link {
    position: relative; display: block;
    padding: 8px 11px; /* 11px: com 8 links (+ seta do submenu) a pílula tem de caber ao lado do "Fale connosco" */
    color: var(--sh-ink);
    font-size: .9rem; font-weight: 500; line-height: 1.2;
    letter-spacing: 0; text-transform: none; white-space: nowrap;
    text-decoration: none; opacity: 1;
    transition: color .15s ease;
}
.site-header .sh-nav__link::after { content: none; }
.site-header .sh-nav__link:hover,
.site-header .sh-nav__link:focus-visible,
.site-header .sh-nav__link[aria-current="page"] { color: var(--sh-teal-deep); opacity: 1; }
.site-header .sh-nav__link[aria-current="page"] { font-weight: 600; }
.site-header .sh-nav__link:focus-visible { outline: 2px solid var(--sh-teal); outline-offset: -2px; border-radius: 8px; }

/* Hover simples: só a cor do texto muda; a página atual tem um fundo
   claro fixo (sem a pílula que deslizava entre links) */
.sh-nav__indicator { display: none; }
.site-header .sh-nav__link { border-radius: 10px; }
.site-header .sh-nav__link[aria-current="page"] { background: var(--sh-soft); }
.sh-nav__item.has-sub.is-open > .sh-nav__link { color: var(--sh-teal-deep); }

/* ---------- Submenus ----------
   Aba branca colada ao fundo da barra, por baixo do item-pai (--sub-x, JS):
   sem borda em cima, parece a própria navbar a descer. Links em coluna.
   position: fixed (o header também é fixo) para sair da pílula do menu. */
.sh-nav__item { position: relative; }
/* ponte invisível entre o item e a aba, só até ao fundo da barra (--ponte,
   JS) e só com a aba aberta: o hover não se perde ao descer o rato */
.sh-nav__item.has-sub.is-open::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: var(--ponte, 16px); }
/* caixa fixa e centrada: ao rodar, a seta não sobe nem desce */
.site-header .sh-nav__link .sh-nav__chev {
    display: inline-flex; align-items: center; justify-content: center;
    width: 10px; height: 10px; margin-left: 3px;
    font-size: .58rem; line-height: 1; vertical-align: middle;
    transform-origin: 50% 50%;
    transition: transform .3s var(--sh-ease);
}
.site-header .sh-nav__link .sh-nav__chev::before { display: block; line-height: 1; vertical-align: 0; }
.sh-sub {
    position: fixed; top: calc(var(--header-h, 102px) - 1px); left: calc(var(--sub-x, 0px) - 6px);
    min-width: 180px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 16px 30px rgba(24, 60, 80, .12);
    opacity: 0; visibility: hidden;
    transition: opacity .15s ease, visibility 0s linear .15s;
}
/* aberto por JS (.is-open): só com o rato no item, com um pequeno atraso */
.sh-nav__item.has-sub.is-open .sh-sub {
    opacity: 1; visibility: visible;
    transition: opacity .15s ease, visibility 0s;
}
.sh-nav__item.has-sub.is-open .sh-nav__chev { transform: rotate(180deg); }
.site-header.search-open .sh-sub { visibility: hidden; }

.sh-sub__list {
    display: flex; flex-direction: column;
    margin: 0; padding: 4px 6px 6px;
    list-style: none;
}
body .site-header .sh-sub__link {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 7px 10px; border-radius: 6px;
    color: var(--sh-ink); font-size: .88rem; font-weight: 500;
    text-decoration: none; text-transform: none; letter-spacing: 0; white-space: nowrap;
    transition: color .15s ease, background-color .15s ease;
}
/* seta que entra no hover; traço teal à esquerda na página atual */
body .site-header .sh-sub__link .bi {
    font-size: .78rem; color: var(--sh-teal);
    opacity: 0; transform: translateX(-6px);
    transition: opacity .2s ease, transform .25s var(--sh-ease);
}
body .site-header .sh-sub__link::after {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 2px; height: auto; border-radius: 2px; background: var(--sh-teal); /* height: o tema global põe 2px */
    transform: scaleY(0);
    transition: transform .3s var(--sh-ease);
}
body .site-header .sh-sub__link:hover,
body .site-header .sh-sub__link:focus-visible { background: var(--sh-soft); color: var(--sh-teal-deep); }
body .site-header .sh-sub__link[aria-current="page"] { color: var(--sh-teal-deep); }
body .site-header .sh-sub__link:hover .bi,
body .site-header .sh-sub__link:focus-visible .bi { opacity: 1; transform: none; }
body .site-header .sh-sub__link[aria-current="page"]::after { transform: scaleY(1); }
body .site-header .sh-sub__link[aria-current="page"] { font-weight: 600; }
body .site-header .sh-sub__link:focus-visible { outline: 2px solid var(--sh-teal); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
    .sh-sub, body .site-header .sh-sub__link, body .site-header .sh-sub__link .bi { transition: none; }
}

/* ---------- Faixa de avisos (marquee) ----------
   Colada ao topo, fundo ciano a toda a largura; o conteúdo alinha com o site */
.sh-ticker { position: relative; z-index: 3; background: var(--sh-aviso); color: #fff; }
.sh-ticker__inner {
    width: 90%; max-width: var(--iu-max-w, 1160px); margin: 0 auto;
    height: var(--sh-ticker-h);
    display: flex; align-items: center; gap: 10px;
}
.sh-ticker__icon {
    flex-shrink: 0;
    display: inline-grid; place-items: center;
    width: 20px; height: 20px; border-radius: 5px;
    background: #fff; color: var(--sh-aviso-deep);
    font-size: .72rem; font-style: normal; font-weight: 800; line-height: 1;
}
.sh-ticker .avisos-items {
    position: relative; flex: 1 1 auto; min-width: 0;
    height: 100%;
    display: flex; align-items: center;
    overflow: hidden; white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
    contain: layout paint;
}
.sh-ticker .avisos-items__track {
    display: flex; align-items: center; flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
    backface-visibility: hidden;
    contain: layout style;
}
.sh-ticker .avisos-items__sequence { display: inline-flex; align-items: center; flex: 0 0 auto; }
.sh-ticker .avisos-item {
    display: inline-flex; align-items: baseline; gap: 7px;
    padding: 6px 8px 5px; margin: 0;
    background: transparent; border: 0; border-radius: 6px;
    color: #fff; font: inherit; font-size: .8rem; font-weight: 600; line-height: 1;
    white-space: nowrap; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .2s ease, color .2s ease;
}
.sh-ticker .avisos-item__date { color: rgba(255, 255, 255, .85); font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-ticker .avisos-item__date::after { content: none; }
.sh-ticker .avisos-item:hover,
.sh-ticker .avisos-item.active { background: rgba(255, 255, 255, .18); color: #fff; }
.sh-ticker .avisos-item:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.sh-ticker .avisos-sep {
    flex-shrink: 0; width: 1px; height: 12px; margin: 0 4px;
    background: rgba(255, 255, 255, .35);
    font-size: 0; color: transparent; user-select: none;
}

/* ---------- Painel do aviso ---------- */
.site-header .avisos-panels { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; border: 0; pointer-events: none; }
.site-header .avisos-panel {
    position: absolute; top: 10px;
    left: max(12px, calc((100% - var(--iu-max-w, 1160px)) / 2)); right: max(12px, calc((100% - var(--iu-max-w, 1160px)) / 2));
    max-height: 70vh; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; color: var(--sh-ink);
    border: 1px solid var(--sh-line); border-radius: 14px;
    box-shadow: 0 12px 28px rgba(24, 60, 80, .14);
    opacity: 0; transform: translateY(-8px);
    transition: opacity .22s ease, transform .32s var(--sh-ease);
    pointer-events: none;
}
.site-header .avisos-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.site-header .avisos-panel .iu-container { width: 100%; padding: 18px 18px 20px; }
.site-header .avisos-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 10px; }
.site-header .avisos-panel__meta {
    display: block; margin-bottom: 6px;
    color: var(--sh-teal-deep); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.site-header .avisos-panel__title { margin: 0; color: var(--sh-ink) !important; font-size: 1.15rem; line-height: 1.3; }
.site-header .avisos-panel__close {
    flex-shrink: 0; display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--sh-soft); border: 0; color: var(--sh-ink);
    cursor: pointer; font-size: .85rem;
    transition: background-color .2s ease;
}
.site-header .avisos-panel__close:hover { background: var(--sh-line); }
.site-header .avisos-panel__content { color: var(--sh-muted); font-size: .95rem; line-height: 1.7; }
.site-header .avisos-panel__content a { color: var(--sh-teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.site-header .avisos-panel__content p { margin-bottom: 12px; }
.site-header .avisos-panel__content > :last-child { margin-bottom: 0; }

/* =====================================================================
   AÇÕES — pesquisa e CTA
   ===================================================================== */
.sh-actions { display: flex; align-items: center; gap: 12px; }
.site-header .sh-cta {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border-radius: 8px;
    background: var(--sh-brand); color: #fff;
    font-size: .85rem; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: background-color .2s ease;
}
.site-header .sh-cta:hover { color: #fff; background: var(--sh-brand-2); }
.sh-cta__icon { display: inline-flex; color: #8de0dc; font-size: .9rem; }

/* Pesquisa: botão dentro da pílula, separado dos links por uma linha */
.site-header .sh-search-btn--nav {
    position: relative; z-index: 1;
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; margin: 0 0 0 10px; padding: 0;
    border: 0; border-radius: 10px;
    background: transparent; color: var(--sh-ink);
    font-size: 1rem; cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.site-header .sh-search-btn--nav::before {
    content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px;
    width: 1px; background: var(--sh-line);
}
.site-header .sh-search-btn--nav:hover { background: var(--sh-soft); color: var(--sh-teal-deep); }
.sh-search-btn--mobile {
    display: none; place-items: center;
    width: 44px; height: 44px; padding: 0; margin: 0;
    border: 1px solid var(--sh-line); border-radius: 50%;
    background: #fff; color: var(--sh-ink);
    font-size: 1rem; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.site-header.is-scrolled .sh-search-btn--mobile { border-color: transparent; }
.site-header.search-open .sh-search-btn--mobile { background: var(--sh-teal); border-color: var(--sh-teal); color: #fff; }

.sh-search__form { display: flex; align-items: center; gap: 12px; margin: 0; }
.sh-search__form > .bi { color: var(--sh-teal-deep); font-size: 1.05rem; }
.sh-search__input {
    flex: 1; min-width: 0; padding: 0;
    border: 0; outline: 0; background: transparent;
    color: var(--sh-ink); font: inherit;
}
.sh-search__input:focus, .sh-search__input:focus-visible { outline: 0; border: 0; box-shadow: none !important; } /* anula o glow azul global do tema */
.sh-search__input::placeholder { color: var(--sh-muted); }
.sh-search__input::-webkit-search-cancel-button { display: none; }
.sh-search__close {
    flex-shrink: 0; display: inline-grid; place-items: center;
    width: 32px; height: 32px; padding: 0;
    border: 0; border-radius: 8px;
    background: transparent; color: var(--sh-muted);
    cursor: pointer; font-size: .85rem;
    transition: background-color .2s ease, color .2s ease;
}
.sh-search__close:hover { background: var(--sh-soft); color: var(--sh-ink); }

.sh-search__results { margin: 0; padding: 6px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sh-search__results:empty { display: none; }
body .sh-search__results a {
    display: grid; grid-template-columns: 1fr auto; column-gap: 14px;
    padding: 10px 14px; border-radius: 10px;
    color: var(--sh-ink); text-decoration: none;
    transition: background-color .15s ease;
}
body .sh-search__results a:hover,
body .sh-search__results a.is-active { background: #fff; color: var(--sh-ink); box-shadow: 0 1px 3px rgba(24, 60, 80, .08); }
.sh-search__type { grid-column: 1; color: var(--sh-teal-deep); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sh-search__title { grid-column: 1; font-weight: 600; line-height: 1.35; }
.sh-search__desc { grid-column: 1; margin-top: 2px; color: var(--sh-muted); font-size: .84rem; line-height: 1.45; }
.sh-search__results .bi { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--sh-muted); }
.sh-search__results mark { padding: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.sh-search__hint { margin: 0; padding: 16px 20px; color: var(--sh-muted); font-size: .9rem; }

/* Pesquisa: a caixa nasce da lupa e abre para a esquerda, por cima dos
   links, até ao logo (posição/tamanho medidos em JS: --ss-*). Os resultados
   descem num painel por baixo da caixa. */
.site-header > .sh-search {
    position: absolute; z-index: 6;
    top: var(--ss-top, 0); left: var(--ss-left, 0); width: var(--ss-w, 0);
    pointer-events: none;
}
.site-header > .sh-search .sh-search__box { position: relative; height: 48px; }
/* a caixa cresce em largura (não é recortada): borda e cantos sempre inteiros */
.site-header > .sh-search .sh-search__form {
    position: absolute; top: 0; right: 0;
    width: 48px; height: 48px; padding: 0 6px 0 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sh-line); border-radius: 12px;
    opacity: 0;
    transition: width .45s var(--sh-ease), opacity .15s ease .3s, border-color .2s ease;
}
.site-header > .sh-search .sh-search__form:focus-within { border-color: #b9d6d6; }
.site-header > .sh-search .sh-search__input { height: 100%; font-size: .95rem; }
.site-header > .sh-search.open { pointer-events: auto; }
.site-header > .sh-search.open .sh-search__form {
    width: 100%;
    opacity: 1;
    transition: width .45s var(--sh-ease), opacity .1s ease, border-color .2s ease;
}
/* conteúdo da caixa (lupa, texto, X): aparece depois de a caixa abrir e
   some logo no início do fecho */
.site-header > .sh-search .sh-search__form > * {
    opacity: 0; transform: translateX(8px);
    transition: opacity .12s ease, transform .2s var(--sh-ease);
}
.site-header > .sh-search.open .sh-search__form > * {
    opacity: 1; transform: none;
    transition: opacity .3s ease .28s, transform .4s var(--sh-ease) .28s;
}
/* os links somem enquanto a caixa passa por cima deles */
.site-header .sh-nav__list,
.site-header .sh-search-btn--nav { transition: opacity .2s ease; }
.site-header.search-open .sh-nav__list,
.site-header.search-open .sh-search-btn--nav { opacity: 0; pointer-events: none; }
.site-header.search-open .sh-nav__indicator { opacity: 0; }

/* resultados: painel branco a toda a largura, a descer por baixo da barra
   (como antes); o conteúdo alinha com o site. Só aparece com 2+ letras. */
.site-header > .sh-search .sh-search__drop {
    position: absolute; top: var(--ss-drop-top, 60px); left: calc(-1 * var(--ss-left, 0px));
    width: 100vw; width: 100dvw;
    padding: 8px max(5vw, calc((100vw - var(--iu-max-w, 1160px)) / 2)) 16px;
    background: #f4f6f7; /* cinza claro: distingue o painel de resultados da barra branca */
    border-top: 1px solid var(--sh-line);
    box-shadow: 0 18px 36px rgba(24, 60, 80, .12);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .4s var(--sh-ease), visibility 0s linear .4s;
}
.site-header > .sh-search.open.has-drop .sh-search__drop {
    clip-path: inset(0 0 -40px 0); /* -40px: deixa ver a sombra */
    visibility: visible;
    transition: clip-path .4s var(--sh-ease), visibility 0s;
}
.site-header > .sh-search .sh-search__results { max-height: 60vh; padding: 0; }
.site-header > .sh-search .sh-search__hint { padding: 12px 14px; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) {
    .site-header > .sh-search .sh-search__form,
    .site-header > .sh-search .sh-search__form > * { transition: none; transform: none; }
}

/* Hamburguer: 2 barras que viram X */
.sh-burger {
    display: none; position: relative;
    width: 44px; height: 44px; padding: 0; margin: 0;
    border: 1px solid var(--sh-line); border-radius: 999px;
    background: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .25s ease, border-color .25s ease;
}
.site-header.is-scrolled .sh-burger { border-color: transparent; }
.sh-burger span {
    /* posições em píxeis inteiros (sem translate no estado fechado): em ecrãs
       com DPR fracionário o translate arredondava cada linha de forma diferente.
       Interior do botão = 42px (44 - borda): linhas em 16 e 24 → centro em 21. */
    position: absolute; left: 12px;
    width: 18px; height: 2px; border-radius: 2px;
    background: var(--sh-ink);
    transition: transform .3s var(--sh-ease-io);
}
.sh-burger span:nth-child(1) { top: 16px; }
.sh-burger span:nth-child(2) { top: 24px; }
html.sh-menu-open .sh-burger { background: var(--sh-soft); border-color: transparent; }
html.sh-menu-open .sh-burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
html.sh-menu-open .sh-burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1199.98px) {
    .sh-inner { gap: 18px; }
    .site-header .sh-nav__link { padding: 8px 10px; font-size: .85rem; }
}

/* =====================================================================
   MOBILE
   ===================================================================== */
/* Abaixo de 1280px os 8 links + pesquisa + "Fale connosco" já não cabem
   numa linha: passa logo para o menu hambúrguer */
@media (max-width: 1279.98px) {
    .sh-inner { grid-template-columns: 1fr auto; }
    .sh-center, .site-header .sh-cta { display: none; }
    .sh-burger { display: block; }
    .sh-search-btn--mobile { display: inline-grid; }
    .sh-actions { gap: 8px; }

    /* Menu aberto: o painel branco do menu continua a barra branca */
    html.sh-menu-open .site-header .sh-search-btn--mobile,
    html.sh-menu-open .site-header .sh-burger { border-color: var(--sh-line); }
}
@media (max-width: 991.98px) {
    .sh-logo img { height: 36px; }
    .sh-ticker__inner { height: 32px; }
    /* Banner: no telemóvel passa-se com o dedo; as setas tapavam o texto */
    body.page-salvador .home-hero .carousel-control-prev,
    body.page-salvador .home-hero .carousel-control-next { display: none; }
}

/* =====================================================================
   MENU MOBILE — painel por baixo do header, links em cascata
   ===================================================================== */
.sh-drawer {
    position: fixed; z-index: 1099;
    top: 0; left: 0; right: 0;
    height: 100dvh;
    display: flex; flex-direction: column;
    padding: calc(var(--header-h, 102px) + 8px) 6% calc(24px + env(safe-area-inset-bottom));
    /* branco até ao topo (fica por trás do header) + linha por baixo da barra */
    background: #fff linear-gradient(var(--sh-line), var(--sh-line)) no-repeat 0 var(--header-h, 102px) / 100% 1px;
    overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--sh-ease), visibility 0s linear .3s;
}
html.sh-menu-open .sh-drawer {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s ease, transform .3s var(--sh-ease), visibility 0s;
}
html.sh-menu-open, html.sh-menu-open body { overflow: hidden; }

.sh-drawer__list { margin: 0; padding: 0; list-style: none; }
.sh-drawer__list li {
    opacity: 0; transform: translateY(8px);
    transition: opacity .25s ease, transform .3s var(--sh-ease);
}
html.sh-menu-open .sh-drawer__list li {
    opacity: 1; transform: none;
    transition-delay: calc(30ms + var(--i, 0) * 25ms);
}
body .sh-drawer .sh-drawer__link {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 15px 2px;
    border-bottom: 1px solid var(--sh-line);
    color: var(--sh-ink); font-size: 1.2rem; font-weight: 600; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
body .sh-drawer .sh-drawer__link .bi { color: var(--sh-muted); font-size: 1rem; transition: transform .35s var(--sh-ease), color .2s ease; }
body .sh-drawer .sh-drawer__link:hover, body .sh-drawer .sh-drawer__link:active, body .sh-drawer .sh-drawer__link[aria-current="page"] { color: var(--sh-teal-deep); }
body .sh-drawer .sh-drawer__link:hover .bi, body .sh-drawer .sh-drawer__link[aria-current="page"] .bi { color: var(--sh-teal); transform: translateX(4px); }

/* subpáginas no menu mobile: por baixo do pai, recolhidas à esquerda */
.sh-drawer__sub { margin: 0; padding: 4px 0 10px 14px; list-style: none; border-bottom: 1px solid var(--sh-line); }
body .sh-drawer .sh-drawer__sublink {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 2px;
    color: var(--sh-muted); font-size: 1rem; font-weight: 500; text-decoration: none;
}
body .sh-drawer .sh-drawer__sublink .bi { color: var(--sh-teal); font-size: .95rem; }
body .sh-drawer .sh-drawer__sublink:hover,
body .sh-drawer .sh-drawer__sublink[aria-current="page"] { color: var(--sh-teal-deep); }
/* o pai com subpáginas perde a linha de baixo (passa para o fim da lista) */
.sh-drawer__list li:has(> .sh-drawer__sub) > .sh-drawer__link { border-bottom: 0; }

.sh-drawer__foot { margin-top: auto; padding-top: 24px; opacity: 0; transition: opacity .25s ease; }
html.sh-menu-open .sh-drawer__foot { opacity: 1; transition-delay: .2s; }
body .sh-drawer .sh-drawer__cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; border-radius: 999px;
    background: var(--sh-brand); color: #fff;
    font-weight: 600; text-decoration: none;
}
body .sh-drawer .sh-drawer__cta:hover { color: #fff; background: var(--sh-brand-2); }

@media (min-width: 1280px) {
    .sh-drawer { display: none; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
    .site-header *, .site-header *::before, .site-header *::after,
    .sh-drawer, .sh-drawer * { transition-duration: .01ms !important; animation: none !important; transition-delay: 0s !important; }
    .sh-ticker .avisos-items { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
