* { box-sizing: border-box; }
body {
  font-family: Arial, sans-serif; margin: 0; padding: 0; line-height: 1.6;
  background: #f4f7fb; color: #1f2933;
}
.navbar {
  background: #031b34; color: white; padding: 14px 20px; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-container {
 max-width: 1400px; margin: 0 auto; padding-left: 0; padding-right: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.nav-brand {
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  background: none;
  width: auto;
  height: auto;
}

.nav-brand::before {
  content: "";
  display: inline-block;
  width: 36px;
  height: 36px;
  background-image: image-set(url('rb-small-logo.webp') type('image/webp') 1x, url('rb-small-logo.png') 1x);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.nav-brand:focus {
  outline: 2px solid #9ff3f0;
  outline-offset: 2px;
}
.nav-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  color: white; text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 10px; border-radius: 4px; display: inline-flex; align-items: center; min-height: 44px;
}
.nav-links a:hover { color: #9ff3f0; background: rgba(159,243,240,0.1); }
.nav-links a.active { background: rgba(159,243,240,0.2); color: #9ff3f0; }

.consultation-link { background: #d4a017; color: white !important; font-weight: 700 !important; border-radius: 6px; }
.consultation-link:hover { background: #c89510; color: white !important; }

header {
  background: linear-gradient(135deg, #062b55, #0b7285);
  color: white; padding: 30px 20px; text-align: center;
}
header img {
  display: block; margin: 0 auto 20px; max-width: 85%; height: auto; max-height: 200px; object-fit: contain;
}
header h1 { font-size: 42px; margin: 10px 0; }
header p { font-size: 20px; max-width: 850px; margin: 0 auto 24px; }

.hero-cta { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: white; color: #062b55; padding: 13px 24px; text-decoration: none; border-radius: 6px; font-weight: bold; min-height: 44px;
}
.btn:hover { background: #f0f0f0; }

section { max-width: 1150px; margin: auto; padding: 25px 20px; }
h1,h2,h3 { color: #062b55; }
/* Ensure headings outside the header use the site-blue even if cached header-adjacent rules persist */
:not(header) h1, :not(header) h2, :not(header) h3 { color: #062b55 !important; }

h2 { font-size: 32px; margin-bottom: 20px; }
.intro { font-size: 19px; max-width: 900px; }

.why-grid {
  max-width: 1150px; margin: 10px auto 30px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; padding: 0 20px;
}
.why-card {
  background: white; padding: 25px; border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08); border-top: 5px solid #0b7285;
}
.why-card h3 { margin-top: 0; }

.services {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px;
}
.card, .panel, .team-card, .contact-box, .resource-card {
  background: white; padding: 24px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,.08);
}
.card { border-left: 6px solid #0b7285; }
.card ul { list-style: none; padding-left: 0; }
.card li { padding-left: 24px; position: relative; margin-bottom: 10px; }
.card li::before { content: "✓"; position: absolute; left: 0; color: #0b7285; font-weight: bold; }

.team-card { display: flex; gap: 24px; align-items: flex-start; }
.team-photo { width: 180px; max-width: 180px; border-radius: 12px; background: #eef2f7; }

.contact-box { background: #062b55; color: #fff; text-align: center; }
.contact-box h2 { color: #fff; }
.contact-box a { color: #9ff3f0; font-weight: bold; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap:20px; }
.meta { font-size: 13px; color: #4b5b6a; margin-bottom: 8px; }
.resource-list a { display:block; margin-bottom:8px; color:#0b7285; text-decoration:none; font-weight:600; }
.resource-list a:hover { text-decoration: underline; }

footer { background: #031b34; color: white; text-align: center; padding: 30px 20px; margin-top: 20px; }
footer h3 { color: #ffffff !important; font-weight: 700; }

@media (max-width: 768px) {
  header h1 { font-size: 34px; }
  header p { font-size: 18px; }
  .team-card { flex-direction: column; align-items: center; text-align: center; }
  .team-photo { width: 140px; }
}
/* CONSOLIDATED NAV / HEADER RULES (moved from per-page inline styles) */
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; padding: 8px; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; }

/* Desktop: keep dropdown hidden until opened */
.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  background: #031b34;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 1200;
  padding: 8px;
}

/* Show when the dropdown is opened */
.nav-dropdown.open .nav-dropdown-content { display: block; }

/* Dropdown links (hover/focus styling preserved); mobile stacking handled in media query */
.nav-dropdown-content a { display: flex; align-items: center; color: white; text-decoration: none; padding: 10px 12px; border-radius: 4px; min-height: 44px; }
.nav-dropdown-content a:hover, .nav-dropdown-content a:focus { background: rgba(159,243,240,0.08); color: #9ff3f0; }

/* Keep headings inside the header white; sections should control their own h2 color */
/* Headings within the header element remain white */
header h1, header h2, header h3 { color: white !important; font-weight: 700; }

@media (max-width: 1250px) {
  .nav-brand { font-size: 15px; }
  .nav-links a, .nav-dropbtn { font-size: 14px; padding: 8px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-brand { font-size: 14px; margin-right: 0; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #031b34;
    padding: 20px;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 0;
  }

  .nav-links.open { display: flex; max-height: 900px; align-items: flex-start; text-align: left; }
  .nav-links a { justify-content: flex-start; }
  .nav-dropdown { width: 100%; }
  .nav-dropbtn { width: 100%; text-align: left; justify-content: flex-start; }
  .nav-dropdown-content { position: static; min-width: 100%; box-shadow: none; margin-top: 6px; background: rgba(255,255,255,0.04); }
  header h1 { font-size: 32px; }
  header p { font-size: 18px; }
  section { padding: 20px 16px; }
  h2 { font-size: 26px; margin-bottom: 16px; }
  .intro { font-size: 16px; }
  .highlight { padding: 24px; }
}
/* Ensure header page titles stay white and bold over the gradient header */
header h1, header h2, header h3 { color: white !important; font-weight: 700; }

/* Force headings within content sections to use the site blue so content areas remain readable. */
section h1, section h2, section h3 { color: #062b55 !important; }
section .contact-box h2,
section .contact-box h3 { color: #ffffff !important; }

/* Coloured call-to-action panels need explicit contrast after page heading rules. */
.cta-section,
.article-cta,
.belief-box {
  color: #ffffff;
}

.cta-section h1,
.cta-section h2,
.cta-section h3,
.cta-section h4,
.cta-section p,
.article-cta h1,
.article-cta h2,
.article-cta h3,
.article-cta h4,
.article-cta p,
.belief-box h1,
.belief-box h2,
.belief-box h3,
.belief-box h4,
.belief-box p {
  color: #ffffff !important;
}

.cta-section a:not(.cta-button),
.article-cta a:not(.cta-button),
.belief-box a {
  color: #9ff3f0;
}

/* Shared navigation: loaded after page-specific styles to keep every menu consistent. */
.navbar {
  background: #ffffff;
  color: #062b55;
  padding: 8px 20px;
  border-bottom: 1px solid #d9e4ed;
  box-shadow: 0 3px 14px rgba(3, 27, 52, 0.12);
}

.nav-container {
  max-width: 1200px;
  flex-wrap: nowrap;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand::before {
  content: none;
}

.nav-brand img {
  display: block;
  width: 210px;
  height: auto;
}

.nav-brand:hover { background: #eef7f8; }
.nav-brand:focus { outline: 2px solid #0b7285; outline-offset: 2px; }
.nav-toggle { color: #062b55; font-size: 0; }
.nav-toggle::before { content: "\2630"; font-size: 24px; }

@media (min-width: 1500px) {
  .nav-brand { transform: translateX(-80px); }
}

.nav-links {
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
}

.nav-links a,
.nav-dropbtn {
  color: #062b55;
  font-size: 14px;
}

.navbar .nav-dropbtn {
  appearance: none;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #062b55;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.nav-dropbtn::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropbtn::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.nav-links a:hover,
.nav-dropbtn:hover,
.nav-dropbtn:focus {
  color: #0b7285;
  background: #eef7f8;
}

.nav-links a.consultation-link {
  color: #031b34 !important;
  background: #d4a017;
}

.consultation-link:hover { background: #e5b536; color: #031b34 !important; }

.nav-dropdown-content {
  background: #ffffff;
  border: 1px solid #d9e4ed;
  box-shadow: 0 8px 20px rgba(3, 27, 52, 0.16);
}

.nav-dropdown-content a { color: #062b55; }
.nav-dropdown-content a:hover,
.nav-dropdown-content a:focus {
  color: #0b7285;
  background: #eef7f8;
}

@media (max-width: 768px) {
  .nav-container { flex-wrap: wrap; }
  .nav-brand img { width: 190px; }

  .nav-links {
    top: 66px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(3, 27, 52, 0.16);
  }

  .nav-dropdown-content,
  .nav-dropdown .nav-dropdown-content {
    background: #eef7f8;
    border: 0;
  }
}

/* Shared inner-page hero treatment. */
header:not(.home-hero):not(.services-hero) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 280px;
  padding: clamp(46px, 6vw, 78px) 20px;
  text-align: left;
  background:
    radial-gradient(circle at 80% 32%, rgba(8, 183, 188, 0.45), transparent 24%),
    linear-gradient(115deg, #031b34 0%, #062b55 56%, #075d72 100%);
}

header:not(.home-hero):not(.services-hero)::before,
header:not(.home-hero):not(.services-hero)::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

header:not(.home-hero):not(.services-hero)::before {
  width: 440px;
  height: 440px;
  right: -110px;
  bottom: -270px;
  border: 1px solid rgba(159, 243, 240, 0.3);
  box-shadow: 0 0 0 46px rgba(159, 243, 240, 0.05), 0 0 0 98px rgba(159, 243, 240, 0.04);
}

header:not(.home-hero):not(.services-hero)::after {
  width: 300px;
  height: 300px;
  right: 12%;
  top: -215px;
  background: rgba(212, 160, 23, 0.13);
}

header:not(.home-hero):not(.services-hero) > img { display: none; }

header:not(.home-hero):not(.services-hero) h1,
header:not(.home-hero):not(.services-hero) p {
  width: min(1150px, 100%);
  margin-right: auto;
  margin-left: auto;
  text-align: left;
}

header:not(.home-hero):not(.services-hero) h1 {
  color: #ffffff !important;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

header:not(.home-hero):not(.services-hero) p {
  max-width: 1150px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
}

header.service-detail-hero .hero-kicker {
  display: flex;
  width: min(790px, 100%);
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 12px;
  margin-right: auto;
  margin-left: auto;
  color: #9ff3f0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

header.service-detail-hero .hero-kicker::before {
  content: "";
  width: 38px;
  height: 2px;
  background: #d4a017;
}

/* Article titles remain full-width even when their reading content is constrained. */
.article-container > article > .article-header,
.article-container > .article-header {
  position: relative;
  width: 100vw;
  min-height: 280px;
  margin: 0 calc(50% - 50vw) 42px;
  padding: clamp(46px, 6vw, 78px) max(20px, calc((100vw - 900px) / 2));
  overflow: hidden;
  color: #ffffff;
  border-bottom: 0;
  background:
    radial-gradient(circle at 80% 32%, rgba(8, 183, 188, 0.45), transparent 24%),
    linear-gradient(115deg, #031b34 0%, #062b55 56%, #075d72 100%);
}

.article-container > article > .article-header h1,
.article-container > article > .article-header h2,
.article-container > article > .article-header h3,
.article-container > .article-header h1,
.article-container > .article-header h2,
.article-container > .article-header h3 {
  color: #ffffff !important;
}

.article-container > article > .article-header .article-meta,
.article-container > .article-header .article-meta {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
  header:not(.home-hero):not(.services-hero) {
    min-height: 0;
    padding: 48px 24px;
  }
}
