/* =========================================================
   GastroClin — Design System
   gastroclinrj.com.br
   ========================================================= */

/* ─── Custom Properties ─────────────────────────────────── */
:root {
  --color-primary:   #2D4562;
  --color-secondary: #63C5B8;
  --color-accent:    #61B3CE;
  --color-text:      #292828;
  --color-text-light:#666666;
  --color-bg:        #FFFFFF;
  --color-bg-light:  #F5F8FA;
  --color-bg-dark:   #1e3148;
  --color-border:    #E0E8EF;
  --color-overlay:   rgba(29, 47, 69, 0.78);

  --font-primary:   "Roboto", sans-serif;
  --font-secondary: "Roboto Slab", serif;
  --font-heading:   "Oswald", sans-serif;

  --container-width: 1140px;
  --container-pad:   1.5rem;
  --border-radius:   6px;
  --border-radius-lg:12px;
  --shadow:          0 2px 16px rgba(45,69,98,.10);
  --shadow-md:       0 4px 28px rgba(45,69,98,.16);
  --transition:      0.3s ease;

  --header-height: 72px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── Typography ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  color: var(--color-primary);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 400; }
h5 { font-size: 1.1rem; }
p  { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

/* ─── Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-dark {
  background: var(--color-primary);
  color: #fff;
}
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5 { color: #fff; }
.section-light { background: var(--color-bg-light); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p  { color: var(--color-text-light); max-width: 640px; margin: 0 auto; }

/* Grid helpers */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.btn-primary:hover {
  background: #52b5a8;
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99,197,184,.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: #fff;
}
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1ebe5a;
  color: #fff;
  transform: translateY(-2px);
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }

/* ─── Top Bar ───────────────────────────────────────────── */
.topbar {
  background: #111;
  color: rgba(255,255,255,.72);
  font-size: .8rem;
  overflow: hidden;
  padding: .45rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.topbar a {
  color: rgba(255,255,255,.72);
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: color var(--transition);
  white-space: nowrap;
}
.topbar a:hover { color: var(--color-secondary); }
.topbar svg { flex-shrink: 0; }

/* ─── Header / Nav ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  box-shadow: 0 2px 12px rgba(45,69,98,.08);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.logo img {
  height: 48px;
  width: auto;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: .95rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.nav a:hover,
.nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
}
.nav-cta { margin-left: .5rem; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition);
  border-radius: 2px;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a3550 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  opacity: .22;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  color: #fff;
  padding: 4rem 0;
}
.hero-content h1 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}
.hero-content p {
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Cards de Serviço ──────────────────────────────────── */
.service-card {
  background: var(--color-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.service-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: .5rem;
}
.service-card-body p {
  color: var(--color-text-light);
  font-size: .92rem;
  flex: 1;
  margin-bottom: 1rem;
}
.service-card-body .btn { align-self: flex-start; }

/* ─── Seção de Convênios ────────────────────────────────── */
.convenios-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}
.convenio-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition);
}
.convenio-item:hover { box-shadow: var(--shadow); }
.convenio-item img { height: 44px; width: auto; object-fit: contain; filter: grayscale(30%); transition: filter var(--transition); }
.convenio-item:hover img { filter: grayscale(0%); }
.convenio-note {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-text-light);
  font-size: .88rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Seção CTA ─────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3c5e 100%);
  padding: 4.5rem 0;
  text-align: center;
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p  { color: rgba(255,255,255,.85); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Seção de Médicos ──────────────────────────────────── */
.doctors-section {
  background: var(--color-bg-light);
  padding: 4rem 0;
}
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.doctor-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border-top: 4px solid var(--color-secondary);
  transition: transform .2s, box-shadow .2s;
}
.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 36px rgba(45,69,98,.18);
}
.doctor-avatar {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8edf3 60%, #d0dce8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.doctor-avatar svg { display: block; width: 160px; height: 200px; }
.doctor-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  display: block;
}
.doctor-body {
  padding: 1.5rem;
}
.doctor-body h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: .2rem;
}
.doctor-body h4 {
  color: var(--color-secondary);
  font-weight: 500;
  font-size: .88rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.doctor-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--color-text-light);
  font-size: .88rem;
}
.doctor-body ul li {
  padding: .3rem 0 .3rem 1.1rem;
  position: relative;
  border-bottom: 1px solid #f0f3f6;
  line-height: 1.45;
}
.doctor-body ul li:last-child { border-bottom: none; }
.doctor-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
}

/* ─── Instalações ───────────────────────────────────────── */
.instalacoes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.instalacoes-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}
.instalacoes-grid img:first-child {
  grid-row: span 2;
  height: 100%;
}

/* ─── Exame Detail ──────────────────────────────────────── */
.exame-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}
.exame-section:last-child { border-bottom: none; }
.exame-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.exame-section.reverse .container { direction: rtl; }
.exame-section.reverse .container > * { direction: ltr; }
.exame-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}
.exame-body h2 { margin-bottom: 1rem; }
.exame-body p  { color: var(--color-text-light); margin-bottom: 1.5rem; }

/* ─── Contato ───────────────────────────────────────────── */
.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(99,197,184,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  color: var(--color-secondary);
}
.contact-item h5 { margin-bottom: .25rem; }
.contact-item p, .contact-item a { color: var(--color-text-light); font-size: .95rem; }
.map-wrapper { border-radius: var(--border-radius-lg); overflow: hidden; height: 380px; }
.map-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ─── Formulários ───────────────────────────────────────── */
.form-wrapper {
  background: var(--color-bg);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}
.form-group label .required { color: #e53935; margin-left: .2rem; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .7rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(97,179,206,.15);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e53935;
}
.form-group .error-msg {
  font-size: .8rem;
  color: #e53935;
  display: none;
}
.form-group .error-msg.show { display: block; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-accept {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  grid-column: 1 / -1;
}
.form-accept input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.form-accept label { font-size: .88rem; color: var(--color-text-light); font-weight: 400; }
.form-submit { grid-column: 1 / -1; }
.form-feedback {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  font-weight: 500;
  grid-column: 1/-1;
}
.form-feedback.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.form-feedback.error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.form-feedback.show { display: block; }


/* ─── Accordion FAQ ─────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: .75rem;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg);
  font-weight: 600;
  font-size: .97rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  font-family: inherit;
}
.faq-question:hover { background: var(--color-bg-light); }
.faq-question .icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: transform var(--transition);
}
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-answer-inner { padding: 1rem 1.25rem 1.25rem; color: var(--color-text-light); font-size: .95rem; }

/* ─── Steps / Como funciona ─────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h4 { margin-bottom: .3rem; }
.step-body p { color: var(--color-text-light); font-size: .93rem; margin: 0; }

/* ─── Hero de página interna ────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3c5e 100%);
  padding: 4rem 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 48px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero h1 { color: #fff; margin-bottom: .75rem; }
.page-hero p { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  padding: .75rem 0;
  font-size: .85rem;
  color: var(--color-text-light);
}
.breadcrumb a { color: var(--color-accent); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 .4rem; }

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand img { height: 44px; margin-bottom: 1rem; filter: brightness(10); }
.footer-brand p { font-size: .9rem; line-height: 1.65; }
.footer-col h5 {
  color: var(--color-secondary);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { color: rgba(255,255,255,.7); font-size: .9rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--color-secondary); }
.footer-contact { display: flex; flex-direction: column; gap: .75rem; }
.footer-contact a { color: rgba(255,255,255,.7); font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.footer-contact a:hover { color: var(--color-secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: .82rem;
  text-align: center;
  color: rgba(255,255,255,.45);
}
.footer-social { display: flex; gap: .75rem; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--color-secondary); color: var(--color-primary); }

/* ─── WhatsApp Flutuante ────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 1500;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.55);
}
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

/* ─── Spinner de loading ────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Página de Confirmação ─────────────────────────────── */
.confirm-box {
  text-align: center;
  padding: 5rem 2rem;
  max-width: 580px;
  margin: 0 auto;
}
.confirm-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-secondary), #48b0a3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  font-size: 2.5rem;
}

/* ─── Utilities ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-white { color: #fff !important; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
/* tablet: mantém 2 colunas de contato até ~900px (melhor uso da largura) */
@media (max-width: 900px) {
  .contact-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-height: 64px; }

  .topbar { display: none !important; }

  .nav { display: none; flex-direction: column; gap: 0; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--color-bg); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 1rem 1.5rem 1.5rem; z-index: 999; }
  .nav.open { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--color-border); width: 100%; }
  .nav a:last-child { border-bottom: none; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .menu-toggle { display: flex; }
  .site-header { position: relative; }

  .hero { min-height: auto; }
  .hero-content { padding: 3rem 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .form-submit { grid-column: 1; }
  .form-accept { grid-column: 1; }

  .exame-section .container { grid-template-columns: 1fr; }
  .exame-section.reverse .container { direction: ltr; }
  .exame-img { height: 220px; }
  .exame-body { text-align: center; }
  .exame-body .btn { width: 100%; justify-content: center; }

  .doctors-grid { grid-template-columns: 1fr; }
  .doctor-card img { height: 200px; object-position: center top; }
  .doctor-avatar { height: 200px; justify-content: center; align-items: center; }
  .doctor-avatar svg { width: 120px; height: 150px; }

  .instalacoes-grid { grid-template-columns: 1fr; }
  .instalacoes-grid img { height: 220px; }
  .instalacoes-grid img:first-child { grid-row: span 1; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; }

  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 340px; justify-content: center; }

  .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  /* Evita zoom automático do iOS nos inputs */
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; }

  .doctor-card { padding: 1.25rem; }
  .form-wrapper { padding: 1.5rem; }
}

/* ─── Hero Slider ────────────────────────────────────────── */
.hero-slider {
  position: relative;
  min-height: 560px;
  background: var(--color-bg-dark);
  overflow: hidden;
}
.hero-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}
.hero-slider .slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  min-height: 560px;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(29, 47, 69, .65);
}
.slide-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 600px;
  padding: 4rem 0;
}
.slide-content .slide-label {
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  font-weight: 600;
  margin-bottom: .75rem;
  display: block;
}
.slide-content h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: .75rem;
  line-height: 1.2;
}
.slide-content .slide-subtitle {
  color: rgba(255,255,255,.88);
  font-size: 1.1rem;
  margin-bottom: .75rem;
  font-weight: 500;
}
.slide-content .slide-desc {
  color: rgba(255,255,255,.72);
  font-size: .97rem;
  margin-bottom: 1.75rem;
  max-width: 500px;
}
.slider-controls {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .6rem;
  z-index: 10;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}
.slider-dot.active { background: var(--color-secondary); transform: scale(1.3); }
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  line-height: 1;
}
.slider-arrow:hover { background: rgba(255,255,255,.28); }
.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }

/* ─── Banner CTA (Section 2) ─────────────────────────────── */
.banner-cta {
  position: relative;
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.banner-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(29, 47, 69, .72);
}
.banner-cta-inner {
  position: relative;
  z-index: 1;
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  text-align: center;
  color: #fff;
}
.banner-cta-inner h3 {
  color: rgba(255,255,255,.78);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  margin-bottom: .5rem;
  font-family: var(--font-primary);
}
.banner-cta-inner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}
.banner-cta-inner p {
  color: rgba(255,255,255,.78);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ─── Services Section (com fundo) ──────────────────────── */
.services-section {
  position: relative;
  padding: 5rem 0;
  background-size: cover;
  background-position: center;
}
.services-section .container { position: relative; z-index: 1; }
.service-card-slim {
  background: rgba(255,255,255,.88);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(2px);
}
.service-card-slim:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.service-card-slim img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.service-card-slim-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}
.service-card-slim-body h4 {
  font-size: 1.05rem;
  color: var(--color-primary);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.service-card-slim-body {
  align-items: center;
  text-align: center;
}
.service-card-slim-body .btn {
  align-self: center;
  padding: .45rem 1.25rem;
  font-size: .88rem;
}

/* ─── Convênios Section (com fundo) ─────────────────────── */
.convenios-section {
  position: relative;
  padding: 5rem 0;
  background-size: cover;
  background-position: center;
}
.convenios-section .container { position: relative; z-index: 1; }
.convenios-section .section-header h2 { color: var(--color-primary); }
.convenios-section .section-header p  { color: var(--color-text-light); }
.convenios-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.convenio-logo {
  background: rgba(255,255,255,.9);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.convenio-logo:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.convenio-logo img {
  width: 100%;
  max-width: 140px;
  height: 100px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.convenios-note {
  text-align: center;
  color: var(--color-text-light);
  font-size: .9rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ─── Instalações Section (com fundo) ───────────────────── */
.instalacoes-section {
  position: relative;
  padding: 5rem 0;
  background-size: cover;
  background-position: center;
}
.instalacoes-section .container { position: relative; z-index: 1; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

/* ─── Footer Info Box ────────────────────────────────────── */
.footer-info-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0 3rem;
}
.footer-brand-col h4 { color: var(--color-secondary); margin-bottom: .75rem; font-size: 1.2rem; }
.footer-brand-col > p { font-size: .95rem; color: rgba(255,255,255,.65); line-height: 1.7; max-width: 260px; }
.footer-info-box {}
.footer-info-box .info-icon {
  width: 44px;
  height: 44px;
  background: rgba(99,197,184,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
  color: var(--color-secondary);
}
.footer-info-box .info-icon svg { width: 20px; height: 20px; fill: currentColor; }
.footer-info-box h5 {
  color: var(--color-secondary);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.footer-info-box p, .footer-info-box a {
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  line-height: 1.65;
}
.footer-info-box a:hover { color: var(--color-secondary); }
.footer-info-box .phone-list { display: flex; flex-direction: column; gap: .25rem; }
.footer-seo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── Slider: barra de progresso ────────────────────────── */
.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--color-secondary);
  z-index: 10;
}
.slider-progress.running {
  animation: sliderBar 6s linear forwards;
}
@keyframes sliderBar {
  from { width: 0; }
  to   { width: 100%; }
}

/* ─── Service card: altura uniforme do título ───────────── */
.service-card-slim-body h4 {
  min-height: 2.75rem;
}

/* ─── Convênios: hover colorido ─────────────────────────── */
.convenio-logo img {
  filter: grayscale(45%);
  transition: filter var(--transition);
}
.convenio-logo:hover img { filter: grayscale(0%); }

/* ─── Lightbox ───────────────────────────────────────────── */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}
.gallery-lightbox.open { display: flex; }
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  line-height: 1;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.25); }
.lightbox-counter {
  color: rgba(255,255,255,.55);
  font-size: .88rem;
  margin-top: .75rem;
}

/* ─── Responsive: slider, gallery, footer ───────────────── */
@media (max-width: 1024px) {
  .footer-info-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand-col { grid-column: 1 / -1; }
  .convenios-logos { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero-slider, .hero-slider .slide.active { min-height: 480px; }
  .slide-content { padding: 3rem 0; }
  .slider-arrow { display: none; }
  .convenios-logos { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-info-grid { grid-template-columns: 1fr; gap: 1.75rem; padding: 3rem 0 2rem; }
  .footer-brand-col { grid-column: 1; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid img { height: 140px; }
  .convenio-logo img { max-width: 100px; height: 70px; }
}

/* ============================================================
   GastroClin MVP — ajustes 2026-09-02
   (override do design-system herdado do Project.old)
   ============================================================ */

/* --- Botão primário: contraste forte (era azul-escuro sobre verde-água, ~2.3:1) --- */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: #1e3550;
  color: #fff;
  box-shadow: 0 4px 16px rgba(45,69,98,.30);
}

/* --- CTA "Agendar pelo WhatsApp": verde WhatsApp, sempre legível --- */
.btn-wa,
a.btn.btn-primary[href*="wa.me"],
.btn.btn-primary[href*="wa.me"] {
  background: #178A45;
  color: #fff;
}
.btn-wa:hover,
a.btn.btn-primary[href*="wa.me"]:hover {
  background: #126B36;
  color: #fff;
}

/* --- Botão dentro da <nav>: `.nav a` (padding .25rem 0 + cor de texto + hover)
       vencia `.btn` por especificidade e achatava/descolorira o CTA.
       Aqui forçamos o visual de botão de volta. --- */
.nav .nav-cta .btn,
.nav .nav-cta .btn:hover,
.nav .nav-cta .btn:focus {
  padding: .58rem 1.2rem !important;
  font-size: .9rem !important;
  line-height: 1.2 !important;
  border-bottom: none !important;
  border-radius: var(--border-radius) !important;
  background: #178A45 !important;
  color: #fff !important;
}
.nav .nav-cta .btn:hover { background: #126B36 !important; }

/* --- Convênios: nunca sumir logo branco/transparente sobre card claro --- */
.convenio-logo { background: #fff; border: 1px solid var(--color-border); }
.convenio-logo img { filter: none; mix-blend-mode: normal; }

/* --- Foco visível em todos os controles (acessibilidade) --- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Sobre Nós: intro + cards de médico só-texto (2026-09-03) --- */
.sobre-intro {
  max-width: 780px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.02rem;
  line-height: 1.75;
}
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 1rem;
}
.doctor-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 1.5rem;
}
.doctor-card h3 {
  font-size: 1.22rem;
  color: var(--color-primary);
  margin: 0 0 .2rem;
}
.doctor-spec {
  color: #2f8f83;
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.4;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.doctor-creds { list-style: none; margin: 0; padding: 0; }
.doctor-creds li {
  position: relative;
  padding: .45rem 0 .45rem 1.5rem;
  font-size: .9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}
.doctor-creds li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(99,197,184,.20);
  box-shadow: inset 0 0 0 2px var(--color-secondary);
}
/* tablet: cards de médico mantêm 2 colunas até ~640px (iPad retrato usa a largura) */
@media (max-width: 640px) {
  .doctors-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sobre-intro { text-align: left; margin-bottom: 2rem; }
}

/* --- SEO: H1 do hero herda o estilo do H2 do slide -------- */
.slide-content h1 {
  color: #fff;
  font-family: var(--font-secondary);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: .75rem;
}

/* --- Contato: card do mapa (substitui iframe do Google que renderiza em branco) --- */
.map-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, #f4f8fb 0%, #eef4f8 100%);
  transition: box-shadow var(--transition), transform var(--transition);
}
.map-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.map-card-pin {
  flex-shrink: 0;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-secondary);
  color: #fff;
}
.map-card-pin svg { width: 22px; height: 22px; }
.map-card-body { display: flex; flex-direction: column; gap: .2rem; }
.map-card-body strong { color: var(--color-primary); font-family: var(--font-secondary); font-size: 1.05rem; }
.map-card-body > span { color: var(--color-text-light); font-size: .92rem; }
.map-card-cta { color: #2f8f83 !important; font-weight: 600; margin-top: .35rem; }
@media (max-width: 768px) { .map-card { flex-direction: column; text-align: center; } }

/* --- Página legal (privacidade) — texto longo legível --- */
.legal{color:var(--color-text);line-height:1.75}
.legal h2{font-size:1.15rem;color:var(--color-primary);margin:2rem 0 .6rem}
.legal p{margin-bottom:1rem}
.legal ul{margin:0 0 1rem 1.25rem;list-style:disc}
.legal li{margin-bottom:.4rem}
.legal a{color:#2f8f83;font-weight:600}

/* --- footer-bottom: espaço entre copyright e link de privacidade --- */
.footer-bottom{gap:1.25rem;flex-wrap:wrap}
.footer-bottom a{white-space:nowrap}

/* ============================================================
   GastroClin — polimento 2026-09-04 (sem mexer em texto/conteúdo)
   ============================================================ */

/* Slider: pontos com área de toque de 22px (visual continua 10px) */
.slider-dot {
  width: 22px;
  height: 22px;
  padding: 6px;
  background-clip: content-box;
}

/* Acessibilidade: respeita "reduzir movimento" do sistema */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .slider-progress { display: none; }
}
