/* ==========================================================
   MedCerto — Design system v2
   Conceito: credencial de confiança. Petróleo profundo +
   verde de verificação. Tipografia editorial (Fraunces) +
   interface limpa (Inter). Zero clichê de saúde.
   ========================================================== */

:root {
  --ink:        #0F1F1D;
  --brand:      #0D3733;
  --brand-mid:  #114440;
  --brand-deep: #091F1C;
  --verify:     #0C9966;
  --verify-dk:  #077A52;
  --verify-ink: #055C3D;
  --verify-bg:  #E2F5EC;
  --verify-bdr: #B8E8D0;
  --bg:         #F4F6F5;
  --surface:    #FFFFFF;
  --muted:      #56706B;
  --muted2:     #8AA39D;
  --line:       #E1E8E5;
  --shadow-sm:  0 1px 3px rgba(15,31,29,.06);
  --shadow:     0 2px 8px rgba(15,31,29,.06), 0 12px 32px rgba(15,31,29,.07);
  --shadow-lg:  0 8px 24px rgba(15,31,29,.10), 0 32px 64px rgba(15,31,29,.10);
  --r:          14px;
  --r-sm:       10px;
  --maxw:       1120px;
  --transition: .18s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; }
h1,h2,h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.1; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.site-header { background: var(--brand-deep); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.hd-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; padding-bottom: 13px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; color: #fff; letter-spacing: -.2px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--verify); display: grid; place-items: center; flex: none; }
.hd-nav { display: flex; align-items: center; gap: 22px; }
.hd-nav a { font-size: 14px; color: #9FC2B7; font-weight: 500; transition: color var(--transition); }
.hd-nav a:hover { color: #fff; }
.hd-cta { background: var(--verify); color: #fff !important; padding: 8px 16px; border-radius: var(--r-sm); font-weight: 600 !important; font-size: 13px !important; transition: background var(--transition) !important; }
.hd-cta:hover { background: var(--verify-dk) !important; }
@media (max-width: 600px) { .hd-nav a:not(.hd-cta) { display: none; } }

/* ── HERO ── */
.hero { background: var(--brand); padding: 56px 0 100px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { display: none; } }

.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); color: #CBE8DC; font-size: 13px; font-weight: 600; padding: 5px 12px 5px 9px; border-radius: 999px; margin-bottom: 20px; }
.hero-text h1 { font-size: clamp(30px, 4.5vw, 50px); color: #fff; max-width: 13ch; line-height: 1.08; }
.hero-text p { color: #A8CFC4; font-size: 17px; max-width: 46ch; margin-top: 16px; line-height: 1.6; }

.hero-stats { display: flex; align-items: center; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-n { font-family: "Fraunces", serif; font-size: 28px; font-weight: 600; color: #fff; line-height: 1; }
.stat-l { font-size: 12px; color: #7AADA0; margin-top: 3px; }
.stat-div { width: 1px; height: 36px; background: rgba(255,255,255,.15); }

/* card flutuante do hero */
.hv-card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg); }
.hv-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.hv-av { width: 52px; height: 52px; border-radius: 13px; background: var(--verify-bg); color: var(--verify-ink); display: grid; place-items: center; font-family: "Fraunces", serif; font-size: 18px; font-weight: 600; flex: none; }
.hv-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.hv-spec { font-size: 13px; color: var(--verify-ink); font-weight: 600; margin-top: 2px; }
.hv-seal { margin-bottom: 14px; }
.hv-prices { display: flex; gap: 8px; margin-bottom: 14px; }
.hv-pill { flex: 1; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; text-align: center; }
.hv-pill span { font-size: 11px; color: var(--muted); display: block; }
.hv-pill b { font-family: "Fraunces", serif; font-size: 16px; color: var(--ink); }
.hv-pill.online { background: var(--verify-bg); border-color: var(--verify-bdr); }
.hv-pill.online b { color: var(--verify-ink); }
.hv-wa { background: var(--verify); color: #fff; border-radius: var(--r-sm); padding: 11px; text-align: center; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; }

/* ── COMO FUNCIONA ── */
.how { background: var(--surface); padding: 64px 0; border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(22px, 3vw, 32px); text-align: center; margin-bottom: 40px; color: var(--ink); }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 8px; flex-wrap: wrap; }
.step { flex: 1; min-width: 200px; max-width: 260px; text-align: center; padding: 0 12px; }
.step-n { width: 44px; height: 44px; border-radius: 50%; background: var(--verify-bg); color: var(--verify-ink); font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; display: grid; place-items: center; margin: 0 auto 14px; }
.step h3 { font-family: "Inter", sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.step-arrow { font-size: 22px; color: var(--line); padding-top: 14px; flex: none; }
@media (max-width: 640px) { .step-arrow { display: none; } }

/* ── FILTROS ── */
.filters {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px; margin-top: -52px; position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 14px; align-items: end;
}
@media (max-width: 820px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .filters { grid-template-columns: 1fr; margin-top: 0; } }

.field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 7px; }
.field input, .field select {
  width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--verify); box-shadow: 0 0 0 3px rgba(12,153,102,.12); }

.modes { display: flex; gap: 6px; }
.modes button {
  flex: 1; padding: 11px 6px; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted); border-radius: var(--r-sm);
  font-family: inherit; transition: var(--transition);
}
.modes button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.results-info { color: var(--muted); font-size: 13px; margin: 28px 0 16px; font-weight: 500; }

/* ── CARDS ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 56px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  padding: 18px; display: flex; flex-direction: column; gap: 13px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--verify-bdr); }

.card-top { display: flex; gap: 14px; align-items: flex-start; }
.avatar { width: 64px; height: 64px; border-radius: 13px; object-fit: cover; background: var(--verify-bg); flex: none; }
.avatar-ini { width: 64px; height: 64px; border-radius: 13px; background: var(--verify-bg); color: var(--verify-ink); display: grid; place-items: center; font-family: "Fraunces", serif; font-size: 22px; font-weight: 600; flex: none; }
.card h3 { font-size: 18px; color: var(--ink); line-height: 1.2; }
.card .spec { color: var(--verify-ink); font-weight: 600; font-size: 12px; margin-top: 3px; text-transform: uppercase; letter-spacing: .3px; }
.card .loc { color: var(--muted); font-size: 12px; margin-top: 3px; }
.card .crm { color: var(--muted2); font-size: 11px; margin-top: 2px; }
.card .bio { color: #3A4A46; font-size: 13px; line-height: 1.55; }

/* Selo */
.seal {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--verify-bg); color: var(--verify-ink);
  border: 1px solid var(--verify-bdr);
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  padding: 4px 9px 4px 7px; border-radius: 999px; width: fit-content;
}
.seal svg { width: 13px; height: 13px; flex: none; }

/* Preços */
.prices { display: flex; gap: 7px; flex-wrap: wrap; }
.price-pill { font-size: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; background: #FAFBF9; }
.price-pill b { font-family: "Fraunces", serif; font-size: 15px; font-weight: 600; display: block; }
.price-pill span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .3px; }

.rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.stars { color: #D4930A; letter-spacing: 1px; }

/* Ações */
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.btn { font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: var(--r-sm); padding: 10px 14px; border: 1.5px solid transparent; text-decoration: none; text-align: center; transition: var(--transition); }
.btn-wa { background: var(--verify); color: #fff; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-wa:hover { background: var(--verify-dk); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); white-space: nowrap; }
.btn-ghost:hover { border-color: var(--verify); color: var(--verify-ink); }

/* Empty state */
.empty { text-align: center; color: var(--muted); padding: 56px 16px; grid-column: 1/-1; }
.empty h3 { color: var(--ink); margin-bottom: 8px; font-size: 20px; }

/* ── FAQ ── */
.faq { padding: 8px 0 64px; max-width: 760px; }
.faq h2 { font-size: clamp(20px, 3vw, 28px); margin-bottom: 18px; margin-top: 32px; }
.faq-item { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 10px; }
.faq-item h3 { font-family: "Inter", sans-serif; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.faq-item p { color: #3A4A46; font-size: 14px; margin: 0; line-height: 1.6; }

/* ── CTA MÉDICO ── */
.cta-doc { background: var(--brand); padding: 48px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-doc h2 { font-size: clamp(20px, 3vw, 28px); color: #fff; }
.cta-doc p { color: #8EC4B7; font-size: 15px; margin-top: 8px; }
.cta-btn { background: #fff; color: var(--brand); font-weight: 700; font-size: 15px; padding: 14px 24px; border-radius: var(--r-sm); white-space: nowrap; transition: var(--transition); }
.cta-btn:hover { background: var(--verify-bg); color: var(--verify-ink); }

/* ── RODAPÉ ── */
.site-footer { background: var(--brand-deep); padding: 40px 0 0; }
.footer-inner { display: flex; gap: 48px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding-bottom: 32px; }
.footer-brand p { color: #6E9D94; font-size: 13px; margin-top: 12px; max-width: 28ch; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: #7AADA0; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; text-align: center; color: #4A6E67; font-size: 12px; max-width: var(--maxw); margin: 0 auto; }

/* ── MODAL ── */
.modal-bg { position: fixed; inset: 0; background: rgba(9,31,28,.6); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 200; backdrop-filter: blur(2px); }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h2 { font-size: 20px; }
.modal-close { background: #F0F4F2; border: 0; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 17px; color: var(--muted); flex: none; transition: var(--transition); }
.modal-close:hover { background: var(--line); }
.modal-body { padding: 20px 22px; }
.review { border-bottom: 1px solid var(--line); padding: 14px 0; }
.review:last-child { border-bottom: 0; }
.review .who { font-weight: 600; font-size: 14px; }
.review .txt { color: #3A4A46; font-size: 14px; margin-top: 4px; line-height: 1.5; }
.review-form { background: #F5F8F6; border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px; margin-top: 18px; }
.review-form h3 { font-family: "Inter", sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.review-form .note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.review-form input, .review-form textarea, .review-form select { width: 100%; padding: 10px 12px; font-family: inherit; font-size: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; background: #fff; transition: var(--transition); }
.review-form input:focus, .review-form textarea:focus, .review-form select:focus { outline: none; border-color: var(--verify); box-shadow: 0 0 0 3px rgba(12,153,102,.1); }
.review-form textarea { resize: vertical; min-height: 72px; }
.review-form .btn-wa { width: 100%; }
.form-msg { font-size: 13px; margin-top: 8px; }
.form-msg.ok  { color: var(--verify-ink); }
.form-msg.err { color: #B42318; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
