/* Header menus (2026-11-30): website/partials/header.blade.php, rows from App\Support\SiteMenu.
   Everything is under #header.wk-nav, so the classic header (header_classic) keeps its old look.
   Each panel is centred under the bar, never taller than the screen, and opens with a short fade. */

#header.wk-nav .menu_right > li > a {
    white-space: nowrap;
}

/* ---------------- desktop and laptop ---------------- */
@media (min-width: 992px) {
    #header.wk-nav .main_menu {
        position: static;
    }

    #header.wk-nav .main_menu > li > a {
        white-space: nowrap;
        border-radius: 8px;
        transition: color .15s, background-color .15s;
    }

    #header.wk-nav .main_menu > li > a:hover {
        color: var(--main-color);
    }

    #header.wk-nav .dropdown-menu.wk-dd__panel {
        --w: 900px;
        position: absolute;
        inset: auto !important;
        top: calc(100% + 10px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: min(var(--w), calc(100vw - 32px));
        min-width: 0;
        max-height: calc(100vh - 110px);
        max-height: calc(100dvh - 110px);
        overflow-y: auto;
        overscroll-behavior: contain;
        margin: 0;
        padding: 20px;
        gap: 18px 22px;
        background: #fff;
        border: 1px solid #e6ece8;
        border-radius: 20px;
        box-shadow: 0 30px 70px -28px rgb(12 40 26 / 30%), 0 4px 14px rgb(12 40 26 / 6%);
        transition: none;
        text-align: start;
        scrollbar-width: thin;
    }

    #header.wk-nav .dropdown-menu.wk-dd__panel.show {
        display: grid;
        animation: wk-dd-in .18s ease-out both;
    }

    #header.wk-nav .dropdown-menu.wk-dd__panel--product { --w: 900px; grid-template-columns: minmax(0, 1fr) 236px; }
    #header.wk-nav .dropdown-menu.wk-dd__panel--solutions { --w: 1120px; grid-template-columns: 272px minmax(0, 1fr); }
    #header.wk-nav .dropdown-menu.wk-dd__panel--company { --w: 860px; grid-template-columns: minmax(0, 1fr) 236px; }
    #header.wk-nav .dropdown-menu.wk-dd__panel--resources { --w: 840px; grid-template-columns: minmax(0, 1fr) 236px; }
}

@keyframes wk-dd-in {
    from { opacity: 0; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    #header.wk-nav .dropdown-menu.wk-dd__panel.show { animation: none; }
}

/* ---------------- inside a panel ---------------- */
#header.wk-nav .wk-dd__panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#header.wk-nav .wk-dd__panel li {
    display: block;
    float: none;
    padding: 0;
    margin: 0;
}

.wk-dd__main,
.wk-dd__aside {
    min-width: 0;
}

.wk-dd__h {
    margin: 0 10px 8px;
    color: #7a857f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.4;
}

[dir="rtl"] .wk-dd__h {
    letter-spacing: 0;
}

.wk-dd__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
}

.wk-dd__grid + .wk-dd__h {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2ef;
    margin-inline: 10px;
    padding-inline: 0;
}

.wk-dd__grid.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wk-dd__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

.wk-dd__list {
    display: grid;
    gap: 2px;
}

/* one row: tinted icon + title + short line */
#header.wk-nav .wk-dd__it {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    color: #14231b;
    text-decoration: none;
    transition: background-color .15s;
}

#header.wk-nav .wk-dd__it:hover,
#header.wk-nav .wk-dd__it:focus-visible {
    background: #f4f7f5;
}

#header.wk-nav .wk-dd__it:focus-visible {
    outline: 2px solid var(--main-color);
    outline-offset: -2px;
}

.wk-dd__ic {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--bg);
    color: var(--c);
    transition: transform .2s;
}

.wk-dd__it:hover .wk-dd__ic {
    transform: scale(1.06);
}

.wk-dd__ic svg,
.wk-dd__arrow svg,
.wk-dd__play svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wk-dd__tx {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.wk-dd__tx strong {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
}

.wk-dd__tx strong,
.wk-dd__tx small {
    text-wrap: pretty;
}

.wk-dd__tx small {
    color: #6b7671;
    font-size: 12.5px;
    line-height: 1.45;
}

.wk-dd__it:hover .wk-dd__tx strong {
    color: var(--c);
}

/* compact rows (industries, use cases): smaller icon, title only */
.is-compact .wk-dd__it {
    padding: 7px 8px;
    gap: 10px;
}

.is-compact .wk-dd__ic {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.is-compact .wk-dd__ic svg {
    width: 17px;
    height: 17px;
}

.is-compact .wk-dd__tx strong {
    font-size: 14px;
    font-weight: 600;
}

/* arrow after a link: points forward in each language */
.wk-dd__arrow {
    display: inline-grid;
    place-items: center;
    transition: translate .2s;
}

.wk-dd__arrow svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.1;
}

[dir="rtl"] .wk-dd__arrow svg {
    transform: scaleX(-1);
}

a:hover > .wk-dd__arrow,
a:hover > em > .wk-dd__arrow {
    translate: 4px 0;
}

[dir="rtl"] a:hover > .wk-dd__arrow,
[dir="rtl"] a:hover > em > .wk-dd__arrow {
    translate: -4px 0;
}

/* links under the panel */
.wk-dd__foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin: -4px 0 0;
    padding: 14px 10px 0;
    border-top: 1px solid #eef2ef;
}

#header.wk-nav .wk-dd__foot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--main-color);
    font-size: 14px;
    font-weight: 600;
}

/* ---------------- side cards ---------------- */
#header.wk-nav .wk-dd__side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
    background: #f4f8f5;
    border: 1px solid #e4ede7;
    color: #14231b;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

#header.wk-nav .wk-dd__side:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -18px rgb(12 40 26 / 35%);
}

.wk-dd__side small {
    color: var(--main-color);
    font-size: 12px;
    font-weight: 600;
}

.wk-dd__side strong {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
}

.wk-dd__side > span:not([class]) {
    color: #5c6862;
    font-size: 13px;
    line-height: 1.55;
}

.wk-dd__side em {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    color: var(--main-color);
    font-size: 13.5px;
    font-style: normal;
    font-weight: 600;
}

/* video card: a small drawn screen with a play button */
#header.wk-nav .wk-dd__side--tour {
    background: linear-gradient(160deg, #136f40 0%, #0b4b2a 100%);
    border-color: transparent;
    color: #fff;
}

.wk-dd__side--tour small { color: #9fe2bb; }
.wk-dd__side--tour > span:not([class]) { color: rgb(255 255 255 / 78%); }
.wk-dd__side--tour em { color: #fff; }

.wk-dd__screen {
    position: relative;
    display: grid;
    gap: 6px;
    align-content: start;
    height: 104px;
    margin-bottom: 8px;
    padding: 14px;
    border-radius: 12px;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 16%);
    overflow: hidden;
}

.wk-dd__screen i {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: rgb(255 255 255 / 22%);
}

.wk-dd__screen i:nth-child(1) { width: 58%; }
.wk-dd__screen i:nth-child(2) { width: 82%; background: rgb(255 255 255 / 14%); }
.wk-dd__screen i:nth-child(3) { width: 40%; background: rgb(255 255 255 / 14%); }

.wk-dd__play {
    position: absolute;
    inset: 50% auto auto 50%;
    translate: -50% -38%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--main-color);
    box-shadow: 0 8px 20px rgb(0 0 0 / 25%);
    transition: scale .2s;
}

.wk-dd__play svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke-width: 1.5;
    margin-inline-start: 3px;
}

[dir="rtl"] .wk-dd__play svg {
    margin-inline-start: 0;
    margin-inline-end: 3px;
    transform: none;
}

.wk-dd__side--tour:hover .wk-dd__play {
    scale: 1.08;
}

/* move card (Solutions) */
.wk-dd__aside .wk-dd__side--move {
    margin-top: 14px;
}

.wk-dd__side--move .wk-dd__ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    margin-bottom: 4px;
}

/* numbers card (Company) */
.wk-dd__stats {
    display: grid;
    gap: 10px;
    margin: 6px 0 4px;
}

.wk-dd__stats > span {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.wk-dd__stats b {
    min-width: 46px;
    color: var(--main-color);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.wk-dd__stats span span {
    color: #4f5b55;
    font-size: 13px;
    line-height: 1.4;
}

/* event card (Resources) */
.wk-dd__photo {
    display: block;
    aspect-ratio: 16 / 10;
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
    background: #e4ede7;
}

.wk-dd__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale .4s;
}

.wk-dd__side--event:hover .wk-dd__photo img {
    scale: 1.04;
}

.wk-dd__side--event strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------------- tighter laptops ---------------- */
@media (min-width: 992px) and (max-width: 1199px) {
    #header.wk-nav .wk-dd__grid.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #header.wk-nav .dropdown-menu.wk-dd__panel--solutions { grid-template-columns: 230px minmax(0, 1fr); }
    #header.wk-nav .dropdown-menu.wk-dd__panel--product,
    #header.wk-nav .dropdown-menu.wk-dd__panel--company,
    #header.wk-nav .dropdown-menu.wk-dd__panel--resources { grid-template-columns: minmax(0, 1fr) 210px; }
}

/* short screens: the big video picture goes first so the list stays in view */
@media (min-width: 992px) and (max-height: 720px) {
    #header.wk-nav .wk-dd__screen { display: none; }
    #header.wk-nav .wk-dd__panel { padding: 16px; }
    #header.wk-nav .wk-dd__it { padding-block: 7px; }
}

/* ---------------- phones and tablets: menus open inside the drawer ---------------- */
@media (max-width: 991px) {
    #header.wk-nav .dropdown-menu.wk-dd__panel {
        position: static !important;
        inset: auto !important;
        transform: none !important;
        width: auto;
        min-width: 0;
        max-height: none;
        margin: 6px 0 4px;
        padding: 8px 4px 6px;
        border: 0;
        border-radius: 14px;
        background: #f6f9f7;
        box-shadow: none;
        transition: none;
    }

    #header.wk-nav .dropdown-menu.wk-dd__panel.show {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #header.wk-nav .wk-dd__side { display: none; }

    .wk-dd__grid,
    .wk-dd__grid.is-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wk-dd__cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    #header.wk-nav .wk-dd__it {
        padding: 8px 6px;
        gap: 9px;
    }

    .wk-dd__ic {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .wk-dd__ic svg { width: 16px; height: 16px; }
    .wk-dd__tx strong { font-size: 13.5px; font-weight: 600; }
    .wk-dd__tx small { display: none; }
    .wk-dd__h { margin: 4px 6px 4px; }
    .wk-dd__grid + .wk-dd__h { margin-inline: 6px; }
    .wk-dd__foot { padding: 10px 6px 4px; margin: 0; }
}

@media (max-width: 400px) {
    .wk-dd__grid,
    .wk-dd__grid.is-compact {
        grid-template-columns: minmax(0, 1fr);
    }
}
