/* ==========================================================
   Gabinete de Garantia de Qualidade — ISPG
   Fontes: Manrope (texto) · Barlow Condensed (títulos)
   ========================================================== */

:root {
  --green: #006838;
  --green-dark: #00391c;
  --orange: #f58331;
  --orange-soft: #ffb074;   /* laranja claro para texto sobre verde */
  --orange-pale: #ffd2a8;
  --bg: #f6f4ee;
  --bg-alt: #edeadf;
  --surface: #ffffff;
  --ink: #14201f;
  --muted: #4a5654;
  --line: #dad6c8;

  --font-body: "Manrope", system-ui, sans-serif;
  --font-title: "Barlow Condensed", "Arial Narrow", sans-serif;

  --radius: 16px;
  --container: 1240px;
  --header-h: 96px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

h1, h2, h3 { margin: 0; font-family: var(--font-title); }
p { margin: 0; }

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.section-title {
  font-size: 38px;
  font-weight: 600;
  line-height: 1.15;
}

.link-arrow { color: var(--green); font-weight: 700; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn--orange { background: var(--orange); color: var(--ink); }
.btn--outline { border-color: #fff; color: #fff; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--green-dark); color: #e9f0ee; font-size: 13px; }
.topbar .container {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 8px 24px; padding-top: 10px; padding-bottom: 10px;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Cabeçalho (fixo) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green);
  color: #fff;
  border-bottom: 3px solid var(--orange);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); }

.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 32px;
  padding-top: 14px; padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand:hover { text-decoration: none; }
.brand__logos { display: flex; align-items: center; gap: 14px; }
.brand__divider { width: 1px; height: 44px; background: #7fb89b; }
.brand__text { display: flex; flex-direction: column; }
.brand__title {
  font-family: var(--font-title);
  font-size: 22px; font-weight: 700; line-height: 1.1;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.brand__sub { font-size: 13px; color: #d4e3e0; }

/* Espaço para logótipo: mostra a imagem de img/ ou um marcador */
.logo-slot {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  flex: none;
}
.logo-slot img { width: 100%; height: 100%; object-fit: contain; }
.logo-slot.is-missing {
  border: 2px dashed var(--green);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--green);
  font-size: 11px; font-weight: 700; line-height: 1.2;
}
.logo-slot.is-missing::after { content: attr(data-label); white-space: pre-line; }

/* Menu */
.nav-toggle {
  display: none;
  min-height: 44px; padding: 8px 20px;
  background: transparent; color: #fff;
  border: 2px solid #fff; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer;
}

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; font-weight: 600; }
.main-nav a { padding: 12px 14px; border-radius: 999px; }
.main-nav a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }
.main-nav a.nav-cta { padding: 12px 22px; background: var(--orange); color: var(--ink); }
.main-nav a.nav-cta:hover { background: #ff9447; }

/* ---------- Abertura ---------- */
.hero { background: var(--green); color: #fff; }
.hero .container {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 48px; padding-top: 80px; padding-bottom: 80px;
}
.hero__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero__text .eyebrow { color: var(--orange-pale); }
.hero h1 {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 600; line-height: 1.05;
}
.hero__lead { font-size: 18px; max-width: 560px; color: #e3eeeb; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; }

.hero__card {
  flex: 1 1 340px; min-width: 0;
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.hero__card h2 { font-size: 26px; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline strong { min-width: 72px; color: var(--green); }

/* ---------- Cartões ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cards { display: flex; flex-wrap: wrap; gap: 24px; }

.quick { padding-top: 64px; padding-bottom: 16px; }
.quick .card {
  flex: 1 1 240px; min-width: 0; padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.quick .card:hover { text-decoration: none; border-color: var(--green); }
.card__title { font-family: var(--font-title); font-size: 22px; font-weight: 600; line-height: 1.15; }
.card p, .card__text { color: var(--muted); }

/* ---------- Secções ---------- */
.section { padding-top: 72px; padding-bottom: 72px; }
.section--white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); }
.section__head { max-width: 680px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }

.about { display: flex; flex-wrap: wrap; gap: 48px; }
.about > div:first-child { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.about__body { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 18px; }
.about__body p + p { color: var(--muted); }

/* Ciclo */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li {
  flex: 1 1 240px; min-width: 0;
  border-top: 4px solid var(--green); padding-top: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.steps__num { font-family: var(--font-title); font-size: 44px; font-weight: 600; line-height: 1; color: var(--green); }
.steps h3 { font-family: var(--font-body); font-size: 20px; }
.steps p { color: var(--muted); }

/* Áreas */
.areas .card { flex: 1 1 340px; min-width: 0; padding: 28px; }
.areas .card__title { margin-bottom: 8px; }

/* Equipa */
.team { padding-top: 0; }
.team__head { max-width: 720px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.team__bar { display: flex; }
.team__bar::before { content: ""; width: 96px; height: 4px; background: var(--orange); }
.team__bar::after { content: ""; width: 48px; height: 4px; background: var(--green); }
.team__lead { font-size: 18px; color: var(--muted); }

.member {
  flex: 1 1 240px; min-width: 0; padding: 32px 24px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
}
.member__photo {
  width: 160px; height: 160px; border-radius: 999px;
  background: #e9e6da; overflow: hidden; margin-bottom: 12px; flex: none;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__photo.is-missing {
  border: 2px dashed #8a9a94; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.member__photo.is-missing::after { content: attr(data-label); }
.member__name { font-family: var(--font-title); font-size: 22px; font-weight: 700; line-height: 1.15; }
.member__role { color: var(--muted); }
.member__mail { color: var(--green); font-weight: 700; font-size: 15px; word-break: break-word; }

/* Notícias e documentos */
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > div { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.split h2 { font-size: 32px; font-weight: 600; }

.news { padding: 28px; border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.news time { font-size: 13px; font-weight: 700; color: var(--green); }
.news h3 { font-size: 22px; font-weight: 600; }
.news p { color: var(--muted); }

.docs { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.docs a {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 20px 28px; border-bottom: 1px solid var(--line);
}
.docs a:last-child { border-bottom: 0; }
.docs a:hover { background: var(--bg); text-decoration: none; }
.docs strong { font-weight: 700; }
.docs span { color: var(--muted); font-size: 14px; }

/* Inquérito */
.survey { background: var(--green-dark); color: #fff; }
.survey .container {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 32px;
  padding-top: 64px; padding-bottom: 64px;
}
.survey__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.survey h2 { font-size: 36px; font-weight: 600; line-height: 1.15; }
.survey p { font-size: 18px; color: #d4e3e0; }

/* Rodapé */
.site-footer { background: var(--green); color: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer__col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.footer__col--wide { flex: 2 1 360px; }
.footer__col--narrow { flex: 1 1 200px; }
.footer__title { font-family: var(--font-title); font-size: 22px; font-weight: 700; color: var(--orange-soft); margin-bottom: 4px; }
.footer__col a { padding: 4px 0; }
.footer__gap { margin-top: 12px; }
.footer__bottom { background: var(--green-dark); padding: 20px 32px; text-align: center; font-size: 14px; }

/* ---------- Telemóvel e tablet ---------- */
@media (max-width: 860px) {
  :root { --header-h: 84px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 2px; padding-top: 8px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 16px; }
  .main-nav a.nav-cta { text-align: center; margin-top: 6px; }
  .brand__sub { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-title { font-size: 32px; }
  .brand__title { font-size: 18px; }
  .logo-slot { width: 52px; height: 52px; }
  .hero .container { padding-top: 56px; padding-bottom: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header { transition: none; }
}
