/* =========================================================
   Tamires Mirando — Style.css (clean + saúde/nutrição)
   Paleta: verde sálvia + creme + neutros
   ========================================================= */

/* =========================================================
   01) Reset básico + acessibilidade
   - Inclui proteção contra scroll horizontal
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* evita scroll horizontal */
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden; /* evita scroll horizontal */
}

/* Melhor foco para navegação por teclado */
:focus-visible {
  outline: 3px solid rgba(47, 111, 94, 0.45);
  outline-offset: 3px;
  border-radius: 10px;
}

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

/* Proteções extras contra overflow em textos longos */
p,
h1,
h2,
h3,
h4,
a,
li {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================================================
   02) Variáveis (cores e medidas)
   ========================================================= */
:root {
  /* Cores */
  --bg: #fbf7f0;            /* creme */
  --surface: #ffffff;       /* cards */
  --surface-2: #f3efe7;     /* seção alternada */
  --ink: #1f2a24;           /* texto principal */
  --muted: rgba(31, 42, 36, 0.72);
  --line: rgba(31, 42, 36, 0.12);

  --brand: #2f6f5e;         /* verde sálvia */
  --brand-2: #3b8b76;       /* verde mais vivo */
  --accent: #b7d5c4;        /* verde claro */
  --warm: #d9c7a8;          /* toque terroso suave */

  /* Layout */
  --container: 1120px;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(20, 30, 25, 0.10);
  --shadow-soft: 0 10px 24px rgba(20, 30, 25, 0.08);

  /* Espaçamento lateral seguro (evita texto colado) */
  --gutter: 1rem;
}

/* =========================================================
   03) Utilitários
   - Container com “gutter” responsivo
   ========================================================= */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 0.92rem;
  color: var(--muted);
}

.link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  transform: translateY(-200%);
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  z-index: 9999;
}
.skip-link:focus {
  transform: translateY(0);
}

/* =========================================================
   04) Header / Nav
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: grid;
  gap: 0.1rem;
  text-decoration: none;
}
.brand__name {
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand__role {
  font-size: 0.92rem;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0; /* ajuda a evitar overflow */
  flex-wrap: nowrap; /* desktop intacto */
}

.nav a {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  white-space: nowrap;
}
.nav a:hover {
  background: rgba(47, 111, 94, 0.08);
  color: var(--ink);
  text-decoration: none;
}

.nav__cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(47, 111, 94, 0.22);
}
.nav__cta:hover {
  filter: brightness(1.02);
}

/* =========================================================
   05) Botões
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(47, 111, 94, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  filter: brightness(1.02);
  box-shadow: 0 16px 34px rgba(47, 111, 94, 0.26);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--brand);
  border-color: rgba(47, 111, 94, 0.25);
  box-shadow: none;
}
.btn--ghost:hover {
  background: rgba(47, 111, 94, 0.08);
  box-shadow: none;
}

/* =========================================================
   06) Seções
   ========================================================= */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__header {
  max-width: 62ch;
  margin-bottom: 1.6rem;
}

.section__header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  letter-spacing: -0.02em;
}

.section__header p {
  margin: 0;
}

/* =========================================================
   07) Hero
   ========================================================= */
.hero {
  padding: 4.2rem 0 3rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  min-width: 0; /* evita grid “estourar” */
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(183, 213, 196, 0.35);
  border: 1px solid rgba(47, 111, 94, 0.18);
  color: rgba(31, 42, 36, 0.85);
  font-weight: 650;
  font-size: 0.92rem;
}

.hero h1 {
  margin: 0.9rem 0 0.9rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hero__highlights {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.hero__highlights li {
  margin: 0.25rem 0;
}

/* Foto da profissional (Hero) */
.hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.media__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(183, 213, 196, 0.35),
    rgba(255, 255, 255, 0.9)
  );
  border: 1px solid rgba(47, 111, 94, 0.18);
  box-shadow: var(--shadow);
}

.media__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   08) Cards (Especialidades)
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  min-width: 0;
}

.card h3 {
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.section__cta {
  margin-top: 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* =========================================================
   09) Steps
   ========================================================= */
.steps {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* =========================================================
   10) Info grid (Presencial/Online)
   ========================================================= */
.info-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.info {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  min-width: 0;
}

.info h3 {
  margin: 0 0 0.35rem;
}
.info p {
  margin: 0;
  color: var(--muted);
}

/* =========================================================
   11) Sobre
   ========================================================= */
.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  margin-top: 1.2rem;
  min-width: 0;
}

.about__text p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  max-width: 70ch;
}

.bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.bullets li {
  margin: 0.3rem 0;
}

.about__box {
  background: linear-gradient(180deg, rgba(183, 213, 196, 0.25), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(47, 111, 94, 0.18);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.kicker {
  margin: 0.2rem 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(31, 42, 36, 0.7);
}

.about__box p {
  margin: 0 0 0.8rem;
}

/* Imagem no bloco Sobre */
.about__image {
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

/* =========================================================
   12) Contato
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
  align-items: start;
  min-width: 0;
}

.contact__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.contact__card h3 {
  margin: 0 0 0.4rem;
}

.contact__actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.5rem;
}

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.form h3 {
  margin: 0 0 1rem;
}

.form__hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(31, 42, 36, 0.65);
}

label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-weight: 650;
}

label span {
  font-size: 0.95rem;
  color: rgba(31, 42, 36, 0.85);
}

input,
textarea {
  width: 100%;
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(31, 42, 36, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

input:focus,
textarea:focus {
  border-color: rgba(47, 111, 94, 0.55);
  box-shadow: 0 0 0 4px rgba(47, 111, 94, 0.14);
}

/* Contato com mapa à esquerda */
.contact--map {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.contact__map {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 520px;
  min-width: 0;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  display: block;
}

.map__info {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.map__info p {
  margin: 0.25rem 0;
}

/* Botão desabilitado do form (como no HTML) */
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* =========================================================
   13) Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
  background: rgba(255, 255, 255, 0.35);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================================================
   14) Botões flutuantes (Whats + Topo)
   ========================================================= */
.float-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 12px;
  z-index: 999;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(31, 42, 36, 0.12);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  background: #fff;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(20, 30, 25, 0.18);
  text-decoration: none;
}

.fab svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* WhatsApp */
.fab--whats {
  background: #25d366;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  position: relative; /* referência para o balão */
}

/* Topo */
.fab--top {
  background: var(--brand);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);

  /* começa escondido; JS controla */
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

/* quando ativo */
.fab--top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fab img {
  width: 40px;
  height: 40px;
  display: block;
}
.fab--whats img {
  width: 32px;
  height: 32px;
}

/* Tooltip do Whats */
.whats-tooltip {
  position: absolute;
  right: 70px; /* distância horizontal do botão */
  top: 50%;
  transform: translateY(-50%);

  background: #ffffff;
  color: #1f2a24;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 14px;
  white-space: nowrap;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);

  opacity: 0;
  pointer-events: none;

  animation: tooltipInOut 4s ease forwards;
}

/* Setinha apontando para o centro do botão */
.whats-tooltip::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent #ffffff;
}

/* Animação suave */
@keyframes tooltipInOut {
  0% {
    opacity: 0;
    transform: translate(10px, -50%);
  }
  10% {
    opacity: 1;
    transform: translate(0, -50%);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(10px, -50%);
  }
}

/* =========================================================
   15) Responsivo (breakpoints pedidos)
   - Mantém desktop como está
   - Evita scroll horizontal
   - Dá mais respiro lateral nos textos
   ========================================================= */

/* ---------- Extra Large Devices: (min-width: 1200px) ---------- */
@media (min-width: 1200px) {
  :root {
    --gutter: 1rem; /* desktop/XL com respiro padrão */
  }
}

/* ---------- Desktop: (min-width: 992px) and (max-width: 1199.98px) ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  :root {
    --gutter: 1rem;
  }

  /* mantém layout desktop; só garante que grids não estouram */
  .hero__grid,
  .cards,
  .steps,
  .info-grid,
  .about,
  .contact {
    min-width: 0;
  }
}

/* ---------- Tablet: (min-width: 576px) and (max-width: 991.98px) ---------- */
@media (min-width: 576px) and (max-width: 991.98px) {
  :root {
    --gutter: 1.25rem; /* mais margem nos textos */
  }

  /* Layout em coluna onde precisa (sem quebrar) */
  .hero__grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .contact--map {
    grid-template-columns: 1fr;
  }

  /* Nav pode “quebrar” linha pra não estourar largura */
  .nav {
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .nav a {
    padding: 0.5rem 0.55rem;
    font-size: 0.94rem;
    white-space: normal; /* evita overflow */
  }

  /* Ajuste seguro do tooltip para não forçar scroll */
  .whats-tooltip {
    max-width: calc(100vw - 120px);
    white-space: normal;
  }

  /* Seções um pouco mais compactas no tablet */
  .section {
    padding: 4rem 0;
  }
}

/* ---------- Mobile: (max-width: 575.98px) ---------- */
@media (max-width: 575.98px) {
  :root {
    --gutter: 1.25rem; /* margem lateral consistente no mobile */
  }

  /* Header empilha e evita itens espremidos */
  .header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  /* Nav quebra linha e evita scroll horizontal */
  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .nav a {
    padding: 0.5rem 0.55rem;
    font-size: 0.94rem;
    white-space: normal; /* evita “estourar” */
  }

  /* Hero em coluna */
  .hero {
    padding-top: 3.2rem;
  }

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

  /* Grids em coluna */
  .cards {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .contact--map {
    grid-template-columns: 1fr;
  }

  /* Botões com largura total (touch-friendly) */
  .btn {
    width: 100%;
  }

  .contact__actions .btn {
    width: 100%;
  }

  /* Mapa não força altura excessiva no mobile */
  .contact__map {
    min-height: 420px;
  }

  .contact__map iframe {
    min-height: 300px;
  }

  /* Tooltip do Whats: evita estourar tela e/ou some se ficar incômodo */
  .whats-tooltip {
    max-width: calc(100vw - 120px);
    white-space: normal;
    font-size: 0.88rem;
  }

  /* Seções mais compactas */
  .section {
    padding: 3.6rem 0;
  }

  /* Botões flutuantes: espaço pro dedo */
  .float-actions {
    right: 14px;
    bottom: 14px;
    gap: 10px;
  }
}

/* =========================================================
   16) Preferência do usuário: menos movimento
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
