/* Recipe category and cuisine archives and the "Tarifler" page
   (Customizations\RecipeTermHeader): the child theme's title bar with a
   photo behind a dark gradient, white text, and the child terms as small
   photo cards in one row that scrolls sideways when it does not fit (on
   "Tarifler": a recipe search, then every category, wrapping into rows). */

.gt-title-bar.yt-title-bar-photo {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 5rem 0 2.5rem;
    background: #2a2a2a;
    color: #fff;
}

@media (min-width: 1200px) {
    body .gt-title-bar.yt-title-bar-photo {
        padding: 6rem 0 3rem !important;
    }
}

.yt-title-bar-photo .yt-title-bar-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* WebP Express (dev, production) wraps the photo in <picture>, which
   Platea's `.gt-title-bar > * { position: relative; z-index: 1 }` turned
   into a 0 x 0 containing block: the photo was 0 x 0 and the title bar
   black. The <picture> covers the title bar like the photo itself. */
.gt-title-bar.yt-title-bar-photo > picture {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.yt-title-bar-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .78) 100%);
}

.yt-title-bar-photo h1,
.yt-title-bar-photo h2,
.yt-title-bar-photo p {
    color: #fff;
}

.yt-title-bar-photo h1 {
    text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.yt-title-bar-photo p {
    max-width: 720px;
    margin-inline: auto;
    opacity: .9;
}

.yt-title-bar-photo .gt-breadcrumb a,
.yt-title-bar-photo .gt-breadcrumb li + li::before {
    color: rgba(255, 255, 255, .85);
}

.yt-title-bar-photo .gt-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.yt-title-bar-photo .gt-breadcrumb li,
.yt-title-bar-photo .gt-breadcrumb [aria-current="page"] {
    color: rgba(255, 255, 255, .65);
}

/* The count: plain text under the title instead of Platea's bordered pill. */
.yt-title-bar-photo > .container > .gt-count {
    margin-top: .75rem;
}

.yt-title-bar-photo > .container > .gt-count span {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: rgba(255, 255, 255, .9);
    font-size: 1rem;
    font-weight: 500;
}

/* Subcategories: small photo cards */

.yt-subcats {
    margin: 2.25rem -12px 0;
}

.yt-subcats ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: safe center;
    gap: .75rem;
    margin: 0;
    padding: 4px 12px;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.yt-subcats ul::-webkit-scrollbar {
    display: none;
}

.yt-subcats li {
    flex: none;
}

.yt-subcats a,
.yt-subcats a:visited {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--gt-text-color-primary, #1d1d1d);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.yt-subcats a:hover,
.yt-subcats a:focus-visible {
    transform: translateY(-2px);
    background: #fff;
}

.yt-subcats a.yt-subcats-current {
    background: var(--gt-theme-primary, #e8572a);
    color: #fff;
}

.yt-subcats-image {
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gt-section-background, #f3f1ec);
    object-fit: cover;
}

.yt-subcats-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.yt-subcats-name {
    font-size: .9375rem;
    font-weight: 700;
    white-space: nowrap;
}

.yt-subcats-count {
    margin-top: 2px;
    color: var(--gt-text-color-secondary, #6b6b6b);
    font-size: .8125rem;
    white-space: nowrap;
}

.yt-subcats-current .yt-subcats-count {
    color: rgba(255, 255, 255, .85);
}

/* "Tarifler": recipe search */

.yt-header-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 620px;
    margin: 1.75rem auto 0;
    padding: 5px 5px 5px 48px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.yt-header-search svg {
    position: absolute;
    left: 18px;
    color: var(--gt-text-color-secondary, #6b6b6b);
    pointer-events: none;
}

.gt-title-bar .yt-header-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 .5rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--gt-text-color-primary, #1d1d1d);
    font: inherit;
    outline: 0;
}

.gt-title-bar .yt-header-search button {
    flex: none;
    height: 46px;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--gt-theme-primary, #e8572a);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s ease;
}

.gt-title-bar .yt-header-search button:hover {
    filter: brightness(1.08);
}

/* A search without a photo: the form on the plain title bar */
.gt-title-bar:not(.yt-title-bar-photo) .yt-header-search {
    border: 1px solid var(--gt-theme-tertiary, #dedcd4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

/* The search's result line goes under the form */
.gt-title-bar .yt-header-search + p {
    margin: 1rem 0 0;
}

/* "Tarifler" and term archives: the links wrap into centred rows (one sideways row on phones) */

@media (min-width: 768px) {
    .yt-subcats--wrap ul {
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
    }
}

.yt-subcats-all a,
.yt-subcats-all a:visited {
    height: 100%;
    min-height: 56px;
    gap: .4rem;
    padding: 6px 18px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .85);
    color: #fff;
    box-shadow: none;
}

.yt-subcats-all a:hover,
.yt-subcats-all a:focus-visible {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

@media (max-width: 767.98px) {
    .gt-title-bar.yt-title-bar-photo {
        padding: 3rem 0 1.75rem;
    }

    .yt-subcats {
        margin-top: 1.5rem;
    }

    .yt-subcats-image {
        width: 36px;
        height: 36px;
    }

    .yt-subcats-name {
        font-size: .875rem;
    }

    .yt-subcats-count {
        font-size: .75rem;
    }

    .yt-subcats-all a {
        min-height: 48px;
    }

    .yt-header-search {
        margin-top: 1.25rem;
        padding-left: 42px;
    }

    .gt-title-bar .yt-header-search input[type="search"],
    .gt-title-bar .yt-header-search button {
        height: 42px;
    }

    .gt-title-bar .yt-header-search button {
        padding: 0 1.1rem;
    }
}
