/* =====================================================================
   style.css — Template de website para clínicas
   Abordagem mobile-first. Breakpoints:
     40em (640px)  tablets pequenos / telemóveis em horizontal
     60em (960px)  tablets em horizontal / portáteis (menu desktop)
     75em (1200px) desktop
     90em (1440px) ecrãs grandes

   PERSONALIZAR CORES: edite as variáveis em :root (ou o objeto
   CONFIG.colors em script.js, que as substitui ao carregar).
   ===================================================================== */

/* ---------- 1. Variáveis ---------- */
:root {
  /* Cores */
  --c-primary: #0f4c5c;
  --c-primary-dark: #0a3844;
  --c-primary-deep: #072b35;
  --c-accent: #2b88a6;
  --c-accent-soft: #dff0f4;
  --c-ink: #0b2a33;
  --c-text: #39525a;
  --c-muted: #5a717a;
  --c-bg: #ffffff;
  --c-surface: #f2f8f9;
  --c-sand: #f8f6f1;
  --c-line: #dce8eb;
  --c-warm: #e4a977;

  /* Tipografia (fontes do sistema: sem pedidos externos) */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --fs-body: clamp(1rem, 0.25vw + 0.95rem, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
  --fs-h1: clamp(2.25rem, 4.2vw + 1rem, 4.25rem);
  --fs-h2: clamp(1.875rem, 2.4vw + 1.2rem, 3rem);
  --fs-h3: clamp(1.125rem, 0.4vw + 1.05rem, 1.3125rem);
  --fs-small: 0.875rem;

  /* Forma e profundidade */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 28px;
  --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(11, 42, 51, 0.06), 0 6px 18px rgba(11, 42, 51, 0.06);
  --sh-md: 0 24px 60px -24px rgba(11, 42, 51, 0.35);

  /* Espaçamento e layout */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7.5rem);
  --header-h: 72px;
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 60em) { :root { --header-h: 80px; } }
@media (min-width: 90em) { :root { --container: 1280px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
em { font-style: italic; color: var(--c-primary); }

[hidden] { display: none !important; }

section[id] { scroll-margin-top: var(--header-h); }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}
.cta :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--c-ink); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm); text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Ícones */
.icon { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
[data-icon] svg { width: 100%; height: 100%; display: block; }

/* ---------- 3. Botões e ligações ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0 1.5rem;
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  font: inherit; font-weight: 600; font-size: 0.9688rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { min-height: 56px; padding: 0 1.9rem; font-size: 1rem; }
.btn-sm { min-height: 44px; padding: 0 1.25rem; font-size: 0.9rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 10px 24px -12px var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-dark); }

.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }

.btn-light { background: #fff; color: var(--c-primary-dark); }
.btn-light:hover { background: var(--c-accent-soft); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  color: var(--c-primary); font-weight: 600; text-decoration: none;
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 4. Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform 0.4s var(--ease), box-shadow 0.3s, border-color 0.3s, background-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--c-line); box-shadow: 0 8px 30px -18px rgba(11, 42, 51, 0.35); background: rgba(255, 255, 255, 0.94); }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h); transition: height 0.3s var(--ease);
}
.is-scrolled .header-inner { height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; min-width: 0; }
.brand-mark { display: inline-flex; width: 40px; height: 40px; flex: none; color: var(--c-primary); }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--c-ink);
  letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand--light .brand-mark { color: var(--c-accent); }
.brand--light .brand-name { color: #fff; }

/* Menu móvel (painel por baixo do header) */
.primary-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  padding: 0.5rem var(--gutter) 1.75rem;
  background: #fff; border-bottom: 1px solid var(--c-line);
  box-shadow: 0 30px 40px -30px rgba(11, 42, 51, 0.4);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.primary-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.primary-nav a:not(.btn) {
  display: flex; align-items: center; min-height: 52px;
  font-size: 1.125rem; font-weight: 500; color: var(--c-ink); text-decoration: none;
  border-bottom: 1px solid var(--c-line);
}
.primary-nav a:not(.btn)[aria-current="true"] { color: var(--c-primary); font-weight: 600; }
.nav-cta-mobile { padding-top: 1.25rem; }

.header-cta { display: none; }

/* Botão hambúrguer */
.nav-toggle {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; margin-right: -0.5rem;
  background: transparent; border: 0; border-radius: var(--r-pill); cursor: pointer; color: var(--c-ink);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.3s var(--ease), background-color 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 60em) {
  .nav-toggle, .nav-cta-mobile { display: none; }
  .header-cta { display: inline-flex; }
  .primary-nav {
    position: static; max-height: none; overflow: visible; padding: 0;
    background: none; border: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
    margin-inline: auto;
  }
  .primary-nav ul { display: flex; align-items: center; gap: 0.25rem; }
  .primary-nav a:not(.btn) {
    position: relative; min-height: 44px; padding: 0 0.95rem;
    font-size: 0.9688rem; border-bottom: 0; border-radius: var(--r-pill);
    transition: color 0.2s, background-color 0.2s;
  }
  .primary-nav a:not(.btn):hover { color: var(--c-primary); background: var(--c-surface); }
  .primary-nav a:not(.btn)[aria-current="true"]::after {
    content: ""; position: absolute; left: 0.95rem; right: 0.95rem; bottom: 6px;
    height: 2px; border-radius: 2px; background: var(--c-warm);
  }
}

/* ---------- 5. Secções: base ---------- */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-surface); }
.section--sand { background: var(--c-sand); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-primary);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--c-warm); }
.eyebrow--light { color: #fff; }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-lead { margin-top: 1.1rem; font-size: var(--fs-lead); color: var(--c-muted); max-width: 40rem; }

.demo-note { margin-top: 1.75rem; font-size: var(--fs-small); color: var(--c-muted); }
.demo-note:empty { display: none; }

/* ---------- 6. Imagens (com alternativa gráfica) ---------- */
.media {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 85% 8%, rgba(255, 255, 255, 0.24), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(228, 169, 119, 0.32), transparent 60%),
    linear-gradient(145deg, var(--c-primary) 0%, var(--c-accent) 100%);
}
.media::before {
  content: ""; position: absolute; inset: 0; opacity: 0.2;
  background:
    linear-gradient(#fff, #fff) center / 76px 10px no-repeat,
    linear-gradient(#fff, #fff) center / 10px 76px no-repeat;
  border-radius: inherit;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.js .media img { opacity: 0; transition: opacity 0.6s var(--ease); }
.js .media.is-loaded img { opacity: 1; }
.media.is-fallback img { display: none; }

.media-portrait {
  aspect-ratio: 4 / 5; border-radius: 0;
  background: linear-gradient(160deg, var(--c-accent-soft), #c3dfe7);
}
.media-portrait::before { display: none; }
.media-portrait.is-fallback::after {
  content: attr(data-initials); position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 3.5rem); color: var(--c-primary);
}

/* ---------- 7. Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(5rem, 9vw, 8rem); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 90% 0%, var(--c-accent-soft), transparent 70%),
    linear-gradient(180deg, var(--c-surface), #fff 85%);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero .eyebrow {
  padding: 0.45rem 0.95rem 0.45rem 0.8rem; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--r-pill); letter-spacing: 0.08em; box-shadow: var(--sh-sm);
}
.hero .eyebrow::before { display: none; }
.eyebrow-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-warm); box-shadow: 0 0 0 4px rgba(228, 169, 119, 0.28); }
.lead { margin-top: 1.4rem; max-width: 34rem; font-size: var(--fs-lead); color: var(--c-muted); }
.hero-actions { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 2.1rem; }
.trust-chips { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 2.25rem; font-size: 0.9375rem; font-weight: 500; color: var(--c-ink); }
.trust-chips li { display: inline-flex; align-items: center; gap: 0.55rem; }
.trust-chips .icon {
  width: 1.6rem; height: 1.6rem; padding: 0.3rem; border-radius: 50%;
  background: var(--c-accent-soft); color: var(--c-primary);
}

.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: 1.25rem -0.5rem -1.25rem 1.25rem; z-index: -1;
  border-radius: var(--r-lg); background: var(--c-accent-soft);
}
.media-hero { aspect-ratio: 4 / 4.6; box-shadow: var(--sh-md); }

.float-card {
  position: absolute; display: flex; align-items: center; gap: 0.75rem;
  max-width: 15.5rem; padding: 0.75rem 1rem 0.75rem 0.75rem;
  background: rgba(255, 255, 255, 0.96); border: 1px solid var(--c-line);
  border-radius: var(--r-md); box-shadow: var(--sh-md);
  font-size: 0.8125rem; line-height: 1.35; color: var(--c-muted);
}
.float-card strong { display: block; font-size: 0.875rem; color: var(--c-ink); }
.float-icon {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; padding: 0.55rem;
  border-radius: 12px; background: var(--c-primary); color: #fff;
}
.float-card--a { top: 1rem; left: 0.75rem; }
.float-card--b { bottom: 1rem; right: 0.75rem; }
.float-card--b .float-icon { background: var(--c-accent); }

.js .hero-copy > * { animation: rise 0.9s var(--ease) both; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.js .hero-visual { animation: rise 1s var(--ease) 0.15s both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (min-width: 40em) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .float-card { padding: 0.9rem 1.2rem 0.9rem 0.9rem; font-size: 0.875rem; }
  .float-card--a { top: 8%; left: -1rem; }
  .float-card--b { bottom: 8%; right: -1rem; }
}
@media (min-width: 60em) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: clamp(3rem, 6vw, 6rem); }
  .media-hero { aspect-ratio: 4 / 5; }
  .float-card--a { left: -2.5rem; }
  .float-card--b { right: -1.5rem; }
}

/* ---------- 8. Indicadores ---------- */
.stats { position: relative; z-index: 2; margin-top: -3rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-md);
  overflow: hidden;
}
.stat {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 2rem);
  border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
}
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n + 2) { border-bottom: 0; }
.stat-value {
  font-family: var(--font-display); font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1;
  color: var(--c-primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.stat-label { font-size: 0.9375rem; color: var(--c-muted); line-height: 1.4; }
.stats-note { margin-top: 0.9rem; font-size: 0.8125rem; color: var(--c-muted); text-align: center; }
.stats-note:empty { display: none; }

@media (min-width: 60em) {
  .stats { margin-top: -4.5rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat, .stat:nth-child(2n) { border-bottom: 0; border-right: 1px solid var(--c-line); }
  .stat:last-child { border-right: 0; }
}

/* ---------- 9. Especialidades ---------- */
.cards-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 0.85rem; padding: clamp(1.5rem, 3vw, 2rem);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.card:hover, .card:focus-within { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: transparent; }
.card p { color: var(--c-muted); flex: 1; }
.card-icon {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; padding: 0.9rem; margin-bottom: 0.4rem;
  border-radius: 16px; background: var(--c-accent-soft); color: var(--c-primary);
  transition: background-color 0.35s, color 0.35s;
}
.card:hover .card-icon, .card:focus-within .card-icon { background: var(--c-primary); color: #fff; }
.card .link-arrow { align-self: flex-start; margin-top: 0.25rem; }

/* ---------- 10. Sobre a clínica ---------- */
.about-grid { display: grid; gap: 3.5rem; align-items: center; }
.about-visual { position: relative; padding-bottom: 3rem; }
.media-about { aspect-ratio: 4 / 4.4; box-shadow: var(--sh-md); }
.media-about-small {
  position: absolute; right: -0.25rem; bottom: 0; width: 44%; aspect-ratio: 1;
  border: 6px solid var(--c-surface); border-radius: var(--r-lg); box-shadow: var(--sh-md);
}
.about-copy > p { margin-top: 1.25rem; font-size: var(--fs-lead); color: var(--c-muted); }
.pillars { display: grid; gap: 1.25rem; margin: 2rem 0 2.25rem; }
.pillars li { display: flex; gap: 1rem; align-items: flex-start; }
.pillars h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.0625rem; }
.pillars p { margin-top: 0.15rem; color: var(--c-muted); font-size: 0.9688rem; }
.pillar-icon, .info-icon {
  display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; padding: 0.8rem;
  border-radius: 14px; background: #fff; color: var(--c-primary); border: 1px solid var(--c-line);
}
.about-copy .btn .icon { width: 1.1em; height: 1.1em; }

@media (min-width: 60em) {
  .about-grid { grid-template-columns: 0.95fr 1fr; gap: clamp(3rem, 7vw, 6.5rem); }
}

/* ---------- 11. Equipa ---------- */
.team-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); }
.team-card {
  overflow: hidden; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.team-card:hover, .team-card:focus-within { transform: translateY(-6px); box-shadow: var(--sh-md); }
.team-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; padding: 1.25rem 1.4rem 1.5rem; }
.team-body h3 { font-size: 1.1875rem; }
.team-role { margin-bottom: 0.9rem; color: var(--c-primary); font-size: 0.9375rem; font-weight: 600; }

/* ---------- 12. Testemunhos ---------- */
.slider { position: relative; }
.slider-track {
  display: flex; gap: 1.25rem; padding: 0.5rem 0 1.5rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg);
}
.slider-track::-webkit-scrollbar { display: none; }
.testimonial {
  flex: 0 0 100%; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem); background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.quote-icon { width: 2rem; height: 2rem; color: var(--c-warm); }
.testimonial blockquote p { font-family: var(--font-display); font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem); line-height: 1.55; color: var(--c-ink); }
.testimonial figcaption { display: flex; align-items: center; gap: 0.85rem; }
.testimonial figcaption > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.testimonial strong { color: var(--c-ink); }
.t-context { font-size: 0.875rem; color: var(--c-muted); }
.avatar {
  display: grid; place-items: center; flex: none; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  background: var(--c-accent-soft); color: var(--c-primary); font-weight: 700; font-size: 0.9375rem;
}
.slider-track:focus-visible { outline-offset: 4px; }

.slider-controls { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
.slider-btn {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0.8rem;
  background: #fff; color: var(--c-primary); border: 1.5px solid var(--c-line); border-radius: 50%; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.slider-btn:hover:not(:disabled) { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.slider-btn:disabled { opacity: 0.4; cursor: default; }
.slider-dots { display: flex; align-items: center; }
.slider-dot {
  position: relative; width: 28px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
}
.slider-dot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: var(--r-pill);
  background: #b9cdd2; transform: translate(-50%, -50%); transition: width 0.3s var(--ease), background-color 0.3s;
}
.slider-dot[aria-current="true"]::before { width: 24px; background: var(--c-primary); }

@media (min-width: 40em) { .testimonial { flex-basis: calc(50% - 0.625rem); } }
@media (min-width: 75em) { .testimonial { flex-basis: calc((100% - 2.5rem) / 3); } }

/* ---------- 13. CTA de marcação ---------- */
.cta {
  position: relative; overflow: clip; padding-block: var(--section-y); color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, var(--c-primary-deep), var(--c-primary) 100%);
}
.cta-shapes {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 70% at 100% 0%, rgba(43, 136, 166, 0.45), transparent 70%),
    radial-gradient(35% 60% at 0% 100%, rgba(228, 169, 119, 0.22), transparent 70%);
}
.cta-inner { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.cta h2 { color: #fff; }
.cta-copy > p:not(.eyebrow) { margin-top: 1.1rem; max-width: 34rem; font-size: var(--fs-lead); }
.cta-actions { display: flex; flex-direction: column; gap: 0.85rem; }
.cta-actions .btn { width: 100%; }
.cta-phone { margin-top: 0.5rem; text-align: center; }
.cta-phone a { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.cta-urgent { font-size: 0.875rem; text-align: center; color: rgba(255, 255, 255, 0.78); }

@media (min-width: 60em) {
  .cta-inner { grid-template-columns: 1.2fr 0.8fr; gap: 5rem; }
}

/* ---------- 14. Contactos ---------- */
.contact-grid { display: grid; gap: 2rem; }
.info-list { display: grid; gap: 1.5rem; }
.info-list li { display: flex; gap: 1.1rem; align-items: flex-start; }
.info-icon { background: var(--c-accent-soft); border-color: transparent; }
.info-list h3 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.02em; color: var(--c-ink); margin-bottom: 0.15rem; }
.info-list a { color: var(--c-primary); font-weight: 600; text-underline-offset: 4px; }
.hours { max-width: 22rem; display: grid; gap: 0.2rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; }
.hours dt { color: var(--c-muted); }
.hours dd { font-weight: 600; color: var(--c-ink); text-align: right; }

.map-box {
  position: relative; min-height: 22rem; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  background:
    radial-gradient(70% 60% at 80% 10%, var(--c-accent-soft), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(15, 76, 92, 0.07) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(15, 76, 92, 0.07) 39px 40px),
    var(--c-surface);
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1.5rem; text-align: center;
}
.map-pin {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; padding: 0.9rem; margin-bottom: 0.4rem;
  border-radius: 50%; background: var(--c-primary); color: #fff; box-shadow: 0 0 0 10px rgba(15, 76, 92, 0.12);
}
.map-title { font-family: var(--font-display); font-size: 1.35rem; color: var(--c-ink); }
.map-text { max-width: 22rem; color: var(--c-muted); font-size: 0.9375rem; }
.map-actions { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.9rem; width: 100%; max-width: 17rem; }

@media (min-width: 40em) { .map-actions { flex-direction: row; max-width: none; justify-content: center; width: auto; } }
@media (min-width: 60em) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: stretch; }
  .map-box { min-height: 26rem; }
}

/* ---------- 15. Rodapé ---------- */
.site-footer { padding-top: clamp(3.5rem, 6vw, 5rem); color: rgba(255, 255, 255, 0.78); background: var(--c-primary-deep); }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { margin-top: 1.25rem; max-width: 24rem; font-size: 0.9688rem; }
.footer-title { font-family: var(--font-body); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.footer-links { display: grid; gap: 0.15rem; font-size: 0.9688rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-links li:last-child:empty { display: none; }
.social { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 50%; color: #fff;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.social a:hover { background: #fff; color: var(--c-primary-deep); border-color: #fff; }
.footer-bottom {
  display: flex; flex-direction: column; gap: 0.35rem; padding-block: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.875rem;
}

@media (min-width: 40em) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 60em) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 3rem; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- 16. Voltar ao topo ---------- */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0.85rem;
  background: var(--c-primary); color: #fff; border-radius: 50%; box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0s linear 0.3s, background-color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--c-primary-dark); }
@media (min-width: 60em) { .to-top { right: 1.75rem; bottom: 1.75rem; } }

/* ---------- 17. Janelas legais ---------- */
.legal-dialog {
  width: min(36rem, calc(100% - 2rem)); max-height: min(85vh, 40rem); padding: 0; overflow: hidden;
  border: 0; border-radius: var(--r-lg); color: var(--c-text); background: #fff; box-shadow: var(--sh-md);
}
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog::backdrop { background: rgba(7, 43, 53, 0.62); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.25rem 1rem 1.75rem; border-bottom: 1px solid var(--c-line); }
.dialog-head h2 { font-size: 1.4rem; }
.dialog-close {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0 0 4px;
  font-size: 1.75rem; line-height: 1; color: var(--c-ink); background: var(--c-surface); border: 0; border-radius: 50%; cursor: pointer;
}
.dialog-close:hover { background: var(--c-accent-soft); }
.dialog-body { display: grid; gap: 1rem; padding: 1.5rem 1.75rem 1.75rem; overflow-y: auto; }

/* ---------- 18. Animação de entrada ---------- */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 19. Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .team-card:hover { transform: none; }
}
