/* ============================================================
   Jessica Neves — Psicóloga
   Paleta baseada na identidade visual da profissional:
   verde-sálvia / oliva, bege/off-white, madeira natural.
   Tom: sério, acolhedor, saúde. Sem neon, sem efeitos berrantes.
   ============================================================ */

:root {
  /* Cores */
  --sage-900: #3f4a3c;   /* verde escuro do logo (títulos) */
  --sage-700: #5a6b53;   /* verde-oliva principal */
  --sage-500: #7d9070;   /* verde-sálvia médio */
  --sage-300: #a9b8a0;   /* verde suave */
  --sage-100: #e7ede2;   /* verde muito claro (fundos) */

  --sand-700: #8a7b66;   /* terracota/bege escuro */
  --sand-300: #d8cbb8;   /* bege */
  --sand-100: #f4efe7;   /* off-white quente (fundo soft) */

  --cream: #fbf9f5;      /* fundo base */
  --ink: #2f342c;        /* texto principal */
  --ink-soft: #5c6157;   /* texto secundário */
  --line: #e3ddd2;       /* linhas/bordas */
  --white: #ffffff;

  /* Tipografia */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --maxw: 1160px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 18px rgba(63, 74, 60, 0.08);
  --shadow-md: 0 14px 40px rgba(63, 74, 60, 0.14);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--sage-900);
  margin: 0;
  letter-spacing: 0.2px;
}

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--soft { background: var(--sand-100); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-500);
  margin: 0 0 0.9rem;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-bottom: 1rem;
}

.section__head { max-width: 640px; margin: 0 auto clamp(2.2rem, 5vw, 3.5rem); text-align: center; }
.section__intro { color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.9rem; }

.btn--primary { background: var(--sage-700); color: var(--white); }
.btn--primary:hover { background: var(--sage-900); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn--ghost { background: transparent; color: var(--sage-900); border-color: var(--sage-300); }
.btn--ghost:hover { background: var(--sage-100); border-color: var(--sage-500); }

.btn--light { background: var(--white); color: var(--sage-900); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 245, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 2px 20px rgba(63,74,60,0.06); }

.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; color: var(--sage-900); }
.brand__role { font-family: var(--sans); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-500); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav__link { font-family: var(--sans); font-weight: 400; font-size: 0.98rem; text-decoration: none; color: var(--ink); position: relative; padding: 4px 0; transition: color 0.2s var(--ease); }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--sage-500); transition: width 0.28s var(--ease); }
.nav__link:hover { color: var(--sage-700); }
.nav__link:hover::after { width: 100%; }
.nav__cta { color: var(--white); }
.nav__cta:hover { color: var(--white); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--sage-900); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 85% 20%, rgba(169,184,160,0.28), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(216,203,184,0.22), transparent 70%);
  z-index: -1;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 5.2vw, 4rem); margin-bottom: 1.4rem; }
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 40ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.6rem; }
.hero__meta { font-size: 0.9rem; letter-spacing: 0.04em; color: var(--sage-700); margin: 0; }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; height: clamp(380px, 55vw, 560px); object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.hero__media::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

/* ---------- Statement ---------- */
.statement { background: var(--sage-700); color: var(--sand-100); padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.statement__text {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(1.4rem, 3.2vw, 2.15rem); line-height: 1.4;
  text-align: center; max-width: 900px; margin: 0 auto; color: var(--cream);
}

/* ---------- Sobre ---------- */
.about__inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about__media img { width: 100%; height: clamp(400px, 50vw, 560px); object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about__text p { color: var(--ink-soft); font-size: 1.06rem; }
.about__text strong { color: var(--sage-700); font-weight: 500; }
.about__list { list-style: none; padding: 0; margin: 1.6rem 0 2rem; }
.about__list li { position: relative; padding-left: 1.8rem; margin-bottom: 0.7rem; color: var(--ink); }
.about__list li::before {
  content: ""; position: absolute; left: 0; top: 0.65em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage-500); box-shadow: 0 0 0 4px var(--sage-100);
}

/* ---------- Especialidades ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.5rem; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--sage-300); }
.card__title { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--sage-900); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Galeria consultório ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; gap: 1rem;
}
.gallery__item { margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item--tall { grid-row: span 2; }

/* ---------- Avaliações ---------- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #e0a53b; }
.stars--lg svg { width: 26px; height: 26px; }

.reviews__rating { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.reviews__score { font-family: var(--serif); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--sage-900); }
.reviews__count { font-size: 0.9rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.reviews__carousel { position: relative; }
/* Alarga a área do carrossel além do container padrão, mantendo 3 cards visíveis */
.reviews .reviews__carousel { width: min(1320px, 94vw); margin-left: 50%; transform: translateX(-50%); }
.reviews__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 1.8rem) / 3);   /* exatamente 3 visíveis */
  gap: 1.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0 1.5rem;   /* sem padding lateral p/ não quebrar o cálculo dos 3 */
  -ms-overflow-style: none; scrollbar-width: none;
}
.reviews__track::-webkit-scrollbar { display: none; }

.review {
  scroll-snap-align: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; margin: 0;
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: var(--shadow-sm);
  align-self: stretch;   /* todos os cards com a mesma altura */
}
.review blockquote {
  margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.6;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
  overflow: hidden;
  flex: 1;   /* ocupa o espaço, empurrando autor para a base */
}
.review.is-expanded { align-self: start; }   /* ao expandir, cresce livremente */
.review.is-expanded blockquote { -webkit-line-clamp: unset; overflow: visible; flex: 0 1 auto; }
.review__more {
  align-self: flex-start;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 0.9rem;
  color: var(--sage-700); text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.review__more:hover { color: var(--sage-900); }
.review__more[hidden] { display: none; }
.review__author {
  display: flex; align-items: center; gap: 0.7rem;
  font-weight: 500; color: var(--sage-900); font-size: 0.95rem;
}
.review__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-100); color: var(--sage-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; flex-shrink: 0;
}

.reviews__controls { display: flex; justify-content: center; gap: 0.8rem; margin-top: 0.5rem; }
.reviews__btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--sage-300); background: var(--white); color: var(--sage-700);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.reviews__btn:hover { background: var(--sage-700); color: var(--white); border-color: var(--sage-700); transform: translateY(-2px); }
.reviews__btn:disabled { opacity: 0.4; cursor: default; transform: none; background: var(--white); color: var(--sage-700); border-color: var(--sage-300); }

/* ---------- Faixa CTA ---------- */
.cta-band { background: linear-gradient(135deg, var(--sage-900), var(--sage-700)); color: var(--cream); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band__title { color: var(--white); font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.6rem; }
.cta-band__text { color: rgba(251,249,245,0.85); max-width: 46ch; margin: 0; }

/* ---------- Contato / Localização ---------- */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.info-list__item { display: flex; flex-direction: column; gap: 2px; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.info-list__label { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage-500); font-weight: 500; }
.info-list__item a { color: var(--sage-700); text-decoration: none; }
.info-list__item a:hover { text-decoration: underline; }

.hours { margin-bottom: 2rem; }
.hours__title { font-size: 1.3rem; margin-bottom: 0.8rem; }
.hours__table { width: 100%; border-collapse: collapse; }
.hours__table th, .hours__table td { text-align: left; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 0.98rem; }
.hours__table th { color: var(--ink); }
.hours__table td { text-align: right; color: var(--ink-soft); }
.hours__closed th, .hours__closed td { color: var(--sand-700); }

.contact__map { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); min-height: 420px; height: 100%; }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--sage-900); color: var(--sand-100); padding: 3rem 0 2rem; }
.footer__inner { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; text-align: center; }
.footer .brand__name { color: var(--cream); }
.footer .brand__role { color: var(--sage-300); }
.footer__addr { color: rgba(231,237,226,0.8); font-size: 0.95rem; margin: 0; }
.footer__social {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--sage-300); text-decoration: none; font-size: 0.92rem;
  padding: 0.35rem 0; transition: color 0.2s var(--ease);
}
.footer__social:hover { color: var(--cream); }
.footer__copy { color: rgba(231,237,226,0.55); font-size: 0.85rem; margin: 0; }

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--sage-700); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.05); background: var(--sage-900); }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .reviews .reviews__carousel { width: auto; margin-left: 0; transform: none; }
  .reviews__track { grid-auto-columns: calc((100% - 1.8rem) / 2); }   /* 2 visíveis */
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 520px; }
  .about__inner { grid-template-columns: 1fr; }
  .about__media { max-width: 480px; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__map { min-height: 340px; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.2rem, 4vw, 2.5rem) 1.6rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 1rem; }
  .nav-toggle { display: flex; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery__item--tall { grid-row: span 1; }

  .reviews__track { grid-auto-columns: 100%; }   /* 1 visível no celular */
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

/* Acessibilidade: respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
