/* Seções fluidas: aproveitam a largura e a altura disponíveis em telas grandes. */
html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

:root {
  --site-gutter: 4.3%;
}

/* O componente não cria uma caixa própria; assim, o header sticky permanece
   ancorado ao documento inteiro durante a rolagem. */
#site-header {
  display: contents;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  min-height: 120px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-footer .footer-message,
.site-footer .footer-credit {
  margin: 0;
}

.site-footer .footer-message {
  justify-self: end;
  white-space: nowrap;
}

.site-footer .footer-credit {
  justify-self: center;
  text-align: center;
}

.site-footer .footer-brand {
  justify-self: start;
}

/* Mesmo enquadramento de preenchimento usado no card do Bambu Studio. */
.module-image.a1-combo > img,
.module-image.filamentos-kit > img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.module-image.a1-combo > img {
  transform: scale(1.13);
}

.module-image.filamentos-kit > img {
  transform: scale(1.08);
}

.component-list .component-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 14px 10px;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.2s,
    box-shadow 0.2s;
}

.component-list .component-item:hover,
.component-list .component-item:focus-visible,
.component-list .component-item.is-active {
  background: #e3f1f8;
  box-shadow: inset 4px 0 var(--orange);
}

.component-list .component-item:last-child {
  border-bottom: 0;
}

.component-list .component-item p {
  margin: 7px 0 0;
}

.equipment-map .media.product .zoom-image img {
  width: 100%;
  height: 350px;
  max-height: none;
  object-fit: cover;
  padding: 0;
}

.equipment-map .zoom-image {
  display: block;
}

.equipment-visual {
  display: block;
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  background: #e9f2f6;
}

.equipment-visual .equipment-printer {
  position: absolute;
  right: 4%;
  bottom: 5%;
  z-index: 0;
  width: 44%;
  height: 48%;
  object-fit: contain;
  opacity: 0.42;
}

.equipment-visual .equipment-detail {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-location {
  display: none;
}

.equipment-visual[data-focus="x"] .equipment-printer,
.equipment-visual[data-focus="y"] .equipment-printer,
.equipment-visual[data-focus="z"] .equipment-printer {
  right: 5%;
  bottom: 0;
  width: 90%;
  height: 100%;
  opacity: 1;
}

.equipment-visual[data-focus="x"] .equipment-detail,
.equipment-visual[data-focus="y"] .equipment-detail,
.equipment-visual[data-focus="z"] .equipment-detail {
  display: none;
}

.equipment-visual[data-focus="x"] .equipment-location,
.equipment-visual[data-focus="y"] .equipment-location,
.equipment-visual[data-focus="z"] .equipment-location {
  display: block;
  position: absolute;
  z-index: 3;
  border: 5px solid var(--orange);
  border-radius: 50px;
}

.equipment-visual[data-focus="x"] .equipment-location {
  top: 34%;
  left: 18%;
  width: 64%;
  height: 13%;
}

.equipment-visual[data-focus="y"] .equipment-location {
  bottom: 13%;
  left: 34%;
  width: 32%;
  height: 18%;
}

.equipment-visual[data-focus="z"] .equipment-location {
  top: 13%;
  left: 42%;
  width: 16%;
  height: 66%;
}

@media (min-width: 761px) {
  .page-manutencao .chapter-hero {
    grid-template-columns: 1fr;
    overflow: hidden;
    background-color: var(--paper);
    background-image: url("a1-ams-lite-transparente.png");
    background-repeat: no-repeat;
    background-position: -5vw center;
    background-size: min(70vw, 1320px) auto;
  }

  .page-manutencao .chapter-hero > div {
    width: min(43vw, 650px);
    margin-left: auto;
    position: relative;
    z-index: 1;
  }

  .page-manutencao .chapter-cover {
    display: none;
  }

  /* Filamentos segue a mesma composição da A1: imagem integrada ao fundo,
     texto em uma área própria e sem cartão branco ao redor da foto. */
  .page-filamentos .chapter-hero {
    grid-template-columns: 1fr;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background-color: var(--paper);
  }

  .page-filamentos .chapter-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("filamentos-hero.png")
      no-repeat 3vw center / min(67vw, 1180px) auto;
    pointer-events: none;
  }

  .page-filamentos .chapter-hero > div {
    width: min(43vw, 650px);
    margin-left: auto;
    position: relative;
    z-index: 1;
  }

  .page-filamentos .chapter-cover {
    display: none;
  }

  /* A área de modelagem é um asset local com alpha: ela flutua na mesma
     seção, sem cartão ou fundo independente. */
  .page-tinkercad .chapter-hero {
    grid-template-columns: 1fr;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background-color: var(--paper);
  }

  .page-tinkercad .chapter-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("tinkercad-hero.png") no-repeat -18vw center / min(65vw, 1220px) auto;
    pointer-events: none;
  }

  .page-tinkercad .chapter-hero > div {
    width: min(43vw, 650px);
    margin-left: auto;
    position: relative;
    z-index: 1;
  }

  .page-tinkercad .chapter-cover {
    display: none;
  }

  /* Fatiador segue o mesmo enquadramento: uma interface local com alpha,
     incorporada ao fundo e sem moldura de imagem. */
  .page-fatiador .chapter-hero {
    grid-template-columns: 1fr;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background-color: var(--paper);
  }

  .page-fatiador .chapter-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("fatiador-hero.png") no-repeat 1vw center / min(58vw, 1100px) auto;
    pointer-events: none;
  }

  .page-fatiador .chapter-hero > div {
    width: min(43vw, 650px);
    margin-left: auto;
    position: relative;
    z-index: 1;
  }

  .page-fatiador .chapter-cover {
    display: none !important;
  }
}

header,
.intro,
.trail,
.chapter-hero,
.chapter-layout {
  width: 100%;
  max-width: none;
}

header {
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.home .hero {
  min-height: calc(100svh - 94px);
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.chapter-hero {
  min-height: 520px;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.chapter-layout {
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.intro,
.trail,
.ref-head,
footer {
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

.reading {
  max-width: 1120px;
}

@media (max-width: 760px) {
  :root {
    --site-gutter: 24px;
  }

  .home .hero-copy {
    max-width: none;
  }

  .home .hero,
  .chapter-hero {
    min-height: auto;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .site-footer .footer-message,
  .site-footer .footer-credit,
  .site-footer .footer-brand {
    justify-self: center;
  }
}
