/* ==========================================================================
   Clínica Flávia Freitas — Página de links
   Mobile first (frame mobile 420px) · Desktop a partir de 768px (frame 1920px)
   ========================================================================== */

/* ---------- Fontes ---------- */
@font-face {
  font-family: "Ivy Mode";
  src: url("../fonts/IvyMode-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variáveis ---------- */
:root {
  --ff-bege: #C9B29A;
  --ff-marrom: #31190C;
  --ff-marrom-claro: #907365;
  --ff-gelo: #F5ECDB;
  --branco-tati: #D9D4CC;
  --rosa-tati: #B9A5A3;
  --dourado: #CFA55F;
  --cinza-placeholder: #D9D9D9;
  --branco: #FFFFFF;

  --fonte-titulo: "Ivy Mode", Georgia, "Times New Roman", serif;
  --fonte-texto: "Montserrat", Arial, Helvetica, sans-serif;

  --raio-banner: 20px;
  --raio-card: 16px;
  --raio-foto: 15px;

  --ease-grow: cubic-bezier(0.22, 1, 0.36, 1);
  --sombra-card: 0 14px 30px -10px rgba(49, 25, 12, 0.35);
  --sombra-card-zero: 0 14px 30px -10px rgba(49, 25, 12, 0);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--ff-bege);
  color: var(--ff-marrom);
  font-family: var(--fonte-texto);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
p,
figure,
address {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Topo (logo) ---------- */
.topo {
  padding: 38px 16px 27px;
}

.topo__logo {
  width: 151px;
  max-width: 100%;
  margin: 0 auto;
}

.topo__logo img {
  width: 100%;
}

/* ---------- Banner (cartão marrom) ---------- */
.banner {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 47px;
  width: calc(100% - 18px);
  max-width: 402px;
  margin: 0 auto;
  padding: 283px 10px 47px;
  background-color: var(--ff-marrom-claro);
  border-radius: var(--raio-banner);
  /* overflow visível para o card crescer e a sombra não ser cortada;
     o recorte da foto de capa fica no próprio .banner__capa */
  overflow: visible;
}

.banner > *:not(.banner__capa) {
  position: relative;
  z-index: 1;
}

/* Foto de capa com degradê (máscara) */
.banner__capa {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 406px;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--raio-banner) var(--raio-banner) 0 0;
  -webkit-mask-image: linear-gradient(180deg, #000 29%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 29%, transparent 100%);
}

.banner__capa-img {
  position: absolute;
  top: -29.7px;
  left: -20.9%;
  width: 140.3%;
  max-width: none;
}

.banner__logo {
  width: 208px;
  max-width: 100%;
}

/* ---------- Links diretos (ícones) ---------- */
.links-diretos {
  display: flex;
  align-items: center;
  gap: 14.67px;
}

.links-diretos__btn {
  display: block;
  width: 55.54px;
  border-radius: 50%;
  color: var(--ff-gelo);
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.icone {
  display: block;
  width: 100%;
  height: auto;
}

.icone__fundo {
  fill: var(--dourado);
  transition: fill 0.3s ease;
}

/* Hover/foco/toque: círculo gelo e ícone marrom claro (sem movimento) */
.links-diretos__btn:focus-visible,
.links-diretos__btn.is-tapped {
  color: var(--ff-marrom-claro);
}

.links-diretos__btn:focus-visible .icone__fundo,
.links-diretos__btn.is-tapped .icone__fundo {
  fill: var(--ff-gelo);
}

.links-diretos__btn:focus-visible {
  outline: 2px solid var(--ff-gelo);
  outline-offset: 3px;
}

@media (hover: hover) {
  .links-diretos__btn:hover {
    color: var(--ff-marrom-claro);
  }

  .links-diretos__btn:hover .icone__fundo {
    fill: var(--ff-gelo);
  }
}

/* ---------- Elementos / seções ---------- */
.elementos {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 381px;
}

.secao {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.secao__titulo {
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  color: var(--ff-gelo);
}

.lista {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  background-color: var(--ff-gelo);
  border-radius: var(--raio-card);
  overflow: hidden;
  color: var(--ff-marrom);
  box-shadow: var(--sombra-card-zero);
  transform: scale(1);
  transition:
    transform 0.4s var(--ease-grow),
    box-shadow 0.4s var(--ease-grow);
  -webkit-tap-highlight-color: transparent;
}

/* Efeito "grow": foco (teclado) e toque (mobile) */
.card:focus-visible,
.card.is-tapped {
  z-index: 2;
  transform: scale(1.03);
  box-shadow: var(--sombra-card);
}

.card:focus-visible {
  outline: 2px solid var(--ff-gelo);
  outline-offset: 3px;
}

@media (hover: hover) {
  .card:hover {
    z-index: 2;
    transform: scale(1.03);
    box-shadow: var(--sombra-card);
  }
}

/* Movimento reduzido: sem crescer, só a sombra */
@media (prefers-reduced-motion: reduce) {
  .card,
  .card:hover,
  .card:focus-visible,
  .card.is-tapped {
    transform: none;
  }
}

/* Área da imagem com máscara em degradê (transparente -> opaco) */
.card__midia {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--midia-w);
  z-index: 0;
  overflow: hidden;
  border-radius: 0 var(--raio-card) var(--raio-card) 0;
  -webkit-mask-image: var(--midia-mascara, linear-gradient(90deg, transparent 0%, #000 100%));
  mask-image: var(--midia-mascara, linear-gradient(90deg, transparent 0%, #000 100%));
}

.card__img {
  position: absolute;
  left: var(--img-x);
  top: var(--img-y);
  width: var(--img-w);
  max-width: none;
}

.card__simbolo {
  position: absolute;
  left: var(--simb-x);
  top: var(--simb-y);
  width: var(--simb-w, 26px);
  max-width: none;
}

.card__texto,
.card__conteudo,
.card__titulo,
.card__descricao {
  position: relative;
  z-index: 1;
}

/* Card: Áreas de Cuidado */
.card--area {
  --midia-w: 234px;
  --simb-x: 198px;
  --simb-y: 82px;
  min-height: 117px;
  padding: 38px 26px;
}

.card__texto {
  max-width: var(--texto-w);
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.02;
}

.btn-dermatologia      { --img-x: -5px;  --img-y: -75px; --img-w: 290px; --texto-w: 143px; }
.btn-queda-de-cabelo   { --img-x: 5px;   --img-y: -9px;  --img-w: 229px; --texto-w: 217px; }
.btn-area-dos-olhos    { --img-x: -4px;  --img-y: -26px; --img-w: 259px; --texto-w: 164px; }
.btn-emagrecimento     { --img-x: -3px;  --img-y: -60px; --img-w: 237px; --texto-w: 145px; }
.btn-lipedema          { --img-x: -42px; --img-y: 0px;   --img-w: 277px; --texto-w: 217px; }

/* Card: Programas */
.card--programa {
  --midia-w: 283px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 235px;
  padding: 69px 33px;
}

/* No mobile o símbolo fica fora da área visível no Figma */
.card--programa .card__simbolo,
.card--avaliacao .card__simbolo {
  display: none;
}

.card__conteudo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 222px;
  max-width: 100%;
}

.card__titulo {
  display: block;
  max-width: var(--titulo-w, 222px);
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.02;
  text-transform: uppercase;
}

.card__descricao {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card__barra {
  flex: none;
  width: 2px;
  height: 19px;
  border-radius: 20px;
  background-color: var(--ff-marrom-claro);
}

.card__descricao-texto {
  max-width: 153px;
  font-family: var(--fonte-texto);
  font-weight: 400;
  font-size: 10px;
  line-height: 1.2;
}

.btn-body-center {
  --midia-mascara: linear-gradient(90deg, transparent 36%, #000 100%);
  --img-x: -114px; --img-y: -20px; --img-w: 413px;
}
.btn-k-beauty {
  --img-x: -27px; --img-y: -3px; --img-w: 321px;
  --titulo-w: 149px;
}
.btn-careful-day {
  --img-x: 0px; --img-y: 0px; --img-w: 283px;
  --titulo-w: 149px;
}

/* Card: Avaliação */
.card--avaliacao {
  --midia-w: 240px;
  --img-x: -3px;
  --img-y: -254px;
  --img-w: 334px;
  min-height: 117px;
  padding: 38px 11px;
}

.card--avaliacao .card__barra {
  height: 27px;
}

.card--avaliacao .card__descricao-texto {
  max-width: 233px;
  font-size: 16px;
}

.card--avaliacao strong {
  font-weight: 600;
}

/* ---------- Conheça a Clínica (fotos) ---------- */
.secao--fotos {
  align-items: center;
  justify-content: center;
  min-height: 640px;
}

.secao--fotos .secao__titulo {
  max-width: 275px;
}

/* Viewport do carrossel: esconde os slides extras e os clones do loop */
.fotos {
  --fotos-por-vista: 1;
  --fotos-gap: 20px;
  width: 100%;
  max-width: 367px;
  overflow-x: clip;
  touch-action: pan-y;
  transition: opacity 0.3s ease;
}

.fotos__trilho {
  display: flex;
  gap: var(--fotos-gap);
  transform: translate3d(0, 0, 0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.fotos__item {
  position: relative;
  flex: 0 0 calc((100% - (var(--fotos-por-vista) - 1) * var(--fotos-gap)) / var(--fotos-por-vista));
  aspect-ratio: 367 / 493;
  border-radius: var(--raio-foto);
  overflow: hidden;
  background-color: var(--cinza-placeholder);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Foto que sai do quadro desbota */
.fotos__item.is-saindo {
  opacity: 0;
}

/* Reposicionamento instantâneo (loop / redimensionamento) */
.fotos__trilho.sem-transicao,
.fotos__trilho.sem-transicao .fotos__item {
  transition: none;
}

/* Movimento reduzido: troca com fade do quadro inteiro */
.fotos.is-trocando {
  opacity: 0;
}

/* Padrão para fotos novas: preenche o slide, centralizada */
.fotos__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Paginação (gerada pelo main.js) */
.pontos {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pontos__item {
  position: relative;
  flex: none;
  width: 8.6px;
  height: 8.6px;
  padding: 0;
  border: 0;
  border-radius: 72px;
  background-color: var(--ff-gelo);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Área de toque maior que a bolinha */
.pontos__item::before {
  content: "";
  position: absolute;
  inset: -10px -3px;
}

.pontos__item--ativo {
  width: 23.65px;
  background-color: var(--ff-marrom);
}

.pontos__item:focus-visible {
  outline: 2px solid var(--ff-gelo);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fotos__trilho,
  .fotos__item,
  .pontos__item {
    transition: none;
  }
}

/* ---------- Visite a Clínica (mapa) ---------- */
.secao--mapa {
  align-items: center;
  gap: 16px;
}

.secao--mapa .secao__titulo {
  align-self: stretch;
}

.mapa__endereco {
  max-width: 269px;
  font-family: var(--fonte-texto);
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  text-align: center;
  color: var(--branco);
}

.mapa__imagem {
  position: relative;
  width: 100%;
  max-width: 378px;
  aspect-ratio: 378 / 318;
  border-radius: var(--raio-foto);
  overflow: hidden;
  /* fundo neutro enquanto o mapa não carrega */
  background-color: var(--ff-gelo);
}

.mapa__iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.btn-rota {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 366px;
  min-height: 66px;
  padding: 0 24px;
  border-radius: 60px;
  background-color: var(--dourado);
  color: var(--branco);
  font-family: var(--fonte-texto);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--sombra-card-zero);
  transform: scale(1);
  transition:
    transform 0.4s var(--ease-grow),
    box-shadow 0.4s var(--ease-grow);
  -webkit-tap-highlight-color: transparent;
}

/* Efeito "grow": foco (teclado) e toque (mobile) */
.btn-rota:focus-visible,
.btn-rota.is-tapped {
  transform: scale(1.05);
  box-shadow: var(--sombra-card);
}

.btn-rota:focus-visible {
  outline: 2px solid var(--ff-gelo);
  outline-offset: 3px;
}

@media (hover: hover) {
  .btn-rota:hover {
    transform: scale(1.05);
    box-shadow: var(--sombra-card);
  }
}

/* Movimento reduzido: sem crescer, só a sombra */
@media (prefers-reduced-motion: reduce) {
  .btn-rota,
  .btn-rota:hover,
  .btn-rota:focus-visible,
  .btn-rota.is-tapped {
    transform: none;
  }
}

/* ---------- Rodapé ---------- */
.rodape {
  padding: 32px 16px 36px;
}

.rodape__texto {
  max-width: 225px;
  margin: 0 auto;
  font-family: var(--fonte-titulo);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: var(--ff-marrom);
}

/* ==========================================================================
   DESKTOP
   ========================================================================== */
@media (min-width: 768px) {

  .so-mobile {
    display: none;
  }

  .topo {
    padding: 39px 24px 39px;
  }

  .topo__logo {
    width: 209.44px;
  }

  .banner {
    gap: 32px;
    width: calc(100% - 48px);
    max-width: 1396px;
    padding: 648px 24px 153px;
  }

  .banner__capa {
    height: 836px;
    -webkit-mask-image: linear-gradient(180deg, #000 61.2%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 61.2%, transparent 100%);
  }

  .banner__capa-img {
    top: -95.3px;
    left: -4.94%;
    width: 106.08%;
  }

  .banner__logo {
    width: 366px;
  }

  .links-diretos {
    gap: 47px;
  }

  .links-diretos__btn {
    width: 90.88px;
  }

  .elementos {
    align-items: center;
    gap: 32px;
    max-width: 756px;
  }

  .secao {
    gap: 32px;
    width: 100%;
  }

  .secao--areas,
  .secao--programas,
  .secao--avaliacao {
    max-width: 560px;
  }

  .secao__titulo {
    font-size: 32px;
  }

  .lista--programas {
    gap: 32px;
  }

  /* Áreas de Cuidado */
  .card--area {
    --midia-w: 345px;
    --simb-x: 312px;
    --simb-y: 108px;
    min-height: 141px;
    padding: 47px 26px;
  }

  .card__texto {
    font-size: 24px;
  }

  .btn-dermatologia      { --img-x: -5px;  --img-y: -122.99px; --img-w: 410px; --texto-w: 222px; }
  .btn-queda-de-cabelo   { --img-x: -8px;  --img-y: -42.99px;  --img-w: 353px; --texto-w: 263px; }
  .btn-area-dos-olhos    { --img-x: -9px;  --img-y: -42.99px;  --img-w: 354px; --texto-w: 195px; }
  .btn-emagrecimento     { --img-x: -3px;  --img-y: -94.99px;  --img-w: 348px; --texto-w: 195px; }
  .btn-lipedema          { --img-x: -54px; --img-y: -76.99px;  --img-w: 398px; --texto-w: 195px; }

  /* Programas */
  .card--programa .card__simbolo,
  .card--avaliacao .card__simbolo {
    display: block;
  }

  .card--programa {
    --simb-y: 182px;
    --simb-w: 46px;
  }

  .btn-body-center {
    --midia-w: 330px;
    --midia-mascara: linear-gradient(90deg, transparent 0%, #000 100%);
    --img-x: -86px; --img-y: 0px; --img-w: 445px;
    --simb-x: 275px;
  }
  .btn-k-beauty {
    --midia-w: 366px;
    --midia-mascara: linear-gradient(90deg, transparent 0%, #000 51%);
    --img-x: 0px; --img-y: 0px; --img-w: 366px;
    --simb-x: 311px;
    --titulo-w: 150px;
  }
  .btn-careful-day {
    --midia-w: 370px;
    --img-x: 8px; --img-y: -7px; --img-w: 362px;
    --simb-x: 315px;
    --titulo-w: 222px;
  }

  /* Avaliação */
  .card--avaliacao {
    --midia-w: 330px;
    --img-y: -222px;
    --simb-x: 274px;
    --simb-y: 128px;
    --simb-w: 46px;
    min-height: 181px;
    padding: 43px 33px;
  }

  .card--avaliacao .card__descricao-texto {
    max-width: 262px;
    font-size: 18px;
  }

  /* Fotos */
  .secao--fotos {
    min-height: 603.6px;
  }

  .secao--fotos .secao__titulo {
    max-width: none;
  }

  .fotos {
    --fotos-por-vista: 2;
    max-width: 754px;
  }

  /* Mapa */
  .mapa__endereco {
    max-width: none;
  }

  .mapa__imagem {
    max-width: 754px;
    aspect-ratio: 754 / 318.14;
  }

  /* Rodapé */
  .rodape {
    padding: 68px 24px 53px;
  }

  .rodape__texto {
    max-width: 425px;
  }
}
