/* === seo-nav component === */

:root {
    --seo-nav-height: 114px;
    --pd-sign-in-bar-height: 0px;
    --total-header-height: calc(var(--seo-nav-height) + var(--pd-sign-in-bar-height));

    --seo-nav-link-color: #fff;
    --seo-nav-link-hover-color: rgba(255, 255, 255, 0.5);
    --seo-nav-dropdown-bg: #fff;
    --seo-nav-dropdown-bg-hover: #f4f4f4;
    --seo-nav-dropdown-link-color: #000;
    --seo-nav-dropdown-link-hover-color: #000;
    --seo-button-link-color: #000;
    --seo-button-link-hover-color: #000;
}
:root:has(.pd-sign-in-bar) {
    --pd-sign-in-bar-height: 42px;
}

#slide-out {
    position: relative;
    z-index: 20;
    width: 100%;
    background: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    height: 114px;
    box-sizing: border-box;
}

.header-flex .navbar-brand {
    display: inline-flex;
    align-items: center;
    outline: none;
    flex-shrink: 0;
    margin-right: 16px;
}

.header-flex .navbar-brand img {
    max-height: 90px;
    width: auto;
    max-width: 300px;
}

/* Inline nav links */
.nav-inline-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
    flex: 1;
    justify-content: end;
    flex-wrap: nowrap;
}

.nav-inline-links li a {
    display: inline-block;
    color: var(--seo-nav-link-color, #fff);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 700;
    padding: 0 10px;
    transition: background 0.2s, color 0.2s;
}

.nav-inline-links li a:hover {
    color: var(--seo-nav-link-hover-color, rgba(255, 255, 255, 0.5));
}

.nav-inline-links li a.active {
    color: var(--seo-nav-link-hover-color, rgba(255, 255, 255, 0.5));
    font-weight: 600;
}

.nav-inline-links li {
    position: relative;
    margin-bottom: 0;
}

/* Inline dropdown */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--seo-nav-dropdown-bg, #fff);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 1001;
}

.nav-inline-links li.has-children.is-open .nav-dropdown {
    display: block;
}

.nav-dropdown li a {
    display: block;
    padding: 8px 16px;
    color: var(--seo-nav-dropdown-link-color, #000);
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    white-space: nowrap;
    border-radius: 0;
}

.nav-dropdown li a:hover {
    background: var(--seo-nav-dropdown-bg-hover, #f4f4f4);
    color: var(--seo-nav-dropdown-link-hover-color, #000);
}

@media (max-width: 768px) {
    .nav-inline-links {
        display: none;
    }
}

/* Hamburger toggle */
.menu-toggle {
    cursor: pointer;
    padding: 4px;
    color: var(--seo-nav-link-color, #fff);
    line-height: 0;
    flex-shrink: 0;
}

.menu-toggle:hover {
    opacity: 0.7;
}

/* Overlay */
#seo-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

#seo-nav-overlay.is-visible {
    display: block;
}

/* Slide-out panel */
#seo-nav-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

#seo-nav-panel.is-open {
    right: 0;
}

.seo-nav-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 4px 8px;
    display: flex;
    align-items: center;
}

.seo-nav-close:hover {
    color: #000;
}

.seo-nav-list {
    list-style: none;
    margin: 50px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 5px;
}

.seo-nav-list > li > a {
    display: block;
    padding: 14px 24px;
    color: #000;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.seo-nav-list > li > a:hover,
.seo-nav-list > li > a.active {
    color: #000;
    background: #f8f8f8;
}

/* Nested children — panel */
.seo-nav-list > li.has-children > ul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fafafa;
}

.seo-nav-list > li.has-children.is-open > ul {
    display: block;
}

.seo-nav-list ul li a {
    display: block;
    padding: 10px 24px 10px 36px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.seo-nav-list ul li a:hover {
    color: #000;
}

/* Chevron — panel */
.seo-nav-list > li.has-children > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.seo-nav-list > li.has-children > a::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
    margin-right: 4px;
}

.seo-nav-list > li.has-children.is-open > a::after {
    transform: rotate(-135deg);
}

/* Chevron — inline nav */
.nav-inline-links li.has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 2px solid var(--seo-nav-link-color, #fff);
    border-bottom: 2px solid var(--seo-nav-link-color, #fff);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
    margin-left: 5px;
    vertical-align: middle;
}

.nav-inline-links li.has-children.is-open > a::after {
    transform: rotate(-135deg) translateY(2px);
}

@media (max-width: 1024px) {
    #seo-nav-panel.is-open {
        width: 100%;
    }
}

/* Full-viewport no-scroll layout */
html.has-seo-nav,
html.has-seo-nav body {
    height: 100%;
}

/* body is the flex container — #page and #seo-anchor are siblings, not parent/child */
html.has-seo-nav body {
    display: flex;
    flex-direction: column;
}

html.has-seo-nav #page {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

html.has-seo-nav section[mode="search-mode"] {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

html.has-seo-nav #seo-anchor {
    flex-shrink: 0;
}

/* Prevent scroll while panel is open */
body.seo-nav-is-open {
    overflow: hidden;
}

/* === pd-sign-in-bar (top_bar.php component) === */
.pd-bg-gray-300 { background-color: #151515 !important; }
.pd-sign-in-bar-link { color: #fff !important; }
.pd-sign-in-bar-link:hover { color: #545454; }
.pd-sign-in-btn { border: none; background-color: unset; color: #aaa; }
.pd-sign-in-btn:hover { color: #666; }
