/* Design tokens — Correia Crespo (importado por main.css) */
:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;

  --bg: #faf8f6;
  --bg-warm: #f6f3ef;
  --panel: rgba(28, 26, 24, 0.03);
  --panel-strong: rgba(28, 26, 24, 0.06);
  --surface: #ffffff;
  --stroke: rgba(28, 26, 24, 0.08);
  --stroke-strong: rgba(28, 26, 24, 0.12);
  --text: #1c1a18;
  --text-soft: rgba(28, 26, 24, 0.88);
  --muted: rgba(28, 26, 24, 0.68);

  --accent: #5c1829;
  --accent-hover: #6d1f32;
  --accent-active: #4a1322;
  --accent-soft: rgba(92, 24, 41, 0.12);
  --accent-soft-hover: rgba(92, 24, 41, 0.18);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(28, 26, 24, 0.06);
  --shadow: 0 12px 40px rgba(28, 26, 24, 0.08), 0 4px 16px rgba(28, 26, 24, 0.04);
  --shadow-lg: 0 24px 64px rgba(28, 26, 24, 0.10), 0 8px 24px rgba(28, 26, 24, 0.06);
  --shadow-soft: 0 12px 36px rgba(28, 26, 24, 0.06), 0 4px 12px rgba(28, 26, 24, 0.03);
  --shadow-accent: 0 8px 24px rgba(92, 24, 41, 0.18);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;

  --max: 1140px;
}


*{ box-sizing: border-box; }
html{
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body{ height: 100%; }
body{
  margin: 0;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1400px 700px at 75% 5%, rgba(92, 24, 41, 0.05), transparent 55%),
    radial-gradient(1000px 600px at 15% 85%, rgba(28, 26, 24, 0.03), transparent 50%),
    var(--bg);
  overflow-x: hidden;
}
img, video{
  max-width: 100%;
  height: auto;
  display: block;
}
iframe{ max-width: 100%; }
.map-embed iframe{ width: 100%; height: 100%; min-height: 200px; }

input, textarea, select{ font-size: 16px; }

a{ color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover{ color: var(--accent-hover); }

/* Foco por teclado — contornos com contraste ≥3:1 face ao fundo adjacente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.container{
  width: min(var(--max), calc(100% - 48px));
  max-width: 100%;
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus-visible{
  left: 16px; top: 16px;
  width: auto; height: auto;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent);
}

.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;
}

/* ========== Brand ========== */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--duration) var(--ease);
}
.brand:hover{ opacity: 0.92; }
.brand-mark{
  display: none;
}
.brand-mark img{ display: none; }
.brand-stack{
  display: inline-flex;
  flex-direction: column;
  line-height: 1.08;
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.brand-stack .brand-name{
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: #fff;
}
.brand-stack .brand-sub{
  font-size: 0.52em;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-top: 2px;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
}

/* ========== Header ========== */
.nav{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 248, 246, 0.88);
  border-bottom: 1px solid var(--stroke);
  transition: box-shadow var(--duration) var(--ease);
}
.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a{
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.nav-links a:hover{ color: var(--text); background: var(--panel); }
.nav-links > a.is-active:not(.btn),
.nav-links > a[aria-current="page"]:not(.btn){
  color: var(--text);
  background: var(--panel);
  font-weight: 600;
}

.header-by-appointment{
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 8px 12px;
  margin: 0 4px;
  border-left: 1px solid var(--stroke);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.header-by-appointment::before{
  content: "· ";
  font-weight: 700;
  color: var(--accent);
  opacity: 0.6;
}

.nav-toggle{
  display: none;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle span{ display: none; }
.nav-toggle::before{
  content: "⋮";
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

/* ========== Buttons ========== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: transform var(--duration) var(--ease-out), background var(--duration) var(--ease), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn:hover{ transform: translateY(-2px); border-color: var(--stroke-strong); box-shadow: var(--shadow-sm); }
.btn:active{ transform: translateY(0); }

.btn.primary{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover{ background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-accent); }
.btn.primary:active{ background: var(--accent-active); border-color: var(--accent-active); }

.btn.secondary{
  background: var(--panel);
}
.btn.secondary:hover{ background: var(--panel-strong); }
.btn.small{
  padding: 10px 18px;
  font-size: 0.875rem;
}

.btn:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.btn.primary:focus-visible{
  outline-color: #fff;
  outline-offset: 3px;
}

/* ========== Hero ========== */
.hero{
  position: relative;
  padding: 88px 0 40px;
}
/* Menos espaço entre a imagem do hero e a secção seguinte */
.hero + .section{ padding-top: 48px; }
.hero-grid{
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}
.hero-grid--text-only{
  grid-template-columns: 1fr;
  max-width: 40rem;
}
.hero-badge{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}
.hero-badge .sep{ opacity: 0.4; }
.hero-badge--two{
  max-width: 720px;
  justify-content: center;
  text-align: center;
}
.hero-grid--text-only .hero-badge--two{
  justify-content: flex-start;
  text-align: left;
  max-width: none;
}
.hero-identity{
  margin: 18px 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.hero-copy .hero-identity + h1{
  margin-top: 10px;
}
.hero h1,
.hero h2{
  margin: 20px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text);
}
.lead{
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 52ch;
}
.hero-actions{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 28px;
}
.hero-mini{
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9375rem;
}
.hero-mini .dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hero-glow{
  position: absolute;
  inset: -200px -200px auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle at 35% 35%, rgba(92, 24, 41, 0.12), transparent 55%);
  filter: blur(48px);
  opacity: 0.6;
  pointer-events: none;
}

.hero-visual{
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(145deg, var(--panel), var(--bg-warm));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 400px;
}
.hero-panel-img{
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ========== Sections ========== */
.section{
  padding: 80px 0;
}
.section.alt{
  background: var(--bg-warm);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.section-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.section-head h2{
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.section-head p{
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
  font-size: 1rem;
}

/* ========== Cards / grids ========== */
.cards{ margin-top: 24px; }
.section-title{
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-subtitle{
  margin: 0 0 32px;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
  font-size: 1rem;
}
.cards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card{
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration) var(--ease-out), border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before{
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(500px 200px at 30% 10%, var(--accent-soft), transparent 65%);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
  pointer-events: none;
}
.card:hover{
  transform: translateY(-4px);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow);
}
.card:hover::before{ opacity: 1; }

.card-icon{
  font-size: 2.25rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--stroke);
  margin-bottom: 18px;
  line-height: 1;
}
.card h3{
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.card p{ margin: 0 0 12px; color: var(--muted); line-height: 1.55; font-size: 0.9375rem; }
.card ul{ list-style: none; padding: 0; margin: 0; }
.card ul li{
  position: relative;
  padding-left: 1.25em;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 6px;
}
.card ul li::before{
  content: "·";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.7;
}
.card-cta{
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  font-size: 0.9375rem;
}
.card-cta a{ font-weight: 600; }
.residentes-fora-block{
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.residentes-fora-block .section-subtitle{ margin-bottom: 24px; }

.practice-block{ margin-top: 40px; }
.practice-block:first-of-type{ margin-top: 32px; }
.practice-block-title{
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.practice-cards{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.practice-card.card{ padding: 24px; }
.practice-card .mini-list{ margin: 12px 0; }
.practice-card p:has(.card-cta){ border-top: 1px solid var(--stroke); padding-top: 12px; margin-top: 14px; margin-bottom: 0; }
.practice-card .card-cta{ font-weight: 600; }
.practice-fecho{ margin-top: 32px; margin-bottom: 20px; color: var(--muted); line-height: 1.65; max-width: 65ch; }

.articles-listing{ margin-top: 40px; }
.articles-listing .section-title{ margin-bottom: 12px; }
.articles-listing .section-subtitle{ margin: 0 0 16px; color: var(--muted); font-size: 1rem; }
.articles-listing .articles-grid{ margin-top: 16px; }
.section-cta{ margin: 16px 0 0; font-size: 0.9375rem; }
.section-cta a{ font-weight: 600; }

.mini-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mini-list li{
  color: var(--muted);
  font-size: 0.9375rem;
  padding-left: 18px;
  position: relative;
}
.mini-list li::before{
  content: "·";
  position: absolute;
  left: 0;
  color: var(--muted);
  opacity: 0.8;
}

#residentes-estrangeiro .mini-list,
#recursos-uteis .mini-list{
  max-width: 52rem;
}

/* Homepage — contacto (sem estilos inline) */
#contacto-home .home-contact-line{
  margin: 0 0 12px;
  font-size: 1.0625rem;
}
#contacto-home .home-contact-line--email{
  margin-bottom: 24px;
}
#contacto-home .home-contact-address{
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Pedido de marcação — email / WhatsApp */
.consulta-booking{
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.consulta-booking__title{
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.consulta-booking__intro{
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
}
.consulta-booking__note{
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 52ch;
}
.consulta-booking__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.consulta-booking__actions .btn{
  justify-content: center;
}
@media (max-width: 540px){
  .consulta-booking{ padding: 24px 20px; }
  .consulta-booking__actions .btn{
    width: 100%;
    min-height: 48px;
  }
}

.page-agendar .section.consulta-booking-section{
  padding-top: 24px;
  padding-bottom: 40px;
}
.page-agendar .agendar-note--spaced{
  margin-top: 2rem;
}

.contact-page .consulta-booking--top{
  margin-bottom: 32px;
}

/* ========== Timeline ========== */
.timeline{
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.step{
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.step-num{
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(92, 24, 41, 0.2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.step-body h3{ margin: 2px 0 8px; font-size: 1.0625rem; font-weight: 600; }
.step-body p{ margin: 0; color: var(--muted); line-height: 1.6; font-size: 0.9375rem; }

/* ========== Accordion ========== */
.faq{ margin-top: 32px; }
.faq-title{
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.accordion{
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.acc-item{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: left;
  transition: background var(--duration) var(--ease);
}
.acc-item:hover{ background: var(--panel); }
.acc-item:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  z-index: 1;
  position: relative;
}
.acc-item + .acc-panel{ border-top: 1px solid var(--stroke); }
.acc-panel{
  padding: 0 20px 20px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.9375rem;
}
.acc-icon{
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-size: 1.125rem;
  transition: transform var(--duration) var(--ease);
}
.acc-item[aria-expanded="true"] .acc-icon{ transform: rotate(45deg); }

/* ========== Contact + Map ========== */
.contact-grid{
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  align-items: stretch;
}
.contact-card, .map-card{
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease);
}
.contact-card:hover{ box-shadow: var(--shadow); }
.contact-card h3{
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.muted{ color: var(--muted); }
.contact-list{
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
.contact-item{
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.contact-item:hover{
  border-color: var(--stroke-strong);
  background: var(--panel);
}
.ci{ width: 28px; text-align: center; font-size: 1.125rem; }

.legal-mini{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.map-card{
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.map-card iframe{
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* Formulário de contacto (página contactos) */
.contact-form-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--stroke);
}
.contact-form-section__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.contact-form-section__lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 56ch;
}
.contact-form {
  max-width: 640px;
}
.contact-form .contact-form__row {
  margin-bottom: 20px;
}
.contact-form .contact-form__row:last-of-type {
  margin-bottom: 0;
}
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--text-soft);
}
.contact-form .contact-form__hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-form input[aria-invalid="true"] {
  border-color: #b91c1c;
}
.contact-form__error {
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: #b91c1c;
  font-weight: 500;
}
.contact-form__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.contact-form__note {
  margin: 20px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
}
.contact-form .contact-form__consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.contact-form .contact-form__consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.contact-form .contact-form__consent label {
  margin: 0;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-soft);
  cursor: pointer;
}

.contact-form__legal {
  margin: 20px 0 0;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 56ch;
}

.agendar-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0 8px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.agendar-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.agendar-consent label {
  margin: 0;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-soft);
  cursor: pointer;
}

/* Utilitários de espaçamento (home e páginas internas) */
.u-mt-section {
  margin-top: 2rem;
  margin-bottom: 0;
}
.u-mt-cta {
  margin-top: 28px;
}
.u-mt-sm {
  margin-top: 1rem;
}
.u-mt-content {
  margin-top: 1.25rem;
}
.legal-site-note__title {
  font-size: 1.25rem;
}
.legal-site-note__text {
  max-width: 52rem;
  line-height: 1.65;
  margin: 0;
}

/* ========== Footer ========== */
.footer{
  padding: 48px 0 40px;
  border-top: 1px solid var(--stroke);
  background: var(--bg-warm);
}
.footer-inner{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-brand .brand-mark{
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.footer-brand .brand-stack{
  padding: 8px 14px;
}
.footer-brand .brand-name{ font-size: 0.8rem; }
.footer-brand .footer-note{
  flex-basis: 100%;
  margin-left: 40px;
  margin-top: 8px;
  font-size: 0.9375rem;
}
.footer-note{
  display: block;
  margin-top: 8px;
  color: var(--muted);
}
.footer-right{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.footer-links{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-links a{
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.footer-links a:hover{ color: var(--text); background: var(--panel); }
.footer-disclaimer{
  margin: 0;
  max-width: 44ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}
.footer-copy{
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
@media (max-width: 768px) {
  .footer{ padding: 36px 0 32px; }
  .footer-right{ align-items: flex-start; }
  .footer-disclaimer{ text-align: left; max-width: none; }
  .footer-inner{ gap: 28px; }
  .cta-row{ flex-direction: column; }
  .cta-row .btn{ width: 100%; max-width: 100%; justify-content: center; }
  input, textarea, button{ max-width: 100%; }
}

/* ========== Page template (páginas pilar) ========== */
.page { padding: 56px 0; }
.page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page .lead { max-width: 70ch; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.page .note { color: var(--muted); font-size: 0.9375rem; }
.page section { margin-top: 32px; }
.page section h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.page section ul { margin: 0 0 18px; padding-left: 1.4em; color: var(--muted); line-height: 1.65; }
.page section ul li { margin-bottom: 8px; }

.contact-grid-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.contact-grid-page .contact-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.map-embed {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--stroke);
  margin-top: 16px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* ========== Agendar consulta ========== */
.page-agendar .agendar-intro {
  margin-bottom: 8px;
}
.page-agendar .agendar-intro .lead {
  margin-bottom: 32px;
}
.page-agendar .agendar-kick {
  margin-top: 2.5rem;
}
.page-agendar .agendar-kick .agendar-block-title--lg {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.page-agendar .agendar-kick .lead.agendar-kick__lead {
  margin-bottom: 1.25rem;
}

.agendar-card.card {
  padding: 32px 36px;
  margin-top: 0;
  transform: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.agendar-card.card:hover {
  transform: none;
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow);
}
.agendar-card.card::before { display: none; }

.agendar-block {
  margin-bottom: 28px;
}
.agendar-block:last-of-type { margin-bottom: 0; }
.agendar-block-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 16px;
  padding: 0;
}

.agendar-row {
  margin-bottom: 20px;
}
.agendar-row:last-child { margin-bottom: 0; }
.agendar-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--text-soft);
}
.agendar-form .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.agendar-form .required {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.agendar-form input[type="text"],
.agendar-form input[type="email"],
.agendar-form input[type="tel"],
.agendar-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}
.agendar-form input::placeholder,
.agendar-form textarea::placeholder {
  color: var(--muted);
}
.agendar-form input:focus-visible,
.agendar-form textarea:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.agendar-form input[aria-invalid="true"] {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.agendar-form input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}
.agendar-error {
  display: block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: #b91c1c;
  font-weight: 500;
}
.agendar-form textarea { resize: vertical; min-height: 96px; }

.agendar-horarios {
  border: none;
  padding: 0;
  margin: 0 0 28px;
}
.agendar-horarios .agendar-block-title {
  margin-bottom: 8px;
}
.agendar-hint {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}
.horarios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
.horario-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.9375rem;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--panel);
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.horario-check:hover {
  background: var(--panel-strong);
}
.horario-check input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
  border-radius: 4px;
}
.horario-check input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.horario-check:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.horario-label { pointer-events: none; }

.agendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
}
.agendar-actions .btn {
  min-height: 52px;
  padding: 16px 28px;
}
.agendar-note {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}
.agendar-cta { margin-top: 28px; }

@media (max-width: 600px) {
  .agendar-card.card { padding: 24px 20px; }
  .horarios-grid { grid-template-columns: 1fr; gap: 8px; }
  .agendar-actions { flex-direction: column; gap: 12px; padding-top: 20px; margin-top: 24px; }
  .agendar-actions .btn { width: 100%; min-height: 52px; }
}

@media (max-width: 900px) {
  .contact-grid-page { grid-template-columns: 1fr; }
}

/* ========== Responsive ========== */
@media (max-width: 980px){
  .hero{ padding: 56px 0 32px; }
  .hero + .section{ padding-top: 40px; }
  .hero-grid{ grid-template-columns: 1fr; gap: 36px; }
  .hero-visual{ min-height: 340px; }
  .section{ padding: 56px 0; }
  .grid-3,
  .cards-grid{ grid-template-columns: 1fr; gap: 18px; }
  .contact-grid{ grid-template-columns: 1fr; gap: 20px; }
  .section-head{ flex-direction: column; align-items: flex-start; margin-bottom: 24px; }
  .container{ width: min(var(--max), calc(100% - 32px)); }
  .nav-toggle{ display: inline-flex; align-items: center; justify-content: center; }
  .nav-links{
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    min-width: min(280px, calc(100vw - 32px));
    max-height: min(70vh, 520px);
    overflow-y: auto;
    z-index: 100;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.active{ display: flex; }
  body.nav-menu-open{
    overflow: hidden;
    touch-action: none;
  }
  .nav-links a{
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .header-by-appointment{
    padding: 12px 16px 8px;
    margin: 0;
    border-left: none;
    border-top: 1px solid var(--stroke);
    white-space: normal;
    font-size: 0.875rem;
    text-align: center;
    order: -1;
    width: 100%;
  }
  .header-by-appointment::before{ content: none; }
}

/* Mobile: layout em ecrãs estreitos */
@media (max-width: 980px){
  .container{ width: min(100% - 24px, var(--max)); margin-left: auto; margin-right: auto; }
  .hero{ padding: 48px 0 28px; }
  .hero + .section{ padding-top: 36px; }
  .hero-copy{ text-align: center; }
  .hero-badge--two{ justify-content: center; margin: 0 auto; }
  .hero h1, .hero h2{ font-size: clamp(1.875rem, 7vw, 2.75rem); line-height: 1.15; }
  .lead{ max-width: 100%; }
  .hero-actions{ flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-actions .btn{ width: 100%; min-height: 48px; justify-content: center; }
  .section{ padding: 48px 0; }
  .section-title{ font-size: clamp(1.5rem, 6vw, 2rem); }
  .cards-grid{ gap: 16px; }
  .card{ padding: 24px 20px; }
  .faq-title{ font-size: 1.25rem; }
  .acc-item{ padding: 18px 16px; min-height: 52px; }
  .footer{ padding: 40px 0 32px; }
  .footer-inner{ flex-direction: column; align-items: flex-start; gap: 28px; }
  .footer-right{ align-items: flex-start; }
  .footer-links{ flex-direction: column; width: 100%; gap: 4px; }
  .footer-links a{ padding: 12px 0; min-height: 44px; font-size: 1rem; }
  .footer-disclaimer{ text-align: left; max-width: none; }
  .header-inner{ padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .footer-inner{ padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}

/* Telemóveis pequenos (< 480px) */
@media (max-width: 480px){
  .container{ width: calc(100% - 20px); }
  .hero{ padding: 40px 0 24px; }
  .hero + .section{ padding-top: 32px; }
  .hero h1, .hero h2{ font-size: 1.75rem; }
  .hero-actions .btn{ min-height: 48px; }
  .section{ padding: 40px 0; }
  .section-title{ font-size: 1.375rem; }
  .section-head h2{ font-size: 1.375rem; }
  .card{ padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .card,
  .acc-icon {
    transition-duration: 0.01ms !important;
  }
}
