/* Press mega menu (desktop header). Loaded after style.css and refresh.css. */

/* The panel is positioned against the full-width header, so the item itself must not be the anchor. */
.header-menu .main-menu li.has-mega { position: static; }

.pm {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 98;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: #fff;
    border-top: 3px solid #086ad8;
    box-shadow: 0 34px 70px rgba(8, 20, 60, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.has-mega:hover > .pm,
.has-mega:focus-within > .pm,
.has-mega.is-open > .pm {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.has-mega:hover > a,
.has-mega.is-open > a { color: #086ad8; }

.pm__grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 14px 56px;
    padding: 38px 0 0;
}

.pm__label {
    margin: 0 0 16px;
    font: 700 12px/1 "Barlow", sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #086ad8;
}

/* ---- topics ---- */
.pm__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.header-menu .main-menu .pm__list li { padding: 0; }

.header-menu .main-menu .pm__topic {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 12px;
    border-radius: 14px;
    text-transform: none;
    transition: background .2s ease;
}
.pm__topic:hover { background: #f1f6ff; }

.pm__ico {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #086ad8;
    background: #e8f1ff;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.pm__topic:hover .pm__ico {
    color: #fff;
    background: linear-gradient(135deg, #2b8efe, #086ad8);
    transform: translateY(-1px);
}
.pm__txt { display: flex; flex-direction: column; min-width: 0; }
.pm__txt strong {
    font: 700 16px/1.25 "Barlow", sans-serif;
    color: #0f1b3d;
}
.pm__txt small {
    margin-top: 2px;
    font: 400 13px/1.35 "Jost", "Barlow", sans-serif;
    color: #6b7686;
}

/* ---- latest posts ---- */
.pm__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.header-menu .main-menu a.pm__card {
    display: flex;
    flex-direction: column;
    text-transform: none;
}
.pm__img {
    display: block;
    aspect-ratio: 16 / 10;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #0b1b4a, #086ad8);
}
.pm__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.pm__card:hover .pm__img img { transform: scale(1.06); }
.pm__cat {
    margin-bottom: 5px;
    font: 700 11px/1 "Barlow", sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #086ad8;
}
.pm__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font: 700 16px/1.3 "Barlow", sans-serif;
    color: #0f1b3d;
    transition: color .2s ease;
}
.pm__card:hover .pm__title { color: #086ad8; }
.pm__date {
    margin-top: 6px;
    font: 400 13px/1 "Jost", "Barlow", sans-serif;
    color: #8a94a3;
}

/* ---- footer row ---- */
.pm__foot {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 14px -12px 0;
    padding: 18px 12px 20px;
    border-top: 1px solid #e8edf5;
}
.pm__foot p { margin: 0; font-size: 14px; color: #6b7686; }
.pm__links { display: flex; align-items: center; gap: 26px; }

.header-menu .main-menu .pm__link,
.header-menu .main-menu .pm__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 700 15px/1 "Barlow", sans-serif;
    text-transform: none;
    color: #3d4a63;
}
.header-menu .main-menu .pm__all { color: #086ad8; }
.pm__link:hover, .pm__all:hover { color: #086ad8; }
.pm__all svg { transition: transform .2s ease; }
.pm__all:hover svg { transform: translateX(4px); }

/* ---- Services variant: one column of service lines + a solutions showcase ---- */
.pm--services .pm__grid { grid-template-columns: 330px minmax(0, 1fr); gap: 14px 48px; }
.pm--services .pm__grid--single { grid-template-columns: 1fr; }
.pm--services .pm__grid--single .pm__list { grid-template-columns: repeat(3, 1fr); }
.pm--services .pm__list { grid-template-columns: 1fr; gap: 2px; }
.pm--services .pm__list li:nth-child(n) { padding: 0; }
.pm--services .pm__topic { padding: 9px 12px; }

/* Solutions panel: dark, so it stands out from the white menu */
.ps {
    position: relative;
    align-self: start;
    overflow: hidden;
    padding: 26px 26px 28px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(520px 260px at 100% 0%, rgba(43, 142, 254, .35), transparent 70%),
        radial-gradient(420px 240px at 0% 100%, rgba(113, 65, 177, .28), transparent 70%),
        linear-gradient(135deg, #06133d, #0a2a78);
}
.ps__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ps__label { margin: 0; font: 700 12px/1 "Barlow", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #7cc0ff; }
.header-menu .main-menu .pm--services a.ps__all {
    display: inline-flex; align-items: center; gap: 7px;
    font: 700 14px/1 "Barlow", sans-serif; text-transform: none; color: #fff;
    padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
    transition: background .2s ease, border-color .2s ease;
}
.header-menu .main-menu .pm--services a.ps__all:hover { color: #fff; background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .4); }
.ps__all svg { transition: transform .2s ease; }
.ps__all:hover svg { transform: translateX(3px); }

.ps__grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ps__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps__grid--1 { grid-template-columns: 1fr; }

.header-menu .main-menu .pm--services a.ps-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    text-transform: none;
    box-shadow: 0 14px 30px rgba(2, 8, 30, .35);
    transition: transform .25s ease, box-shadow .25s ease;
}
.ps-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(2, 8, 30, .5); }

.ps-card__img {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1b4a, #086ad8);
}
.ps-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ps-card:hover .ps-card__img img { transform: scale(1.06); }
.ps-card__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 15, 51, .45)); pointer-events: none; }
.ps-card__tag {
    position: absolute; left: 12px; top: 12px; z-index: 1;
    padding: 5px 10px; border-radius: 999px;
    font: 700 10.5px/1 "Barlow", sans-serif; font-style: normal; letter-spacing: .12em; text-transform: uppercase;
    color: #fff; background: rgba(8, 106, 216, .92); backdrop-filter: blur(4px);
}

.ps-card__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.ps-card__body strong { font: 700 19px/1.25 "Barlow", sans-serif; color: #0f1b3d; transition: color .2s ease; }
.ps-card:hover .ps-card__body strong { color: #086ad8; }
.ps-card__body small {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 5px; font: 400 13.5px/1.45 "Jost", "Barlow", sans-serif; color: #5b6472;
}
.ps-card__go {
    display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 12px;
    font: 700 14px/1 "Barlow", sans-serif; color: #086ad8;
}
.ps-card__go svg { transition: transform .2s ease; }
.ps-card:hover .ps-card__go svg { transform: translateX(4px); }

/* a single solution becomes a wide feature card */
.header-menu .main-menu .pm--services .ps__grid--1 a.ps-card { flex-direction: row; }
.ps__grid--1 .ps-card__img { flex: 0 0 48%; aspect-ratio: auto; min-height: 210px; }
.ps__grid--1 .ps-card__body { justify-content: center; padding: 24px 26px; }
.ps__grid--1 .ps-card__body strong { font-size: 24px; }

/* ---- smaller desktops: stack topics over posts ---- */
@media only screen and (max-width: 1199px) {
    .pm__grid { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
    .pm__list { grid-template-columns: repeat(3, 1fr); }
    .pm__topics .pm__txt small { display: none; }
    .pm--services .pm__grid { grid-template-columns: 1fr; }
    .pm--services .pm__list { grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
    .pm--services .pm__txt small { display: block; }
    .pm__foot { margin-top: 0; }
    .pm__img { aspect-ratio: 16 / 8; }
}

@media (prefers-reduced-motion: reduce) {
    .pm, .pm__ico, .pm__img img { transition: none; }
}
