/* Taxonomy index pages of Customizations\TaxonomyIndexPages ("Kategoriler",
   "Dünya Mutfakları"): toolbar with counts and the search, photo cards of the
   top-level terms, all of one size, with their child terms as one line of
   chips. Colours follow the theme's Customizer variables, like
   home-sections.css. */

.yt-cat-page {
    --yt-cat-primary: var(--gt-theme-primary, #e8572a);
    --yt-cat-text: var(--gt-text-color-primary, #1d1d1d);
    --yt-cat-muted: var(--gt-text-color-secondary, #6b6b6b);
    --yt-cat-border: color-mix(in srgb, var(--gt-text-color-primary, #1d1d1d) 14%, transparent);
    /* The site's container (--yt-container, child style.css); the page
       itself is full width (container-full). */
    max-width: var(--yt-container, 1320px);
    margin: 0 auto;
    padding: 0 12px 4rem;
    color: var(--yt-cat-text);
}

.yt-cat-page [hidden] {
    display: none !important;
}

/* Toolbar */

.yt-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}

.yt-cat-stats {
    margin: 0;
    color: var(--yt-cat-muted);
}

.yt-cat-stats strong {
    color: var(--yt-cat-text);
    font-weight: 700;
}

.yt-cat-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 420px;
}

.yt-cat-search svg {
    position: absolute;
    left: 18px;
    color: var(--yt-cat-muted);
    pointer-events: none;
}

.yt-cat-page .yt-cat-search input[type="search"] {
    width: 100%;
    height: 50px;
    padding: 0 1.25rem 0 50px;
    border: 1px solid var(--yt-cat-border);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
    color: var(--yt-cat-text);
    font: inherit;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.yt-cat-page .yt-cat-search input[type="search"]:focus {
    border-color: var(--yt-cat-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05), 0 0 0 4px color-mix(in srgb, var(--yt-cat-primary) 15%, transparent);
}

/* Cards: four columns (three below 1200px, two below 992px); the categories with subcategories in the first grid */

.yt-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-cat-grid + .yt-cat-grid {
    margin-top: 2rem;
}

.yt-cat-card {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    position: relative;
    min-width: 0;
}



.yt-cat-cover,
.yt-cat-cover:visited {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: var(--gt-section-background, #f3f1ec);
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}



.yt-cat-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.yt-cat-image--empty {
    background: linear-gradient(135deg, color-mix(in srgb, var(--yt-cat-primary) 70%, #fff), var(--yt-cat-primary));
}

.yt-cat-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 70%);
    transition: opacity .3s ease;
}

.yt-cat-cover:hover .yt-cat-image,
.yt-cat-cover:focus-visible .yt-cat-image {
    transform: scale(1.06);
}

.yt-cat-cover:focus-visible {
    outline: 3px solid var(--yt-cat-primary);
    outline-offset: 3px;
}

.yt-cat-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1.25rem;
}

.yt-cat-name {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}



.yt-cat-count {
    font-size: .9375rem;
    opacity: .9;
}

/* Subcategory chips: one line, long names cut with "…" (full name in the
   title), "+N" opens the rest below it */

.yt-cat-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-cat-chips > li:not(.yt-cat-more) {
    min-width: 0;
}

.yt-cat-chips a,
.yt-cat-chips a:visited,
.yt-cat-more summary {
    display: block;
    overflow: hidden;
    padding: .3rem .8rem;
    border: 1px solid var(--yt-cat-border);
    border-radius: 999px;
    background: #fff;
    color: var(--yt-cat-text);
    font-size: .875rem;
    line-height: 1.4;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.yt-cat-chips a:hover,
.yt-cat-chips a:focus-visible,
.yt-cat-more summary:hover {
    border-color: var(--yt-cat-primary);
    color: var(--yt-cat-primary);
}

.yt-cat-chips a.yt-cat-hit,
.yt-cat-more summary.yt-cat-hit {
    border-color: var(--yt-cat-primary);
    background: var(--yt-cat-primary);
    color: #fff;
}

.yt-cat-more {
    flex: none;
}

.yt-cat-more summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
}

.yt-cat-more summary::-webkit-details-marker {
    display: none;
}

.yt-cat-more details[open] summary {
    border-color: var(--yt-cat-primary);
    color: var(--yt-cat-primary);
}

/* The open list floats over the cards below (position: relative on
   .yt-cat-card), so the row keeps its height. */
.yt-cat-more ul {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .4rem);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: .75rem;
    border: 1px solid var(--yt-cat-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
    list-style: none;
}

.yt-cat-more ul li {
    max-width: 100%;
}

/* "+N" from 576px; "N alt kategori" (and the leading chips repeated in the
   list) on phones, where two chips did not fit a half-width card. */
.yt-cat-more-all,
.yt-cat-more--phone,
.yt-cat-more ul li.yt-cat-lead {
    display: none;
}

@media (max-width: 575.98px) {
    .yt-cat-chips > li:not(.yt-cat-more),
    .yt-cat-more-rest {
        display: none;
    }

    .yt-cat-more,
    .yt-cat-more--phone,
    .yt-cat-more ul li.yt-cat-lead {
        display: block;
    }

    .yt-cat-more-all {
        display: inline;
    }

    .yt-cat-more summary {
        font-weight: 500;
    }
}

.yt-cat-empty {
    margin: 2rem 0 0;
    color: var(--yt-cat-muted);
    text-align: center;
}

@media (min-width: 1200px) {
    .yt-cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .yt-cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .yt-cat-page {
        padding-inline: 16px;
    }

    .yt-cat-toolbar {
        flex-direction: column-reverse;
        align-items: stretch;
        margin-bottom: 1.5rem;
    }

    .yt-cat-search {
        flex: none;
    }

    .yt-cat-stats {
        font-size: .9375rem;
        text-align: center;
    }

    .yt-cat-grid {
        gap: 1.5rem 1rem;
    }

    .yt-cat-name {
        font-size: 1.0625rem;
    }

    .yt-cat-caption {
        padding: .875rem;
    }



    .yt-cat-count {
        font-size: .8125rem;
    }

    .yt-cat-chips a,
    .yt-cat-chips a:visited,
    .yt-cat-more summary {
        padding: .25rem .65rem;
        font-size: .8125rem;
    }
}
