/* =============================================================
   ERS CONSTRUCTIONS — Fire Protection and Construction
   Main stylesheet
   Sections:
     1. Design tokens
     2. Base & typography
     3. Utilities / premium details
     4. Buttons
     5. Navbar
     6. Hero & page banners
     7. Sections (cards, stats, timeline, team, projects)
     8. Forms
     9. Footer, back-to-top, floating CTA
    10. Animations & reduced motion
    11. Responsive
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --ers-blue: #0a7fd4;          /* primary corporate blue (from logo) */
  --ers-blue-deep: #0b4a86;     /* secondary engineering blue */
  --ers-navy: #0b1220;          /* premium industrial navy */
  --ers-red: #e2231a;           /* accent red (from logo) */
  --ers-purple: #6b2c91;        /* accent purple (from logo) */
  --ers-ink: #111827;           /* main dark text */
  --ers-body: #4b5563;          /* body text */
  --ers-light: #f7f8fa;         /* light section background */
  --ers-line: #e5e7eb;          /* hairline borders */
  --ers-white: #ffffff;

  --ers-font-head: "Montserrat", "Inter", system-ui, sans-serif;
  --ers-font-body: "Inter", "Open Sans", system-ui, sans-serif;

  --ers-shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
  --ers-shadow-md: 0 12px 34px rgba(17, 24, 39, 0.1);
  --ers-shadow-lg: 0 24px 60px rgba(11, 18, 32, 0.18);
  --ers-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Base & typography ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--ers-font-body);
  color: var(--ers-body);
  background: var(--ers-white);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .display-head {
  font-family: var(--ers-font-head);
  color: var(--ers-ink);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h1 { font-size: clamp(2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }

a { color: var(--ers-blue-deep); text-decoration: none; transition: color 0.2s var(--ers-ease); }
a:hover { color: var(--ers-blue); }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--ers-blue);
  outline-offset: 3px;
}


/* =============================================================
   ERS CONSTRUCTIONS — OFF-CANVAS SIDEBAR & OVERLAY STYLES
   ============================================================= */

/* Prevent scrolling when menu is active */
body.sidebar-active {
  overflow: hidden !important;
}

/* Glassmorphic Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  z-index: 1000; /* Placed behind the drawer */
  pointer-events: none;
}

.sidebar-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Sidebar Drawer */
@media (max-width: 991.98px) {
  /* Override Bootstrap hidden state */
  .ers-nav .navbar-collapse {
    position: fixed !important;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    padding: 1.75rem 1.5rem;
    box-shadow: -12px 0 35px rgba(0, 0, 0, 0.22);
    z-index: 1060 !important; /* Higher than backdrop */
    
    /* Transform-based right side animation */
    transform: translateX(100%) !important;
    visibility: hidden !important;
    display: flex !important; /* Overrides Bootstrap display:none */
    flex-direction: column !important;
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.38s ease !important;
  }

  /* Slide-in State (When Toggled) */
  .ers-nav .navbar-collapse.sidebar-open {
    transform: translateX(0) !important;
    visibility: visible !important;
  }

  /* Header inside Sidebar */
  .sidebar-header {
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
  }

  .btn-close-sidebar {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-close-sidebar:hover,
  .btn-close-sidebar:focus {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    outline: none;
  }

  /* Responsive Links Styling */
  .ers-nav .navbar-nav {
    width: 100%;
    margin-bottom: auto;
  }

  .ers-nav .navbar-nav .nav-item {
    width: 100%;
  }

  .ers-nav .navbar-nav .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.8rem 1rem !important;
    border-radius: 8px;
    display: block;
    transition: all 0.25s ease;
  }

  .ers-nav .navbar-nav .nav-link:hover,
  .ers-nav .navbar-nav .nav-link.active {
    background-color: #fef2f2;
    color: #dc2626 !important;
    padding-left: 1.35rem !important;
  }

  /* Sidebar Bottom Footer */
  .sidebar-footer {
    width: 100%;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
  }
}


.skip-link {
  position: absolute; left: 12px; top: 0; z-index: 2000;
  background: var(--ers-navy); color: #fff; padding: 12px 20px;
  transform: translateY(-140%);
  transition: transform 0.2s var(--ers-ease);
}
.skip-link:focus { transform: translateY(12px); color: #fff; }

/* ---------- 3. Utilities / premium details ---------- */
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section-light { background: var(--ers-light); }
.section-navy { background: var(--ers-navy); color: rgba(255, 255, 255, 0.75); }
.section-navy h2, .section-navy h3, .section-navy h4 { color: #fff; }

/* Small uppercase engineering label with red rule */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ers-font-head);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ers-blue-deep); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 34px; height: 2px; background: var(--ers-red); display: block;
}
.eyebrow-light { color: #8fc6f2; }

.lead-text { font-size: clamp(1rem, 1.4vw, 1.125rem); color: var(--ers-body); }
.section-navy .lead-text { color: rgba(255, 255, 255, 0.72); }

.rule { width: 64px; height: 3px; background: var(--ers-red); border: 0; opacity: 1; margin: 1.25rem 0 0; }

.text-red { color: var(--ers-red) !important; }
.text-blue { color: var(--ers-blue) !important; }
.text-ink { color: var(--ers-ink) !important; }

/* Blueprint grid overlay used on light panels */
.blueprint {
  background-image:
    linear-gradient(rgba(10, 127, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 127, 212, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.media-frame { position: relative; overflow: hidden; background: #0d1526; }
.media-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s var(--ers-ease);
}
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x2 { aspect-ratio: 3 / 2; }

/* Corner accent bracket, structural-engineering inspired */
.corner-accent { position: relative; }
.corner-accent::after {
  content: ""; position: absolute; right: -14px; bottom: -14px; width: 96px; height: 96px;
  border-right: 4px solid var(--ers-red); border-bottom: 4px solid var(--ers-red);
  pointer-events: none;
}

/* ---------- 4. Buttons ---------- */
.btn-ers,
.btn-ers-outline,
.btn-ers-red,
.btn-ers-ghost {
  --btn-bg: var(--ers-blue-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ers-font-head); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 30px; border-radius: 2px; border: 2px solid transparent;
  min-height: 52px; cursor: pointer;
  transition: background-color 0.25s var(--ers-ease), color 0.25s var(--ers-ease),
              border-color 0.25s var(--ers-ease), transform 0.25s var(--ers-ease),
              box-shadow 0.25s var(--ers-ease);
}
.btn-ers { background: var(--ers-blue-deep); color: #fff; }
.btn-ers:hover { background: var(--ers-blue); color: #fff; transform: translateY(-2px); box-shadow: var(--ers-shadow-md); }

.btn-ers-red { background: var(--ers-red); color: #fff; }
.btn-ers-red:hover { background: #b81b13; color: #fff; transform: translateY(-2px); box-shadow: var(--ers-shadow-md); }

.btn-ers-outline { background: transparent; color: var(--ers-ink); border-color: rgba(17, 24, 39, 0.25); }
.btn-ers-outline:hover { border-color: var(--ers-blue-deep); color: var(--ers-blue-deep); transform: translateY(-2px); }

.btn-ers-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ers-ghost:hover { background: #fff; color: var(--ers-ink); transform: translateY(-2px); }

.btn-sm-ers { padding: 12px 22px; min-height: 44px; font-size: 0.72rem; }

/* Text link with animated underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ers-font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ers-blue-deep);
}
.link-arrow span.bar {
  width: 22px; height: 2px; background: var(--ers-red); display: inline-block;
  transition: width 0.3s var(--ers-ease);
}
.link-arrow:hover span.bar { width: 36px; }

/* ---------- 5. Navbar ---------- */
.ers-topbar {
  background: var(--ers-navy); color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem; letter-spacing: 0.04em;
}
.ers-topbar a { color: rgba(255, 255, 255, 0.82); }
.ers-topbar a:hover { color: #fff; }

.ers-nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--ers-line);
  transition: background-color 0.3s var(--ers-ease), box-shadow 0.3s var(--ers-ease),
              padding 0.3s var(--ers-ease);
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.ers-nav.is-transparent {
  background: transparent; border-bottom-color: rgba(255, 255, 255, 0.16);
}
.ers-nav.is-scrolled { background: #fff; box-shadow: var(--ers-shadow-sm); }

.ers-logo img {    border-radius: 11px;
    height: 69px;width: auto; display: block; }

.ers-nav .nav-link {
  font-family: var(--ers-font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ers-ink);
  padding: 12px 14px; position: relative;
}
.ers-nav.is-transparent .nav-link { color: #fff; }
.ers-nav .nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--ers-red); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ers-ease);
}
.ers-nav .nav-link:hover::after,
.ers-nav .nav-link.active::after { transform: scaleX(1); }
.ers-nav .nav-link.active { color: var(--ers-blue-deep); }
.ers-nav.is-transparent .nav-link.active { color: #fff; }

.navbar-toggler { border: 1px solid var(--ers-line); border-radius: 2px; padding: 10px 12px; }
.navbar-toggler:focus { box-shadow: none; }
.ers-nav.is-transparent .navbar-toggler { border-color: rgba(255, 255, 255, 0.5); }
.toggler-bar { display: block; width: 22px; height: 2px; background: var(--ers-ink); margin: 4px 0; }
.ers-nav.is-transparent .toggler-bar { background: #fff; }

/* ---------- 6. Hero & page banners ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  color: #fff; overflow: hidden; padding: 140px 0 90px;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; animation: heroDrift 26s ease-in-out infinite alternate; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.78) 45%, rgba(11, 18, 32, 0.42) 100%);
}
.hero__inner { position: relative; z-index: 2; }
.hero h1 { color: #fff; text-transform: uppercase; letter-spacing: -0.01em; }
.hero h1 .accent { color: var(--ers-blue); }
.hero p.hero-sub { color: rgba(255, 255, 255, 0.82); max-width: 640px; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.hero .eyebrow { color: #fff; }

@keyframes heroDrift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); }
}

/* Credibility strip below hero */
.credibility {
  background: var(--ers-navy); border-top: 3px solid var(--ers-red);
}
.credibility .item {
  padding: 26px 18px; text-align: center; color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.credibility .item:last-child { border-right: 0; }
.credibility .item strong {
  display: block; font-family: var(--ers-font-head); font-size: 1.6rem; font-weight: 800; color: #fff;
}
.credibility .item span {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6);
}

/* Inner page banner */
.page-banner {
  position: relative; padding: 190px 0 90px; color: #fff; overflow: hidden;
}
.page-banner__media { position: absolute; inset: 0; }
.page-banner__media img { width: 100%; height: 100%; object-fit: cover; }
.page-banner__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.94), rgba(11, 18, 32, 0.6));
}
.page-banner__inner { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; text-transform: uppercase; }
.page-banner p { color: rgba(255, 255, 255, 0.78); max-width: 620px; }
.breadcrumb-ers { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.breadcrumb-ers a { color: rgba(255, 255, 255, 0.85); }

/* ---------- 7. Sections ---------- */
/* Capability / service card */
.cap-card {
  background: #fff; border: 1px solid var(--ers-line); height: 100%;
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ers-ease), box-shadow 0.35s var(--ers-ease), border-color 0.35s var(--ers-ease);
}
.cap-card:hover { transform: translateY(-6px); box-shadow: var(--ers-shadow-md); border-color: transparent; }
.cap-card:hover .media-frame img { transform: scale(1.07); }
.cap-card__body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.cap-card__num {
  font-family: var(--ers-font-head); font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.2em; color: var(--ers-red);
}
.cap-card h3 { margin: 10px 0 10px; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.01em; }
.cap-card p { font-size: 0.95rem; }
.cap-card .link-arrow { margin-top: auto; padding-top: 14px; }

/* Icon tile */
.icon-tile {
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ers-blue); color: var(--ers-blue); border-radius: 2px;
  transition: background-color 0.3s var(--ers-ease), color 0.3s var(--ers-ease), transform 0.3s var(--ers-ease);
}
.icon-tile svg { width: 24px; height: 24px; }
.cap-card:hover .icon-tile,
.why-block:hover .icon-tile { background: var(--ers-blue); color: #fff; transform: translateY(-2px); }

/* Why-choose blocks (navy) */
.why-block {
  border-top: 2px solid rgba(255, 255, 255, 0.14); padding: 26px 0 0; height: 100%;
  transition: border-color 0.35s var(--ers-ease);
}
.why-block:hover { border-top-color: var(--ers-red); }
.why-block h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 16px 0 10px; }
.why-block p { font-size: 0.93rem; color: rgba(255, 255, 255, 0.65); margin: 0; }
.why-block .icon-tile { border-color: rgba(255, 255, 255, 0.35); color: #fff; }

/* Stats */
.stat { text-align: center; padding: 18px 8px; }
.stat__value {
  font-family: var(--ers-font-head); font-weight: 800; color: var(--ers-ink);
  font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1;
}
.section-navy .stat__value { color: #fff; }
.stat__label {
  margin-top: 10px; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ers-body);
}
.section-navy .stat__label { color: rgba(255, 255, 255, 0.6); }

/* Project card */
.project-card {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: #0d1526;
  overflow: hidden; text-align: left; color: #fff;
}
.project-card img { transition: transform 0.7s var(--ers-ease); }
.project-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.05) 35%, rgba(11, 18, 32, 0.9) 100%);
  transition: background 0.4s var(--ers-ease);
}
.project-card:hover img { transform: scale(1.08); }
.project-card:hover::after { background: linear-gradient(180deg, rgba(10, 74, 134, 0.3) 0%, rgba(11, 18, 32, 0.94) 100%); }
.project-card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 24px; }
.project-card__tag {
  display: inline-block; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--ers-red); color: #fff; padding: 5px 10px; margin-bottom: 10px;
}
.project-card h3 { color: #fff; font-size: 1.05rem; text-transform: uppercase; margin: 0; }
.project-card p { color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; margin: 8px 0 0; }

/* Alternating service rows */
.service-row { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--ers-line); }
.service-row:last-child { border-bottom: 0; }
.service-index {
  font-family: var(--ers-font-head); font-weight: 800; font-size: clamp(2.5rem, 6vw, 4rem);
  color: rgba(17, 24, 39, 0.1); line-height: 1;
}
.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li {
  position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 0.95rem;
}
.spec-list li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 12px; height: 2px; background: var(--ers-red);
}
.section-navy .spec-list li { color: rgba(255, 255, 255, 0.72); }

/* Process timeline */
.process-step { position: relative; padding-top: 34px; }
.process-step::before {
  content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: var(--ers-line);
}
.process-step__dot {
  position: absolute; left: 0; top: 5px; width: 16px; height: 16px; background: #fff;
  border: 3px solid var(--ers-blue); border-radius: 50%;
}
.process-step__num { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--ers-red); font-weight: 700; }
.process-step h3 { font-size: 0.95rem; text-transform: uppercase; margin: 6px 0 6px; letter-spacing: 0.06em; }
.process-step p { font-size: 0.88rem; margin: 0; }

/* Leadership / team */
.leader-card { background: #fff; border: 1px solid var(--ers-line); height: 100%; }
.leader-portrait {
  aspect-ratio: 4 / 5; background: linear-gradient(160deg, #0b1220 0%, #0b4a86 100%);
  display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.7);
  position: relative;
}
.leader-portrait .initials {
  font-family: var(--ers-font-head); font-size: 3rem; font-weight: 800; color: #fff; letter-spacing: 0.05em;
}
.leader-portrait .caption {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55);
}

/* Vision / mission cards */
.vm-card {
  border: 1px solid var(--ers-line); padding: 40px; height: 100%; background: #fff; position: relative;
}
.vm-card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 78px; background: var(--ers-blue); }
.vm-card.is-mission::before { background: var(--ers-red); }

/* Certified applicator badges */
.badge-brand {
  border: 1px solid var(--ers-line); padding: 22px 18px; text-align: center; background: #fff;
  font-family: var(--ers-font-head); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ers-ink); font-size: 0.9rem;
  transition: border-color 0.3s var(--ers-ease), transform 0.3s var(--ers-ease);
}
.badge-brand:hover { border-color: var(--ers-blue); transform: translateY(-3px); }
.badge-brand small { display: block; font-family: var(--ers-font-body); font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ers-body); font-size: 0.75rem; margin-top: 6px; }

/* CTA band */
.cta-band { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; color: #fff; overflow: hidden; }
.cta-band__media { position: absolute; inset: 0; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band__media::after { content: ""; position: absolute; inset: 0; background: rgba(11, 18, 32, 0.82); }
.cta-band__inner { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; text-transform: uppercase; }

/* Filters */
.filter-btn {
  background: transparent; border: 1px solid var(--ers-line); color: var(--ers-ink);
  font-family: var(--ers-font-head); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 11px 18px; border-radius: 2px; min-height: 44px;
  transition: all 0.25s var(--ers-ease);
}
.filter-btn:hover { border-color: var(--ers-blue); color: var(--ers-blue-deep); }
.filter-btn.is-active { background: var(--ers-navy); border-color: var(--ers-navy); color: #fff; }

/* Info tiles (contact) */
.info-tile { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--ers-line); }
.info-tile:last-child { border-bottom: 0; }
.info-tile h3 { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 6px; }
.info-tile p, .info-tile address { margin: 0; font-size: 0.95rem; font-style: normal; }

.map-placeholder {
  background: var(--ers-light); border: 1px dashed rgba(11, 74, 134, 0.35);
  padding: 42px 26px; text-align: center;
}

/* ---------- 8. Forms ---------- */
.form-label-ers {
  font-family: var(--ers-font-head); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ers-ink); margin-bottom: 8px; display: block;
}
.form-control-ers {
  width: 100%; border: 1px solid var(--ers-line); border-radius: 2px; padding: 14px 16px;
  font-size: 0.98rem; color: var(--ers-ink); background: #fff; min-height: 52px;
  transition: border-color 0.25s var(--ers-ease), box-shadow 0.25s var(--ers-ease);
}
.form-control-ers:focus {
  outline: none; border-color: var(--ers-blue); box-shadow: 0 0 0 3px rgba(10, 127, 212, 0.15);
}
.form-control-ers.is-invalid { border-color: var(--ers-red); }
.field-error { display: none; color: var(--ers-red); font-size: 0.8rem; margin-top: 6px; }
.field-error.is-visible { display: block; }
.form-note { font-size: 0.82rem; color: var(--ers-body); }
.form-success {
  display: none; border-left: 4px solid var(--ers-blue); background: var(--ers-light); padding: 22px 24px;
}
.form-success.is-visible { display: block; }

/* ---------- 9. Footer, back-to-top, floating CTA ---------- */
.ers-footer { background: var(--ers-navy); color: rgba(255, 255, 255, 0.62); padding: 70px 0 0; }
.ers-footer h4 {
  color: #fff; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 20px;
}
.ers-footer a { color: rgba(255, 255, 255, 0.68); font-size: 0.93rem; }
.ers-footer a:hover { color: #fff; }
.ers-footer ul { list-style: none; padding: 0; margin: 0; }
.ers-footer li { margin-bottom: 10px; }
.ers-footer .footer-logo {
  background: #fff;border-radius:11px; padding: 3px; display: inline-block; margin-bottom: 20px;
}
.ers-footer .footer-logo img { height: 106px;border-radius:11px; width: auto; }
.footer-bottom {
  margin-top: 54px; border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 22px 0;
  font-size: 0.82rem;
}

.back-to-top {
  position: fixed; right: 18px; bottom: 92px; z-index: 1030;
  width: 48px; height: 48px; border: 0; border-radius: 2px; background: var(--ers-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s var(--ers-ease), transform 0.3s var(--ers-ease), visibility 0.3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--ers-blue-deep); }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-cta a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 8px; font-family: var(--ers-font-head); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
}
.mobile-cta .call { background: var(--ers-navy); }
.mobile-cta .quote { background: var(--ers-red); }

/* ---------- 10. Animations ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s var(--ers-ease), transform 0.7s var(--ers-ease);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-reveal="left"] { transform: translateX(-30px); }
[data-reveal][data-reveal="right"] { transform: translateX(30px); }
[data-reveal].is-revealed { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__media img { animation: none; }
}

/* ---------- 11. Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar-header img{height:85px;}
    .ers-logo img{height:57px;}
  .ers-nav .navbar-collapse {
    background: #fff; border: 1px solid var(--ers-line); margin-top:0px; padding: 14px;
  }
  .ers-nav.is-transparent .navbar-collapse .nav-link { color: var(--ers-ink); }
  .ers-nav .nav-link { padding: 14px 6px; border-bottom: 1px solid var(--ers-line); }
  .ers-nav .nav-link::after { display: none; }
  .ers-nav .navbar-nav .nav-item:last-child .nav-link { border-bottom: 0; }
  .credibility .item { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .hero { min-height: auto; padding: 130px 0 70px; }
  .page-banner { padding: 150px 0 66px; }
  .corner-accent::after { display: none; }
}

@media (max-width: 767.98px) {
  body { padding-bottom: 54px; } /* space for mobile CTA bar */
  .mobile-cta { display: flex; }
  .back-to-top { bottom: 74px; }
  .vm-card { padding: 28px; }
  .cap-card__body { padding: 22px; }
  .hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.6rem); }
}

/* ---------- Project card (button element) internals ---------- */
.project-card .media-frame { display: block; }
.project-card__body { display: block; }
.pc-title {
  display: block; font-family: var(--ers-font-head); font-weight: 800; color: #fff;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.01em;
}
.pc-sub { display: block; color: rgba(255, 255, 255, 0.75); font-size: 0.88rem; margin-top: 8px; }

/* Keep wide gutters from overflowing the container on small screens */
@media (max-width: 767.98px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; --bs-gutter-y: 2rem; }
}

/* Fixed overlay header (hero and page banners reserve space for it) */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1040; }



  .leader-card {
    width: 100%;
  }

  .leader-portrait {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0b2745;
  }

  .leader-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
  }

  .leader-portrait:hover .leader-image {
    transform: scale(1.03);
  }

  .portrait-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(5, 24, 45, 0.65),
      rgba(5, 24, 45, 0.05) 45%,
      transparent 70%
    );
    pointer-events: none;
  }

  .caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 2;
  }

  .eyebrow {
    display: inline-block;
    position: relative;
    padding-left: 34px;
    margin-bottom: 12px;
    color: #0b3768;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .eyebrow::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 24px;
    height: 1px;
    background: #e21f26;
    transform: translateY(-50%);
  }

  .section-light h2 {
    margin: 0;
    color: #071b32;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
  }

  .rule {
    width: 48px;
    height: 2px;
    margin: 18px 0 0;
    border: 0;
    background: #e21f26;
    opacity: 1;
  }

  .lead-text {
    color: #29415c;
    font-size: 17px;
    line-height: 1.8;
  }

  .section-light p {
    color: #41556c;
    font-size: 15px;
    line-height: 1.8;
  }

  .expertise-title {
    margin-top: 28px;
    margin-bottom: 18px;
    color: #071b32;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .spec-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: #41556c;
    font-size: 14px;
    line-height: 1.6;
  }

  .spec-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 9px;
    height: 1px;
    background: #e21f26;
  }

  @media (max-width: 991px) {
    .leader-portrait {
      max-width: 450px;
      margin: 0 auto;
    }

    .section-light h2 {
      font-size: 2.4rem;
    }
  }

  @media (max-width: 767px) {
    .leader-portrait {
      aspect-ratio: 4 / 5;
    }

    .section-light h2 {
      font-size: 2rem;
    }

    .lead-text {
      font-size: 16px;
    }

    .section-light p {
      font-size: 14px;
    }
  }
