/* ==========================================================================
   CONSULTÓRIO DR. NELSON BLEFARI — Design tokens e estilos globais
   Paleta: navy #021d48 (logo) + branco/creme + acento dourado discreto
   Tipografia: Playfair Display (títulos) + Lora (subtítulos) + Inter (corpo)
   ========================================================================== */

:root {
  /* Cores — navy do logo + cremes claros */
  --color-bg:           #fbfaf6;
  --color-surface:      #ffffff;
  --color-surface-2:    #f3eee5;
  --color-text:         #14213a;
  --color-text-muted:   #5a6378;
  --color-text-soft:    #8a909d;
  --color-navy:         #021d48;
  --color-navy-2:       #0a2c5e;
  --color-navy-soft:    #1d3e72;
  --color-gold:         #b6914a;
  --color-gold-bright:  #d4ad65;
  --color-gold-deep:    #8a6a30;
  --color-line:         rgba(2, 29, 72, 0.14);
  --color-line-soft:    rgba(2, 29, 72, 0.07);

  /* Tipografia */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif:   'Lora', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Sombras */
  --shadow-soft: 0 6px 24px rgba(2, 29, 72, 0.08);
  --shadow-card: 0 2px 12px rgba(2, 29, 72, 0.06);
  --shadow-deep: 0 14px 44px rgba(2, 29, 72, 0.16);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 17px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-navy);
  text-decoration: none;
  transition: color .25s var(--ease);
}
a:hover { color: var(--color-gold-deep); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
@media (max-width: 480px) { .container { padding: 0 18px; } }

/* ============== Tipografia ============== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.18;
  margin: 0 0 .5em;
  color: var(--color-navy);
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }

h1 em, h2 em {
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-gold-deep);
}

.break-md { display: inline; }
@media (max-width: 880px) { .break-md { display: none; } }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .76rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-bottom: 1rem;
  font-weight: 600;
  max-width: 100%;
}
@media (max-width: 520px) { .eyebrow { letter-spacing: .15em; font-size: .7rem; } }

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.muted { color: var(--color-text-muted); }
.soft  { color: var(--color-text-soft); }
.gold  { color: var(--color-gold-deep); }

/* ============== Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line-soft);
}
.site-header .nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo {
  width: auto;
  height: 56px;
  display: block;
  border-radius: 8px;
  flex: none;
}
@media (max-width: 480px) { .brand-logo { height: 44px; } }

.nav-links {
  display: flex; gap: 24px;
  margin-left: auto;
  list-style: none; padding: 0; margin-block: 0;
}
.nav-links a {
  color: var(--color-text-muted);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  position: relative;
}
.nav-links a:hover { color: var(--color-navy); }
.nav-actions { display: flex; gap: 10px; }

.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--color-navy);
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 980px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: block; }
  .site-header.menu-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-line);
    padding: 8px 0;
    box-shadow: var(--shadow-soft);
  }
  .site-header.menu-open .nav-links a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-line-soft);
  }
  .site-header.menu-open .nav-actions {
    display: flex;
    padding: 14px 24px 18px;
    background: var(--color-surface);
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin-top: 264px;
  }
}

/* ============== Botões ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: 1.5px solid var(--color-navy);
  background: transparent;
  color: var(--color-navy);
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
  max-width: 100%;
  text-align: center;
}
.btn-lg { padding: 16px 32px; font-size: .95rem; }
@media (max-width: 520px) {
  .btn {
    white-space: normal;
    padding: 12px 18px;
    font-size: .82rem;
    letter-spacing: .025em;
    line-height: 1.25;
  }
  .btn-lg { padding: 14px 22px; font-size: .88rem; }
}
.btn:hover {
  background: var(--color-navy);
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-navy-2) 0%, var(--color-navy) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-navy-soft) 0%, var(--color-navy-2) 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: transparent;
}
.btn-whatsapp:hover { background: #1ebe5a; color: #fff; }
.btn-outline { background: transparent; color: var(--color-navy); border-color: var(--color-navy); }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: #fff;
}
.btn svg { width: 18px; height: 18px; }
.btn-lg svg { width: 22px; height: 22px; }

/* ============== Seções ============== */
section { padding: clamp(64px, 9vw, 110px) 0; }
.section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 56px;
}
.section-head .lead { margin-top: 12px; }

.divider-gold {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 14px auto 22px;
}

/* ============== Hero ============== */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 80px 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2,29,72,.78) 0%, rgba(2,29,72,.92) 100%),
    radial-gradient(ellipse at 90% 10%, rgba(212,173,101,.18), transparent 55%),
    url('/assets/img/hero-bg.jpg') center/cover no-repeat,
    var(--color-navy);
  z-index: 0;
}
@media (max-width: 880px) {
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(2,29,72,.85) 0%, rgba(2,29,72,.94) 100%),
      url('/assets/img/hero-bg-mobile.jpg') center/cover no-repeat,
      var(--color-navy);
  }
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.hero h1 {
  color: #fff;
  margin-bottom: 22px;
}
.hero h1 em { color: var(--color-gold-bright); }
.hero .eyebrow { color: var(--color-gold-bright); }
.hero p.lead {
  color: rgba(255, 255, 255, .9);
  max-width: 640px;
  margin: 0 auto;
}
.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 36px;
  justify-content: center;
}
.hero-trust {
  margin-top: 40px;
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  letter-spacing: .04em;
  justify-content: center;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 16px; height: 16px; color: var(--color-gold-bright); }

/* ============== Faixa de stats ============== */
.stats {
  background: var(--color-surface);
  border-block: 1px solid var(--color-line);
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: var(--color-navy);
  line-height: 1;
  margin-bottom: 8px;
  font-weight: 600;
}
.stat .label {
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ============== Sobre ============== */
.about {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}
.about-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}
.about-text p { font-size: 1.04rem; color: var(--color-text-muted); margin-bottom: 1.1em; text-align: left; }
.about-text strong { color: var(--color-navy); font-weight: 600; }

.about-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.about-photo img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-soft);
}
.about-photo-caption {
  text-align: center;
  font-family: var(--font-serif);
  line-height: 1.4;
}
.about-photo-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 4px;
}
.about-photo-caption span {
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.about-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
@media (max-width: 880px) { .about-credentials { justify-content: center; } }
.credential-pill {
  padding: 9px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: .82rem;
  color: var(--color-navy);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-card);
}
.credential-pill svg { width: 15px; height: 15px; color: var(--color-gold); }

.about-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 64px;
}
@media (max-width: 880px) { .about-values { grid-template-columns: repeat(2, 1fr); margin-top: 40px; } }
@media (max-width: 520px) { .about-values { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; } }
.value {
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: left;
  box-shadow: var(--shadow-card);
}
.value h4 {
  font-family: var(--font-body);
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 6px;
  font-weight: 600;
}
.value p { font-size: .92rem; color: var(--color-text-muted); margin: 0; line-height: 1.55; }

/* ============== Serviços (cards) ============== */
.areas { background: var(--color-surface-2); }
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .areas-grid { grid-template-columns: 1fr; } }
@media (min-width: 881px) and (max-width: 1100px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }
.area-card {
  padding: 32px 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: all .35s var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.area-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .4s var(--ease);
}
.area-card:hover {
  border-color: rgba(2, 29, 72, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}
.area-card:hover::before { transform: scaleX(1); }
.area-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(2, 29, 72, .08);
  color: var(--color-navy);
  margin-bottom: 18px;
}
.area-icon svg { width: 28px; height: 28px; }
.area-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--color-navy); }
.area-card p { font-size: .94rem; color: var(--color-text-muted); margin: 0; line-height: 1.6; }

/* ============== Galeria — Nossas Instalações ============== */
.gallery { background: var(--color-bg); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 720px) { .gallery-grid { grid-template-columns: 1fr; gap: 20px; } }
.gallery-card {
  margin: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: all .35s var(--ease);
  display: flex;
  flex-direction: column;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.gallery-card figcaption {
  padding: 22px 24px 26px;
}
.gallery-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--color-navy);
}
.gallery-card p {
  font-size: .94rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ============== Depoimentos ============== */
.testimonials { background: var(--color-surface); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial {
  padding: 32px 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
}
.testimonial .stars {
  color: var(--color-gold);
  letter-spacing: 4px;
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.testimonial .quote {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--color-navy);
  line-height: 1.6;
  margin-bottom: 22px;
}
.testimonial .who {
  display: flex; gap: 14px;
  align-items: center;
  border-top: 1px solid var(--color-line-soft);
  padding-top: 16px;
}
.testimonial .avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 2px solid var(--color-surface);
  box-shadow: 0 2px 8px rgba(2,29,72,.12);
}
.testimonial .who > div { display: flex; flex-direction: column; }
.testimonial .name {
  font-weight: 600;
  font-size: .98rem;
  color: var(--color-navy);
}
.testimonial .meta {
  font-size: .82rem;
  color: var(--color-text-soft);
}

/* ============== Contato ============== */
.contact { background: var(--color-bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.contact-card {
  padding: 22px 26px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  display: flex; gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.contact-card .icon {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 10px;
  background: rgba(2, 29, 72, .1);
  color: var(--color-navy);
  display: grid; place-items: center;
}
.contact-card .icon svg { width: 22px; height: 22px; }
.contact-card h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
.contact-card p, .contact-card a {
  font-size: 1rem;
  color: var(--color-navy);
  margin: 0;
}
.contact-card a:hover { color: var(--color-gold-deep); }

.contact-cta {
  padding: 36px;
  border: 2px solid var(--color-navy);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(2, 29, 72, .04), transparent);
  text-align: center;
}
.contact-cta h3 { color: var(--color-navy); }
.contact-cta .btn-row {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 24px;
}

/* ============== Mapa ============== */
.map-embed {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow-card);
}
.map-embed-frame {
  position: relative;
  width: 100%;
  padding-bottom: 60%;
  overflow: hidden;
  border-radius: 10px;
  background: var(--color-surface-2);
}
.map-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* === Anti-overflow defensivo === */
.contact-grid > *,
.footer-grid > *,
.areas-grid > *,
.testimonials-grid > *,
.stats-grid > *,
.about-grid > *,
.gallery-grid > *,
.hero-inner > * { min-width: 0; }

img, iframe { max-width: 100%; }

/* ============== Footer ============== */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,.72);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-bottom: 18px;
  font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a {
  color: rgba(255,255,255,.78);
  font-size: .94rem;
}
.site-footer a:hover { color: var(--color-gold-bright); }
.site-footer p.muted { color: rgba(255,255,255,.62); }

.social-icons { display: flex; gap: 12px; margin-top: 4px; }
.social-icons a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  color: rgba(255,255,255,.78);
  transition: all .25s var(--ease);
}
.social-icons a:hover {
  border-color: var(--color-gold-bright);
  color: var(--color-gold-bright);
  transform: translateY(-2px);
}
.social-icons svg { width: 18px; height: 18px; }
.copyright {
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
}

/* ============== WhatsApp flutuante ============== */
.whatsapp-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: grid; place-items: center;
  z-index: 100;
  box-shadow: 0 6px 24px rgba(37,211,102,.4);
  transition: transform .25s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); color: white; }
.whatsapp-float svg { width: 32px; height: 32px; }

/* ============== Animações de entrada ============== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
