/* Fingertip expanding header menu */
:root {
  --fm-ink: #0b0b0f;
  --fm-muted: #8b8b93;
  --fm-hover: #a8152a;
  --fm-border: #d6d6db;
  --fm-cta: linear-gradient(100deg, #c9004a 0%, #ff0a2c 100%);
  --fm-radius: 12px;
  --fm-closed-w: 350px;
  --fm-open-w: 800px;
  --fm-ease: cubic-bezier(0.65, 0, 0.25, 1);
  --fm-speed: 0.5s;
}
.fm-header {
  position: fixed;
  inset: 24px 32px auto 32px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  padding-top: 30px;
}
.fm-header > * {
  pointer-events: auto;
}
.fm-logo {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0px 25px;
  background: #fff;
  border-radius: var(--fm-radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.fm-logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* Container: grows from the pill into the card, floating over the page (no layout push) */
.fm {
  position: relative;
  width: var(--fm-closed-w);
  background: #fff;
  border-radius: var(--fm-radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: width var(--fm-speed) var(--fm-ease);
}
.fm.is-open {
  width: min(var(--fm-open-w), calc(100vw - 64px));
}

.fm__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 35px;
  padding: 5px;
  box-sizing: border-box;
}
.fm__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  background: none;
  border: 0;
  color: var(--fm-ink);
}
.fm__toggle:focus-visible,
.fm a:focus-visible {
  outline: 2px solid var(--fm-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Hamburger -> X */
.fm__burger {
  position: relative;
  width: 20px;
  height: 14px;
}
.fm__burger i {
  position: absolute;
  left: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition:
    transform 0.4s var(--fm-ease),
    width 0.4s var(--fm-ease),
    opacity 0.2s,
    top 0.4s var(--fm-ease);
}
.fm__burger i:nth-child(1) {
  top: 0;
  width: 20px;
}
.fm__burger i:nth-child(2) {
  top: 6px;
  width: 14px;
}
.fm__burger i:nth-child(3) {
  top: 12px;
  width: 20px;
}
.fm__toggle:hover .fm__burger i:nth-child(2) {
  width: 20px;
}
.is-open .fm__burger i:nth-child(1) {
  top: 6px;
  width: 22px;
  transform: rotate(45deg);
}
.is-open .fm__burger i:nth-child(2) {
  opacity: 0;
}
.is-open .fm__burger i:nth-child(3) {
  top: 6px;
  width: 22px;
  transform: rotate(-45deg);
}

.fm__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 40px;
  background: var(--gradient);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 16px;
  transition:
    filter 0.2s,
    transform 0.2s;
}
.fm__cta:hover {
  filter: brightness(1.08);
}
.fm__cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s;
}
.fm__cta:hover svg {
  transform: rotate(45deg);
}

/* Panel: height animates 0 -> auto via grid rows */
.fm__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--fm-speed) var(--fm-ease);
}
.fm.is-open .fm__panel {
  grid-template-rows: 1fr;
}
.fm__panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.fm.is-open .fm__panel-inner {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.35s ease 0.18s,
    transform 0.45s var(--fm-ease) 0.18s;
}
.fm__panel-pad {
  padding: 28px 32px 32px;
}

.fm__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  align-items: start;
}
.fm__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.fm__links li {
  min-height: 75px;
}
.fm__links a,
.fm__links .fm-parent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--fm-ink);
}
.fm__links .fm-parent {
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fm-text {
  flex: 1;
  text-align: left;
}
.fm-chev {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  color: var(--fm-muted);
  transition:
    transform 0.35s var(--fm-ease),
    color 0.2s;
}
.is-sub-open > .fm-parent .fm-chev {
  transform: rotate(180deg);
  color: var(--fm-hover);
}
/* Sub menu: inline accordion under its parent */
.fm-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--fm-ease);
}
.is-sub-open > .fm-sub {
  grid-template-rows: 1fr;
}
.fm-sub__inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s 0.4s;
}
.is-sub-open > .fm-sub > .fm-sub__inner {
  visibility: visible;
  transition-delay: 0s;
}
.is-sub-open .fm-desc {
  display: none;
  transition: visibility 0s 0.4s;
}
.fm-sub > .fm-sub__inner li {
  min-height: 0;
  text-align: left;
}
.fm-sub ul {
  list-style: none;
  margin: 0;
  padding: 16px 0 2px 34px;
  display: grid;
  gap: 12px;
}
.fm-sub a {
  display: block;
  color: var(--fm-ink);
  transition: color 0.2s;
}
.fm-sub a:hover {
  color: var(--fm-hover);
}
.fm-title {
  display: block;
  font-weight: 600;
  transition: color 0.2s;
}
.fm-desc {
  display: block;
  margin-top: 6px;
  color: var(--fm-muted);
  transition: visibility 0s 0.4s;
}
.fm__links a:hover .fm-title,
.fm__links .fm-parent:hover .fm-title,
.fm__links .is-sub-open > .fm-parent .fm-title,
.fm__links .current-menu-item > a .fm-title {
  color: var(--fm-hover);
}

/* Icons: set via the "CSS Classes" field on each menu item. Default = fingerprint */
.fm-icon {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  background: linear-gradient(135deg, #d4004b, #c13cc2);
  -webkit-mask: var(--ic) center/contain no-repeat;
  mask: var(--ic) center/contain no-repeat;
  --ic: url("../assets/images/fingertip.svg");
}
.icon-education .fm-icon {
  --ic: url("../assets/images/educationalSupport.svg");
}
.icon-business .fm-icon {
  --ic: url("../assets/images/businessSupport.svg");
}
.icon-contact .fm-icon {
  --ic: url("../assets/images/contact.svg");
}

/* Social buttons (second menu location). Classes: icon-linkedin / icon-instagram / icon-x */
.fm__social {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: flex;
  gap: 12px;
}
.fm__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--fm-ink);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.fm__social a:hover {
  background: #f4f4f6;
  border-color: #9a9aa2;
}
.fm__social a::before {
  content: "";
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--ic) center/contain no-repeat;
  mask: var(--ic) center/contain no-repeat;
}
.fm__social .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fm__social .icon-linkedin {
  --ic: url("../assets/images/linkedinIcon.svg");
}
.fm__social .icon-instagram {
  --ic: url("../assets/images/instagramIcon.svg");
}
.fm__social .icon-x {
  --ic: url("../assets/images/xIcon.svg");
}

@media (max-width: 640px) {
  .fm-header {
    inset: 12px 12px auto 12px;
  }
  .fm {
    --fm-closed-w: auto;
  }
  .fm.is-open {
    width: calc(100vw - 24px);
  }
  .fm__cols {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .fm__panel-pad {
    padding: 20px 20px 24px;
  }
  .fm-logo {
    height: 48px;
  }
  .fm-logo img {
    height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fm,
  .fm__panel,
  .fm__panel-inner,
  .fm__burger i {
    transition-duration: 0.01s !important;
    transition-delay: 0s !important;
  }
}
