/* =============================================================
   Imamed Diagnostico Medico. Paginas internas
   Depende de: tokens.css, styles.css
   ============================================================= */

/* ---------------------------------------------------------------
   Hero de pagina interna
   --------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-block: clamp(148px, 16vw, 208px) clamp(64px, 7vw, 96px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero--tight { padding-bottom: clamp(40px, 5vw, 56px); }

.page-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 46ch;
}
.page-hero__inner--wide { max-width: 60ch; }

.page-hero__title {
  font-size: var(--t-h1);
  line-height: var(--lh-display);
}
.page-hero__title em {
  color: var(--teal);
  font-weight: var(--display-emph-weight);
  font-style: normal;
}

.page-hero__lead {
  margin-top: var(--sp-2xl);
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
  max-width: 58ch;
}

.page-hero__sig {
  margin-top: var(--sp-xl);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  color: var(--teal-texto);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  margin-top: clamp(28px, 3.5vw, 40px);
}

.page-hero__gota {
  position: absolute;
  z-index: 1;
  top: -8%;
  right: -2%;
  width: clamp(140px, 20vw, 280px);
  opacity: 0.14;
  color: var(--teal);
  pointer-events: none;
}

.page-hero__media {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 5vw, 64px);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--inset-hairline);
}
.page-hero__media img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

/* ---------------------------------------------------------------
   service.html: ancoras dos exames
   --------------------------------------------------------------- */
#outras { scroll-margin-top: 104px; }

.exame__lead {
  max-width: 68ch;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.exame {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--border);
  scroll-margin-top: 104px;
}
.exame:last-of-type { border-bottom: 1px solid var(--border); }

.exame__head {
  position: sticky;
  top: 108px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.exame__num {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--teal-texto);
}
.exame__title {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
}

.exame__body { display: flex; flex-direction: column; gap: var(--sp-2xl); }
.exame__body p {
  font-size: var(--t-body);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
  max-width: 66ch;
}

/* Ficha de preparo: bloco fixo dentro de cada exame, acento dourado */
.prep {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-lg) var(--sp-3xl);
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--dourado-wash);
  border-radius: var(--r-lg);
  border-left: 3px solid var(--dourado);
}
.prep__item { display: flex; flex-direction: column; gap: 4px; }
.prep__label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--teal-texto);
}
.prep__value {
  font-size: var(--t-sm);
  line-height: var(--lh-snug);
  color: var(--fg);
}

/* ---------------------------------------------------------------
   Prosa em duas colunas: formacao, abordagem, o que levar
   --------------------------------------------------------------- */
.prose {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.prose--single { grid-template-columns: 1fr; max-width: 68ch; }

.prose__item {
  padding-top: var(--sp-2xl);
  border-top: 1px solid var(--border);
}
.prose__item h3 {
  font-family: var(--font-body);
  font-size: var(--t-lead);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-md);
}
.prose__item p {
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}

.prose__note {
  grid-column: 1 / -1;
  margin-top: var(--sp-xl);
  font-size: var(--t-xs);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
  max-width: 74ch;
}

/* ---------------------------------------------------------------
   Texto corrido longo
   --------------------------------------------------------------- */
.longform { max-width: var(--maxw-text); }
.longform p {
  font-size: var(--t-body);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}
.longform p + p { margin-top: var(--sp-2xl); }
.longform p strong { color: var(--fg); font-weight: 600; }

/* ---------------------------------------------------------------
   Canais de contato
   --------------------------------------------------------------- */
.channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-xl);
}

.channel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding: clamp(24px, 2.6vw, 32px);
  background: var(--branco);
  border-radius: var(--r-xl);
  box-shadow: var(--inset-hairline);
  transition:
    translate var(--dur-fast) var(--ease-snap),
    background-color var(--dur-fast) var(--ease-snap);
}
.channel:hover { translate: 0 -3px; background: var(--linho-soft); }

.channel__label {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--teal-texto);
}
.channel__value {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: 600;
  letter-spacing: var(--ls-display);
}
.channel__text {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------------
   Endereco. Foto + lista de chave e valor
   --------------------------------------------------------------- */
.office {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.office__media {
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--inset-hairline);
}
.office__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.office__list { display: flex; flex-direction: column; }
.office__row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2xl);
  padding-block: var(--sp-xl);
  border-bottom: 1px solid var(--border);
}
.office__key {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.04em;
  color: var(--teal-texto);
  flex: none;
}
.office__val {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg);
  text-align: right;
  max-width: 34ch;
}
.office__note {
  margin-top: var(--sp-xl);
  font-size: var(--t-xs);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------------
   Como agendar. Passos numerados
   --------------------------------------------------------------- */
.howto {
  counter-reset: howto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-xl);
}
.howto li {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding: clamp(20px, 2.4vw, 26px);
  background: var(--branco);
  border-radius: var(--r-lg);
  box-shadow: var(--inset-hairline);
}
.howto li::before {
  counter-increment: howto;
  content: counter(howto, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--teal-texto);
}
.howto li h3 {
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 600;
}
.howto li p {
  font-size: var(--t-xs);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------------
   FAQ por categoria (faqs/faq.html)
   --------------------------------------------------------------- */
.faq-cat + .faq-cat { margin-top: clamp(40px, 5vw, 64px); }

.faq-cat__title {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--teal-texto);
  margin-bottom: var(--sp-xl);
}

.faq__list--wide { max-width: none; }

/* ---------------------------------------------------------------
   Paginas legais
   --------------------------------------------------------------- */
.legal { max-width: 72ch; }
.legal h2 {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: 600;
  letter-spacing: var(--ls-display);
  padding-top: clamp(32px, 4vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--border);
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal p {
  margin-top: var(--sp-lg);
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}
.legal ul { margin-top: var(--sp-lg); display: flex; flex-direction: column; gap: var(--sp-md); }
.legal li {
  position: relative;
  padding-left: var(--sp-2xl);
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}
.legal li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-texto);
}
.legal a { color: var(--teal-texto); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--teal-800); }

/* Faixa de foto discreta antes do footer, usada nas paginas legais */
.legal-media {
  margin-top: clamp(56px, 6vw, 88px);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--inset-hairline);
}
.legal-media img {
  width: 100%;
  aspect-ratio: 21 / 6;
  object-fit: cover;
}

/* ---------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .prose,
  .channels,
  .howto { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .exame { grid-template-columns: 1fr; }
  .exame__head { position: static; }

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

@media (max-width: 699.98px) {
  .prose,
  .channels,
  .howto,
  .prep { grid-template-columns: 1fr; }

  .office__row { flex-direction: column; gap: 4px; }
  .office__val { text-align: left; max-width: none; }

  .page-hero__gota { width: 160px; opacity: 0.1; }
}
