/* Vireza — sticky header + primary navigation */

.vz-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--vz-line);
    backdrop-filter: blur(12px);
    transition: box-shadow 0.25s ease;
}

.vz-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(18, 18, 18, 0.06);
}

.vz-header-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: var(--vz-header-h);
}

.vz-brand {
    justify-self: start;
    z-index: 1;
    grid-column: 1;
}

.vz-header-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-self: end;
    grid-column: 3;
}

.vz-brand .custom-logo-link img,
.vz-brand .custom-logo {
    max-height: 40px;
    width: auto;
}

.vz-brand-text {
    font-family: var(--vz-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--vz-ink);
    line-height: 1;
}

.vz-brand-text:hover {
    color: var(--vz-accent);
}

/* Desktop primary nav — between logo and search */
.vz-nav {
    justify-self: center;
    grid-column: 2;
    min-width: 0;
}

.vz-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vz-nav-list > li {
    position: relative;
}

.vz-nav-list > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vz-ink-soft);
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}

.vz-nav-list > li > a:hover,
.vz-nav-list > li:focus-within > a,
.vz-nav-list .current-menu-item > a,
.vz-nav-list .current-menu-ancestor > a,
.vz-nav-list .current_page_item > a,
.vz-nav-list .current_page_ancestor > a {
    color: var(--vz-accent);
}

.vz-nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.vz-nav-list > li:hover > a .vz-nav-caret,
.vz-nav-list > li:focus-within > a .vz-nav-caret,
.vz-nav-list > li.is-open > a .vz-nav-caret {
    transform: rotate(180deg);
}

.vz-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 200px;
    padding: 8px 0;
    background: var(--vz-white);
    border: 1px solid var(--vz-line);
    border-radius: var(--vz-radius-sm);
    box-shadow: var(--vz-shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 20;
}

.vz-nav-list .sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.vz-nav-list > li:hover > .sub-menu,
.vz-nav-list > li:focus-within > .sub-menu,
.vz-nav-list > li.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.vz-nav-list .sub-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vz-ink-soft);
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.vz-nav-list .sub-menu a:hover,
.vz-nav-list .sub-menu .current-menu-item > a {
    color: var(--vz-accent);
    background: rgba(200, 16, 46, 0.05);
}

.vz-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--vz-ink);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.vz-icon-btn:hover {
    background: rgba(200, 16, 46, 0.08);
    color: var(--vz-accent);
}

.vz-menu-toggle {
    display: none;
}

.vz-burger,
.vz-burger::before,
.vz-burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.vz-burger {
    position: relative;
}

.vz-burger::before,
.vz-burger::after {
    content: "";
    position: absolute;
    left: 0;
}

.vz-burger::before {
    top: -6px;
}

.vz-burger::after {
    top: 6px;
}

.vz-menu-toggle[aria-expanded="true"] .vz-burger {
    background: transparent;
}

.vz-menu-toggle[aria-expanded="true"] .vz-burger::before {
    top: 0;
    transform: rotate(45deg);
}

.vz-menu-toggle[aria-expanded="true"] .vz-burger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Search panel */
.vz-search-panel {
    border-top: 1px solid var(--vz-line);
    background: var(--vz-white);
    padding: 16px 0;
}

.vz-search-panel[hidden] {
    display: none;
}

.vz-search-form {
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin-inline: auto;
}

.vz-search-field {
    flex: 1;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--vz-line);
    border-radius: var(--vz-radius-sm);
    background: var(--vz-paper);
    color: var(--vz-ink);
}

.vz-search-submit {
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--vz-radius-sm);
    background: var(--vz-accent);
    color: var(--vz-white);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vz-search-submit:hover {
    background: var(--vz-accent-dark);
}

/* Mobile nav */
.vz-mobile-nav {
    border-top: 1px solid var(--vz-line);
    background: var(--vz-white);
    padding: 8px 0 20px;
}

.vz-mobile-nav[hidden] {
    display: none;
}

.vz-mobile-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vz-mobile-list > li {
    border-bottom: 1px solid var(--vz-line);
}

.vz-mobile-list > .menu-item-has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.vz-mobile-list > .menu-item-has-children > a {
    grid-column: 1;
}

.vz-mobile-list > .menu-item-has-children > .vz-submenu-toggle {
    grid-column: 2;
    grid-row: 1;
}

.vz-mobile-list > .menu-item-has-children > .sub-menu {
    grid-column: 1 / -1;
}

.vz-mobile-list > li > a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--vz-ink);
}

.vz-mobile-list > li > a:hover,
.vz-mobile-list .current-menu-item > a,
.vz-mobile-list .current-menu-ancestor > a {
    color: var(--vz-accent);
}

.vz-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: -6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--vz-ink);
    cursor: pointer;
}

.vz-submenu-toggle:hover {
    background: rgba(200, 16, 46, 0.08);
    color: var(--vz-accent);
}

.vz-submenu-toggle-icon {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
}

.vz-submenu-toggle[aria-expanded="true"] .vz-submenu-toggle-icon {
    transform: rotate(180deg);
}

.vz-mobile-list .sub-menu {
    display: none;
    list-style: none;
    margin: 0 0 8px;
    padding: 0 0 0 14px;
}

.vz-mobile-list .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.vz-mobile-list .sub-menu a {
    display: block;
    padding: 10px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--vz-ink-soft);
    border-bottom: 1px solid var(--vz-line);
}

.vz-mobile-list .sub-menu li:last-child a {
    border-bottom: 0;
}

.vz-mobile-list .sub-menu a:hover,
.vz-mobile-list .sub-menu .current-menu-item > a {
    color: var(--vz-accent);
}

/* Mobile: Logo | Hamburger | Search */
@media (max-width: 900px) {
    .vz-header-bar {
        grid-template-columns: 1fr auto;
    }

    .vz-nav {
        display: none;
    }

    .vz-brand {
        justify-self: start;
        grid-column: 1;
    }

    .vz-header-tools {
        grid-column: 2;
    }

    .vz-menu-toggle {
        display: inline-flex;
    }
}

@media (min-width: 901px) {
    .vz-mobile-nav {
        display: none !important;
    }
}
