
/* ==================================================================
   01 • RESET
   ================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================================================================
   02 • THEME (CSS Variables)
   ================================================================== */
:root {
  /* Brand */
  --brand: #058a43;      /* verde principal */
  --brand-2: #1f8c67;    /* verde escuro (hover) */

  /* Text & Surfaces */
  --ink: #0f172a;        /* texto principal */
  --muted: #667085;
  --bg: #ffffff;

  /* Layout */
  --container: 1200px;
  --topbar-h: 64px;      /* altura da barra */

  /* Buttons (globais) */
  --btn-h: 44px;
  --btn-min-w: 180px;    /* retro-compat (não usado no layout novo) */
  --btn-w: 200px;        /* largura uniforme desktop/tablet */
  --btn-pad-x: 1.4rem;
  --btn-radius: 0px;
  --btn-fs: 1rem;
  --btn-fw: 500;

  /* Footer theme */
  --footer-light-bg: #f6fbf9;
  --footer-light-top: #f3faf6;
  --footer-ink: var(--ink);
  --footer-muted: #64748b;
  --footer-stroke: #dfe9e5;
  --footer-card: #ffffff;

  /* Tipografia (ADICIONADO) */
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==================================================================
   03 • BASE – Typography / Layout / Helpers
   ================================================================== */
html,
body {
  height: 100%;
}

body {
  /* (ALTERADO) apenas a família da fonte; resto mantém-se */
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  padding-top: var(--topbar-h);
}

h1 {
  font-family: var(--font-heading);
  font-weight: 700; /* mais grosso */
}

h2 {
  font-family: var(--font-heading);
  font-weight: 600; /* semi-bold */
}

h3 {
  font-family: var(--font-heading);
  font-weight: 600; /* semi-bold */
}

p {
  font-family: var(--font-body);
  font-weight: 400; /* normal */
}

.small-text {
  font-family: var(--font-body);
  font-weight: 300; /* mais leve */
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  width: 92%;
  max-width: var(--container);
  margin: 0 auto;
}

section {
  padding: 3rem 0;
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

/* Espaço antes de botões quando seguem texto/listas */
p + .btn,
ul + .btn,
ol + .btn {
  margin-top: 1.5rem;
}

/* Headings */
h2 {
  /* (ADICIONADO) aplicar família da fonte de títulos */
  font-family: var(--font-heading);
  color: #09762f;
  font-size: clamp(1.4rem, 1.1vw + 1.1rem, 2rem);
  line-height: 1.12;
  margin: 0;
}

h3 {
  /* (ADICIONADO) aplicar família da fonte de títulos */
  font-family: var(--font-heading);
  color: #0f172a;
  font-size: clamp(1.1rem, 0.9vw + 0.85rem, 1.35rem);
  line-height: 1.15;
  margin: 0 0 2rem;
}

h2 + h3 {
  margin-top: 0.3rem;
}

/* Helpers */
.no-scroll {
  overflow: hidden;
}

/* ==================================================================
   04 • TOPBAR / NAVBAR (Desktop)
   ================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: visible;
}

.topbar .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.main-nav a {
  color: #0f172a;
  font-weight: 400;
  padding: 0.35rem 0.3rem;
  border-radius: 0.3rem;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

/* Dropdown desktop */
.main-nav li {
  position: relative;
}

.has-dropdown > .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 0.4rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  z-index: 1100;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown {
  display: block;
}

.dropdown li {
  list-style: none;
}

.dropdown a {
  display: block;
  padding: 0.55rem 0.8rem;
  color: #0f172a;
  border-radius: 0rem;
  font-weight: 400;
}

.dropdown a:hover {
  background: rgba(39, 167, 123, 0.08);
  color: var(--brand);
}

/* ==================================================================
   05 • HAMBURGER / MOBILE NAV
   ================================================================== */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 42px;
  height: 42px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: #0f172a;
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}

.nav-toggle span:nth-child(1) {
  top: 12px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 28px;
}

.nav-toggle.is-open span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

@media (max-width: 840px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--topbar-h);
    right: 0;
    width: min(86vw, 260px);
    height: calc(100dvh - var(--topbar-h));
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    padding: 1rem;
    overflow: auto;
    z-index: 1100;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    display: block;
    gap: 0;
    white-space: normal;
  }

  .main-nav li {
    margin: 0.2rem 0;
  }

  .main-nav a {
    display: block;
    padding: 0.75rem 0.25rem;
    font-size: 1.05rem;
  }

  .has-dropdown > .dropdown {
    position: static;
    display: block;
    border: none;
    box-shadow: none;
    padding: 0.2rem 0 0.2rem 0.5rem;
  }

  .has-dropdown > .dropdown a {
    padding: 0.55rem 0.25rem;
    font-size: 1rem;
  }
}

/* ==================================================================
   06 • HERO
   ================================================================== */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  margin-top: -9px;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero__content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 3.5rem 0;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__copy h1 {
  font-size: clamp(2rem, 3.6vw + 0.5rem, 3.4rem);
  line-height: 1.08;
  margin: 0 0 0.7rem;
}

.hero__copy p {
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.2rem);
  opacity: 0.95;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

/* Slider background */
.hero__slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #66bea0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background: var(--img) center 12% / cover no-repeat;
  opacity: 0;
  transition: opacity 1s ease;
  will-change: opacity;
}

.hero__slide.is-active {
  opacity: 1;
}

/* Overlay gradient (unchanged) */
.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(31, 140, 76, 0.454) 0%, rgba(39, 167, 97, 0.25) 55%);
}

/* Transição suave do conteúdo do hero */
.hero__content { 
  transition: opacity .28s ease; 
}
.hero__content.is-swapping { 
  opacity: 0; 
}


/* Dots */
.hero__dots {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.hero__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero__dots button.is-active {
  background: #fff;
}

@media (max-width: 640px) {
  .hero .container {
    flex-direction: column;
    align-items: center;
  }

  .hero__content {
    width: 100%;
    text-align: center;
    padding: 2.2rem 0;
  }

  .hero__copy {
    align-items: center;
    gap: 0.6rem;
  }

  .hero__copy h1 {
    line-height: 1.08;
    max-width: 18ch;
    margin-bottom: 0.4rem;
  }

  .hero__copy p {
    max-width: 38ch;
    margin: 0 auto;
  }

  .hero__actions {
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1rem;
  }

  .hero__dots {
    justify-content: center;
  }
}

/* ==================================================================
   07 • PAGE BANNER (inner pages)
   ================================================================== */
.page-banner {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: end;
  color: #fff;
  margin-top: -9px;
}

.page-banner__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 140, 76, 0.346) 0%, rgba(39, 167, 97, 0.135) 55%);
  pointer-events: none;
}

.page-banner__content {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}

.page-banner h1 {
  font-size: clamp(1.8rem, 1.6vw + 1.2rem, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: #fff;
}

.page-banner__lead {
  margin: 0;
  font-size: clamp(1rem, 0.7vw + 0.9rem, 1.2rem);
  opacity: 0.95;
}

.page-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.page-banner__actions .btn {
  width: auto;
}

/* Breadcrumbs */
.breadcrumbs {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span[aria-hidden="true"] {
  margin: 0 0.4rem;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .page-banner {
    min-height: 32vh;
    align-items: end;
  }

  .page-banner__content {
    text-align: center;
    padding: 2rem 0;
  }

  .page-banner__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
  }

  .page-banner__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .breadcrumbs {
    display: inline-block;
  }
}

/* ==================================================================
   08 • BUTTONS (global)
   ================================================================== */
.btn,
.btn:link,
.btn:visited,
button.btn,
input[type="submit"].btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  width: var(--btn-w);
  padding: 0 var(--btn-pad-x);
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--btn-fs);
  font-weight: var(--btn-fw);
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(39, 167, 123, 0.25);
  transition: transform 0.1s, filter 0.2s;
  text-decoration: none;
  text-transform: uppercase;
}

.btn:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(39, 167, 123, 0.45);
  outline-offset: 2px;
}

.btn--full {
  width: 100%;
  min-width: 0;
}

/* ==================================================================
   09 • APPOINTMENT CARD
   ================================================================== */
.appt-card {
  background: #fff;
  border-radius: 0px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  padding: 1.5rem;
}

.appt-card h3 {
  color: #0f6d58;
  font-size: 1.5rem;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.appt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.5rem;
  align-items: start;
}

.appt-grid .full {
  grid-column: 1 / -1;
}

.appt-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.appt-grid input,
.appt-grid select,
.appt-grid textarea {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #cfd7e3;
  border-radius: 0px;
  background: #f7f9fc;
  height: 44px;
}

.appt-grid textarea {
  min-height: 220px;
  height: auto;
  resize: vertical;
  line-height: 1.4;
}

.appt-grid input:focus,
.appt-grid select:focus,
.appt-grid textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
  background: #fff;
}

.appt-submit {
  grid-column: 2;
  justify-self: end;
}

/* Mobile adjustments (hero context) */
@media (max-width: 640px) {
  .hero + .appt {
    margin-top: clamp(-210px, -26vw, -100px);
  }

  .appt-card {
    padding: 1rem;
  }

  .appt-card h3 {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .appt-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .appt-submit {
    grid-column: 1;
    justify-self: stretch;
  }
}

/* ==================================================================
   10 • KEY SELLING POINTS (features)
   ================================================================== */
.features {
  background: #f6fbf9;
  padding: 3rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  justify-items: center;
  text-align: center;
}

.feature {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 1.5rem 1.25rem;
  max-width: 22rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #dbe4ea;
  text-decoration: none;
}

.feature:focus-visible {
  outline: 3px solid rgba(39, 167, 123, 0.35);
  outline-offset: 3px;
}

.feature h3 {
  margin: 0.6rem 0 0.35rem;
}

.feature p {
  color: #4b5563;
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
  margin: 0 auto 0.75rem;
  box-shadow: 0 6px 18px rgba(39, 167, 123, 0.35);
}

.feature-icon svg {
  width: 30px;
  height: 30px;
  stroke: #fff;
  stroke-width: 2.2;
  fill: none;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
  }

  .features-card {
    padding: 1.2rem;
  }
}

@media (max-width: 640px) {
  .features {
    padding: 1.6rem 0 2.4rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
  }

  .feature {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.35rem;
  }

  .feature-icon svg {
    width: 22px;
    height: 22px;
  }

  .feature h3 {
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.15;
  }

  .feature p {
    display: none;
  }
}

/* ==================================================================
   11 • ABOUT
   ================================================================== */
.about {
  padding: 6rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0px;
}

.about-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0px;
  object-fit: cover;
  background: #66bea0;
}

.about p {
  color: #111;
  margin-bottom: 1rem;
}

/* ==================================================================
   12 • TEAM (image right)
   ================================================================== */
.team {
  padding: 3rem 0 3rem;
}

.team-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.05fr; /* texto + largo, imagem + estreita */
  gap: 2.5rem;
  align-items: start; /* topo a topo */
  grid-auto-flow: dense;
}

.team-grid .team-media {
  grid-column: 2 / 3;
  grid-row: 1;
}

.team-grid .team-copy {
  grid-column: 1 / 2;
  grid-row: 1;
  align-self: center;
}

.team-copy > :first-child {
  margin-top: 0;
}

.team-media .ph-block,
.team-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0px;
  object-fit: cover;
  background: #66bea0;
}

.team p {
  color: #111;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-grid .team-media,
  .team-grid .team-copy {
    grid-column: auto;
    grid-row: auto;
  }
}

/* ==================================================================
   13 • SPECIALTIES / EXAMS (cards)
   ================================================================== */
.dept {
  background: #f6fbf9;
  padding: 3rem 0;
}

.dept h2 {
  text-align: center;
}

.dept .lead {
  text-align: center;
  color: #4b5563;
  max-width: 820px;
  margin: 0 auto 2rem;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.dept-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: 72px 1fr; /* espaço para o ícone */
  gap: 1rem;
  align-items: start;
}

.dept-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(39, 167, 123, 0.28);
}

/* apagar o “+” antigo, se existir */
.dept-icon::before,
.dept-icon::after {
  content: none !important;
}

.dept-icon svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dept-card h4 {
  margin: 0.1rem 0 0.25rem;
  color: #0f172a;
  font-size: 1.05rem;
}

.dept-card p {
  margin: 0;
  color: #667085;
  font-size: 0.95rem;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .dept-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .dept-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dept-card {
    grid-template-columns: 56px 1fr;
  }
}
/* ==================================================================
   14 • CLIENTS ACESS
   ================================================================== */
.acesso-clientes-band {
  background-color: #f6fbf9;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: #000;
}

/* alturas disponíveis */
.acesso-clientes-band.full {
  height: 50vh;   /* ocupa o ecrã todo */
}

.acesso-clientes-band.medium {
  height: 70vh;    /* altura média */
}

.acesso-clientes-band.small {
  height: 40vh;    /* altura mais baixa */
}

.acesso-clientes-content {
  max-width: 800px;
  margin: 0 auto;
}
/* ==================================================================
   15 • AGREEMENTS & CONVENTIONS
   ================================================================== */
.agreements {
  padding: 6rem 0 6rem;
  background: #fff;
}

.agreements__title {
  text-align: center;
  margin: 0 0 0.4rem;
}

.agreements__lead {
  text-align: center;
  color: #000000;
  margin: 0 0 1.4rem;
}

.agreements-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.8rem 3rem;
  padding: 1rem 0 2rem;
}

.agreements-logos img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(0);
}

.agreement-links a {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.agreements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.agreement-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1.4rem 1.6rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 0.8rem;
  transition: 0.18s;
}

.agreement-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}

.agreement-logo2 img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.agreement-name {
  margin: 0.2rem 0 0.2rem;
  font-size: 1.25rem;
  color: #0f172a;
  font-weight: 600;
}

.agreement-website {
  display: inline-block;
  color: #0f172a;
  text-underline-offset: 0.25em;
  margin-bottom: 0.2rem;
}

.agreement-website:hover {
  color: var(--brand);
  text-decoration: none;
}

.agreement-links {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.agreement-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.agreement-links a:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

.agreement-links svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.agreement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07);
}

/* espaço padrão mais contido */
.agreements {
  padding: 3rem 0;  /* antes era 6rem 0 */
}

/* quando uma .agreements vem imediatamente a seguir a outra */
.agreements + .agreements {
  padding-top: 1rem;  /* ou 0, se quiseres colar mesmo */
}

/* opcional: afinar o lead para não empurrar demasiado */
.agreements__lead {
  margin-bottom: 1.2rem;
}
.agreements-button {
  width: 100%;
  display: flex;
  justify-content: center; /* centra o botão */
  margin-top: 2rem;       /* espaço acima */
}

.agreements-button .btn {
  display: flex;
  align-items: center;   /* centra verticalmente */
  justify-content: center; /* centra horizontalmente */
}

@media (max-width: 1024px) {
  /* Ajusta o padding dos cartões e o espaçamento da grelha */
  .agreements-grid {
    gap: 1.2rem;
  }

  .agreement-card {
    padding: 1.2rem;
    gap: 0.6rem;
  }
  
  /* Diminui o tamanho do logo */
  .agreement-logo img {
    height: 34px;
  }
  
  /* Diminui o tamanho do texto do título */
  .agreement-name {
    font-size: 1.1rem;
  }
  
  /* Diminui o tamanho do texto dos links */
  .agreement-links a,
  .agreement-website {
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .agreements {
    padding: 2rem 0 2.2rem;
  }

  .agreements-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.6rem; /* espaço para não cortar sombra */
  }

  .agreements-grid::-webkit-scrollbar {
    display: none;
  }

  .agreement-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
}

/* ==================================================================
   16 • CONTACT
   ================================================================== */
.contact-info {
  background: #f6fbf9;
  padding: 3rem 0;
  text-align: center;
}

.contact-info h2 {
  margin: 0 0 0.8rem;
}

.contact-info__lead {
  color: #000000;
  margin: 0 0 2.2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  justify-items: stretch;
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1.8rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.15rem;
  color: #0f172a;
}

.contact-card p {
  color: #4b5563;
  margin: 0;
}

.contact-card a {
  color: #0f172a;
  text-decoration: none;
}

.contact-card a:hover {
  color: var(--brand);
}

.contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  display: grid;
  place-items: center;
  margin: 0 auto 0.8rem;
  box-shadow: 0 6px 16px rgba(39, 167, 123, 0.35);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
}

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

@media (max-width: 640px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==================================================================
   17 • MEDICAL TEAM (cards)
   ================================================================== */
.med-team {
  padding: 3rem 0;
  background: #fff;
}

.med-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.med-card { background:#fff; }

@media (max-width: 1024px) {
  .med-team__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .med-team__grid {
    grid-template-columns: 1fr;
  }
}

.med-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s;
  height: 100%;
}

.med-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.med-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f6fbf9;
  overflow: hidden;
}

.med-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.med-card__ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--brand);
}

.med-card__ph svg {
  width: 42%;
  height: auto;
  stroke: currentColor;
  fill: none;
}

.med-card__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.med-card__body {
  padding: 1.1rem 1.1rem 1.2rem;
}

.med-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
}

.med-card__name a {
  color: inherit;
  text-decoration: none;
}

.med-card__name a:hover {
  color: var(--brand);
  text-decoration: none;
}

.med-card__spec {
  margin: 0 0 0.6rem;
  color: #09762f;
  font-weight: 600;
}

.med-card__spec {
  display: -webkit-box;
  -webkit-line-clamp: 2;    /* muda para 3 se quiseres */
  line-clamp: 2;            /* standard property */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.med-card__meta {
  margin: 0 0 0.9rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.6rem;
  font-size: 0.98rem;
  color: #4b5563;
}

.med-card__meta dt {
  color: #64748b;
  font-weight: 600;
}

.med-card__meta dd {
  margin: 0;
}

.med-card__actions {
  margin-top: auto;
}

.med-card .btn {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .med-card__body {
    padding: 0.95rem;
  }

  .med-card__name {
    font-size: 1.08rem;
  }
}

/* “Marcação Online” link inside badge */
.med-card__badge a {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}

.med-card__badge a:hover {
  text-decoration: none;
  color: var(--brand);
}


/* ==================================================================
   18 • MISSION/VISION BAND + VALUES
   ================================================================== */
.about-band {
  margin-top: clamp(6rem, 5vw, 6rem);
  padding: clamp(6rem, 4vw, 3rem) 0;
  background: #f6fbf9;
  color: #ffffff;
}

.about-band__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 3vw, 3rem);
  align-items: start;
  text-align: center;
}

.about-band .feature-icon {
  margin-bottom: 1.5rem;
}

.mv {
  max-width: 46ch;
  margin: 0 auto;
}

.mv__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.mv__icon svg {
  width: 30px;
  height: 30px;
  stroke: #000;
  fill: none;
}

.about-band h3 {
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
  margin: 0.2rem 0 0.5rem;
}

.about-band p {
  color: rgba(0, 0, 0, 0.92);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 768px) {
    .about-band {
        margin-top: 3rem;
        padding: 2rem 0;
    }
    .about-band__grid {
        grid-template-columns: 1fr;
        gap: 3rem
    }
}

/* Values */
.values {
  padding: 8rem 0;
  text-align: center;
}

.values__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 0.6rem;
}

.values__lead {
  font-size: 1.1rem;
  color: #000;
  margin: 0 0 2.5rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.value-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  height: 100%;
  min-height: 280px;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #dbe4ea;
  text-decoration: none;
}

.value-card:focus-visible {
  outline: 3px solid rgba(39, 167, 123, 0.35);
  outline-offset: 3px;
}

.value-card__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.value-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.value-card__body {
  padding: 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Alinha o conteúdo ao topo do container flex */
  align-items: center; /* Centraliza o conteúdo horizontalmente */
  text-align: center;
}

.value-card__body h4 {
  margin: 0 0 0.45rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  text-align: center;
}

.value-card__body p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 1200px) {
  .values-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .values-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .values-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.6rem;
  }

  .values-grid::-webkit-scrollbar {
    display: none;
  }

  .value-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
    min-height: 300px;
    max-height: 300px;
  }

  .value-card__media img {
    height: 190px;
    object-fit: cover;
  }
}
/* Secção legal (conteúdo) */
.legal {
  padding: 2.5rem 0 4rem;      /* espaço antes do 1º parágrafo e respiro no fim */
}

/* Largura confortável para leitura (ajusta se já tiveres container estreito) */
.legal .container {
  max-width: 860px;
}

/* Ritmo tipográfico dentro do artigo legal */
.legal__content > * { margin: 0; }                 /* reset consistente */
.legal__content > * + * { margin-top: 1rem; }      /* espaço padrão entre blocos */

.legal__content h2 {
  font-size: clamp(1.6rem, 1.2vw + 1.2rem, 2rem);
  line-height: 1.2;
  margin-top: 0;            /* topo do artigo */
  margin-bottom: 0.75rem;   /* aproxima do lead/parágrafo seguinte */
}

.legal__content h3 {
  font-size: clamp(1.15rem, 0.7vw + 1rem, 1.35rem);
  line-height: 1.25;
  margin-top: 2rem;         /* espaço claro ANTES de cada secção */
  margin-bottom: 0.5rem;    /* junta ao parágrafo seguinte */
}

.legal__content p {
  line-height: 1.7;
  color: #0f172a;           /* “ink” escuro; mantém se já usas var(--ink) */
}

.legal__content ul {
  margin: 0.75rem 0 1rem 1.25rem;  /* lista com respiro e indent */
  padding: 0;
}
.legal__content li + li { margin-top: 0.4rem; }

/* ==================================================================
   19 • FOOTER (light)
   ================================================================== */
.site-footer {
  background: linear-gradient(180deg, var(--footer-light-top) 0%, var(--footer-light-bg) 100%);
  color: var(--footer-ink);
  margin-top: 2.4rem;
}

.logo-colorido {
  filter: grayscale(100%) brightness(0);
}

.logo-colorido:hover {
  filter: grayscale(0%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1fr; /* 4 colunas */
  gap: 2rem;
  padding: 2.2rem 0 2rem;
}

.footer-logo .logo img {
  max-width: 180px;
  height: auto;
  display: block;
}

.site-footer .container {
  width: 92%;
  max-width: 1400px;
}

.site-footer a {
  color: var(--footer-ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
  text-decoration: none;
}

.footer-logo {
  display: inline-block;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.4px;
  color: var(--brand-2);
}

.footer-tagline {
  margin: 0.35rem 0 1rem;
  color: var(--footer-muted);
}

.footer-contact {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: var(--brand-2);
  opacity: 0.85;
  margin-top: 0.15rem;
}

.footer-links h4,
.footer-legal h4,
.footer-cta h4,
.footer-contact-wrapper h4 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #0f172a;
  font-weight: 600;
}

.footer-links ul,
.footer-legal ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.footer-links a,
.footer-legal a {
  color: var(--footer-ink);
}

.footer-cta p {
  margin: 0.2rem 0 0.9rem;
  color: var(--footer-muted);
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 0px;
  background: var(--footer-card);
  border: 1px solid var(--footer-stroke);
  transition: transform 0.12s, background 0.2s, border-color 0.2s, color 0.2s;
  color: var(--brand-2);
}

.footer-social a:hover {
  transform: translateY(-1px);
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-grid > * {
  position: relative;
}

.footer-grid > *:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--footer-stroke);
}

.footer-bottom {
  border-top: 1px solid var(--footer-stroke);
  background: var(--footer-light-bg);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--footer-muted);
}

.footer-bottom .to-top {
  padding: 0.45rem 0.75rem;
  border-radius: 0px;
  border: 1px solid var(--footer-stroke);
  background: var(--footer-card);
  color: var(--brand-2);
}

.footer-bottom .to-top:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2rem 0 1.6rem;
  }

  .footer-logo {
    text-align: center;
  }
  .footer-contact,
  .footer-contact-wrapper,
  .footer-links {
    text-align: left;
  }

  .footer-legal  {
    display: none;
  } 

  .footer-logo .logo {
    display: inline-block;
  }

  .footer-logo .logo img {
    max-width: 140px;
    height: auto;
    margin: 0 auto 1.4rem;
    display: block;
  }

  .footer-contact {
    gap: 0.5rem;
  }

  .footer-contact li {
    justify-content: left;
  }

  .footer-contact a,
  .footer-contact span {
    font-size: 0.98rem;
    line-height: 1.4;
  }

  .footer-links {
    border-top: 1px solid var(--footer-stroke);
    padding-top: 1.2rem;
    margin-top: 0.8rem;
  }

  .footer-grid > *:not(:first-child)::before {
    display: none !important;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.93rem;
  }
}

/* ==================================================================
   99 • SHARED RESPONSIVE (only cross-section overrides)
   ------------------------------------------------------------------
   • Mantido mínimo para evitar duplicações. A maioria dos breakpoints
     está junto de cada módulo para previsibilidade.
   ================================================================== */
@media (max-width: 640px) {
  /* Botões largura total no mobile */
  .btn,
  .btn:link,
  .btn:visited,
  button.btn,
  input[type="submit"].btn {
    width: 100%;
    min-width: 0;
  }

  /* Stack sections */
  .about-grid,
  .team-grid,
  .analises-grid {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
  }

  .about p,
  .team p,
  .analises p {
    font-size: 1.02rem;
  }

  .about .btn,
  .team .btn,
  .analises .btn {
    margin-top: 1.1rem;
  }

  /* Espaçamento de secções (IDs existentes) */
  #sobre,
  #equipa,
  #analises {
    padding: 2rem 0 2.6rem !important;
  }

  /* Placeholders visíveis */
  .about-media,
  .team-media {
    width: 100%;
    align-self: stretch;
  }

  .about-media .ph-block,
  .team-media .ph-block {
    display: block;
    width: 100%;
    background: #66bea0;
    border-radius: 0px;
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }

  @supports not (aspect-ratio: 1) {
    .about-media .ph-block,
    .team-media .ph-block {
      height: 0;
      padding-top: 75%; /* 4:3 */
    }
  }
}

@media (max-width: 380px) {
  .hero + .appt {
    margin-top: -180px;
  }
}

.med-team-filters {
  display: flex; /* Ativa o Flexbox para alinhar os itens */
  align-items: center; /* Alinha verticalmente no centro */
  gap: 1.5rem; /* Cria um espaço de 4 espaços (cerca de 24px ou 1.5rem) entre os itens */
  margin-bottom: 2.5rem; /* Adiciona um espaço abaixo dos filtros */
}

/* Garante que os campos se estendam para preencher o espaço disponível */
.med-team-filters input,
.med-team-filters select {
  flex-grow: 1;
}

/* Estilo para ecrãs pequenos (smartphones) */
@media (max-width: 640px) {
  .med-team-filters {
    flex-direction: column; /* Coloca os itens um por baixo do outro */
    gap: 1rem; /* Ajusta o espaçamento para ecrãs pequenos */
  }

  /* Garante que os campos ocupam a largura total em dispositivos móveis */
  .med-team-filters input,
  .med-team-filters select {
    width: 100%;
  }
}