/* ============================================
   Centro Médico Especializado — Médicos Associados
   Paleta extraída da identidade visual:
   verde-escuro #008349 | verde-claro #9dd3af | grafite #2f2d2e
   ============================================ */

:root {
  --green-700: #006b3c;
  --green-600: #008349;
  --green-500: #0a9d5b;
  --green-200: #9dd3af;
  --green-100: #d9eee1;
  --green-50: #eef7f1;
  --ink-900: #1f2421;
  --ink-700: #2f2d2e;
  --ink-500: #55605a;
  --ink-300: #8a938e;
  --white: #ffffff;
  --whatsapp: #25d366;
  --whatsapp-dark: #1eb857;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(31, 36, 33, 0.07);
  --shadow-md: 0 8px 30px rgba(31, 36, 33, 0.1);
  --shadow-lg: 0 16px 48px rgba(31, 36, 33, 0.16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 160px; }

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

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

a { color: inherit; text-decoration: none; }

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--green-700);
  color: #eaf6ef;
  font-size: 0.82rem;
  padding: 7px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { text-decoration: underline; }
.topbar-right { display: flex; gap: 18px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #ecf1ee;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 120px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-500);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-close { display: none; }
.nav a:hover, .nav a.active { color: var(--green-600); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.97rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}
.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 131, 73, 0.3);
}
.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--green-600);
  border: 2px solid var(--green-200);
}
.btn-outline:hover { border-color: var(--green-600); background: var(--green-50); }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink-700);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--green-50) 0%, #ffffff 55%, var(--green-50) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -180px;
  top: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 211, 175, 0.35), transparent 70%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-block: 72px 56px;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--green-600);
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--ink-500);
  max-width: 52ch;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-trust {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.hero-trust .item strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-600);
  line-height: 1.2;
}
.hero-trust .item span { font-size: 0.86rem; color: var(--ink-500); }

.hero-media { position: relative; }
.hero-media .photo {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
  width: 100%;
}
.hero-card {
  position: absolute;
  left: -24px;
  bottom: 26px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}
.hero-card .dot {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--green-100);
  display: grid;
  place-items: center;
  color: var(--green-600);
  flex-shrink: 0;
}
.hero-card small { display: block; font-weight: 500; color: var(--ink-500); }

/* ---------- Benefit strip ---------- */
.benefits {
  background: var(--green-600);
  color: #fff;
  padding: 26px 0;
}
.benefits .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
}
.benefit svg { flex-shrink: 0; opacity: 0.9; }

/* ---------- Sections ---------- */
.section { padding-block: 84px; }
.section.tinted { background: var(--green-50); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--green-600);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.section-head p { color: var(--ink-500); font-size: 1.02rem; }

/* ---------- Specialty grid ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.spec {
  background: #fff;
  border: 1px solid #e6eee9;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-weight: 600;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.spec:hover {
  border-color: var(--green-200);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.spec::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-200);
  flex-shrink: 0;
}

/* ---------- Exams ---------- */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.exam-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #edf3ef;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.exam-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.exam-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-600);
  display: grid;
  place-items: center;
}
.exam-card h3 { font-size: 1.12rem; font-weight: 700; color: var(--ink-900); }
.exam-card p { font-size: 0.93rem; color: var(--ink-500); flex-grow: 1; }
.exam-card .link {
  color: var(--green-600);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.exam-card .link:hover { text-decoration: underline; }

.section-cta { text-align: center; margin-top: 44px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-media .accent {
  position: absolute;
  inset: 24px -24px -24px 24px;
  border-radius: 24px;
  background: var(--green-100);
  z-index: -1;
}
.about-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.about-copy > p { color: var(--ink-500); margin-bottom: 22px; }
.checklist { list-style: none; display: grid; gap: 13px; margin-bottom: 30px; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.97rem;
}
.checklist svg { flex-shrink: 0; color: var(--green-600); margin-top: 3px; }

/* ---------- Doctors ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.chip {
  background: #fff;
  border: 1.5px solid #dfe9e3;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--green-200); color: var(--green-600); }
.chip.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.doc-card {
  background: #fff;
  border: 1px solid #e8f0ea;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}
.doc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.doc-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-200), var(--green-600));
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.doc-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink-900); line-height: 1.3; }
.doc-card .doc-spec {
  color: var(--green-600);
  font-weight: 700;
  font-size: 0.86rem;
  margin: 3px 0 5px;
}
.doc-card .doc-crm { font-size: 0.8rem; color: var(--ink-300); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px;
  gap: 16px;
}
.gallery figure {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}
.gallery figure:first-child { grid-row: span 2; grid-column: span 2; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 18px 14px;
  background: linear-gradient(transparent, rgba(31, 36, 33, 0.75));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-700), var(--green-600) 60%, var(--green-500));
  color: #fff;
  border-radius: 24px;
  padding: 56px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.cta-band h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 22ch;
  line-height: 1.25;
}
.cta-band p { opacity: 0.85; margin-top: 8px; max-width: 46ch; }
.cta-band .btn-whatsapp { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); position: relative; z-index: 1; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: stretch;
}
.contact-info { display: grid; gap: 16px; align-content: start; }
.info-card {
  background: #fff;
  border: 1px solid #e8f0ea;
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-600);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.info-card h3 { font-size: 0.98rem; font-weight: 700; color: var(--ink-900); margin-bottom: 3px; }
.info-card p { font-size: 0.92rem; color: var(--ink-500); }
.info-card a { color: var(--green-600); font-weight: 600; }
.info-card a:hover { text-decoration: underline; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 420px;
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink-900);
  color: #c9d2cc;
  padding: 60px 0 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer .brand-col img {
  height: 62px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 16px;
}
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-social { display: flex; gap: 12px; margin-top: 18px; }
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--green-600); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  font-size: 0.82rem;
  color: #8b968f;
  text-align: center;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.5);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  animation: wa-pulse 2s infinite;
  z-index: -1;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Page hero (internal pages) ---------- */
.page-hero {
  background: linear-gradient(140deg, var(--green-700), var(--green-600));
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.page-hero p { opacity: 0.88; max-width: 60ch; margin-inline: auto; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .exam-grid, .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits .container { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding-block: 48px 40px; }
  .hero-media { order: -1; }
  .hero-card { left: 12px; bottom: 14px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media .accent { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; }
  .gallery figure:first-child { grid-column: span 2; }

  .nav {
    position: fixed;
    inset: 0;
    top: 0;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }
  .nav.open { transform: none; }
  .nav a { font-size: 1.15rem; }
  .nav-close {
    display: block;
    position: absolute;
    top: 22px;
    right: 26px;
    background: none;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    color: var(--ink-700);
    cursor: pointer;
  }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .brand img { height: 88px; }
}

@media (max-width: 560px) {
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .exam-grid, .doc-grid { grid-template-columns: 1fr; }
  .benefits .container { grid-template-columns: 1fr; }
  .topbar-right { display: none; }
  .cta-band { padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-trust { gap: 22px; }
}
