/* =========================================================
   portal.css — Portal de Informações da Prefeitura de Fraiburgo
   Design moderno, responsivo, acessível, sem gradientes.
   ========================================================= */

/* ===================== TOKENS ===================== */
:root {
    /* Cores de marca */
    --brand-primary: #005b8f;
    --brand-primary-strong: #004a75;
    --brand-secondary: #008a4b;
    --brand-secondary-strong: #006b3a;
    --brand-accent: #c21c22;

    /* Superfícies */
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --surface-3: #e4e8ee;

    /* Bordas */
    --border: #e2e6ec;
    --border-strong: #cfd5de;

    /* Texto */
    --text: #1c222e;
    --text-muted: #556070;
    --text-subtle: #7d8798;

    /* Interativo */
    --primary: var(--brand-primary);
    --primary-hover: var(--brand-primary-strong);
    --primary-soft: rgba(0, 91, 143, 0.08);
    --primary-contrast: #ffffff;

    --star: #f5b400;

    /* Feedback / foco */
    --focus-ring: 0 0 0 3px rgba(0, 91, 143, 0.35);
    --focus-ring-inverse: 0 0 0 3px rgba(255, 255, 255, 0.7);

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 2px 6px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 8px 22px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 24px 48px rgba(16, 24, 40, 0.14);

    /* Raios */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-pill: 999px;

    /* Tipografia fluida */
    --fs-xs: clamp(0.72rem, 0.75rem + 0.15vw, 0.8rem);
    --fs-sm: clamp(0.82rem, 0.82rem + 0.2vw, 0.92rem);
    --fs-md: clamp(0.92rem, 0.9rem + 0.25vw, 1rem);
    --fs-lg: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);
    --fs-xl: clamp(1.25rem, 1.1rem + 1vw, 1.7rem);
    --fs-2xl: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);

    /* Espaçamento fluido */
    --sp-1: clamp(0.25rem, 0.4vw, 0.4rem);
    --sp-2: clamp(0.5rem, 0.8vw, 0.75rem);
    --sp-3: clamp(0.75rem, 1.2vw, 1.1rem);
    --sp-4: clamp(1rem, 1.8vw, 1.5rem);
    --sp-5: clamp(1.5rem, 2.6vw, 2.25rem);
    --sp-6: clamp(2rem, 3.5vw, 3rem);

    --container-pad: clamp(1rem, 2.5vw, 2rem);
    --header-logo-h: clamp(2rem, 5vw, 4rem);

    /* Toque (acessibilidade) */
    --touch-min: 2.75rem;
}

[data-theme="dark"] {
    --bg: #0f1319;
    --surface: #171c24;
    --surface-2: #1d232c;
    --surface-3: #262d38;
    --border: #2a313c;
    --border-strong: #3a4250;

    --text: #e7ecf3;
    --text-muted: #aab4c3;
    --text-subtle: #7d8798;

    --primary: #5cb3ff;
    --primary-hover: #82c5ff;
    --primary-soft: rgba(92, 179, 255, 0.12);
    --primary-contrast: #0b1118;

    --brand-secondary: #4caf76;
    --brand-secondary-strong: #3f9463;
    --brand-accent: #ff6b70;

    --star: #ffd54f;
    --focus-ring: 0 0 0 3px rgba(92, 179, 255, 0.45);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 26px 50px rgba(0, 0, 0, 0.6);
}

/* ===================== RESET / BASE ===================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    /* Layout flex para fixar o footer no rodapé */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;

    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove o padding inferior exagerado — footer flex cuida disso */
img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--primary-hover);
}

button {
    font: inherit;
    touch-action: manipulation;
}

/* Foco visível universal */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--r-sm);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.container {
    width: 100%;
    max-width: min(1320px, 94vw);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Ajustes Bootstrap mínimos */
.text-muted {
    color: var(--text-muted) !important;
}

.small {
    font-size: var(--fs-sm);
}

.row {
    --bs-gutter-x: var(--sp-4);
    --bs-gutter-y: var(--sp-4);
}

.py-5 {
    padding-block: var(--sp-5) !important;
}

.mt-2 {
    margin-top: var(--sp-2) !important;
}

.mt-4 {
    margin-top: var(--sp-4) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-4 {
    margin-bottom: var(--sp-4) !important;
}

/* ===================== TOPBAR ===================== */
.topbar {
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
    padding-block: clamp(0.25rem, 0.1vh, 0.2rem);
    color: var(--text-muted);
    flex-shrink: 0;
}

.topbar-tag {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-subtle);
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: var(--r-pill);
    transition: background-color 0.2s, color 0.2s;
}

.topbar-link:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
}

/* ===================== HEADER ===================== */
.site-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-block: clamp(0.6rem, 1.4vh, 1rem);
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: saturate(150%) blur(6px);
    flex-shrink: 0;
}

.site-header .container {
    flex-wrap: nowrap !important;
    gap: var(--sp-3) !important;
    align-items: center !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 1rem);
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: var(--header-logo-h);
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.logo-prefix {
    font-size: clamp(0.55rem, 1vw, 0.9rem);
    letter-spacing: 0.23em;
    font-weight: 600;
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-name {
    font-size: clamp(1rem, 2vw, 1.8rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Acessibilidade do header */
.header-accessibility {
    display: flex;
    align-items: center;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    flex-shrink: 0;
    white-space: nowrap;
}

.acc-btn {
    width: clamp(2.25rem, 3.1vw, 2.6rem);
    height: clamp(2.25rem, 3.1vw, 2.6rem);
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.acc-btn:hover {
    color: #FFBF47;
    transform: translateY(1px);
}

.acc-btn:active {
    transform: translateY(0);
}

.acc-divider {
    width: 1px;
    height: clamp(1rem, 2vw, 1.5rem);
    background-color: var(--border-strong);
    margin-inline: clamp(0.1rem, 0.3vw, 0.25rem);
}

.font-btn .letter-a {
    font-weight: 700;
    line-height: 1;
}

.font-btn .sign {
    font-weight: 700;
    line-height: 1;
}


.theme-btn svg {
    width: 55%;
    height: 55%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="light"] .theme-btn .icon-sun {
    display: none;
}

[data-theme="light"] .theme-btn .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-btn .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-btn .icon-moon {
    display: none;
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    background-color: #10202c;
    background-image: url('https://turismo.fraiburgo.sc.gov.br/uploads/2022/11/0623807001521739324.jpg');
    background-size: cover;
    background-position: center;
    min-height: clamp(17rem, 38vh, 24rem);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-block: clamp(2.5rem, 6vh, 4rem);
    isolation: isolate;
    flex-shrink: 0;
    z-index: 20;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(8, 18, 28, 0.62);
    z-index: -1;
}

.hero-content {
    width: min(100%, 820px);
    padding-inline: var(--container-pad);
}

.hero h1 {
    font-size: var(--fs-2xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 var(--sp-2);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero p {
    font-size: var(--fs-md);
    margin: 0 0 var(--sp-4);
    opacity: 0.92;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.search-hero  {
    position: relative;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    z-index: 1;
}

.sine-search-bar {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 0.4rem;
    gap: 0.25rem;
}

.sine-search-bar:focus-within {
    box-shadow: var(--shadow-lg), var(--focus-ring);
}

.sine-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    min-width: 0;
}

.sine-search-field i {
    color: var(--text-subtle);
    font-size: 1rem;
    flex-shrink: 0;
}

.sine-search-field input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: var(--text);
    width: 100%;
    padding: 0.4rem 0;
    font-family: inherit;
}

.sine-search-field input::placeholder {
    color: var(--text-subtle);
}

.sine-search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 1.75rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.sine-search-btn:hover {
    background: var(--primary-hover);
}

.sine-search-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.sine-search-btn i {
    display: none;
}

/* O dropdown de resultados já existe em .search-results — só reforçamos o z-index */
.search-hero .search-results {
    z-index: 200;
}

/* Quando o dropdown está aberto, promove o hero temporariamente */
.hero:has(.search-results.active),
.search-hero:has(.search-results.active) {
    z-index: 9001;
}

/* ---------- Responsivo ---------- */
@media (max-width: 992px) {
    .search-hero {
        padding: 3rem 1rem 4rem;
    }

    .sine-search-bar {
        flex-direction: column;
        border-radius: var(--r-lg);
        padding: 0.5rem;
        gap: 0;
    }

    .sine-search-field {
        padding: 0.75rem 1rem;
    }

    .sine-search-btn {
        width: 100%;
        padding: 0.9rem 1.5rem;
        justify-content: center;
        margin-top: 0.25rem;
        border-radius: var(--r-md);
    }

    .sine-search-btn i {
        display: inline;
    }
}

@media (max-width: 576px) {
    .search-hero h1 {
        font-size: 1.6rem;
    }

    .search-hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}


/* Busca */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 36rem; /* Deixei um pouco mais estreito */
    margin-inline: auto;
}

.hero-search {
    display: flex;
    align-items: stretch;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.2s ease;
}

.hero-search:focus-within {
    box-shadow: var(--shadow-lg), var(--focus-ring);
}

.hero-search input {
    border: none;
    padding: clamp(0.85rem, 1.6vh, 1.05rem) clamp(1rem, 2vw, 1.4rem);
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    color: var(--text);
    font-size: var(--fs-md);
    outline: none;
}

.hero-search input::placeholder {
    color: var(--text-subtle);
}

.hero-search button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: var(--primary-contrast);
    border: none;
    padding-inline: clamp(1rem, 2vw, 1.75rem);
    font-weight: 600;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    min-height: var(--touch-min);
}

.hero-search button:hover {
    background-color: var(--primary-hover);
}

.hero-search button svg {
    width: 1.05em;
    height: 1.05em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Resultados de busca */
.search-results {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    max-height: min(20rem, 55vh);
    overflow-y: auto;
    z-index: 200;
    display: none;
    text-align: left;
    color: var(--text);
    padding: 0; /* Remove padding extra */
}

.search-results.active {
    display: block;
    animation: searchFadeIn 0.12s ease-out;
}

@keyframes searchFadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hint do topo minimalista */
/* Hint do topo minimalista */
.search-results-hint {
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    background-color: var(--surface-2);
    border-bottom: 1px solid var(--border);
    
    /* Novas regras para alinhar as dicas */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Estilo para as teclas de atalho */
.search-hint-keys {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    color: var(--text-muted);
}

.search-hint-keys kbd {
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0 0.35rem;
    font-family: inherit;
    font-size: 0.6rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    line-height: 1;
}

/* Esconde as dicas de teclado em telas de celular/tablet */
@media (max-width: 768px) {
    .search-hint-keys {
        display: none;
    }
}
/* ---------- Item ---------- */
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem; /* Muito mais fino */
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.1s ease;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    font: inherit;
    line-height: 1.2;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus-visible {
    background-color: var(--surface-2);
    outline: none;
}

/* Estado ativo mais limpo */
.search-result-item.active {
    background-color: var(--primary-soft);
}
.search-result-item.active .search-result-title {
    color: var(--primary);
    font-weight: 600;
}

.search-result-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
    background-color: var(--surface-2);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .9rem;
    border: 1px solid var(--border);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.search-result-item:hover .search-result-icon {
    background-color: var(--primary-soft);
    color: var(--primary);
    border-color: transparent;
}

.search-result-body {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.search-result-title {
    margin: 0;
    font-weight: 500;
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    max-width: 65%; /* Garante que o subtítulo apareça */
}

.search-result-subtitle {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

/* Tipo (CEP, Ramal, etc.) */
.search-result-type {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    flex-shrink: 0;
    opacity: 0.7;
}

/* Estados vazios / carregando */
.search-results-empty,
.search-results-loading {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.search-results-empty strong {
    color: var(--text);
    font-weight: 600;
}

.search-results-loading .spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid var(--border-strong);
    border-top-color: var(--text-muted);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 0.5rem;
    vertical-align: -0.15em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo: em telas muito pequenas, volta a empilhar para não espremer */
@media (max-width: 480px) {
    .search-result-body {
        flex-direction: column;
        gap: 0.1rem;
    }
    .search-result-title {
        max-width: 100%;
    }
}

/* ===================== SEÇÃO + ABAS ===================== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-bottom: var(--sp-4);
    padding-bottom: 0.5rem;
}

.section-title {
    position: relative;
    margin: 0;
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--text);
    line-height: 1.15;
    flex-shrink: 0;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: clamp(2.5rem, 5vw, 4rem);
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

/* Container das abas: pílula cinza */
.custom-tabs {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    min-width: 0;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
}

/* Indicador deslizante */
.custom-tabs .tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: 0;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow:
        0 3px 8px rgba(16, 24, 40, 0.10),
        0 1px 2px rgba(16, 24, 40, 0.06);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

/* Botão individual */
.custom-tabs .nav-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.15rem;
    min-height: 2.25rem;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: var(--fs-sm);
    cursor: pointer;
    white-space: nowrap;
    border-radius: 8px;
    transition: color 0.2s ease;
    line-height: 1;
}

.custom-tabs .nav-link:hover {
    color: var(--primary);
}

.custom-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 700;
}

.custom-tabs .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.tab-content {
    padding-top: var(--sp-3);
}

/* ===================== GRID DE SERVIÇOS ===================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
    gap: var(--sp-4);
    justify-content: left;
    align-items: stretch;
}

.service-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ===================== CARDS ===================== */
.service-card {
    /* Tokens locais inspirados na referência Uiverse */
    --round-card: 26px;
    --sz-action: 44px;
    --gap-action: 6px;

    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.35rem;
    padding-top: 1.5rem;
    background-color: var(--surface);
    border-radius: var(--round-card);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.service-card:hover,
.service-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
    color: inherit;
}

.service-card[aria-expanded="true"] {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* ---------- CANTO (favorito + recortes suaves) ---------- */
.corner {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--gap-action);
    padding: var(--gap-action);
    padding-left: calc(var(--gap-action) * 2);
    padding-bottom: calc(var(--gap-action) * 2);
    background-color: var(--bg);
    border-bottom-left-radius: var(--round-card);
    z-index: 3;
}

.corner i[data-corner] {
    position: absolute;
    width: var(--round-card);
    height: var(--round-card);
    z-index: 2;
    background-color: var(--bg);
    pointer-events: none;
}

.corner i[data-corner]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top-right-radius: var(--round-card);
    background-color: var(--surface);
    z-index: -1;
}

.corner i[data-corner="tl"] {
    top: 0;
    right: 100%;
}

.corner i[data-corner="br"] {
    right: 0;
    top: 100%;
}

/* Botão de favorito dentro do canto */
.btn-favorite {
    position: relative;
    z-index: 4;
    width: var(--sz-action);
    height: var(--sz-action);
    padding: 0;
    border: none;
    background-color: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 0 0 1px var(--border),
        0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-favorite svg {
    width: 55%;
    height: 55%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill .2s ease, stroke .2s ease;
}

.btn-favorite:hover {
    color: var(--star);
    transform: scale(1.06);
}

.btn-favorite.is-favorited {
    color: var(--star);
}

.btn-favorite.is-favorited svg {
    fill: var(--star);
}

/* ---------- CORPO ---------- */
.service-card-body {
    flex: 1 1 auto;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.service-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    padding: 0;
    /* Reserva espaço pro canto */
    padding-right: calc(var(--sz-action) + var(--gap-action) * 2);
    min-height: 1.4rem;
}

.service-card-category i {
    font-size: 1em;
    flex-shrink: 0;
}

.service-card-body h3 {
    margin: 0.35rem 0 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    word-break: break-word;
}

.service-card-body>p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

/* ---------- EXPANSÍVEL ---------- */
.service-card-expand {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0;
}

.service-card-expand-inner {
    overflow: hidden;
    min-height: 0;
}

.service-card[aria-expanded="true"] .service-card-expand {
    grid-template-rows: 1fr;
    margin-top: var(--sp-3);
}


.service-card-expand .list-group-item {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--text);
    transition: background-color .15s ease;
    word-break: break-word;
    line-height: 1.45;
    background-color: transparent;
}


.service-card-expand .list-group {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r-md);
    transition: background-color .15s ease;
    word-break: break-word;
    line-height: 1.45;
    background-color: transparent;
}

.service-card-expand .list-group-item:last-child {
    border-bottom: none;
}

.service-card-expand .list-group-item:hover {
    background-color: var(--primary-soft);
}

.service-card-expand .list-group-item a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.service-card-expand .list-group-item a:hover {
    color: var(--primary);
}

/* ---------- RODAPÉ (pílula) ---------- */
.service-card-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-top: var(--sp-3);
    padding: 0.7rem 1.35rem;
    min-height: 2.75rem;
    background-color: var(--primary);
    color: var(--primary-contrast);
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: 9999px;
    transition: background-color .2s ease, gap .2s ease;
}

.service-card:hover .service-card-footer {
    background-color: var(--primary-hover);
    gap: 0.7rem;
}

.service-card-footer .footer-arrow {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .3s ease;
}

.service-card:hover .service-card-footer .footer-arrow {
    transform: translateX(4px);
}

.service-card[aria-expanded="true"] .service-card-footer {
    background-color: var(--primary-hover);
}

.service-card[aria-expanded="true"] .footer-arrow {
    transform: rotate(90deg);
}

.service-card[aria-expanded="true"]:hover .footer-arrow {
    transform: rotate(90deg) translateY(0);
}

/* ===================== FAVORITOS VAZIO ===================== */
.empty-favorites {
    grid-column: 1 / -1;
    text-align: center;
    padding: clamp(2.5rem, 6vh, 4rem) clamp(1rem, 2vw, 1.5rem);
    background-color: var(--surface);
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-xl);
}

.empty-favorites .empty-icon {
    width: clamp(3rem, 5vw, 4rem);
    height: clamp(3rem, 5vw, 4rem);
    margin: 0 auto var(--sp-3);
    stroke: var(--star);
    stroke-width: 1.4;
    fill: none;
    opacity: 0.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-favorites h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-weight: 700;
    font-size: var(--fs-lg);
}

.empty-favorites p {
    margin: 0 auto;
    max-width: 34rem;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

.empty-favorites .inline-star {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: var(--star);
    stroke: var(--star);
    stroke-width: 1;
}

/* ===================== FAVORITOS: itens avulsos ===================== */
.fav-section-title {
    grid-column: 1 / -1;
    margin: 0.25rem 0 0;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

.fav-list {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    background-color: var(--surface);
}

.fav-list .fav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
}

.fav-list .fav-item:last-child {
    border-bottom: none;
}

.fav-list .fav-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}

.fav-list .fav-item a:hover {
    color: var(--primary);
}

.fav-list .remove-fav {
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--r-sm);
    width: 2.25rem;
    height: 2.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.fav-list .remove-fav:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

[data-theme="dark"] .fav-list .remove-fav:hover {
    background-color: rgba(220, 38, 38, 0.15);
    border-color: #7f1d1d;
    color: #fca5a5;
}

/* ===================== CONTEÚDO EXPANSÍVEL (fora do card) ===================== */
.collapse-content {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-4);
    margin-bottom: var(--sp-3);
    box-shadow: var(--shadow-xs);
}

.collapse-content h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 var(--sp-3);
    color: var(--primary);
    font-weight: 700;
    font-size: var(--fs-lg);
    letter-spacing: -0.01em;
}

.collapse-content h5 svg {
    width: 1.1em;
    height: 1.1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.collapse-content .list-group {
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.collapse-content .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-2);
    padding: clamp(0.6rem, 1.2vh, 0.85rem) clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--text);
    font-size: var(--fs-sm);
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s ease;
}

.collapse-content .list-group-item:last-child {
    border-bottom: none;
}

.collapse-content .list-group-item:hover {
    background-color: var(--surface-2);
}

.collapse-content .list-group-item a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    word-break: break-word;
}

.collapse-content .list-group-item a:hover {
    color: var(--primary);
}

/* ===================== DESTAQUES ===================== */
.info-highlights {
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding-block: var(--sp-5);
    margin-top: var(--sp-5);
    flex-shrink: 0;
}

/* Grid: aviso à esquerda (maior) + farmácia à direita (menor) */
.info-highlights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: var(--sp-4);
    align-items: stretch;
}

/* ================ CARD AVISO (horizontal) ================ */
.notice-card {
    display: flex;
    flex-direction: row;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    min-width: 0;
    min-height: 13rem;
    transition: box-shadow .2s ease;
}

.notice-card:hover {
    box-shadow: var(--shadow-md);
}

.notice-card-side {
    flex: 0 0 clamp(13rem, 42%, 19rem);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-4);
    color: #fff;
    background-color: var(--brand-accent);
    min-width: 0;
}

.notice-card-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.notice-card-header svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.notice-card-header p {
    margin: 0;
}

.notice-card-side h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #fff;
}

.notice-card-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    transition: color .18s ease, gap .18s ease;
    padding-top: var(--sp-3);
}

.notice-card-link:hover {
    color: #fff;
    gap: 0.6rem;
}

.notice-card-link i {
    font-size: 0.7em;
}

.notice-card-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-4);
    background-color: var(--surface);
    color: var(--text);
    min-width: 0;
}

.notice-card-main>p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    line-height: 1.6;
    flex: 1 1 auto;
}

.notice-card-btn {
    margin-top: auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    min-height: 2.5rem;
    background-color: var(--brand-accent);
    color: var(--primary-contrast);
    border: 1px solid var(--brand-accent);
    border-radius: 9999px;
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.notice-card-btn:hover,
.notice-card-btn:focus-visible {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--primary-contrast);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.notice-card-btn svg {
    width: 0.9em;
    height: 0.9em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ================ CARD FARMÁCIA (vertical, estilo referência) ================ */
.pharmacy-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.5rem 1.75rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
    min-width: 0;
}


[data-theme="dark"] .pharmacy-card {
    background-color: var(--surface-2);
}

[data-theme="dark"] .pharmacy-card:hover {
    background-color: var(--surface-3);
}

/* Ícone grande no topo */
.pharmacy-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    color: var(--brand-secondary);
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}

.pharmacy-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* Badge pequeno (opcional, herdado) */
.pharmacy-label {
    margin: 0;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-secondary);
    line-height: 1.3;
}

/* Título */
.pharmacy-title {
    margin: 0.15rem 0 0;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Descrição */
.pharmacy-desc {
    margin: 0.3rem 0 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    line-height: 1.55;
    text-align: justify;
    flex: 1 1 auto;
    min-height: 3em;
}

/* Botão */
.pharmacy-btn {
    margin-top: auto;
    padding-top: 1rem;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.25rem;
    min-height: 2.5rem;
    background-color: var(--brand-secondary);
    color: #fff;
    border: 1px solid var(--brand-secondary);
    border-radius: 9999px;
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease,
        transform .2s ease, box-shadow .2s ease, gap .2s ease;
}

.pharmacy-btn:hover,
.pharmacy-btn:focus-visible {
    background-color: var(--brand-primary-strong);
    border-color: var(--brand-primary-strong);
    color: #fff;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
}

.pharmacy-btn svg {
    width: 0.9em;
    height: 0.9em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: transform .2s ease;
}

.pharmacy-btn:hover svg {
    transform: translateX(3px);
}

/* ================ RESPONSIVO ================ */
@media (max-width: 900px) {

    /* Empilha aviso em cima, farmácia embaixo */
    .info-highlights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .notice-card {
        flex-direction: column;
        min-height: auto;
    }

    .notice-card-side {
        flex: 0 0 auto;
        padding: var(--sp-3) var(--sp-4);
    }

    .notice-card-side h2 {
        font-size: var(--fs-lg);
    }

    .notice-card-link {
        padding-top: 0.5rem;
        margin-top: 0;
    }

    .notice-card-btn {
        align-self: stretch;
        width: 100%;
        justify-content: center;
        margin-top: var(--sp-3);
    }

    .pharmacy-card {
        padding: 1.25rem 1.35rem;
    }

    .pharmacy-btn {
        align-self: stretch;
        width: 100%;
        justify-content: center;
    }
}

/* ===================== BOTÃO DE AJUDA ===================== */
.help-btn {
    position: fixed;
    bottom: clamp(1rem, 4vh, 2rem);
    right: clamp(0.75rem, 1.5vw, 1.5rem);
    width: clamp(2.75rem, 4vw, 3.5rem);
    height: clamp(2.75rem, 4vw, 3.5rem);
    border-radius: 50%;
    background-color: var(--brand-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 1050;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.help-btn svg {
    width: 55%;
    height: 55%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.help-btn:hover {
    transform: scale(1.08) rotate(8deg);
    background-color: var(--primary);
    color: var(--primary-contrast);
}

/* ===================== MODAL ===================== */
.modal-content {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: var(--sp-3) var(--sp-4);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text);
}

.modal-title svg {
    width: 1.15em;
    height: 1.15em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-body {
    padding: var(--sp-4);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: var(--sp-3) var(--sp-4);
}

.form-label {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--text);
    margin-bottom: 0.4rem;
}

.form-select {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 0.6rem 0.9rem;
    font-size: var(--fs-sm);
    min-height: var(--touch-min);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    outline: none;
}

.alert {
    border-radius: var(--r-md);
    padding: 0.85rem 1rem;
    font-size: var(--fs-sm);
    border: 1px solid var(--border);
}

.alert-info {
    background-color: var(--primary-soft);
    border-color: var(--primary);
    color: var(--text);
}

.alert-light {
    background-color: var(--surface-2);
    color: var(--text);
}

.btn-secondary {
    background-color: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    min-height: var(--touch-min);
    transition: background-color 0.18s, border-color 0.18s;
}

.btn-secondary:hover {
    background-color: var(--surface-3);
    border-color: var(--border-strong);
    color: var(--text);
}

/* ===================== FOOTER ===================== */
.site-footer {
    background-color: #0f1319;
    color: rgba(255, 255, 255, 0.72);
    padding: var(--sp-2) 0 var(--sp-1);
    font-size: var(--fs-sm);
    flex-shrink: 0;
}

[data-theme="dark"] .site-footer {
    background-color: #05080c;
}

/* Container interno */
.site-footer-inner {
    width: 100%;
    max-width: min(1320px, 94vw);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ---------- TOPO: brand + info ---------- */
.site-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
}

/* Brand: brasão + nome */
.site-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    transition: opacity .18s ease;
}

.site-footer-brand:hover {
    color: #fff;
    opacity: 0.85;
}

.site-footer-brand img {
    height: 3.5rem;
    width: auto;
    flex-shrink: 0;
}

.site-footer-brand span {
    line-height: 1;
}

/* Lista de informações à direita */
.site-footer-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--fs-sm);
    font-weight: 500;
}

.site-footer-info li {
    display: block;                    /* deixa o texto fluir naturalmente */
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    max-width: 100%;
    word-break: break-word;
}

.site-footer-info li i {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95em;
    margin-right: 0.35em;
    vertical-align: -0.1em;
}

.site-footer-info a {
    color: inherit;
    text-decoration: none;
    transition: color .18s ease;
}

.site-footer-info a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---------- DIVISÓRIA ---------- */
.site-footer-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.308);
}

/* ---------- COPYRIGHT centralizado ---------- */
.site-footer-copy {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--fs-sm);
    line-height: 1.5;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 767px) {
    .site-footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-3);
    }

    .site-footer-brand {
        font-size: 1.25rem;
    }

    .site-footer-brand img {
        height: 1.85rem;
    }

    .site-footer-info {
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }

    .site-footer-divider {
        margin: var(--sp-3) 0;
    }
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 992px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-2);
        border-bottom: none;
        margin-bottom: var(--sp-3);
    }

    .section-title {
        padding-bottom: 0;
        font-size: clamp(1.2rem, 5vw, 1.55rem);
    }

    .section-title::after {
        display: none;
    }

    /* ABAS: quebram linha em vez de rolar — nada é cortado */
    .custom-tabs {
        display: flex;
        background-color: transparent;
        border: none;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        padding: 0;
        gap: 0;
        box-shadow: none;
        margin: 0;
        width: 100%;
    }

    .custom-tabs .tab-indicator {
        display: none;
    }

    .custom-tabs .nav-link {
        flex: 0 0 auto;
        padding: 0.7rem clamp(0.5rem, 2.5vw, 0.9rem);
        min-height: 2.75rem;
        border-radius: 0;
        font-size: clamp(0.8rem, 3.2vw, 0.95rem);
        font-weight: 500;
        color: var(--text-muted);
        position: relative;
    }

    .custom-tabs .nav-link.active {
        color: var(--primary);
        font-weight: 700;
    }

    .custom-tabs .nav-link.active::after {
        content: '';
        position: absolute;
        left: clamp(0.5rem, 2.5vw, 0.9rem);
        right: clamp(0.5rem, 2.5vw, 0.9rem);
        bottom: -1px;
        height: 2px;
        background-color: var(--primary);
        border-radius: 2px;
    }

    .info-highlights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .service-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--sp-3);
    }
}

@media (max-width: 576px) {
    .hero {
        padding-block: clamp(2rem, 5vh, 3rem);
    }

    .hero-search {
        flex-direction: column;
        border-radius: var(--r-lg);
    }

    .hero-search input {
        text-align: left;
    }

    .hero-search button {
        justify-content: center;
        padding-block: 0.85rem;
        border-radius: 0;
    }

    .notice-card-btn,
    .pharmacy-btn {
        width: 100%;
        align-self: stretch;
        justify-content: center;
    }

    .site-header {
        position: static;
    }

    /* Rodapé do card vira largura total no mobile, mais confortável para toque */
    .service-card-footer {
        width: 100%;
        align-self: stretch;
    }

    .btn-favorite {
        width: 2.75rem;
        height: 2.75rem;
    }

    .service-card-footer {
        width: 100%;
        align-self: stretch;
    }
}

@media (max-width: 480px) {
    .service-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .site-header {
        padding-block: 0.55rem;
    }

    .logo {
        gap: 0.4rem;
    }

    .logo-prefix {
        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }

    .logo-name {
        font-size: 1rem;
    }

    .header-accessibility {
        padding: 0.2rem;
        gap: 0.1rem;
    }

    /* Mantém alvo de toque mínimo mesmo em telas muito pequenas */
    .acc-btn {
        width: 2.25rem;
        height: 2.25rem;
    }

    .font-btn .letter-a {
        font-size: 0.72rem;
    }

    .font-btn .sign {
        font-size: 0.55rem;
    }

    .acc-divider {
        height: 0.85rem;
        margin-inline: 0.1rem;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: min(1320px, 88vw);
    }
}

/* ===================== IMPRESSÃO ===================== */
@media print {

    .help-btn,
    .header-accessibility,
    .topbar,
    .search-wrapper,
    .custom-tabs,
    .btn-favorite {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        min-height: auto;
        display: block;
    }

    .site-header,
    .service-card,
    .collapse-content {
        box-shadow: none;
        border-color: #ccc;
    }

    .site-footer {
        margin-top: 0;
    }
}

.search-shortcut-hint {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-subtle);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-shortcut-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35em;
    height: 1.35em;
    padding: 0 0.35em;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    line-height: 1;
}

@media (max-width: 640px) {
    .search-shortcut-hint { display: none; }
}

/* =========================================================
   CONTEÚDO DO MODAL DE AJUDA (help-body)
   ========================================================= */
.help-body {
    font-size: var(--fs-sm, 0.9rem);
    line-height: 1.6;
    color: var(--text);
}

.help-body p {
    margin: 0 0 0.85rem;
}

.help-body p:last-child {
    margin-bottom: 0;
}

.help-body strong {
    color: var(--primary);
    font-weight: 700;
}

.help-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-body ul:last-child {
    margin-bottom: 0;
}

.help-body ul li {
    position: relative;
    padding-left: 1.4rem;
    line-height: 1.55;
}

.help-body ul li::before {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.75;
}

/* ---------- Lista de atalhos (definição) ---------- */
.help-keys {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
}

.help-keys > div {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.help-keys dt {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-weight: 400;
}

.help-keys dd {
    margin: 0;
    color: var(--text);
    font-size: var(--fs-sm, 0.9rem);
    line-height: 1.4;
}

/* ---------- Teclas ---------- */
.help-body kbd,
.help-keys kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    padding: 0 0.45em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06);
}

/* Em telas pequenas, o grid de atalhos empilha */
@media (max-width: 480px) {
    .help-keys > div {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}