/* The platform pages (portal/platform.js, views/hero/platform/), the footer columns, the navbar
   search and the emergency banner. Loaded by hero/layout.html on every page.

   MOE accessibility procedure, annex 1: body text 15px and up, contrast 4.5:1 (3:1 for large text).
   Colours used here, measured against their background:
     #111320 on #fff 18.9:1 · #5b6573 on #fff 5.9:1, on #f4f8fa 5.5:1 · #00719f on #fff 5.4:1
     #fff on #00719f 5.4:1 · #fff on #9b1c1c 8.3:1 · #7a4b00 on #fff4dc 7.2:1 · #0b5d3b on #e6f6ee 7.4:1 */

:root {
  --pg-brand: #00719f;
  --pg-brand-dark: #005a7f;
  --pg-ink: #111320;
  --pg-muted: #5b6573;
  --pg-line: #dde5ea;
  --pg-soft: #f4f8fa;
  --pg-radius: 14px;
}

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* --- navbar search ---------------------------------------------------------------------- */
.pg-search-form { display: flex; align-items: center; gap: 0; margin: 6px 0; }
.pg-search-form .form-control { font-size: 15px; border-radius: 999px 0 0 999px; border-inline-end: 0; min-width: 0; width: 170px; height: 40px; }
[dir="rtl"] .pg-search-form .form-control { border-radius: 0 999px 999px 0; }
.pg-search-btn { height: 40px; width: 44px; border: 1px solid #ced4da; background: #fff; color: var(--pg-brand);
  border-radius: 999px 0 0 999px; font-size: 16px; }
[dir="ltr"] .pg-search-btn { border-radius: 0 999px 999px 0; }
.pg-search-btn:hover { background: var(--pg-soft); }
@media (max-width: 991.98px) {
  .pg-search-form { margin: 10px 0 14px; }
  .pg-search-form .form-control { width: 100%; flex: 1; }
}

/* --- emergency banner ------------------------------------------------------------------- */
.pg-alert { background: #9b1c1c; color: #fff; }
.pg-alert .container { display: flex; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.pg-alert p { margin: 0; flex: 1 1 200px; min-width: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.pg-alert i { font-size: 20px; }
.pg-alert a { color: #fff; font-weight: 600; text-decoration: underline; }
.pg-alert a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* --- page frame ------------------------------------------------------------------------- */
.pg-page { font-size: 16px; color: var(--pg-ink); }
.pg-head { background: linear-gradient(180deg, #eef6fa 0%, #fafafa 100%); border-bottom: 1px solid var(--pg-line); padding: 28px 0 22px; margin-bottom: 28px; }
.pg-head h1 { font-size: 30px; font-weight: 700; margin: 6px 0 0; color: var(--pg-ink); }
.pg-head .breadcrumb { margin: 0; font-size: 15px; }
.pg-head .breadcrumb-item.active { color: var(--pg-muted); }
.pg-body { padding-bottom: 56px; }
.pg-lead { font-size: 18px; color: var(--pg-muted); margin: 10px 0 0; line-height: 1.6; }
.pg-muted { color: var(--pg-muted); }
.pg-note { color: var(--pg-muted); font-size: 15px; }
.pg-hint { color: var(--pg-muted); font-size: 15px; margin: 2px 0 12px; }

.pg-card { background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); padding: 22px 24px; }
.pg-card h2 { font-size: 21px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.pg-card h2 i { color: var(--pg-brand); }
.pg-section { margin-bottom: 34px; }
.pg-section > h2 { font-size: 22px; font-weight: 700; margin: 0 0 16px; }

.pg-empty { background: #fff; border: 1px dashed #c5d2da; border-radius: var(--pg-radius); padding: 30px 24px; text-align: center; color: var(--pg-muted); font-size: 17px; }
.pg-empty p { margin: 0 0 12px; }
.pg-empty p:last-child { margin-bottom: 0; }

.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--pg-brand); color: #fff !important;
  border: 2px solid var(--pg-brand); border-radius: 999px; padding: 9px 22px; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; }
.pg-btn:hover { background: var(--pg-brand-dark); border-color: var(--pg-brand-dark); }
.pg-btn:focus-visible { outline: 3px solid var(--pg-ink); outline-offset: 2px; }
.pg-btn[disabled] { opacity: .65; cursor: default; }
.pg-btn-ghost { background: #fff; color: var(--pg-brand) !important; }
.pg-btn-ghost:hover { background: var(--pg-soft); color: var(--pg-brand-dark) !important; }

.pg-prose { font-size: 17px; line-height: 1.8; max-width: 820px; }
.pg-prose h2 { font-size: 22px; font-weight: 700; margin: 30px 0 10px; }
.pg-prose ul { padding-inline-start: 22px; }
.pg-prose li { margin-bottom: 6px; }
.pg-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.pg-contact-lines { list-style: none; padding: 0; }

.pg-tabs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pg-tabs a { padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--pg-line); background: #fff; color: var(--pg-ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.pg-tabs a.on { background: var(--pg-brand); border-color: var(--pg-brand); color: #fff; }

.pg-callout { display: flex; gap: 10px; align-items: flex-start; background: var(--pg-soft); border-radius: 10px; padding: 12px 14px; font-size: 15px; margin: 14px 0 0; }
.pg-callout i { color: var(--pg-brand); font-size: 18px; line-height: 1.4; }
.pg-callout p { margin: 0; }
.pg-callout-alert { background: #fdecec; border: 1px solid #f3b4b4; margin: 0 0 22px; }
.pg-callout-alert i { color: #9b1c1c; }
.pg-callout-alert p { font-size: 17px; font-weight: 500; }

/* --- item cards (news, events, posts) --------------------------------------------------- */
.pg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pg-item { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pg-item-img { width: 100%; height: 170px; object-fit: cover; display: block; }
.pg-item-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.pg-item-when { color: var(--pg-muted); font-size: 15px; margin: 0; }
.pg-item-title { font-size: 19px; line-height: 1.4; margin: 0; }
.pg-item-title a { color: var(--pg-ink); text-decoration: none; }
.pg-item-title a:hover, .pg-item-title a:focus-visible { color: var(--pg-brand); text-decoration: underline; }
.pg-item-brief { margin: 0; font-size: 16px; color: #3c4450; line-height: 1.6; }
.pg-item-where { margin: 0; font-size: 15px; color: var(--pg-muted); }
.pg-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; font-size: 15px; color: var(--pg-muted); }

.pg-article { max-width: 820px; }
.pg-article-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--pg-radius); margin: 8px 0 18px; }

/* --- staff ------------------------------------------------------------------------------ */
.pg-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pg-person { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); padding: 16px; }
.pg-people-compact .pg-person { background: var(--pg-soft); border: 0; }
.pg-person img, .pg-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.pg-avatar { display: grid; place-items: center; background: #e2eff5; color: var(--pg-brand-dark); font-weight: 700; font-size: 22px; }
.pg-person h3 { font-size: 17px; margin: 0 0 2px; font-weight: 600; }
.pg-role { margin: 0 0 6px; color: var(--pg-muted); font-size: 15px; }
.pg-reach { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.pg-reach li { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; overflow-wrap: anywhere; }
.pg-reach i { color: var(--pg-muted); }

/* --- contact ---------------------------------------------------------------------------- */
.pg-contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; align-items: start; }
@media (max-width: 991.98px) { .pg-contact { grid-template-columns: 1fr; } }
.pg-contact-details dl { margin: 0; }
.pg-contact-details dl > div { padding: 10px 0; border-bottom: 1px solid var(--pg-line); }
.pg-contact-details dt { font-size: 15px; color: var(--pg-muted); font-weight: 500; }
.pg-contact-details dd { margin: 2px 0 0; font-size: 17px; }
.pg-map { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pg-map p { margin: 0; font-weight: 600; }
.pg-map iframe { width: 100%; height: 300px; border: 0; border-radius: 12px; }

.pg-form .pg-field { margin-bottom: 14px; }
.pg-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.pg-form input, .pg-form textarea { width: 100%; font: inherit; font-size: 16px; border: 1.5px solid #b9c7d0; border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--pg-ink); }
.pg-form input:focus, .pg-form textarea:focus { outline: none; border-color: var(--pg-brand); box-shadow: 0 0 0 3px rgba(0, 113, 159, .2); }
.pg-form [aria-invalid="true"] { border-color: #b42318; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 575.98px) { .pg-two { grid-template-columns: 1fr; } }
/* the honeypot: out of sight without an offset - a negative offset scrolls an RTL page sideways */
.pg-hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.pg-form-msg { font-size: 16px; font-weight: 500; margin: 0 0 12px; }
.pg-form-msg:empty { display: none; }
.pg-form-msg.ok { color: #0b5d3b; background: #e6f6ee; padding: 10px 14px; border-radius: 10px; }
.pg-form-msg.err { color: #8a1c13; background: #fdecec; padding: 10px 14px; border-radius: 10px; }
.pg-privacy { color: var(--pg-muted); font-size: 15px; margin: 14px 0 0; }

/* --- forms (files) ---------------------------------------------------------------------- */
.pg-files { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); }
.pg-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--pg-line); flex-wrap: wrap; }
.pg-files li:last-child { border-bottom: 0; }
.pg-files a { display: inline-flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 500; color: var(--pg-brand); text-decoration: none; }
.pg-files a:hover, .pg-files a:focus-visible { text-decoration: underline; }
.pg-file-meta { color: var(--pg-muted); font-size: 15px; }

/* --- gallery ---------------------------------------------------------------------------- */
.pg-albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pg-album { padding: 0; overflow: hidden; }
.pg-album a { display: flex; flex-direction: column; color: var(--pg-ink); text-decoration: none; height: 100%; }
.pg-album img, .pg-album-blank { width: 100%; height: 170px; object-fit: cover; display: grid; place-items: center; background: var(--pg-soft); color: var(--pg-muted); font-size: 34px; }
.pg-album-title { font-size: 17px; font-weight: 600; padding: 12px 14px 2px; }
.pg-album-meta { font-size: 15px; color: var(--pg-muted); padding: 0 14px 14px; }
.pg-album a:hover .pg-album-title, .pg-album a:focus-visible .pg-album-title { color: var(--pg-brand); text-decoration: underline; }
.pg-photos { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pg-photos figure { margin: 0; }
.pg-photos img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; display: block; }
.pg-photos figcaption { font-size: 15px; color: var(--pg-muted); margin-top: 6px; }

/* --- search ----------------------------------------------------------------------------- */
.pg-search-big { margin-bottom: 26px; max-width: 720px; }
.pg-search-big label { display: block; font-weight: 600; margin-bottom: 8px; }
.pg-search-big > div { display: flex; gap: 10px; }
.pg-search-big input { flex: 1; font-size: 17px; border: 1.5px solid #b9c7d0; border-radius: 999px; padding: 10px 18px; min-width: 0; }
.pg-results { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.pg-results li { padding: 14px 0; border-bottom: 1px solid var(--pg-line); }
.pg-results a { font-size: 18px; font-weight: 600; color: var(--pg-brand); }
.pg-results p { margin: 4px 0 0; color: #3c4450; font-size: 15px; }
.pg-result-kind { display: inline-block; font-size: 14px; color: var(--pg-brand-dark); background: #e2eff5; border-radius: 999px; padding: 1px 10px; margin-inline-end: 8px; }

/* --- emergency -------------------------------------------------------------------------- */
.pg-emergency { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 991.98px) { .pg-emergency { grid-template-columns: 1fr; } }
.pg-feed { margin-bottom: 16px; }
.pg-feed h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.pg-feed ul { margin: 0; padding-inline-start: 20px; }
.pg-feed p { margin: 2px 0 8px; color: #3c4450; font-size: 15px; }
.pg-links { list-style: none; margin: 0; padding: 0; }
.pg-links li { padding: 7px 0; border-bottom: 1px solid var(--pg-line); }
.pg-links li:last-child { border-bottom: 0; }
.pg-links a { color: var(--pg-brand); font-weight: 500; }

/* --- principal -------------------------------------------------------------------------- */
.pg-principal { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 34px; }
.pg-principal img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; flex: none; }
@media (max-width: 575.98px) { .pg-principal { flex-direction: column; align-items: center; } }
.pg-sign { margin-top: 16px; }

/* --- list placeholders on builder pages (portal/lists.js) ------------------------------- */
.pg-gateway { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.pg-gateway a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); padding: 18px 10px; min-height: 112px;
  color: var(--pg-ink); text-decoration: none; font-size: 16px; font-weight: 600; transition: border-color .15s, transform .15s; }
.pg-gateway a i { font-size: 26px; color: var(--pg-brand); }
.pg-gateway a:hover, .pg-gateway a:focus-visible { border-color: var(--pg-brand); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .pg-gateway a { transition: none; } .pg-gateway a:hover { transform: none; } }
/* a phone keeps two tiles a row: ten tiles one under the other push the news a screen and a half down */
@media (max-width: 575.98px) {
  .pg-gateway { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pg-gateway a { min-height: 92px; padding: 14px 8px; font-size: 15px; }
  .pg-gateway a i { font-size: 22px; }
}

/* --- footer additions ------------------------------------------------------------------- */
.footer-contact-list li i { color: #9fc9de; margin-inline-end: 4px; }
.footer-contact-list li a { color: #d0e0ee; }
.footer-bottom { display: block; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; font-size: 15px; color: #c9d6e2; }
.footer-bottom a { color: #d0e0ee; }
.footer-nav-list li a { font-size: 15px; }

/* --- site map / not found --------------------------------------------------------------- */
.pg-sitemap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 767.98px) { .pg-sitemap { grid-template-columns: 1fr; } }
.pg-sitemap ul { font-size: 16px; line-height: 1.9; margin: 0; }
.pg-notfound { padding-top: 40px; }
.pg-notfound h1 { font-size: 30px; font-weight: 700; }
.pg-notfound .pg-gateway { margin: 24px 0; }
.pg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pg-list-empty { padding: 18px; border: 1px dashed #c5d2da; border-radius: 12px; color: #5b6573; font-size: 15px; }

/* --- closed spaces (portal/spaces.js) ---------------------------------------------------- */
.pg-login { max-width: 640px; }
.pg-login .pg-btn { margin: 8px 0; }
.pg-sessionbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px;
  background: #fff; border: 1px solid var(--pg-line); border-radius: 12px; padding: 10px 16px; margin-bottom: 22px; font-size: 15px; }
.pg-sessionbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.pg-sessionbar a { color: var(--pg-brand); font-weight: 500; }
.pg-join { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pg-join .pg-field { margin: 0; min-width: 220px; }
.pg-space { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 991.98px) { .pg-space { grid-template-columns: 1fr; } }
.pg-space-side { display: flex; flex-direction: column; gap: 18px; }
.pg-feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pg-feed-list h3 { font-size: 18px; margin: 2px 0 8px; }
.pg-compose { margin-bottom: 16px; }
.pg-compose summary, .pg-thread summary { cursor: pointer; font-weight: 600; color: var(--pg-brand); }
.pg-thread { margin-bottom: 14px; }
.pg-reply { border-inline-start: 3px solid var(--pg-line); padding-inline-start: 14px; margin: 10px 0; }
.pg-inline-form { display: inline; }
.pg-linkbtn { background: none; border: 0; color: #8a1c13; text-decoration: underline; font-size: 15px; cursor: pointer; padding: 0; }
.pg-timetable table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pg-timetable th, .pg-timetable td { border: 1px solid var(--pg-line); padding: 6px 8px; text-align: center; }
.pg-body-gap { height: 18px; }
.pg-space-main > .pg-prose { max-width: none; margin-bottom: 26px; }
