/* Header / Primary Navigation */

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--paper);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.header-inner {
    display: flex;
    align-items: stretch;
    height: var(--header-h);
    gap: 56px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--navy);
    background: var(--paper);
    padding: 4px 10px;
    min-width: 118px;
    width: 118px;
    height: var(--header-h);
    flex-shrink: 0;
}

.site-brand img,
.site-brand img.custom-logo,
.site-brand__logo {
    width: 98px;
    height: 98px;
    object-fit: contain;
}

.site-brand__name {
    font-family: var(--display);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy);
    text-align: center;
    white-space: nowrap;
}

.nav-col {
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 56px;
    align-self: flex-end;
    background: var(--nav-bg);
    border-radius: 20px 0 0 0;
    position: relative;
    z-index: 400;
}

.main-navigation {
    display: flex;
    align-items: stretch;
    flex: 1;
    overflow: visible;
    position: relative;
    z-index: 400;
}

.main-navigation > ul {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation > ul:last-child {
    margin-left: auto;
    flex-shrink: 0;
}

.main-navigation > ul > li {
    position: relative;
    display: flex;
    align-items: stretch;
}

.main-navigation > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    color: #fff;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
    position: relative;
}

.main-navigation > ul > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    margin-left: 2px;
}

.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current-menu-ancestor > a,
.main-navigation > ul > li > a:hover {
    border-bottom-color: var(--wine);
}

.main-navigation > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.main-navigation > ul > li.menu-item-has-children > a::before {
    display: none;
}

.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    list-style: none;
    margin: 0;
    padding: 16px 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.main-navigation ul ul li {
    display: block;
}

.main-navigation ul ul a {
    display: block;
    padding: 9px 24px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.main-navigation ul ul a:hover {
    color: var(--wine);
    background: #fafafa;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul {
    display: block;
}

.nav-buttons {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0 10px 0 0;
    gap: 2px;
    flex-shrink: 0;
}

.nav-buttons .lang-item {
    position: relative;
}

.nav-buttons .lang-item > a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}

.nav-buttons .lang-item > a::after {
    content: '▾';
    margin-left: 4px;
    font-size: 10px;
}

.nav-buttons .lang-item .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.nav-buttons .lang-item:hover .sub-menu,
.nav-buttons .lang-item:focus-within .sub-menu {
    display: block;
}

.nav-buttons .lang-item .sub-menu li {
    display: block;
}

.nav-buttons .lang-item .sub-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-buttons .lang-item .sub-menu a:hover {
    color: var(--wine);
    background: #fafafa;
}

.nav-btn-text {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}

.nav-btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    text-decoration: none;
    position: relative;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(23, 61, 107, 0.28);
    border-radius: 8px;
    color: var(--navy);
    cursor: pointer;
    font-size: 0;
    line-height: 1;
}

.menu-toggle::before {
    content: '☰';
    font-size: 22px;
    line-height: 1;
}

.menu-toggle[aria-expanded='true']::before {
    content: '✕';
    font-size: 20px;
}

.site-search-wrap {
    background: var(--navy-deep);
    padding: 14px 0;
}

.site-search-wrap[hidden] {
    display: none;
}

.site-search-wrap.is-open {
    display: block;
}

.site-search-wrap form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.site-search-wrap input {
    flex: 1;
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 200px;
    font-size: 15px;
    background: #fff;
    color: var(--ink);
    outline: none;
}

.site-search-wrap button {
    height: 42px;
    padding: 0 22px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: 200px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 72px;
        align-items: center;
        gap: 12px;
        padding: 8px 12px;
    }

    .site-brand {
        min-width: 72px;
        width: 72px;
        height: 56px;
        padding: 0;
    }

    .site-brand img,
    .site-brand img.custom-logo,
    .site-brand__logo {
        width: 56px;
        height: 56px;
    }

    .site-brand__name {
        display: none;
    }

    .nav-col {
        flex: 1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        align-self: center;
        height: auto;
        min-height: 56px;
        background: transparent;
        border-radius: 0;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .main-navigation {
        display: none;
        width: 100%;
        flex: 0 0 100%;
        margin-top: 10px;
        padding: 8px 0 14px;
        overflow: visible;
        background: var(--nav-bg);
        border-radius: 12px;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation > ul {
        display: block;
        margin: 0;
    }

    .main-navigation > ul:last-child {
        margin-left: 0;
        margin-top: 8px;
        padding: 8px 12px 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
    }

    .main-navigation > ul > li {
        display: block;
    }

    .main-navigation > ul > li > a {
        padding: 14px 18px;
        justify-content: flex-start;
        border-bottom: 0;
        font-size: 16px;
    }

    .main-navigation > ul > li.current-menu-item > a,
    .main-navigation > ul > li.current-menu-ancestor > a,
    .main-navigation > ul > li > a:hover {
        border-bottom-color: transparent;
        background: rgba(255, 255, 255, 0.08);
    }

    .main-navigation ul ul {
        position: static;
        border: none;
        box-shadow: none;
        padding: 0 0 8px;
        background: rgba(255, 255, 255, 0.07);
        display: none;
        border-radius: 0;
        min-width: 0;
    }

    .main-navigation ul ul a {
        color: #fff;
        padding: 12px 18px 12px 32px;
        font-size: 15px;
    }

    .main-navigation ul ul a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.08);
    }

    .main-navigation ul li.is-open > ul {
        display: block;
    }

    .nav-buttons {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        padding: 4px 6px 8px;
    }

    .nav-buttons > li {
        flex: 1 1 auto;
    }

    .nav-buttons .lang-item > a,
    .nav-buttons .nav-icon-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-buttons .lang-item .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        margin-top: 8px;
        border: 0;
        border-radius: 8px;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-buttons .lang-item.is-open .sub-menu,
    .nav-buttons .lang-item:focus-within .sub-menu {
        display: block;
    }

    .nav-buttons .lang-item .sub-menu a {
        color: #fff;
        padding: 12px 14px;
    }

    .nav-buttons .lang-item .sub-menu a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }
}
