/* ==========================================================================
   FullyCoded Overlay Menu, aligned to site header and container,
   slightly above vertical centre, 80px max clamp, white links always, 500 weight
   ========================================================================== */

/* Overlay container */
.fc-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0ms linear 240ms;

  background: radial-gradient(
      1200px 800px at 20% 10%,
      rgba(40, 60, 180, 0.22),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 75% 35%,
      rgba(40, 60, 180, 0.16),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(4, 7, 30, 0.98), rgba(2, 6, 30, 0.98));

  color: #fff;

  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.fc-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 240ms ease, visibility 0ms linear 0ms;
}

body.fc-menu-open {
  overflow: hidden;
}

/* Overlay header bar */
.fc-menu-header {
  position: sticky;
  top: 0;
  z-index: 3;
  flex: 0 0 auto;
  padding: 1rem 0;
  border: 0;
  border-bottom: 0 !important;
}

.fc-menu-header .navbar {
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
}

.fc-menu-header .navbar-brand {
  padding: 0;
  margin: 0;
}

.fc-menu-header .navbar-brand img {
  height: 40px;
  display: block;
}

.fc-menu-header .ms-auto {
  display: flex;
  align-items: center;
  border: 0;
}

/* Same width as site, space under the header */
.fc-menu-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 120px;
  padding-bottom: 56px;
}

/* Main area layout */
.fc-menu-main {
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: auto auto;
  column-gap: 80px;
  row-gap: 24px;
  align-items: start;
}

.fc-menu-nav {
  min-width: 0;
  grid-column: 1;
  grid-row: 2;
  padding-left: 60px;
}

/* Contact info sidebar */
.fc-menu-contact {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #fff;
  font-size: 20px;
  line-height: 1.6;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 80px;
}

/* Back button */
.fc-menu-back {
  appearance: none;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 12px;

  font-size: 22px;
  padding: 10px 0;
  padding-left: 60px;
  opacity: 0.9;
  grid-column: 1;
  grid-row: 1;
}

.fc-menu-back:hover {
  opacity: 1;
}

/* Menu list */
.fc-menu-view {
  list-style: none;
  margin: 0;
  padding: 0;

  max-width: 100%;

  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.fc-menu-view.is-fading {
  opacity: 0;
  transform: translateY(8px);
}

.fc-menu-item {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Link row, full width, no wrapping, ALWAYS white including visited */
.fc-menu-link,
.fc-menu-link:visited,
.fc-menu-link:hover,
.fc-menu-link:active,
.fc-menu-link:focus {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;

  color: #fff !important;
  text-decoration: none;

  font-size: clamp(28px, 2.2vw + 0.6rem, 31px);
  line-height: clamp(34px, 2.6vw + 0.8rem, 41px);

  letter-spacing: -0.02em;
  font-weight: 500;

  padding: 6px 0;

  white-space: normal;
  flex-wrap: nowrap;
}

.fc-menu-text {
  flex: 1;
  min-width: 0;
  max-width: 350px;
}

/* Arrow inside link, pushed right */
.fc-menu-arrow {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  opacity: 0.9;
  flex: 0 0 auto;
}

/* Close button in same position as burger */
.fc-menu-close {
  appearance: none;
  background: transparent;
  border: 0;
  border-top: 0 !important;
  color: #fff;
  cursor: pointer;

  width: 48px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  opacity: 0.95;
  padding: 0;
  margin: 0;
}

.fc-menu-close:hover {
  opacity: 1;
}

.fc-menu-close span {
  position: relative;
  display: block;
  width: 34px;
  height: 22px;
}

.fc-menu-close span::before,
.fc-menu-close span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  transform-origin: center;
}

.fc-menu-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.fc-menu-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Burger button style */
.fc-burger {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;

  width: 48px;
  height: 40px;

  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0;
}

/* Only style burger's direct spans */
.fc-burger > span {
  display: block;
  height: 2px;
  width: 34px;
  background: rgba(255, 255, 255, 0.9);
}

/* Hide burger button in overlay menu (but not the close button) */
.fc-menu-overlay .fc-burger:not(.fc-menu-close) {
  display: none !important;
}

/* Ensure close button shows properly */
.fc-menu-overlay .fc-menu-close {
  display: inline-flex !important;
}

/* Remove burger line styles from close button spans */
.fc-menu-close > span {
  background: transparent !important;
  font-size: 0 !important;
  color: transparent !important;
}

/* Mobile layout */
@media (max-width: 900px) {
  .fc-menu-shell {
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .fc-menu-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .fc-menu-nav {
    text-align: center;
    margin-top: 60px;
    padding-left: 0;
  }

  .fc-menu-back {
    align-self: flex-start;
    font-size: 18px;
    order: -1;
    padding-left: 0;
  }

  .fc-menu-link,
  .fc-menu-link:visited,
  .fc-menu-link:hover,
  .fc-menu-link:active,
  .fc-menu-link:focus {
    justify-content: center;
    white-space: normal;
    flex-wrap: wrap;
    font-size: clamp(22px, 4.5vw + 0.4rem, 32px);
    line-height: clamp(28px, 5.2vw + 0.5rem, 38px);
  }

  .fc-menu-arrow {
    display: none;
  }

  .fc-menu-contact {
    display: none;
  }
}
