/* ==========================================================================
   CIOA — Centro de Implantologia e Ortodontia do Algarve
   Paleta extraída do site original: #004a8c · #0094ba · #1ebeb6 · #62ebe2 · #191919
   Tipografia: Manrope (sans-serif única; a hierarquia faz-se por peso, tamanho e espaçamento)
   ========================================================================== */

:root {
  --navy: #004a8c;
  --navy-deep: #002e57;
  --blue: #0094ba;
  --teal: #1ebeb6;
  --aqua: #62ebe2;
  --ink: #191919;
  --muted: #56636e;
  --line: #e3e9ee;
  --bg: #ffffff;
  --bg-soft: #f3f8fa;

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: var(--sans);

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 1240px;
  --section: clamp(4.5rem, 11vw, 9rem);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }
address { font-style: normal; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 em, h2 em, .display em { font-style: normal; font-weight: 300; }
h3 { letter-spacing: -.02em; line-height: 1.2; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--aqua); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem; border-radius: var(--radius);
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--soft { background: var(--bg-soft); }
.section--tight-top { padding-top: 0; }

/* ---------- Tipos auxiliares ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .9rem;
  margin: 0 0 1.5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before { content: ""; width: 2.5rem; height: 1px; background: var(--teal); }
.on-dark .eyebrow, .hero .eyebrow { color: #fff; }
.on-dark .eyebrow::before, .hero .eyebrow::before { background: var(--aqua); }

.h-xl { font-size: clamp(1.75rem, 8.4vw, 5rem); line-height: 1.05; letter-spacing: -.04em; }
.h-lg { font-size: clamp(1.75rem, 4.6vw, 3.1rem); }
.h-md { font-size: clamp(1.5rem, 3vw, 2rem); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.75; color: var(--muted); max-width: 46em; }
.on-dark .lead { color: rgba(255, 255, 255, .82); }
.accent { color: var(--navy); }
.on-dark .accent, .hero .accent { color: var(--aqua); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 3.25rem; padding: .85rem 1.75rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 .84rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn svg { width: 1em; height: 1em; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-deep); }
.btn--light { background: #fff; color: var(--navy-deep); }
.btn--light:hover { background: var(--aqua); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy-deep); border-color: #fff; }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--navy); padding-block: .4rem; border-bottom: 1px solid currentColor;
}
.link-arrow svg { width: 1em; height: 1em; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 100;
  color: #fff;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease);
}
.js .site-header { position: fixed; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }
.brand { position: relative; display: block; flex: none; width: 118px; }
.brand img { width: 118px; height: auto; transition: opacity .3s; }
.brand .logo-dark { position: absolute; inset: 0; opacity: 0; }

.site-header.is-solid { background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.site-header.is-solid .brand .logo-light { opacity: 0; }
.site-header.is-solid .brand .logo-dark { opacity: 1; }

.nav-toggle {
  position: relative; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -10px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 26px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), background-color .2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -8px; }
.nav-toggle span::after { position: absolute; top: 8px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

.site-nav {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 2.5rem;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2.5rem;
  background: var(--navy-deep); color: #fff;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
  overflow-y: auto;
}
.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav-open .site-header { color: #fff; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-open .site-header .brand { z-index: 3; }
.nav-open .site-header .brand .logo-light { opacity: 1; }
.nav-open .site-header .brand .logo-dark { opacity: 0; }
.nav-open body { overflow: hidden; }

.site-nav__list { display: flex; flex-direction: column; gap: .25rem; }
.site-nav__list a {
  display: block; padding: .45rem 0;
  font-family: var(--display); font-size: clamp(1.7rem, 7vw, 2.3rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; text-decoration: none;
}
.site-nav__list a[aria-current="page"] { color: var(--aqua); }
.site-nav__extra { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.lang-switch { font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; padding: .5rem 0; }
.lang-switch:hover { text-decoration: underline; text-underline-offset: 6px; }
.no-js-nav { display: none; }

@media (min-width: 1060px) {
  :root { --header-h: 92px; }
  .nav-toggle { display: none; }
  .brand, .brand img { width: 136px; }
  .site-nav {
    position: static; flex-direction: row; align-items: center; justify-content: flex-end; gap: 2.25rem;
    padding: 0; background: none; color: inherit; opacity: 1; visibility: visible; transform: none; overflow: visible;
  }
  .site-nav__list { flex-direction: row; gap: 2rem; }
  .site-nav__list a {
    position: relative; padding: .5rem 0;
    font: 500 .95rem/1 var(--sans); letter-spacing: .03em;
  }
  .site-nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
  }
  .site-nav__list a:hover::after, .site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav__list a[aria-current="page"] { color: inherit; }
  .site-nav__extra { flex-direction: row; align-items: center; gap: 1.75rem; }
  .site-nav .btn { min-height: 2.75rem; padding: .6rem 1.35rem; font-size: .76rem; }
  .site-header.is-solid .btn--light { background: var(--navy); color: #fff; }
  .site-header.is-solid .btn--light:hover { background: var(--navy-deep); }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; color: #fff; background: var(--navy-deep); isolation: isolate; overflow: hidden; }
.hero--home { min-height: max(620px, min(100vh, 980px)); min-height: max(620px, min(100svh, 980px)); }
.hero--page { min-height: clamp(440px, 68vh, 640px); }

.hero__slide { grid-area: 1 / 1; position: relative; display: grid; align-items: end; opacity: 0; visibility: hidden; transition: opacity 1.2s var(--ease), visibility 0s 1.2s; }
.hero__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center 25%); }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 30, 58, .55) 0%, rgba(0, 30, 58, 0) 26%),
    linear-gradient(0deg, rgba(0, 30, 58, .9) 0%, rgba(0, 38, 72, .55) 45%, rgba(0, 46, 87, .25) 100%);
}
.hero__content { padding-top: calc(var(--header-h) + 3rem); padding-bottom: clamp(8.75rem, 16vw, 10rem); }
.hero--page .hero__content { padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero__title { max-width: 14em; margin-bottom: 2.25rem; }
.hero__title span { display: block; }
.hero__text { max-width: 36em; margin-bottom: 2.25rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .86); }

@media (min-width: 900px) {
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(0, 30, 58, .5) 0%, rgba(0, 30, 58, 0) 24%),
      linear-gradient(90deg, rgba(0, 30, 58, .88) 0%, rgba(0, 40, 76, .55) 42%, rgba(0, 46, 87, .08) 78%),
      linear-gradient(0deg, rgba(0, 30, 58, .6) 0%, rgba(0, 30, 58, 0) 35%);
  }
}

.hero__controls { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(4.9rem, 9vw, 5.5rem); }
.hero__controls .container { display: flex; align-items: center; gap: .35rem; }
.hero__dot, .hero__pause { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.hero__dot { width: 44px; }
.hero__dot::before { content: ""; width: 100%; height: 2px; background: rgba(255, 255, 255, .35); transition: background-color .3s; }
.hero__dot { padding-inline: 4px; }
.hero__dot[aria-current="true"]::before { background: var(--aqua); }
.hero__pause { width: 44px; margin-left: .5rem; opacity: .85; }
.hero__pause svg { width: 14px; height: 14px; }
.hero__pause .icon-play, .hero__pause[aria-pressed="true"] .icon-pause { display: none; }
.hero__pause[aria-pressed="true"] .icon-play { display: block; }

.hero__bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9rem; }
.hero__bar ul { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; overflow: hidden; font-size: .84rem; }
@media (min-width: 480px) { .hero__bar ul { gap: 2.5rem; font-size: inherit; } }
.hero__bar li { display: none; align-items: center; gap: .65rem; white-space: nowrap; }
.hero__bar li:first-child, .hero__bar li:last-child { display: flex; }
.hero__bar li:last-child { margin-left: auto; }
.hero__bar svg { flex: none; width: 1.05rem; height: 1.05rem; color: var(--aqua); }
.hero__bar a { text-decoration: none; }
.hero__bar a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 1100px) { .hero__bar li { display: flex; } }

/* ---------- Introdução ---------- */
.intro { display: grid; gap: 2.5rem; }
.intro__aside { display: flex; align-items: baseline; gap: 1rem; color: var(--navy); }
.intro__year { font-family: var(--display); font-size: clamp(4.5rem, 13vw, 8.5rem); line-height: .85; font-weight: 200; letter-spacing: -.06em; }
.intro__place { font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.intro h2 { margin-bottom: 1.75rem; }
@media (min-width: 900px) {
  .intro { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; }
  .intro__aside { flex-direction: column; gap: 1.5rem; padding-top: 2.4rem; }
}

/* ---------- Cartões de serviço ---------- */
.section-head { display: grid; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr auto; align-items: end; } }

.cards { display: grid; gap: 2.5rem 1.5rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card__media { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--bg-soft); margin-bottom: 1.4rem; }
.card--wide .card__media { aspect-ratio: 3 / 2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__num { display: block; margin-bottom: .6rem; font-size: .76rem; font-weight: 600; letter-spacing: .2em; color: var(--blue); }
.card h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: 1rem; line-height: 1.65; }

/* ---------- Lista editorial de serviços ---------- */
.split { display: grid; gap: 3rem; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 6.5rem); align-items: start; }
  .split__sticky { position: sticky; top: calc(var(--header-h) + 2rem); }
}
.split__sticky h2 { margin-bottom: 1.75rem; }
.split__photo { margin-top: 2.5rem; overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 2; }
.split__photo img { width: 100%; height: 100%; object-fit: cover; }

.service-list { border-top: 1px solid var(--line); }
.service-list li { display: grid; grid-template-columns: 3rem 1fr; gap: .5rem 1rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.service-list .num { font-size: .78rem; font-weight: 600; letter-spacing: .18em; color: var(--blue); padding-top: .5rem; }
.service-list h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: .6rem; }
.service-list p { grid-column: 2; color: var(--muted); max-width: 38em; }

/* ---------- Valores (faixa escura) ---------- */
.on-dark { background: var(--navy-deep); color: #fff; }
.values { display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.values li { padding: 2rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.values .num { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .2em; color: var(--aqua); margin-bottom: 1rem; }
.values h3 { font-size: 1.3rem; }
.values p { margin-top: .9rem; color: rgba(255, 255, 255, .78); font-size: 1rem; }
@media (min-width: 720px) {
  .values { grid-template-columns: repeat(2, 1fr); border-top: 0; column-gap: 3rem; }
  .values li { border-top: 1px solid rgba(255, 255, 255, .16); border-bottom: 0; }
}
@media (min-width: 1100px) { .values { grid-template-columns: repeat(4, 1fr); } }

.quote { margin: clamp(3.5rem, 8vw, 6rem) 0 0; max-width: 22em; font-family: var(--display); font-weight: 300; letter-spacing: -.025em; font-size: clamp(1.45rem, 3.2vw, 2.3rem); line-height: 1.3; }
.quote::before { content: "“"; display: block; color: var(--aqua); font-size: 2em; line-height: .6; margin-bottom: .2em; }

/* ---------- Etiquetas ---------- */
.tags { display: flex; flex-wrap: wrap; gap: .75rem; }
.tags li { padding: .7rem 1.4rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-family: var(--display); font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }

/* ---------- Equipa ---------- */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
@media (min-width: 760px) { .team { grid-template-columns: repeat(3, 1fr); gap: 4rem 2rem; } }
.member__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: var(--bg-soft); margin-bottom: 1.1rem; }
.member__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transition: transform 1.2s var(--ease); }
.member:hover .member__media img { transform: scale(1.04); }
.member h3 { font-size: clamp(1.05rem, 2.1vw, 1.35rem); margin-bottom: .35rem; }
.member p { font-size: .82rem; line-height: 1.5; letter-spacing: .04em; color: var(--muted); }
@media (min-width: 760px) { .member p { font-size: .92rem; } }

.gallery { display: grid; gap: 1rem; }
.gallery figure { margin: 0; background: var(--bg-soft); overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }

/* ---------- Formulário ---------- */
.form-wrap { display: grid; gap: 3rem; }
@media (min-width: 960px) { .form-wrap { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 6.5rem); align-items: start; } }
.form-wrap h2 { margin-bottom: 1.5rem; }
.form-wrap__photo { margin-top: 2.5rem; overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 2; }
.form-wrap__photo img { width: 100%; height: 100%; object-fit: cover; }

.form { display: grid; gap: 1.6rem; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; } .form .full { grid-column: 1 / -1; } }
.field label { display: block; margin-bottom: .35rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: .8rem 0; border: 0; border-bottom: 1px solid #b9c5cf; border-radius: 0; background: transparent;
  font: inherit; color: var(--ink); transition: border-color .25s, box-shadow .25s;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 1px 0 var(--navy); }
.form__note { font-size: .88rem; color: var(--muted); margin: 0; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* ---------- Contactos ---------- */
.contact { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 6vw, 5rem); align-items: stretch; } }
.contact h2 { margin-bottom: 1rem; }
.contact__list { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.contact__list li { display: grid; grid-template-columns: 2.75rem 1fr; gap: .25rem .5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.contact__list svg { width: 1.35rem; height: 1.35rem; color: var(--blue); margin-top: .2rem; }
.contact__list h3 { font: 600 .78rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.contact__list .big { font-family: var(--display); font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact__list small { display: block; font-size: .85rem; color: var(--muted); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1.5rem; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; }
.map { position: relative; min-height: 380px; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.75); }

/* ---------- Faixa CTA ---------- */
.cta { text-align: center; }
.cta h2 { margin: 0 auto 1.5rem; max-width: 16em; }
.cta .lead { margin: 0 auto 2.5rem; }
.cta .btn-row { justify-content: center; }

/* ---------- Turismo ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tiles a { display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; min-height: 9.5rem; padding: 1.5rem; background: #fff; text-decoration: none; transition: background-color .3s, color .3s; }
.tiles a:hover { background: var(--navy); color: #fff; }
.tiles strong { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.05rem, 2vw, 1.35rem); overflow-wrap: anywhere; }
.tiles span { display: inline-flex; align-items: center; gap: .5rem; font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.tiles svg { width: 1em; height: 1em; }

.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.steps li { padding: 2rem 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.steps .num { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .2em; color: var(--aqua); margin-bottom: 1rem; }
.steps h3 { font-size: 1.25rem; margin-bottom: .75rem; }
.steps p { color: rgba(255, 255, 255, .78); font-size: 1rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(5, 1fr); column-gap: 2rem; } }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .9); font-size: 1rem; }
.site-footer__top { display: grid; gap: 3rem; padding-block: clamp(4rem, 9vw, 6.5rem) 3.5rem; }
@media (min-width: 760px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .site-footer__top { grid-template-columns: 4fr 2.5fr 3.5fr 2.5fr; gap: 4rem; } }
.site-footer h2 { font: 600 .875rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--aqua); margin-bottom: 1.4rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.site-footer__brand img { width: 150px; height: auto; margin-bottom: 1.5rem; }
.site-footer__brand p { max-width: 22em; }
.site-footer__menu li + li { margin-top: .55rem; }
.site-footer .hours dt { color: rgba(255, 255, 255, .82); }
.social { display: flex; gap: .75rem; margin-top: 1.75rem; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; transition: background-color .3s, color .3s, border-color .3s; }
.social a:hover { background: #fff; color: var(--navy-deep); border-color: #fff; }
.social svg { width: 1.1rem; height: 1.1rem; }
.hcp img { width: 150px; height: auto; opacity: .92; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.75rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9375rem; }
.site-footer__credit { color: rgba(255, 255, 255, .78); }
.site-footer__credit a { color: rgba(255, 255, 255, .9); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; }
@media (min-width: 900px) { .site-footer__credit { margin-left: auto; } }

/* ---------- Animações ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes kenburns { from { transform: scale(1.001); } to { transform: scale(1.07); } }
.hero__slide.is-active .hero__media img { animation: kenburns 14s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero__slide.is-active .hero__content > * { animation: rise 1s var(--ease) both; }
.hero__slide.is-active .hero__content > :nth-child(2) { animation-delay: .12s; }
.hero__slide.is-active .hero__content > :nth-child(3) { animation-delay: .24s; }
.hero__slide.is-active .hero__content > :nth-child(4) { animation-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .hero__controls, .map, .nav-toggle { display: none !important; }
  .hero { min-height: 0 !important; color: #000; background: none; }
  .hero__media { display: none; }
}

/* ---------- Sem JavaScript: menu sempre visível ---------- */
@media (max-width: 1059.98px) {
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-header__inner { height: auto; flex-wrap: wrap; padding-block: 1rem; }
  html:not(.js) .site-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 1rem 1.5rem; padding: 0; background: none; opacity: 1; visibility: visible; transform: none; }
  html:not(.js) .site-nav__list { flex-direction: row; flex-wrap: wrap; gap: .25rem 1.25rem; }
  html:not(.js) .site-nav__list a { font: 500 .95rem/1.4 var(--sans); }
  html:not(.js) .site-nav__extra { flex-direction: row; align-items: center; }
}

/* ---------- Formulário: aviso de e-mail e contactos alternativos ---------- */
.form__actions { align-items: flex-start; }
.form__note { display: flex; align-items: flex-start; gap: .65rem; flex: 1 1 16rem; padding: .85rem 1rem; border-left: 2px solid var(--teal); background: rgba(30, 190, 182, .09); color: var(--ink); font-size: .92rem; line-height: 1.55; }
.form__note svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; color: var(--navy); }
.form__alt { margin-top: .75rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.form__alt-title { margin-bottom: 1.25rem; font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.form__alt ul { display: grid; gap: 1.25rem 2.5rem; }
@media (min-width: 640px) { .form__alt ul { grid-template-columns: 1fr 1fr; } }
.form__alt li { display: grid; grid-template-columns: 2.25rem 1fr; align-items: start; }
.form__alt svg { width: 1.35rem; height: 1.35rem; margin-top: .3rem; color: var(--blue); }
.form__alt span { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.form__alt a { display: inline-block; padding-block: .2rem; font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.form__alt a:hover { text-decoration: underline; text-underline-offset: 5px; }
.form__alt small { display: block; font-size: .85rem; color: var(--muted); }

/* ---------- Títulos turquesa (sobre fundo escuro): mais peso para melhor leitura ---------- */
.hero h1, .hero h2, .on-dark h2 { font-weight: 700; }
.hero h1 em, .hero h2 em, .on-dark h2 em { font-weight: 600; }

/* ---------- Telemóvel: hero com a foto em ecrã (quase) inteiro e o texto por cima ----------
   Sem bloco de cor por baixo: gradiente escuro só na parte de baixo, um botão principal e
   o secundário como ligação discreta. Cada foto tem o seu enquadramento vertical (--pos-m). */
.hero__media picture { display: contents; }
.hero__text .m { display: none; }
.hero__cta-m { display: none; }
@media (max-width: 1099.98px) { .hero__cta-m { display: flex; } }
@media (max-width: 699.98px) {
  /* 75svh (600–660px) deixa margem à volta dos rostos; a altura acompanha a largura (152vw)
     para a janela vertical da foto nunca alargar ao ponto de cortar rostos */
  .hero--stack { min-height: max(clamp(600px, 75vh, 660px), 152vw); min-height: max(clamp(600px, 75svh, 660px), 152vw); }
  .hero--stack .hero__media img { object-position: var(--pos-m, var(--pos, center top)); }
  .hero--stack .hero__media::after {
    background:
      linear-gradient(180deg, rgba(0, 30, 58, .5) 0%, rgba(0, 30, 58, 0) 16%),
      linear-gradient(0deg, rgba(0, 22, 44, .94) 0%, rgba(0, 22, 44, .78) 26%, rgba(0, 22, 44, .28) 46%, rgba(0, 22, 44, 0) 60%);
  }
  .hero--stack .hero__content { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 8.25rem; }
  .hero--stack.hero--inner .hero__content { padding-bottom: 6rem; }
  .hero--stack .eyebrow { margin-bottom: .7rem; }
  .hero--stack .hero__title { font-size: clamp(1.75rem, 7.6vw, 2.5rem); margin-bottom: 1.15rem; }
  .hero--stack .hero__title:last-child { margin-bottom: 0; }
  .hero--stack .hero__text { font-size: 1rem; line-height: 1.5; margin-top: -.3rem; margin-bottom: 1.15rem; }
  .hero--stack .hero__text .d { display: none; }
  .hero--stack .hero__text .m { display: inline; }
  .hero--stack .btn-row { flex-direction: column; align-items: flex-start; gap: .85rem; }
  .hero--stack .btn--ghost, .hero--stack .btn--ghost:hover {
    min-height: 0; padding: .3rem 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .55); border-radius: 0;
    background: none; color: #fff; font-size: .78rem;
  }
}

/* ---------- Heroes das páginas interiores: o mesmo componente do hero da página inicial ----------
   Foto a toda a largura, texto em baixo à esquerda, mesmo gradiente e mesma barra.
   A altura nunca passa a proporção da foto (sem cortes laterais) e, em ecrãs largos e baixos,
   cresce o suficiente para o texto ficar abaixo dos rostos. */
.hero--inner .hero__content { padding-bottom: clamp(6.5rem, 9vw, 7.5rem); }
@media (min-width: 1100px) {
  .hero--inner { min-height: min(66.56vw, max(620px, min(100vh, 980px), 25vw + 22rem)); min-height: min(66.56vw, max(620px, min(100svh, 980px), 25vw + 22rem)); }
  .hero--inner .hero__title { font-size: clamp(2.5rem, min(8.4vw, 9.5vh), 5rem); }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  /* Tablet (todas as páginas): a foto começa por baixo do cabeçalho (que fica em fundo sólido) e aparece
     a toda a largura, sem cortes laterais; o texto fica por cima, em baixo */
  .hero--stack { min-height: min(66.56vw + var(--header-h), max(80vh, 25.5vw + 24rem)); min-height: min(66.56vw + var(--header-h), max(80svh, 25.5vw + 24rem)); }
  .hero--stack .hero__media { top: var(--header-h); }
  .hero--stack .hero__media::after {
    background: linear-gradient(0deg, rgba(0, 22, 44, .94) 0%, rgba(0, 22, 44, .72) 30%, rgba(0, 22, 44, .2) 52%, rgba(0, 22, 44, 0) 66%);
  }
  .hero--home:not(.hero--inner) .eyebrow { display: none; }
  .hero--stack .hero__content { padding-top: calc(var(--header-h) + 1rem); padding-bottom: 8.25rem; }
  .hero--stack.hero--inner .hero__content { padding-bottom: 5.75rem; }
  .hero--stack .eyebrow { margin-bottom: .75rem; }
  .hero--stack .hero__title { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 1.15rem; }
  .hero--stack .hero__title:last-child { margin-bottom: 0; }
  .hero--stack .hero__text { font-size: 1rem; line-height: 1.5; margin-top: -.35rem; margin-bottom: 1.15rem; }
  .hero--stack .hero__text .d { display: none; }
  .hero--stack .hero__text .m { display: inline; }
  .hero--stack .btn-row { align-items: center; gap: 1.5rem; }
  .hero--stack .btn--ghost, .hero--stack .btn--ghost:hover {
    min-height: 0; padding: .3rem 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .55); border-radius: 0;
    background: none; color: #fff; font-size: .78rem;
  }
  .hero--stack .hero__controls { bottom: 4.6rem; }
}
/* Equipa: em ecrãs médios a foto de grupo desce um pouco, para o menu não tocar nas cabeças */
@media (min-width: 1100px) and (max-width: 1679.98px) {
  .hero--lowered { min-height: min(66.56vw + 44px, max(620px, min(100vh, 980px), 25vw + 22rem)); min-height: min(66.56vw + 44px, max(620px, min(100svh, 980px), 25vw + 22rem)); }
  .hero--lowered .hero__media { top: 44px; }
}

/* ==========================================================================
   Página de Serviços: visão geral em grelha, atalhos (chips) e detalhe em acordeão
   ========================================================================== */
.section--compact { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head--tight { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }

/* Grelha de cartões: 2 colunas em telemóvel, 3 em tablet, 4 em desktop */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1100px) { .svc-grid:not(.svc-grid--3) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.svc-grid > li { display: flex; }
.svc-card {
  position: relative; display: flex; flex-direction: column; gap: .45rem; width: 100%;
  padding: 1.1rem 1rem 1.15rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  text-decoration: none; color: var(--ink);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.svc-card:hover, .svc-card:focus-visible { border-color: var(--navy); transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(0, 46, 87, .45); }
.svc-card__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; margin-bottom: .45rem; border-radius: 50%; background: var(--bg-soft); color: var(--navy); transition: background-color .3s, color .3s; }
.svc-card:hover .svc-card__icon { background: var(--navy); color: #fff; }
.svc-card__icon svg { width: 1.5rem; height: 1.5rem; }
.svc-card strong { font-size: .98rem; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: break-word; hyphens: auto; }
.svc-card__line { font-size: .84rem; line-height: 1.4; color: var(--muted); }
@media (min-width: 760px) {
  .svc-card { padding: 1.6rem 1.5rem 1.7rem; gap: .5rem; }
  .svc-card__icon { width: 3.25rem; height: 3.25rem; margin-bottom: .75rem; }
  .svc-card__icon svg { width: 1.75rem; height: 1.75rem; }
  .svc-card strong { font-size: 1.15rem; }
  .svc-card__line { font-size: .92rem; }
}

/* Atalhos: chips horizontais deslizáveis, fixos por baixo do cabeçalho enquanto se lê o detalhe */
.chips { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, .96); border-block: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.chips__track {
  display: flex; gap: .5rem; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: .65rem var(--gutter);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips__track::-webkit-scrollbar { display: none; }
.chips__track li { flex: none; }
.chips a {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: .4rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: .86rem; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.chips a:hover, .chips a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Detalhe: acordeão (um aberto de cada vez em telemóvel; todos abertos em ecrãs largos) */
.svc-intro { display: grid; gap: 1rem; }
.svc-intro .lead { font-size: 1.05rem; line-height: 1.65; }
@media (min-width: 900px) { .svc-intro { grid-template-columns: 5fr 7fr; gap: 3rem; align-items: end; } }
.svc-list { display: grid; gap: .65rem; align-items: start; }
@media (min-width: 900px) { .svc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
.svc { border: 1px solid var(--line); border-radius: 8px; background: #fff; scroll-margin-top: 4.9rem; /* altura dos atalhos; o cabeçalho já conta em scroll-padding-top */ transition: border-color .3s, box-shadow .3s; }
.svc[open] { border-color: #c3d1dc; }
.svc:target { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30, 190, 182, .16); }
.svc summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; min-height: 3.75rem; padding: .85rem 1.1rem; cursor: pointer; list-style: none; border-radius: 8px; }
.svc summary::-webkit-details-marker { display: none; }
.svc__icon { display: inline-flex; color: var(--blue); }
.svc__icon svg { width: 1.6rem; height: 1.6rem; }
.svc summary h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.svc__toggle { position: relative; width: 1rem; height: 1rem; color: var(--navy); }
.svc__toggle::before, .svc__toggle::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.svc__toggle::after { transform: rotate(90deg); }
.svc[open] .svc__toggle::after { transform: rotate(0deg); }
.svc__body { padding: 0 1.1rem 1.3rem calc(1.1rem + 1.6rem + .9rem); }
.svc__body p { color: var(--muted); font-size: .98rem; line-height: 1.65; margin-bottom: 1rem; }
.svc__body .link-arrow { font-size: .76rem; }
@media (min-width: 900px) {
  .svc summary { padding: 1.15rem 1.5rem; }
  .svc summary h3 { font-size: 1.2rem; }
  .svc__body { padding: 0 1.5rem 1.6rem calc(1.5rem + 1.6rem + .9rem); }
}
