.portal-public-header .portal-category-link {
    position: relative;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.portal-public-header .portal-category-link > span {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--ph-green);
    transform: scaleX(0);
    transition: transform .18s ease;
}

.portal-public-header .portal-category-link:hover,
.portal-public-header .portal-category-link:focus-visible,
.portal-public-header .portal-category-link.is-current,
.portal-public-header .portal-category-link[aria-expanded="true"] {
    color: var(--ph-green) !important;
}

.portal-public-header .portal-category-link.is-current > span,
.portal-public-header .portal-category-link[aria-expanded="true"] > span {
    transform: scaleX(1);
}

.portal-mega-layer {
    position: absolute;
    z-index: 40;
    top: 100%;
    right: 0;
    left: 0;
    border-top: 1px solid #edf1ef;
    border-bottom: 1px solid #dfe7e3;
    background: #fff;
    box-shadow: 0 22px 50px rgba(13, 42, 34, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.portal-mega-layer.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.portal-mega-panel {
    min-height: 330px;
    padding-top: 35px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 42px;
}

.portal-mega-panel[hidden] {
    display: none;
}

.portal-mega-intro {
    padding-right: 30px;
    border-right: 1px solid #dfe7e3;
}

.portal-mega-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--portal-menu-accent);
    background: color-mix(in srgb, var(--portal-menu-accent) 11%, white);
}

.portal-mega-icon svg {
    width: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
}

.portal-mega-intro small {
    color: var(--portal-menu-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-mega-intro h2 {
    margin: 7px 0 8px;
    color: #10231e;
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -.6px;
}

.portal-mega-intro p {
    margin: 0 0 25px;
    color: #66736f;
    font-size: 13px;
    line-height: 1.55;
}

.portal-mega-intro > a {
    color: var(--ph-green) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

.portal-mega-intro > a span {
    margin-left: 5px;
}

.portal-mega-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 48px;
    align-content: start;
}

.portal-mega-groups section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-mega-groups h3 {
    margin: 0 0 3px;
    color: #85908c;
    font-size: 12px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.portal-mega-groups a {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #263b35 !important;
    font-size: 13.5px;
    line-height: 1.45;
    text-decoration: none !important;
}

.portal-mega-groups a span {
    color: var(--ph-green);
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity .15s ease, transform .15s ease;
}

.portal-mega-groups a:hover,
.portal-mega-groups a:focus-visible {
    color: var(--ph-green) !important;
}

.portal-mega-groups a:hover span,
.portal-mega-groups a:focus-visible span {
    opacity: 1;
    transform: none;
}

.portal-mega-footer {
    grid-column: 1 / -1;
    min-height: 54px;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 24px;
    border-top: 1px solid #dfe7e3;
    font-size: 12.5px;
}

.portal-mega-footer > span {
    color: #8b9691;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.portal-mega-footer a {
    color: #263b35 !important;
    text-decoration: none !important;
}

.portal-mega-footer a:hover,
.portal-mega-footer a:focus-visible {
    color: var(--ph-green) !important;
}

@media (max-width: 1050px) {
    .portal-mega-panel {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 28px;
    }

    .portal-mega-groups {
        gap: 22px 30px;
    }
}

@media (max-width: 680px) {
    .portal-mega-layer {
        display: none;
    }
}
