/* ==========================================================================
   Portal de Atendimento — Prefeitura de Porto Alegre (Portal 156 IA)
   Folha de estilos principal
   ==========================================================================
   NOTA SOBRE TIPOGRAFIA (Manual de Aplicação da Marca — Janeiro 2025):
   A família tipográfica institucional indicada no manual é "Codec Warm".
   Os arquivos licenciados (.woff2/.ttf) da fonte Codec Warm não estão presentes
   no repositório/assets. A pilha tipográfica abaixo prioriza "Codec Warm" de
   forma centralizada (--font-sans) e utiliza temporariamente "Inter" (já
   integrada ao projeto) como fallback geométrico de alta legibilidade.
   Assim que os arquivos licenciados forem disponibilizados em /assets/fonts/,
   basta descomentar os blocos @font-face abaixo sem alterar componentes.
   ========================================================================== */

/*
@font-face {
  font-family: "Codec Warm";
  src: url("/assets/fonts/CodecWarm-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Codec Warm";
  src: url("/assets/fonts/CodecWarm-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Codec Warm";
  src: url("/assets/fonts/CodecWarm-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  /* Paleta Institucional — Prefeitura de Porto Alegre */
  --color-green-primary: #378432;
  --color-green-bar: #33732E;
  --color-green-btn: #357930;
  --color-green-dark: #256320;
  --color-green-hover: #296625;
  --color-lime-accent: #B9D432;
  --color-surface-soft-green: #F0F6F1;
  --color-surface-white: #FFFFFF;

  /* Textos e Superfícies */
  --color-text-heading: #070A14;
  --color-text-primary: #181C27;
  --color-text-secondary: #656E7A;
  --color-text-muted: #525B67;
  --color-text-brand: #3E4852;

  /* Bordas e Divisores */
  --color-border-header: #DBE4E6;
  --color-border-card: #D9E6E1;
  --color-border-chat-inner: #DCE6E2;
  --color-border-suggestion: #D4DFDC;
  --color-border-input: #CFDAD6;
  --color-divider-footer: #B8C1C7;

  /* Tipografia centralizada */
  --font-sans: "Codec Warm", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-scale: 1;
}

html[data-font-scale="-1"] {
  --font-scale: 0.92;
}
html[data-font-scale="1"] {
  --font-scale: 1.08;
}
html[data-font-scale="2"] {
  --font-scale: 1.16;
}

/* Reset e Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: calc(16px * var(--font-scale));
  line-height: 1.45;
  color: var(--color-text-primary);
  background-color: var(--color-surface-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-surface-white);
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Utilitários de Acessibilidade */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--color-green-dark);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
  top: 8px;
  outline: 3px solid var(--color-lime-accent);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2.5px solid var(--color-green-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   1. FAIXA INSTITUCIONAL SUPERIOR (48px)
   ========================================================================== */
.inst-bar {
  background-color: var(--color-green-bar);
  color: #FFFFFF;
  height: 48px;
  width: 100%;
}

.inst-bar__inner {
  max-width: 1487px;
  height: 100%;
  margin: 0 auto;
  padding: 0 91px 0 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inst-bar__org {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.inst-bar__access {
  position: relative;
}

.inst-bar__access-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 5px 8px;
  margin-right: -8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.inst-bar__access-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.inst-bar__access-btn:focus-visible {
  outline: 2px solid var(--color-lime-accent);
  outline-offset: 2px;
}

.inst-bar__access-icon {
  width: 21px;
  height: 21px;
}

/* Painel de Acessibilidade */
.access-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 200;
  width: 250px;
  background: #FFFFFF;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-card);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(7, 10, 20, 0.12);
}

.access-panel__title {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-heading);
}

.access-panel__group {
  margin-bottom: 8px;
}

.access-panel__group:last-child {
  margin-bottom: 0;
}

.access-panel__group--row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.access-panel__btn {
  width: 100%;
  min-height: 36px;
  background: var(--color-surface-soft-green);
  border: 1px solid var(--color-border-card);
  border-radius: 6px;
  color: var(--color-text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
}

.access-panel__btn:hover {
  border-color: var(--color-green-primary);
  color: var(--color-green-dark);
}

.access-panel__btn[aria-pressed="true"] {
  background: var(--color-green-primary);
  color: #FFFFFF;
  border-color: var(--color-green-primary);
}

.access-panel__btn--link {
  background: #FFFFFF;
  color: var(--color-green-dark);
}

/* ==========================================================================
   2. CABEÇALHO PRINCIPAL (118px)
   ========================================================================== */
.site-header {
  background-color: var(--color-surface-white);
  border-bottom: 1px solid var(--color-border-header);
  height: 118px;
  width: 100%;
}

.site-header__inner {
  max-width: 1487px;
  height: 100%;
  margin: 0 auto;
  padding: 0 55px 0 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-brand__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 4px;
}

.site-brand__logo {
  width: 135px;
  height: 92px;
  object-fit: contain;
}

.site-brand__divider {
  width: 1.5px;
  height: 66px;
  background-color: #DCE3E6;
  margin-left: 30px;
  margin-right: 31px;
  flex-shrink: 0;
}

.site-brand__title {
  font-size: 25px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-text-brand);
}

.site-header__menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border-card);
  border-radius: 7px;
  padding: 8px;
  color: var(--color-text-primary);
  cursor: pointer;
}

.site-header__nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  margin-left: 55px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 42px;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #1F2631;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--color-green-dark);
}

.site-nav__link.is-active {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--color-green-dark);
}

.site-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 4px;
  background-color: var(--color-lime-accent);
  border-radius: 2px;
}

.icon-external {
  width: 16px;
  height: 16px;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

/* Botão Entrar com gov.br */
.btn-govbr {
  width: 222px;
  height: 51px;
  background-color: var(--color-green-btn);
  color: #FFFFFF;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.btn-govbr:hover {
  background-color: var(--color-green-hover);
}

.btn-govbr__icon {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.btn-govbr__text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.btn-govbr__brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ==========================================================================
   3. CONTEÚDO PRINCIPAL E INTRODUÇÃO
   ========================================================================== */
.portal-main {
  width: 100%;
  max-width: 1487px;
  margin: 0 auto;
  padding: 25px 35px 25px 35px;
  flex: 1;
}

.hero-intro {
  padding: 0 21px;
  margin-bottom: 20px;
}

.hero-intro__title {
  margin: 0 0 4px 0;
  font-size: 56.5px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.033em;
  color: var(--color-text-heading);
}

.hero-intro__subtitle {
  margin: 0;
  font-size: 30.5px;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.016em;
  color: var(--color-text-secondary);
}

/* ==========================================================================
   4. GRADE PRINCIPAL (Chat 1015px + Gap 18px + Cards 385px)
   ========================================================================== */
.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 385px;
  gap: 18px;
  align-items: start;
}

/* ==========================================================================
   5. COMPONENTE DE CHAT (630px de altura no desktop)
   ========================================================================== */
.chat-card {
  height: 630px;
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border-card);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-card__header {
  height: 66px;
  min-height: 66px;
  background-color: var(--color-surface-soft-green);
  border-bottom: 1px solid var(--color-border-chat-inner);
  padding: 0 27px 0 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-card__heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.chat-card__icon {
  width: 35px;
  height: 33px;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

.chat-card__title {
  margin: 0;
  font-size: 26.5px;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--color-text-heading);
}

.chat-card__new-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-green-dark);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chat-card__new-btn:hover {
  background-color: rgba(55, 132, 50, 0.08);
}

.chat-card__new-icon {
  width: 27px;
  height: 27px;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

/* Corpo do Chat e Sugestões */
.chat-card__body {
  flex: 1;
  padding: 33px 43px 20px 43px;
  overflow-y: auto;
  background-color: var(--color-surface-white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-suggestions__heading {
  margin: 0 0 18px 0;
  font-size: 23.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-heading);
}

.chat-suggestions__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 15px;
  row-gap: 15px;
}

.suggestion-btn {
  height: 59px;
  width: 100%;
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border-suggestion);
  border-radius: 8px;
  padding: 0 22px;
  text-align: left;
  font-family: inherit;
  font-size: 18.5px;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.suggestion-btn:hover {
  background-color: var(--color-surface-soft-green);
  border-color: var(--color-green-primary);
}

/* Quando há conversa em andamento, mantém sugestões acessíveis de forma enxuta */
.chat-suggestions.is-compact .chat-suggestions__heading {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--color-text-secondary);
}

.chat-suggestions.is-compact .chat-suggestions__grid {
  row-gap: 8px;
  column-gap: 8px;
}

.chat-suggestions.is-compact .suggestion-btn {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

/* Área de Mensagens da Conversa */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.chat-msg {
  display: flex;
  width: 100%;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-msg--bot {
  justify-content: flex-start;
}

.chat-msg__bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1.5;
}

.chat-msg__bubble p {
  margin: 0 0 8px 0;
}

.chat-msg__bubble p:last-child {
  margin-bottom: 0;
}

.chat-msg__bubble--user {
  background-color: var(--color-green-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 3px;
}

.chat-msg__bubble--bot {
  background-color: var(--color-surface-soft-green);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-card);
  border-bottom-left-radius: 3px;
}

.chat-msg__link {
  color: var(--color-green-dark);
  font-weight: 600;
  text-decoration: underline;
}

.chat-msg__bubble--loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text-secondary);
  font-size: 15px;
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-green-primary);
  animation: chatPulse 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Aviso de Erro e Alternativa para Abrir Atendimento em Nova Aba */
.chat-error {
  border: 1px solid #D97706;
  background-color: #FFFBEB;
  border-radius: 8px;
  padding: 14px 16px;
  color: #78350F;
}

.chat-error__text {
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 500;
}

.chat-error__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.chat-error__retry {
  background-color: var(--color-green-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.chat-error__retry:hover {
  background-color: var(--color-green-hover);
}

.chat-error__external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-green-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
}

/* Rodapé Compositor do Chat */
.chat-card__footer {
  height: 101px;
  min-height: 101px;
  border-top: 1px solid var(--color-border-chat-inner);
  padding: 18px 20px;
  background-color: var(--color-surface-white);
  display: flex;
  align-items: center;
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.chat-composer__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 64px;
  border: 1px solid var(--color-border-input);
  border-radius: 7px;
  padding: 0 21px;
  font-family: inherit;
  font-size: 19.5px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  background-color: var(--color-surface-white);
}

.chat-composer__input::placeholder {
  color: #6E7784;
}

.chat-composer__input:focus {
  border-color: var(--color-green-primary);
}

.chat-composer__send {
  width: 68px;
  height: 64px;
  background-color: var(--color-green-btn);
  color: #FFFFFF;
  border: none;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.chat-composer__send:hover:not(:disabled) {
  background-color: var(--color-green-hover);
}

.chat-composer__send:disabled {
  opacity: 0.65;
  cursor: wait;
}

.chat-composer__send-icon {
  width: 30px;
  height: 30px;
}

/* ==========================================================================
   6. CARDS LATERAIS DE APOIO (4 Cards empilhados, largura 385px)
   ========================================================================== */
.support-cards {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 630px;
  gap: 15px;
}

.support-card {
  background-color: var(--color-surface-white);
  border: 1px solid var(--color-border-card);
  border-radius: 9px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px 14px 18px 26px;
}

.support-card--featured {
  height: 148px;
  background-color: var(--color-surface-soft-green);
  border-color: #DCE9E2;
  border-left: 6px solid var(--color-lime-accent);
  padding-left: 22px;
}

.support-card--info {
  height: 133px;
}

.support-card--ouvidoria {
  height: 161px;
}

.support-card--privacidade {
  height: 141px;
}

.support-card__icon-wrap {
  width: 42px;
  height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: var(--color-green-primary);
  flex-shrink: 0;
  margin-top: -1px;
}

.support-card__icon {
  width: 40px;
  height: 42px;
}

.support-card__content {
  flex: 1;
  min-width: 0;
  padding-top: 7px;
}

.support-card__title {
  margin: 0 0 6px 0;
  font-size: 20.5px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--color-text-heading);
}

.support-card__desc {
  margin: 0 0 13px 0;
  font-size: 15.2px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -0.015em;
  color: var(--color-text-secondary);
}

.support-card__desc--multiline {
  margin-bottom: 0;
  font-size: 14.5px;
  line-height: 1.38;
  letter-spacing: -0.016em;
}

.support-card__action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-green-dark);
  text-decoration: none;
}

.support-card__action:hover {
  text-decoration: underline;
}

.icon-arrow-right {
  width: 19px;
  height: 19px;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   7. RODAPÉ INSTITUCIONAL
   ========================================================================== */
.site-footer {
  background-color: var(--color-surface-white);
  border-top: 1px solid var(--color-border-header);
  height: 86px;
  width: 100%;
}

.site-footer__inner {
  max-width: 1487px;
  height: 100%;
  margin: 0 auto;
  padding: 0 80px 0 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer__left {
  display: flex;
  align-items: center;
}

.site-footer__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-footer__logo {
  width: 82px;
  height: 58px;
  object-fit: contain;
}

.site-footer__brand-divider {
  width: 1.5px;
  height: 44px;
  background-color: #DCE3E6;
  margin-left: 21px;
  margin-right: 21px;
  flex-shrink: 0;
}

.site-footer__title {
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text-brand);
  margin-right: 47px;
}

.site-footer__nav {
  display: flex;
  align-items: center;
}

.site-footer__nav-divider {
  width: 1.5px;
  height: 35px;
  background-color: var(--color-divider-footer);
  flex-shrink: 0;
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px 31px;
}

.site-footer__link:hover {
  color: var(--color-green-dark);
  text-decoration: underline;
}

.icon-external-sm {
  width: 15px;
  height: 15px;
  color: var(--color-green-primary);
  flex-shrink: 0;
}

.site-footer__right {
  display: flex;
  align-items: center;
  gap: 44px;
}

.site-footer__env {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.noscript {
  margin: 16px;
  padding: 14px 18px;
  background: #FFFBEB;
  border: 1px solid #D97706;
  border-radius: 8px;
  color: #78350F;
  font-size: 15px;
}

/* ==========================================================================
   8. MODO DE ALTO CONTRASTE E PREFERS-REDUCED-MOTION
   ========================================================================== */
html.high-contrast,
html.high-contrast body {
  background-color: #121212;
  color: #FFFFFF;
}

html.high-contrast .inst-bar {
  background-color: #000000;
  border-bottom: 1px solid #B9D432;
}

html.high-contrast .site-header,
html.high-contrast .chat-card,
html.high-contrast .chat-card__body,
html.high-contrast .chat-card__footer,
html.high-contrast .support-card,
html.high-contrast .site-footer,
html.high-contrast .access-panel {
  background-color: #1A1A1A;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

html.high-contrast .chat-card__header,
html.high-contrast .support-card--featured {
  background-color: #242424;
  border-color: #B9D432;
}

/* Versão alternativa para fundos escuros prevista no Manual da Marca (págs. 8 e 19) */
html.high-contrast .site-brand__logo,
html.high-contrast .site-footer__logo {
  background-color: #FFFFFF;
  padding: 4px 6px;
  border-radius: 6px;
}

html.high-contrast .hero-intro__title,
html.high-contrast .chat-card__title,
html.high-contrast .chat-suggestions__heading,
html.high-contrast .support-card__title,
html.high-contrast .site-brand__title,
html.high-contrast .site-footer__title,
html.high-contrast .site-nav__link {
  color: #FFFFFF;
}

html.high-contrast .hero-intro__subtitle,
html.high-contrast .support-card__desc,
html.high-contrast .site-footer__link,
html.high-contrast .site-footer__env {
  color: #E5E7EB;
}

html.high-contrast .site-nav__link.is-active,
html.high-contrast .chat-card__new-btn,
html.high-contrast .support-card__action {
  color: #B9D432;
}

html.high-contrast .suggestion-btn,
html.high-contrast .chat-composer__input {
  background-color: #121212;
  color: #FFFFFF;
  border-color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   9. RESPONSIVIDADE (Desktop menor, Tablet e Celular)
   ========================================================================== */
@media (max-width: 1360px) {
  .inst-bar__inner,
  .site-header__inner,
  .site-footer__inner {
    padding-left: 35px;
    padding-right: 35px;
  }

  .site-header__nav-wrap {
    margin-left: 28px;
  }

  .site-nav {
    gap: 24px;
  }

  .site-footer__link {
    padding: 4px 18px;
  }
}

@media (max-width: 1120px) {
  .site-header {
    height: auto;
    min-height: 92px;
    padding: 12px 0;
  }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 14px;
  }

  .site-header__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__nav-wrap {
    display: none;
    width: 100%;
    margin-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-header);
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .site-header__nav-wrap.is-open {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-nav__link.is-active::after {
    bottom: -4px;
  }

  .btn-govbr {
    width: 100%;
    max-width: 280px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .chat-card {
    height: 580px;
  }

  .support-cards {
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .support-card,
  .support-card--featured,
  .support-card--info,
  .support-card--ouvidoria,
  .support-card--privacidade {
    height: auto;
    min-height: 140px;
  }

  .site-footer {
    height: auto;
    padding: 20px 0;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .site-footer__left {
    flex-wrap: wrap;
    gap: 14px;
  }

  .site-footer__right .site-footer__nav-divider {
    display: none;
  }
}

@media (max-width: 720px) {
  .inst-bar__inner,
  .site-header__inner,
  .portal-main,
  .site-footer__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-brand__logo {
    width: 105px;
    height: 72px;
  }

  .site-brand__divider {
    height: 48px;
    margin-left: 16px;
    margin-right: 16px;
  }

  .site-brand__title {
    font-size: 19px;
  }

  .hero-intro {
    padding: 0;
  }

  .hero-intro__title {
    font-size: clamp(24px, 6.2vw, 32px);
  }

  .hero-intro__subtitle {
    font-size: clamp(16px, 4.2vw, 19px);
  }

  .support-card__title {
    font-size: 19px;
  }

  .support-card {
    padding: 16px 14px 16px 20px;
    gap: 14px;
  }

  .chat-card {
    height: 72vh;
    min-height: 460px;
    max-height: 640px;
  }

  .chat-card__header {
    padding: 0 16px;
    height: 58px;
    min-height: 58px;
  }

  .chat-card__title {
    font-size: 20px;
  }

  .chat-card__new-btn {
    font-size: 14px;
    gap: 6px;
  }

  .chat-card__body {
    padding: 20px 16px;
  }

  .chat-suggestions__heading {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .chat-suggestions__grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .suggestion-btn {
    height: auto;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 15.5px;
  }

  .chat-card__footer {
    height: auto;
    min-height: 76px;
    padding: 12px 14px;
  }

  .chat-composer__input {
    height: 50px;
    font-size: 16px;
    padding: 0 14px;
  }

  .chat-composer__send {
    width: 52px;
    height: 50px;
  }

  .support-cards {
    grid-template-columns: 1fr;
  }

  .site-footer__nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-footer__nav-divider {
    display: none;
  }

  .site-footer__link {
    padding: 4px 12px 4px 0;
  }
}
