/* =====================================================================
   institucional.css  —  Sobre · Mensagem da Direcção · Documentos
   ===================================================================== */

/* ── Hero das páginas internas ─────────────────────────────────────── */
.p-hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 88px;
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(30, 155, 255, 0.28) 0%, rgba(30, 155, 255, 0) 60%),
    var(--navy);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.p-hero-media { position: absolute; inset: 0; z-index: -1; }
.p-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.p-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 20, 46, 0.97) 0%, rgba(8, 20, 46, 0.88) 45%, rgba(8, 20, 46, 0.55) 100%);
}
.p-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 760px;
  margin-bottom: 20px;
}
.p-hero-lead { max-width: 620px; font-size: 1.1rem; line-height: 1.7; color: #c9d3e3; }

.p-crumbs {
  /* anula a regra global "nav { position: fixed }" de style.css */
  position: static;
  background: none;
  border: 0;
  backdrop-filter: none;
  z-index: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  font-size: 0.85rem;
  color: #8f9cb3;
}
.p-crumbs a { color: #c9d3e3; text-decoration: none; }
.p-crumbs a:hover { color: #fff; }
.p-crumbs i { font-size: 1rem; opacity: 0.6; }
.p-crumbs [aria-current] { color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   SOBRE
   ══════════════════════════════════════════════════════════════════ */
.s-intro {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
.s-intro-text .h-title { margin-bottom: 24px; }
.s-intro-text p { color: var(--text); line-height: 1.75; margin-bottom: 16px; }
.s-intro-text .h-lead { color: var(--ink); }

.s-intro-media { margin: 0; }
.s-intro-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 30% center;
  border-radius: var(--radius);
  display: block;
}

.s-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.s-facts > div { padding: 32px 28px; }
.s-facts > div + div { border-left: 1px solid var(--line); }
.s-facts dt {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 8px;
}
.s-facts dt.s-facts-text { font-size: 1.25rem; line-height: 2.3rem; }
.s-facts dd { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--text); }

/* Missão e visão */
.s-mv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.s-mv article {
  position: relative;
  padding: 48px 44px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.s-mv article:first-child { background: var(--navy); border-color: var(--navy); }
.s-mv .h-eyebrow { margin-bottom: 20px; }
.s-mv p:not(.h-eyebrow) {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.s-mv article:first-child p:not(.h-eyebrow) { color: #fff; }

/* Valores */
.s-values {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.s-values li {
  padding: 32px 26px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.s-values i {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eaf1ff;
  color: var(--brand);
  font-size: 1.35rem;
  margin-bottom: 20px;
}
.s-values h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.s-values p { font-size: 0.9rem; line-height: 1.6; color: var(--text); }

/* Organograma */
.org {
  --org-line: #c3cddd;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 22px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -20px rgba(10, 27, 61, 0.5);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-align: center;
}
.org-node small { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.org-root { background: var(--navy); border-color: var(--navy); color: #fff; padding: 18px 34px; font-size: 1.05rem; }
.org-root small { color: #9fb0cc; }

.org-stem { width: 2px; height: 28px; background: var(--org-line); }
.org-staff-row {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  width: 100%;
}
.org-staff-row .org-vline { background: var(--org-line); }
.org-staff { justify-self: end; display: flex; align-items: center; padding: 14px 0; }
.org-staff::after { content: ''; width: 32px; height: 2px; background: var(--org-line); }
.org-staff .org-node { background: var(--mist); border-style: dashed; }

.org-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  padding-top: 28px;
}
.org-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--org-line);
}
.org-branch { position: relative; display: flex; flex-direction: column; align-items: stretch; }
.org-branch::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 50%;
  width: 2px;
  height: 28px;
  margin-left: -1px;
  background: var(--org-line);
}
.org-branch > .org-node { width: 100%; padding: 18px 16px; border-top: 3px solid var(--brand); }
.org-units { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.org-units li {
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--mist);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--text);
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   MENSAGEM DA DIRECÇÃO
   ══════════════════════════════════════════════════════════════════ */
.m-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 88px;
  align-items: start;
}

.m-aside { position: sticky; top: calc(var(--nav-h) + 32px); }
.m-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.m-card-top {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(30, 155, 255, 0.35), rgba(30, 155, 255, 0) 60%),
    var(--navy);
}
.m-card-top img { width: 64%; height: auto; }
.m-card-top img.m-photo { width: 100%; height: 100%; object-fit: cover; }
.m-card-body { padding: 24px 24px 26px; }
.m-card-body strong { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--ink); }
.m-card-body span { display: block; font-size: 0.88rem; color: var(--muted); margin-top: 2px; }
.m-card-list { list-style: none; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.m-card-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.87rem; color: var(--text); padding: 6px 0; }
.m-card-list i { color: var(--brand); font-size: 1.05rem; line-height: 1.3; }
.m-card-list a { color: var(--text); text-decoration: none; }
.m-card-list a:hover { color: var(--brand); }

.m-letter { max-width: 720px; }
.m-quote {
  position: relative;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-top: 56px;
  margin: 0 0 40px;
}
.m-quote::before {
  content: '\201C';
  position: absolute;
  top: -18px;
  left: -6px;
  font-size: 7rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.9;
}
.m-letter p { font-size: 1.08rem; line-height: 1.85; color: var(--text); margin-bottom: 22px; }
.m-letter p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-head);
  font-size: 3.4rem;
  line-height: 0.9;
  font-weight: 800;
  color: var(--brand);
  padding: 6px 10px 0 0;
}

.m-sign { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.m-sign span { display: block; font-size: 0.92rem; color: var(--muted); }
.m-sign strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--ink); margin: 6px 0 2px; }

.m-pillars {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.m-pillars li {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.m-pillars i { font-size: 1.6rem; color: var(--brand); }
.m-pillars h3 { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin: 14px 0 6px; }
.m-pillars p { font-size: 0.9rem; line-height: 1.6; color: var(--text); }

/* ══════════════════════════════════════════════════════════════════
   DOCUMENTOS
   ══════════════════════════════════════════════════════════════════ */
.d-list { list-style: none; border-top: 1px solid var(--line); }
.d-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.d-item:hover { background: #fafbfd; }
.d-ico {
  width: 56px;
  height: 64px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eaf1ff;
  color: var(--brand);
  font-size: 1.7rem;
}
.d-item--pdf .d-ico { background: #fdecec; color: #c9302c; }
.d-info h3 { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.d-info p { font-size: 0.92rem; line-height: 1.55; color: var(--text); }
.d-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.d-meta span { display: inline-flex; align-items: center; gap: 5px; }
.d-tag {
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
}
.d-actions { display: flex; gap: 8px; }
.d-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.d-btn:hover { border-color: var(--brand); color: var(--brand); }
.d-btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.d-btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.d-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 64px;
  align-items: start;
}
.d-panel {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  padding: 36px 32px;
  border-radius: 16px;
  background: var(--navy);
  color: #c5cedd;
}
.d-panel h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.d-panel p { font-size: 0.93rem; line-height: 1.65; margin-bottom: 20px; }
.d-panel ul { list-style: none; margin-bottom: 28px; }
.d-panel li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #e3e9f3;
}
.d-panel li i { color: #7cc0ff; font-size: 1.05rem; }
.d-panel .h-btn { width: 100%; }

/* ── Responsivo ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .s-values { grid-template-columns: repeat(3, 1fr); }
  .d-split { grid-template-columns: 1fr; }
  .d-panel { position: static; }
}

@media (max-width: 900px) {
  .p-hero { padding: calc(var(--nav-h) + 48px) 0 64px; }
  .s-intro { grid-template-columns: 1fr; gap: 48px; }
  .s-facts { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
  .s-facts > div:nth-child(3) { border-left: 0; }
  .s-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .s-mv { grid-template-columns: 1fr; }
  .s-values { grid-template-columns: repeat(2, 1fr); }
  .m-grid { grid-template-columns: 1fr; gap: 48px; }
  .m-aside { position: static; max-width: 420px; }
  .m-pillars { grid-template-columns: repeat(2, 1fr); }

  /* Organograma em lista vertical */
  .org-branches { grid-template-columns: repeat(2, 1fr); padding-top: 24px; }
  .org-branches::before, .org-branch::before { display: none; }
}

@media (max-width: 600px) {
  .p-hero h1 { font-size: 2.1rem; }
  .s-facts > div { padding: 24px 16px; }
  .s-facts dt { font-size: 1.7rem; }
  .s-mv article { padding: 32px 26px; }
  .s-values, .m-pillars, .org-branches { grid-template-columns: 1fr; }
  .d-item { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
  .d-ico { width: 48px; height: 56px; }
  .d-actions { grid-column: 1 / -1; }
  .d-actions .d-btn { flex: 1; justify-content: center; }
}
