/* =========================================================
   ORIGINAL DIAGNÓSTICO — exames.css
   Página Exames (medidas do Figma, base 1366px).
   Os cards são gerados no build a partir de src/exames.json.
   O FAQ vem do servicos.css (mesmo bloco da página Serviços).
   ========================================================= */

/* =================== TOPO: categorias e busca =================== */
.exams-hero { position: relative; z-index: 1; }
.exams-hero__top { padding: 50px 0 55px; background: var(--c-gold); color: var(--c-white); text-align: center; }
.exams-hero__eyebrow { line-height: 15px; }
.exams-hero__title {
  margin-top: 12px;
  font-family: var(--ff-title);
  font-size: clamp(3rem, 2rem + 3vw, 4.375rem);
  font-weight: 600;
  line-height: 1;
}
.exams-hero__bottom { display: flow-root; padding-bottom: 37px; background: var(--c-green); } /* flow-root: a margem negativa dos botões não "vaza" */

.exam-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 17px 19.75px;
  margin: -29px 0 0; padding: 0;
  list-style: none;
}
.exam-cat {
  display: flex; align-items: center; gap: 6px;
  height: 50px;
  padding: 0 13px 0 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--c-green);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.exam-cat span { flex: 1; }
.exam-cat__icon { width: 19px; height: 19px; color: var(--c-gold); transition: color .2s var(--ease); }
.exam-cat__arrow { flex-shrink: 0; width: 15.5px; height: 8.4px; color: var(--c-gold); transition: color .2s var(--ease), transform .2s var(--ease); }
.exam-cat:hover .exam-cat__arrow { transform: translateX(3px); }
.exam-cat.is-active, .exam-cat:hover { background: var(--c-green); border-color: var(--c-white); color: var(--c-white); }
.exam-cat.is-active .exam-cat__icon, .exam-cat.is-active .exam-cat__arrow,
.exam-cat:hover .exam-cat__icon, .exam-cat:hover .exam-cat__arrow { color: var(--c-white); }

.exam-search {
  position: relative;
  display: flex; align-items: center;
  height: 50px;
  margin-top: 36px;
  border-radius: var(--radius);
  background: var(--c-white);
}
.exam-search input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 60px 0 27px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.75rem;
  color: var(--c-green);
  outline: none;
}
.exam-search input::placeholder { color: #878787; }
.exam-search input:focus { border-color: var(--c-gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .25); }
.exam-search input::-webkit-search-cancel-button { cursor: pointer; }
.exam-search button { position: absolute; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; color: var(--c-gold); }
.exam-search button svg { width: 18px; height: 18px; }

.exams-hero__notch {
  position: absolute; bottom: -36px; left: calc(50% + 3.5px);
  width: 150px; height: 40px;
  transform: translateX(-50%);
  pointer-events: none;
}

/* =================== LISTA DE EXAMES =================== */
.exams { padding: 62px 0 123px; background: #fbf9f3; }
.exams__head { max-width: 520px; margin: 0 auto; text-align: center; }
.exams__title {
  font-family: var(--ff-title);
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.5rem);
  font-weight: 600;
  line-height: 46px;
  letter-spacing: -0.02em;
  color: var(--c-green);
}
.exams__intro { margin-top: 20px; font-size: 0.875rem; line-height: 20px; color: #999; }
.exams__list { display: grid; gap: 26px; max-width: 824px; margin: 40px auto 0; }
.exams__empty { max-width: 824px; margin: 52px auto 0; padding: 2rem; border-radius: var(--radius); background: var(--c-white); text-align: center; color: var(--c-green); }

.exam {
  border-radius: 8px 8px 4px 4px;
  background: var(--c-white);
  box-shadow: 0 4px 25px rgba(0, 0, 0, .05);
  scroll-margin-top: 24px;
}
.exam[hidden] { display: none; }
.exam__head {
  display: flex; align-items: center;
  min-height: 87px;
  padding: 10px 35px 10px 34px;
  border-bottom: 1px solid #c8c8c8;
}
.exam__pill {
  display: inline-grid; place-items: center;
  flex-shrink: 0;
  min-width: 76px; height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  font-family: var(--ff-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--c-green);
}
.exam__pill--exame { background: rgba(201, 162, 39, .2); }
.exam__pill--prazo, .exam__pill--valor { min-width: 78px; height: 32px; border: 1px solid #f4ecd4; }
.exam__pill--valor { border-color: #dde8ee; color: #163d54; }
.exam__name {
  flex: 1;
  margin-left: 35px;
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #565656;
}
.exam__tag {
  flex-shrink: 0;
  display: inline-grid; place-items: center;
  height: 30px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--c-green);
  font-family: var(--ff-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-white);
}
.exam__info { display: grid; grid-template-columns: 1fr 1fr; }
.exam__cell { display: flex; align-items: center; gap: 34px; min-height: 67px; padding: 8px 20px 8px 32px; }
.exam__cell--valor { gap: 19px; padding-left: 81px; border-left: 2px solid #c8c8c8; }
.exam__value { font-family: var(--ff-ui); font-size: 0.875rem; color: #878787; }
.exam__link { display: inline-flex; align-items: center; gap: 5px; font-size: 0.875rem; font-weight: 700; letter-spacing: -0.02em; color: var(--c-green); }
.exam__link svg { width: 10px; height: 10px; color: var(--c-gold); transition: transform .2s var(--ease); }
.exam__link:hover { text-decoration: underline; }
.exam__link:hover svg { transform: translate(2px, -2px); }

/* barras da sanfona */
.exam__bar-wrap { position: relative; z-index: 1; }
.exam__bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 59px;
  padding: 0 31px 0 34px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fcfcfc;
  text-align: left;
  transition: background-color .25s var(--ease);
}
.exam__bar--detalhes { background: var(--c-gold); }
.exam__bar--coleta { background: var(--c-green); }
.exam__bar--detalhes[aria-expanded="true"] { background: var(--c-green); }
.exam__bar--coleta[aria-expanded="true"] { background: var(--c-gold); }
.exam > .exam__bar-wrap:last-of-type .exam__bar { border-radius: 0 0 4px 4px; }
.exam__toggle {
  position: relative;
  flex-shrink: 0;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--c-white);
  transition: transform .25s var(--ease);
}
.exam__toggle::before, .exam__toggle::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 2px;
  background: var(--c-gold);
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease);
}
.exam__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.exam__bar[aria-expanded="true"] .exam__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.exam__bar:hover .exam__toggle { transform: scale(1.08); }

/* painéis abertos */
.exam__panel { position: relative; background: var(--c-white); }
.exam__panel[hidden] { display: none; }
.exam__panel:not([hidden]) { animation: exam-abrir .28s var(--ease); }
@keyframes exam-abrir { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .exam__panel:not([hidden]) { animation: none; } }
.exam__notch {
  position: absolute; top: -4px; left: 50%;
  width: 150px; height: 40px;
  transform: translateX(-50%);
  pointer-events: none;
}
.exam__panel--detalhes { padding: 40px 92px 71px 94px; border: solid #c8c8c8; border-width: 0 1px 1px; }
.exam > .exam__panel--detalhes:last-child { border-radius: 0 0 4px 4px; }

.exam-videos { position: relative; }
.exam-videos__stage { position: relative; aspect-ratio: 638 / 358; background: #353535; }
.exam-video { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 48px; /* controles um pouco acima do centro, como no Figma */ }
.exam-video[hidden] { display: none; }
.exam-videos__stage { overflow: hidden; }
.exam-video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exam-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, .62) 100%); pointer-events: none; }
.exam-video__title {
  position: absolute; z-index: 1; left: 28px; right: 28px; bottom: 22px;
  font-size: 0.875rem; font-weight: 600; line-height: 20px; letter-spacing: -0.02em; color: var(--c-white);
}
.exam-video.is-playing { padding: 0; }
.exam-video.is-playing::after { content: none; }
.exam-video iframe { width: 100%; height: 100%; border: 0; }
.exam-video__play { position: relative; z-index: 1; display: grid; place-items: center; width: 128.6px; height: 73.4px; transition: transform .2s var(--ease); }
.exam-video__play svg { width: 128.6px; height: 73.4px; }
.exam-video__play:hover { transform: scale(1.06); }
.exam-videos__nav { position: absolute; top: 0; left: calc(100% + 24px); display: flex; flex-direction: column; align-items: center; width: 39px; }
.exam-videos__count { font-size: 0.875rem; font-weight: 600; color: var(--c-gold); line-height: 20px; }
.exam-videos__btn {
  display: grid; place-items: center;
  width: 37px; height: 37px;
  border: 1px solid var(--c-gold);
  border-radius: 50%;
  color: var(--c-gold);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.exam-videos__btn svg { width: 13px; height: 15px; }
.exam-videos__btn--prev { margin-top: 78px; width: 39px; height: 38px; }
.exam-videos__btn--next { margin-top: 4px; background: var(--c-gold); color: var(--c-white); }
.exam-videos__btn--next svg { transform: scaleX(-1); }
.exam-videos__btn:hover { background: var(--c-green); border-color: var(--c-green); color: var(--c-white); }

.exam__text { margin-top: 26px; }
.exam__text p, .exam__media p, .exam-coleta__list {
  font-size: 0.75rem;
  line-height: 20px;
  color: #575757;
  text-align: justify;
  hyphens: auto;
}
.exam__text p + p { margin-top: 20px; }
.exam__media { display: grid; grid-template-columns: 285px minmax(0, 1fr); align-items: center; gap: 30px; margin-top: 23px; }
.exam__media img { width: 285px; height: 306px; border-radius: var(--radius); object-fit: cover; }
.exam__img-ph { display: grid; place-items: center; height: 306px; border-radius: var(--radius); background: #d9d9d9; color: #aeaeae; }
.exam__img-ph svg { width: 37px; height: 38px; }

.exam__files-title { margin-top: 56px; font-family: var(--ff-title); font-size: 2rem; font-weight: 600; line-height: 40px; color: var(--c-gold); }
.exam-files { margin: 25px 0 0; padding: 0; list-style: none; }
.exam-files li + li { border-top: 1px solid #d9d9d9; }
.exam-file {
  display: flex; align-items: center; gap: 19px;
  min-height: 46px;
  padding-left: 0;
  font-family: var(--ff-alt);
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-gold);
  transition: color .2s var(--ease);
}
.exam-file__clip { width: 20px; height: 12.5px; color: #a7a7a7; transition: color .2s var(--ease); }
.exam-file__plus {
  display: grid; place-items: center;
  width: 39px; height: 39px;
  margin-left: auto; margin-right: -8px;
  border-radius: 50%;
  color: var(--c-gold);
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.exam-file__plus svg { width: 17.5px; height: 17.5px; }
.exam-file:hover, .exam-file:focus-visible { color: var(--c-green); }
.exam-file:hover .exam-file__clip, .exam-file:focus-visible .exam-file__clip { color: var(--c-gold); }
.exam-file:hover .exam-file__plus, .exam-file:focus-visible .exam-file__plus { background: var(--c-gold); color: var(--c-white); }

.exam__panel--coleta { padding: 55px 68px 49px 73px; border-radius: 0 0 8px 8px; }
.exam-coleta__title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; color: var(--c-green); text-align: center; }
.exam-coleta__list { margin: 44px 0 0; padding: 0; list-style: none; }
.exam-coleta__list li { position: relative; padding-left: 5px; }
.exam-coleta__list li::before { content: ""; position: absolute; top: 9px; left: -6px; width: 3px; height: 3px; background: #575757; }
.exam-coleta__photos {
  display: flex; justify-content: center; gap: 20px;
  margin: 20px -16px 0 -13px; padding: 0;
  list-style: none;
}
.exam-coleta__photos li { flex: 0 1 170px; }
.exam-coleta__photos li:nth-child(2) { flex-basis: 166px; }
.exam-coleta__photos li:nth-child(3) { flex-basis: 158px; }
.exam-coleta__photos li:nth-child(4) { flex-basis: 160px; }
.exam-coleta__photos img { width: 100%; height: 210px; border-radius: var(--radius); object-fit: cover; }

/* carregar mais */
.exams__more {
  display: flex; flex-direction: column; align-items: center; gap: 13px;
  margin: 164px auto 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--c-green);
}
.exams__more[hidden] { display: none; }
.exams__more svg { width: 14px; height: 18px; transition: transform .2s var(--ease); }
.exams__more:hover svg { transform: translateY(4px); }

/* FAQ: mesmo bloco de Serviços, colado na lista */
.faq--exames { padding-top: 28px; }

/* =================== RESPONSIVO =================== */
@media (max-width: 1100px) {
  .exam-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exam__panel--detalhes { padding-inline: 40px; }
  .exam-videos__nav { position: static; flex-direction: row; justify-content: flex-end; gap: 10px; width: auto; margin-top: 14px; }
  .exam-videos__count { margin-right: auto; }
  .exam-videos__btn--prev, .exam-videos__btn--next { margin-top: 0; }
  .exam__panel--coleta { padding-inline: 40px; }
  .exam-coleta__photos { margin-inline: 0; }
}

@media (max-width: 900px) {
  .exams-hero__top { padding: 2.5rem 0 calc(29px + 2rem); }
  .exams { padding-bottom: 5rem; }
  .exam__head { flex-wrap: wrap; gap: 12px; }
  .exam__name { margin-left: 0; }
  .exam__media { grid-template-columns: 1fr; }
  .exam__media img, .exam__img-ph { width: 100%; height: 240px; }
  .exam-coleta__photos { flex-wrap: wrap; }
  .exam-coleta__photos li, .exam-coleta__photos li:nth-child(n) { flex: 1 1 calc(50% - 10px); }
  .exams__more { margin-top: 4rem; letter-spacing: .35em; }
}

/* card do celular (Figma 403px): tag no topo, linhas empilhadas */
@media (max-width: 640px) {
  .exam-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .exam-cat { gap: 5px; padding-inline: 10px 9px; font-size: 0.625rem; }
  .exam-cat span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .exam-cat__icon { width: 16px; height: 16px; }
  .exam-search input { padding-left: 18px; }
  .exam__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 20px 22px 16px; gap: 22px 14px; }
  .exam__head::before { content: ""; grid-column: 1 / 3; grid-row: 1; height: 2px; background: #d9d9d9; }
  .exam__tag { grid-column: 3; grid-row: 1; }
  .exam__pill--exame { grid-column: 1; grid-row: 2; }
  .exam__name { grid-column: 2 / 4; grid-row: 2; margin-left: 19px; color: var(--c-green); font-weight: 700; }
  .exam__info { grid-template-columns: 1fr; }
  .exam__cell, .exam__cell--valor { min-height: 77px; padding: 10px 22px; gap: 33px; border-left: 0; }
  .exam__cell--valor { border-top: 1px solid #c8c8c8; }
  .exam__bar { padding-inline: 16px 26px; min-height: 74px; }
  .exam__panel--detalhes, .exam__panel--coleta { padding: 40px 18px 36px; }
  .exam-coleta__list { margin-top: 28px; }
  .exam-coleta__photos { gap: 12px; }
  .exam-coleta__photos li, .exam-coleta__photos li:nth-child(n) { flex-basis: calc(50% - 6px); }
  .exam-coleta__photos img { height: 160px; }
}

/* Capa dos vídeos no celular: ícone menor e título sem encostar no play */
@media (max-width: 640px) {
  .exam-video { padding-bottom: 34px; }
  .exam-video__play, .exam-video__play svg { width: 96px; height: 55px; }
  .exam-video__title { left: 14px; right: 14px; bottom: 10px; font-size: 0.75rem; line-height: 16px; }
}
