/* ============================================================
   MAX INSTITUTO — Landing Pages
   Paleta baseada no logo (tons de azul odontológico)
   ============================================================ */

:root {
  --navy: #0E2F4F;
  --blue-deep: #123B63;
  --blue: #1E5C97;
  --blue-mid: #3E7CB1;
  --blue-light: #8FB8D6;
  --blue-wash: #E8F1F8;
  --blue-wash-2: #F4F9FC;
  --white: #ffffff;
  --ink: #17323f;
  --ink-soft: #4a5f6b;
  --line: #e2ebf2;

  --whatsapp: #25D366;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px -22px rgba(18, 59, 99, .45);
  --shadow-soft: 0 12px 30px -18px rgba(18, 59, 99, .35);

  --max: 1160px;
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: min(92%, var(--max)); margin-inline: auto; }

section { padding: 84px 0; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-wash);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
}

h1, h2, h3 { color: var(--navy); line-height: 1.18; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }

.lead { font-size: 1.1rem; color: var(--ink-soft); }
.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1rem;
  padding: 15px 30px; border-radius: 100px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer; border: 0;
}
.btn svg { width: 20px; height: 20px; }
.btn-wa { background: var(--whatsapp); color: #fff; box-shadow: 0 12px 26px -12px rgba(37,211,102,.7); }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(37,211,102,.85); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-2px); background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue-light); }
.btn-ghost:hover { background: var(--blue-wash); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem;
  box-shadow: var(--shadow-soft);
}
.brand .logo-img { width: 46px; height: 46px; object-fit: contain; display: block; }
.brand-logo { height: 50px; width: auto; display: block; }
.brand .logo-text b { color: var(--navy); font-weight: 800; letter-spacing: .04em; display: block; line-height: 1; font-size: 1.05rem; }
.brand .logo-text span { color: var(--blue-mid); font-size: .6rem; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .95rem; font-weight: 500; color: var(--ink-soft); transition: color .15s; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(62,124,177,.18), transparent 60%),
    linear-gradient(180deg, var(--blue-wash-2) 0%, #fff 100%);
  padding: 92px 0 84px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero h1 span { color: var(--blue); }
.hero p { margin: 22px 0 32px; font-size: 1.13rem; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-trust div b { display: block; font-size: 1.6rem; color: var(--navy); font-weight: 800; }
.hero-trust div span { font-size: .82rem; color: var(--ink-soft); }
.hero-visual {
  position: relative; border-radius: 26px; overflow: hidden;
  aspect-ratio: 4/5; background: linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
  box-shadow: var(--shadow); display: grid; place-items: center; color: rgba(255,255,255,.4);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .placeholder { text-align: center; font-size: .9rem; padding: 20px; }

/* ---------- Treatments cards ---------- */
.treatments { background: var(--white); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon {
  width: 56px; height: 56px; border-radius: 15px; background: var(--blue-wash);
  display: grid; place-items: center; margin-bottom: 22px; color: var(--blue); font-size: 1.6rem;
}
.card .icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-soft); margin-bottom: 20px; }
.card ul { list-style: none; margin-bottom: 26px; display: grid; gap: 10px; }
.card ul li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink); }
.card ul li::before { content: "✓"; color: var(--blue); font-weight: 800; }
.card .card-foot { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Specialist ---------- */
.specialist { background: linear-gradient(180deg, #fff 0%, var(--blue-wash-2) 100%); }
.spec-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; align-items: center; }
.spec-photo {
  border-radius: 22px; overflow: hidden; aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--blue-mid), var(--blue-deep));
  box-shadow: var(--shadow); display: grid; place-items: center; color: rgba(255,255,255,.45);
}
.spec-photo img { width: 100%; height: 100%; object-fit: cover; }
.spec-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0 32px; }
.spec-badge {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; display: flex; gap: 12px; align-items: center; font-size: .92rem; font-weight: 500;
  box-shadow: var(--shadow-soft);
}
.spec-badge .emoji { font-size: 1.4rem; }
.spec-badge svg { width: 26px; height: 26px; color: var(--blue); flex: none; }

/* Ícone inline (coração dentro de títulos) */
.inline-ico { width: 1em; height: 1em; vertical-align: -.12em; display: inline-block; }
.cta-band .inline-ico { fill: #9cc4e6; }

/* ---------- Steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { text-align: center; padding: 10px; }
.step .num {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 1.3rem;
  display: grid; place-items: center; box-shadow: var(--shadow-soft);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 600; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--blue); font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- Antes / Depois ---------- */
.ba-photo { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); max-width: 340px; margin-inline: auto; }
.ba-photo img { width: 100%; height: auto; display: block; }
/* Selos ANTES / DEPOIS sobre a imagem (quando não vêm na foto) */
.ba-tag {
  position: absolute; left: 16px; z-index: 2;
  background: var(--blue); color: #fff; font-weight: 700; font-size: .82rem;
  letter-spacing: .06em; padding: 7px 16px; border-radius: 9px;
  box-shadow: 0 6px 16px rgba(14,47,79,.35);
}
.ba-tag--antes { top: 16px; }
.ba-tag--depois { top: 50%; margin-top: 16px; }
.ba-caption { text-align: center; font-size: .85rem; color: var(--ink-soft); margin-top: 12px; }

/* ---------- Localização / Mapa ---------- */
.location-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: stretch; }
.map-embed {
  border-radius: var(--radius); overflow: hidden; min-height: 460px;
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.map-embed iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; }
.location-info { display: flex; flex-direction: column; gap: 18px; }
.clinic-photo {
  border-radius: var(--radius); overflow: hidden; flex: 1; min-height: 140px;
  background: linear-gradient(160deg, var(--blue-mid), var(--blue-deep));
  display: grid; place-items: center; color: rgba(255,255,255,.5); box-shadow: var(--shadow-soft);
}
.clinic-photo img { width: 100%; height: 100%; object-fit: cover; }
.clinic-photo .placeholder { text-align: center; font-size: .82rem; padding: 16px; }
.address-card {
  background: var(--blue-wash); border-radius: var(--radius-sm); padding: 18px 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.address-card svg { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 2px; }
.address-card b { color: var(--navy); display: block; margin-bottom: 2px; }
.address-card span { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Carrossel de casos ---------- */
.gallery { background: var(--navy); }
.gallery .eyebrow { background: rgba(255,255,255,.12); color: #fff; }
.gallery .section-head h2 { color: #fff; }
.gallery .section-head .lead { color: rgba(255,255,255,.8); }
.carousel { position: relative; max-width: 520px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: #000; }
.carousel-track { display: flex; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.carousel-slide { min-width: 100%; display: flex; justify-content: center; align-items: center; background: #000; }
.carousel-slide img { width: auto; max-width: 100%; max-height: 600px; height: auto; display: block; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--navy); display: grid; place-items: center;
  box-shadow: var(--shadow-soft); transition: background .15s, transform .15s; z-index: 2;
}
.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.carousel-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.35); transition: background .15s, width .15s;
}
.carousel-dots button.active { background: #fff; width: 28px; border-radius: 6px; }
.gallery-note { text-align: center; color: rgba(255,255,255,.55); font-size: .82rem; margin-top: 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  color: #fff; text-align: center; border-radius: 26px; padding: 62px 30px;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 540px; margin: 16px auto 30px; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer .brand .logo-text b { color: #fff; }
.site-footer .brand { display: inline-flex; background: #fff; padding: 10px 16px; border-radius: 12px; }
.site-footer .brand-logo { height: 40px; }
.site-footer a { color: rgba(255,255,255,.72); font-size: .95rem; display: block; margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }
.footer-desc { font-size: .95rem; margin: 18px 0; max-width: 300px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; font-size: .85rem; text-align: center; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: var(--whatsapp);
  display: grid; place-items: center; box-shadow: 0 14px 30px -8px rgba(37,211,102,.7);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,.5); animation: pulse 2.2s infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 18px rgba(37,211,102,0); } }

/* ---------- Page hero (interno) ---------- */
.page-hero {
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(62,124,177,.22), transparent 60%),
    linear-gradient(180deg, var(--blue-wash-2), #fff);
  padding: 70px 0 60px;
}
.page-hero .eyebrow { margin-bottom: 14px; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 20px; }
.breadcrumb a { color: var(--blue); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 40px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  section { padding: 58px 0; }
  .hero { padding: 60px 0 56px; }
  .page-hero { padding: 30px 0 52px; }
  .hero-grid, .spec-grid { grid-template-columns: 1fr; gap: 34px; }
  .ba-photo { max-width: 440px; }
  /* Texto vem primeiro; imagem depois (mantém contexto no mobile) */
  .hero-copy { order: 1; }
  .hero-visual { order: 2; max-width: 460px; margin-inline: auto; margin-top: 4px; }
  .cards, .steps-grid, .footer-grid { grid-template-columns: 1fr; }
  .spec-badges { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .map-embed, .map-embed iframe { min-height: 340px; }
  /* Some o botão de WhatsApp do topo no mobile (já existe o flutuante) */
  .nav-cta { display: none; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: #fff; padding: 18px 6%; gap: 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft);
  }
}
@media (max-width: 560px) {
  section { padding: 48px 0; }
  .wrap { width: 90%; }
  h1 { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 6.4vw, 2rem); }
  .hero p, .lead { font-size: 1.02rem; }
  .section-head { margin-bottom: 38px; }
  .brand .logo-text b { font-size: 1rem; white-space: nowrap; }
  .brand .logo-text span { font-size: .5rem; letter-spacing: .03em; }
  .brand .logo-img { width: 40px; height: 40px; }
  .brand-logo { height: 44px; }
  .card { padding: 26px; }
  .hero-trust { gap: 18px 26px; }
  .cta-band { padding: 44px 20px; }
  .cta-band h2 { font-size: clamp(1.4rem, 6.4vw, 1.9rem); }
  .btn { padding: 14px 24px; }
  .faq-item summary { padding: 18px 18px; font-size: .98rem; }
  .ba-caption { font-size: .8rem; }
}
