/* IBEJ Mega Navigation v1.2.1 */
:root {
  --ibej-mega-dark: #0b2329;
  --ibej-mega-dark-2: #102f37;
  --ibej-mega-ink: #15262c;
  --ibej-mega-muted: #657477;
  --ibej-mega-line: #dbe7eb;
  --ibej-mega-soft: #f5fbfd;
  --ibej-mega-blue: #3c9bc6;
  --ibej-mega-blue-2: #77c7e8;
  --ibej-mega-top: 88px;
}

@media (max-width: 1024px) {
  #ibej-mega-navigation { display: none !important; }
}

@media (min-width: 1025px) {
  .ibej-mega-trigger > .qodef-drop-down-second { display: none !important; }

  .ibej-mega {
    position: fixed;
    inset: var(--ibej-mega-top) 0 0;
    z-index: 99990;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility 0s linear .18s;
  }

  .ibej-mega.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  .ibej-mega__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 22, 27, .34);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .2s ease;
  }

  .ibej-mega.is-open .ibej-mega__backdrop { opacity: 1; }

  .ibej-mega__surface {
    position: relative;
    width: 100%;
    max-height: min(720px, calc(100dvh - var(--ibej-mega-top) - 18px));
    overflow: auto;
    background: #fff;
    border-top: 1px solid rgba(21, 38, 44, .08);
    box-shadow: 0 24px 60px rgba(5, 25, 31, .18);
    transform: translateY(-10px);
    opacity: 0;
    transition: transform .24s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
    scrollbar-width: thin;
  }

  .ibej-mega.is-open .ibej-mega__surface {
    transform: translateY(0);
    opacity: 1;
  }

  .ibej-mega__close {
    position: absolute;
    top: 17px;
    right: 28px;
    z-index: 4;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ibej-mega-line);
    border-radius: 50%;
    background: #fff;
    color: var(--ibej-mega-ink);
    font-family: inherit;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
  }

  .ibej-mega__close:hover,
  .ibej-mega__close:focus-visible {
    color: #fff;
    background: var(--ibej-mega-dark);
    border-color: var(--ibej-mega-dark);
    outline: 0;
  }

  .ibej-mega__panel {
    display: none;
    width: min(1500px, calc(100% - 64px));
    margin: 0 auto;
    padding: 34px 0 30px;
  }

  .ibej-mega__panel.is-active { display: block; }

  .ibej-mega__inner {
    display: grid;
    grid-template-columns: minmax(260px, .82fr) minmax(620px, 2.25fr) minmax(250px, .78fr);
    gap: 18px;
    align-items: stretch;
  }

  .ibej-mega__eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--ibej-mega-blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.3;
  }

  .ibej-mega h2,
  .ibej-mega h3,
  .ibej-mega p { margin: 0; }

  .ibej-mega a { text-decoration: none; }

  .ibej-mega__intro,
  .ibej-mega__rail {
    min-height: 100%;
    padding: 31px 30px;
    border: 1px solid var(--ibej-mega-line);
    background: var(--ibej-mega-soft);
  }

  .ibej-mega__intro h2 {
    margin-bottom: 17px;
    color: var(--ibej-mega-ink);
    font-size: clamp(25px, 2vw, 36px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.035em;
  }

  .ibej-mega__intro p,
  .ibej-mega__rail p {
    color: var(--ibej-mega-muted);
    font-size: 13px;
    line-height: 1.7;
  }

  .ibej-mega__intro--dark {
    background: var(--ibej-mega-dark);
    border-color: var(--ibej-mega-dark);
  }

  .ibej-mega__intro--dark h2 { color: #fff; }
  .ibej-mega__intro--dark p { color: #b8c9ce; }
  .ibej-mega__intro--dark .ibej-mega__eyebrow { color: var(--ibej-mega-blue-2); }

  .ibej-mega__intro-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin-top: 27px;
    color: var(--ibej-mega-ink);
    font-size: 12px;
    font-weight: 650;
  }

  .ibej-mega__intro--dark .ibej-mega__intro-link { color: #fff; }
  .ibej-mega__intro-link span { color: var(--ibej-mega-blue); }

  .ibej-mega__expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ibej-mega__expertise-card {
    position: relative;
    min-height: 190px;
    padding: 22px 23px 20px;
    border: 1px solid var(--ibej-mega-line);
    background: #fff;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }

  .ibej-mega__expertise-card:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--ibej-mega-blue);
    transition: width .3s ease;
  }

  .ibej-mega__expertise-card:hover {
    transform: translateY(-2px);
    border-color: #bddce8;
    box-shadow: 0 12px 26px rgba(17, 50, 60, .08);
  }
  .ibej-mega__expertise-card:hover:after { width: 100%; }

  .ibej-mega__card-top,
  .ibej-mega__knowledge-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ibej-mega__card-top > span {
    color: var(--ibej-mega-blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
  }

  .ibej-mega__card-top > a,
  .ibej-mega__knowledge-title > a {
    color: var(--ibej-mega-ink);
    font-size: 16px;
  }

  .ibej-mega__expertise-card h3 {
    margin: 10px 0 7px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
  }
  .ibej-mega__expertise-card h3 a { color: var(--ibej-mega-ink); }
  .ibej-mega__expertise-card p {
    max-width: 92%;
    color: var(--ibej-mega-muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .ibej-mega__mini-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 13px;
  }

  .ibej-mega__mini-tools a {
    color: #40565d;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
  }
  .ibej-mega__mini-tools a:hover { color: var(--ibej-mega-blue); }
  .ibej-mega__mini-tools span { margin-left: 2px; }

  .ibej-mega__rail h3 {
    margin-bottom: 9px;
    color: var(--ibej-mega-ink);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
  }

  .ibej-mega__tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--ibej-mega-line);
    color: var(--ibej-mega-ink);
  }
  .ibej-mega__tool-link:first-of-type { margin-top: 16px; border-top: 1px solid var(--ibej-mega-line); }
  .ibej-mega__tool-link small {
    display: block;
    margin-bottom: 2px;
    color: #849398;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .ibej-mega__tool-link strong { font-size: 11px; font-weight: 600; }
  .ibej-mega__tool-link > span:last-child { color: var(--ibej-mega-blue); font-size: 15px; }
  .ibej-mega__tool-link:hover strong { color: var(--ibej-mega-blue); }

  .ibej-mega__industry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    border-top: 1px solid var(--ibej-mega-line);
  }

  .ibej-mega__industry-link {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    min-height: 64px;
    padding: 0 18px 0 4px;
    border-bottom: 1px solid var(--ibej-mega-line);
    color: var(--ibej-mega-ink);
    transition: background .2s ease, padding .2s ease;
  }
  .ibej-mega__industry-link:nth-child(odd) { border-right: 1px solid var(--ibej-mega-line); }
  .ibej-mega__industry-link:hover { padding-left: 10px; background: var(--ibej-mega-soft); }
  .ibej-mega__industry-link .ibej-mega__index { color: var(--ibej-mega-blue); font-size: 9px; font-weight: 700; }
  .ibej-mega__industry-link strong { font-size: 13px; font-weight: 550; line-height: 1.3; }
  .ibej-mega__industry-link > span:last-child { color: var(--ibej-mega-blue); }

  .ibej-mega__rail--dark {
    color: #fff;
    background: var(--ibej-mega-dark);
    border-color: var(--ibej-mega-dark);
  }
  .ibej-mega__rail--dark h3 { color: #fff; }
  .ibej-mega__rail--dark p { color: #b8c9ce; }
  .ibej-mega__rail--dark .ibej-mega__tool-link { color: #fff; border-color: rgba(255,255,255,.15); }
  .ibej-mega__rail--dark .ibej-mega__tool-link small { color: #86a0a7; }

  .ibej-mega__solutions-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    padding: 0 6px 24px;
  }
  .ibej-mega__solutions-head h2 {
    color: var(--ibej-mega-ink);
    font-size: clamp(28px, 2.4vw, 40px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.035em;
  }
  .ibej-mega__pill-link,
  .ibej-mega__primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 18px;
    border: 1px solid var(--ibej-mega-ink);
    border-radius: 999px;
    color: var(--ibej-mega-ink);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .2s ease, background .2s ease;
  }
  .ibej-mega__pill-link:hover,
  .ibej-mega__primary-action:hover { color: #fff; background: var(--ibej-mega-dark); }

  .ibej-mega__solution-grid {
    display: grid;
    grid-template-columns: repeat(var(--ibej-solution-columns, 4), minmax(0, 1fr));
    border: 1px solid var(--ibej-mega-line);
  }
  .ibej-mega__solution-column {
    min-height: 250px;
    padding: 24px 22px;
    border-right: 1px solid var(--ibej-mega-line);
  }
  .ibej-mega__solution-column:last-child { border-right: 0; }
  .ibej-mega__solution-column h3 {
    margin-bottom: 15px;
    color: var(--ibej-mega-ink);
    font-size: 16px;
    font-weight: 550;
  }
  .ibej-mega__solution-column ul { list-style: none; margin: 0; padding: 0; }
  .ibej-mega__solution-column li { margin: 0; }
  .ibej-mega__solution-column li a {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(219,231,235,.7);
    color: #506268;
    font-size: 11px;
    line-height: 1.4;
  }
  .ibej-mega__solution-column li a:hover { color: var(--ibej-mega-blue); }
  .ibej-mega__solution-column li a > span:last-child { color: var(--ibej-mega-blue); }
  .ibej-mega__muted { color: #839197; font-size: 11px; line-height: 1.55; }

  .ibej-mega__utility-strip {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 17px 20px;
    background: var(--ibej-mega-dark);
    color: #fff;
  }
  .ibej-mega__utility-strip > span { margin-right: auto; color: #9fb2b7; font-size: 11px; }
  .ibej-mega__utility-strip a { color: #fff; font-size: 11px; font-weight: 600; }
  .ibej-mega__utility-strip a:hover { color: var(--ibej-mega-blue-2); }

  .ibej-mega__projects-layout {
    display: grid;
    grid-template-columns: minmax(280px,.7fr) minmax(760px,2.3fr);
    gap: 18px;
  }
  .ibej-mega__intro--project { background: var(--ibej-mega-soft); }
  .ibej-mega__project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .ibej-mega__project-card {
    display: flex;
    flex-direction: column;
    min-height: 340px;
    border: 1px solid var(--ibej-mega-line);
    background: #fff;
    color: var(--ibej-mega-ink);
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .ibej-mega__project-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10,42,52,.09); }
  .ibej-mega__project-media {
    min-height: 145px;
    background: linear-gradient(135deg,#dcecf2,#9bcde1);
    background-size: cover;
    background-position: center;
  }
  .ibej-mega__project-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
  .ibej-mega__project-body > span { color: var(--ibej-mega-blue); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
  .ibej-mega__project-body h3 { margin: 8px 0; font-size: 16px; font-weight: 550; line-height: 1.3; }
  .ibej-mega__project-body p { color: var(--ibej-mega-muted); font-size: 10px; line-height: 1.55; }
  .ibej-mega__project-body strong { margin-top: auto; padding-top: 15px; font-size: 10px; }

  .ibej-mega__knowledge-layout {
    display: grid;
    grid-template-columns: minmax(250px,.72fr) minmax(690px,2.1fr) minmax(250px,.72fr);
    gap: 18px;
  }
  .ibej-mega__knowledge-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .ibej-mega__knowledge-card { padding: 22px; border: 1px solid var(--ibej-mega-line); background: #fff; }
  .ibej-mega__knowledge-title h3 { font-size: 16px; font-weight: 550; color: var(--ibej-mega-ink); }
  .ibej-mega__knowledge-card ul { list-style: none; margin: 15px 0 0; padding: 0; }
  .ibej-mega__knowledge-card li { margin: 0; }
  .ibej-mega__knowledge-card li a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--ibej-mega-line);
    color: #55676d;
    font-size: 10px;
    font-weight: 550;
    line-height: 1.4;
  }
  .ibej-mega__knowledge-card li a span { color: var(--ibej-mega-blue); }
  .ibej-mega__knowledge-card li a:hover { color: var(--ibej-mega-blue); }

  .ibej-mega__rail--accent {
    background: linear-gradient(145deg,#e8f8fd,#f7fcfe);
  }
  .ibej-mega__rail--accent .ibej-mega__primary-action { margin-top: 22px; }

  body.admin-bar .ibej-mega { /* JS calculates the exact active header edge; keep no static admin offset. */ }

  @media (max-width: 1280px) {
    .ibej-mega__panel { width: calc(100% - 34px); }
    .ibej-mega__inner { grid-template-columns: 250px minmax(560px, 1fr) 230px; gap: 12px; }
    .ibej-mega__knowledge-layout { grid-template-columns: 235px 1fr 235px; gap: 12px; }
    .ibej-mega__project-body p { display: none; }
    .ibej-mega__intro, .ibej-mega__rail { padding: 25px 22px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .ibej-mega, .ibej-mega *, .ibej-mega *:before, .ibej-mega *:after { transition: none !important; }
}
