/* Reset basico para manter calculo de largura/altura consistente. */
* {
  box-sizing: border-box;
}

/* Variaveis globais de cor para padronizar a identidade visual. */
:root {
  --primary-navy: #0e2c59;
  --secondary-green: #4a8a34;
  --accent-gold: #c4a66b;
  --deep-blue: #0b2246;
  --text-main: #1f2a37;
  --text-soft: #4d5b6b;
  --line: #d8dfe6;
  --bg-page: #f4f7fb;
  --white: #ffffff;
  --space-xs: 0.35rem;
  --space-sm: 0.55rem;
  --space-md: 0.85rem;
  --space-lg: 1.15rem;
  --space-xl: 1.6rem;
  --header-offset: 78px;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 43, 92, 0.5) #f1f4f8;
}

/* Estilizacao da barra de rolagem em navegadores WebKit (Chrome/Edge/Safari). */
::-webkit-scrollbar {
  width: 8px;
  background: #f1f4f8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(16, 43, 92, 0.62) 0%, rgba(74, 138, 52, 0.52) 100%);
  border-radius: 999px;
  border: 2px solid #f1f4f8;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(11, 34, 70, 0.8) 0%, rgba(74, 138, 52, 0.7) 100%);
}

body {
  /* Tipografia principal ? densidade mais compacta no site todo. */
  font-family: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  font-size: 1.05rem;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  font-weight: 400;
}

/* Compensa o header fixo ao navegar por �ncoras internas. */
section[id] {
  scroll-margin-top: calc(var(--header-offset, 78px) + 8px);
}

img {
  /* Evita quebra de layout por imagens maiores que o container. */
  max-width: 100%;
  display: block;
}

a {
  /* Remove sublinhado padrao para controle visual via CSS. */
  color: inherit;
  text-decoration: none;
}

/* Container central responsivo para alinhar todas as secoes. */
.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

/* Barra superior fixa com efeito ao rolar. */
.topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 253, 0.96) 100%);
  border-bottom: 1px solid rgba(16, 43, 92, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  position: sticky;
  top: 0;
  z-index: 30;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease;
}

/* Estado visual do topo quando a pagina desce alguns pixels. */
body.is-scrolled .topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(10, 33, 61, 0.12);
}

/* Layout interno do cabecalho: marca, menu e area de usuario. */
.topbar-inner {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

/* Bloco de marca com logo e tipografia institucional. */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand > img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.03;
}

.brand-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #7a8594;
}

.brand-text strong {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  color: var(--primary-navy);
}

.brand-text strong span {
  color: var(--secondary-green);
}

.brand-text small {
  font-size: 0.55rem;
  letter-spacing: 0.11em;
  color: #7a8594;
  margin-top: 4px;
}

/* Menu principal com destaque do item ativo. */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  color: #354255;
}

.main-nav a {
  position: relative;
  padding: 5px 8px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  overflow: hidden;
  transition:
    color 0.35s ease,
    background-color 0.35s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 107, 63, 0.7), transparent);
  transform: scaleX(0.3);
  transform-origin: center;
  opacity: 0.55;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: var(--primary-navy);
  background: rgba(46, 107, 63, 0.055);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(16, 43, 92, 0.08);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.main-nav a:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 43, 92, 0.06);
  background: rgba(46, 107, 63, 0.08);
}

.main-nav a:active::after {
  transform: scaleX(0.92);
  opacity: 0.9;
}

/* Botao principal de acesso do usuario no topo. */
.user-area,
.menu-toggle,
button,
input[type='button'],
input[type='submit'] {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.user-area:hover,
.user-area:focus-visible,
.menu-toggle:hover,
.menu-toggle:focus-visible,
button:hover,
button:focus-visible,
input[type='button']:hover,
input[type='button']:focus-visible,
input[type='submit']:hover,
input[type='submit']:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16, 43, 92, 0.14);
  filter: brightness(1.12);
}

.user-area:active,
.menu-toggle:active,
button:active,
input[type='button']:active,
input[type='submit']:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 3px 10px rgba(16, 43, 92, 0.08);
  filter: brightness(1.05);
  opacity: 0.98;
}

.user-area {
  background: var(--deep-blue);
  color: var(--white);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(16, 43, 92, 0.12);
}

/* Estado global quando a p�gina do portal est� aberta em sobreposi��o. */
body.portal-open {
  overflow: hidden;
}

.portal-section-head {
  margin-bottom: 12px;
}

.portal-section-head h3 {
  margin: 0 0 6px;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
}

.portal-section-head p {
  margin: 0;
  color: #4b5f77;
  font-size: 0.95rem;
  line-height: 1.55;
}

.portal-work-grid,
.portal-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portal-work-grid article,
.portal-testimonial-grid article {
  background: #ffffff;
  border: 1px solid #dae3ee;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(10, 32, 60, 0.08);
}

.portal-work-grid strong,
.portal-work-grid h3,
.portal-testimonial-grid strong {
  display: block;
  color: #183762;
  font-size: 0.95rem;
  margin-top: 8px;
}

.portal-work-grid p,
.portal-testimonial-grid p {
  margin: 0;
  color: #4b5f77;
  font-size: 0.93rem;
  line-height: 1.55;
}

.portal-work-grid span {
  display: inline-flex;
  margin-top: 10px;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(46, 107, 63, 0.09);
  border: 1px solid rgba(46, 107, 63, 0.18);
  color: #2f5c3b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.portal-testimonial-grid p {
  font-style: italic;
}

.portal-testimonial-grid article {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

/* P�ginas dedicadas Agro e Empresarial. */
.unit-page {
  margin: 24px auto 28px;
}

.unit-hero {
  background:
    radial-gradient(circle at 86% 14%, rgba(46, 107, 63, 0.12) 0%, rgba(46, 107, 63, 0) 44%),
    linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border: 1px solid #dce3ea;
  border-radius: 16px;
  padding: clamp(24px, 3.2vw, 38px);
  box-shadow: 0 14px 26px rgba(10, 32, 60, 0.08);
}

.unit-hero h1 {
  margin: 0 0 12px;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.9rem, 2.6vw, 3rem);
  line-height: 1.08;
  max-width: 980px;
}

.unit-hero p {
  margin: 0;
  color: #3f536b;
  font-size: 1rem;
  line-height: 1.62;
  max-width: 920px;
}

.unit-hero-agro {
  border-top: 4px solid rgba(46, 107, 63, 0.56);
}

.unit-hero-business {
  border-top: 4px solid rgba(16, 43, 92, 0.58);
}

.unit-grid {
  margin-top: 12px;
}

.unit-standalone {
  min-height: 100vh;
}

.unit-standalone-agro {
  background:
    radial-gradient(circle at 8% 6%, rgba(46, 107, 63, 0.16) 0%, rgba(46, 107, 63, 0) 38%),
    linear-gradient(180deg, #f7fbf6 0%, #f2f8f3 100%);
}

.unit-standalone-business {
  background:
    radial-gradient(circle at 92% 8%, rgba(16, 43, 92, 0.16) 0%, rgba(16, 43, 92, 0) 40%),
    linear-gradient(180deg, #f5f8fc 0%, #f1f5fa 100%);
}

.unit-standalone-top {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.unit-back-link,
.unit-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.unit-back-link {
  background: #ffffff;
  color: #1c3d6d;
  border: 1px solid rgba(16, 43, 92, 0.18);
}

.unit-close-btn {
  border: 1px solid rgba(16, 43, 92, 0.24);
  background: linear-gradient(180deg, #153868 0%, #0b2246 100%);
  color: #ffffff;
  cursor: pointer;
}

.unit-back-link:hover,
.unit-close-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(10, 32, 60, 0.14);
}

.unit-standalone-agro .unit-hero {
  background:
    radial-gradient(circle at 86% 14%, rgba(46, 107, 63, 0.16) 0%, rgba(46, 107, 63, 0) 44%),
    linear-gradient(180deg, #ffffff 0%, #f6fbf6 100%);
}

.unit-standalone-agro .portal-work-grid span {
  background: rgba(46, 107, 63, 0.12);
}

.unit-standalone-business .unit-hero {
  background:
    radial-gradient(circle at 84% 14%, rgba(16, 43, 92, 0.16) 0%, rgba(16, 43, 92, 0) 44%),
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.unit-standalone-business .portal-work-grid span {
  background: rgba(16, 43, 92, 0.1);
  border-color: rgba(16, 43, 92, 0.2);
  color: #1f4274;
}

.agro-photo-grid,
.business-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.agro-photo-card,
.business-photo-card {
  margin: 0;
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(10, 32, 60, 0.08);
}

.agro-photo-card img,
.business-photo-card img {
  width: 100%;
  height: clamp(220px, 25vw, 320px);
  object-fit: cover;
  display: block;
}

.agro-photo-card figcaption,
.business-photo-card figcaption {
  padding: 11px 14px 12px;
  color: #2a3f5c;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Botao de menu para telas menores (mobile/tablet). */
.menu-toggle {
  display: none;
  background: var(--deep-blue);
  border: none;
  color: var(--white);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 43, 92, 0.12);
}

/* Hero: faixa principal com imagens laterais e texto central. */
.hero {
  position: relative;
  min-height: clamp(250px, 22vw, 320px);
  overflow: hidden;
  background: radial-gradient(circle at center, #0a1a2d 0%, #071323 60%, #040d19 100%);
  --hero-parallax-left: 0px;
  --hero-parallax-right: 0px;
  --hero-parallax-content: 0px;
  --hero-parallax-overlay: 0px;
}

/* Imagens do hero com leve movimento para dar dinamismo. */
.hero-left,
.hero-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  height: 100%;
  object-fit: cover;
}

.hero-left {
  left: 0;
  object-position: left center;
  filter: saturate(0.72) brightness(0.58) contrast(1.05);
  transform: translate3d(0, var(--hero-parallax-left), 0) scale(1.05);
  will-change: transform;
  mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 100%);
}

.hero-right {
  right: 0;
  object-position: center center;
  filter: saturate(0.85) brightness(0.54) contrast(1.05);
  transform: translate3d(0, var(--hero-parallax-right), 0) scale(1.05);
  will-change: transform;
  mask-image: linear-gradient(to left, #000 0%, #000 74%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 74%, transparent 100%);
}

/* Camada de contraste para garantir legibilidade do texto do banner. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  transform: translate3d(0, var(--hero-parallax-overlay), 0);
  will-change: transform;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20%;
  width: min(620px, 52vw);
  height: 54%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(9, 37, 68, 0.72) 0%,
    rgba(9, 37, 68, 0.58) 32%,
    rgba(9, 37, 68, 0.2) 54%,
    rgba(9, 37, 68, 0) 76%
  );
}

/* Conteudo central do hero (titulo, descricao e CTA). */
.hero-content {
  position: relative;
  z-index: 1;
  color: #f4f8fd;
  text-align: center;
  padding: clamp(24px, 2.6vw, 42px) 0 clamp(18px, 2vw, 30px);
  transform: translate3d(0, var(--hero-parallax-content), 0);
  will-change: transform;
}

.hero-content h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(2.3rem, 3.2vw, 3.8rem);
  line-height: 1.16;
  margin: 0 0 10px;
  font-weight: 900;
}

.hero-content h1 span {
  color: #79af36;
}

.hero-content p {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(1rem, 1.08vw, 1.2rem);
  font-weight: 400;
  color: #edf2f9;
}

.hero-divider {
  width: min(260px, 62vw);
  margin: 6px auto 12px;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(124, 175, 55, 0) 0%,
    rgba(124, 175, 55, 1) 50%,
    rgba(124, 175, 55, 0) 100%
  );
}

/* Grupo dos botoes principais do hero. */
.hero-actions {
  margin-top: 14px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Botao de chamada com microinteracao no hover. */
.hero-btn {
  display: inline-flex;
  width: 290px;
  flex: 0 0 290px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 7px;
  padding: 0 22px;
  background: #5f9d37;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    filter 0.2s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  background: #568f34;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
  filter: brightness(1.12);
}

.hero-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  filter: brightness(1.18);
}

.hero-btn-secondary {
  background: #5f9d37;
  border: none;
  color: var(--white);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

.hero-btn-secondary:hover {
  transform: translateY(-2px);
  background: #568f34;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
  filter: brightness(1.12);
}

.hero-btn-secondary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  filter: brightness(1.18);
}

.hero-btn::after {
  content: '>';
  margin-left: 11px;
  font-size: 0.9em;
}

.site-announcement {
  width: min(1440px, calc(100% - 48px));
  margin: 14px auto 0;
  border: 1px solid rgba(196, 138, 42, 0.34);
  background: linear-gradient(90deg, rgba(196, 138, 42, 0.16) 0%, rgba(196, 138, 42, 0.08) 100%);
  color: #4b3508;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 700;
}

/* Se��o institucional do Instituto na home. */
.instituto-section {
  margin: 16px auto 12px;
}

.instituto-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d8dfe6;
  border-radius: 12px;
  padding: clamp(16px, 2vw, 22px);
  box-shadow: 0 10px 22px rgba(12, 36, 65, 0.06);
}

.section-eyebrow {
  margin: 0 0 10px;
  color: var(--secondary-green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.instituto-copy h2 {
  margin: 0 0 14px;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary-navy);
  font-size: clamp(1.7rem, 2.2vw, 2.6rem);
  line-height: 1.08;
}

.instituto-copy p {
  margin: 0 0 12px;
  color: #3f536b;
  font-size: 1rem;
  line-height: 1.62;
}

.instituto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.instituto-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(74, 138, 52, 0.08);
  border: 1px solid rgba(74, 138, 52, 0.16);
  color: #2d5136;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.instituto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--deep-blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 18px rgba(16, 43, 92, 0.14);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.instituto-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 22px rgba(16, 43, 92, 0.18);
}

.instituto-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 5px 10px rgba(16, 43, 92, 0.12);
  filter: brightness(1.12);
}

.instituto-aside {
  display: grid;
  gap: 14px;
}

.instituto-aside article {
  background: #ffffff;
  border: 1px solid #dde4ec;
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 16px rgba(12, 36, 65, 0.05);
}

.instituto-aside strong,
.instituto-aside h3 {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1rem;
}

.instituto-aside p {
  margin: 0;
  color: #4d5b6b;
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Se��es complementares da home (teoria, publica��es e pesquisador). */
.section-block {
  margin: 16px auto 12px;
}

.section-header {
  max-width: 820px;
  margin: 0 auto 12px;
  text-align: center;
}

.section-header-left {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.section-header h2 {
  margin: 0 0 10px;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary-navy);
  font-size: clamp(1.6rem, 2.1vw, 2.4rem);
  line-height: 1.12;
}

.section-header p {
  margin: 0;
  color: #3f536b;
  font-size: 1rem;
  line-height: 1.62;
}

.theory-grid,
.publication-grid,
.research-grid {
  display: grid;
  gap: 18px;
}

.theory-grid {
  grid-template-columns: repeat(3, 1fr);
}

.theory-grid article,
.publication-card,
.research-grid article {
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 18px rgba(12, 36, 65, 0.05);
}

.theory-grid strong,
.theory-grid h3,
.publication-card strong,
.publication-card h3,
.research-grid strong,
.research-grid h3 {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1rem;
}

.theory-grid p,
.publication-card p,
.research-grid p {
  margin: 0;
  color: #4d5b6b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.publication-grid {
  grid-template-columns: repeat(3, 1fr);
}

.research-panel {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.research-grid {
  grid-template-columns: repeat(2, 1fr);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 22px;
  align-items: start;
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 10px 18px rgba(12, 36, 65, 0.05);
}

.contact-column {
  display: grid;
  gap: 12px;
}

.contact-grid {
  display: grid;
  gap: 12px;
}

.contact-grid article {
  background: #f9fbfe;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  padding: 14px 16px;
}

.contact-grid strong,
.contact-grid h3 {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: 0.98rem;
}

.contact-grid p {
  margin: 0;
  color: #4d5b6b;
  font-size: 0.94rem;
  line-height: 1.55;
}

.contact-grid a {
  color: inherit;
  text-decoration: none;
}

.contact-grid a:hover {
  text-decoration: underline;
}

.contact-form {
  display: grid;
  gap: 10px;
  background: #f9fbfe;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  padding: 16px;
}

.contact-form label {
  color: #1f3248;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 11px 12px;
  font-family: 'Source Sans 3', 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.95rem;
  color: #1f2a37;
  background: #ffffff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(16, 43, 92, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 43, 92, 0.12);
}

.contact-submit {
  margin-top: 4px;
  justify-self: start;
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 7px;
  background: var(--deep-blue);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

/* Grade com os dois cards de atuacao do instituto. */
.dual-cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Cartao com elevacao no hover para reforcar interatividade. */
.card {
  background: var(--white);
  border: 1px solid #d7dee6;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 43% 57%;
  min-height: clamp(220px, 20vw, 280px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 107, 63, 0.28);
  box-shadow: 0 14px 26px rgba(12, 36, 65, 0.12);
}

.card-image {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.card-image::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 34%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.86) 78%,
    rgba(255, 255, 255, 1) 100%
  );
}

/* Imagem do card com zoom sutil no hover do cartao. */
.card-image img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-image img {
  transform: scale(1.03);
}

/* Bloco de texto interno de cada card. */
.card-content {
  padding: clamp(22px, 2.3vw, 34px) clamp(22px, 2.3vw, 34px);
}

.card-content h2 {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  color: #10284e;
  font-size: clamp(1.8rem, 2.2vw, 2.7rem);
  line-height: 1;
  font-weight: 800;
}

.card-content h2 span {
  color: #4f8e32;
  display: block;
}

.card-content h3 {
  margin: 12px 0 10px;
  font-size: clamp(1.05rem, 1.3vw, 1.55rem);
  color: #22354d;
}

.card-content p {
  margin: 0;
  font-size: clamp(0.9rem, 1vw, 1.14rem);
  color: #3f4d5e;
  line-height: 1.6;
  font-weight: 400;
}

.card-content a {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 6px;
  background: #4c8f35;
  color: #ffffff;
  padding: 0 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.74rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
}

.card-content a:hover {
  transform: translateY(-1px);
  opacity: 0.95;
  box-shadow: 0 8px 18px rgba(12, 36, 65, 0.18);
  filter: brightness(1.1);
}

.card-content a:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(12, 36, 65, 0.14);
  opacity: 1;
  filter: brightness(1.16);
}

.card-content a.business-btn {
  background: #0f2c59;
}

/* Secao de pilares institucionais em 4 colunas. */
.highlights {
  margin: 14px auto 16px;
  background: var(--white);
  border: 1px solid #d7dee6;
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

/* Cada item de pilar com icone + texto. */
.highlights article {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-right: 1px solid #e1e7ee;
  position: relative;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.highlights article::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0;
  width: 52px;
  height: 2px;
  background: linear-gradient(90deg, rgba(74, 138, 52, 0.75) 0%, rgba(74, 138, 52, 0) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.highlights article:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.highlights article:hover::before {
  opacity: 1;
}

.highlights article:last-child {
  border-right: none;
}

/* Estilo base do icone circular dos pilares. */
.icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid rgba(74, 138, 52, 0.35);
  background: rgba(74, 138, 52, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-green);
  font-size: 1.3rem;
  line-height: 1;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.material-symbols-outlined.icon {
  font-family: 'Material Symbols Outlined';
}

.highlights h4 {
  margin: 0;
  font-size: 1.03rem;
  color: #1f3248;
  letter-spacing: 0.035em;
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
  align-self: end;
}

.highlights p {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: #3f536b;
  line-height: 1.52;
  font-weight: 400;
  grid-column: 1 / -1;
}

/* Rodape com informacoes institucionais e links utilitarios. */
.footer-wrap {
  margin: 0 auto 34px;
}

.footer-grid {
  background: #102b5c;
  border: 1px solid rgba(196, 138, 42, 0.22);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 32px 34px 24px;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
  gap: 28px;
  color: #edf3fb;
}

.footer-bottom {
  margin-top: 0;
  padding: 16px 28px 18px;
  background: #102b5c;
  border: 1px solid rgba(196, 138, 42, 0.22);
  border-top: 1px solid rgba(245, 245, 245, 0.08);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 24px rgba(16, 43, 92, 0.16);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #f5f5f5;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
}

.footer-brand {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
}

.footer-brand img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.footer-brand p {
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #dde7f5;
}

.footer-grid h3,
.footer-grid h5 {
  margin: 2px 0 10px;
  color: #c48a2a;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.footer-grid li {
  font-size: 0.82rem;
  color: #edf3fb;
}

/* Links do rodape com estado hover. */
.footer-grid a {
  color: #ffffff;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.footer-grid a:hover {
  color: #c48a2a;
  opacity: 0.96;
}

/* Grupo de icones sociais no rodape. */
.social-links {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links .social-link,
.social-links a {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.social-mark {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.social-links .social-link:hover,
.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.22);
  opacity: 1;
}

/* Cores oficiais por plataforma social. */
.social-links .social-link.linkedin,
.social-links a.linkedin,
.social-links a:nth-child(1) {
  background: #0a66c2;
}

.social-links .social-link.discord,
.social-links a.discord,
.social-links a:nth-child(2) {
  background: #5865f2;
}

.social-links .social-link.gmail,
.social-links a.gmail,
.social-links a:nth-child(3) {
  background: #ea4335;
}

.social-links .social-link.whatsapp,
.social-links a.whatsapp,
.social-links a:nth-child(4) {
  background: #25d366;
}

.social-links .social-link.instagram,
.social-links a.instagram,
.social-links a:nth-child(5) {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.social-links .social-link.twitter,
.social-links a.twitter,
.social-links a:nth-child(6) {
  background: #1da1f2;
}

/* Estado inicial de elementos que serao revelados no scroll. */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

/* Estado final apos o elemento entrar na viewport. */
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Botao de entrada do portal no header institucional. */
.portal-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-launch-btn .material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
  font-variation-settings:
    'FILL' 0,
    'wght' 450,
    'GRAD' 0,
    'opsz' 24;
}

/* Overlay full-screen que cobre completamente o site quando aberto. */
.hd-portal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: var(--bg-page);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.38s ease,
    visibility 0.38s ease;
}

.hd-portal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hd-portal-shell {
  height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  transform: translateY(14px);
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hd-portal.is-open .hd-portal-shell {
  transform: translateY(0);
}

.hd-portal-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.hd-portal-topbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 2vw, 28px);
  border-bottom: 1px solid rgba(14, 44, 89, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(10, 33, 61, 0.06);
}

.hd-portal-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hd-portal-brand-wrap img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.hd-portal-brand-wrap strong {
  display: block;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.1rem;
  color: #102b5c;
}

.hd-portal-brand-wrap p {
  margin: 0;
  color: #5a6c80;
  font-size: 0.78rem;
}

.hd-portal-sidebar {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 14px 28px;
  background: linear-gradient(180deg, var(--primary-navy) 0%, var(--deep-blue) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.hd-portal-main-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  overflow: visible;
}

.hd-portal-main-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}

.hd-portal-main-menu a .material-symbols-rounded {
  font-size: 20px;
  opacity: 0.9;
}

.hd-portal-main-menu a:hover,
.hd-portal-main-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.hd-portal-main-menu a.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(196, 166, 107, 0.35);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent-gold);
}

.hd-portal-main-menu a.hd-menu-cta {
  margin-top: 6px;
  background: linear-gradient(135deg, var(--secondary-green) 0%, #3d7a32 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  justify-content: center;
}

.hd-portal-main-menu a.hd-menu-cta:hover {
  background: linear-gradient(135deg, #5a9e42 0%, var(--secondary-green) 100%);
}

.hd-portal-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hd-portal-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  border-radius: 10px;
  border: 1px solid rgba(16, 43, 92, 0.12);
  background: #ffffff;
  color: #1c355a;
  cursor: pointer;
}

.hd-portal-actions .hd-portal-exit {
  min-width: auto;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: #102b5c;
  color: #ffffff;
  border-color: rgba(16, 43, 92, 0.2);
}

.hd-auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 43, 92, 0.2);
  background: #102b5c;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

.hd-auth-btn-ghost {
  background: #ffffff;
  color: #1e3c5f;
}

.hd-portal-content {
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: var(--bg-page);
}

.hd-portal-container {
  width: calc(100% - 28px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 28px;
}

.hd-portal-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  box-shadow: 0 8px 28px rgba(10, 33, 61, 0.05);
}

.hd-portal-strip .hd-access-status {
  margin: 0;
  flex: 1 1 220px;
}

.hd-portal-global-search--compact {
  flex: 1 1 280px;
  max-width: 420px;
  margin: 0;
}

.hd-portal-global-search--compact .hd-search-row {
  margin: 0;
}

.hd-portal-section {
  display: none;
  animation: hdPortalFade 0.32s ease;
}

.hd-portal-section.is-active:not(.hd-is-hidden) {
  display: block;
}

@keyframes hdPortalFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hd-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(14, 44, 89, 0.12);
  background: #fff;
  color: var(--primary-navy);
  cursor: pointer;
}

.hd-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(14, 44, 89, 0.06);
  color: var(--primary-navy);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.hd-is-hidden {
  display: none !important;
}

.hd-access-status {
  margin: 0;
  font-size: 0.82rem;
  color: #4e6580;
  font-weight: 700;
}

.hd-portal .material-symbols-rounded {
  font-size: 22px;
  line-height: 1;
  color: inherit;
  font-variation-settings:
    'FILL' 0,
    'wght' 420,
    'GRAD' 0,
    'opsz' 24;
}

.hd-portal-global-search {
  margin-bottom: 12px;
}

.hd-portal-global-search label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #436082;
  text-transform: uppercase;
}

.hd-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d3dce7;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 20px rgba(16, 43, 92, 0.05);
}

.hd-search-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: #233b5d;
  min-width: 200px;
}

.hd-search-row input:focus {
  outline: none;
}

.hd-search-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6e0ea;
  background: #ffffff;
  color: #2a4263;
  border-radius: 999px;
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.hd-panel {
  margin-bottom: 0;
  background: #ffffff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 8px 28px rgba(10, 33, 61, 0.05);
}

.hd-panel-head--compact {
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.hd-panel-head--compact h2 {
  font-size: clamp(1.1rem, 1.3vw, 1.45rem);
}

.hd-panel-head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(14, 44, 89, 0.08);
}

.hd-dashboard .hd-kpi-grid {
  margin-top: 8px;
}

.hd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hd-kpi-card {
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(165deg, #ffffff 0%, #f6f9fc 100%);
}

.hd-kpi-card .material-symbols-rounded {
  color: var(--secondary-green);
}

.hd-kpi-card h3 {
  margin: 10px 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hd-kpi-value {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
}

.hd-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #2e6b3f;
}

.hd-panel-head h2 {
  margin: 0;
  color: #102b5c;
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.2rem, 1.5vw, 1.7rem);
  line-height: 1.2;
}

.hd-panel-head p {
  margin: 6px 0 0;
  color: #5b6f86;
  font-size: 0.92rem;
}

.hd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hd-kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.hd-kpi-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 26px rgba(16, 43, 92, 0.12);
}

.hd-kpi-card.is-open {
  border-color: rgba(47, 125, 74, 0.45);
  box-shadow: 0 12px 24px rgba(16, 43, 92, 0.1);
  background: linear-gradient(180deg, #ffffff 0%, #eef8f1 100%);
}

.hd-kpi-card:focus-visible {
  outline: 2px solid var(--secondary-green);
  outline-offset: 2px;
}

.hd-kpi-caret {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.15rem !important;
  color: #7a8ea5;
}

.hd-kpi-card.is-open .hd-kpi-caret {
  color: var(--secondary-green);
}

.hd-kpi-detail-panel {
  margin-top: 18px;
}

.hd-kpi-detail-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d8dfe6;
  border-radius: 14px;
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 14px 28px rgba(12, 36, 65, 0.08);
  animation: hdKpiExpandIn 0.22s ease;
}

.hd-kpi-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(14, 44, 89, 0.08);
}

.hd-kpi-detail-head h3 {
  margin: 0;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}

.hd-kpi-detail-head p {
  margin: 6px 0 0;
  color: #4b5f77;
  font-size: 0.92rem;
}

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

.hd-kpi-expand-close {
  border: 0;
  background: rgba(14, 44, 89, 0.06);
  color: var(--primary-navy);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hd-kpi-expand-close:hover {
  background: rgba(14, 44, 89, 0.12);
}

.hd-kpi-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hd-kpi-detail-card {
  background: #ffffff;
  border: 1px solid #dae3ee;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 22px rgba(10, 32, 60, 0.08);
}

.hd-kpi-detail-card h4 {
  margin: 0 0 8px;
  color: #183762;
  font-size: 1rem;
  font-family: 'Merriweather', Georgia, serif;
}

.hd-kpi-detail-card p,
.hd-kpi-detail-card blockquote {
  margin: 0 0 8px;
  color: #4b5f77;
  font-size: 0.93rem;
  line-height: 1.55;
}

.hd-kpi-detail-card blockquote {
  font-style: italic;
  border-left: 3px solid rgba(74, 138, 52, 0.35);
  padding-left: 12px;
  margin-top: 10px;
}

.hd-kpi-detail-card ul {
  margin: 0 0 8px;
  padding-left: 18px;
  color: #4b5f77;
  font-size: 0.88rem;
}

.hd-kpi-detail-empty {
  padding: 8px 2px 4px;
  color: var(--text-soft);
}

.hd-person-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hd-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(14, 44, 89, 0.1);
  background: #e8eef6;
  flex-shrink: 0;
}

.hd-person-copy {
  min-width: 0;
}

.hd-person-copy strong {
  display: block;
  color: #183762;
  font-size: 0.98rem;
}

.hd-person-copy .hd-meta {
  margin: 2px 0 0;
}

.hd-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.hd-stars .material-symbols-rounded {
  font-size: 1.05rem !important;
  color: #c9ccd1;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.hd-stars .is-full,
.hd-stars .is-half {
  color: var(--accent-gold);
}

.hd-stars em {
  margin-left: 6px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: #5b6f86;
}

.hd-feedback-carousel .hd-person-head {
  margin-bottom: 10px;
}

.hd-feedback-carousel .hd-avatar {
  width: 64px;
  height: 64px;
}

.hd-kpi-card h3 {
  margin: 8px 0 4px;
  font-size: 0.84rem;
  color: #284664;
}

.hd-kpi-card p {
  margin: 0;
}

.hd-kpi-card strong {
  font-size: 1.45rem;
  color: #102b5c;
}

@media (max-width: 980px) {
  .hd-kpi-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hd-kpi-detail-grid {
    grid-template-columns: 1fr;
  }
}

.hd-case-grid,
.hd-publication-grid,
.hd-favorites-grid,
.hd-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hd-case-grid article,
.hd-publication-grid article,
.hd-favorites-grid article,
.hd-library-grid article,
.hd-profile-card,
.hd-feedback-carousel article,
.hd-ai-shell {
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(16, 43, 92, 0.07);
}

.hd-case-grid article,
.hd-favorites-grid article,
.hd-library-grid article {
  padding: 12px;
}

.hd-case-grid h3,
.hd-publication-grid h3,
.hd-profile-card h3 {
  margin: 0 0 8px;
  color: #122f5b;
  font-size: 0.97rem;
}

.hd-case-grid p,
.hd-publication-grid p,
.hd-profile-card p,
.hd-library-grid p,
.hd-favorites-grid p {
  margin: 0 0 8px;
  color: #526981;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hd-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hd-card-actions button,
.hd-case-grid button,
.hd-publication-grid button,
.hd-ai-input button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid #d3deea;
  background: #ffffff;
  color: #204064;
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 700;
}

.hd-case-grid button,
.hd-publication-grid button,
.hd-ai-input button {
  background: #102b5c;
  border-color: rgba(16, 43, 92, 0.18);
  color: #ffffff;
}

.hd-feedback-carousel {
  position: relative;
  min-height: 0;
  height: auto;
  transition: height 0.3s ease;
}

.hd-feedback-carousel article {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(12px);
  transition:
    opacity 0.38s ease,
    transform 0.38s ease;
  padding: 12px;
  display: grid;
  grid-template-columns: 108px 1fr;
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
}

.hd-feedback-carousel article.is-active {
  opacity: 1;
  transform: translateX(0);
}

.hd-feedback-carousel img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
  grid-row: span 5;
}

.hd-feedback-carousel blockquote {
  margin: 0;
  color: #344f70;
  font-style: italic;
  font-size: 0.9rem;
}

.hd-library-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d5dfea;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #ffffff;
}

.hd-library-search input {
  flex: 1;
  border: 0;
  background: transparent;
}

.hd-library-search input:focus {
  outline: none;
}

.hd-library-grid article,
.hd-favorites-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hd-publication-grid article {
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.hd-publication-grid img {
  width: 100%;
  height: 142px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}

.hd-publication-grid button {
  margin-top: auto;
}

.hd-ai-shell {
  padding: 12px;
}

.hd-ai-messages {
  display: grid;
  gap: 8px;
}

.hd-ai-messages article {
  border: 1px solid #d8e3ee;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.hd-ai-input {
  margin-top: 12px;
}

.hd-ai-input label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: #435e80;
  font-weight: 700;
}

.hd-ai-input div {
  display: flex;
  gap: 8px;
}

.hd-ai-input input {
  flex: 1;
  border: 1px solid #d1ddea;
  border-radius: 10px;
  padding: 0 12px;
  min-height: 40px;
}

.hd-profile-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 12px;
}

.hd-profile-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
}

.hd-portal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d8e2ed;
  background: #ffffff;
  border-radius: 12px;
}

.hd-portal-footer a {
  font-size: 0.79rem;
  font-weight: 700;
  color: #234164;
}

.hd-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(8, 24, 49, 0.52);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.hd-auth-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hd-auth-modal-card {
  width: min(460px, 94vw);
  border-radius: 14px;
  border: 1px solid #d6e1ed;
  background: #ffffff;
  box-shadow: 0 24px 46px rgba(9, 28, 56, 0.28);
  padding: 14px;
}

.hd-auth-modal-card h3 {
  margin: 0 0 8px;
  color: #102b5c;
  font-size: 1rem;
}

.hd-auth-modal-card p {
  margin: 0 0 10px;
  color: #4f6783;
  font-size: 0.86rem;
}

.hd-auth-form {
  display: grid;
  gap: 6px;
}

.hd-auth-form label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #214264;
}

.hd-auth-form input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #d1dceb;
  border-radius: 10px;
}

.hd-auth-actions {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hd-auth-actions button {
  border: 1px solid #d0dbe9;
  border-radius: 10px;
  min-height: 32px;
  padding: 0 10px;
  background: #ffffff;
  color: #234265;
  font-size: 0.76rem;
  font-weight: 700;
}

#hdAuthSubmit {
  background: #102b5c;
  color: #ffffff;
  border-color: rgba(16, 43, 92, 0.18);
}

.hd-auth-message {
  min-height: 18px;
  margin: 4px 0 0;
  font-size: 0.77rem;
  color: #35597f;
}

.hd-admin-panel {
  display: grid;
  gap: 8px;
}

.hd-admin-panel label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #204164;
}

.hd-admin-panel input,
.hd-admin-panel select,
.hd-admin-panel textarea {
  width: 100%;
  border: 1px solid #d1dceb;
  border-radius: 10px;
  padding: 8px 10px;
  background: #ffffff;
  color: #1e3e63;
}

.hd-admin-panel textarea {
  min-height: 160px;
  resize: vertical;
}

/* Refinamento visual do Portal Homo Data: mais legibilidade e composicao institucional. */
.hd-portal {
  background:
    radial-gradient(circle at 6% 4%, rgba(196, 138, 42, 0.16) 0%, rgba(196, 138, 42, 0) 38%),
    radial-gradient(circle at 96% 2%, rgba(46, 107, 63, 0.16) 0%, rgba(46, 107, 63, 0) 38%),
    linear-gradient(165deg, #f8fbff 0%, #eef3f9 52%, #e9eff6 100%);
}

.hd-portal-topbar {
  padding: 14px clamp(18px, 2.2vw, 34px);
  gap: 16px;
  border-bottom: 1px solid rgba(16, 43, 92, 0.12);
  box-shadow: 0 14px 28px rgba(14, 43, 89, 0.08);
}

.hd-portal-brand-wrap strong {
  font-size: 1.22rem;
}

.hd-portal-brand-wrap p {
  font-size: 0.9rem;
}

.hd-portal-main-menu a {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.hd-portal-actions {
  gap: 8px;
}

.hd-auth-btn,
.hd-portal-actions .hd-portal-exit {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.hd-access-status,
.hd-auth-message {
  font-size: 0.9rem;
}

.hd-portal-content {
  padding: clamp(16px, 2.1vw, 28px);
}

.hd-portal-content > * {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.hd-panel {
  margin-bottom: 16px;
  border-radius: 16px;
  padding: clamp(16px, 1.8vw, 24px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 36px rgba(16, 43, 92, 0.09);
}

.hd-kicker {
  font-size: 0.76rem;
}

.hd-panel-head h2 {
  font-size: clamp(1.45rem, 1.9vw, 2rem);
}

.hd-panel-head p {
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.55;
}

.hd-search-row {
  border-radius: 14px;
  padding: 10px 12px;
}

.hd-search-row input {
  font-size: 1rem;
}

.hd-search-row button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.8rem;
}

.hd-kpi-grid,
.hd-research-grid,
.hd-case-grid,
.hd-company-grid,
.hd-event-grid,
.hd-publication-grid,
.hd-favorites-grid,
.hd-library-grid {
  gap: 14px;
}

.hd-kpi-card {
  border-radius: 14px;
  padding: 14px;
}

.hd-kpi-card h3 {
  font-size: 0.92rem;
}

.hd-kpi-card strong {
  font-size: 1.7rem;
}

.hd-research-grid article,
.hd-case-grid article,
.hd-company-grid article,
.hd-event-grid article,
.hd-publication-grid article,
.hd-favorites-grid article,
.hd-library-grid article,
.hd-community-feed article,
.hd-notification-list li,
.hd-profile-card,
.hd-feedback-carousel article,
.hd-ai-shell {
  border-radius: 16px;
}

.hd-research-grid article,
.hd-case-grid article,
.hd-company-grid article,
.hd-event-grid article,
.hd-favorites-grid article,
.hd-library-grid article,
.hd-publication-grid article,
.hd-community-feed article {
  padding: 14px;
}

.hd-research-grid h3,
.hd-case-grid h3,
.hd-publication-grid h3,
.hd-event-grid h3,
.hd-community-feed h3,
.hd-company-grid h3,
.hd-profile-card h3 {
  font-size: 1.03rem;
}

.hd-research-grid p,
.hd-case-grid p,
.hd-publication-grid p,
.hd-event-grid p,
.hd-community-feed p,
.hd-company-grid p,
.hd-notification-list p,
.hd-profile-card p,
.hd-library-grid p,
.hd-favorites-grid p {
  font-size: 0.93rem;
  line-height: 1.52;
}

.hd-auth-modal-card {
  width: min(520px, 94vw);
  padding: 18px;
}

.hd-auth-modal-card h3 {
  font-size: 1.15rem;
}

.hd-auth-form input {
  min-height: 42px;
}

.hd-auth-actions button {
  min-height: 36px;
  font-size: 0.8rem;
}

@media (max-width: 1280px) {
  .hd-portal-content > * {
    max-width: 1160px;
  }
}

@media (max-width: 1020px) {
  .hd-portal-topbar {
    padding: 12px 14px;
  }

  .hd-panel-head h2 {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
  }
}

@media (max-width: 780px) {
  .hd-portal-content {
    padding: 12px;
  }

  .hd-panel {
    padding: 14px;
  }

  .hd-panel-head p {
    font-size: 0.94rem;
  }
}

@media (max-width: 1280px) {
  .hd-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .hd-portal-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hd-portal-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hd-kpi-grid,
  .hd-research-grid,
  .hd-case-grid,
  .hd-company-grid,
  .hd-event-grid,
  .hd-publication-grid,
  .hd-favorites-grid,
  .hd-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hd-feedback-carousel {
    min-height: 0;
  }
}

@media (max-width: 780px) {
  .hd-search-row {
    flex-wrap: wrap;
  }

  .hd-search-row input {
    min-width: 100%;
  }

  .hd-kpi-grid,
  .hd-research-grid,
  .hd-case-grid,
  .hd-company-grid,
  .hd-event-grid,
  .hd-publication-grid,
  .hd-favorites-grid,
  .hd-library-grid {
    grid-template-columns: 1fr;
  }

  .hd-feedback-carousel {
    min-height: 0;
  }

  .hd-feedback-carousel article {
    grid-template-columns: 1fr;
  }

  .hd-feedback-carousel img {
    width: 76px;
    height: 76px;
    grid-row: auto;
  }

  .hd-ai-input div {
    flex-direction: column;
  }

  .hd-profile-card {
    grid-template-columns: 1fr;
  }
}

/* Acessibilidade: desativa animacoes para quem prefere menos movimento. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal-on-scroll,
  .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* Ajustes para telas muito largas. */
@media (min-width: 1600px) {
  .container {
    width: min(1680px, calc(100% - 60px));
  }

  .hero-content {
    max-width: 980px;
  }
}

/* Ajustes de layout para tablet e desktop compacto. */
@media (max-width: 1020px) {
  .topbar-inner {
    grid-template-columns: 1fr auto auto;
    gap: 14px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 84px;
    left: 20px;
    right: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 16px 16px;
    justify-content: flex-start;
    gap: 14px 18px;
    z-index: 8;
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 300px;
  }

  .hero-content {
    max-width: 620px;
    padding: 34px 0 26px;
  }

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

  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights article:nth-child(2n) {
    border-right: none;
  }

  .highlights article {
    padding: 22px 20px;
  }

  .theory-grid,
  .publication-grid,
  .contact-panel,
  .contact-column,
  .contact-grid,
  .contact-form,
  .research-panel,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding: 26px;
  }

  .portal-work-grid,
  .portal-testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .agro-photo-grid,
  .business-photo-grid {
    grid-template-columns: 1fr;
  }

  .unit-standalone-top {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Ajustes de layout para mobile. */
@media (max-width: 820px) {
  .topbar-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .brand {
    gap: 10px;
    min-width: 0;
  }

  .brand > img {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-kicker {
    display: block;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    line-height: 1.1;
  }

  .brand-text strong {
    font-size: 1.12rem;
    line-height: 1;
  }

  .brand-text small {
    display: block;
    font-size: 0.43rem;
    letter-spacing: 0.08em;
    line-height: 1.15;
    margin-top: 2px;
  }

  .user-area {
    display: none;
  }

  .portal-launch-btn.user-area,
  .portal-launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    min-width: 44px;
    min-height: 44px;
    z-index: 9;
  }

  .portal-launch-btn > span:not(.material-symbols-rounded) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .portal-launch-btn .material-symbols-rounded {
    font-size: 22px;
  }

  .hero-left,
  .hero-right {
    width: 100%;
    opacity: 0.4;
  }

  .hero-overlay::before {
    top: 16%;
    width: min(82vw, 420px);
    height: 58%;
  }

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

  .hero-right {
    display: none;
  }

  .hero-content {
    padding: 26px 0 22px;
    margin-left: 0;
    max-width: 100%;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .hero-btn {
    width: min(340px, 100%);
    flex: 0 1 min(340px, 100%);
  }

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

  .card-image {
    height: 190px;
  }

  .card-image::after {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 42%;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.84) 76%,
      rgba(255, 255, 255, 1) 100%
    );
  }

  .card-content {
    padding: 24px;
  }

  .card-content h2 {
    font-size: 2rem;
  }

  .card-content h3 {
    font-size: 1.3rem;
  }

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

  .highlights article {
    border-right: none;
    border-bottom: 1px solid #e1e7ee;
    padding: 20px 18px;
  }

  .highlights article:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

/* --- Portal profissional: layout institucional --- */
.hd-menu-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 18px 14px 8px;
  white-space: nowrap;
}

.hd-menu-label:first-child {
  padding-top: 4px;
}

.hd-menu-label.hd-is-hidden,
.hd-portal-main-menu a.hd-is-hidden,
.hd-panel.hd-is-hidden,
[data-zone].hd-is-hidden {
  display: none !important;
}

.hd-service-grid,
.hd-leads-grid,
.hd-company-list,
.hd-case-grid,
.hd-library-grid,
.hd-publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.hd-service-card,
.hd-lead-card,
.hd-company-admin-card,
.hd-case-grid article,
.hd-library-grid article,
.hd-publication-grid article {
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(10, 33, 61, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hd-service-card:hover,
.hd-case-grid article:hover,
.hd-library-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(10, 33, 61, 0.08);
}

.hd-service-card h3,
.hd-case-grid h3,
.hd-library-grid h3 {
  margin: 0 0 10px;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary-navy);
  font-size: 1.08rem;
}

.hd-service-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary-green);
  background: rgba(74, 138, 52, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.hd-service-price {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(14, 44, 89, 0.08);
  font-weight: 700;
  color: var(--primary-navy);
}

.hd-meta {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.hd-lead-form,
.hd-admin-panel {
  display: grid;
  gap: 14px;
  max-width: 640px;
  background: #f8fafc;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.hd-lead-form label,
.hd-admin-panel label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.hd-lead-form input,
.hd-lead-form select,
.hd-lead-form textarea,
.hd-admin-panel input,
.hd-admin-panel select,
.hd-admin-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hd-lead-form input:focus,
.hd-lead-form select:focus,
.hd-lead-form textarea:focus,
.hd-admin-panel input:focus {
  outline: none;
  border-color: rgba(14, 44, 89, 0.35);
  box-shadow: 0 0 0 3px rgba(14, 44, 89, 0.08);
}

.hd-lead-submit {
  justify-self: start;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-navy) 0%, #163d78 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hd-lead-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(14, 44, 89, 0.2);
}

.hd-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.hd-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hd-card-actions button,
.hd-auth-actions button {
  border: 1px solid rgba(14, 44, 89, 0.14);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-navy);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hd-card-actions button:hover,
.hd-auth-actions button:hover {
  background: rgba(14, 44, 89, 0.05);
}

.hd-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hd-search-hit {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  transition: background-color 0.2s ease;
}

.hd-search-hit:hover {
  background: rgba(14, 44, 89, 0.04);
}

.hd-timeline {
  display: grid;
  gap: 16px;
}

.hd-history-item {
  background: #fff;
  border-left: 4px solid var(--accent-gold);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 6px 20px rgba(10, 33, 61, 0.04);
}

.hd-feedback-carousel {
  min-height: 180px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 44, 89, 0.03) 0%, rgba(74, 138, 52, 0.05) 100%);
  border: 1px solid rgba(14, 44, 89, 0.08);
}

.hd-feedback-carousel article {
  grid-template-columns: 1fr;
  padding: 28px 32px;
}

.hd-feedback-carousel blockquote {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-main);
}

.hd-ai-shell {
  border-radius: 16px;
  border: 1px solid rgba(14, 44, 89, 0.08);
  background: #f8fafc;
  padding: 20px;
}

.hd-ai-messages article {
  background: #fff;
  border-radius: 12px;
}

.hd-ai-input div {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.hd-ai-input input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
}

.hd-ai-input button {
  border-radius: 999px;
  padding: 0 20px;
  background: var(--primary-navy);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

.hd-profile-card {
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff 0%, #f6f9fc 100%);
  border: 1px solid rgba(14, 44, 89, 0.08);
}

.hd-profile-card h3 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary-navy);
}

.hd-portal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(14, 44, 89, 0.08);
  font-size: 0.88rem;
  color: var(--text-soft);
}

.hd-portal-footer a:hover {
  color: var(--primary-navy);
}

.hd-portal-actions .hd-portal-exit {
  background: transparent;
  color: var(--primary-navy);
  border-color: rgba(14, 44, 89, 0.18);
}

/* Layout admin compacto: formulario + lista lado a lado */
.hd-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.hd-admin-layout--reverse {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.hd-form-compact {
  background: #f8fafc;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.hd-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.hd-form-grid--cms {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hd-field--full {
  grid-column: 1 / -1;
}

.hd-field-suggest {
  position: relative;
}

.hd-field-hint {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.hd-suggest-list {
  position: absolute;
  z-index: 30;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(10, 33, 61, 0.12);
  max-height: 220px;
  overflow: auto;
}

.hd-suggest-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  cursor: pointer;
}

.hd-suggest-list li:hover,
.hd-suggest-list li:focus {
  background: rgba(14, 44, 89, 0.06);
  outline: none;
}

.hd-suggest-list strong {
  color: var(--primary-navy);
  font-size: 0.95rem;
}

.hd-suggest-list span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.hd-field-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  flex-direction: row;
}

.hd-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hd-field input,
.hd-field select,
.hd-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
}

.hd-field input:focus,
.hd-field select:focus,
.hd-field textarea:focus {
  outline: none;
  border-color: rgba(14, 44, 89, 0.35);
  box-shadow: 0 0 0 2px rgba(14, 44, 89, 0.08);
}

.hd-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hd-btn-primary,
.hd-btn-secondary,
.hd-btn-text {
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.hd-btn-primary {
  border: none;
  background: var(--primary-navy);
  color: #fff;
}

.hd-btn-primary:hover {
  background: #163d78;
}

.hd-btn-secondary {
  border: 1px solid rgba(14, 44, 89, 0.18);
  background: #fff;
  color: var(--primary-navy);
}

.hd-btn-text {
  border: none;
  background: transparent;
  color: var(--primary-navy);
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hd-form-feedback {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--text-soft);
  font-weight: 600;
}

.hd-list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 10px;
}

.hd-list-toolbar input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
}

.hd-list-toolbar input:focus {
  outline: none;
}

.hd-company-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.hd-company-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 10px;
}

.hd-company-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.hd-company-row-main strong {
  color: var(--primary-navy);
  font-size: 0.95rem;
}

.hd-company-row p {
  margin: 0;
  grid-column: 1;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.hd-company-row .hd-btn-text {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.hd-status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 44, 89, 0.08);
  color: var(--primary-navy);
}

.hd-status-active {
  background: rgba(74, 138, 52, 0.15);
  color: #2d6a24;
}

.hd-status-lead,
.hd-status-proposal {
  background: rgba(196, 166, 107, 0.2);
  color: #7a5f1e;
}

.hd-status-paused,
.hd-status-ended {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

.hd-service-grid--admin {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
}

.hd-service-grid--admin .hd-service-card {
  padding: 14px;
}

.hd-portal-strip {
  margin-bottom: 16px;
  padding: 12px 16px;
}

.hd-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hd-kpi-card {
  padding: 14px;
}

.hd-lead-form {
  max-width: 640px;
}

@media (max-width: 1100px) {
  .hd-admin-layout,
  .hd-admin-layout--reverse,
  .hd-form-grid--cms {
    grid-template-columns: 1fr;
  }

  .hd-company-list,
  .hd-service-grid--admin {
    max-height: none;
  }
}

@media (max-width: 1024px) {
  .hd-portal-body {
    grid-template-columns: 1fr;
  }

  .hd-sidebar-toggle {
    display: inline-flex;
  }

  .hd-portal-sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    z-index: 3;
    width: min(300px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
    box-shadow: 8px 0 32px rgba(10, 33, 61, 0.15);
  }

  .hd-portal-sidebar.is-open {
    transform: translateX(0);
  }

  .hd-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hd-form-grid {
    grid-template-columns: 1fr;
  }

  .hd-portal-container {
    width: calc(100% - 16px);
    padding: 14px 0 24px;
  }

  .hd-portal-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .hd-portal-global-search--compact {
    max-width: none;
  }

  .hd-kpi-grid,
  .hd-service-grid,
  .hd-case-grid,
  .hd-library-grid {
    grid-template-columns: 1fr;
  }

  .hd-portal-actions .hd-auth-btn span:not(.material-symbols-rounded) {
    display: none;
  }

  .hd-panel {
    padding: 14px;
  }
}

/* =============================================================================
   Portal ? vida visual alinhada ao site principal
   ============================================================================= */

.hd-portal {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(74, 138, 52, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(196, 166, 107, 0.2), transparent 50%),
    linear-gradient(165deg, rgba(11, 34, 70, 0.92) 0%, rgba(14, 44, 89, 0.88) 45%, rgba(10, 28, 55, 0.94) 100%);
}

.hd-portal-topbar {
  border-bottom: 1px solid rgba(196, 166, 107, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.94) 100%);
  box-shadow: 0 8px 28px rgba(10, 33, 61, 0.08);
}

.hd-portal-topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-navy) 0%, var(--secondary-green) 55%, var(--accent-gold) 100%);
  opacity: 0.85;
}

.hd-portal-brand-wrap img {
  filter: drop-shadow(0 4px 10px rgba(14, 44, 89, 0.18));
  transition: transform 0.35s ease;
}

.hd-portal-brand-wrap:hover img {
  transform: scale(1.04) rotate(-2deg);
}

.hd-portal-sidebar {
  background:
    radial-gradient(circle at 85% -10%, rgba(196, 166, 107, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(74, 138, 52, 0.22) 0%, transparent 45%),
    linear-gradient(160deg, rgba(14, 44, 89, 0.98) 0%, rgba(11, 34, 70, 0.96) 48%, rgba(46, 107, 63, 0.92) 100%);
  border-right: 1px solid rgba(196, 166, 107, 0.18);
}

.hd-menu-label {
  color: rgba(196, 166, 107, 0.85);
  letter-spacing: 0.14em;
}

.hd-portal-main-menu a {
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.hd-portal-main-menu a:hover,
.hd-portal-main-menu a:focus-visible {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.hd-portal-main-menu a.is-active {
  background: linear-gradient(90deg, rgba(196, 166, 107, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.hd-portal-main-menu a.hd-menu-cta {
  box-shadow: 0 10px 22px rgba(74, 138, 52, 0.35);
  animation: hdCtaPulse 2.8s ease-in-out infinite;
}

@keyframes hdCtaPulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(74, 138, 52, 0.28);
  }
  50% {
    box-shadow: 0 12px 28px rgba(74, 138, 52, 0.45);
  }
}

.hd-portal-content {
  background:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(74, 138, 52, 0.07), transparent 50%),
    radial-gradient(ellipse 50% 35% at 100% 10%, rgba(14, 44, 89, 0.08), transparent 45%),
    linear-gradient(180deg, #eef3f9 0%, #f4f7fb 40%, #eef6f0 100%);
  position: relative;
}

.hd-portal-content::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(14, 44, 89, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 44, 89, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
}

.hd-portal-container {
  position: relative;
  z-index: 1;
}

.hd-portal-strip {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 251, 255, 0.9) 100%);
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(12, 36, 65, 0.06);
}

.hd-access-status {
  color: var(--primary-navy);
}

.hd-access-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--secondary-green);
  box-shadow: 0 0 0 4px rgba(74, 138, 52, 0.18);
  vertical-align: middle;
  animation: hdStatusBlink 2.2s ease-in-out infinite;
}

@keyframes hdStatusBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hd-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(12, 36, 65, 0.07);
  padding: clamp(18px, 2.4vw, 28px);
  overflow: hidden;
}

.hd-portal-hero {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(125deg, rgba(14, 44, 89, 0.94) 0%, rgba(11, 34, 70, 0.88) 48%, rgba(46, 107, 63, 0.82) 100%),
    url('../../img/pg-inst/sed.png') center / cover no-repeat;
  box-shadow: 0 18px 40px rgba(10, 33, 61, 0.18);
}

.hd-portal-hero-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 166, 107, 0.45) 0%, transparent 70%);
  animation: hdHeroFloat 6s ease-in-out infinite;
}

@keyframes hdHeroFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-18px, 14px) scale(1.08);
  }
}

.hd-portal-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.hd-portal-hero .hd-kicker {
  color: var(--accent-gold);
}

.hd-portal-hero h2 {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 1.15;
  color: #fff;
}

.hd-portal-hero h2 span {
  color: #d9c08a;
}

.hd-portal-hero-copy > p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.55;
}

.hd-portal-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hd-portal-hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #eef7e8;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.hd-dashboard .hd-kpi-grid {
  margin-top: 4px;
}

.hd-kpi-card {
  background: linear-gradient(165deg, #ffffff 0%, #f3f8ff 55%, #eef8f1 100%);
  border: 1px solid rgba(14, 44, 89, 0.1);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(12, 36, 65, 0.06);
  overflow: visible;
  animation: hdKpiIn 0.45s ease both;
}

.hd-kpi-card:nth-child(1) {
  animation-delay: 0.04s;
}
.hd-kpi-card:nth-child(2) {
  animation-delay: 0.08s;
}
.hd-kpi-card:nth-child(3) {
  animation-delay: 0.12s;
}
.hd-kpi-card:nth-child(4) {
  animation-delay: 0.16s;
}
.hd-kpi-card:nth-child(5) {
  animation-delay: 0.2s;
}
.hd-kpi-card:nth-child(6) {
  animation-delay: 0.24s;
}

@keyframes hdKpiIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hd-kpi-card .material-symbols-rounded:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(74, 138, 52, 0.12);
  color: var(--secondary-green);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.hd-kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 138, 52, 0.35);
  box-shadow: 0 18px 34px rgba(16, 43, 92, 0.12);
}

.hd-kpi-card.is-open {
  background: linear-gradient(165deg, #ffffff 0%, #e8f6eb 100%);
  border-color: rgba(74, 138, 52, 0.45);
}

.hd-kpi-value {
  background: linear-gradient(90deg, var(--primary-navy), #1f6f4a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hd-panel-head .hd-kicker {
  color: var(--secondary-green);
}

.hd-service-card,
.hd-lead-card,
.hd-case-grid article,
.hd-library-grid article,
.hd-publication-grid article,
.hd-kpi-detail-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.hd-service-card:hover,
.hd-lead-card:hover,
.hd-case-grid article:hover,
.hd-library-grid article:hover,
.hd-publication-grid article:hover,
.hd-kpi-detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 138, 52, 0.28);
  box-shadow: 0 16px 30px rgba(12, 36, 65, 0.1);
}

.hd-auth-modal-card {
  border: 1px solid rgba(14, 44, 89, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(10, 33, 61, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  overflow: hidden;
}

.hd-auth-modal-card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-navy), var(--secondary-green), var(--accent-gold));
}

.hd-portal-footer {
  margin-top: 24px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 44, 89, 0.96), rgba(11, 34, 70, 0.94));
  border: 1px solid rgba(196, 166, 107, 0.25);
}

.hd-portal-footer a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}

.hd-portal-footer a:hover {
  color: var(--accent-gold);
}

.hd-feedback-carousel article {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(12, 36, 65, 0.07);
}

.hd-user-pill {
  background: linear-gradient(135deg, rgba(74, 138, 52, 0.12), rgba(14, 44, 89, 0.08));
  border: 1px solid rgba(74, 138, 52, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .hd-portal-main-menu a.hd-menu-cta,
  .hd-access-status::before,
  .hd-portal-hero-glow,
  .hd-kpi-card {
    animation: none !important;
  }

  .hd-portal-main-menu a:hover,
  .hd-kpi-card:hover,
  .hd-service-card:hover {
    transform: none;
  }
}

@media (max-width: 640px) {
  .hd-portal-hero {
    padding: 20px 16px;
  }

  .hd-portal-hero h2 {
    font-size: 1.4rem;
  }
}

/* =============================================================================
   Todas as abas do portal ? banners, cards, forms, IA, admin, cliente
   ============================================================================= */

.hd-portal-section > .hd-panel-head {
  position: relative;
  margin: -6px -6px 22px;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(14, 44, 89, 0.1);
  background:
    linear-gradient(125deg, rgba(14, 44, 89, 0.96) 0%, rgba(11, 34, 70, 0.9) 55%, rgba(47, 107, 63, 0.88) 100%);
  box-shadow: 0 14px 30px rgba(10, 33, 61, 0.12);
  animation: hdSectionHeadIn 0.4s ease both;
}

.hd-portal-section > .hd-panel-head::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -50px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 166, 107, 0.4) 0%, transparent 70%);
  animation: hdHeroFloat 7s ease-in-out infinite;
}

.hd-portal-section > .hd-panel-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--secondary-green), transparent);
}

.hd-portal-section[data-zone='client'] > .hd-panel-head {
  background:
    linear-gradient(125deg, rgba(14, 44, 89, 0.95) 0%, rgba(42, 74, 48, 0.9) 50%, rgba(140, 110, 50, 0.78) 100%);
}

.hd-portal-section[data-zone='admin'] > .hd-panel-head {
  background:
    linear-gradient(125deg, #0b2246 0%, #0e2c59 50%, #163d78 100%);
}

.hd-portal-section > .hd-panel-head .hd-kicker {
  position: relative;
  z-index: 1;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.hd-portal-section > .hd-panel-head h2 {
  position: relative;
  z-index: 1;
  color: #fff !important;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hd-portal-section > .hd-panel-head p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.86) !important;
  margin: 8px 0 0;
  max-width: 42rem;
}

.hd-portal-section > .hd-panel-head .hd-auth-message {
  color: rgba(217, 192, 138, 0.95) !important;
  font-weight: 600;
}

@keyframes hdSectionHeadIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hd-portal-section.is-active:not(.hd-is-hidden) {
  animation: hdPortalFade 0.38s ease;
}

.hd-portal-section .hd-service-grid,
.hd-portal-section .hd-case-grid,
.hd-portal-section .hd-library-grid,
.hd-portal-section .hd-publication-grid,
.hd-portal-section .hd-leads-grid,
.hd-portal-section .hd-favorites-grid,
.hd-portal-section .hd-kpi-detail-grid {
  gap: 16px;
}

.hd-portal-section .hd-service-card,
.hd-portal-section .hd-case-grid article,
.hd-portal-section .hd-library-grid article,
.hd-portal-section .hd-publication-grid article,
.hd-portal-section .hd-lead-card,
.hd-portal-section .hd-favorites-grid article,
.hd-portal-section .hd-company-row,
.hd-portal-section .hd-history-item {
  background: linear-gradient(165deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid rgba(14, 44, 89, 0.09);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(12, 36, 65, 0.06);
  animation: hdKpiIn 0.4s ease both;
}

.hd-portal-section .hd-service-card:nth-child(1),
.hd-portal-section .hd-case-grid article:nth-child(1),
.hd-portal-section .hd-library-grid article:nth-child(1),
.hd-portal-section .hd-publication-grid article:nth-child(1),
.hd-portal-section .hd-lead-card:nth-child(1) {
  animation-delay: 0.05s;
}

.hd-portal-section .hd-service-card:nth-child(2),
.hd-portal-section .hd-case-grid article:nth-child(2),
.hd-portal-section .hd-library-grid article:nth-child(2),
.hd-portal-section .hd-publication-grid article:nth-child(2),
.hd-portal-section .hd-lead-card:nth-child(2) {
  animation-delay: 0.1s;
}

.hd-portal-section .hd-service-card:nth-child(3),
.hd-portal-section .hd-case-grid article:nth-child(3),
.hd-portal-section .hd-library-grid article:nth-child(3),
.hd-portal-section .hd-publication-grid article:nth-child(3),
.hd-portal-section .hd-lead-card:nth-child(3) {
  animation-delay: 0.15s;
}

.hd-library-search {
  background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid rgba(14, 44, 89, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(12, 36, 65, 0.06);
  padding: 4px 6px 4px 14px;
  margin-bottom: 18px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hd-library-search:focus-within {
  border-color: rgba(74, 138, 52, 0.45);
  box-shadow: 0 10px 24px rgba(74, 138, 52, 0.12);
}

.hd-library-search .material-symbols-rounded {
  color: var(--secondary-green);
}

.hd-ai-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border: 1px solid rgba(14, 44, 89, 0.1);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(12, 36, 65, 0.08);
  overflow: hidden;
}

.hd-ai-messages {
  background:
    radial-gradient(circle at 100% 0%, rgba(74, 138, 52, 0.06), transparent 40%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.hd-ai-messages article {
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 12px;
  border-left: 3px solid var(--secondary-green);
  box-shadow: 0 6px 16px rgba(12, 36, 65, 0.05);
  animation: hdKpiIn 0.35s ease both;
}

.hd-ai-input {
  background: linear-gradient(180deg, rgba(14, 44, 89, 0.03), rgba(74, 138, 52, 0.05));
  border-top: 1px solid rgba(14, 44, 89, 0.08);
  padding: 14px;
}

.hd-ai-input button {
  background: linear-gradient(135deg, var(--secondary-green) 0%, #3d7a32 100%);
  color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(74, 138, 52, 0.28);
}

.hd-lead-form,
.hd-form-compact {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(14, 44, 89, 0.1);
  border-radius: 16px;
  padding: clamp(16px, 2vw, 24px);
  box-shadow: 0 12px 28px rgba(12, 36, 65, 0.07);
}

.hd-field input,
.hd-field select,
.hd-field textarea,
.hd-lead-form input,
.hd-lead-form select,
.hd-lead-form textarea,
.hd-auth-form input {
  border-radius: 12px !important;
  border-color: rgba(14, 44, 89, 0.14) !important;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hd-field input:focus,
.hd-field select:focus,
.hd-field textarea:focus,
.hd-lead-form input:focus,
.hd-lead-form select:focus,
.hd-lead-form textarea:focus,
.hd-auth-form input:focus {
  border-color: rgba(74, 138, 52, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(74, 138, 52, 0.14);
  outline: none;
}

.hd-profile-card,
#hdMyCompanyCard {
  background: linear-gradient(145deg, #ffffff 0%, #f3f8ff 55%, #eef8f1 100%);
  border: 1px solid rgba(14, 44, 89, 0.1);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 14px 30px rgba(12, 36, 65, 0.08);
  position: relative;
  overflow: hidden;
}

.hd-profile-card::before,
#hdMyCompanyCard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-navy), var(--secondary-green), var(--accent-gold));
}

.hd-timeline .hd-history-item {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
}

.hd-timeline .hd-history-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary-green);
  box-shadow: 0 0 0 4px rgba(74, 138, 52, 0.16);
}

.hd-admin-form-col,
.hd-admin-list-col {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.95));
  border: 1px solid rgba(14, 44, 89, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(12, 36, 65, 0.05);
}

.hd-list-toolbar {
  background: rgba(14, 44, 89, 0.04);
  border-radius: 999px;
  border: 1px solid rgba(14, 44, 89, 0.08);
  padding: 6px 12px;
  margin-bottom: 12px;
}

.hd-company-row {
  padding: 14px;
  margin-bottom: 10px;
}

.hd-company-row:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 138, 52, 0.28);
}

.hd-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hd-status-active {
  background: rgba(74, 138, 52, 0.14);
  color: #2d5136;
}

.hd-status-lead,
.hd-status-proposal {
  background: rgba(196, 166, 107, 0.2);
  color: #6a5220;
}

.hd-status-paused,
.hd-status-ended {
  background: rgba(14, 44, 89, 0.1);
  color: #355070;
}

.hd-card-actions button,
.hd-btn-secondary,
.hd-btn-text {
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hd-card-actions button:hover,
.hd-btn-secondary:hover {
  transform: translateY(-1px);
}

.hd-feedback-carousel {
  border-radius: 16px;
  overflow: hidden;
}

.hd-kpi-detail-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border-color: rgba(14, 44, 89, 0.1);
}

.hd-portal-section#hd-contratar .hd-lead-form {
  max-width: 720px;
}

@media (prefers-reduced-motion: reduce) {
  .hd-portal-section > .hd-panel-head,
  .hd-portal-section > .hd-panel-head::before,
  .hd-portal-section .hd-service-card,
  .hd-portal-section .hd-lead-card,
  .hd-portal-section .hd-case-grid article,
  .hd-ai-messages article {
    animation: none !important;
  }
}

/* =============================================================================
   Portal ? refinamento elegante + motion (todas as abas)
   ============================================================================= */

@keyframes hdPortalFade {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes hdShimmerSweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes hdSoftRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hdIconPop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

@keyframes hdUnderlineGrow {
  from {
    transform: scaleX(0.2);
    opacity: 0.4;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes hdAuthIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hdFeedbackSwap {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hd-portal-section.is-active:not(.hd-is-hidden) {
  animation: hdPortalFade 0.48s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.hd-portal-content {
  scroll-behavior: smooth;
}

.hd-portal-main-menu a {
  position: relative;
  overflow: hidden;
}

.hd-portal-main-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-gold), #e8d4a8);
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.hd-portal-main-menu a:hover::after,
.hd-portal-main-menu a.is-active::after {
  opacity: 1;
  transform: scaleY(1);
}

.hd-portal-main-menu a.is-active {
  background: linear-gradient(90deg, rgba(196, 166, 107, 0.22) 0%, rgba(255, 255, 255, 0.1) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(196, 166, 107, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.hd-portal-main-menu a:hover .material-symbols-rounded,
.hd-portal-main-menu a.is-active .material-symbols-rounded {
  animation: hdIconPop 0.45s ease;
  color: #f0e2bf;
}

.hd-portal-main-menu a.hd-menu-cta::after {
  display: none;
}

.hd-portal-main-menu a.hd-menu-cta {
  position: relative;
  overflow: hidden;
}

.hd-portal-main-menu a.hd-menu-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: hdShimmerSweep 3.6s ease-in-out infinite;
}

.hd-portal-actions button {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease;
}

.hd-portal-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 138, 52, 0.35);
  box-shadow: 0 8px 18px rgba(12, 36, 65, 0.1);
}

.hd-portal-actions .hd-portal-exit:hover {
  border-color: rgba(160, 50, 50, 0.35);
  color: #8a2e2e;
}

.hd-user-pill {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.hd-user-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(12, 36, 65, 0.08);
}

.hd-search-row,
.hd-portal-global-search--compact .hd-search-row {
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.1);
  box-shadow: 0 8px 20px rgba(12, 36, 65, 0.05);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.hd-search-row:focus-within,
.hd-portal-global-search--compact .hd-search-row:focus-within {
  border-color: rgba(74, 138, 52, 0.45);
  box-shadow:
    0 0 0 4px rgba(74, 138, 52, 0.1),
    0 12px 28px rgba(12, 36, 65, 0.1);
  transform: translateY(-1px);
}

.hd-portal-hero {
  animation: hdSoftRise 0.55s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.hd-portal-hero-tags span {
  transition:
    transform 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.hd-portal-hero-tags span:hover {
  transform: translateY(-2px);
  background: rgba(196, 166, 107, 0.22);
  border-color: rgba(217, 192, 138, 0.55);
  color: #fff;
}

.hd-portal-section > .hd-panel-head {
  animation: hdSectionHeadIn 0.5s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.hd-portal-section > .hd-panel-head::after {
  transform-origin: left center;
  animation: hdUnderlineGrow 0.7s ease 0.15s both;
}

.hd-portal-section .hd-service-card,
.hd-portal-section .hd-case-grid article,
.hd-portal-section .hd-library-grid article,
.hd-portal-section .hd-publication-grid article,
.hd-portal-section .hd-lead-card,
.hd-portal-section .hd-favorites-grid article,
.hd-portal-section .hd-company-row,
.hd-portal-section .hd-history-item,
.hd-portal-section .hd-kpi-detail-card,
.hd-feedback-carousel article {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.22, 0.82, 0.28, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.hd-portal-section .hd-service-card::before,
.hd-portal-section .hd-case-grid article::before,
.hd-portal-section .hd-library-grid article::before,
.hd-portal-section .hd-publication-grid article::before,
.hd-portal-section .hd-lead-card::before,
.hd-portal-section .hd-favorites-grid article::before,
.hd-portal-section .hd-kpi-detail-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-navy), var(--secondary-green), var(--accent-gold));
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.hd-portal-section .hd-service-card:hover::before,
.hd-portal-section .hd-case-grid article:hover::before,
.hd-portal-section .hd-library-grid article:hover::before,
.hd-portal-section .hd-publication-grid article:hover::before,
.hd-portal-section .hd-lead-card:hover::before,
.hd-portal-section .hd-favorites-grid article:hover::before,
.hd-portal-section .hd-kpi-detail-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.hd-portal-section .hd-service-card:hover,
.hd-portal-section .hd-case-grid article:hover,
.hd-portal-section .hd-library-grid article:hover,
.hd-portal-section .hd-publication-grid article:hover,
.hd-portal-section .hd-lead-card:hover,
.hd-portal-section .hd-favorites-grid article:hover,
.hd-portal-section .hd-company-row:hover,
.hd-portal-section .hd-history-item:hover,
.hd-portal-section .hd-kpi-detail-card:hover {
  transform: translateY(-5px);
  border-color: rgba(74, 138, 52, 0.32);
  box-shadow: 0 20px 36px rgba(12, 36, 65, 0.12);
}

.hd-portal-section .hd-service-card:nth-child(n + 4),
.hd-portal-section .hd-case-grid article:nth-child(n + 4),
.hd-portal-section .hd-library-grid article:nth-child(n + 4),
.hd-portal-section .hd-lead-card:nth-child(n + 4),
.hd-portal-section .hd-favorites-grid article:nth-child(n),
.hd-portal-section .hd-history-item:nth-child(n),
.hd-portal-section .hd-company-row:nth-child(n) {
  animation: hdSoftRise 0.45s ease both;
}

.hd-portal-section .hd-service-card:nth-child(4),
.hd-portal-section .hd-case-grid article:nth-child(4),
.hd-portal-section .hd-library-grid article:nth-child(4),
.hd-portal-section .hd-lead-card:nth-child(4),
.hd-portal-section .hd-favorites-grid article:nth-child(1),
.hd-portal-section .hd-history-item:nth-child(1),
.hd-portal-section .hd-company-row:nth-child(1) {
  animation-delay: 0.08s;
}

.hd-portal-section .hd-service-card:nth-child(5),
.hd-portal-section .hd-case-grid article:nth-child(5),
.hd-portal-section .hd-library-grid article:nth-child(5),
.hd-portal-section .hd-lead-card:nth-child(5),
.hd-portal-section .hd-favorites-grid article:nth-child(2),
.hd-portal-section .hd-history-item:nth-child(2),
.hd-portal-section .hd-company-row:nth-child(2) {
  animation-delay: 0.14s;
}

.hd-portal-section .hd-service-card:nth-child(6),
.hd-portal-section .hd-case-grid article:nth-child(6),
.hd-portal-section .hd-library-grid article:nth-child(6),
.hd-portal-section .hd-lead-card:nth-child(6),
.hd-portal-section .hd-favorites-grid article:nth-child(3),
.hd-portal-section .hd-history-item:nth-child(3),
.hd-portal-section .hd-company-row:nth-child(3) {
  animation-delay: 0.2s;
}

.hd-kpi-card {
  transition:
    transform 0.3s cubic-bezier(0.22, 0.82, 0.28, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.hd-kpi-card .material-symbols-rounded:first-child {
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

.hd-kpi-card:hover .material-symbols-rounded:first-child {
  transform: scale(1.08) rotate(-4deg);
  background: rgba(74, 138, 52, 0.2);
  box-shadow: 0 8px 16px rgba(74, 138, 52, 0.18);
}

.hd-kpi-caret {
  transition: transform 0.28s ease;
}

.hd-lead-form,
.hd-form-compact,
.hd-admin-form-col,
.hd-admin-list-col,
.hd-profile-card,
#hdMyCompanyCard,
.hd-ai-shell {
  animation: hdSoftRise 0.5s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.hd-btn-primary,
.hd-lead-form .hd-btn-primary,
.hd-card-actions button,
.hd-ai-input button {
  position: relative;
  overflow: hidden;
}

.hd-btn-primary::after,
.hd-lead-form .hd-btn-primary::after,
.hd-ai-input button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.55s ease;
}

.hd-btn-primary:hover::after,
.hd-lead-form .hd-btn-primary:hover::after,
.hd-ai-input button:hover::after {
  transform: translateX(130%);
}

.hd-btn-primary,
.hd-lead-form .hd-btn-primary {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.hd-btn-primary:hover,
.hd-lead-form .hd-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(74, 138, 52, 0.28);
}

.hd-timeline {
  position: relative;
  padding-left: 6px;
}

.hd-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--secondary-green), rgba(14, 44, 89, 0.15));
  border-radius: 999px;
}

.hd-timeline .hd-history-item::before {
  animation: hdStatusBlink 2.4s ease-in-out infinite;
}

.hd-feedback-carousel article.is-active {
  animation: hdFeedbackSwap 0.4s ease both;
}

.hd-auth-modal[aria-hidden='false'] .hd-auth-modal-card {
  animation: hdAuthIn 0.4s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

.hd-empty-state,
.hd-portal-section .hd-empty,
.hd-portal-section [class*='empty'] {
  animation: hdSoftRise 0.4s ease both;
}

.hd-status-badge,
.hd-portal-section .hd-status {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hd-portal-section .hd-company-row:hover .hd-status-badge,
.hd-portal-section .hd-lead-card:hover .hd-status {
  transform: translateY(-1px);
}

.hd-portal-footer {
  animation: hdSoftRise 0.55s ease 0.1s both;
}

.hd-portal-footer a {
  position: relative;
}

.hd-portal-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.hd-portal-footer a:hover::after {
  transform: scaleX(1);
}

.hd-kpi-detail-panel:not([hidden]) .hd-kpi-detail-shell {
  animation: hdSoftRise 0.4s cubic-bezier(0.22, 0.82, 0.28, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .hd-portal-section.is-active:not(.hd-is-hidden),
  .hd-portal-hero,
  .hd-portal-section > .hd-panel-head,
  .hd-portal-section > .hd-panel-head::after,
  .hd-portal-section .hd-service-card,
  .hd-portal-section .hd-case-grid article,
  .hd-portal-section .hd-library-grid article,
  .hd-portal-section .hd-lead-card,
  .hd-portal-section .hd-favorites-grid article,
  .hd-portal-section .hd-history-item,
  .hd-portal-section .hd-company-row,
  .hd-lead-form,
  .hd-form-compact,
  .hd-admin-form-col,
  .hd-admin-list-col,
  .hd-profile-card,
  #hdMyCompanyCard,
  .hd-ai-shell,
  .hd-portal-footer,
  .hd-auth-modal[aria-hidden='false'] .hd-auth-modal-card,
  .hd-feedback-carousel article.is-active,
  .hd-portal-main-menu a:hover .material-symbols-rounded,
  .hd-portal-main-menu a.is-active .material-symbols-rounded,
  .hd-portal-main-menu a.hd-menu-cta::before,
  .hd-timeline .hd-history-item::before {
    animation: none !important;
  }

  .hd-portal-section .hd-service-card:hover,
  .hd-portal-section .hd-case-grid article:hover,
  .hd-portal-section .hd-library-grid article:hover,
  .hd-kpi-card:hover,
  .hd-portal-actions button:hover,
  .hd-btn-primary:hover {
    transform: none;
  }
}

/* =============================================================================
   Portal ? cabe�alho elegante (mesma cor do banner/menu)
   ============================================================================= */

.hd-portal-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 96px;
  padding: 12px clamp(18px, 2.6vw, 36px);
  background:
    radial-gradient(circle at 88% -20%, rgba(196, 166, 107, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 8% 120%, rgba(74, 138, 52, 0.22) 0%, transparent 45%),
    linear-gradient(125deg, rgba(14, 44, 89, 0.98) 0%, rgba(11, 34, 70, 0.95) 48%, rgba(46, 107, 63, 0.92) 100%);
  border-bottom: 1px solid rgba(196, 166, 107, 0.22);
  box-shadow: 0 12px 28px rgba(10, 33, 61, 0.18);
  backdrop-filter: none;
  grid-template-columns: none;
}

.hd-portal-topbar::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-gold), var(--secondary-green), transparent);
}

.hd-portal-topbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-gold) 0%,
    var(--secondary-green) 40%,
    rgba(255, 255, 255, 0.25) 72%,
    transparent 100%
  );
  opacity: 0.9;
}

.hd-portal-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.hd-portal-topbar .hd-portal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.hd-portal-topbar .hd-portal-brand > img {
  width: 84px !important;
  height: 84px !important;
  object-fit: contain;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
  transform: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hd-portal-topbar .hd-portal-brand:hover > img {
  transform: translateY(-1px);
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
}

.hd-portal-topbar .hd-portal-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
  padding-top: 2px;
}

.hd-portal-topbar .hd-portal-brand .brand-kicker {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(217, 192, 138, 0.92);
}

.hd-portal-topbar .hd-portal-brand .brand-text strong {
  position: relative;
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hd-portal-topbar .hd-portal-brand .brand-text strong::after {
  content: '';
  display: block;
  width: 42px;
  height: 2px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-gold), var(--secondary-green));
}

.hd-portal-topbar .hd-portal-brand .brand-text strong span {
  color: #d9c08a;
}

.hd-portal-topbar .hd-portal-brand .brand-text small {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(232, 240, 248, 0.72);
  margin-top: 6px;
}

.hd-portal-brand-divider {
  display: inline-block;
  width: 1px;
  height: 42px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.28) 20%,
    rgba(255, 255, 255, 0.28) 80%,
    transparent
  );
  flex: 0 0 auto;
}

.hd-portal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4efe3;
  background: rgba(196, 166, 107, 0.22);
  border: 1px solid rgba(196, 166, 107, 0.45);
}

.hd-portal-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.hd-portal-actions-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hd-portal-actions .hd-user-pill {
  min-height: 40px;
  padding: 0 16px 0 28px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  position: relative;
}

.hd-portal-actions .hd-user-pill::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #8fd36a;
  box-shadow: 0 0 0 3px rgba(143, 211, 106, 0.25);
}

.hd-user-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hd-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex: 0 0 auto;
}

.hd-user-name {
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  line-height: 1.2;
}

.hd-user-identity.is-online .hd-user-avatar {
  border-color: #8fd36a;
  box-shadow: 0 0 0 3px rgba(143, 211, 106, 0.28);
}

.hd-user-identity.is-online .hd-user-name {
  border-color: #8fd36a;
  background: rgba(143, 211, 106, 0.14);
}

.hd-user-identity.is-offline .hd-user-avatar {
  border-color: #9aa7b5;
  box-shadow: 0 0 0 3px rgba(154, 167, 181, 0.2);
}

.hd-user-identity.is-offline .hd-user-name {
  border-color: #9aa7b5;
  background: rgba(154, 167, 181, 0.14);
}

.hd-online-hint {
  margin: 0 0 1rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.hd-online-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(74, 138, 52, 0.1);
  border: 1px solid rgba(74, 138, 52, 0.22);
  color: var(--primary-navy);
}

.hd-online-summary strong {
  font-size: 1.25rem;
  color: var(--secondary-green);
}

.hd-online-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.hd-online-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.hd-online-card.is-online {
  border-color: rgba(74, 138, 52, 0.35);
  box-shadow: 0 8px 20px rgba(14, 44, 89, 0.06);
}

.hd-online-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #8fd36a;
  box-shadow: 0 0 0 3px rgba(143, 211, 106, 0.2);
}

.hd-online-copy strong {
  display: block;
  color: var(--primary-navy);
  font-size: 0.95rem;
}

.hd-online-copy p {
  margin: 0.15rem 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hd-online-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1f5d2a;
  background: rgba(143, 211, 106, 0.22);
}

.hd-online-empty {
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--text-soft);
  background: #f8fafc;
}

.hd-profiles-block {
  margin-top: 1.5rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(14, 44, 89, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f7fafc 100%);
  box-shadow: 0 10px 28px rgba(14, 44, 89, 0.05);
}

.hd-profiles-block--team {
  border-top: 3px solid var(--accent-gold);
}

.hd-profiles-block--clients {
  border-top: 3px solid var(--secondary-green);
}

.hd-profiles-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(14, 44, 89, 0.08);
}

.hd-profiles-head .hd-kicker {
  margin: 0 0 0.2rem;
}

.hd-profiles-head h3 {
  margin: 0 0 0.3rem;
  color: var(--primary-navy);
  font-family: Merriweather, Georgia, serif;
  font-size: 1.2rem;
}

.hd-profiles-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 44ch;
}

.hd-profiles-note {
  flex: 0 1 220px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(14, 44, 89, 0.05);
  border: 1px solid rgba(14, 44, 89, 0.08);
  color: #5a6c80;
  font-size: 0.76rem;
  line-height: 1.4;
}

.hd-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 1.15rem 1rem;
  padding: 0.15rem 0.1rem;
}

.hd-profile-photo-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 999px;
  overflow: visible;
  cursor: pointer;
  background: transparent;
  transition: transform 0.22s ease;
}

.hd-profile-photo-ring {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(160deg, #0e2c59 0%, #1a457f 100%);
  box-shadow:
    0 0 0 1px rgba(14, 44, 89, 0.1),
    0 8px 18px rgba(14, 44, 89, 0.12);
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.hd-profile-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hd-profile-photo-card::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, rgba(196, 166, 107, 0.85), rgba(14, 44, 89, 0.35)) border-box;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.hd-profile-photo-card:hover {
  transform: translateY(-2px);
}

.hd-profile-photo-card:hover .hd-profile-photo-ring {
  box-shadow:
    0 0 0 1px rgba(14, 44, 89, 0.12),
    0 14px 28px rgba(14, 44, 89, 0.18);
}

.hd-profile-photo-card:hover::after,
.hd-profile-photo-card:focus-visible::after {
  opacity: 1;
}

.hd-profile-photo-card:focus-visible {
  outline: none;
}

.hd-profile-detail {
  position: fixed;
  inset: 0;
  z-index: 13100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(8, 24, 48, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.hd-profile-detail.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hd-profile-detail-card {
  position: relative;
  width: min(400px, 100%);
  padding: 0;
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 28px 56px rgba(8, 24, 48, 0.28);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.hd-profile-detail.is-open .hd-profile-detail-card {
  transform: translateY(0) scale(1);
}

.hd-profile-detail-hero {
  position: relative;
  padding: 2.1rem 1.5rem 1.25rem;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(196, 166, 107, 0.18), transparent 55%),
    linear-gradient(180deg, #f4f7fb 0%, #ffffff 100%);
}

.hd-profile-detail-hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, #0e2c59 0%, #c4a66b 50%, #0e2c59 100%);
}

.hd-profile-detail-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(14, 44, 89, 0.06);
  color: #5a6c80;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.hd-profile-detail-close:hover {
  background: rgba(14, 44, 89, 0.12);
  color: var(--primary-navy);
}

.hd-profile-detail-close .material-symbols-rounded {
  font-size: 1.15rem;
}

.hd-profile-detail-avatar-wrap {
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(145deg, rgba(196, 166, 107, 0.95), rgba(14, 44, 89, 0.55));
  box-shadow: 0 10px 24px rgba(14, 44, 89, 0.14);
}

.hd-profile-detail-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 3px solid #fff;
  background: #0e2c59;
}

.hd-profile-detail-kicker {
  margin: 0 0 0.35rem;
  color: #8a7350;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hd-profile-detail-card h3,
.hd-profile-detail-hero h3 {
  margin: 0 0 0.3rem;
  color: var(--primary-navy);
  font-family: Merriweather, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hd-profile-detail-email {
  margin: 0;
  color: #6b7785;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.hd-profile-detail-body {
  padding: 0 1.5rem 1.15rem;
}

.hd-profile-detail-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.hd-profile-detail-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(14, 44, 89, 0.04);
  color: #5a6c80;
  font-size: 0.78rem;
  line-height: 1.3;
}

.hd-profile-detail-meta .material-symbols-rounded {
  font-size: 1rem;
  color: #9a7f52;
}

.hd-profile-detail-actions {
  display: flex;
  justify-content: center;
  padding: 0.95rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(14, 44, 89, 0.08);
  background: #fafbfc;
}

.hd-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary-navy);
  background: rgba(14, 44, 89, 0.07);
  border: 1px solid rgba(14, 44, 89, 0.06);
}

.hd-profile-tag--soft {
  color: #4d5b6b;
  background: rgba(77, 91, 107, 0.08);
}

.hd-profile-tag--ok {
  color: #1f5d2a;
  background: rgba(74, 138, 52, 0.1);
  border-color: rgba(74, 138, 52, 0.12);
}

.hd-profile-tag--warn {
  color: #8a4b12;
  background: rgba(196, 166, 107, 0.18);
  border-color: rgba(196, 166, 107, 0.28);
}

.hd-profile-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.hd-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: #9b1c1c;
  flex: 0 0 auto;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.hd-btn-danger--ghost {
  color: #9b1c1c;
  background: transparent;
  border: 1px solid rgba(155, 28, 28, 0.28);
  box-shadow: none;
}

.hd-btn-danger--ghost:hover:not(:disabled) {
  color: #fff;
  background: #9b1c1c;
  border-color: #9b1c1c;
  box-shadow: 0 8px 18px rgba(155, 28, 28, 0.18);
}

.hd-btn-danger .material-symbols-rounded {
  font-size: 1.05rem;
  line-height: 1;
}

.hd-btn-danger:hover:not(:disabled):not(.hd-btn-danger--ghost) {
  background: #7f1d1d;
}

.hd-btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 720px) {
  .hd-profiles-head {
    flex-direction: column;
  }

  .hd-profiles-note {
    flex: 1 1 auto;
    width: 100%;
  }

  .hd-profiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 1rem 0.85rem;
  }

  .hd-profile-detail-hero {
    padding: 1.85rem 1.2rem 1.1rem;
  }

  .hd-profile-detail-body,
  .hd-profile-detail-actions {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}

.hd-portal-actions .hd-auth-btn,
.hd-portal-actions .hd-portal-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.hd-portal-actions .hd-auth-btn {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b8924f 100%);
  color: #102b5c;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.hd-portal-actions .hd-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.24);
}

.hd-portal-actions .hd-auth-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.hd-portal-actions .hd-auth-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
}

.hd-portal-actions .hd-portal-exit {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.hd-portal-actions .hd-portal-exit:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.hd-portal-topbar .hd-sidebar-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

.hd-portal-topbar .hd-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 1024px) {
  .hd-portal-sidebar {
    top: 96px;
  }
}

@media (max-width: 1100px) {
  .hd-portal-brand-divider,
  .hd-portal-chip {
    display: none;
  }
}

@media (max-width: 900px) {
  .hd-portal-topbar .hd-portal-brand .brand-text small {
    display: none;
  }

  .hd-portal-topbar .hd-portal-brand .brand-text strong {
    font-size: 1.4rem;
  }

  .hd-portal-topbar .hd-portal-brand .brand-text strong::after {
    width: 28px;
    margin-top: 4px;
  }

  .hd-portal-topbar .hd-portal-brand > img {
    width: 68px !important;
    height: 68px !important;
  }
}

@media (max-width: 640px) {
  .hd-portal-topbar {
    min-height: 80px;
    padding: 8px 12px 8px 14px;
    gap: 10px;
  }

  .hd-portal-topbar-left {
    gap: 10px;
  }

  .hd-portal-topbar .hd-portal-brand {
    gap: 10px;
  }

  .hd-portal-topbar .hd-portal-brand .brand-kicker {
    font-size: 0.55rem;
  }

  .hd-portal-topbar .hd-portal-brand .brand-text strong {
    font-size: 1.15rem;
  }

  .hd-portal-topbar .hd-portal-brand .brand-text strong::after {
    display: none;
  }

  .hd-portal-topbar .hd-portal-brand > img {
    width: 56px !important;
    height: 56px !important;
  }

  .hd-portal-actions {
    gap: 8px;
  }

  .hd-portal-actions-tools {
    padding: 4px;
  }

  .hd-portal-actions .hd-user-pill {
    min-height: 34px;
    padding: 0 10px 0 24px;
    font-size: 0.7rem;
  }

  .hd-portal-actions .hd-auth-btn span:not(.material-symbols-rounded),
  .hd-portal-actions .hd-portal-exit span:not(.material-symbols-rounded) {
    display: none;
  }

  .hd-portal-actions .hd-auth-btn,
  .hd-portal-actions .hd-portal-exit {
    min-width: 36px;
    padding: 0 9px;
  }

  .hd-portal-sidebar {
    top: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-portal-topbar .hd-portal-brand > img,
  .hd-portal-actions .hd-auth-btn,
  .hd-portal-actions .hd-portal-exit {
    transition: none;
  }

  .hd-portal-topbar .hd-portal-brand:hover > img,
  .hd-portal-actions .hd-auth-btn:hover,
  .hd-portal-actions .hd-portal-exit:hover {
    transform: none;
  }
}

/* =============================================================================
   Homo Data Agro ? p�gina reorganizada
   ============================================================================= */

.unit-standalone-agro {
  background: #f3f7f2;
}

.agro-site {
  min-height: 100vh;
}

.agro-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background:
    linear-gradient(125deg, rgba(14, 44, 89, 0.97) 0%, rgba(11, 34, 70, 0.94) 45%, rgba(46, 107, 63, 0.92) 100%);
  border-bottom: 1px solid rgba(196, 166, 107, 0.28);
  box-shadow: 0 10px 24px rgba(10, 33, 61, 0.16);
}

.agro-topbar-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agro-topbar-brand {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.agro-topbar-brand span {
  color: #d9c08a;
}

.agro-topbar .unit-back-link,
.agro-topbar .unit-close-btn {
  min-height: 36px;
  font-size: 0.7rem;
}

.agro-topbar .unit-back-link {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.agro-topbar .unit-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(196, 166, 107, 0.4);
}

.agro-hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.agro-hero-media,
.agro-hero-overlay {
  position: absolute;
  inset: 0;
}

.agro-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
}

.agro-hero-overlay {
  background:
    linear-gradient(120deg, rgba(8, 24, 40, 0.88) 0%, rgba(14, 44, 89, 0.72) 48%, rgba(46, 107, 63, 0.55) 100%),
    linear-gradient(0deg, rgba(8, 24, 40, 0.55), transparent 45%);
}

.agro-hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(56px, 9vh, 110px) 0 clamp(52px, 8vh, 88px);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.agro-eyebrow,
.agro-hero .section-eyebrow,
.agro-section-head .section-eyebrow {
  color: #c4a66b;
}

.agro-hero .agro-eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.agro-hero h1 {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.75rem, 3.6vw, 2.65rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 14ch;
  font-weight: 700;
}

.agro-hero h1 span {
  display: block;
  margin-top: 8px;
  max-width: 18ch;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.92);
}

.agro-hero-lead,
.agro-hero-content > p {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.98rem, 1.35vw, 1.08rem);
  line-height: 1.55;
  max-width: 34rem;
  font-weight: 400;
}

.agro-hero-actions,
.agro-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.agro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.agro-btn-primary {
  background: linear-gradient(135deg, var(--secondary-green) 0%, #3d7a32 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(46, 107, 63, 0.28);
}

.agro-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.agro-btn:hover {
  transform: translateY(-2px);
}

.agro-section {
  padding: clamp(48px, 7vw, 88px) 0;
}

.agro-section .container {
  width: min(1180px, calc(100% - 32px));
}

.agro-section-head {
  margin-bottom: 28px;
  max-width: 42rem;
}

.agro-section-head h2 {
  margin: 0;
  color: var(--primary-navy);
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.2;
}

.agro-for {
  background: #fff;
}

.agro-for-grid,
.agro-services-grid,
.agro-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.agro-for-grid article,
.agro-services-grid article,
.agro-results-grid article {
  background: linear-gradient(165deg, #ffffff 0%, #f5faf5 100%);
  border: 1px solid rgba(46, 107, 63, 0.14);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 12px 26px rgba(12, 36, 65, 0.06);
}

.agro-for-grid h3,
.agro-services-grid h3,
.agro-results-grid h3 {
  margin: 0 0 8px;
  color: var(--primary-navy);
  font-size: 1.15rem;
}

.agro-for-grid p,
.agro-services-grid p,
.agro-results-grid p {
  margin: 0;
  color: #456074;
  line-height: 1.5;
  font-size: 0.98rem;
}

.agro-services {
  background:
    radial-gradient(circle at 90% 10%, rgba(196, 166, 107, 0.12), transparent 40%),
    linear-gradient(180deg, #f3f7f2 0%, #eaf3ea 100%);
}

.agro-step {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--secondary-green);
}

.agro-gallery {
  background: #fff;
}

.agro-gallery-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, minmax(180px, 240px));
  gap: 14px;
}

.agro-gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #0e2c59;
  box-shadow: 0 14px 28px rgba(10, 33, 61, 0.12);
}

.agro-gallery-featured {
  grid-row: 1 / span 2;
}

.agro-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.agro-gallery-item:hover img {
  transform: scale(1.04);
}

.agro-gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(0deg, rgba(8, 24, 40, 0.85), transparent);
}

.agro-results {
  background: linear-gradient(180deg, #f7faf6 0%, #ffffff 100%);
}

.agro-results-grid article span {
  display: inline-flex;
  margin-top: 14px;
  min-height: 28px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2f6a2a;
  background: rgba(74, 138, 52, 0.14);
}

.agro-cta {
  padding: clamp(40px, 6vw, 72px) 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(196, 166, 107, 0.28), transparent 40%),
    linear-gradient(125deg, rgba(14, 44, 89, 0.97) 0%, rgba(11, 34, 70, 0.94) 50%, rgba(46, 107, 63, 0.9) 100%);
  color: #fff;
}

.agro-cta-inner {
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.agro-cta h2 {
  margin: 0 0 8px;
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: #fff;
  max-width: 18ch;
}

.agro-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  max-width: 36rem;
  line-height: 1.5;
}

.agro-cta .agro-btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 900px) {
  .agro-for-grid,
  .agro-services-grid,
  .agro-results-grid {
    grid-template-columns: 1fr;
  }

  .agro-gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .agro-gallery-featured {
    grid-row: auto;
    min-height: 260px;
  }

  .agro-gallery-item {
    min-height: 210px;
  }

  .agro-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .agro-hero h1 {
    max-width: 16ch;
  }

  .agro-hero h1 span {
    max-width: 22ch;
  }

  .agro-topbar-brand {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agro-btn,
  .agro-gallery-item img {
    transition: none;
  }

  .agro-btn:hover,
  .agro-gallery-item:hover img {
    transform: none;
  }
}

/* ---- Portal toasts (auto-close) ---- */
.hd-toast-stack {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: min(420px, calc(100vw - 1.6rem));
  pointer-events: none;
}

.hd-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  color: #f4f7fb;
  background: linear-gradient(145deg, #0e2c59 0%, #0b2246 70%, #163d78 100%);
  border: 1px solid rgba(196, 166, 107, 0.35);
  box-shadow: 0 14px 36px rgba(11, 34, 70, 0.35);
  animation: hdToastIn 0.35s ease both;
  overflow: hidden;
}

.hd-toast.is-leaving {
  animation: hdToastOut 0.28s ease both;
}

.hd-toast-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hd-toast[data-type="success"] .hd-toast-icon {
  background: rgba(74, 138, 52, 0.25);
  color: #b8e39e;
}

.hd-toast[data-type="error"] .hd-toast-icon {
  background: rgba(180, 60, 60, 0.28);
  color: #ffc9c9;
}

.hd-toast[data-type="info"] .hd-toast-icon {
  background: rgba(196, 166, 107, 0.2);
  color: var(--accent-gold);
}

.hd-toast-body {
  min-width: 0;
}

.hd-toast-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 247, 251, 0.72);
}

.hd-toast-brand img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
}

.hd-toast-title {
  margin: 0 0 0.2rem;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Dialog institucional (substitui alert/confirm/prompt) */
.hd-dialog {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(11, 34, 70, 0.62);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.hd-dialog.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hd-dialog-card {
  width: min(440px, 100%);
  padding: 1.25rem 1.3rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid rgba(14, 44, 89, 0.12);
  box-shadow: 0 24px 50px rgba(11, 34, 70, 0.28);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}

.hd-dialog.is-open .hd-dialog-card {
  transform: translateY(0) scale(1);
}

.hd-dialog-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(14, 44, 89, 0.1);
}

.hd-dialog-brand img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(14, 44, 89, 0.12);
}

.hd-dialog-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8594;
  font-weight: 700;
}

.hd-dialog-portal {
  margin: 0.1rem 0 0;
  font-family: Merriweather, Georgia, serif;
  font-size: 0.95rem;
  color: var(--primary-navy);
  font-weight: 700;
}

.hd-dialog-card h3 {
  margin: 0 0 0.45rem;
  color: var(--primary-navy);
  font-size: 1.15rem;
}

.hd-dialog-message {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-line;
}

.hd-dialog-field {
  margin-top: 0.85rem;
}

.hd-dialog-field input {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text-main);
  background: #fff;
}

.hd-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.hd-dialog-btn {
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 0;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.hd-dialog-btn-primary {
  background: var(--primary-navy);
  color: #fff;
}

.hd-dialog-btn-primary.is-danger {
  background: #b42318;
}

.hd-dialog-btn-secondary {
  background: rgba(14, 44, 89, 0.08);
  color: var(--primary-navy);
}

.hd-dialog-btn:hover {
  filter: brightness(1.06);
}

.hd-toast-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(244, 247, 251, 0.9);
  word-break: break-word;
}

.hd-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.hd-toast-actions button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent-gold);
  color: var(--deep-blue);
}

.hd-toast-actions button.hd-toast-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hd-toast-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem;
}

.hd-toast-close:hover {
  color: #fff;
}

.hd-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--secondary-green), var(--accent-gold));
  animation: hdToastProgress linear forwards;
}

@keyframes hdToastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hdToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes hdToastProgress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 640px) {
  .hd-toast-stack {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.85rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-toast,
  .hd-toast.is-leaving,
  .hd-toast-progress {
    animation: none;
  }
}

/* Modal de senha obrigatoria no primeiro acesso */
.hd-auth-modal.hd-invite-lock {
  background: rgba(11, 34, 70, 0.72);
  backdrop-filter: blur(6px);
}

.hd-auth-modal.hd-invite-lock .hd-auth-modal-card {
  max-width: 440px;
  border-top: 4px solid var(--accent-gold);
}

.hd-invite-photo-block {
  margin: 0 0 1rem;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(14, 44, 89, 0.12);
  background: #f7fafc;
}

.hd-invite-photo-label {
  margin: 0 0 0.65rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.hd-invite-photo-preview-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}

.hd-invite-photo-preview {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(14, 44, 89, 0.2);
  background: #fff;
}

.hd-invite-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hd-invite-photo-hint {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.hd-admin-invite-card {
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
}

.hd-admin-invite-card h3 {
  margin: 0 0 0.35rem;
  color: var(--primary-navy);
  font-size: 1.05rem;
}

.hd-admin-invite-card > p {
  margin: 0 0 0.9rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}


/* =============================================================================
   Densidade compacta ? portal (todas as abas) + ajustes finais
   ============================================================================= */

.hd-portal-body {
  grid-template-columns: 220px minmax(0, 1fr);
}

.hd-portal-topbar {
  padding: 8px clamp(12px, 1.6vw, 20px) !important;
  gap: 10px !important;
}

.hd-portal-brand-wrap img {
  width: 36px !important;
  height: 36px !important;
}

.hd-portal-brand-wrap strong {
  font-size: 0.95rem !important;
}

.hd-portal-brand-wrap p {
  font-size: 0.7rem !important;
}

.hd-portal-sidebar {
  padding: 12px 10px 18px !important;
}

.hd-menu-label {
  margin: 10px 8px 4px !important;
  font-size: 0.62rem !important;
}

.hd-portal-main-menu a {
  min-height: 34px !important;
  padding: 6px 10px !important;
  font-size: 0.8rem !important;
  gap: 8px !important;
  border-radius: 8px !important;
}

.hd-portal-main-menu a .material-symbols-rounded {
  font-size: 18px !important;
}

.hd-portal-main-menu a.hd-menu-cta {
  min-height: 36px !important;
  font-size: 0.72rem !important;
  margin-top: 4px !important;
}

.hd-portal-content {
  padding: 10px clamp(10px, 1.4vw, 16px) !important;
}

.hd-portal-container {
  width: calc(100% - 8px) !important;
  padding: 8px 0 16px !important;
}

.hd-portal-strip {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.hd-portal-section {
  margin-bottom: 10px !important;
}

.hd-panel {
  margin-bottom: 10px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(16, 43, 92, 0.06) !important;
}

.hd-panel-head {
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
}

.hd-panel-head h2 {
  font-size: clamp(1.05rem, 1.35vw, 1.35rem) !important;
}

.hd-panel-head p {
  margin-top: 4px !important;
  font-size: 0.86rem !important;
  line-height: 1.4 !important;
}

.hd-portal-section > .hd-panel-head {
  margin: -2px -2px 12px !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
}

.hd-portal-section > .hd-panel-head .hd-kicker {
  margin-bottom: 4px !important;
  font-size: 0.65rem !important;
}

.hd-portal-section > .hd-panel-head p {
  margin-top: 4px !important;
  font-size: 0.84rem !important;
}

.hd-kicker {
  font-size: 0.65rem !important;
  margin-bottom: 4px !important;
}

.hd-kpi-grid,
.hd-research-grid,
.hd-case-grid,
.hd-company-grid,
.hd-event-grid,
.hd-publication-grid,
.hd-favorites-grid,
.hd-library-grid,
.hd-service-grid,
.hd-lead-grid {
  gap: 10px !important;
}

.hd-kpi-card {
  padding: 12px !important;
  border-radius: 10px !important;
}

.hd-kpi-card h3 {
  margin: 6px 0 4px !important;
  font-size: 0.72rem !important;
}

.hd-kpi-value {
  font-size: 1.35rem !important;
}

.hd-search-row {
  padding: 6px 8px !important;
  border-radius: 10px !important;
}

.hd-search-row input {
  font-size: 0.9rem !important;
}

.hd-search-row button,
.hd-auth-btn,
.hd-portal-actions .hd-portal-exit {
  min-height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.74rem !important;
}

.hd-portal-hero {
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
}

.hd-portal-hero h2 {
  font-size: 1.2rem !important;
}

.hd-portal-hero-copy > p {
  font-size: 0.86rem !important;
}

.hd-lead-card,
.hd-history-item,
.hd-company-card,
.hd-admin-invite-card,
.hd-profiles-block,
.hd-profiles-note {
  padding: 12px !important;
}

.hd-admin-invite-card h3,
.hd-profiles-head h3 {
  font-size: 0.98rem !important;
}

.hd-admin-invite-card > p,
.hd-profiles-head p {
  font-size: 0.82rem !important;
}

.hd-profiles-grid {
  gap: 0.75rem 0.65rem !important;
}

.hd-form-grid,
.hd-invite-form,
.hd-admin-form {
  gap: 8px !important;
}

.hd-portal input,
.hd-portal select,
.hd-portal textarea {
  padding: 7px 9px !important;
  font-size: 0.88rem !important;
}

.hd-portal-footer {
  padding: 10px 14px !important;
  font-size: 0.78rem !important;
}

.hd-user-badge {
  gap: 6px !important;
  padding: 3px 8px 3px 3px !important;
}

.hd-user-badge img {
  width: 28px !important;
  height: 28px !important;
}

.hd-user-badge strong {
  font-size: 0.78rem !important;
}

/* Google AdSense slots ? site principal */
.hd-ad-slot {
  margin: 14px auto;
  width: min(1280px, calc(100% - 32px));
  min-height: 90px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(14, 44, 89, 0.03);
  border: 1px dashed rgba(14, 44, 89, 0.12);
}

.hd-ad-slot--banner {
  min-height: 100px;
}

.hd-ad-slot--rectangle {
  min-height: 250px;
  max-width: 336px;
}

.hd-ad-slot.is-live {
  border-style: solid;
  border-color: rgba(14, 44, 89, 0.06);
  background: transparent;
}

.hd-ad-slot .adsbygoogle {
  display: block;
  width: 100%;
}

.hd-ad-placeholder {
  padding: 12px 16px;
  text-align: center;
  color: #7a8796;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hd-portal-body {
    grid-template-columns: 1fr;
  }

  .hd-ad-slot {
    width: calc(100% - 24px);
  }
}

/* =============================================================================
   Portal ? cards de servi�os estilo papel fotogr�fico
   ============================================================================= */
#hd-servicos.hd-portal-section .hd-panel-head--services {
  margin-bottom: 1.15rem;
}

#hd-servicos.hd-portal-section .hd-panel-head--services h2 {
  font-family: 'Merriweather', Georgia, serif;
  letter-spacing: -0.02em;
}

.hd-service-grid--gallery,
#hdServicesGrid.hd-service-grid--gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 1.35rem !important;
  align-items: stretch;
}

.hd-service-card--photo {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, #fbfaf7 0%, #f3f0ea 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(12, 36, 65, 0.12) !important;
  overflow: hidden;
  isolation: isolate;
  animation: hdServicePhotoIn 0.65s cubic-bezier(0.22, 0.82, 0.28, 1) both;
  animation-delay: var(--hd-service-delay, 0ms);
  transition:
    transform 0.45s cubic-bezier(0.22, 0.82, 0.28, 1),
    box-shadow 0.45s ease !important;
}

.hd-service-card--photo::before {
  display: none !important;
}

@keyframes hdServicePhotoIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hd-service-photo-frame {
  position: relative;
  margin: 0.85rem 0.85rem 0;
  padding: 0.55rem 0.55rem 1.05rem;
  background:
    linear-gradient(180deg, #fffefb 0%, #f7f3eb 100%);
  border: 1px solid rgba(40, 32, 20, 0.08);
  border-radius: 4px 4px 10px 10px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 22px rgba(28, 22, 12, 0.1);
  transform: rotate(-0.4deg);
  transition: transform 0.45s ease;
}

.hd-service-card--photo:nth-child(even) .hd-service-photo-frame {
  transform: rotate(0.55deg);
}

.hd-service-card--photo:hover .hd-service-photo-frame {
  transform: rotate(0deg) translateY(-2px);
}

.hd-service-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1a2332;
  border-radius: 2px;
}

.hd-service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(0.22, 0.82, 0.28, 1), filter 0.45s ease;
}

.hd-service-card--photo:hover .hd-service-photo img {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.06);
}

.hd-service-photo-gloss {
  pointer-events: none;
  position: absolute;
  inset: 0.55rem 0.55rem 1.05rem;
  border-radius: 2px;
  background:
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.28) 0%,
      rgba(255, 255, 255, 0.04) 35%,
      transparent 55%
    );
  opacity: 0.85;
  mix-blend-mode: soft-light;
}

.hd-service-photo-frame::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0.38rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(28, 22, 12, 0.12);
}

.hd-service-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.15rem 1.2rem;
  flex: 1;
}

.hd-service-card--photo .hd-service-badge {
  align-self: flex-start;
  margin: 0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  letter-spacing: 0.12em;
  background: rgba(16, 43, 92, 0.08);
  color: #102b5c;
  border: 1px solid rgba(16, 43, 92, 0.08);
}

.hd-service-card--agro .hd-service-badge {
  background: rgba(31, 122, 77, 0.12);
  color: #1f7a4d;
  border-color: rgba(31, 122, 77, 0.16);
}

.hd-service-card--business .hd-service-badge {
  background: rgba(201, 162, 39, 0.14);
  color: #8a6d00;
  border-color: rgba(201, 162, 39, 0.22);
}

.hd-service-card--photo h3 {
  margin: 0 !important;
  font-size: 1.18rem !important;
  line-height: 1.25;
  color: #102b5c;
}

.hd-service-card--photo > .hd-service-body > p,
.hd-service-card--photo .hd-service-body > p {
  margin: 0;
  color: #5b677a;
  font-size: 0.92rem;
  line-height: 1.55;
}

.hd-service-features {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.hd-service-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: #3d4a5c;
  line-height: 1.35;
}

.hd-service-features .material-symbols-rounded {
  font-size: 1.05rem;
  color: #1f7a4d;
  margin-top: 0.05rem;
}

.hd-service-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(16, 43, 92, 0.08);
}

.hd-service-card--photo .hd-service-price {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #102b5c;
}

.hd-service-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #102b5c, #1a3f78);
  box-shadow: 0 8px 18px rgba(16, 43, 92, 0.22);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.hd-service-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 43, 92, 0.28);
  background: linear-gradient(135deg, #1a3f78, #1f7a4d);
}

.hd-service-card--photo:hover {
  transform: translateY(-8px) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 28px 50px rgba(12, 36, 65, 0.18) !important;
  border-color: transparent !important;
}

.hd-service-card--agro:hover .hd-service-cta {
  background: linear-gradient(135deg, #1f7a4d, #102b5c);
}

.hd-service-card--business:hover .hd-service-cta {
  background: linear-gradient(135deg, #8a6d00, #102b5c);
}

@media (prefers-reduced-motion: reduce) {
  .hd-service-card--photo,
  .hd-service-photo img,
  .hd-service-cta {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .hd-service-grid--gallery,
  #hdServicesGrid.hd-service-grid--gallery {
    grid-template-columns: 1fr !important;
  }

  .hd-service-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hd-service-cta {
    width: 100%;
  }
}

