/* Portal Global Health — Home e páginas estáticas */

:root {
  --gh-purple: #322348;
  --gh-purple-mid: #482866;
  --gh-purple-light: #5a3d7a;
  --gh-blue: #2563eb;
  --gh-blue-soft: #3b6fb8;
  --gh-blue-dark: #1d4ed8;
  --gh-text: #1e293b;
  --gh-muted: #64748b;
  --gh-border: #e2e8f0;
  --gh-green: #0d9488;
  --gh-page-bg: #f4f6fb;
  --gh-card-bg: #ffffff;
  --gh-hero-start: #334e9a;
  --gh-hero-end: #5b2d8a;
  /* Mesmo fundo do hero da página Início (nome do portal) e da barra superior */
  --gh-hero-gradient: linear-gradient(125deg, var(--gh-hero-start) 0%, #4a2878 48%, var(--gh-hero-end) 100%);
}

/* Tipografia global (mantém roxo #322348 da barra) */
body.gh-theme {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9375rem;
  color: var(--gh-text);
  background: var(--gh-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Barra superior — mesmo gradiente do hero (Global Health API Docs) */
body.gh-theme .navbar.gh-topbar.sticky-top,
.gh-topbar {
  background: var(--gh-hero-gradient) !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  min-height: 3.25rem;
  box-shadow: 0 2px 16px rgba(50, 35, 72, 0.14);
}

.gh-topbar .navbar-brand {
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
  width: 100%;
  max-width: none;
}

.gh-brand {
  text-decoration: none !important;
  color: #fff !important;
}

.gh-brand:hover {
  color: #f1f5f9 !important;
}

.gh-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.gh-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.gh-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gh-brand-meta {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.82;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.gh-portal {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gh-text);
  background: var(--gh-page-bg);
}

.gh-portal .gh-nav {
  background-color: var(--gh-purple);
}

.gh-portal .gh-nav .nav-link {
  font-size: 0.9rem;
}

#panel-home {
  background: var(--gh-page-bg);
  /* Textos secundários um pouco mais escuros (só na Início) */
  --gh-muted: #475569;
}

#panel-home .gh-hero .tagline,
#panel-home .gh-hero .lead {
  opacity: 1;
}

.gh-hero {
  background: var(--gh-hero-gradient);
  color: #fff;
  text-align: center;
  padding: 2.75rem 1.25rem 3.25rem;
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: 0 4px 24px rgba(50, 35, 72, 0.18);
}

.gh-hero-icon {
  font-size: 2.5rem;
  opacity: 0.95;
  margin-bottom: 0.75rem;
}

.gh-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.gh-hero-subtitle {
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.88;
  margin: 0 0 1rem;
}

.gh-hero .lead {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Texto de boas-vindas em uma linha (a fonte reduz levemente se a coluna for estreita) */
@media (min-width: 768px) {
  #panel-home .gh-hero .lead.gh-hero-lead-single {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(0.8rem, 0.35rem + 1.1vw, 1.05rem);
  }
}

.gh-hero .tagline {
  font-size: 0.98rem;
  opacity: 0.9;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.gh-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
}

.gh-section-title--with-sub .gh-section-subtitle {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gh-muted);
  vertical-align: middle;
}

.gh-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gh-purple);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-section-title .fa {
  color: var(--gh-blue);
  opacity: 0.95;
}

.gh-section-title--green .fa {
  color: var(--gh-green);
}

.gh-section p {
  color: var(--gh-muted);
  line-height: 1.65;
}

.gh-section p.text-body {
  color: var(--gh-text);
}

.gh-section {
  margin-bottom: 2.75rem;
}

.gh-list-check {
  padding-left: 0;
  list-style: none;
  margin-bottom: 0;
}

.gh-list-check li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--gh-muted);
  line-height: 1.6;
}

.gh-list-check li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gh-text);
  font-weight: bold;
}

.gh-list-check li strong {
  color: var(--gh-text);
}

.gh-cards-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 767px) {
  .gh-cards-steps {
    grid-template-columns: 1fr;
  }
}

.gh-card-step {
  border: 1px solid var(--gh-border);
  border-radius: 0.6rem;
  padding: 1.25rem;
  height: 100%;
  background: var(--gh-card-bg);
  box-shadow: 0 1px 3px rgba(50, 35, 72, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.gh-card-step:hover {
  box-shadow: 0 6px 20px rgba(50, 35, 72, 0.08);
  border-color: #cbd5e1;
}

.gh-card-step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.gh-card-step h3 .fa {
  color: var(--gh-purple-mid);
  margin-top: 0.1rem;
}

.gh-card-step p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--gh-muted);
}

.gh-code-box {
  background: #f1f5f9;
  border: 1px solid var(--gh-border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #212529;
  overflow-x: auto;
}

.gh-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 767px) {
  .gh-grid-2 {
    grid-template-columns: 1fr;
  }
}

.gh-card-boas {
  border: 1px solid var(--gh-border);
  border-radius: 0.6rem;
  padding: 1.15rem;
  height: 100%;
  background: var(--gh-card-bg);
  box-shadow: 0 1px 2px rgba(50, 35, 72, 0.04);
}

.gh-card-boas h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gh-card-boas h4 .fa {
  color: var(--gh-green);
}

.gh-card-boas ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--gh-muted);
  line-height: 1.55;
}

.gh-card-cat {
  border: 1px solid var(--gh-border);
  border-radius: 0.6rem;
  padding: 1.15rem;
  background: var(--gh-card-bg);
  box-shadow: 0 1px 2px rgba(50, 35, 72, 0.04);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  height: 100%;
}

.gh-card-cat .fa {
  color: var(--gh-purple-mid);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.gh-card-cat h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.gh-card-cat p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--gh-muted);
}

.gh-proximos {
  border: 1px solid #c4b5d8;
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(50, 35, 72, 0.07);
}

.gh-proximos-head {
  background: linear-gradient(90deg, var(--gh-purple-mid) 0%, #5c3d7e 100%);
  color: #fff;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gh-proximos-body {
  background: #fff;
  padding: 1rem 1.15rem 1.15rem;
}

.gh-proximos-body ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--gh-muted);
  line-height: 1.65;
}

.gh-proximos-body a {
  font-weight: 600;
  color: var(--gh-purple-mid);
}

.gh-proximos-body a:hover {
  color: var(--gh-purple);
}

.gh-cta-bar {
  text-align: center;
  margin-top: 2rem;
}

.gh-cta-bar .btn-primary {
  background: linear-gradient(180deg, var(--gh-purple-mid) 0%, var(--gh-purple) 100%);
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.65rem 1.5rem;
  box-shadow: 0 4px 14px rgba(50, 35, 72, 0.25);
}

.gh-cta-bar .btn-primary:hover {
  background: linear-gradient(180deg, #553070 0%, #2a1d3d 100%);
  box-shadow: 0 6px 18px rgba(50, 35, 72, 0.3);
}

/* Sidebar: refinamento leve no tema */
.gh-theme .sidebar.bg-light {
  background: linear-gradient(180deg, #fafbfc 0%, #f1f4f8 100%) !important;
  border-right: 1px solid var(--gh-border) !important;
  box-shadow: 2px 0 12px rgba(50, 35, 72, 0.04);
}

.gh-theme .sidebar .nav-link {
  color: #334155 !important;
  border-radius: 0.35rem;
  margin: 0 0.25rem;
  padding-left: 0.65rem !important;
}

.gh-theme .sidebar .nav-link:hover {
  color: var(--gh-purple-mid) !important;
  background: rgba(72, 40, 102, 0.06);
  text-decoration: none !important;
}

.gh-theme .sidebar .nav-link.active {
  color: var(--gh-purple) !important;
  background: rgba(72, 40, 102, 0.1);
  font-weight: 700;
}

.gh-theme .navbar-vertical-label {
  color: #94a3b8 !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.68rem !important;
  text-transform: uppercase;
}

.gh-theme .btn-menu {
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.875rem;
}

.gh-theme .btn-menu:hover {
  color: var(--gh-purple-mid) !important;
}

#panel-avisos .gh-main {
  background: transparent;
}

.gh-theme #panel-swagger {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(50, 35, 72, 0.06);
}

/* Cabeçalho da documentação Swagger (ícone + categoria alinhados ao menu / Início) */
.gh-swagger-doc-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1rem 1.5rem;
  margin: 0 0 0.5rem;
  background: var(--gh-hero-gradient);
  border-radius: 0.65rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(50, 35, 72, 0.15);
}

.gh-swagger-doc-icon-wrap {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.35rem;
}

.gh-swagger-doc-text {
  flex: 1;
  min-width: 0;
}

.gh-swagger-doc-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 0.35rem;
}

.gh-swagger-doc-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  color: #fff;
}

.gh-swagger-doc-lead {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.92;
  line-height: 1.55;
}

/* Swagger UI — mesmo “look” do texto inicial da Hub Operadora em todas as APIs */
.gh-theme #swagger-ui .swagger-ui {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gh-theme #swagger-ui .swagger-ui .information-container {
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.15rem 1.35rem;
  background: var(--gh-card-bg);
  border: 1px solid var(--gh-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(50, 35, 72, 0.06);
}

.gh-theme #swagger-ui .swagger-ui .info .title {
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gh-purple) !important;
  margin: 0 0 0.35rem;
}

.gh-theme #swagger-ui .swagger-ui .info .title small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gh-muted) !important;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.gh-theme #swagger-ui .swagger-ui .info .base-url {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Monaco, monospace;
  font-size: 0.8rem;
  color: var(--gh-muted) !important;
  background: #f8fafc !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: 0.35rem;
  padding: 0.45rem 0.6rem !important;
}

.gh-theme #swagger-ui .swagger-ui .info .description {
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--gh-text);
}

.gh-theme #swagger-ui .swagger-ui .info .description .markdown,
.gh-theme #swagger-ui .swagger-ui .info .description .renderedMarkdown {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.gh-theme #swagger-ui .swagger-ui .info .description .markdown p,
.gh-theme #swagger-ui .swagger-ui .info .description .renderedMarkdown p,
.gh-theme #swagger-ui .swagger-ui .info .description > p {
  margin: 0 0 0.85rem;
}

.gh-theme #swagger-ui .swagger-ui .info .description .markdown p:last-child,
.gh-theme #swagger-ui .swagger-ui .info .description .renderedMarkdown p:last-child,
.gh-theme #swagger-ui .swagger-ui .info .description > p:last-child {
  margin-bottom: 0;
}

.gh-theme #swagger-ui .swagger-ui .info .description strong {
  color: var(--gh-purple-mid);
  font-weight: 700;
}

.gh-theme #swagger-ui .swagger-ui .info .description em {
  color: var(--gh-text);
  font-style: italic;
}

.gh-theme #swagger-ui .swagger-ui .info .description code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Monaco, monospace;
  font-size: 0.84em;
  background: #f1f5f9;
  color: var(--gh-purple-mid);
  padding: 0.12rem 0.4rem;
  border-radius: 0.25rem;
  border: 1px solid #e2e8f0;
}

.gh-theme #swagger-ui .swagger-ui .info .description pre {
  background: #f8fafc;
  border: 1px solid var(--gh-border);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  overflow-x: auto;
}

.gh-theme #swagger-ui .swagger-ui .info .description pre code {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--gh-text);
  font-size: inherit;
}

.gh-theme #swagger-ui .swagger-ui .info .description a {
  color: var(--gh-blue);
  font-weight: 600;
  text-decoration: none;
}

.gh-theme #swagger-ui .swagger-ui .info .description a:hover {
  color: var(--gh-blue-dark);
  text-decoration: underline;
}

.gh-theme #swagger-ui .swagger-ui .info .description ul,
.gh-theme #swagger-ui .swagger-ui .info .description ol {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.gh-theme #swagger-ui .swagger-ui .info .description li {
  margin-bottom: 0.35rem;
}

.gh-theme #swagger-ui .swagger-ui .scheme-container {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--gh-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(50, 35, 72, 0.06);
  font-family: inherit;
}

.gh-theme #swagger-ui .swagger-ui .scheme-container .schemes-title {
  font-family: inherit;
  font-weight: 700;
  color: var(--gh-purple);
  font-size: 0.95rem;
}

#panel-avisos .gh-hero .lead code {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: #fff;
}

.gh-avisos-section-title {
  color: var(--gh-purple);
  font-weight: 700;
}

.gh-theme #panel-avisos {
  background: var(--gh-page-bg);
}

/* Avisos (página sobre) */
.gh-aviso {
  border-radius: 0.5rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.gh-aviso h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gh-aviso p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.gh-aviso--danger {
  background: #fce8e8;
  border-left-color: #c92a2a;
}

.gh-aviso--warning {
  background: #fff9db;
  border-left-color: #f59f00;
}

.gh-aviso--info {
  background: #e7f5ff;
  border-left-color: #1971c2;
}

/* Layout único: sidebar no fluxo da coluna (evita faixa branca entre menu e conteúdo) */
#portal-main {
  margin-left: 0 !important;
}

@media (min-width: 768px) {
  body .container-fluid .row > nav.bg-light.sidebar {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    z-index: 1;
  }
}
