/* ===========================================================================
   MMEP shared UI  —  floating WhatsApp widget, About Us section nav,
   EPCM delivery-model diagram, 404 page.
   Loaded on every page. Brand: navy #102a46 / green #00a050.
   =========================================================================== */

/* ------------------------------------------------- Header nav dropdown */
/* "About Us" flyout in the main header nav. Reveals on hover and on
   keyboard focus (focus-within). The dropdown carries its own dark
   background so it reads on every page, over hero or plain header alike. */
.main-nav li.has-dropdown { position: relative; }

.main-nav li.has-dropdown > .nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #0a1c33;
  background: linear-gradient(270deg, #0a1c33, #102a46);
  border-top: 2.5px solid #00a050;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 100;
}

.main-nav li.has-dropdown:hover > .nav-dropdown,
.main-nav li.has-dropdown:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .nav-dropdown li {
  height: auto;
  display: block;
  margin: 0;
}

.main-nav .nav-dropdown a {
  display: block;
  padding: 10px 22px;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .18s ease;
}

.main-nav .nav-dropdown a:hover,
.main-nav .nav-dropdown a:focus {
  background: rgba(0, 160, 80, .22);
}

/* The header bar clips its overflow (a bare `.inner{overflow:auto}` rule in the
   base theme leaks onto `header .inner`), which chops the dropdown off at the
   bar's edge. Force the header chain to overflow:visible so the menu can drop
   past it, and lift the header's stacking context above the page sections so it
   overlays whatever sits below. Desktop only (>=1200px) — below that the same
   <nav> becomes the full-screen slide-in overlay, which must keep its own
   clipping/scroll behaviour. */
@media (min-width: 1200px) {
  header { z-index: 1000; }
  header .inner,
  header .inner .more-inner,
  .nav-wrapper,
  .main-nav,
  .main-nav > ul,
  .main-nav > ul > li.has-dropdown { overflow: visible; }
}

/* ---------------------------------------------------------------- WhatsApp */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  /* keep clear of iOS home indicator */
  margin-bottom: env(safe-area-inset-bottom, 0);
}

.wa-float__btn {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(16, 42, 70, .28);
  transition: transform .22s ease, box-shadow .22s ease;
}

.wa-float__btn svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  display: block;
}

/* pulsing ring */
.wa-float__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  opacity: .55;
  z-index: -1;
  animation: wa-pulse 2.4s cubic-bezier(.4, 0, .6, 1) infinite;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.65); opacity: 0;   }
  100% { transform: scale(1.65); opacity: 0;   }
}

/* hover label — hidden until hover, and never on touch/small screens */
.wa-float__label {
  background: #102a46;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 40px;
  box-shadow: 0 6px 20px rgba(16, 42, 70, .22);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  order: -1; /* sit to the left of the button */
}

.wa-float:hover .wa-float__btn,
.wa-float:focus-visible .wa-float__btn {
  transform: scale(1.07);
  box-shadow: 0 10px 28px rgba(16, 42, 70, .36);
}

.wa-float:hover .wa-float__label,
.wa-float:focus-visible .wa-float__label {
  opacity: 1;
  transform: translateX(0);
}

.wa-float:focus-visible {
  outline: 3px solid #00a050;
  outline-offset: 4px;
  border-radius: 40px;
}

@media (max-width: 620px) {
  .wa-float { right: 16px; bottom: 16px; }
  .wa-float__btn { width: 54px; height: 54px; }
  .wa-float__btn svg { width: 29px; height: 29px; }
  .wa-float__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float__btn::before { animation: none; }
  .wa-float__btn,
  .wa-float__label { transition: none; }
}

@media print {
  .wa-float { display: none; }
}

/* ------------------------------------------------- About Us: section nav */
.mmep-subnav {
  position: relative;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid #e4e9ef;
  box-shadow: 0 6px 18px rgba(16, 42, 70, .05);
}

.mmep-subnav__wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.mmep-subnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mmep-subnav ul::-webkit-scrollbar { display: none; }

.mmep-subnav li { flex: 0 0 auto; }

.mmep-subnav a {
  display: block;
  padding: 20px 18px 17px;
  color: #102a46;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.mmep-subnav a:hover,
.mmep-subnav a:focus-visible {
  color: #00a050;
  border-bottom-color: rgba(0, 160, 80, .4);
  background: rgba(0, 160, 80, .04);
}

.mmep-subnav a[aria-current="page"] {
  color: #00a050;
  border-bottom-color: #00a050;
}

@media (max-width: 620px) {
  .mmep-subnav__wrap { padding: 0 14px; }
  .mmep-subnav a { padding: 16px 12px 13px; font-size: 12.5px; letter-spacing: .06em; }
}

/* ------------------------------------------------ EPCM delivery diagram */
.mmep-epcm {
  position: relative;
  background: #f6f8fa;
  padding: 88px 0 92px;
}

.mmep-epcm .wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.mmep-epcm__intro {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.mmep-epcm__intro .subtitle {
  display: inline-block;
  color: #00a050;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}

.mmep-epcm__intro h2 {
  color: #00a050;
  font-size: 38px;
  line-height: 1.14;
  margin: 0 0 18px;
  font-weight: 700;
}

.mmep-epcm__intro p {
  color: #102a46;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  opacity: .92;
}

.mmep-epcm__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}

.mmep-epcm__figure { margin: 0; }

.epcm-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 640px;
  margin: 0 auto;
  font-family: inherit;
  overflow: visible;
}

.epcm-svg .epcm-stage circle,
.epcm-svg .epcm-fn circle { transition: opacity .2s ease; }

.mmep-epcm__figure figcaption {
  margin-top: 18px;
  text-align: center;
  color: #5a6b7d;
  font-size: 13.5px;
  line-height: 1.55;
}

.mmep-epcm__key { margin: 0; }

.mmep-epcm__key h3 {
  color: #102a46;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

.mmep-epcm__key > p {
  color: #3a4a5c;
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 26px;
}

.mmep-epcm__legend {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.mmep-epcm__legend li {
  position: relative;
  padding: 0 0 0 30px;
  margin: 0 0 16px;
  color: #3a4a5c;
  font-size: 15.5px;
  line-height: 1.6;
}

.mmep-epcm__legend li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.mmep-epcm__legend li.is-ring::before {
  background: #fff;
  border: 2px solid #102a46;
}

.mmep-epcm__legend li.is-core::before { background: #00a050; }
.mmep-epcm__legend li.is-hub::before  { background: #102a46; }

.mmep-epcm__legend strong {
  display: block;
  color: #102a46;
  font-weight: 700;
  margin-bottom: 2px;
}

@media (max-width: 980px) {
  .mmep-epcm__grid { grid-template-columns: 1fr; gap: 40px; }
  .mmep-epcm__intro h2 { font-size: 32px; }
  .mmep-epcm__key { max-width: 640px; margin: 0 auto; }
}

@media (max-width: 620px) {
  .mmep-epcm { padding: 58px 0 62px; }
  .mmep-epcm .wrapper { padding: 0 22px; }
  .mmep-epcm__intro h2 { font-size: 27px; }
  .mmep-epcm__intro p { font-size: 16px; }
  /* the ring labels get too small to read below ~360px of SVG width */
  .epcm-svg { min-width: 320px; }
  .mmep-epcm__figure { overflow-x: auto; }
}

/* --------------------------------------------------------------- 404 page */
.mmep-404 {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  background: #102a46;
}

.mmep-404__inner { max-width: 620px; }

.mmep-404 .code {
  display: block;
  color: #00a050;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.mmep-404 h1 {
  color: #fff;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 18px;
}

.mmep-404 p {
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 32px;
}

.mmep-404__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.mmep-404__links a {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  background: #00a050;
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}

.mmep-404__links a.is-ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}

.mmep-404__links a:hover { transform: translateY(-2px); background: #008742; }
.mmep-404__links a.is-ghost:hover { background: rgba(255, 255, 255, .1); }

@media (max-width: 620px) {
  .mmep-404 h1 { font-size: 30px; }
  .mmep-404 p { font-size: 16px; }
}

/* ------------------------------------------------- Background videos */
/* The hero and the "Why choose MMEP?" panel play a self-hosted MP4. The
   <video> now sits in the markup so it autoplays with no JavaScript; these
   rules replace the 100vw/56.25vw cover hack that the old YouTube iframe
   needed — object-fit does the job properly for a real video element. */
.hero-yt #mmep-hero-player {
  position: absolute;
  top: 0;
  left: 0;
  transform: none;
  -webkit-transform: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.mmep-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
  background: #102a46;
}

/* The separate poster overlay <img> is gone — each <video> carries its own
   poster="" attribute, so the still frame shows until playback starts and
   stays put if the MP4 never loads. No JavaScript involved either way. */

/* ===========================================================================
   Contact Us — "Talk to our engineers" job-card enquiry form
   Two columns: contact channels on the left, the enquiry form on the right.
   The form gathers who the client is, what commodity/stage they are at and a
   tick-list of what they need, so the team can triage before replying.
   =========================================================================== */
.mmep-contact { padding: 70px 0 80px; }

.mmep-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}

/* ------------------------------------------------- Left column */
.mmep-contact__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #00a050;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.mmep-contact__eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: #00a050;
}

.mmep-contact__title {
  color: #102a46;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.mmep-contact__intro {
  color: #445a72;
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 32px;
  max-width: 46ch;
}

.mmep-contact__list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.mmep-contact__list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.mmep-contact__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #102a46;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mmep-contact__icon svg { width: 20px; height: 20px; }

.mmep-contact__label {
  display: block;
  color: #00a050;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mmep-contact__list a,
.mmep-contact__plain {
  display: block;
  color: #102a46;
  font-size: 16px;
  line-height: 1.55;
  text-decoration: none;
}

.mmep-contact__list a:hover,
.mmep-contact__list a:focus { color: #00a050; }

.mmep-contact__card {
  background: #f2f6fa;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  padding: 22px 24px;
}

.mmep-contact__card + .mmep-contact__card { margin-top: 18px; }

.mmep-contact__card dl { margin: 0; }

.mmep-contact__card dt {
  color: #6b7f96;
  font-size: 13px;
  margin-top: 12px;
}

.mmep-contact__card dt:first-of-type { margin-top: 0; }

.mmep-contact__card dd {
  margin: 2px 0 0;
  color: #102a46;
  font-size: 14px;
  line-height: 1.5;
}

/* ------------------------------------------------- Form card */
.mmep-contact__formwrap {
  background: #fff;
  border: 1px solid #dbe5ee;
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 18px 44px rgba(16, 42, 70, .07);
}

.mmep-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.mmep-form__field { margin-bottom: 20px; }
.mmep-form__row .mmep-form__field { margin-bottom: 0; }
.mmep-form__row + .mmep-form__row,
.mmep-form__row + .mmep-form__field,
.mmep-form__row + .mmep-form__checklist { margin-top: 20px; }
.mmep-form__field--half { max-width: calc(50% - 11px); }

.mmep-form label {
  display: block;
  color: #102a46;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}

.mmep-form .req { color: #00a050; }

.mmep-form input[type="text"],
.mmep-form input[type="email"],
.mmep-form input[type="tel"],
.mmep-form select,
.mmep-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cfdbe6;
  border-radius: 8px;
  background: #fff;
  color: #102a46;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease;
}

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

.mmep-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23445a72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 17px;
}

.mmep-form input:focus,
.mmep-form select:focus,
.mmep-form textarea:focus {
  outline: none;
  border-color: #00a050;
  box-shadow: 0 0 0 3px rgba(0, 160, 80, .16);
}

.mmep-form .is-invalid { border-color: #d0453b; }

/* ------------------------------------------------- "What do you need" ticklist */
.mmep-form__checklist {
  border: 1px solid #dbe5ee;
  border-radius: 10px;
  background: #f7fafc;
  padding: 18px 20px 6px;
  margin: 0 0 20px;
}

/* float + full width makes the legend behave as an ordinary block, so a
   wrapped hint cannot straddle the fieldset border on narrow screens. */
.mmep-form__checklist legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0;
  color: #102a46;
  font-size: 14px;
  font-weight: 700;
}

.mmep-form__checklist legend + * { clear: both; }

.mmep-form__hint {
  color: #6b7f96;
  font-weight: 400;
  font-size: 13px;
}

.mmep-form__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
  margin-top: 10px;
}

.mmep-form__checks label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: #2c4056;
  cursor: pointer;
}

.mmep-form__checks input[type="checkbox"] {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #00a050;
  cursor: pointer;
}

/* ------------------------------------------------- Actions & status */
.mmep-form__actions { margin-top: 26px; }

.mmep-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: 0;
  border-radius: 40px;
  background: #00a050;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.mmep-form__submit:hover:not(:disabled) { background: #008742; transform: translateY(-2px); }
.mmep-form__submit:disabled { opacity: .6; cursor: default; }

.mmep-form__note {
  margin: 14px 0 0;
  color: #6b7f96;
  font-size: 13px;
  line-height: 1.6;
}

.mmep-form__status {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.55;
}

.mmep-form__status.is-ok { background: #e6f6ed; color: #0a6b3c; border: 1px solid #b6e3ca; }
.mmep-form__status.is-error { background: #fdeceb; color: #96271f; border: 1px solid #f4c7c3; }

/* Honeypot — off-screen for bots, invisible and unfocusable for people. */
.mmep-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .mmep-contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .mmep-contact__intro { max-width: none; }
}

@media (max-width: 640px) {
  .mmep-contact { padding: 48px 0 56px; }
  .mmep-contact__title { font-size: 27px; }
  .mmep-contact__formwrap { padding: 24px 20px; }
  .mmep-form__row { grid-template-columns: 1fr; }
  .mmep-form__row .mmep-form__field + .mmep-form__field { margin-top: 20px; }
  .mmep-form__checks { grid-template-columns: 1fr; }
  .mmep-form__field--half { max-width: none; }
  .mmep-form__submit { width: 100%; justify-content: center; }
}

/* ===========================================================================
   Projects list — grouped headings ("Projects in progress" / "Recent projects
   completed" / "Selected earlier assignments") and a two-up card grid on
   desktop so the full project record stays scannable.
   =========================================================================== */
.mmep-projects__group {
  margin: 8px 0 30px;
  padding-top: 18px;
  border-top: 1px solid #dbe5ee;
}

.mmep-projects__group:first-child { border-top: 0; padding-top: 0; }

.mmep-projects__group h2 {
  margin: 0 0 10px;
  color: #102a46;
  font-size: 30px;
  font-weight: 350;
  line-height: 1.2;
}

.mmep-projects__group p {
  margin: 0;
  max-width: 720px;
  color: #4a5f77;
  font-size: 16px;
  line-height: 1.6;
}

@media (min-width: 960px) {
  .CaseStudiesList .content-overlay .flex-row .flex-item {
    width: 49%;
    min-height: 420px;
    margin-bottom: 24px;
  }
  .CaseStudiesList .content-overlay .flex-row .flex-item .text-container { padding: 44px 40px; }
  .CaseStudiesList .content-overlay .flex-row .flex-item .text-container .text-wrapper .title { font-size: 26px; }
  .CaseStudiesList .content-overlay .flex-row .flex-item .text-container .text-wrapper p { font-size: 15px; }
}

@media (max-width: 959px) {
  .mmep-projects__group h2 { font-size: 24px; }
}

/* ===========================================================================
   Integrated multidisciplinary framework (/what-we-do/#framework) — the seven
   MMEP divisions and the roles that sit inside each one.
   =========================================================================== */
.mmep-framework {
  position: relative;
  background: #f6f9fc;
  padding: 88px 0 84px;
}

.mmep-framework .wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.mmep-card--framework { border-top-color: #102a46; }

.mmep-roles {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #e4e9ef;
}

.mmep-roles li {
  position: relative;
  padding-left: 18px;
  margin-top: 8px;
  color: #4a5f77;
  font-size: 14px;
  line-height: 1.5;
}

.mmep-roles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00a050;
}

.mmep-framework__close {
  max-width: 900px;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid #dbe5ee;
  color: #102a46;
  font-size: 17px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .mmep-framework { padding-top: 56px; }
  .mmep-framework .wrapper { padding: 0 22px; }
}
