.srf-mobile-menu {
  display: none;
}

@media (max-width: 760px) {
  .srf-master-nav {
    display: none !important;
  }

  .srf-mobile-menu {
    display: block;
    width: 100%;
    position: relative;
    z-index: 80;
    background: #071d3b;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid #1767ae;
    font-family: Arial, Helvetica, sans-serif;
  }

  .srf-mobile-menu button,
  .srf-mobile-menu a {
    -webkit-tap-highlight-color: transparent;
  }

  .srf-mobile-menu__toggle {
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    border-radius: 0;
    background: #071d3b;
    color: #fff;
    cursor: pointer;
    font: 800 15px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  .srf-mobile-menu__toggle:focus-visible,
  .srf-mobile-menu__expand:focus-visible,
  .srf-mobile-menu a:focus-visible {
    outline: 3px solid #ff8a1f;
    outline-offset: -3px;
  }

  .srf-mobile-menu__hamburger {
    width: 25px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 25px;
  }

  .srf-mobile-menu__hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: #ff8a1f;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .srf-mobile-menu__toggle[aria-expanded="true"] .srf-mobile-menu__hamburger span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .srf-mobile-menu__toggle[aria-expanded="true"] .srf-mobile-menu__hamburger span:nth-child(2) {
    opacity: 0;
  }

  .srf-mobile-menu__toggle[aria-expanded="true"] .srf-mobile-menu__hamburger span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .srf-mobile-menu__panel {
    width: 100%;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #052f5c;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
  }

  .srf-mobile-menu__panel[hidden],
  .srf-mobile-menu__submenu[hidden] {
    display: none !important;
  }

  .srf-mobile-menu__home,
  .srf-mobile-menu__direct,
  .srf-mobile-menu__hub,
  .srf-mobile-menu__submenu a {
    color: #fff !important;
    text-decoration: none !important;
  }

  .srf-mobile-menu__home,
  .srf-mobile-menu__direct {
    min-height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
    font-weight: 800;
  }

  .srf-mobile-menu__row {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .srf-mobile-menu__hub {
    min-height: 52px;
    padding: 0 0 0 18px;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
  }

  .srf-mobile-menu__expand {
    width: 54px;
    min-height: 52px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    cursor: pointer;
  }

  .srf-mobile-menu__chevron {
    width: 11px;
    height: 11px;
    border-right: 3px solid #ff8a1f;
    border-bottom: 3px solid #ff8a1f;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 160ms ease;
  }

  .srf-mobile-menu__expand[aria-expanded="true"] .srf-mobile-menu__chevron {
    transform: translateY(3px) rotate(-135deg);
  }

  .srf-mobile-menu__submenu {
    padding: 5px 0 8px;
    background: #041f3d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .srf-mobile-menu__submenu a {
    min-height: 46px;
    padding: 10px 18px 10px 34px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
  }

  .srf-mobile-menu__submenu a::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #ff8a1f;
    content: "";
  }

  .srf-mobile-menu a[aria-current="page"] {
    color: #ff9a3c !important;
    background: rgba(245, 130, 32, 0.09);
  }

  .srf-mobile-menu__home:active,
  .srf-mobile-menu__direct:active,
  .srf-mobile-menu__hub:active,
  .srf-mobile-menu__submenu a:active,
  .srf-mobile-menu__expand:active {
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .srf-mobile-menu__hamburger span,
  .srf-mobile-menu__chevron {
    transition: none;
  }
}

/* Hide every existing desktop navigation variant only on phones. */
@media (max-width: 760px) {
  .srf-master-nav,
  .srf-desktop-added-nav,
  header > nav {
    display: none !important;
  }

  .srf-mobile-menu,
  .srf-mobile-menu * {
    box-sizing: border-box;
  }
}

/* Gas Safe credentials card: preserve its true 3:2 shape. */
/* Keep the 3:2 Gas Safe credentials graphic in its natural proportions. */
.gassafe-credential.physical-card,
.gassafe-credential.physical-card .gas-card {
  height: auto !important;
  min-height: 0 !important;
}

.gassafe-credential.physical-card .gas-card img,
.physical-card .gas-card img[alt="SR Francis Gas Safe Registered credentials"] {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

@media (max-width: 600px) {
  .gassafe-credential.physical-card .gas-card img,
  .physical-card .gas-card img[alt="SR Francis Gas Safe Registered credentials"] {
    max-width: 320px !important;
  }
}
