/*
 * Khalaj Header & Footer — Stage 2
 * Pixel reference: 1920 × 150 px
 * Dynamic areas: quick menu + main menu
 */
.khf-stage2-header,
.khf-stage2-header * {
    box-sizing: border-box;
}

.khf-stage2-header {
    position: relative;
    z-index: 9999;
    width: 100%;
    height: 150px;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
    line-height: normal;
}

.khf-stage2-header__canvas {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: visible;
    background: #fff;
}

.khf-stage2-header__image {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: 1920px;
    min-width: 1920px;
    max-width: none !important;
    height: 150px;
    margin: 0;
    padding: 0;
    border: 0;
    transform: translateX(-50%);
    object-fit: none;
    object-position: center top;
    user-select: none;
    -webkit-user-drag: none;
}

.khf-stage2-nav {
    position: absolute;
    left: 50%;
    z-index: 5;
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
    font-family: Peyda, Tahoma, Arial, sans-serif;
    font-style: normal;
    line-height: 1;
}

.khf-stage2-nav ul,
.khf-stage2-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.khf-stage2-nav a {
    text-decoration: none;
    outline: none;
}

.khf-stage2-nav a:focus-visible {
    outline: 2px solid #1473e6;
    outline-offset: 2px;
}

/* First menu: quick access — PSD coordinates x:1250..1540 / y:14..47 */
.khf-stage2-nav--quick {
    top: 14px;
    width: 1920px;
    height: 34px;
    pointer-events: none;
}

.khf-stage2-menu--quick {
    position: absolute;
    top: 0;
    left: 1248px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    width: 292px;
    height: 34px;
    padding: 0 8px !important;
    direction: rtl;
    background: #e7e7e7;
    pointer-events: auto;
}

.khf-stage2-menu--quick > li {
    position: relative;
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    min-width: 0;
    height: 34px;
}

.khf-stage2-menu--quick > li > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: 34px;
    color: #333;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    transition: color .16s ease;
}

.khf-stage2-menu--quick > li > a::before {
    content: "";
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    opacity: .72;
    background: center / 12px 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.1.1l2-2a5 5 0 0 0-7.1-7.1l-1.1 1.1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.1-.1l-2 2A5 5 0 0 0 12 20l1.1-1.1'/%3E%3C/svg%3E");
}

.khf-stage2-menu--quick > li:hover > a,
.khf-stage2-menu--quick > li:focus-within > a,
.khf-stage2-menu--quick > li.current-menu-item > a,
.khf-stage2-menu--quick > li.current-menu-ancestor > a {
    color: #0b69e3;
}

/* Second menu: main menu — PSD coordinates x:846..1450 / y:88..132 */
.khf-stage2-nav--main {
    top: 88px;
    width: 1920px;
    height: 44px;
    pointer-events: none;
}

.khf-stage2-menu--main {
    position: absolute;
    top: 0;
    left: 846px;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    width: 604px;
    height: 44px;
    padding: 0 !important;
    direction: rtl;
    background: #fff;
    pointer-events: auto;
}

.khf-stage2-menu--main > li {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 44px;
}

.khf-stage2-menu--main > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    padding: 0 7px;
    overflow: hidden;
    color: #111;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .16s ease;
}

.khf-stage2-menu--main > li.menu-item-has-children > a::after {
    content: "";
    display: block;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    border: 1px solid #bcbcbc;
    border-radius: 2px;
    background: center / 9px 9px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%23868686' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.khf-stage2-menu--main > li:hover > a,
.khf-stage2-menu--main > li:focus-within > a,
.khf-stage2-menu--main > li.current-menu-item > a,
.khf-stage2-menu--main > li.current-menu-ancestor > a {
    color: #0b69e3;
}

/* Shared dropdown behaviour */
.khf-stage2-nav .sub-menu {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    z-index: 30;
    display: block;
    min-width: 205px;
    padding: 7px !important;
    visibility: hidden;
    opacity: 0;
    direction: rtl;
    border: 1px solid #ececec;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
    transform: translateY(7px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.khf-stage2-menu--quick .sub-menu {
    top: 32px;
    min-width: 180px;
}

.khf-stage2-nav li:hover > .sub-menu,
.khf-stage2-nav li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.khf-stage2-nav .sub-menu li {
    position: relative;
    display: block;
    width: 100%;
}

.khf-stage2-nav .sub-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    color: #252525;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: 4px;
}

.khf-stage2-nav .sub-menu li:hover > a,
.khf-stage2-nav .sub-menu li:focus-within > a,
.khf-stage2-nav .sub-menu .current-menu-item > a {
    color: #0b69e3;
    background: #f4f8ff;
}

.khf-stage2-nav .sub-menu .menu-item-has-children > a::after {
    content: "‹";
    margin-right: 12px;
    color: #8a8a8a;
    font-size: 16px;
    line-height: 1;
}

.khf-stage2-nav .sub-menu .sub-menu {
    top: -7px;
    right: calc(100% + 7px);
}

@media (min-width: 1921px) {
    .khf-stage2-header__image {
        width: 1920px;
        min-width: 1920px;
    }
}
