/* HIPPOLIT: zachowujemy ikony i wygląd głównych pozycji z bieżącego motywu. */
html,
body {
    scroll-behavior: auto !important;
}

.homeOffer.offer.hippolit-offer-page {
    --hippolit-offer-top: 88px;
    padding-top: var(--hippolit-offer-top);
    overflow: visible;
}

/* Dekoracja ma własne przycięcie, które nie blokuje position: sticky menu. */
.hippolit-offer-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hippolit-offer-page > .homeOffer__wrap {
    height: auto;
}

.hippolit-offer-item {
    min-width: 0;
}

.hippolit-offer-page .offerContent {
    min-width: 0;
}

.hippolit-offer-page .offerContent [id] {
    scroll-margin-top: var(--hippolit-offer-top);
}

.hippolit-offer-submenu {
    margin: 0 0 16px 2.9vw;
    padding-left: 12px;
    border-left: 1px solid rgba(212, 183, 114, 0.55);
}

.hippolit-offer-submenu .hippolit-offer-toc {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hippolit-offer-toc;
}

.hippolit-offer-toc > li {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-increment: hippolit-offer-toc;
}

.hippolit-offer-toc > li > a {
    position: relative;
    display: block;
    padding: 7px 4px 7px 24px;
    color: #42434d;
    font: 400 13px/1.5 "Open Sans", Arial, sans-serif;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.hippolit-offer-toc > li > a::before {
    content: counter(hippolit-offer-toc) ".";
    position: absolute;
    top: 7px;
    left: 0;
    width: 21px;
    color: #8b6c2b;
}

.hippolit-offer-toc > li > a:hover,
.hippolit-offer-toc > li > a[aria-current="location"] {
    color: #8b6c2b;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hippolit-offer-toc > li > a[aria-current="location"] {
    font-weight: 600;
}

.hippolit-offer-sidebar a:focus-visible {
    outline: 2px solid #8b6c2b;
    outline-offset: 3px;
}

@media screen and (min-width: 1100px) {
    .homeOffer.offer.hippolit-offer-page {
        --hippolit-offer-top: calc(5vw + 36px);
    }

    .hippolit-offer-page > .homeOffer__wrap {
        align-items: flex-start;
        column-gap: 24px;
    }

    .hippolit-offer-sidebar {
        position: sticky;
        top: var(--hippolit-offer-top);
        align-self: flex-start;
        flex: 0 0 31vw;
        width: 31vw;
        max-height: max(100px, calc(100vh - var(--hippolit-offer-top) - 20px));
        max-height: max(100px, calc(100dvh - var(--hippolit-offer-top) - 20px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: #d4b772 transparent;
    }

    .hippolit-offer-sidebar .offerMenu {
        display: block;
    }

    .hippolit-offer-page .offerContent {
        flex: 1 1 auto;
    }
}

@media screen and (max-width: 1099px) {
    .hippolit-offer-page > .homeOffer__wrap {
        flex-wrap: wrap;
    }

    .hippolit-offer-sidebar {
        width: 100%;
    }

    /* Na telefonach i tabletach zostają tylko nazwy ofert z ikonami. */
    .hippolit-offer-submenu {
        display: none;
    }

    /* Dolne odnośniki do sąsiednich ofert tylko w układzie komputerowym. */
    .hippolit-offer-page .offerNav {
        display: none;
    }
}

@media print {
    .hippolit-offer-sidebar,
    .hippolit-offer-decoration {
        display: none;
    }

    .hippolit-offer-page .offerContent {
        width: 100%;
        margin: 0;
    }
}
