/* ==========================================================
   TARG DS
   Header v1.0
   ========================================================== */

body.home .rh_header,
body.home .rh_header_var_1,
body.home .rh_header_advance,
body.home .rh_long_screen_header_temp {
    display: none !important;
}

.targ-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    z-index: 10;

    width: min(1320px, calc(100% - 64px));
    transform: translateX(-18px);
    height: 112px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #fff;
}

.targ-header__logo {
    posotion:relative;
    top:10px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.targ-header__logo img {
    display: block;
    max-height: 104px;
    margin-top: 10px;
    width: auto;
}

.targ-header__nav {
    margin-left:-24px;
    display: flex;
    align-items: center;
}

.targ-nav {
    display: flex;
    align-items: center;
    gap: 34px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.targ-nav li {
    position: relative;
    margin: 0;
}

.targ-nav a {
    color: rgba(255,255,255,.92);
    text-decoration: none;

    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.02em;

    transition: color .2s ease;
}

.targ-nav a:hover {
    color: #fff;
}

.targ-header__actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.targ-header__phone {
    color: #fff;
    text-decoration: none;

    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.targ-header__icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    text-decoration: none;

    font-size: 32px;
    line-height: 1;
    font-weight: 300;
}

.targ-header__burger {
    width: 42px;
    height: 32px;

    padding: 0;
    border: 0;
    background: transparent;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    cursor: pointer;
}

.targ-header__burger span {
    display: block;
    height: 2px;
    width: 42px;

    background: #fff;
    border-radius: 999px;
}

@media (max-width: 1024px) {
    .targ-header__nav,
    .targ-header__phone {
        display: none;
    }
}

@media (max-width: 767px) {
    .targ-header {
        width: calc(100% - 40px);
        height: 96px;
    }

    .targ-header__logo img {
        max-height: 64px;
    }

    .targ-header__icon {
        display: none;
    }
}

.targ-nav .sub-menu {
    display: none !important;
}

@media (min-width: 1200px) {
    .targ-header__logo img {
        max-height: 88px;
    }
}

/* TARG Header dropdown */

.targ-nav .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    opacity: .85;
}

.targ-nav .sub-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;

    min-width: 240px;
    padding: 14px;
    margin: 0;

    list-style: none;

    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;

    box-shadow: 0 24px 70px rgba(0,0,0,.25);

    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);

    transition: .2s ease;
}

.targ-nav .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.targ-nav .sub-menu li {
    margin: 0;
}

.targ-nav .sub-menu a {
    display: block;
    padding: 10px 12px;

    color: rgba(255,255,255,.9);
    font-size: 15px;
    line-height: 1.35;

    border-radius: 10px;
}

.targ-nav .sub-menu a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.targ-mobile-menu {
    position: absolute;
    top: 96px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    padding: 24px;
    background: rgba(15,23,42,.94);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: .22s ease;
}

.targ-header.is-menu-open .targ-mobile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.targ-mobile-menu__nav,
.targ-mobile-menu__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.targ-mobile-menu__nav a,
.targ-mobile-menu__links a {
    display: block;
    padding: 12px 0;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 500;
}

.targ-mobile-menu__nav .sub-menu {
    padding-left: 16px;
    margin: 4px 0 10px;
}

.targ-mobile-menu__nav .sub-menu a {
    font-size: 15px;
    color: rgba(255,255,255,.72);
}

.targ-mobile-menu__links {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.targ-header,
.targ-header *,
.targ-nav,
.targ-nav a {
    font-family: var(--font-ui) !important;
}

@media (max-width: 767px) {

    .targ-header {
        width: 100%;
        left: 0;
        right: 0;
        transform: none;
        justify-content: center;
    }

    .targ-header__logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .targ-header__burger {
        position: absolute;
        right: 28px;
    }
}

/* TARG Header menu layer fix */

.targ-header {
    z-index: 9999;
}

.targ-mobile-menu {
    z-index: 10000;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.targ-mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.targ-mobile-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,.08);
}

.targ-mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(198,156,109,.75);
    border-radius: 999px;
}

/* TARG Header desktop dropdown */

@media (min-width: 1025px) {

    .targ-nav .sub-menu {
        display: block !important;
        position: absolute;
        top: calc(100% + 18px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);

        min-width: 280px;
        padding: 14px;
        margin: 0;

        list-style: none;

        background: rgba(12, 18, 32, .94);
        backdrop-filter: blur(18px);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 18px;
        box-shadow: 0 24px 70px rgba(0,0,0,.28);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .targ-nav .menu-item-has-children:hover > .sub-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .targ-nav .sub-menu a {
        display: block;
        padding: 11px 12px;
        border-radius: 10px;

        color: rgba(255,255,255,.84);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.35;
        white-space: nowrap;
    }

    .targ-nav .sub-menu a:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }
}

/* Fix: desktop dropdown should stay open while moving cursor */

@media (min-width: 1025px) {

    .targ-nav .sub-menu {
        top: calc(100% + 8px);
        padding-top: 18px;
    }

    .targ-nav .menu-item-has-children::after {
        content: "";
        position: absolute;
        left: -20px;
        right: -20px;
        top: 100%;
        height: 22px;
    }

    .targ-nav .sub-menu a:hover {
        background: rgba(255,255,255,.10);
        color: #fff;
    }
}

.targ-header__logo img {
    width: 170px !important;
    height: auto !important;
    max-height: none !important;
}

.targ-header__logo {
    position: relative;
    top: 16px;
    left: -20px;
}

@media (max-width: 767px) {
    .targ-header__logo {
        top: 12px;
        left: 50%;
    }

    .targ-header__logo img {
        width: 118px !important;
    }
}

/* Mobile logo correction */

@media (max-width: 767px) {
    .targ-header__logo {
        position: absolute;
        left: 50% !important;
        right: auto !important;
        top: 18px !important;
        transform: translateX(-50%) !important;
    }

    .targ-header__logo img {
        width: 150px !important;
        height: auto !important;
        max-height: none !important;
    }

    .targ-header__burger {
        position: absolute;
        right: 28px;
        top: 32px;
    }
}

/* ==========================================================
   TARG Header — final logo alignment
   Shared by home, contact and other TARG headers
   ========================================================== */

.targ-header {
    align-items: center;
}

.targ-header__logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;

    margin: 0 !important;
    transform: none !important;

    display: flex;
    align-items: center;
    align-self: center;
}

.targ-header__logo img {
    display: block;

    width: 150px !important;
    height: auto !important;
    max-height: 104px !important;

    margin: 0 !important;

    object-fit: contain;
}


/* Desktop */

@media (min-width: 1025px) {

    .targ-header {
        height: 124px;
    }

    .targ-header__logo {
        flex: 0 0 auto;
    }

}


/* Tablet */

@media (min-width: 768px) and (max-width: 1024px) {

    .targ-header {
        height: 112px;
    }

    .targ-header__logo img {
        width: 140px !important;
        max-height: 96px !important;
    }

}


/* Mobile — logo centered in the header */

@media (max-width: 767px) {

    .targ-header {
        width: 100%;
        height: 112px;

        left: 0;
        right: 0;

        margin: 0;
        padding-inline: 20px;

        transform: none;
        justify-content: center;
        align-items: center;
    }

    .targ-header__logo {
        position: absolute !important;

        top: 50% !important;
        left: 50% !important;
        right: auto !important;

        transform: translate(-50%, -50%) !important;
    }

    .targ-header__logo img {
        width: 136px !important;
        max-height: 90px !important;
    }

    .targ-header__burger {
        position: absolute;
        top: 50%;
        right: 24px;

        transform: translateY(-50%);
    }

}


/* ==========================================================
   TARG Header — unified logo size with property header
   ========================================================== */

/* Desktop */
@media (min-width: 1025px) {

    .targ-header__logo img {
        width: 184px !important;
        height: auto !important;
        max-width: none !important;
        max-height: 108px !important;
        margin: 0 !important;
        object-fit: contain;
    }

}


/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {

    .targ-header__logo img {
        width: 154px !important;
        height: auto !important;
        max-width: none !important;
        max-height: 88px !important;
        margin: 0 !important;
        object-fit: contain;
    }

}


/* Mobile */
@media (max-width: 767px) {

    .targ-header__logo img {
        width: 154px !important;
        height: auto !important;
        max-width: none !important;
        max-height: 88px !important;
        margin: 0 auto !important;
        object-fit: contain;
        object-position: center;
    }

}

/* TARG_HAMBURGER_VIEWPORT_FIX_START
   Menu hamburgera jest pozycjonowane względem okna
   przeglądarki, dzięki czemu nie jest przycinane przez
   hero ani przez sekcję wyników wyszukiwania.
---------------------------------------------------------- */

.targ-mobile-menu {
    position: fixed !important;

    top: 116px !important;
    right: max(
        24px,
        calc((100vw - 1540px) / 2)
    ) !important;

    bottom: auto !important;
    left: auto !important;

    width: 360px !important;
    max-width: calc(100vw - 40px) !important;

    max-height: calc(100vh - 136px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;

    z-index: 100000 !important;

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/*
 * Dolna sekcja została usunięta z PHP.
 * Reguła zabezpiecza przed wyświetleniem separatora,
 * gdyby pozostał w pamięci podręcznej.
 */

.targ-mobile-menu__links {
    display: none !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
}

/*
 * Nagłówek i jego rodzice nie powinny ograniczać
 * widoczności panelu.
 */

.targ-header {
    overflow: visible !important;
}

/*
 * Na mniejszych ekranach panel zachowuje bezpieczne
 * odstępy od krawędzi okna.
 */

@media (max-width: 1024px) {
    .targ-mobile-menu {
        top: 96px !important;
        right: 20px !important;

        max-height: calc(100vh - 116px) !important;
    }
}

@media (max-width: 767px) {
    .targ-mobile-menu {
        top: 82px !important;
        right: 16px !important;

        width: calc(100vw - 32px) !important;
        max-width: none !important;
        max-height: calc(100vh - 98px) !important;
    }
}

/* TARG_HAMBURGER_VIEWPORT_FIX_END */

/* TARG_MOBILE_HIDE_USER_ICONS_START
   Na telefonach ukrywamy ikony Ulubionych i Konta.
---------------------------------------------------------- */

@media (max-width: 767px) {
    .targ-header__actions > .targ-header__icon {
        display: none !important;
    }
}

/* TARG_MOBILE_HIDE_USER_ICONS_END */

/* =====================================================
   ===================================================== */
