/* page.css - styles for CMS pages (standard and legal templates), grouped by page section. Shared sections (header, footer, etc.) are identical on every page. */

/* ===== 01. BASE: TOKENS, RESET, LAYOUT, BUTTONS, TAGS, ICON TILES ===== */
:root {
  --c-navy: #1a5aa4;
  --c-navy-dark: #1a5aa4;
  --c-primary: #1a5aa4;
  --c-primary-dark: #154984;
  --c-ink: #0f1f45;
  --c-text: #3d4a6b;
  --c-muted: #6b7690;
  --c-line: #e3e9f3;
  --c-bg: #f4f8fd;
  --c-white: #fff;
  --c-green: #178a4c;
  --c-green-bg: #e3f5ea;
  --c-blue-bg: #e6eefb;
  --c-purple: #6b3fb5;
  --c-purple-bg: #efe9fb;
  --c-orange: #e8891a;
  --c-orange-bg: #fdf0dc;
  --c-red: #e0425a;
  --c-red-bg: #fde8ec;
  --c-teal: #12998f;
  --c-teal-bg: #dff4f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 18px rgba(15, 31, 69, 0.07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: 16px;
  --max-width: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.25; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #4d8dff; outline-offset: 2px; }

.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--c-white); border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; }

.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 32px; height: 32px; }

.section-title { font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); font-weight: 700; }
.section-title--center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2; text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--pill { border-radius: 999px; }
.btn--primary { background: var(--c-primary); color: var(--c-white); }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--outline { background: var(--c-white); border-color: var(--c-primary); color: var(--c-primary); }
.btn--outline:hover { background: var(--c-blue-bg); }
.btn--green { background: var(--c-green); color: var(--c-white); }
.btn--green:hover { background: #0f7340; }
.btn--white { background: var(--c-white); color: var(--c-primary); }
.btn--white:hover { background: var(--c-blue-bg); }
.btn--sm { min-height: 44px; padding: 8px 18px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.875rem; color: var(--c-primary); min-height: 44px; }
.link-arrow:hover { text-decoration: underline; }

/* Tags / chips */
.tag { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; background: #eef1f6; color: var(--c-text); white-space: nowrap; }
.tag--blue { background: var(--c-blue-bg); color: var(--c-primary); }
.tag--green { background: var(--c-green-bg); color: var(--c-green); }

/* Coloured icon tiles (shared by category, benefit and contact cards) */
.icon-box { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--c-blue-bg); color: var(--c-primary); }
.icon-box--square { border-radius: var(--radius); }
.icon-box--blue { background: var(--c-blue-bg); color: var(--c-primary); }
.icon-box--green { background: var(--c-green-bg); color: var(--c-green); }
.icon-box--purple { background: var(--c-purple-bg); color: var(--c-purple); }
.icon-box--orange { background: var(--c-orange-bg); color: var(--c-orange); }
.icon-box--red { background: var(--c-red-bg); color: var(--c-red); }
.icon-box--teal { background: var(--c-teal-bg); color: var(--c-teal); }
.icon-box .icon { width: 28px; height: 28px; }

@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Vertical rhythm between page sections */
.section { padding-block: 20px; }
@media (min-width: 992px) { .section { padding-block: 28px; } }

/* ===== 02. TOP CONTACT BAR ===== */
.topbar { background: var(--c-navy); color: var(--c-white); font-size: 0.8125rem; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-block: 8px; }
.topbar__contact, .topbar__social { display: flex; align-items: center; gap: 20px; }
.topbar a { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; }
.topbar a:hover { text-decoration: underline; }
.topbar__tagline { display: none; font-weight: 500; text-align: center; }

@media (max-width: 575px) { .topbar__social { display: none; } .topbar__inner { justify-content: center; } }
@media (min-width: 992px) { .topbar__tagline { display: block; } }

/* ===== 03. HEADER & PRIMARY NAVIGATION ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-white); border-bottom: 1px solid var(--c-line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; position: relative; }
.site-header__logo img { display: block; width: 56px; height: auto; }
.site-header__toggle { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: none; color: var(--c-primary); }

.site-header__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 12px; padding: 12px var(--gutter) 20px; background: var(--c-white); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); }
.site-header__nav.is-open { display: flex; }
.site-header__nav ul { display: flex; flex-direction: column; }
.site-header__nav li a { display: flex; align-items: center; gap: 6px; min-height: 48px; font-weight: 600; color: var(--c-ink); }
.site-header__nav li a.is-active { color: var(--c-primary); }
.site-header__cta { align-self: flex-start; }

@media (min-width: 992px) {
  .site-header__inner { min-height: 80px; }
  .site-header__logo img { width: 68px; }
  .site-header__toggle { display: none; }
  .site-header__nav { display: flex; position: static; flex: 1; flex-direction: row; align-items: center; justify-content: space-between; padding: 0 0 0 clamp(24px, 6vw, 120px); border: 0; box-shadow: none; }
  .site-header__nav ul { flex-direction: row; gap: clamp(20px, 3.4vw, 52px); margin-inline: auto; }
  .site-header__nav li a { position: relative; min-height: 80px; }
  .site-header__nav li a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--c-primary); }
  .site-header__cta { align-self: center; }
}

/* Categories sub menu: hover/focus on desktop, toggle button on touch + mobile */
.has-submenu { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.has-submenu > a { flex: 1; }
.submenu-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 1.5px solid var(--c-primary); border-radius: var(--radius-sm); background: var(--c-blue-bg); color: var(--c-primary); }
.submenu-toggle .icon { transition: transform 0.2s; }
.has-submenu.is-open .submenu-toggle .icon { transform: rotate(180deg); }
.site-header__nav .submenu { display: none; width: 100%; flex-direction: column; gap: 0; margin: 0; padding-left: 12px; }
.has-submenu.is-open .submenu { display: flex; }
.site-header__nav .submenu a { min-height: 44px; font-weight: 500; font-size: 0.9375rem; }
.site-header__nav .submenu a:hover { color: var(--c-primary); }

@media (min-width: 992px) {
  .has-submenu { flex-wrap: nowrap; }
  .has-submenu > a { flex: none; }
  .submenu-toggle { width: 28px; height: 44px; margin-left: -4px; border: 0; background: none; color: var(--c-ink); }
  .site-header__nav .submenu { position: absolute; top: 100%; left: -16px; z-index: 60; width: auto; min-width: 240px; padding: 8px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
  .site-header__nav .submenu a { padding-inline: 12px; border-radius: var(--radius-sm); }
  .site-header__nav .submenu a:hover { background: var(--c-blue-bg); }
  .has-submenu:hover .submenu, .has-submenu:focus-within .submenu { display: flex; }
}

/* ===== 04. HERO BAND ===== */
/* Section: tinted hero band shared by Home, Jobs, Categories, Category detail and Contact.
   Product photo (.page-hero__media) sits on the right and fades into the tint; hidden on small screens. */
.page-hero { position: relative; overflow: hidden; background: linear-gradient(100deg, #eaf2fc 0%, #dbe9f9 55%, #cfe3f6 100%); }
.page-hero__media { display: none; position: absolute; top: 0; right: 0; width: min(50%, 720px); height: 100%; object-fit: cover; object-position: right center; -webkit-mask-image: linear-gradient(to right, transparent, #000 30%); mask-image: linear-gradient(to right, transparent, #000 30%); pointer-events: none; }
.page-hero__inner { position: relative; z-index: 1; padding-block: 28px; }
.page-hero__title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
.page-hero__lead { max-width: 520px; margin-top: 12px; color: var(--c-ink); }
.page-hero .breadcrumb { margin-top: 10px; }

@media (min-width: 768px) { .page-hero__media { display: block; width: 45%; } }
@media (min-width: 992px) { .page-hero__inner { padding-block: 40px; } }

/* ===== 05. BREADCRUMB ===== */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.875rem; color: var(--c-ink); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: ""; width: 6px; height: 6px; border: solid var(--c-muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.breadcrumb a { display: inline-block; padding-block: 4px; }
.breadcrumb a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--c-text); }

/* ===== 06. RICH TEXT (CMS and legal pages) ===== */
.rich-text { max-width: 820px; font-size: 1rem; line-height: 1.7; }
.rich-text > :first-child { margin-top: 0; }
.rich-text h2 { margin: 1.6em 0 0.5em; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }
.rich-text h3 { margin: 1.4em 0 0.4em; font-size: 1.125rem; }
.rich-text h4 { margin: 1.2em 0 0.4em; font-size: 1rem; }
.rich-text p, .rich-text ul, .rich-text ol, .rich-text blockquote, .rich-text table { margin: 0 0 1em; }
.rich-text ul, .rich-text ol { padding-left: 1.5em; }
.rich-text ul { list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text li + li { margin-top: 0.35em; }
.rich-text a { color: var(--c-primary); text-decoration: underline; overflow-wrap: anywhere; }
.rich-text blockquote { padding: 12px 18px; border-left: 3px solid var(--c-primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--c-bg); }
.rich-text hr { margin: 2em 0; border: 0; border-top: 1px solid var(--c-line); }
.rich-text table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 0.9375rem; }
.rich-text th, .rich-text td { padding: 8px 12px; border: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.rich-text th { background: var(--c-bg); color: var(--c-ink); }

/* ===== 07. FAQ (native details/summary accordion) ===== */
.faq { max-width: 880px; }
.faq__list { display: grid; gap: 10px; margin-top: 16px; }
.faq__item { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 14px 18px; font-weight: 600; color: var(--c-ink); cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { color: var(--c-primary); transition: transform 0.2s; }
.faq__item[open] summary .icon { transform: rotate(180deg); }
.faq__answer { padding: 0 18px 16px; font-size: 0.9375rem; }

@media (prefers-reduced-motion: reduce) { .faq__item summary .icon { transition: none; } }

/* ===== 08. FOOTER ===== */
.site-footer { background: var(--c-navy-dark); color: #cfd8ee; font-size: 0.875rem; }
.site-footer__grid { display: grid; gap: 28px 24px; grid-template-columns: 1fr 1fr; padding-block: 36px 28px; }
.site-footer__brand { grid-column: 1 / -1; max-width: 340px; }
.site-footer__brand img { display: block; width: 72px; height: auto; margin-bottom: 8px; }
.site-footer__brand p { margin-bottom: 14px; }
.site-footer__social { display: flex; gap: 8px; }
.site-footer__title { margin-bottom: 12px; font-size: 0.9375rem; color: var(--c-white); }
.site-footer a:hover { color: var(--c-white); text-decoration: underline; }
.site-footer li a { display: inline-block; padding-block: 5px; }
.site-footer .site-footer__social a { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.site-footer__cols { display: grid; grid-template-columns: 1fr; column-gap: 24px; }
.site-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.8125rem; }
.site-footer__bar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-block: 14px; }
.site-footer__bar span { margin-inline: 10px; opacity: 0.5; }

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.3fr 0.8fr 1.6fr 1fr; }
  .site-footer__brand { grid-column: auto; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
}

/* Live site: one-message pages (404, job alert confirm and unsubscribe). */
.status-page { display: grid; place-items: center; min-height: 55vh; padding-block: 48px; text-align: center; }
.status-page__inner { max-width: 600px; }
.status-page__icon { margin: 0 auto 16px; }
.status-page h1 { margin-bottom: 8px; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.status-page p { color: var(--c-text); }
.status-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
