/* Padrão visual compartilhado pelos guias técnicos. */
:root {
  --guide-content-max: 1800px;
  --guide-side-gap: clamp(12px, 2vw, 34px);
}

/* Aproveita a largura disponível sem transformar telas ultrawide em linhas
   intermináveis. Os seletores cobrem as três gerações de layout dos guias. */
.wrap {
  width: min(
    var(--guide-content-max),
    calc(100% - (2 * var(--guide-side-gap)))
  ) !important;
}

.page > main {
  width: min(var(--guide-content-max), 100%) !important;
}

body > .container {
  width: 100% !important;
  max-width: var(--guide-content-max) !important;
}

h1 {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: clamp(40px, 5vw, 68px) !important;
  font-weight: 800 !important;
  line-height: 1.03 !important;
  letter-spacing: -0.045em !important;
  /* Preserva as margens laterais próprias de cada guia (inclusive centralizações). */
  margin-top: 16px !important;
  margin-bottom: 20px !important;
}

/* Mantém o degradê do guia de referência em todos os trechos de destaque. */
h1 .grad {
  background: linear-gradient(90deg, #fff 8%, #6edfff 55%, #4e8cff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Guias legados sem trecho destacado recebem o mesmo degradê no título inteiro. */
h1:not(:has(.grad)) {
  background: linear-gradient(90deg, #fff 8%, #6edfff 55%, #4e8cff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Remove a assinatura visual Academy da barra interna dos guias. */
nav .brand,
.nav .brand {
  display: none !important;
}

nav .navin,
.nav .navin {
  justify-content: flex-end !important;
}

@media (max-width: 720px) {
  h1 {
    font-size: clamp(34px, 10vw, 48px) !important;
    letter-spacing: -0.04em !important;
  }
}

/* Submenu compartilhado dos guias técnicos. */
.nav,
.guidenav,
.guide-utility-bar {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  background: #05090e !important;
  border-top: 1px solid #1b2d40 !important;
  border-bottom: 1px solid #1b2d40 !important;
  transition:
    transform 0.24s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
  will-change: transform;
}

.nav .navin,
.guidenav {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px max(var(--guide-side-gap), calc((100% - var(--guide-content-max)) / 2));
}

.nav .navin {
  justify-content: space-between !important;
}

.nav .links,
.guidenav-track {
  display: flex !important;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px !important;
}

.guidenav-track {
  width: min(var(--guide-content-max), 100%) !important;
}

/* O menu libera a área de leitura durante a descida e reaparece ao primeiro
   movimento para cima. A classe é controlada pelo guia-padrao.js. */
.nav.is-guide-nav-hidden,
.guidenav.is-guide-nav-hidden,
.guide-utility-bar.is-guide-nav-hidden {
  transform: translateY(calc(-100% - 2px));
  opacity: 0;
  pointer-events: none;
}

.nav .links a,
.guidenav-track a {
  color: #c5d1dc !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  letter-spacing: 0.07em !important;
  text-decoration: none !important;
  text-transform: uppercase;
}

.nav .links a:hover,
.guidenav-track a:hover,
.toc a:hover {
  color: #fff !important;
}

/* Indica, durante a leitura, a seção atualmente exibida no guia. */
.nav .links a.is-active,
.guidenav-track a.is-active,
.toc a.is-active {
  color: #4e9dff !important;
  text-shadow: 0 0 14px rgba(78, 157, 255, 0.35);
}

.guide-print-button,
.nav .btn {
  flex: 0 0 auto;
  padding: 10px 15px !important;
  color: #fff !important;
  font: 800 12px/1.2 Inter, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid #315474 !important;
  border-radius: 12px !important;
  background: #0b1621 !important;
}

.guide-print-button:hover,
.nav .btn:hover {
  border-color: #4e8cff !important;
  background: #102033 !important;
}

.guide-utility-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px max(var(--guide-side-gap), calc((100% - var(--guide-content-max)) / 2));
}

@media (max-width: 720px) {
  .nav .navin,
  .guidenav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav .links,
  .guidenav-track {
    justify-content: flex-start;
    gap: 10px 14px !important;
  }

  .guide-print-button,
  .nav .btn {
    align-self: flex-start;
  }
}

@media print {
  .nav,
  .guidenav,
  .guide-utility-bar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .guidenav,
  .guide-utility-bar {
    transition: none;
  }
}

/* ---------------------------------------------------------------
   Imagens dos guias (ajuste feito em 24/09)
   --------------------------------------------------------------- */
img.guia-img-zoom { cursor: zoom-in; }
img.guia-img-zoom:focus-visible { outline: 2px solid #5d99ff; outline-offset: 3px; }
img.guia-img-inteira { background: #060a14; }

.guia-zoom {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(2, 4, 10, 0.92);
  cursor: zoom-out;
}
.guia-zoom img {
  max-width: min(96vw, 1600px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #060a14;
}
.guia-zoom p {
  max-width: 900px;
  margin: 0;
  color: #d8e2f2;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}
.guia-zoom button {
  align-self: flex-end;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.guia-zoom-aberto, .guia-zoom-aberto body { overflow: hidden; }

/* Frasco da resina recomendada: um pouco maior */
.brand-note img { width: 150px !important; height: auto !important; object-fit: contain !important; }

/* Fotos com a peca muito pequena no meio de um fundo escuro enorme: aproxima (recorte) */
.guia-img-recorte { display: block; overflow: hidden; }
.guia-img-recorte > img { transform: scale(var(--guia-zoom, 2)); transform-origin: center; }
.guia-zoom-recorte { border-radius: 10px; max-width: min(96vw, 1100px); }
.guia-zoom-recorte > img { max-height: calc(100vh - 140px); box-shadow: none; }

@media print {
  .guia-zoom { display: none !important; }
}

