/* ============================================================
   IPGlobal – Header & Navigation
   ============================================================ */

/* ── Reset inside header ── */
.ipg-h, .ipg-h * { box-sizing: border-box; }

/* ── Top bar ── */
.ipg-h {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100002;
    height: 72px;
    display: flex;
    align-items: center;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    will-change: transform;
}
/* WP admin bar offsets */
.admin-bar .ipg-h { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .ipg-h { top: 46px; } }
/* WP hides admin bar at ≤600px but keeps the body class — reset to top:0 */
@media screen and (max-width: 600px) { .admin-bar .ipg-h { top: 0; } }

/* ── Inner wrapper ── */
.ipg-h-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 0;
}

/* ── Logo ── */
.ipg-logo {
    flex-shrink: 0;
    margin-right: 32px;
    display: block;
    height: 36px;
    width: 164px;
    text-decoration: none;
}
.ipg-logo img {
    height: 36px;
    width: auto;
}

/* ── Desktop nav ── */
.ipg-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex: 1;
    margin: 0;
    padding: 0;
}
.ipg-nav > li { position: relative; margin: 0; }
.ipg-nav > li > a,
.ipg-nav > li > button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
    transition: background .15s, color .15s;
    line-height: 1;
    white-space: nowrap;
}
.ipg-nav > li > a:hover,
.ipg-nav > li > button:hover,
.ipg-nav > li.ipg-open > button {
    background: rgba(26, 79, 160, .08);
    color: #1a4fa0;
}

/* ── Chevron icon ── */
.ipg-chev {
    width: 11px;
    height: 11px;
    transition: transform .2s;
    flex-shrink: 0;
}
.ipg-open .ipg-chev { transform: rotate(180deg); }

/* ── Right-side controls ── */
.ipg-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── CTA button ── */
a.ipg-cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    background: #1a4fa0;
    color: #fff;
    border: 1.5px solid #1a4fa0;
    transition: background .25s, border-color .25s;
    white-space: nowrap;
    line-height: 1;
}
a.ipg-cta:hover {
    background: #2563c8;
    border-color: #2563c8;
    color: #fff;
}

/* ── Search button ── */
.ipg-srch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 0;
    transition: background .15s;
}
.ipg-srch-btn:hover { background: rgba(0, 0, 0, .06); }
.ipg-srch-btn svg { width: 17px; height: 17px; }

/* ── Hamburger ── */
.ipg-ham {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    padding: 7px;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    border-radius: 6px;
    transition: background .15s;
}
.ipg-ham:hover { background: rgba(0, 0, 0, .06); }
.ipg-ham span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

/* ============================================================
   Mega menu
   ============================================================ */
.ipg-mega {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, .98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding: 28px 0;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .2s, transform .2s;
}
.admin-bar .ipg-mega { top: 104px; }
@media screen and (max-width: 782px) { .admin-bar .ipg-mega { top: 118px; } }

.ipg-mega.ipg-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.ipg-mega-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}
.ipg-mega-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ipg-mega-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #00d4ff;
    text-decoration: none;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 4px;
    display: block;
    transition: color .15s;
}
.ipg-mega-head:hover { color: #33dcff; }
.ipg-mega-link {
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.4;
    transition: color .15s, padding-left .12s;
    display: block;
}
.ipg-mega-link:hover { color: #fff; padding-left: 3px; }

/* ============================================================
   Resources dropdown
   ============================================================ */
.ipg-drop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    background: rgba(10, 22, 40, .98);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 5px;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s;
}
.ipg-drop.ipg-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.ipg-drop a {
    display: block;
    padding: 9px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    border-radius: 5px;
    transition: background .1s;
}
.ipg-drop a:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

/* ============================================================
   Search bar overlay
   ============================================================ */
.ipg-srch-bar {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, .98);
    padding: 16px 32px;
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, .08);
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    transition: transform .25s, opacity .25s;
}
.admin-bar .ipg-srch-bar { top: 104px; }
@media screen and (max-width: 782px) { .admin-bar .ipg-srch-bar { top: 118px; } }

.ipg-srch-bar.ipg-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.ipg-srch-bar input {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.ipg-srch-bar input::placeholder { color: rgba(255, 255, 255, .4); }
.ipg-srch-bar input:focus { border-color: #00d4ff; }

/* ============================================================
   Mobile overlay + drawer
   ============================================================ */
.ipg-mob-ov {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.ipg-mob-ov.ipg-open { opacity: 1; pointer-events: all; }

.ipg-mob-dr {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 90vw);
    background: #0a1628;
    border-left: 1px solid rgba(255, 255, 255, .08);
    z-index: 100001;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    padding: 72px 24px 40px;
}
.ipg-mob-dr.ipg-open { transform: translateX(0); }

.ipg-mob-x {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ipg-mob-x:hover { background: rgba(255, 255, 255, .08); }

.ipg-mob-sec {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #00d4ff;
    padding: 12px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 4px;
}
.ipg-mob-dr a {
    display: block;
    padding: 9px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    transition: color .15s;
}
.ipg-mob-dr a:hover { color: #fff; }

a.ipg-mob-cta {
    display: block;
    margin-top: 20px;
    padding: 13px 18px;
    background: #1a4fa0;
    color: #fff !important;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    border-bottom: none !important;
}
a.ipg-mob-cta:hover { background: #2563c8; }

/* ============================================================
   Body offset — keeps content below fixed header
   ============================================================ */
body { padding-top: 72px; }
body.admin-bar { padding-top: 104px; }                                   /* 72 + 32px bar */
@media screen and (max-width: 782px) { body.admin-bar { padding-top: 118px; } }  /* 72 + 46px bar */
@media screen and (max-width: 600px) { body.admin-bar { padding-top: 72px; } }   /* bar hidden */

/* Hero pages: header floats over the hero, no offset needed */
body.ipg-no-offset { padding-top: 0; }
body.ipg-no-offset.admin-bar { padding-top: 32px; }
@media screen and (max-width: 782px) { body.ipg-no-offset.admin-bar { padding-top: 46px; } }
@media screen and (max-width: 600px) { body.ipg-no-offset.admin-bar { padding-top: 0; } }  /* bar hidden */

/* ============================================================
   Responsive breakpoints
   ============================================================ */
@media (max-width: 1024px) {
    .ipg-nav,
    a.ipg-cta { display: none !important; }
    .ipg-ham  { display: flex !important; }
}
@media (max-width: 480px) {
    .ipg-h-inner { padding: 0 16px; }
    .ipg-mega-inner { padding: 0 16px; }
    .ipg-srch-bar  { padding: 12px 16px; }
}
