/* ============================================================
   BIM SAFETY GROUP — MASTER STYLESHEET
   Brand: navy #001c52 | red #ba012b | white
   Compatible with the modular BIM Safety includes and legacy
   BIM Electrical page classes during migration.
   ============================================================ */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f7fb;
  --ink: #1f2937;
  --muted: #5f6b7a;
  --green: #ba012b;
  --green-soft: rgba(186,1,43,.12);
  --green-line: rgba(186,1,43,.34);
  --primary: #001c52;
  --primary-soft: rgba(0,28,82,.06);
  --primary-line: rgba(0,28,82,.16);
  --white-soft: rgba(0,28,82,.035);
  --white-line: rgba(0,28,82,.10);
  --max: 1180px;
  --radius: 24px;
  --shadow: 0 18px 45px rgba(0,28,82,.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

main {
  background: #ffffff;
}

/* =========================
   HEADER
========================= */

.top-strip {
  background: var(--primary);
  border-bottom: 1px solid rgba(186,1,43,.28);
  color: rgba(255,255,255,.86);
  font-size: 14px;
}

.top-strip .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.top-strip a {
  color: var(--green);
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,28,82,.12);
  box-shadow: 0 10px 28px rgba(0,28,82,.06);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand img {
  width: 250px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 900;
  color: #4b5563;
}

.main-nav a {
  transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.menu-toggle {
  display: none;
  background: #fff;
  color: var(--primary);
  border: 1px solid rgba(0,28,82,.22);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 24px;
  cursor: pointer;
}

/* =========================
   BUTTONS
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(186,1,43,.35);
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
  box-shadow: 0 12px 26px rgba(186,1,43,.28);
}

.btn-dark {
  background: var(--primary);
  color: #ffffff;
  border-color: #fff;
  border: 4px solid #fff;
}

.btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================
   HEROES
========================= */

.hero-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,28,82,.78) 0%, rgba(0,28,82,.52) 40%, rgba(0,28,82,.08) 100%),
    url('/assets/img/hero/home-background.jpg');
  background-size: cover;
  background-position: center right;
  border-bottom: 1px solid rgba(0,28,82,.12);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px 20px 95px;
  min-height: 680px;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 720px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 20px 64px;
  border-bottom: 1px solid rgba(0,28,82,.12);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero .lead {
  color: #4b5563;
  font-size: clamp(18px, 2vw, 22px);
  max-width: 680px;
  margin: 0 0 28px;
}

.eicr-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/eicr-background.jpg');
}

.remedials-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/eicr-remedial-works-background.jpg');
}

.fire-alarms-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/fire-alarms-background.jpg');
}

.emergency-lighting-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/emergency-lighting-background.jpg');
}

.consumer-units-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/consumer-units-background.jpg');
}

.landlord-eicr-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/landlords-background.jpg');
}

.commercial-eicr-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/commercial-background.jpg');
}

.contact-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/contact-background.jpg');
}

.about-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/home-background.jpg');
}

.eicr-london-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/eicr-london-background.jpg');
}

.eicr-essex-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/eicr-essex-background.jpg');
}

.areas-hero {
  background:
    linear-gradient(90deg, rgba(0,28,82,.88), rgba(0,28,82,.58)),
    url('/assets/img/hero/areas-background.jpg');
}

.eicr-renewal-hero {
  background:
    linear-gradient(
      90deg,
      rgba(0,28,82,.88),
      rgba(0,28,82,.58)
    ),
    url('/assets/img/hero/eicr-renewal-background.jpg');
}

/* =========================
   TYPOGRAPHY
========================= */

.eyebrow {
  display: inline-flex;
  color: var(--primary);
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  margin: 0 0 22px;
  letter-spacing: -.055em;
}

h1 span,
h2 span,
h3 span {
  color: var(--green);
}

.lead {
  color: #4b5563;
  font-size: clamp(18px, 2vw, 22px);
  max-width: 680px;
  margin: 0 0 28px;
}

p {
  color: var(--muted);
}

.small-note {
  font-size: 12px;
  color: #666;
  margin: 4px 0 0;
}

/* =========================
   GLOBAL SECTIONS
========================= */

section {
  padding: 58px 20px;
  background: #ffffff;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 30px;
}

.section-head h2,
.section-title h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -.04em;
}

.section-head p,
.section-title p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.section-title {
  max-width: 880px;
  margin: 0 auto 30px;
  text-align: center;
}

/* =========================
   IMAGE SECTION BACKGROUNDS
   Reusable on any <section> element.

   Files:
   /assets/img/backgrounds/section-background-1.jpg
   /assets/img/backgrounds/section-background-2.jpg
   /assets/img/backgrounds/section-background-3.jpg
========================= */

.section-background-1,
.section-background-2,
.section-background-3 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--primary);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.section-background-1 {
  background-image:
    linear-gradient(
      90deg,
      rgba(0, 28, 82, .94),
      rgba(0, 28, 82, .76)
    ),
    url('/assets/img/backgrounds/section-background-1.jpg');
}

.section-background-2 {
  background-image:
    linear-gradient(
      90deg,
      rgba(67, 0, 15, .92),
      rgba(186, 1, 43, .74)
    ),
    url('/assets/img/backgrounds/section-background-2.jpg');
}

.section-background-3 {
  background-image:
    linear-gradient(
      90deg,
      rgba(8, 15, 28, .94),
      rgba(0, 28, 82, .74)
    ),
    url('/assets/img/backgrounds/section-background-3.jpg');
}

.section-background-1 h2,
.section-background-1 h3,
.section-background-1 h4,
.section-background-2 h2,
.section-background-2 h3,
.section-background-2 h4,
.section-background-3 h2,
.section-background-3 h3,
.section-background-3 h4 {
  color: #ffffff;
}

.section-background-1 p,
.section-background-1 li,
.section-background-1 .lead,
.section-background-1 .section-head p,
.section-background-1 .section-title p,
.section-background-2 p,
.section-background-2 li,
.section-background-2 .lead,
.section-background-2 .section-head p,
.section-background-2 .section-title p,
.section-background-3 p,
.section-background-3 li,
.section-background-3 .lead,
.section-background-3 .section-head p,
.section-background-3 .section-title p {
  color: rgba(255, 255, 255, .88);
}

.section-background-1 > .section-inner > .section-head .eyebrow,
.section-background-1 > .section-inner > .section-title .eyebrow,
.section-background-1 > .section-inner > .cta-inner .eyebrow,
.section-background-2 > .section-inner > .section-head .eyebrow,
.section-background-2 > .section-inner > .section-title .eyebrow,
.section-background-2 > .section-inner > .cta-inner .eyebrow,
.section-background-3 > .section-inner > .section-head .eyebrow,
.section-background-3 > .section-inner > .section-title .eyebrow,
.section-background-3 > .section-inner > .cta-inner .eyebrow {
  color: #ffffff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.30);
}

/* Eyebrows inside light cards and panels must retain the standard dark text. */
.section-background-1 .panel .eyebrow,
.section-background-1 .service-card .eyebrow,
.section-background-1 .card .eyebrow,
.section-background-1 .faq-item .eyebrow,
.section-background-2 .panel .eyebrow,
.section-background-2 .service-card .eyebrow,
.section-background-2 .card .eyebrow,
.section-background-2 .faq-item .eyebrow,
.section-background-3 .panel .eyebrow,
.section-background-3 .service-card .eyebrow,
.section-background-3 .card .eyebrow,
.section-background-3 .faq-item .eyebrow {
  color: var(--primary);
  background: var(--green-soft);
  border-color: var(--green-line);
}

.section-background-1 a:not(.btn),
.section-background-2 a:not(.btn),
.section-background-3 a:not(.btn) {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, .55);
}

/* Keep cards light when placed over image backgrounds */

.section-background-1 .service-card,
.section-background-1 .info-card,
.section-background-1 .card,
.section-background-1 .seo-card,
.section-background-1 .area-card,
.section-background-1 .price-card,
.section-background-1 .faq-item,
.section-background-1 .panel,
.section-background-2 .service-card,
.section-background-2 .info-card,
.section-background-2 .card,
.section-background-2 .seo-card,
.section-background-2 .area-card,
.section-background-2 .price-card,
.section-background-2 .faq-item,
.section-background-2 .panel,
.section-background-3 .service-card,
.section-background-3 .info-card,
.section-background-3 .card,
.section-background-3 .seo-card,
.section-background-3 .area-card,
.section-background-3 .price-card,
.section-background-3 .faq-item,
.section-background-3 .panel {
  color: var(--ink);
}

.section-background-1 .service-card p,
.section-background-1 .info-card p,
.section-background-1 .card p,
.section-background-1 .seo-card p,
.section-background-1 .area-card p,
.section-background-1 .price-card p,
.section-background-1 .faq-item p,
.section-background-1 .panel p,
.section-background-2 .service-card p,
.section-background-2 .info-card p,
.section-background-2 .card p,
.section-background-2 .seo-card p,
.section-background-2 .area-card p,
.section-background-2 .price-card p,
.section-background-2 .faq-item p,
.section-background-2 .panel p,
.section-background-3 .service-card p,
.section-background-3 .info-card p,
.section-background-3 .card p,
.section-background-3 .seo-card p,
.section-background-3 .area-card p,
.section-background-3 .price-card p,
.section-background-3 .faq-item p,
.section-background-3 .panel p {
  color: var(--muted);
}

/* =========================
   HOMEPAGE TRUST / PROCESS
========================= */

.hero-actions,
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.trust {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,28,82,.12);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 10px 24px rgba(0,28,82,.08);
}

.trust strong {
  display: block;
  color: var(--primary);
  font-size: 18px;
}

.trust span {
  color: var(--muted);
  font-size: 13px;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(0,28,82,.10);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0,28,82,.06);
}

.step b {
  color: var(--primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.step h3 {
  margin: 10px 0 8px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* =========================
   CARDS / GRIDS
========================= */

.services,
.card-grid,
.grid,
.seo-grid,
.area-grid,
.pricing-grid {
  display: grid;
  gap: 16px;
}

.services,
.card-grid,
.pricing-grid,
.area-grid {
  grid-template-columns: repeat(3, 1fr);
}

.grid,
.seo-grid {
  grid-template-columns: repeat(2, 1fr);
}

.service-card,
.info-card,
.card,
.seo-card,
.area-card,
.price-card,
.faq-item,
.panel {
  background: #ffffff;
  border: 1px solid rgba(0,28,82,.10);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(0,28,82,.06);
}

.service-card,
.info-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover,
.info-card:hover,
.card:hover,
.seo-card:hover,
.area-card:hover {
  background: #ffffff;
  border-color: rgba(186,1,43,.75);
  box-shadow: 0 18px 42px rgba(0,28,82,.10), 0 0 0 3px rgba(186,1,43,.10);
}

.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,28,82,.06);
  color: var(--primary);
  border: 1px solid rgba(0,28,82,.14);
  margin-bottom: 18px;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,28,82,.06);
}

.service-icon i {
  line-height: 1;
}

.service-card h3,
.info-card h3,
.card h3,
.seo-card h3,
.area-card h3,
.price-card h3 {
  margin: 0 0 10px;
  line-height: 1.15;
}

.service-card p,
.info-card p,
.card p,
.seo-card p,
.area-card p,
.price-card p,
.faq-item p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.service-card a,
.info-card a,
.card a,
.seo-card a,
.area-card a,
.content-block a {
  color: var(--primary);
  font-weight: 900;
}

.price-card strong {
  display: block;
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
  margin: 10px 0;
}

/* =========================
   PANELS / SPLITS
========================= */

.split {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
}

.panel {
  border-radius: var(--radius);
  padding: 30px;
}

.panel.green {
  background: linear-gradient(135deg, rgba(0,28,82,.06), rgba(186,1,43,.08));
  border-color: rgba(186,1,43,.40);
}

.panel h2,
.panel h3 {
  margin-top: 0;
  line-height: 1.05;
}

.panel p {
  color: var(--muted);
}

.content-block {
  max-width: 100%;
}

.content-block h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin: 0 0 18px;
}

.content-block h3 {
  margin-top: 28px;
  color: var(--primary);
}

.content-block p,
.content-block li {
  color: var(--muted);
}

/* =========================
   LISTS
========================= */

.check-list,
.ticks {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.check-list li,
.ticks li {
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.check-list li:before {
  content: "✓";
  color: var(--green);
  font-weight: 900;
}

.tick {
  display: inline-flex;
  color: var(--green);
  font-weight: 900;
}

/* =========================
   BREADCRUMBS
========================= */

.breadcrumbs {
  max-width: var(--max);
  margin: 25px auto 0;
  padding: 0 20px;
  font-size: 14px;
  color: #6b7280;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 800;
}

.breadcrumbs .separator {
  margin: 0 8px;
  color: #666;
}

/* =========================
   FAQS
========================= */

.faq,
.faq-grid {
  display: grid;
  gap: 14px;
}

.faq-item {
  min-height: auto;
}

.faq-item h3 {
  margin: 0 0 8px;
  color: var(--primary);
  line-height: 1.2;
}

.faq-item p {
  margin: 0;
}

/* =========================
   CTA BAND
========================= */

.cta-band {
  padding: 48px 20px;
  background:
    linear-gradient(90deg, rgba(0,28,82,.96), rgba(0,28,82,.86)),
    var(--primary);
  border-top: 1px solid rgba(186,1,43,.25);
  border-bottom: 1px solid rgba(186,1,43,.25);
  color: #ffffff;
}

.cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-inner h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.cta-inner p {
  margin: 0;
  color: var(--muted);
}

/* =========================
   TESC BANNER
========================= */

.tesc-banner {
  padding: 34px 20px;
  background: linear-gradient(90deg, rgba(0,28,82,.06), rgba(186,1,43,.10));
  border-top: 1px solid rgba(0,28,82,.10);
  border-bottom: 1px solid rgba(0,28,82,.10);
}

.tesc-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.tesc-inner strong {
  color: var(--primary);
  font-size: 22px;
}

.tesc-inner p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* =========================
   CONTACT FORM
========================= */

.contact-wrap {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 24px;
  align-items: start;
}

.contact-card {
  background: #ffffff;
  color: #111827;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(0,28,82,.14);
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1;
  color: #111;
}

.contact-card p {
  color: var(--muted);
  margin-top: 0;
}

.renewal-booking-card {
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--primary);
  box-shadow: 0 24px 60px rgba(0,28,82,.18);
}

.renewal-booking-card > h2,
.renewal-booking-card > p {
  background: var(--primary);
  color: #fff;
  margin: 0;
  padding: 22px 26px 0;
}

.renewal-booking-card > p {
  padding: 8px 26px 22px;
  color: #fff;
}

.renewal-booking-card form {
  padding: 26px;
}

.renewal-booking-card .price-card {
  background: linear-gradient(135deg, rgba(0,28,82,.08), rgba(186,1,43,.20));
  border: 2px solid rgba(186,1,43,.55);
  border-radius: 18px;
  box-shadow: none;
}

.renewal-booking-card #renewal_price {
  font-size: 40px;
  color: var(--primary);
}

.renewal-booking-card button[type="submit"] {
  min-height: 56px;
  font-size: 17px;
  box-shadow: 0 18px 34px rgba(186,1,43,.34);
}

.booking-header {
    background: linear-gradient(135deg, var(--primary), #00286d);
    padding: 26px;
    margin: -1px -1px 24px;
    border-radius: 18px 18px 0 0;
    text-align: center;
}

.booking-header h2 {
    color: #fff !important;
    margin: 0 0 8px;
    font-size: 30px;
}

.booking-header h2 i {
    color: var(--accent);
    margin-right: 8px;
}

.booking-header p {
    color: rgba(255,255,255,.92) !important;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 900;
  font-size: 13px;
  color: #222;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  margin-top: 6px;
  background: #fff;
  color: #111;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* =========================
   FOOTER
========================= */

footer {
  border-top: 1px solid rgba(186,1,43,.22);
  background: var(--primary);
  color: rgba(255,255,255,.78);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
}

.footer-logo {
  width: 230px;
  margin-bottom: 14px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.footer-cols h3 {
  color: #ffffff;
  margin-top: 0;
}

.footer-cols a,
.footer-cols span {
  display: block;
  color: rgba(255,255,255,.78);
  margin-bottom: 8px;
  font-size: 14px;
}

.footer-cols a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 16px 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.70);
}

/* =========================
   REVEAL ANIMATION
========================= */

.reveal {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Animate only when JavaScript has initialised the page. */
.js .reveal {
  opacity: 0;
  visibility: visible;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}

.js .reveal.visible,
.js .reveal.active,
.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .js .reveal {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
}

/* =========================
   TABLET
========================= */

@media (max-width: 950px) {

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header,
  .top-strip,
  main,
  footer {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav {
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .main-nav {
    display: none !important;
    position: absolute;
    top: calc(100% + 10px);
    left: 18px;
    right: 18px;
    z-index: 1000;
    width: auto;
    max-width: calc(100vw - 36px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border: 1px solid rgba(0,28,82,.14);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0,28,82,.14);
    overflow: hidden;
    color: var(--primary);
  }

  .main-nav.open {
    display: flex !important;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,28,82,.08);
    color: var(--primary);
    white-space: normal;
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .nav-actions {
    display: none;
  }

  .services,
  .card-grid,
  .pricing-grid,
  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid,
  .seo-grid,
  .split,
  .contact-wrap,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-shell {
    position: relative;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(0,28,82,.70) 0%, rgba(0,28,82,.50) 42%, rgba(0,28,82,.18) 100%),
      url('/assets/img/hero/home-mobile.jpg');
    background-size: cover;
    background-position: center right;
    border-bottom: 1px solid rgba(0,28,82,.12);
  }

  .eicr-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-mobile.jpg');
    background-position: 14% center;
  }

  .remedials-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-remedial-works-mobile.jpg');
    background-position: 64% center;
  }

  .fire-alarms-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/fire-alarms-mobile.jpg');
    background-position: 84% center;
  }

  .emergency-lighting-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/emergency-lighting-mobile.jpg');
    background-position: 84% center;
  }

  .consumer-units-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/consumer-units-mobile.jpg');
    background-position: 64% center;
  }

  .landlord-eicr-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/landlords-mobile.jpg');
    background-position: 64% center;
  }

  .commercial-eicr-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/commercial-mobile.jpg');
    background-position: 64% center;
  }

  .contact-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/contact-mobile.jpg');
    background-position: 64% center;
  }

  .about-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/home-mobile.jpg');
    background-position: 70% center;
  }

  .eicr-london-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-london-mobile.jpg');
    background-position: 64% center;
  }

  .eicr-essex-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-essex-mobile.jpg');
    background-position: 64% center;
  }

  .areas-hero {
    background:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/areas-mobile.jpg');
    background-position: 64% center;
  }
  
  .eicr-renewal-hero {
  background:
    linear-gradient(
      180deg,
      rgba(0,28,82,.78),
      rgba(0,28,82,.46)
    ),
    url('/assets/img/hero/eicr-renewal-mobile.jpg');
  background-position: 64% center;
}

  .cta-inner {
    display: block;
  }

  .cta-inner .btn {
    margin-top: 18px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 620px) {

  .top-strip .inner {
    display: block;
    text-align: center;
  }

  .top-strip .inner span {
    display: block;
  }

  .top-strip .inner span + span {
    margin-top: 6px;
  }

  .brand img {
    width: 190px;
  }

  .nav {
    padding: 12px 18px;
  }

  .hero {
    min-height: auto;
    padding: 64px 18px;
  }

  .page-hero {
    position: relative;
    overflow: hidden;
    padding: 82px 20px 64px;
    border-bottom: 1px solid rgba(0,28,82,.12);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  h1 {
    font-size: clamp(40px, 14vw, 60px);
  }

  .hero-actions,
  .hero-ctas,
  .trust-row,
  .services,
  .card-grid,
  .pricing-grid,
  .area-grid,
  .process,
  .form-grid,
  .footer-cols {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  section:not(.cta-band):not(.page-hero):not(.hero-shell) {
    padding: 58px 20px;
  }

  section:not(.cta-band):not(.page-hero):not(.hero-shell):not(.section-background-1):not(.section-background-2):not(.section-background-3) {
    background: #ffffff;
  }

  section.section-background-1,
  section.section-background-2,
  section.section-background-3 {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  section.cta-band {
    padding: 48px 20px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 12px;
  }

  .panel,
  .contact-card,
  .service-card,
  .info-card,
  .card,
  .seo-card,
  .price-card,
  .faq-item,
  .area-card {
    padding: 22px;
  }

  .tesc-inner {
    display: block;
  }

  .tesc-inner .btn {
    margin-top: 18px;
  }

  .footer-inner {
    padding: 36px 18px;
  }
}

/* =========================
   BIM LIGHT THEME FINAL OVERRIDES
========================= */

.hero-shell,
.page-hero {
  color: #ffffff;
}

.hero-shell p,
.page-hero p,
.hero-shell .lead,
.page-hero .lead {
  color: rgba(255,255,255,.90);
}

.hero-shell .eyebrow,
.page-hero .eyebrow {
  color: #ffffff;
  background: rgba(186,1,43,.16);
  border-color: rgba(186,1,43,.45);
}

.hero-shell h1 span,
.page-hero h1 span {
  color: var(--green);
}

.main-nav.open {
  background: #ffffff;
  border-color: rgba(0,28,82,.14);
  box-shadow: 0 20px 45px rgba(0,28,82,.14);
}

section:nth-of-type(even):not(.cta-band):not(.section-background-1):not(.section-background-2):not(.section-background-3) {
  background: #f7f8fc;
}

.cta-band h2,
.cta-band p,
.cta-inner h2,
.cta-inner p {
  color: #ffffff;
}

.footer-cols h3,
footer h3 {
  color: #ffffff;
}

.footer-cols a,
.footer-cols span,
footer p {
  color: rgba(255,255,255,.78);
}

footer a:hover {
  color: var(--green);
}

.contact-card,
.service-card,
.info-card,
.card,
.seo-card,
.area-card,
.price-card,
.faq-item,
.panel {
  color: var(--ink);
}

.contact-card p,
.service-card p,
.info-card p,
.card p,
.seo-card p,
.area-card p,
.price-card p,
.faq-item p,
.panel p,
.content-block p,
.content-block li {
  color: var(--muted);
}




/* =========================
   CTA BAND FINAL
========================= */

section.cta-band {
  padding: 48px 20px;
  background: #001c52 !important;
  background-image: linear-gradient(90deg, rgba(0,28,82,.96), rgba(0,28,82,.86)) !important;
  border-top: 1px solid rgba(186,1,43,.25);
  border-bottom: 1px solid rgba(186,1,43,.25);
  color: #ffffff !important;
}

section.cta-band h2,
section.cta-band p,
section.cta-band .cta-inner h2,
section.cta-band .cta-inner p {
  color: #ffffff !important;
}

/* =========================
   MOBILE NAV FINAL
========================= */

@media screen and (max-width: 950px) {

  html,
  body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .site-header {
    overflow: visible !important;
  }

  .nav {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 12px 18px !important;
    gap: 12px !important;
  }

  .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 85px) !important;
  }

  .brand img {
    width: 185px !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .menu-toggle {
    display: inline-flex !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0,28,82,.22) !important;
    border-radius: 10px !important;
    font-size: 22px !important;
    z-index: 9999 !important;
  }

  .nav-actions {
    display: none !important;
  }

  .main-nav {
    display: none !important;

    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: #fff !important;
    border: 1px solid rgba(0,28,82,.14) !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 45px rgba(0,28,82,.18) !important;
    overflow: hidden !important;
    z-index: 9998 !important;
  }

  .main-nav.open {
    display: flex !important;
  }

  .main-nav a {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px !important;
    color: var(--primary) !important;
    border-bottom: 1px solid rgba(0,28,82,.08) !important;
    white-space: normal !important;
    word-break: normal !important;
  }

  .main-nav a:last-child {
    border-bottom: 0 !important;
  }

  section.cta-band {
    background: #001c52 !important;
    background-image: linear-gradient(90deg, rgba(0,28,82,.96), rgba(0,28,82,.86)) !important;
    color: #ffffff !important;
  }
}


/* =========================
   MOBILE HERO RESTORE
   Keeps hero images visible below 620px
========================= */

@media screen and (max-width: 620px) {

  section.page-hero,
  section.hero-shell {
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }

  section.eicr-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-mobile.jpg') !important;
    background-position: 14% center !important;
  }

  section.remedials-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-remedial-works-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.fire-alarms-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/fire-alarms-mobile.jpg') !important;
    background-position: 84% center !important;
  }

  section.emergency-lighting-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/emergency-lighting-mobile.jpg') !important;
    background-position: 84% center !important;
  }

  section.consumer-units-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/consumer-units-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.landlord-eicr-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/landlords-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.commercial-eicr-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/commercial-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.contact-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/contact-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.about-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/home-mobile.jpg') !important;
    background-position: 70% center !important;
  }

  section.eicr-london-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-london-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.eicr-essex-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-essex-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.areas-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/areas-mobile.jpg') !important;
    background-position: 64% center !important;
  }

  section.eicr-renewal-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.78), rgba(0,28,82,.46)),
      url('/assets/img/hero/eicr-renewal-mobile.jpg') !important;
    background-position: 64% center !important;
  }
}


/* =========================
   JS STICKY HEADER SYSTEM
   Top strip scrolls away.
   Header becomes fixed after top strip scrolls out.
========================= */

body.has-fixed-header {
  padding-top: var(--sticky-header-height, 78px);
}

.site-header {
  position: relative;
  z-index: 9999;
  width: 100%;
  overflow: visible;
}

.site-header.is-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
}

.site-header .nav {
  overflow: visible;
}

@media screen and (max-width: 950px) {

  .site-header {
    position: relative;
    z-index: 9999;
    overflow: visible !important;
  }

  .site-header.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
  }

  .nav {
    position: relative !important;
    overflow: visible !important;
  }

  .main-nav {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    z-index: 9998 !important;
  }
}

/* Renewal booking card - final override */

.renewal-booking-card {
  padding: 0 !important;
  overflow: hidden;
  border: 2px solid var(--primary) !important;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0,28,82,.18) !important;
  background: #fff !important;
}

.renewal-booking-card .booking-header {
  background: linear-gradient(135deg, var(--primary), #00286d) !important;
  padding: 26px !important;
  margin: 0 !important;
  border-radius: 20px 20px 0 0;
  text-align: center;
}

.renewal-booking-card .booking-header h2 {
  color: #fff !important;
  margin: 0 0 8px !important;
}

.renewal-booking-card .booking-header p {
  color: rgba(255,255,255,.92) !important;
  margin: 0 !important;
}

.renewal-booking-card form {
  padding: 26px !important;
}

@media (max-width: 620px) {
  .renewal-booking-card {
    padding: 0 !important;
  }

  .renewal-booking-card form {
    padding: 22px !important;
  }
}


/* ============================================================
   BIM SAFETY GROUP — MODULAR OVERRIDES
   These rules make all hero pages compatible with hero_style().
   Example: <section class="page-hero" style="<?= hero_style($page_hero); ?>">
   ============================================================ */

:root {
  --navy: #001c52;
  --navy-2: #00286d;
  --red: #ba012b;
  --red-dark: #950022;
  --red-soft: rgba(186,1,43,.11);
  --red-line: rgba(186,1,43,.32);
  /* Backwards-compatible aliases used throughout the inherited layout. */
  --primary: var(--navy);
  --green: var(--red);
  --green-soft: var(--red-soft);
  --green-line: var(--red-line);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 12px 26px rgba(186,1,43,.26);
}

.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.hero-shell,
.page-hero {
  background-image:
    linear-gradient(90deg, rgba(0,28,82,.90) 0%, rgba(0,28,82,.68) 48%, rgba(0,28,82,.20) 100%),
    var(--hero-desktop, url('/assets/img/hero/home-background.jpg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-shell {
  background-position: center right;
}

/* Legacy page-class fallbacks. Inline hero_style() takes priority. */
.eicr-hero { --hero-desktop: url('/assets/img/hero/eicr-background.jpg'); --hero-mobile: url('/assets/img/hero/eicr-mobile.jpg'); }
.remedials-hero { --hero-desktop: url('/assets/img/hero/eicr-remedial-works-background.jpg'); --hero-mobile: url('/assets/img/hero/eicr-remedial-works-mobile.jpg'); }
.fire-alarms-hero { --hero-desktop: url('/assets/img/hero/fire-alarms-background.jpg'); --hero-mobile: url('/assets/img/hero/fire-alarms-mobile.jpg'); }
.emergency-lighting-hero { --hero-desktop: url('/assets/img/hero/emergency-lighting-background.jpg'); --hero-mobile: url('/assets/img/hero/emergency-lighting-mobile.jpg'); }
.consumer-units-hero { --hero-desktop: url('/assets/img/hero/consumer-units-background.jpg'); --hero-mobile: url('/assets/img/hero/consumer-units-mobile.jpg'); }
.landlord-eicr-hero { --hero-desktop: url('/assets/img/hero/landlords-background.jpg'); --hero-mobile: url('/assets/img/hero/landlords-mobile.jpg'); }
.commercial-eicr-hero { --hero-desktop: url('/assets/img/hero/commercial-background.jpg'); --hero-mobile: url('/assets/img/hero/commercial-mobile.jpg'); }
.contact-hero { --hero-desktop: url('/assets/img/hero/contact-background.jpg'); --hero-mobile: url('/assets/img/hero/contact-mobile.jpg'); }
.about-hero { --hero-desktop: url('/assets/img/hero/about-background.jpg'); --hero-mobile: url('/assets/img/hero/about-mobile.jpg'); }
.areas-hero { --hero-desktop: url('/assets/img/hero/areas-background.jpg'); --hero-mobile: url('/assets/img/hero/areas-mobile.jpg'); }
.prices-hero { --hero-desktop: url('/assets/img/hero/prices-background.jpg'); --hero-mobile: url('/assets/img/hero/prices-mobile.jpg'); }
.cctv-hero { --hero-desktop: url('/assets/img/hero/cctv-background.jpg'); --hero-mobile: url('/assets/img/hero/cctv-mobile.jpg'); }
.fire-risk-assessments-hero { --hero-desktop: url('/assets/img/hero/fire-risk-assessments-background.jpg'); --hero-mobile: url('/assets/img/hero/fire-risk-assessments-mobile.jpg'); }
.borough-hero,
.district-hero { background-position: center; }

/* Keep text readable across photography. */
.hero-shell h1,
.hero-shell .lead,
.hero-shell p,
.page-hero h1,
.page-hero .lead,
.page-hero p {
  color: #fff;
}

.hero-shell .eyebrow,
.page-hero .eyebrow {
  color: #fff;
  background: rgba(186,1,43,.90);
  border-color: rgba(255,255,255,.26);
}

.hero-shell h1 span,
.page-hero h1 span {
  color: #fff;
}

/* Contact form remains light, clear and high contrast. */
.contact-card {
  background: #fff;
  color: var(--ink);
  border-top: 5px solid var(--red);
}

.contact-card h2 {
  color: var(--navy);
}

.contact-card label {
  color: var(--navy);
}

.contact-card input:focus,
.contact-card select:focus,
.contact-card textarea:focus {
  border-color: var(--red);
  outline: 3px solid rgba(186,1,43,.12);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 950px) {
  .hero-shell,
  .page-hero {
    background-image:
      linear-gradient(180deg, rgba(0,28,82,.82), rgba(0,28,82,.54)),
      var(--hero-mobile, var(--hero-desktop, url('/assets/img/hero/home-mobile.jpg')));
    background-position: center;
  }
}

@media (max-width: 620px) {
  .top-strip .inner {
    justify-content: center;
    text-align: center;
  }

  .brand img {
    width: min(210px, 56vw);
  }
}

/* ============================================================
   MASTER FRAMEWORK COMPATIBILITY FIXES
   ============================================================ */

/* Master main.js uses active/is-visible; legacy scripts may use visible. */
.reveal.visible,
.reveal.active,
.reveal.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Explicit image sections must always beat generic alternating backgrounds. */
section.section-background-1 {
  background-image:
    linear-gradient(90deg, rgba(0,28,82,.94), rgba(0,28,82,.76)),
    url('/assets/img/backgrounds/section-background-1.jpg');
}

section.section-background-2 {
  background-image:
    linear-gradient(90deg, rgba(67,0,15,.92), rgba(186,1,43,.74)),
    url('/assets/img/backgrounds/section-background-2.jpg');
}

section.section-background-3 {
  background-image:
    linear-gradient(90deg, rgba(8,15,28,.94), rgba(0,28,82,.74)),
    url('/assets/img/backgrounds/section-background-3.jpg');
}

@media screen and (max-width: 620px) {
  section.section-background-1,
  section.section-background-2,
  section.section-background-3 {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
}

/* ============================================================
   FAQ ACCORDION
   Native HTML accordion — no JavaScript required
   ============================================================ */

details.faq-item {
  display: block;
  padding: 0;
  overflow: hidden;
}

details.faq-item summary {
  list-style: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 24px;
  margin: 0;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--green);
}

.faq-icon {
  flex: 0 0 auto;
  color: var(--green);
  transition: transform .25s ease;
}

details.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 22px;
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
}

details.faq-item[open] {
  border-color: rgba(186, 1, 43, .55);
  box-shadow:
    0 18px 42px rgba(0, 28, 82, .10),
    0 0 0 3px rgba(186, 1, 43, .08);
}

/* FAQ cards over image backgrounds */

.section-background-1 details.faq-item,
.section-background-2 details.faq-item,
.section-background-3 details.faq-item {
  background: #ffffff;
}

.section-background-1 .faq-question,
.section-background-2 .faq-question,
.section-background-3 .faq-question {
  color: var(--primary);
}

.section-background-1 .faq-answer p,
.section-background-2 .faq-answer p,
.section-background-3 .faq-answer p {
  color: var(--muted);
}

@media screen and (max-width: 620px) {
  .faq-question {
    padding: 20px;
    font-size: 17px;
  }

  .faq-answer {
    padding: 0 20px 20px;
  }
}

/* ============================================================
   LIGHT CARD HEADING CONTRAST FIX
   Prevent dark-section heading rules from making card titles white.
   ============================================================ */

.section-background-1 .panel h2,
.section-background-1 .panel h3,
.section-background-1 .panel h4,
.section-background-1 .service-card h2,
.section-background-1 .service-card h3,
.section-background-1 .service-card h4,
.section-background-1 .card h2,
.section-background-1 .card h3,
.section-background-1 .card h4,
.section-background-1 .info-card h2,
.section-background-1 .info-card h3,
.section-background-1 .info-card h4,
.section-background-1 .area-card h2,
.section-background-1 .area-card h3,
.section-background-1 .area-card h4,
.section-background-1 .seo-card h2,
.section-background-1 .seo-card h3,
.section-background-1 .seo-card h4,
.section-background-1 .price-card h2,
.section-background-1 .price-card h3,
.section-background-1 .price-card h4,
.section-background-1 .faq-item h2,
.section-background-1 .faq-item h3,
.section-background-1 .faq-item h4,

.section-background-2 .panel h2,
.section-background-2 .panel h3,
.section-background-2 .panel h4,
.section-background-2 .service-card h2,
.section-background-2 .service-card h3,
.section-background-2 .service-card h4,
.section-background-2 .card h2,
.section-background-2 .card h3,
.section-background-2 .card h4,
.section-background-2 .info-card h2,
.section-background-2 .info-card h3,
.section-background-2 .info-card h4,
.section-background-2 .area-card h2,
.section-background-2 .area-card h3,
.section-background-2 .area-card h4,
.section-background-2 .seo-card h2,
.section-background-2 .seo-card h3,
.section-background-2 .seo-card h4,
.section-background-2 .price-card h2,
.section-background-2 .price-card h3,
.section-background-2 .price-card h4,
.section-background-2 .faq-item h2,
.section-background-2 .faq-item h3,
.section-background-2 .faq-item h4,

.section-background-3 .panel h2,
.section-background-3 .panel h3,
.section-background-3 .panel h4,
.section-background-3 .service-card h2,
.section-background-3 .service-card h3,
.section-background-3 .service-card h4,
.section-background-3 .card h2,
.section-background-3 .card h3,
.section-background-3 .card h4,
.section-background-3 .info-card h2,
.section-background-3 .info-card h3,
.section-background-3 .info-card h4,
.section-background-3 .area-card h2,
.section-background-3 .area-card h3,
.section-background-3 .area-card h4,
.section-background-3 .seo-card h2,
.section-background-3 .seo-card h3,
.section-background-3 .seo-card h4,
.section-background-3 .price-card h2,
.section-background-3 .price-card h3,
.section-background-3 .price-card h4,
.section-background-3 .faq-item h2,
.section-background-3 .faq-item h3,
.section-background-3 .faq-item h4 {
  color: var(--primary) !important;
}

/* Keep highlighted words red inside light cards. */
.section-background-1 .panel h2 span,
.section-background-1 .panel h3 span,
.section-background-1 .service-card h2 span,
.section-background-1 .service-card h3 span,
.section-background-1 .card h2 span,
.section-background-1 .card h3 span,
.section-background-1 .area-card h2 span,
.section-background-1 .area-card h3 span,
.section-background-2 .panel h2 span,
.section-background-2 .panel h3 span,
.section-background-2 .service-card h2 span,
.section-background-2 .service-card h3 span,
.section-background-2 .card h2 span,
.section-background-2 .card h3 span,
.section-background-2 .area-card h2 span,
.section-background-2 .area-card h3 span,
.section-background-3 .panel h2 span,
.section-background-3 .panel h3 span,
.section-background-3 .service-card h2 span,
.section-background-3 .service-card h3 span,
.section-background-3 .card h2 span,
.section-background-3 .card h3 span,
.section-background-3 .area-card h2 span,
.section-background-3 .area-card h3 span {
  color: var(--green) !important;
}


/* ============================================================
   MOBILE FIXED NAV — FINAL OVERRIDE
   Mobile browsers can break position:sticky when an ancestor
   uses overflow. Use a true fixed header below 950px instead.
   ============================================================ */
@media screen and (max-width: 950px) {
  .top-strip {
    display: none !important;
  }

  body {
    padding-top: 71px !important;
  }

  .site-header,
  .site-header.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2147483000 !important;
    margin: 0 !important;
    background: rgba(255,255,255,.98) !important;
    border-bottom: 1px solid rgba(0,28,82,.14) !important;
    box-shadow: 0 8px 24px rgba(0,28,82,.12) !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    overflow: visible !important;
  }

  .site-header .nav {
    min-height: 71px !important;
  }

  .main-nav {
    position: fixed !important;
    top: 79px !important;
    left: 12px !important;
    right: 12px !important;
    max-height: calc(100dvh - 91px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open,
  body.nav-open {
    overflow: hidden !important;
  }
}

/* ============================================================
   DESKTOP STICKY NAV — FINAL OVERRIDE
   Restore sticky navigation above the mobile fixed-header breakpoint.
   ============================================================ */
@media screen and (min-width: 951px) {
  .site-header,
  .site-header.is-fixed {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    z-index: 1000 !important;
    margin: 0 !important;
    transform: none !important;
    overflow: visible !important;
  }
}

/* ============================================================
   SECTION BACKGROUND TEXT — FINAL CASCADE OVERRIDE
   All text directly over section background images must be white.
   White cards/panels retain dark text for readability.
   ============================================================ */
section.section-background-1,
section.section-background-2,
section.section-background-3 {
  color: #ffffff !important;
}

section.section-background-1 h1,
section.section-background-1 h2,
section.section-background-1 h3,
section.section-background-1 h4,
section.section-background-1 h5,
section.section-background-1 h6,
section.section-background-1 p,
section.section-background-1 li,
section.section-background-1 .eyebrow,
section.section-background-1 .lead,
section.section-background-1 .content-block,
section.section-background-1 .content-block h2,
section.section-background-1 .content-block h3,
section.section-background-1 .content-block p,
section.section-background-1 .content-block li,
section.section-background-2 h1,
section.section-background-2 h2,
section.section-background-2 h3,
section.section-background-2 h4,
section.section-background-2 h5,
section.section-background-2 h6,
section.section-background-2 p,
section.section-background-2 li,
section.section-background-2 .eyebrow,
section.section-background-2 .lead,
section.section-background-2 .content-block,
section.section-background-2 .content-block h2,
section.section-background-2 .content-block h3,
section.section-background-2 .content-block p,
section.section-background-2 .content-block li,
section.section-background-3 h1,
section.section-background-3 h2,
section.section-background-3 h3,
section.section-background-3 h4,
section.section-background-3 h5,
section.section-background-3 h6,
section.section-background-3 p,
section.section-background-3 li,
section.section-background-3 .eyebrow,
section.section-background-3 .lead,
section.section-background-3 .content-block,
section.section-background-3 .content-block h2,
section.section-background-3 .content-block h3,
section.section-background-3 .content-block p,
section.section-background-3 .content-block li {
  color: #ffffff !important;
}

section.section-background-1 a:not(.btn),
section.section-background-2 a:not(.btn),
section.section-background-3 a:not(.btn) {
  color: #ffffff !important;
}

/* Restore dark text only within light cards and panels. */
section.section-background-1 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card),
section.section-background-2 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card),
section.section-background-3 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) {
  color: var(--ink) !important;
}

section.section-background-1 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6, .eyebrow),
section.section-background-2 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6, .eyebrow),
section.section-background-3 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6, .eyebrow) {
  color: var(--primary) !important;
}

section.section-background-1 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead),
section.section-background-2 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead),
section.section-background-3 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead) {
  color: var(--muted) !important;
}

section.section-background-1 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) a:not(.btn),
section.section-background-2 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) a:not(.btn),
section.section-background-3 :is(.panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) a:not(.btn) {
  color: var(--primary) !important;
}


/* EICR process cards on image-backed sections use light card colours. */
.section-background-1 .step h3,
.section-background-2 .step h3,
.section-background-3 .step h3 {
  color: var(--primary) !important;
}

.section-background-1 .step p,
.section-background-2 .step p,
.section-background-3 .step p {
  color: var(--muted) !important;
}

.section-background-1 .step b,
.section-background-2 .step b,
.section-background-3 .step b {
  color: var(--green) !important;
}

/* ============================================================
   BIM SAFETY GROUP — LIGHT CARD / BUTTON COLOUR NORMALISATION
   Keeps white cards readable when placed on image-backed sections
   and prevents general link rules overriding button text colours.
   ============================================================ */

/* Every white card component uses the standard light-card palette. */
section.section-background-1 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card),
section.section-background-2 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card),
section.section-background-3 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) {
  color: var(--ink) !important;
}

section.section-background-1 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6),
section.section-background-2 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6),
section.section-background-3 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--primary) !important;
}

section.section-background-1 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead),
section.section-background-2 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead),
section.section-background-3 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) :is(p, li, .lead) {
  color: var(--muted) !important;
}

/* Retain the normal red label treatment inside light cards. */
section.section-background-1 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) .eyebrow,
section.section-background-2 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) .eyebrow,
section.section-background-3 :is(.step, .panel, .service-card, .info-card, .card, .seo-card, .area-card, .price-card, .faq-item, .contact-card) .eyebrow {
  color: var(--primary) !important;
  background: var(--green-soft);
  border-color: var(--green-line);
}

section.section-background-1 .step b,
section.section-background-2 .step b,
section.section-background-3 .step b {
  color: var(--green) !important;
}

/* Button colours must win over .content-block a and image-section link rules. */
a.btn.btn-primary,
.content-block a.btn.btn-primary,
section.section-background-1 a.btn.btn-primary,
section.section-background-2 a.btn.btn-primary,
section.section-background-3 a.btn.btn-primary {
  color: #ffffff !important;
  background: var(--green);
  border-color: var(--green);
}

a.btn.btn-dark,
.content-block a.btn.btn-dark,
section.section-background-1 a.btn.btn-dark,
section.section-background-2 a.btn.btn-dark,
section.section-background-3 a.btn.btn-dark {
  color: #ffffff !important;
  background: var(--primary);
  border-color: var(--primary);
}


/* EICR test procedure: improve contrast of the live-testing panel over image backgrounds. */
.section-background-2 .panel.green.live-test-panel {
  background: #ffffff !important;
  border: 1px solid rgba(186, 1, 43, .42) !important;
  box-shadow: 0 18px 45px rgba(0, 28, 82, .18);
}

.section-background-2 .panel.green.live-test-panel h2,
.section-background-2 .panel.green.live-test-panel h3 {
  color: var(--primary) !important;
}

.section-background-2 .panel.green.live-test-panel p,
.section-background-2 .panel.green.live-test-panel li {
  color: var(--muted) !important;
}
