/*
 * Strona główna bloga: nagłówek H1 z tłem SVG + belka kategorii.
 * Zlecenie 16/12/2025/3 pkt 1. Wymiary z makiet Zeplin: 1200 / 768 / 450 + wariant „H1 360”.
 */

/* odstęp pod headerem (17 px w makiecie) daje już motyw - sekcja bez górnego marginesu */
.h1belka {
    margin-top: 0;
    margin-bottom: 22px;
}

.h1belka {
    position: relative;
    z-index: 20; /* panel wyszukiwarki nad kartami wpisów */
}
.h1belka__box {
    position: relative;
    min-height: 124px;
    padding: 27px 20px 28px;
    border-radius: 16px;
    background-color: #fff5d7;
    color: #1b115c;
}

/* --- tło: plamy skalują się z szerokością (29,7% i 23% boksu), samolot ma stały rozmiar --- */
.h1belka__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 16px;
    pointer-events: none;
}
.h1belka__blob {
    position: absolute;
    top: 0;
    height: 100%;
    display: block;
}
.h1belka__blob--left {
    left: 0;
    width: 29.74%;
}
.h1belka__blob--right {
    right: 0;
    width: 22.99%;
}
.h1belka__plane {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 149px;
    height: 53px;
    display: block;
}
.h1belka__plane--narrow {
    display: none;
}

.h1belka__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- H1: kompas po lewej poza osią centrowania (jak w makiecie), uśmiech TUI po prawej --- */
.h1belka__head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 34px;
}
.h1belka__compass {
    position: absolute;
    top: calc(50% + 2.5px);
    right: 100%;
    width: 49px;
    height: 49px;
    margin-right: 14px;
    transform: translateY(-50%);
    color: #1b115c;
}
.h1belka__title {
    margin: 6px 0 0;
    padding: 0;
    font-family: 'ambit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 28px;
    color: #1b115c;
}
.h1belka__smile {
    flex: 0 0 auto;
    width: 41.3px;
    height: 32.7px;
    margin-left: 13px;
}

/* --- belka --- */
.h1belka__nav {
    margin-top: 15px;
}
.h1belka__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: -15px 0 0;
    padding: 0;
    list-style: none;
}
.h1belka__item {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin: 15px 0 0;
    padding: 0;
}
/* wymuszony podział rzędu przed pozycją, która się zawinęła (wstawia h1-belka.js) */
.h1belka__break {
    flex: 0 0 100%;
    height: 0;
    margin: 0;
    padding: 0;
}
.h1belka__break::before,
.h1belka__break::after {
    content: none;
}
/* kropka należy do pozycji, która po niej następuje; na początku rzędu ukrywa ją h1-belka.js */
.h1belka__item + .h1belka__item::before {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin: 0 10px 0 9px;
    border-radius: 50%;
    background-color: #d40e14;
}
.h1belka__item.h1belka__item--row-start::before {
    display: none;
}
/* makieta „H1 360” PL: przy zawinięciu kropka zostaje na końcu 1. rzędu (wariant długi CZ/RO - bez kropki, jak w makiecie) */
.h1belka__item--dot-after::after {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin: 0 0 0 9px;
    border-radius: 50%;
    background-color: #d40e14;
}
.h1belka__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: 'ambit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    color: #1b115c;
    text-decoration: none;
    cursor: pointer;
}
.h1belka__link:hover,
.h1belka__link:focus-visible {
    color: #1b115c;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.h1belka__link:focus-visible {
    outline: 2px solid #1b115c;
    outline-offset: 3px;
    border-radius: 2px;
}
.h1belka__search-icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
}

/* --- okruszki: tylko telefon (makieta 450) --- */
.h1belka__crumbs {
    display: none;
    margin: 15px 0 0;
    font-family: 'tui', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    color: #1b115c;
}
.h1belka__crumbs a {
    color: #1b115c;
    text-decoration: none;
}
.h1belka__crumbs a:hover {
    text-decoration: underline;
}

/* --- tablet: makieta 768 (samolot 10 px nad dolną krawędzią) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .h1belka__plane {
        bottom: 10px;
    }
}

/* --- telefon: makieta 450 --- */
@media (max-width: 767px) {
    /* motyw odsuwa treść o 75 px przy headerze 52 px; makieta 450 ma 15 px pod headerem */
    .h1belka {
        margin-top: -8px;
        margin-bottom: 15px;
    }
    .h1belka__box {
        min-height: 122px;
        padding: 18px 15px 35px;
    }
    .h1belka__plane--wide {
        display: none;
    }
    .h1belka__plane--narrow {
        display: block;
        width: 121px;
        height: 40px;
    }
    .h1belka__compass {
        width: 30px;
        height: 30px;
        margin-right: 16px;
    }
    .h1belka__crumbs {
        display: block;
    }
}

/* belka w dwóch rzędach (makieta „H1 360”): samolot na wysokości drugiego rzędu */
.h1belka--wrapped .h1belka__plane--narrow {
    bottom: 18px;
}

/* --- wąski telefon: makieta „H1 360” (kompas przy krawędzi, belka łamie się do 2 rzędów) --- */
@media (max-width: 420px) {
    .h1belka.container {
        padding-right: 10px;
        padding-left: 10px;
    }
    .h1belka__box {
        min-height: 122px;
        padding: 18px 10px;
    }
    .h1belka__head {
        align-self: stretch;
        padding-left: 37px;
    }
    .h1belka__compass {
        right: auto;
        left: 0;
    }
    .h1belka__title {
        margin-top: 9px;
        font-size: 21px;
        line-height: 24px;
    }
    .h1belka__smile {
        margin-left: 12px;
    }
    .h1belka__nav {
        margin-top: 16px;
    }
    .h1belka--long .h1belka__link {
        font-size: 14px;
        line-height: 16px;
    }
    .h1belka--long .h1belka__list {
        margin-top: -18px;
    }
    .h1belka--long .h1belka__item {
        margin-top: 18px;
    }
    .h1belka--long .h1belka__item + .h1belka__item::before {
        margin: 0 7px 0 8px;
    }
    .h1belka--long .h1belka__smile {
        margin-left: 4px;
    }
}

/* --- bardzo wąskie telefony (poniżej makiety 360): tytuł mieści się w jednej linii --- */
@media (max-width: 359px) {
    .h1belka__title {
        margin-top: 8px;
        font-size: 18px;
        line-height: 22px;
    }
    .h1belka__smile {
        width: 34px;
        height: 27px;
        margin-left: 8px;
    }
    .h1belka__head {
        min-height: 30px;
    }
}

/* ===== Wyszukiwarka wpisów w belce (Zlecenie 3 pkt 3; makiety „blog 1200 szukaj 2/3” i „blog 450 szukaj”) ===== */
.h1belka__item--search {
    position: relative;
}
.h1belka__item--search-open > .h1belka__search {
    visibility: hidden;
}
.tbsearch[hidden] {
    display: none !important;
}
.tbsearch {
    position: absolute;
    top: -9.5px; /* pole 39 px wyśrodkowane na wierszu 20 px */
    left: var(--tbsearch-x, 0px);
    z-index: 30;
    text-align: left;
}
.tbsearch__backdrop,
.tbsearch__mhead {
    display: none;
}
.tbsearch__dialog {
    position: relative;
}
.tbsearch__form {
    margin: 0;
}
.tbsearch__field {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 206px;
    height: 39px;
    margin: 0;
    padding: 0 14px 0 14px;
    border: 1px solid #1b115c;
    border-radius: 20px;
    background-color: #fff;
    cursor: text;
}
.tbsearch__icon {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
}
.tbsearch__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 37px;
    margin: 0 0 0 4px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: 'ambit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1b115c;
    -webkit-appearance: none;
    appearance: none;
}
.tbsearch__input::placeholder {
    color: #636363;
    opacity: 1;
}
.tbsearch__input::-webkit-search-cancel-button {
    display: none;
}
.tbsearch__field:focus-within {
    box-shadow: 0 0 0 2px rgba(27, 17, 92, .2);
}
.tbsearch__panel {
    position: absolute;
    top: 39px;
    left: -2px;
    width: 362px;
    padding-bottom: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 6px 24px rgba(27, 17, 92, .12);
}
.tbsearch--flip .tbsearch__panel {
    left: auto;
    right: -2px;
}
.tbsearch__section[hidden] {
    display: none;
}
.tbsearch__bar {
    height: 38px;
    padding: 12px 16px 0;
    box-sizing: border-box;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
    font-family: 'ambit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    color: #1b115c;
    text-transform: uppercase;
}
.tbsearch__section:first-child .tbsearch__bar {
    border-radius: 8px 8px 0 0;
}
.tbsearch__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 15px 16px;
    list-style: none;
}
.tbsearch__tags li {
    margin: 0;
    padding: 0;
}
.tbsearch__tags li::before {
    content: none;
}
.tbsearch__tags li[hidden] {
    display: none;
}
.tbsearch__tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    box-sizing: border-box;
    border: 1px solid #1b115c;
    border-radius: 17px;
    background-color: #fff;
    font-family: 'ambit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #1b115c;
    text-decoration: none;
    white-space: nowrap;
}
.tbsearch__tag:hover,
.tbsearch__tag:focus-visible {
    background-color: #1b115c;
    color: #fff;
}
.tbsearch__posts {
    margin: 0;
    padding: 15px 15px 0 16px;
    list-style: none;
}
.tbsearch__posts li {
    margin: 0 0 10px;
    padding: 0;
}
.tbsearch__posts li::before {
    content: none;
}
.tbsearch__post {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    text-decoration: none;
}
.tbsearch__thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 40px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #e3f3ff;
}
.tbsearch__thumb img {
    display: block;
    width: 70px;
    height: 40px;
    object-fit: cover;
}
.tbsearch__post-title {
    font-family: 'ambit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    color: #1b115c;
}
.tbsearch__post:hover .tbsearch__post-title,
.tbsearch__post:focus-visible .tbsearch__post-title {
    text-decoration: underline;
}
.tbsearch__empty {
    margin: 15px 16px 0;
    font-family: 'ambit', sans-serif;
    font-size: 14px;
    color: #636363;
}
.tbsearch__actions {
    display: flex;
    justify-content: flex-end;
    padding: 2px 15px 0;
}
.tbsearch__submit {
    min-width: 76px;
    height: 36px;
    padding: 0 17px;
    border: 0;
    border-radius: 18px;
    background-color: #1b115c;
    font-family: 'ambit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}
.tbsearch__submit:hover,
.tbsearch__submit:focus-visible {
    background-color: #2e2385;
}

/* --- telefon: popup (makieta „blog 450 szukaj”) --- */
html.tbsearch-locked,
html.tbsearch-locked body {
    overflow: hidden;
}
.tbsearch.tbsearch--mobile {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    z-index: 100000;
}
.tbsearch--mobile .tbsearch__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, .8);
}
.tbsearch--mobile .tbsearch__dialog {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 60px);
    max-width: 390px;
    max-height: calc(100% - 100px);
    margin: 85px auto 0;
    overflow-y: auto;
    border-radius: 8px;
    background-color: #fff;
}
.tbsearch--mobile .tbsearch__mhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 15px 0 16px;
}
.tbsearch__mtitle {
    font-family: 'ambit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    color: #1b115c;
}
.tbsearch__close {
    width: 30px;
    height: 30px;
    margin: -8px -8px 0 0;
    padding: 8px;
    border: 0;
    background: none;
    cursor: pointer;
}
.tbsearch__close svg {
    display: block;
    width: 14px;
    height: 14px;
}
.tbsearch--mobile .tbsearch__field {
    width: auto;
    margin: 17px 14px 15px 16px;
}
.tbsearch--mobile .tbsearch__panel {
    position: static;
    width: auto;
    box-shadow: none;
    border-radius: 0 0 8px 8px;
}
.tbsearch--mobile .tbsearch__section:first-child .tbsearch__bar {
    border-radius: 0;
}
.tbsearch--mobile .tbsearch__submit {
    min-width: 90px;
    height: 40px;
    border-radius: 20px;
}
