/**
 * sklare. Mega Menu — Card-Based Dropdown
 *
 * Architecture: Grid is moved outside .site-header by JS
 * so it gets its own independent backdrop-filter (not blocked
 * by the header's stacking context).
 *
 * Cards stay within container max-width via padding.
 * Background (blur) spans full viewport width.
 */


/* =================================================================
   TRIGGER (top-level item with children)
   ================================================================= */

.mega-menu__trigger {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0;
}

/* Parent page link (e.g. "Services" → /services/) */
.mega-menu__link {
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--base);
    transition: color 0.2s ease;
}

.mega-menu__link:hover {
    color: var(--wp--preset--color--accent);
}

.mega-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--wp--preset--color--text-main);
    font-family: inherit;
    font-size: var(--wp--preset--font-size--base);
    font-weight: 500;
    transition: color 0.2s ease;
}

.mega-menu__toggle:hover {
    color: var(--wp--preset--color--accent);
}

.mega-menu__chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.mega-menu__trigger.is-open .mega-menu__chevron {
    transform: rotate(180deg);
}


/* =================================================================
   GRID — now lives OUTSIDE .site-header (moved by JS)
   Full-width blur background, cards constrained to container
   ================================================================= */

.mega-menu__grid {
    position: fixed;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    /* top is set dynamically by JS to match header bottom */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;

    /* Full-width background for blur, cards constrained to .container edges.
       Padding = half of leftover viewport space (mirrors .container centering) */
    padding-top: 24px;
    padding-bottom: 24px;
    padding-left: max(var(--layout-padding, 40px), calc(50% - var(--layout-max-width, 1400px) / 2));
    padding-right: max(var(--layout-padding, 40px), calc(50% - var(--layout-max-width, 1400px) / 2));

    list-style: none;
    margin: 0;

    /* Own backdrop-filter — works because grid is outside header's stacking context */
    background: rgba(245, 245, 247, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(18, 18, 18, 0.06);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
    z-index: 999;
    pointer-events: none;
}

.mega-menu__grid.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


/* =================================================================
   CARDS (sub-items)
   ================================================================= */

/* Back button + parent link: mobile only */
.mega-menu__back,
.mega-menu__parent-link {
    display: none;
}

.mega-menu__card {
    list-style: none;
}

.mega-menu__card-link {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 200px;
    padding: 28px;
    background-color: var(--wp--preset--color--hero-blue, #4375ea);
    color: var(--wp--preset--color--surface, #F5F4F0);
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
    gap: 16px;
}

.mega-menu__card-link:hover {
    background-color: #3562d4;
    transform: translateY(-2px);
    color: var(--wp--preset--color--surface, #F5F4F0);
}

.mega-menu__card-title {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--xl);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Arrow icon — white variant for blue cards */
.mega-menu__arrow {
    border-color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.mega-menu__arrow .arrow-icon {
    color: #ffffff;
}

.mega-menu__card-link:hover .mega-menu__arrow {
    border-color: rgba(255, 255, 255, 0.6);
}


/* =================================================================
   SERVICES PANEL — 3 competence columns (staging layout, theme tints)
   ================================================================= */

.mega-menu__grid.mega-menu__grid--services {
    display: block;
    padding-top: var(--wp--preset--spacing--20, 20px);
    padding-bottom: var(--wp--preset--spacing--32, 32px);
    background: var(--wp--preset--color--card, #ffffff);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 18px 40px rgba(18, 18, 18, 0.06);
}

.mega-menu__services {
    min-width: 0;
    box-sizing: border-box;
}

.mega-menu__services-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--16, 16px);
    margin-bottom: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__services-kicker {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__services-overview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
}

.mega-menu__services-overview .arrow-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.mega-menu__services-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid rgba(18, 18, 18, 0.08);
    border-radius: var(--wp--custom--radius--card, 8px);
    background: rgba(18, 18, 18, 0.08);
}

.mega-menu__group {
    --mm-tint: var(--wp--preset--color--surface, #ECEAE4);
    --mm-ink: var(--wp--preset--color--text-main, #121212);
    min-width: 0;
    padding: var(--wp--preset--spacing--20, 20px);
    background: var(--wp--preset--color--card, #ffffff);
    box-sizing: border-box;
}

.mega-menu__group--content {
    --mm-tint: var(--wp--preset--color--accent-100, #FFE4DA);
    --mm-ink: var(--wp--preset--color--text-main, #121212);
}

.mega-menu__group--web {
    --mm-tint: var(--wp--preset--color--blue-100, #E3EAFC);
    --mm-ink: var(--wp--preset--color--hero-blue, #4375ea);
}

.mega-menu__group--marketing {
    --mm-tint: var(--wp--preset--color--yellow-100, #FFF4AA);
    --mm-ink: var(--wp--preset--color--text-main, #121212);
}

.mega-menu__hub {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    margin: calc(var(--wp--preset--spacing--20, 20px) * -1);
    margin-bottom: var(--wp--preset--spacing--16, 16px);
    padding: var(--wp--preset--spacing--16, 16px) var(--wp--preset--spacing--20, 20px);
    background: var(--mm-tint);
    color: var(--mm-ink);
    text-decoration: none;
    box-sizing: border-box;
}

.mega-menu__hub span {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.mega-menu__hub strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.mega-menu__hub .arrow-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.mega-menu__group ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__group li {
    min-width: 0;
}

.mega-menu__group li a {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    padding: 6px 10px;
    box-sizing: border-box;
    border-radius: 6px;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 500;
    color: var(--wp--preset--color--text-muted);
    text-decoration: none;
    background: transparent;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.mega-menu__group li a:hover,
.mega-menu__group li a:focus-visible {
    color: var(--mm-ink);
    background: var(--mm-tint);
}

/* =================================================================
   RESOURCES PANEL — Blog / Lexikon / Beiträge
   ================================================================= */

.mega-menu__grid.mega-menu__grid--resources {
    display: block;
    padding-top: var(--wp--preset--spacing--20, 20px);
    padding-bottom: var(--wp--preset--spacing--32, 32px);
    background: var(--wp--preset--color--card, #ffffff);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 18px 40px rgba(18, 18, 18, 0.06);
}

.mega-menu__resources {
    min-width: 0;
    box-sizing: border-box;
}

.mega-menu__knowledge {
    display: grid;
    gap: var(--wp--preset--spacing--24, 24px);
    min-width: 0;
}

.mega-menu__knowledge-hubs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    overflow: visible;
    border-radius: var(--wp--custom--radius--panel, 16px);
    background: var(--wp--preset--color--bg);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
}

.mega-menu__knowledge-hub {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
    max-width: 100%;
    min-height: 68px;
    padding: 12px 16px 12px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 180ms var(--wp--custom--spring, cubic-bezier(.16, 1, .3, 1));
}

.mega-menu__knowledge-hub:first-child {
    border-radius: var(--wp--custom--radius--panel, 16px) 0 0 var(--wp--custom--radius--panel, 16px);
}

.mega-menu__knowledge-hub:last-child {
    border-radius: 0 var(--wp--custom--radius--panel, 16px) var(--wp--custom--radius--panel, 16px) 0;
    box-shadow: inset 1px 0 0 color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
}

@media (hover: hover) {
    .mega-menu__knowledge-hub:hover {
        background: color-mix(in srgb, var(--wp--preset--color--text-main) 4.5%, transparent);
    }
}

.mega-menu__knowledge-hub:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: -2px;
    background: color-mix(in srgb, var(--wp--preset--color--text-main) 4.5%, transparent);
}

.mega-menu__knowledge-hub-icon {
    display: grid;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    background: var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--card);
}

.mega-menu__knowledge-hub-icon svg {
    width: 16px;
    height: 16px;
}

.mega-menu__knowledge-hub-copy {
    display: grid;
    grid-template-columns: max-content auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    min-width: 0;
}

.mega-menu__knowledge-hub-copy strong {
    grid-column: 1;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.2;
}

.mega-menu__knowledge-hub-text {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    color: var(--wp--preset--color--text-muted);
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-menu__knowledge-hub-arrow {
    display: grid;
    grid-column: 2;
    place-items: center;
    color: var(--wp--preset--color--text-light);
}

.mega-menu__knowledge-hub-arrow .arrow-icon {
    width: 14px;
    height: 14px;
}

.mega-menu__knowledge-posts {
    display: grid;
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
}

.mega-menu__knowledge-posts-head .mega-menu__panel-label {
    margin: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__knowledge-post-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--12, 12px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__knowledge-post-list li {
    min-width: 0;
}

.mega-menu__knowledge-post {
    display: grid;
    grid-template-rows: 132px auto;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
    border-radius: var(--wp--custom--radius--card, 8px);
    background: var(--wp--preset--color--card);
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 220ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__knowledge-post:hover,
.mega-menu__knowledge-post:focus-visible {
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 18%, transparent);
}

.mega-menu__knowledge-post:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
}

.mega-menu__knowledge-post figure {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: var(--wp--preset--color--surface);
}

.mega-menu__knowledge-post figure.is-empty::after {
    content: 'teil1.';
    display: grid;
    height: 100%;
    place-items: center;
    color: var(--wp--preset--color--text-muted);
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--sm);
}

.mega-menu__knowledge-post img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 420ms cubic-bezier(.22, 1, .36, 1);
}

.mega-menu__knowledge-post:hover img,
.mega-menu__knowledge-post:focus-visible img {
    scale: 1.025;
}

.mega-menu__knowledge-post-copy {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: var(--wp--preset--spacing--16, 16px);
    box-sizing: border-box;
}

.mega-menu__knowledge-post-copy small {
    overflow: hidden;
    color: var(--wp--preset--color--accent);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.25;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-menu__knowledge-post-copy strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* =================================================================
   TOOLS PANEL — category columns
   ================================================================= */

.mega-menu__grid.mega-menu__grid--tools {
    --illus-unit-px: 0.52;
    display: block;
    padding-top: var(--wp--preset--spacing--16, 16px);
    padding-bottom: var(--wp--preset--spacing--24, 24px);
    background: var(--wp--preset--color--card, #ffffff);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 24px 64px color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
}

.mega-menu__tools-panel {
    min-width: 0;
    box-sizing: border-box;
}

.mega-menu__tools-panel > .mega-menu__panel-head {
    align-items: center;
    margin-bottom: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__tools-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__tools-layout {
    display: grid;
    grid-template-columns: minmax(272px, 0.92fr) minmax(0, 2.45fr);
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
}

.mega-menu__tools-feature {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
    max-width: 100%;
    min-height: 270px;
    padding: var(--wp--preset--spacing--20, 20px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--card) 10%, transparent);
    border-radius: var(--wp--custom--radius--card, 10px);
    background: var(--wp--preset--color--text-main, #121212);
    color: var(--wp--preset--color--card, #ffffff);
    text-decoration: none;
    box-sizing: border-box;
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--wp--preset--color--card) 8%, transparent) inset,
        0 16px 34px color-mix(in srgb, var(--wp--preset--color--text-main) 16%, transparent);
    transform: translate3d(0, 0, 0);
    transition:
        transform 440ms cubic-bezier(.16, 1, .3, 1),
        box-shadow 440ms cubic-bezier(.16, 1, .3, 1),
        border-color 320ms ease;
}

.mega-menu__tools-feature::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(color-mix(in srgb, var(--wp--preset--color--card) 7%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--wp--preset--color--card) 7%, transparent) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
    opacity: 0.55;
    transition: opacity 440ms ease;
}

.mega-menu__tools-feature::after {
    content: '';
    position: absolute;
    top: -42%;
    right: -34%;
    z-index: -1;
    width: 92%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        color-mix(in srgb, var(--wp--preset--color--accent) 48%, transparent) 0%,
        color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent) 42%,
        transparent 72%
    );
    opacity: 0.72;
    transform: scale(1);
    transform-origin: center;
    transition: opacity 440ms ease, transform 700ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-feature:hover,
.mega-menu__tools-feature:focus-visible {
    color: var(--wp--preset--color--card, #ffffff);
    border-color: color-mix(in srgb, var(--wp--preset--color--accent) 58%, transparent);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--wp--preset--color--card) 12%, transparent) inset,
        0 24px 48px color-mix(in srgb, var(--wp--preset--color--text-main) 22%, transparent);
    transform: translate3d(0, -2px, 0);
}

.mega-menu__tools-feature:hover::before,
.mega-menu__tools-feature:focus-visible::before {
    opacity: 0.82;
}

.mega-menu__tools-feature:hover::after,
.mega-menu__tools-feature:focus-visible::after {
    opacity: 1;
    transform: scale(1.12);
}

.mega-menu__tools-feature:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
}

.mega-menu__tools-feature-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--wp--preset--color--card) 58%, transparent);
}

.mega-menu__tools-feature-chrome > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.mega-menu__tools-feature-chrome i {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 16%, transparent);
}

.mega-menu__tools-feature-visual {
    position: absolute;
    top: 51px;
    right: var(--wp--preset--spacing--20, 20px);
    display: grid;
    width: 92px;
    aspect-ratio: 1;
    place-items: center;
}

.mega-menu__tools-feature-orbit {
    position: relative;
    display: grid;
    width: 68px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--card) 20%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--wp--preset--color--card) 7%, transparent);
    box-shadow:
        0 0 0 11px color-mix(in srgb, var(--wp--preset--color--card) 3%, transparent),
        0 0 36px color-mix(in srgb, var(--wp--preset--color--accent) 28%, transparent);
    transition:
        background-color 320ms ease,
        border-color 320ms ease,
        transform 700ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-feature:hover .mega-menu__tools-feature-orbit,
.mega-menu__tools-feature:focus-visible .mega-menu__tools-feature-orbit {
    border-color: color-mix(in srgb, var(--wp--preset--color--accent) 68%, transparent);
    background: color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent);
    transform: scale(1.05);
}

.mega-menu__tools-feature-icon {
    display: grid;
    width: 34px;
    aspect-ratio: 1;
    place-items: center;
}

.mega-menu__tools-feature-icon svg {
    width: 30px;
    height: 30px;
}

.mega-menu__tools-feature-node {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--wp--preset--color--accent);
    box-shadow: 0 0 10px color-mix(in srgb, var(--wp--preset--color--accent) 72%, transparent);
}

.mega-menu__tools-feature-node--one {
    top: 5px;
    left: 18px;
}

.mega-menu__tools-feature-node--two {
    right: 3px;
    bottom: 27px;
}

.mega-menu__tools-feature-node--three {
    bottom: 5px;
    left: 22px;
}

.mega-menu__tools-feature-copy {
    align-self: end;
    display: grid;
    gap: 6px;
    max-width: 82%;
}

.mega-menu__tools-feature-kicker {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--wp--preset--color--card) 52%, transparent);
}

.mega-menu__tools-feature-copy strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.mega-menu__tools-feature-copy p {
    margin: 0;
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.45;
    opacity: 0.78;
}

.mega-menu__tools-feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    min-height: 30px;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    color: var(--wp--preset--color--card);
}

.mega-menu__tools-feature-cta .arrow-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.mega-menu__tools-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--8, 8px);
    min-width: 0;
}

.mega-menu__tools-cols > .mega-menu__group {
    min-width: 0;
    padding: var(--wp--preset--spacing--12, 12px);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 9%, transparent);
    border-radius: var(--wp--custom--radius--card, 10px);
    background: var(--wp--preset--color--card);
    box-sizing: border-box;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--wp--preset--color--text-main) 4%, transparent);
}

.mega-menu__tools-cat {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: calc(var(--wp--preset--spacing--12, 12px) * -1);
    margin-bottom: var(--wp--preset--spacing--8, 8px);
    padding: var(--wp--preset--spacing--8, 8px) var(--wp--preset--spacing--12, 12px);
    background: var(--mm-tint);
    color: var(--mm-ink);
    box-sizing: border-box;
}

.mega-menu__tools-cat strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.mega-menu__tools-cols .mega-menu__group ul {
    gap: 1px;
}

.mega-menu__tools-cols .mega-menu__group li a {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 30px 24px minmax(0, 1fr);
    gap: 7px;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    transition: color 300ms ease;
}

.mega-menu__tools-cols .mega-menu__group li a::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--mm-tint);
    opacity: 0.72;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 440ms cubic-bezier(.16, 1, .3, 1), opacity 300ms ease;
}

.mega-menu__tools-cols .mega-menu__group li a:hover,
.mega-menu__tools-cols .mega-menu__group li a:focus-visible {
    background: transparent;
    color: var(--mm-ink);
}

.mega-menu__tools-cols .mega-menu__group li a:hover::before,
.mega-menu__tools-cols .mega-menu__group li a:focus-visible::before {
    opacity: 1;
    transform: scaleX(1);
}

.mega-menu__tools-cols .mega-menu__group li a:focus-visible {
    outline: 2px solid var(--mm-ink);
    outline-offset: 1px;
}

.mega-menu__tool-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--mm-ink) 10%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--mm-tint) 62%, var(--wp--preset--color--card));
    color: var(--mm-ink);
    box-sizing: border-box;
    transform: scale(1);
    transition:
        transform 440ms cubic-bezier(.16, 1, .3, 1),
        background-color 300ms ease,
        border-color 300ms ease;
}

.mega-menu__tool-icon svg {
    width: 15px;
    height: 15px;
}

.mega-menu__tools-cols .mega-menu__group li a:hover .mega-menu__tool-icon,
.mega-menu__tools-cols .mega-menu__group li a:focus-visible .mega-menu__tool-icon {
    border-color: color-mix(in srgb, var(--mm-ink) 22%, transparent);
    background: color-mix(in srgb, var(--mm-tint) 84%, var(--wp--preset--color--card));
    transform: scale(1.06);
}

.mega-menu__tools-num {
    flex-shrink: 0;
    width: 24px;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    opacity: 0.55;
}

.mega-menu__tool-label {
    min-width: 0;
    line-height: 1.25;
}

.mega-menu__tools-foot {
    margin-top: var(--wp--preset--spacing--12, 12px);
}

.mega-menu__tools-plugin {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    padding: var(--wp--preset--spacing--8, 8px) var(--wp--preset--spacing--16, 16px);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 9%, transparent);
    border-radius: var(--wp--custom--radius--card, 10px);
    background: var(--wp--preset--color--card, #ffffff);
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--wp--preset--color--text-main) 3%, transparent);
    transform: translate3d(0, 0, 0);
    transition:
        background-color 300ms ease,
        border-color 300ms ease,
        box-shadow 440ms cubic-bezier(.16, 1, .3, 1),
        transform 440ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-plugin:hover,
.mega-menu__tools-plugin:focus-visible {
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 20%, transparent);
    background: color-mix(in srgb, var(--wp--preset--color--surface) 64%, var(--wp--preset--color--card));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--wp--preset--color--text-main) 7%, transparent);
    transform: translate3d(0, -1px, 0);
}

.mega-menu__tools-plugin:focus-visible {
    outline: 2px solid var(--wp--preset--color--text-main);
    outline-offset: 2px;
}

.mega-menu__tools-plugin-label {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--wp--preset--color--surface, #ECEAE4);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mega-menu__tools-plugin strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.mega-menu__tools-plugin-text {
    min-width: 0;
    font-size: var(--wp--preset--font-size--sm);
    color: var(--wp--preset--color--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-menu__tools-plugin .arrow-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

@media (prefers-reduced-motion: reduce) {
    .mega-menu__tools-feature,
    .mega-menu__tools-feature::before,
    .mega-menu__tools-feature::after,
    .mega-menu__tools-feature-orbit,
    .mega-menu__tools-cols .mega-menu__group li a::before,
    .mega-menu__tool-icon,
    .mega-menu__tools-plugin {
        transition-duration: 0.01ms;
    }
}

/* =================================================================
   TOOLS PANEL V2 — open editorial layout, Lucide icon system
   ================================================================= */

.mega-menu__tools-panel > .mega-menu__panel-head {
    margin-bottom: var(--wp--preset--spacing--20, 20px);
}

.mega-menu__tools-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--wp--preset--spacing--8, 8px);
}

.mega-menu__tools-layout {
    display: block;
    min-width: 0;
}

.mega-menu__tools-feature {
    --mm-feat-grid: clamp(28px, 3vw, 40px);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    grid-template-rows: none;
    gap: clamp(32px, 5vw, 80px);
    min-height: 210px;
    padding: clamp(24px, 3vw, 40px);
    color: var(--wp--preset--color--text-main, #121212);
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    border-radius: 14px;
    background:
        radial-gradient(circle at 76% 16%, rgba(255, 255, 255, 0.56), transparent 28%),
        linear-gradient(135deg, color-mix(in srgb, var(--wp--preset--color--blue-100) 55%, var(--wp--preset--color--bg)) 0%, var(--wp--preset--color--bg) 78%);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--wp--preset--color--text-main) 4%, transparent);
}

.mega-menu__tools-feature::before,
.mega-menu__tools-feature::after {
    display: none;
}

.mega-menu__tools-feature-pattern {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 0;
    width: min(68%, 520px);
    height: min(100%, 240px);
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(18, 18, 18, 0.16) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(18, 18, 18, 0.16) 1px, transparent 1px);
    background-size: var(--mm-feat-grid) var(--mm-feat-grid);
    background-position: right top;
    -webkit-mask-image:
        linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.7) 38%, transparent 78%),
        linear-gradient(to top, transparent 8%, #000 48%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.7) 38%, transparent 78%),
        linear-gradient(to top, transparent 8%, #000 48%);
    mask-composite: intersect;
}

.mega-menu__tools-feature-pattern::before,
.mega-menu__tools-feature-pattern::after {
    content: "";
    position: absolute;
    width: var(--mm-feat-grid);
    height: var(--mm-feat-grid);
}

.mega-menu__tools-feature-pattern::before {
    top: var(--mm-feat-grid);
    right: calc(var(--mm-feat-grid) * 3);
    background: color-mix(in srgb, var(--wp--preset--color--accent) 28%, transparent);
}

.mega-menu__tools-feature-pattern::after {
    top: calc(var(--mm-feat-grid) * 3);
    right: var(--mm-feat-grid);
    background: color-mix(in srgb, var(--wp--preset--color--hero-blue) 24%, transparent);
}

.mega-menu__tools-feature:hover,
.mega-menu__tools-feature:focus-visible {
    color: var(--wp--preset--color--text-main, #121212);
    border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 18%, transparent);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
    transform: none;
}

.mega-menu__tools-feature-copy {
    position: relative;
    z-index: 1;
    align-self: center;
    display: flex;
    max-width: 38rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--12, 12px);
}

.mega-menu__tools-feature-kicker {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--8, 8px);
    color: var(--wp--preset--color--accent);
}

.mega-menu__tools-feature-kicker-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    background: color-mix(in srgb, var(--wp--preset--color--accent) 20%, transparent);
    color: var(--wp--preset--color--accent);
}

.mega-menu__tools-feature-kicker-icon svg {
    width: 14px;
    height: 14px;
}

.mega-menu__tools-feature-copy strong {
    font-size: var(--wp--preset--font-size--2xl);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

.mega-menu__tools-feature-copy p {
    max-width: 46ch;
    font-size: var(--wp--preset--font-size--base);
    line-height: 1.5;
    color: var(--wp--preset--color--text-muted, #3D3D3D);
    opacity: 1;
}

.mega-menu__tools-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mega-menu__tools-feature-meta > span {
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 12%, transparent);
    border-radius: 999px;
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-muted, #3D3D3D);
}

.mega-menu__tools-feature-cta {
    min-height: 36px;
    margin-top: var(--wp--preset--spacing--8, 8px);
    padding: 0 14px;
    border-radius: 999px;
    background: var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--card);
    box-sizing: border-box;
    transition: background-color 300ms ease, color 300ms ease;
}

.mega-menu__tools-feature:hover .mega-menu__tools-feature-cta,
.mega-menu__tools-feature:focus-visible .mega-menu__tools-feature-cta {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--card);
}

.mega-menu__tools-feature-console {
    --illus-unit-px: 0.52;
    position: relative;
    z-index: 1;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 148px;
    padding: var(--wp--preset--spacing--12, 12px);
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
    border-radius: 12px;
    background: var(--wp--preset--color--card);
    box-sizing: border-box;
}

.mega-menu__tools-feature-illus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 148px;
    margin: 0;
}

.mega-menu__tools-feature-illus img {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
}

.mega-menu__tools-console-top,
.mega-menu__tools-console-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--12, 12px);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--wp--preset--color--card) 48%, transparent);
}

.mega-menu__tools-console-top > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.mega-menu__tools-console-top i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wp--preset--color--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--accent) 16%, transparent);
}

.mega-menu__tools-console-main {
    position: relative;
    display: grid;
    place-items: center;
}

.mega-menu__tools-console-rings {
    width: 86px;
    aspect-ratio: 1;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--card) 17%, transparent);
    border-radius: 50%;
    box-shadow:
        0 0 0 13px color-mix(in srgb, var(--wp--preset--color--card) 4%, transparent),
        0 0 0 26px color-mix(in srgb, var(--wp--preset--color--card) 2%, transparent);
    transform: scale(1);
    transition: border-color 400ms ease, transform 700ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-feature:hover .mega-menu__tools-console-rings,
.mega-menu__tools-feature:focus-visible .mega-menu__tools-console-rings {
    border-color: color-mix(in srgb, var(--wp--preset--color--accent) 62%, transparent);
    transform: scale(1.06);
}

.mega-menu__tools-feature-icon {
    position: absolute;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--wp--preset--color--card);
    color: var(--wp--preset--color--text-main);
}

.mega-menu__tools-feature-icon svg {
    width: 22px;
    height: 22px;
}

.mega-menu__tools-console-bottom {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.mega-menu__tools-console-meter {
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wp--preset--color--card) 10%, transparent);
}

.mega-menu__tools-console-meter i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--wp--preset--color--accent);
    transform: scaleX(.68);
    transform-origin: left center;
    transition: transform 800ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-feature:hover .mega-menu__tools-console-meter i,
.mega-menu__tools-feature:focus-visible .mega-menu__tools-console-meter i {
    transform: scaleX(1);
}

.mega-menu__tools-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    padding: 0;
    border: 0;
}

.mega-menu__tools-category {
    --tool-tone: var(--wp--preset--color--accent);
    --tool-tint: var(--wp--preset--color--accent-100);
    min-width: 0;
    padding: 0 var(--wp--preset--spacing--24, 24px);
    box-sizing: border-box;
}

.mega-menu__tools-category:first-child {
    padding-left: 0;
}

.mega-menu__tools-category:last-child {
    padding-right: 0;
}

.mega-menu__tools-category + .mega-menu__tools-category {
    border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 9%, transparent);
}

.mega-menu__tools-category--web {
    --tool-tone: var(--wp--preset--color--hero-blue);
    --tool-tint: var(--wp--preset--color--blue-100);
}

.mega-menu__tools-category--content {
    --tool-tone: var(--wp--preset--color--accent);
    --tool-tint: var(--wp--preset--color--accent-100);
}

.mega-menu__tools-category--marketing {
    --tool-tone: var(--wp--preset--color--text-main);
    --tool-tint: var(--wp--preset--color--yellow-100);
}

.mega-menu__tools-category-head {
    margin: 0 0 var(--wp--preset--spacing--16, 16px);
    padding-bottom: var(--wp--preset--spacing--10, 10px);
    border-bottom: 1px solid color-mix(in srgb, var(--tool-tone) 16%, transparent);
}

.mega-menu__tools-category-head strong {
    display: block;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--tool-tone);
}

.mega-menu__tools-category-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__tools-category-list li {
    min-width: 0;
}

.mega-menu__tools-category-list li + li {
    border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 7%, transparent);
}

.mega-menu__tools-category-list a {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: var(--wp--preset--spacing--12, 12px);
    min-width: 0;
    max-width: 100%;
    padding: var(--wp--preset--spacing--12, 12px) var(--wp--preset--spacing--8, 8px);
    margin-inline: calc(-1 * var(--wp--preset--spacing--8, 8px));
    border-radius: var(--wp--custom--radius--card, 8px);
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    box-sizing: border-box;
    transition:
        color 220ms cubic-bezier(.16, 1, .3, 1),
        background-color 220ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tool-illus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 96px;
    margin: 0;
}

.mega-menu__tool-illus img {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
}

.mega-menu__tools-category-list a:hover,
.mega-menu__tools-category-list a:focus-visible {
    color: var(--tool-tone);
    background: color-mix(in srgb, var(--tool-tint) 42%, transparent);
}

.mega-menu__tools-category-list a:focus-visible {
    outline: 2px solid var(--tool-tone);
    outline-offset: 2px;
}

.mega-menu__tools-category-list .mega-menu__tool-icon {
    width: 32px;
    height: 32px;
    border-color: color-mix(in srgb, var(--tool-tone) 11%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--tool-tint) 50%, var(--wp--preset--color--card));
    color: var(--tool-tone);
    transform: none;
    transition:
        background-color 280ms cubic-bezier(.16, 1, .3, 1),
        border-color 280ms cubic-bezier(.16, 1, .3, 1),
        color 280ms cubic-bezier(.16, 1, .3, 1);
}

.mega-menu__tools-category-list .mega-menu__tool-icon svg {
    width: 16px;
    height: 16px;
}

.mega-menu__tools-category-list a:hover .mega-menu__tool-icon,
.mega-menu__tools-category-list a:focus-visible .mega-menu__tool-icon {
    border-color: color-mix(in srgb, var(--tool-tone) 20%, transparent);
    background: color-mix(in srgb, var(--tool-tint) 72%, var(--wp--preset--color--card));
    transform: none;
}

.mega-menu__tool-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.mega-menu__tools-category-list .mega-menu__tool-label {
    font-size: var(--wp--preset--font-size--base);
    font-weight: 560;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.mega-menu__tool-kicker {
    color: var(--wp--preset--color--text-muted, color-mix(in srgb, var(--wp--preset--color--text-main) 58%, transparent));
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 500;
    line-height: 1.3;
}

.mega-menu__tools-foot {
    margin-top: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__tools-plugin {
    grid-template-columns: 38px auto auto minmax(0, 1fr) auto;
    gap: var(--wp--preset--spacing--12, 12px);
    min-height: 56px;
    padding: var(--wp--preset--spacing--8, 8px) var(--wp--preset--spacing--16, 16px);
    border-radius: 12px;
}

.mega-menu__tools-plugin-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text-main);
}

.mega-menu__tools-plugin-icon svg {
    width: 18px;
    height: 18px;
}

.mega-menu__resources-cols {
    display: grid;
    gap: var(--wp--preset--spacing--16);
    min-width: 0;
}

.mega-menu__resources-cols--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mega-menu__resources-cols--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mega-menu__resource {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--12);
    padding: var(--wp--preset--spacing--20);
    background: var(--wp--preset--color--surface);
    box-sizing: border-box;
}

.mega-menu__resource:hover,
.mega-menu__resource:focus-within {
    background: color-mix(in srgb, var(--wp--preset--color--text-main) 4%, var(--wp--preset--color--surface));
}

.mega-menu__resource-hub {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.mega-menu__resource-hub::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mega-menu__resource-hub span {
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--wp--preset--color--accent);
}

.mega-menu__resource-hub strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.mega-menu__resource-hub .arrow-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mega-menu__resource > p {
    margin: 0;
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.45;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__resource ul {
    position: relative;
    z-index: 2;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.mega-menu__resource li a {
    display: flex;
    align-items: center;
    min-height: 38px;
    max-width: 100%;
    padding: 6px 10px;
    box-sizing: border-box;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 500;
    color: var(--wp--preset--color--text-muted);
    text-decoration: none;
}

.mega-menu__resource li a:hover,
.mega-menu__resource li a:focus-visible {
    color: var(--wp--preset--color--text-main);
    background: var(--wp--preset--color--card);
}

.mega-menu__resource:has(.mega-menu__resource-hub:focus-visible) {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

.mega-menu__resource-hub:focus-visible {
    outline: none;
}

.mega-menu__resource li a:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}


/* =================================================================
   BACKDROP
   ================================================================= */

.mega-menu__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    pointer-events: none;
}

.mega-menu__backdrop.is-active {
    opacity: 1;
    visibility: visible;
}


/* =================================================================
   MOBILE (<= 1024px)
   ================================================================= */

@media (max-width: 768px) {
    /* Entire trigger is tappable — pointer cursor */
    .mega-menu__trigger {
        text-align: center;
        justify-content: center;
        cursor: pointer;
    }

    .mega-menu__link {
        font-size: 32px;
        font-family: 'Space Grotesk', sans-serif;
        font-weight: 600;
        pointer-events: none; /* tap handled by trigger */
    }

    /* Hide chevron + toggle on mobile — entire item opens grid */
    .mega-menu__toggle,
    .mega-menu__chevron {
        display: none;
    }

    /* Sub-menu as full-screen overlay */
    .mega-menu__grid {
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        box-sizing: border-box;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 80px 24px 40px;
        background: var(--wp--preset--color--surface, #F5F4F0);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        z-index: 1002;

        /* Hidden */
        opacity: 0;
        visibility: hidden;
        transform: translateX(30px);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    .mega-menu__grid.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
    }

    /* Parent page link (injected by JS) — plain list item above cards */
    .mega-menu__parent-link {
        width: 100%;
        max-width: 400px;
        list-style: none;
    }

    .mega-menu__parent-link a {
        display: block;
        padding: 14px 24px;
        font-family: var(--wp--preset--font-family--body, 'Inter', sans-serif);
        font-size: var(--wp--preset--font-size--base);
        font-weight: 500;
        color: var(--wp--preset--color--text-muted, #3D3D3D);
        text-decoration: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        transition: color 0.2s ease;
    }

    .mega-menu__parent-link a:hover {
        color: var(--wp--preset--color--text-main, #111);
    }

    /* Cards: uniform width, compact */
    .mega-menu__card {
        width: 100%;
        max-width: 400px;
    }

    .mega-menu__card-link {
        min-height: 72px;
        padding: 20px 24px;
        font-size: var(--wp--preset--font-size--base);
        border-radius: 10px;
        align-items: center;
    }

    .mega-menu__card-title {
        font-size: var(--wp--preset--font-size--lg);
    }

    .mega-menu__arrow {
        width: 32px;
        height: 32px;
    }

    .mega-menu__arrow .arrow-icon {
        width: 18px;
        height: 18px;
    }

    /* Back button (injected by JS) */
    .mega-menu__back {
        display: flex;
        position: absolute;
        top: 24px;
        left: 24px;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--wp--preset--color--text-muted);
        font-family: 'Inter', sans-serif;
        font-size: var(--wp--preset--font-size--sm);
        font-weight: 500;
        padding: 8px 0;
        z-index: 1003;
    }

    .mega-menu__back svg {
        width: 18px;
        height: 18px;
    }

    .mega-menu__back:hover {
        color: var(--wp--preset--color--text-main);
    }

    /* Hide backdrop on mobile */
    .mega-menu__backdrop {
        display: none;
    }

    .mega-menu__grid.mega-menu__grid--services,
    .mega-menu__grid.mega-menu__grid--resources,
    .mega-menu__grid.mega-menu__grid--tools {
        display: block;
        justify-content: flex-start;
        align-items: stretch;
        padding: 72px var(--layout-padding, 24px) 32px;
        overflow-y: auto;
        transform: none;
    }

    .mega-menu__grid.mega-menu__grid--services.is-open,
    .mega-menu__grid.mega-menu__grid--resources.is-open,
    .mega-menu__grid.mega-menu__grid--tools.is-open {
        transform: none;
    }

    .mega-menu__resources-cols--2,
    .mega-menu__resources-cols--3 {
        grid-template-columns: 1fr;
    }

    .mega-menu__services-kicker {
        display: none;
    }

    .mega-menu__services-cols {
        grid-template-columns: 1fr;
    }

    .mega-menu__group {
        padding: var(--wp--preset--spacing--16, 16px);
    }

    .mega-menu__hub {
        margin: calc(var(--wp--preset--spacing--16, 16px) * -1);
        margin-bottom: var(--wp--preset--spacing--12, 12px);
        min-height: 56px;
    }

    .mega-menu__group li a {
        min-height: 44px;
    }
}

/* =================================================================
   NAVIGATION HUB V3 — shared animated stage
   ================================================================= */

.mega-menu__stage {
    position: fixed;
    left: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    background: var(--wp--preset--color--card);
    border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    box-shadow: 0 24px 64px rgb(18 18 18 / 10%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        height 360ms cubic-bezier(.22, 1, .36, 1),
        opacity 180ms ease,
        visibility 180ms ease;
    z-index: 999;
}

.mega-menu__stage.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu__stage > .mega-menu__grid,
.mega-menu__stage > .mega-menu__grid.mega-menu__grid--services,
.mega-menu__stage > .mega-menu__grid.mega-menu__grid--resources,
.mega-menu__stage > .mega-menu__grid.mega-menu__grid--tools,
.mega-menu__stage > .mega-menu__grid.mega-menu__grid--references {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
    width: 100%;
    height: auto;
    padding:
        var(--wp--preset--spacing--20, 20px)
        0
        var(--wp--preset--spacing--32, 32px);
    overflow: visible;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    transition: none;
    pointer-events: none;
}

.mega-menu__stage > .mega-menu__grid.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu__panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--wp--preset--spacing--24, 24px);
    margin-bottom: var(--wp--preset--spacing--20, 20px);
}

.mega-menu__panel-head > div {
    display: grid;
    gap: 5px;
}

.mega-menu__panel-head .mega-menu__panel-title {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--lg);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--wp--preset--color--text-main);
}

.mega-menu__eyebrow {
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__panel-link,
.mega-menu__services-overview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 14%, transparent);
    border-radius: 999px;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.mega-menu__panel-link:hover,
.mega-menu__panel-link:focus-visible,
.mega-menu__services-overview:hover,
.mega-menu__services-overview:focus-visible {
    border-color: var(--wp--preset--color--text-main);
    background: var(--wp--preset--color--surface);
}

.mega-menu__panel-link .arrow-icon,
.mega-menu__contact-card > a .arrow-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.mega-menu__trigger::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--wp--preset--color--accent);
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity 180ms ease, transform 240ms cubic-bezier(.22, 1, .36, 1);
}

.mega-menu__trigger {
    position: relative;
}

.mega-menu__trigger.is-open::before {
    opacity: 1;
    transform: scaleX(1);
}

.mega-menu__item-icon,
.mega-menu__resource-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    flex: 0 0 30px;
    border: 1px solid color-mix(in srgb, currentColor 13%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, currentColor 5%, transparent);
}

.mega-menu__item-icon svg,
.mega-menu__resource-icon svg {
    width: 16px;
    height: 16px;
}

.mega-menu__group li a {
    gap: 10px;
    padding: 5px 8px;
}

.mega-menu__group li a > span:last-child {
    min-width: 0;
}

.mega-menu__resources-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__resources-layout--tools {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 2.28fr);
    align-items: stretch;
}

.mega-menu__resource-stack {
    display: grid;
    gap: 1px;
    min-width: 0;
    background: var(--wp--preset--color--surface);
}

.mega-menu__resource--hub {
    justify-content: center;
}

.mega-menu__resource--hub .mega-menu__resource-hub::after {
    display: block;
}

.mega-menu__tools {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--wp--preset--spacing--16, 16px) var(--wp--preset--spacing--20, 20px);
    background: var(--wp--preset--color--card);
    box-sizing: border-box;
}

.mega-menu__tools > p {
    margin: 0;
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.45;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__tools-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--wp--preset--spacing--16, 16px);
    row-gap: 0;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--wp--preset--color--surface);
    list-style: none;
}

.mega-menu__tools-list a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 5px 0;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 500;
    color: var(--wp--preset--color--text-muted);
    text-decoration: none;
}

.mega-menu__tools-list a > span {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mega-menu__tools-list a:hover,
.mega-menu__tools-list a:focus-visible {
    color: var(--wp--preset--color--text-main);
}

.mega-menu__tools-list a:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

.mega-menu__resources-cols {
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--surface);
    background: var(--wp--preset--color--surface);
}

.mega-menu__resource {
    gap: 10px;
    padding: var(--wp--preset--spacing--16, 16px);
    background: var(--wp--preset--color--card);
}

.mega-menu__resource:hover,
.mega-menu__resource:focus-within {
    background: var(--wp--preset--color--card);
}

.mega-menu__resource-hub {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.mega-menu__resource-hub::after {
    display: none;
}

.mega-menu__resource-hub strong {
    font-size: var(--wp--preset--font-size--base);
}

.mega-menu__resource > p {
    min-height: 0;
}

.mega-menu__resource ul {
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--wp--preset--color--surface);
}

.mega-menu__resource li a {
    min-height: 34px;
    padding: 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-menu__resource li a > span {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mega-menu__featured-post {
    min-width: 0;
    background: var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--card);
}

.mega-menu__featured-post > a {
    display: grid;
    grid-template-rows: minmax(120px, 1fr) auto;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.mega-menu__featured-post figure {
    min-height: 0;
    margin: 0;
    overflow: hidden;
    background: #242424;
}

.mega-menu__featured-post img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
    transition: opacity 220ms ease, scale 420ms cubic-bezier(.22, 1, .36, 1);
}

.mega-menu__featured-post a:hover img,
.mega-menu__featured-post a:focus-visible img {
    opacity: .82;
    scale: 1.025;
}

.mega-menu__featured-copy {
    display: grid;
    gap: 8px;
    padding: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__featured-copy small {
    font-size: var(--wp--preset--font-size--xs);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 62%);
}

.mega-menu__featured-copy > strong {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 500;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mega-menu__featured-copy > span {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgb(255 255 255 / 16%);
    font-size: var(--wp--preset--font-size--sm);
}

.mega-menu__featured-copy i {
    font-style: normal;
}

.mega-menu__references-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: var(--wp--preset--spacing--16, 16px);
}

.mega-menu__project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 1px;
    list-style: none;
    background: var(--wp--preset--color--surface);
}

.mega-menu__project-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(112px, .72fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--wp--preset--spacing--16, 16px);
    min-height: 112px;
    padding: 10px;
    background: var(--wp--preset--color--card);
    color: var(--wp--preset--color--text-main);
    text-decoration: none;
    transition: background-color 180ms ease;
}

.mega-menu__project-card:hover,
.mega-menu__project-card:focus-visible {
    background: color-mix(in srgb, var(--wp--preset--color--surface) 70%, var(--wp--preset--color--card));
}

.mega-menu__project-card figure {
    height: 92px;
    margin: 0;
    overflow: hidden;
    background: var(--wp--preset--color--surface);
}

.mega-menu__project-card figure:empty::after {
    content: 'teil1.';
    display: grid;
    height: 100%;
    place-items: center;
    color: var(--wp--preset--color--text-muted);
}

.mega-menu__project-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 420ms cubic-bezier(.22, 1, .36, 1);
}

.mega-menu__project-card:hover img,
.mega-menu__project-card:focus-visible img {
    scale: 1.025;
}

.mega-menu__project-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.mega-menu__project-copy small {
    overflow: hidden;
    font-size: var(--wp--preset--font-size--xs);
    line-height: 1.25;
    color: var(--wp--preset--color--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mega-menu__project-copy strong {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 500;
    letter-spacing: -.02em;
}

.mega-menu__project-arrow {
    display: inline-flex;
    align-self: center;
    color: currentColor;
}

.mega-menu__project-arrow .arrow-icon {
    width: 16px;
    height: 16px;
}

.mega-menu__contact-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--wp--preset--spacing--24, 24px);
    box-sizing: border-box;
    background:
        radial-gradient(circle at 80% 10%, rgb(252 73 11 / 24%), transparent 35%),
        var(--wp--preset--color--text-main);
    color: var(--wp--preset--color--card);
}

.mega-menu__contact-card .mega-menu__eyebrow {
    margin-bottom: auto;
    color: rgb(255 255 255 / 58%);
}

.mega-menu__contact-card .mega-menu__panel-title {
    max-width: 12ch;
    margin: var(--wp--preset--spacing--24, 24px) 0 10px;
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--xl);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.05;
    color: inherit;
}

.mega-menu__contact-card p {
    max-width: 34ch;
    margin: 0 0 var(--wp--preset--spacing--20, 20px);
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.45;
    color: rgb(255 255 255 / 68%);
}

.mega-menu__contact-card > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding-top: 12px;
    border-top: 1px solid rgb(255 255 255 / 22%);
    color: inherit;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 1100px) and (min-width: 769px) {
    .mega-menu__project-card {
        grid-template-columns: 96px minmax(0, 1fr) auto;
    }

    .mega-menu__project-card figure {
        height: 78px;
    }

    .mega-menu__resources-layout--tools {
        grid-template-columns: minmax(200px, 0.8fr) minmax(0, 2fr);
    }

    .mega-menu__tools-layout {
        grid-template-columns: 1fr;
    }

    .mega-menu__tools-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mega-menu__tools-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mega-menu__references-layout {
        grid-template-columns: minmax(0, 2.5fr) minmax(230px, 1fr);
    }
}

@media (max-width: 768px) {
    html.has-mega-menu-open {
        overflow: hidden;
    }

    .site-header.is-open .main-header-menu {
        align-items: stretch;
        justify-content: center;
        gap: 0;
        padding: 96px var(--layout-padding, 24px) 32px;
        box-sizing: border-box;
        background: var(--wp--preset--color--bg);
        color: var(--wp--preset--color--text-main);
    }

    .site-header.is-open .logo-svg-main {
        fill: var(--wp--preset--color--text-main);
    }

    .site-header.is-open .hud-left {
        position: relative;
        z-index: 1001;
    }

    .site-header.is-open .nav-toggle-mobile .toggle-line {
        background: var(--wp--preset--color--text-main);
    }

    .main-header-menu > li {
        width: min(100%, 520px);
        margin-inline: auto;
        border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .main-header-menu > li > a,
    .main-header-menu > li > .mega-menu__link {
        display: flex;
        width: 100%;
        min-height: 64px;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
        color: var(--wp--preset--color--text-main);
        font-family: var(--wp--preset--font-family--heading);
        font-size: clamp(1.45rem, 7vw, 2rem);
        font-weight: 500;
        letter-spacing: -.035em;
        pointer-events: auto;
    }

    .main-header-menu > li:last-child > a,
    .main-header-menu > li.menu-cta > a {
        justify-content: space-between;
        margin-top: 20px;
        padding: 14px 18px;
        border-radius: 0;
        background: var(--wp--preset--color--accent);
        color: var(--wp--preset--color--card);
        font-size: var(--wp--preset--font-size--base);
    }

    .main-header-menu > li.menu-cta > a::after {
        content: '↗';
        font-size: 1rem;
    }

    .mega-menu__trigger {
        display: flex;
        justify-content: flex-start;
        text-align: left;
    }

    .mega-menu__trigger::before {
        display: none;
    }

    .mega-menu__stage {
        inset: 0;
        width: 100%;
        height: 100dvh !important;
        overflow: hidden;
        background: var(--wp--preset--color--bg);
        border: 0;
        box-shadow: none;
        z-index: 1004;
    }

    .mega-menu__stage > .mega-menu__grid,
    .mega-menu__stage > .mega-menu__grid.mega-menu__grid--services,
    .mega-menu__stage > .mega-menu__grid.mega-menu__grid--resources,
    .mega-menu__stage > .mega-menu__grid.mega-menu__grid--tools,
    .mega-menu__stage > .mega-menu__grid.mega-menu__grid--references {
        inset: 0;
        height: 100dvh;
        padding: 82px 0 32px;
        overflow-y: auto;
        background: var(--wp--preset--color--bg);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__back {
        display: inline-flex;
        position: absolute;
        top: 20px;
        left: var(--layout-padding, 24px);
        min-height: 44px;
        align-items: center;
        padding: 0;
        color: var(--wp--preset--color--text-main);
        z-index: 2;
    }

    .mega-menu__panel-head {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .mega-menu__panel-head .mega-menu__panel-title {
        font-size: var(--wp--preset--font-size--base);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__eyebrow {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__panel-link,
    .mega-menu__services-overview {
        min-height: 38px;
        padding-inline: 12px;
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 16%, transparent);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__services-cols,
    .mega-menu__resources-cols,
    .mega-menu__tools-layout,
    .mega-menu__tools-cols,
    .mega-menu__project-list {
        grid-template-columns: 1fr;
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        background: var(--wp--preset--color--card);
    }

    .mega-menu__tools-layout {
        border: 0;
        background: transparent;
    }

    .mega-menu__tools-feature {
        background:
            radial-gradient(circle at 76% 16%, rgba(255, 255, 255, 0.56), transparent 28%),
            linear-gradient(135deg, color-mix(in srgb, var(--wp--preset--color--blue-100) 55%, var(--wp--preset--color--bg)) 0%, var(--wp--preset--color--bg) 78%);
        color: var(--wp--preset--color--text-main, #121212);
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__tools-cols > .mega-menu__group {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        background: var(--wp--preset--color--card);
        box-shadow: none;
    }

    .mega-menu__tools-plugin {
        grid-template-columns: minmax(0, 1fr) auto;
        background: var(--wp--preset--color--card);
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-plugin-label {
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__tools-plugin-text {
        grid-column: 1 / -1;
        color: var(--wp--preset--color--text-muted);
        white-space: normal;
    }

    .mega-menu__tools-cat {
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tool-icon {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-cols .mega-menu__group li a:hover .mega-menu__tool-icon,
    .mega-menu__tools-cols .mega-menu__group li a:focus-visible .mega-menu__tool-icon {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 18%, transparent);
        background: var(--wp--preset--color--bg);
    }

    .mega-menu__group,
    .mega-menu__resource,
    .mega-menu__project-card {
        background: var(--wp--preset--color--card);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__group {
        --mm-tint: var(--wp--preset--color--surface);
        --mm-ink: var(--wp--preset--color--text-main);
        padding: 16px;
    }

    .mega-menu__hub {
        margin: -16px -16px 10px;
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__group li a,
    .mega-menu__resource li a {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__group li a:hover,
    .mega-menu__group li a:focus-visible,
    .mega-menu__resource li a:hover,
    .mega-menu__resource li a:focus-visible {
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__resources-layout,
    .mega-menu__resources-layout--tools,
    .mega-menu__references-layout {
        grid-template-columns: 1fr;
    }

    .mega-menu__knowledge-hubs,
    .mega-menu__knowledge-post-list {
        grid-template-columns: 1fr;
    }

    .mega-menu__knowledge-hubs {
        background: var(--wp--preset--color--card);
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__knowledge-hub {
        min-height: 64px;
        padding: 12px 14px 12px 12px;
        background: transparent;
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__knowledge-hub:first-child {
        border-radius: var(--wp--custom--radius--panel, 16px) var(--wp--custom--radius--panel, 16px) 0 0;
    }

    .mega-menu__knowledge-hub:last-child {
        border-radius: 0 0 var(--wp--custom--radius--panel, 16px) var(--wp--custom--radius--panel, 16px);
        box-shadow: inset 0 1px 0 color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
    }

    .mega-menu__knowledge-hub:hover,
    .mega-menu__knowledge-hub:focus-visible {
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__knowledge-hub-icon {
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__knowledge-hub-text,
    .mega-menu__knowledge-posts-head .mega-menu__panel-label {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__knowledge-hub-arrow {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__knowledge-post {
        grid-template-rows: none;
        grid-template-columns: 104px minmax(0, 1fr);
        background: var(--wp--preset--color--card);
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__knowledge-post figure {
        min-height: 88px;
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__knowledge-post-copy small {
        color: color-mix(in srgb, var(--wp--preset--color--accent) 80%, #fff);
    }

    .mega-menu__tools {
        padding: 16px;
        background: var(--wp--preset--color--card);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools > p,
    .mega-menu__tools-list a {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__tools-list {
        grid-template-columns: 1fr;
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__tools-list a:hover,
    .mega-menu__tools-list a:focus-visible {
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__resource {
        padding: 16px;
    }

    .mega-menu__resource-hub strong {
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__resource > p,
    .mega-menu__project-copy small {
        min-height: 0;
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__resource ul {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__featured-post {
        min-height: 270px;
        background: var(--wp--preset--color--card);
    }

    .mega-menu__project-card {
        grid-template-columns: 104px minmax(0, 1fr) auto;
        min-height: 92px;
        padding: 8px;
    }

    .mega-menu__project-card figure {
        height: 74px;
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__project-copy strong {
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__project-card:hover,
    .mega-menu__project-card:focus-visible {
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__contact-card {
        min-height: 300px;
        background:
            radial-gradient(circle at 80% 10%, rgb(252 73 11 / 28%), transparent 38%),
            var(--wp--preset--color--text-main);
    }
}

@media (max-width: 768px) {
    .mega-menu__tools-toolbar {
        justify-content: flex-start;
        margin-bottom: var(--wp--preset--spacing--16, 16px);
    }

    .mega-menu__tools-feature {
        grid-template-columns: 1fr;
        gap: var(--wp--preset--spacing--24, 24px);
        min-height: 0;
        padding: var(--wp--preset--spacing--20, 20px);
        background:
            radial-gradient(circle at 76% 16%, rgba(255, 255, 255, 0.56), transparent 28%),
            linear-gradient(135deg, color-mix(in srgb, var(--wp--preset--color--blue-100) 55%, var(--wp--preset--color--bg)) 0%, var(--wp--preset--color--bg) 78%);
        color: var(--wp--preset--color--text-main, #121212);
    }

    .mega-menu__tools-feature-copy {
        max-width: none;
    }

    .mega-menu__tools-feature-copy strong {
        font-size: var(--wp--preset--font-size--xl);
    }

    .mega-menu__tools-feature-console {
        min-height: 144px;
    }

    .mega-menu__tools-categories {
        grid-template-columns: 1fr;
        padding: 0;
        border: 0;
    }

    .mega-menu__tools-category,
    .mega-menu__tools-category:first-child,
    .mega-menu__tools-category:last-child,
    .mega-menu__tools-category + .mega-menu__tools-category {
        --tool-tone: var(--wp--preset--color--text-main);
        --tool-tint: var(--wp--preset--color--surface);
        padding: var(--wp--preset--spacing--20, 20px) 0;
        border: 0;
        border-left: 0;
        border-right: 0;
        border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__tools-category:first-child {
        border-top: 0;
    }

    .mega-menu__tools-category-head {
        margin-bottom: var(--wp--preset--spacing--12, 12px);
        border-bottom-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
    }

    .mega-menu__tools-category-head strong {
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-category-list li + li {
        border-top-color: color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
    }

    .mega-menu__tools-category-list a {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__tool-kicker {
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__tools-category-list .mega-menu__tool-icon {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-category-list a:hover,
    .mega-menu__tools-category-list a:focus-visible {
        color: var(--wp--preset--color--text-main);
        background: var(--wp--preset--color--surface);
    }

    .mega-menu__tools-category-list a:hover .mega-menu__tool-icon,
    .mega-menu__tools-category-list a:focus-visible .mega-menu__tool-icon {
        border-color: color-mix(in srgb, var(--wp--preset--color--text-main) 16%, transparent);
        background: var(--wp--preset--color--card);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-plugin {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        background: var(--wp--preset--color--card);
    }

    .mega-menu__tools-plugin-icon {
        grid-column: 1;
        grid-row: 1 / 3;
        background: var(--wp--preset--color--surface);
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-plugin-label {
        display: none;
    }

    .mega-menu__tools-plugin strong {
        grid-column: 2;
        grid-row: 1;
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__tools-plugin-text {
        grid-column: 2;
        grid-row: 2;
    }

    .mega-menu__tools-plugin > .arrow-icon {
        grid-column: 3;
        grid-row: 1 / 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mega-menu__stage,
    .mega-menu__grid,
    .mega-menu__chevron,
    .mega-menu__trigger::before,
    .mega-menu__tools-console-rings,
    .mega-menu__tools-console-meter i,
    .mega-menu__project-card img,
    .mega-menu__featured-post img {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Services panel: editorial theme treatment instead of an app-style card grid. */
@media (min-width: 769px) {
    .mega-menu__stage .mega-menu__services-cols {
        gap: 0;
        overflow: visible;
        border: 0;
        border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        border-radius: 0;
        background: transparent;
    }

    .mega-menu__stage .mega-menu__group {
        position: relative;
        padding: 0 var(--wp--preset--spacing--24, 24px) var(--wp--preset--spacing--16, 16px);
        border-right: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 10%, transparent);
        background: var(--wp--preset--color--card);
    }

    .mega-menu__stage .mega-menu__group:first-child {
        padding-left: 0;
    }

    .mega-menu__stage .mega-menu__group:last-child {
        padding-right: 0;
        border-right: 0;
    }

    .mega-menu__stage .mega-menu__group::before {
        content: '';
        display: block;
        width: 100%;
        height: 5px;
        margin-bottom: var(--wp--preset--spacing--12, 12px);
        background: var(--mm-tint);
    }

    .mega-menu__stage .mega-menu__hub {
        grid-template-columns: 32px minmax(0, 1fr) auto;
        min-height: 0;
        margin: 0;
        padding: var(--wp--preset--spacing--12, 12px) 0 var(--wp--preset--spacing--20, 20px);
        border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 8%, transparent);
        background: transparent;
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__stage .mega-menu__hub span {
        align-self: start;
        padding-top: 4px;
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__stage .mega-menu__hub strong {
        font-size: var(--wp--preset--font-size--xl);
        font-weight: 500;
        line-height: 1.08;
    }

    .mega-menu__stage .mega-menu__hub .arrow-icon {
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__stage .mega-menu__group ul {
        gap: 0;
    }

    .mega-menu__stage .mega-menu__group li + li {
        border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--text-main) 7%, transparent);
    }

    .mega-menu__stage .mega-menu__group li a {
        min-height: 42px;
        gap: var(--wp--preset--spacing--12, 12px);
        padding: 7px 0;
        border-radius: 0;
        color: var(--wp--preset--color--text-main);
    }

    .mega-menu__stage .mega-menu__group li a:hover,
    .mega-menu__stage .mega-menu__group li a:focus-visible {
        padding-inline: var(--wp--preset--spacing--8, 8px);
        background: color-mix(in srgb, var(--mm-tint) 55%, transparent);
    }

    .mega-menu__stage .mega-menu__item-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--wp--preset--color--text-muted);
    }

    .mega-menu__stage .mega-menu__item-icon svg {
        width: 17px;
        height: 17px;
    }
}
