/*
  Shared design tokens, header, footer, buttons and page-shell for the
  Bootstrap 5 template pages (home-template.php, contact.php,
  support/index.php, about/index.php, and future conversions).
  Page-specific stylesheets (e.g. home-template.css) only contain styles
  unique to that page's sections and should link this file first.
*/

:root {
  --ink: #183a52;
  --teal: #236d76;
  --teal-dark: #15535b;
  --orange: #f29a25;
  --mist: #f3f7f7;
  --line: #d8e1e3;
  --white: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: #254153;
  background: #fff;
  font: 16px/1.6 "Segoe UI", Arial, sans-serif;
}

.page-shell { width: min(1120px, calc(100% - 48px)); margin: auto; }

.skip-link { position: absolute; left: -9999px; z-index: 10; padding: 10px 14px; background: #fff; color: var(--ink); }
.skip-link:focus { left: 12px; top: 12px; }

.eyebrow { margin: 0; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 76px; align-items: center; gap: 34px; }
.brand img { display: block; width: 134px; height: auto; }
.primary-nav { display: flex; gap: 27px; margin-left: auto; align-items: center; }
.primary-nav a, .text-link, .template-footer a { color: var(--ink); font-weight: 600; text-decoration: none; }
.primary-nav a:hover, .text-link:hover, .template-footer a:hover { color: var(--teal); text-decoration: underline; }
.primary-nav a[aria-current="page"] { color: var(--teal); }
.nav-menu { position: relative; }
.nav-menu summary { cursor: pointer; color: var(--ink); font-weight: 600; list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: "⌄"; margin-left: 5px; color: var(--teal); }
.nav-menu-panel { position: absolute; top: 32px; left: -18px; display: grid; min-width: 190px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 24px #183a5220; }
.nav-menu-panel a { padding: 7px 0; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.mobile-menu nav { position: absolute; right: 24px; top: 64px; display: grid; min-width: 230px; padding: 12px; background: #fff; box-shadow: 0 8px 22px #183a5230; }
.mobile-menu nav a { padding: 9px; color: var(--ink); text-decoration: none; }
.mobile-menu nav a[aria-current="page"] { color: var(--teal); }
.mobile-menu-label { padding: 12px 9px 3px; color: var(--teal); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Buttons */
.button { display: inline-block; padding: 12px 20px; border: 1px solid var(--teal); border-radius: 2px; background: var(--teal); color: #fff; font-weight: 700; text-decoration: none; transition: .2s; }
.button:hover, .button:focus { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.button-small { padding: 9px 14px; }
.button-secondary { background: #fff; color: var(--teal); }
.button-secondary:hover, .button-secondary:focus { background: var(--mist); color: var(--teal-dark); }
.button-light { background: #fff; border-color: #fff; color: var(--teal); }
.button-light:hover, .button-light:focus { background: #f2f6f5; border-color: #f2f6f5; color: var(--teal-dark); }

/* Bulleted list with a small teal dot marker, used across content pages */
.dot-list { list-style: none; padding-left: 0; }
.dot-list li { position: relative; margin-bottom: .7rem; padding-left: 1.5rem; }
.dot-list li::before { content: "•"; position: absolute; left: 0; top: 0; color: var(--teal); font-size: 1.2rem; line-height: 1.3; }

/* Reusable "trust band" stat strip (Scientist-led / ISO 9001 / Worldwide, etc.) */
.proof-section { background: var(--ink); color: #fff; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 38px; padding: 48px 0; }
.proof-grid div { display: grid; gap: 5px; }
.proof-grid strong { color: #f6bc58; font-size: 1.4rem; }
.proof-grid span { max-width: 250px; font-size: .95rem; }

/* Reusable closing "talk to us" call-to-action band */
.contact-band { padding: 64px 0; background: var(--teal); }
.contact-band-inner { display: flex; justify-content: space-between; align-items: center; gap: 36px; }
.contact-band .eyebrow { color: #f7bc55; }
.contact-band h2 { max-width: 700px; margin-bottom: 0; color: #fff; }

/* Reusable logo grid (research collaborators, partner organisations, etc.) */
.collaborator-logos { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; gap: 22px; }
.collaborator-logos a { display: flex; align-items: center; justify-content: center; min-height: 114px; padding: 18px; border: 1px solid var(--line); background: #fff; }
.collaborator-logos img { display: block; max-width: 100%; max-height: 70px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .82; transition: .2s; }
.collaborator-logos a:hover img { filter: none; opacity: 1; }

/* Footer */
.template-footer { padding: 32px 0; background: #f6f8f8; }
.footer-inner { display: flex; align-items: center; gap: 28px; font-size: .9rem; }
.footer-inner img { width: 95px; height: auto; }
.footer-inner p { margin: 0; }
.footer-inner div { display: flex; flex-wrap: wrap; gap: 17px; margin-left: auto; }

@media (max-width: 850px) {
  .primary-nav, .header-actions { display: none; }
  .mobile-menu { display: block; }
  .proof-grid { gap: 20px; }
  .collaborator-logos { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .footer-inner div { width: 100%; margin-left: 0; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 32px, 1120px); }
  .header-inner { min-height: 65px; }
  .brand img { width: 116px; }
  .proof-grid { grid-template-columns: 1fr; padding: 36px 0; }
  .collaborator-logos { grid-template-columns: 1fr; gap: 12px; }
  .collaborator-logos a { min-height: 96px; }
  .contact-band-inner { display: block; }
  .contact-band { padding: 50px 0; }
  .contact-band .button { margin-top: 24px; }
  .footer-inner { gap: 13px; }
}
