/*
 * Footer and mobile menu (feat/theme-footer-menu).
 * Loaded after the other theme styles. Site-wide link rules set
 * `color: inherit`, so link colours are set on the containers. Theme
 * headings and paragraphs force their colours with !important, so the
 * text colours here and the hover colours need !important too.
 */

/* ---------- Footer ---------- */

.bmg-foot {
  margin-top: 32px;
  background: #10223f;
  color: #e6ecf5;
  font-size: 1rem;
  line-height: 1.55;
}

.bmg-foot .bmg-foot__inner {
  padding: 56px 0 24px;
}

.bmg-foot .bmg-foot__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.bmg-foot .bmg-foot__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #e6ecf5;
}

.bmg-foot .bmg-foot__col h2 {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8a1f !important;
}

.bmg-foot .bmg-foot__col > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.bmg-foot a:hover,
.bmg-foot a:focus-visible {
  color: #ff8a1f !important;
}

.bmg-foot a:focus-visible {
  outline: 3px solid #ff8a1f;
  outline-offset: 3px;
  border-radius: 4px;
}

.bmg-foot .bmg-foot__logo img {
  display: block;
  width: 230px;
  height: auto;
}

.bmg-foot .bmg-foot__about p {
  margin: 12px 0 4px;
  max-width: 280px;
  color: #c8d3e3 !important;
}

.bmg-foot .bmg-foot__social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.bmg-foot .bmg-foot__social a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.bmg-foot .bmg-foot__social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bmg-foot .bmg-foot__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #2c3f5f;
  color: #c8d3e3;
  font-size: 0.95rem;
}

.bmg-foot .bmg-foot__bottom p {
  margin: 0;
  color: #c8d3e3 !important;
}

.bmg-foot .bmg-foot__bottom a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bmg-foot .bmg-foot__country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bmg-foot .bmg-foot__flag svg {
  display: block;
  width: 24px;
  height: 15px;
  border-radius: 2px;
}

@media (max-width: 920px) {
  .bmg-foot .bmg-foot__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 24px;
  }
}

@media (max-width: 600px) {
  .bmg-foot .bmg-foot__inner {
    padding: 44px 0 24px;
  }

  .bmg-foot .bmg-foot__cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    text-align: center;
  }

  .bmg-foot .bmg-foot__col {
    align-items: center;
  }

  .bmg-foot .bmg-foot__col > a {
    min-height: 52px;
    font-size: 1.12rem;
  }

  .bmg-foot .bmg-foot__about p {
    margin-inline: auto;
  }

  .bmg-foot .bmg-foot__social {
    justify-content: center;
  }

  .bmg-foot .bmg-foot__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Mobile menu: slide-in panel ---------- */

body.bmg-menu-open {
  overflow: hidden;
}

.bmg-drawer {
  position: fixed;
  inset: 0;
  z-index: 100000; /* above the WordPress admin bar (99999) */
}

.bmg-drawer[hidden] {
  display: none;
}

.bmg-drawer .bmg-drawer__shade {
  position: absolute;
  inset: 0;
  background: rgba(16, 34, 63, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bmg-drawer .bmg-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-y: auto;
  background: #ffffff;
  color: #10223f;
  box-shadow: -8px 0 30px rgba(16, 34, 63, 0.25);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}

.bmg-drawer.is-open .bmg-drawer__shade {
  opacity: 1;
}

.bmg-drawer.is-open .bmg-drawer__panel {
  transform: translateX(0);
}

.bmg-drawer .bmg-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bmg-drawer .bmg-drawer__logo img {
  display: block;
  width: 170px;
  height: auto;
}

.bmg-drawer .bmg-drawer__close {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: #f4f1ea;
  color: #10223f;
  cursor: pointer;
}

.bmg-drawer svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.bmg-drawer .bmg-drawer__links a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 0 8px;
  border-bottom: 1px solid #eee7da;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  color: #10223f;
}

.bmg-drawer .bmg-drawer__links svg {
  color: #ef7411;
}

.bmg-drawer .bmg-drawer__links a:hover {
  color: #ef7411 !important;
}

.bmg-drawer .bmg-drawer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-top: auto;
  border-radius: 14px;
  background: #ff8a1f;
  color: #10223f !important;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.bmg-drawer a:focus-visible,
.bmg-drawer button:focus-visible {
  outline: 3px solid #ef7411;
  outline-offset: 2px;
}

@media (min-width: 921px) {
  .bmg-drawer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bmg-drawer .bmg-drawer__panel,
  .bmg-drawer .bmg-drawer__shade {
    transition: none;
  }
}

/* Hide the cookie banner while the phone menu is open; it comes back when the menu closes. */
body.bmg-menu-open #bmg-cookie-consent {
  display: none;
}

/* Phones: keep the cookie banner above the bottom menu bar instead of covering it. */
@media (max-width: 920px) {
  body:has(.bmg-bottom-nav) #bmg-cookie-consent {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

/* Phones: overflow-x hidden on html/body stopped the sticky top header; clip still stops sideways scroll but lets it stick. */
@media (max-width: 920px) {
  @supports (overflow: clip) {
    html:root,
    body:not(.wp-admin) {
      overflow-x: clip;
    }
  }
}
