.gpx-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(7, 16, 26, 0.88);
    border-bottom: 1px solid #183047;
    backdrop-filter: blur(22px);
}

.gpx-header__inner {
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.gpx-header__logo {
    justify-self: start;
}

.gpx-nav {
    justify-self: center;
}

.gpx-nav__list {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px;
    list-style: none;
    border: 1px solid #1d3044;
    border-radius: 12px;
    background: #08111b;
}

.gpx-nav__list li {
    margin: 0;
}

.gpx-nav__list a {
    display: block;
    padding: 7px 13px;
    border-radius: 8px;
    color: #74889e;
    font-size: 0.78rem;
    font-weight: 750;
    transition: 160ms ease;
}

.gpx-nav__list a:hover,
.gpx-nav__list .current-menu-item > a,
.gpx-nav__list .current_page_item > a {
    background: #102032;
    color: #eef7ff;
    box-shadow: inset 0 0 0 1px #23445e;
}

.gpx-header__actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gpx-search {
    width: min(260px, 26vw);
    height: 40px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 0 7px 0 12px;
    border: 1px solid #23384d;
    border-radius: 10px;
    background: #09131e;
    color: #698096;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.gpx-search:focus-within {
    border-color: rgba(66, 232, 255, 0.68);
    background: #09131e;
    box-shadow: 0 0 0 3px rgba(66, 232, 255, 0.08);
}

.gpx-search__icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.gpx-search input,
.gpx-search input:focus,
.gpx-search input:active {
    min-width: 0;
    width: 100%;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--gpx-text) !important;
    font-size: 0.78rem;
}

.gpx-search input::placeholder {
    color: #667b90;
    opacity: 1;
}

.gpx-search input:-webkit-autofill,
.gpx-search input:-webkit-autofill:hover,
.gpx-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--gpx-text);
    box-shadow: 0 0 0 1000px #09131e inset !important;
    transition: background-color 9999s ease-out 0s;
}

.gpx-search button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: #102032;
    color: var(--gpx-accent);
    cursor: pointer;
    line-height: 1;
}

.gpx-search button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gpx-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid #23384d;
    border-radius: 10px;
    background: #09131e;
    color: #8ba0b4;
    cursor: pointer;
}

.gpx-menu-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.gpx-context {
    border-bottom: 1px solid #111e2d;
    background: rgba(7, 13, 21, 0.76);
}

.gpx-context__inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gpx-breadcrumbs {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #61758a;
    font-size: 0.68rem;
}

.gpx-breadcrumbs a:hover {
    color: var(--gpx-accent);
}

.gpx-breadcrumbs__current {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #98a9ba;
}

.gpx-context__label {
    flex: none;
    color: #446b86;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gpx-footer {
    margin-top: 56px;
    border-top: 1px solid #17283b;
    background: rgba(5, 9, 15, 0.72);
}

.gpx-footer__inner {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.gpx-footer__brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.gpx-footer__copy {
    color: var(--gpx-text-muted);
    font-size: 0.73rem;
}

/*
 * WPML owns locale routing/relationships; GenPornX owns the visible switcher.
 * Hide WPML's stock footer renderer to avoid its light default presentation.
 */
.wpml-ls-statics-footer {
    display: none !important;
}

.gpx-language-switcher {
    position: relative;
    flex: none;
}

.gpx-language-switcher__details {
    position: relative;
}

.gpx-language-switcher__trigger {
    min-width: 146px;
    min-height: 34px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px solid #20364d;
    border-radius: 10px;
    background: #09131e;
    color: #dceafa;
    cursor: pointer;
    line-height: 1;
    list-style: none;
    transition: 160ms ease;
}

.gpx-language-switcher__trigger::-webkit-details-marker {
    display: none;
}

.gpx-language-switcher__trigger::marker {
    content: "";
}

.gpx-language-switcher__trigger:hover,
.gpx-language-switcher__details[open] .gpx-language-switcher__trigger {
    border-color: rgba(66, 232, 255, 0.42);
    background: #0d1a27;
    box-shadow: 0 0 0 3px rgba(66, 232, 255, 0.045);
}

.gpx-language-switcher__trigger:focus-visible {
    outline: 2px solid rgba(66, 232, 255, 0.58);
    outline-offset: 2px;
}

.gpx-language-switcher__code,
.gpx-language-switcher__option-code {
    color: var(--gpx-accent);
    font-size: 0.57rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.gpx-language-switcher__current {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.70rem;
    font-weight: 760;
}

.gpx-language-switcher__chevron {
    width: 11px;
    height: 7px;
    fill: none;
    stroke: #69869f;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease, stroke 160ms ease;
}

.gpx-language-switcher__details[open] .gpx-language-switcher__chevron {
    transform: rotate(180deg);
    stroke: var(--gpx-accent);
}

.gpx-language-switcher__menu {
    position: absolute;
    z-index: 80;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 190px;
    max-height: min(320px, 55vh);
    overflow-y: auto;
    display: grid;
    gap: 3px;
    margin: 0;
    padding: 5px;
    list-style: none;
    border: 1px solid #20364d;
    border-radius: 11px;
    background: #08121d;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.gpx-language-switcher__item {
    margin: 0;
}

.gpx-language-switcher__option {
    min-height: 38px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #8296aa;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    transition: 140ms ease;
}

.gpx-language-switcher__option:hover,
.gpx-language-switcher__option:focus-visible {
    border-color: #29455f;
    background: #0d1a27;
    color: #eef7ff;
    outline: 0;
}

.gpx-language-switcher__option.is-active {
    border-color: rgba(66, 232, 255, 0.22);
    background: #102032;
    color: #eef7ff;
}

.gpx-language-switcher__option-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gpx-language-switcher__check {
    justify-self: end;
    color: var(--gpx-accent);
    font-size: 0.72rem;
    font-weight: 900;
}

.gpx-footer__menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gpx-footer__menu a {
    color: #74879a;
    font-size: 0.73rem;
}

.gpx-footer__menu a:hover {
    color: var(--gpx-accent);
}

@media (max-width: 840px) {
    .gpx-header__inner {
        min-height: 64px;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }

    .gpx-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(240px, calc(100vw - 24px));
        padding: 10px;
        border: 1px solid #20364d;
        border-radius: 14px;
        background: rgba(7, 16, 26, 0.98);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
    }

    .gpx-header.is-menu-open .gpx-nav {
        display: block;
    }

    .gpx-nav__list {
        display: grid;
        border: 0;
        background: transparent;
        padding: 0;
    }

    .gpx-nav__list a {
        padding: 11px 12px;
    }

    .gpx-header__actions {
        grid-column: 2 / 4;
        grid-row: 1;
        justify-self: end;
    }

    .gpx-search {
        width: min(150px, 42vw);
    }

    .gpx-menu-toggle {
        display: grid;
    }
}

@media (max-width: 520px) {
    .gpx-search {
        width: 118px;
    }

    .gpx-search button {
        display: none;
    }

    .gpx-context__label {
        display: none;
    }

    .gpx-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 26px;
    }

    .gpx-footer__brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .gpx-language-switcher__trigger {
        min-width: 154px;
        min-height: 40px;
    }

    .gpx-language-switcher__menu {
        min-width: 208px;
    }

    .gpx-language-switcher__option {
        min-height: 42px;
    }

    .gpx-footer__menu ul {
        justify-content: flex-start;
    }
}

/* Final GenPornX wordmark asset: preserve semantic home links while replacing the temporary text rendering. */
.gpx-wordmark {
    display: block;
    flex: none;
    width: 198px;
    height: 31px;
    overflow: hidden;
    background-image: url("../brand/genpornx-logo.svg");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    line-height: 0;
}

.gpx-wordmark > span {
    display: none;
}

.gpx-header__logo {
    width: 198px;
    height: 31px;
}

.gpx-footer__logo {
    width: 154px;
    height: 25px;
}

@media (max-width: 840px) {
    .gpx-header__logo {
        width: 164px;
        height: 26px;
    }
}

@media (max-width: 520px) {
    .gpx-header__logo {
        width: 142px;
        height: 23px;
    }
}
