/* Front page sections of Customizations\HomeSections: search hero, category
   cards, "Son Eklenen Tarifler" and the "Tümünü gör" links. Colours follow
   the theme's Customizer variables. */

.yt-home-hero,
.yt-home-section {
    --yt-home-primary: var(--gt-theme-primary, #e8572a);
    --yt-home-text: var(--gt-text-color-primary, #1d1d1d);
    --yt-home-muted: var(--gt-text-color-secondary, #6b6b6b);
    --yt-home-border: color-mix(in srgb, var(--gt-text-color-primary, #1d1d1d) 14%, transparent);
    color: var(--yt-home-text);
}

/* The site's container (--yt-container, child style.css): the header's
   width, 1296px of content. */
.yt-home-hero .container,
.yt-home-section .container {
    max-width: var(--yt-container, 1320px);
}

/* Hero */

.yt-home-hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.yt-home-hero .yt-home-hero-title {
    margin: 0 0 1.5rem;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.1;
}

/* The brand logo without ".com" as the title (HomeSections::heroLogo()). */
.yt-home-hero .yt-home-hero-logo {
    display: block;
    width: clamp(220px, 34vw, 420px);
    height: auto;
    margin: 0 auto;
}

/* Phones: the header right above already shows the logo, so the hero's copy
   goes; the <h1> stays for screen readers and search engines (visually
   hidden) and the hero starts with its text. */
@media (max-width: 767.98px) {
    .yt-home-hero {
        padding-top: 2.5rem;
    }

    .yt-home-hero .yt-home-hero-title {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

.yt-home-hero-text {
    margin: 0 auto 2rem;
    max-width: 640px;
    color: var(--yt-home-muted);
    font-size: 1.125rem;
}

.yt-home-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 6px 6px 6px 52px;
    border: 1px solid var(--yt-home-border);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.yt-home-search:focus-within {
    border-color: var(--yt-home-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06), 0 0 0 4px color-mix(in srgb, var(--yt-home-primary) 15%, transparent);
}

.yt-home-search-icon {
    position: absolute;
    left: 20px;
    color: var(--yt-home-muted);
    pointer-events: none;
}

.yt-home-hero .yt-home-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 .5rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--yt-home-text);
    font: inherit;
    font-size: 1.0625rem;
    outline: 0;
}

.yt-home-hero .yt-home-search button,
.yt-home-hero .yt-home-search button:focus,
.yt-home-hero .yt-home-search button:hover {
    flex: none;
    height: 52px;
    padding: 0 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--yt-home-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}

.yt-home-hero .yt-home-search button:hover {
    filter: brightness(.95);
}

.yt-home-hero .yt-home-search button:focus-visible {
    outline: 2px solid var(--yt-home-text);
    outline-offset: 2px;
}

.yt-home-quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.yt-home-quick a,
.yt-home-quick a:visited {
    display: inline-block;
    padding: .45rem 1rem;
    border: 1px solid var(--yt-home-border);
    border-radius: 999px;
    background: #fff;
    color: var(--yt-home-text);
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.yt-home-quick a:hover,
.yt-home-quick a:focus-visible {
    border-color: var(--yt-home-primary);
    color: var(--yt-home-primary);
}

/* Section head, like the theme's heading widget */

.yt-home-section {
    padding: 2.5rem 0 3rem;
}

.yt-home-head {
    margin-bottom: 2.5rem;
    text-align: center;
}

.yt-home-section .yt-home-title {
    margin: 0 0 .75rem;
    font-size: 42px;
    font-weight: 500;
    line-height: 1.4;
}

.yt-home-text {
    margin: 0 auto;
    max-width: 720px;
    color: var(--yt-home-muted);
}

.yt-home-head-link,
.yt-home-head-link:visited {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .75rem;
    color: var(--yt-home-primary);
    font-weight: 600;
    text-decoration: none;
}

.yt-home-head-link:hover,
.yt-home-head-link:focus-visible {
    text-decoration: underline;
}

/* Category cards: six in a row, a scrolling strip on phones */

.yt-home-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-home-category,
.yt-home-category:visited {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    color: var(--yt-home-text);
    text-decoration: none;
}

.yt-home-category-image {
    display: block;
    aspect-ratio: 1;
    margin-bottom: .5rem;
    overflow: hidden;
    border-radius: 16px;
    background: var(--gt-section-background, #f3f1ec);
}

.yt-home-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.yt-home-category:hover .yt-home-category-image img {
    transform: scale(1.05);
}

.yt-home-category-name {
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.3;
}

.yt-home-category:hover .yt-home-category-name,
.yt-home-category:focus-visible .yt-home-category-name {
    color: var(--yt-home-primary);
}

.yt-home-category-count {
    color: var(--yt-home-muted);
    font-size: .875rem;
}

@media (max-width: 1199.98px) {
    .yt-home-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .yt-home-hero {
        padding: 2rem 0 1.5rem;
    }

    .yt-home-hero-text {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }

    .yt-home-search {
        padding-left: 44px;
    }

    .yt-home-search-icon {
        left: 16px;
    }

    .yt-home-hero .yt-home-search input[type="search"] {
        height: 46px;
        font-size: 1rem;
    }

    .yt-home-hero .yt-home-search button,
    .yt-home-hero .yt-home-search button:focus,
    .yt-home-hero .yt-home-search button:hover {
        height: 46px;
        padding: 0 1.25rem;
    }

    .yt-home-quick {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin-inline: -12px;
        padding: 0 12px 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .yt-home-quick li {
        flex: none;
    }

    .yt-home-section {
        padding: 1.5rem 0 2rem;
    }

    .yt-home-head {
        margin-bottom: 1.5rem;
    }

    .yt-home-section .yt-home-title {
        font-size: 32px;
    }

    .yt-home-category-grid {
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: 42%;
        margin-inline: -12px;
        padding: 0 12px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px; /* else the first card snaps to the screen edge */
        scrollbar-width: none;
    }

    .yt-home-category-grid li {
        scroll-snap-align: start;
    }
}

/* "Tümünü gör" under the front page's recipe widgets */

.yt-home-more {
    margin-top: 2rem;
    text-align: center;
}

.yt-home-more a,
.yt-home-more a:visited {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 12px 24px;
    border: 1px solid color-mix(in srgb, var(--gt-text-color-primary, #111) 22%, transparent);
    border-radius: 8px;
    color: var(--gt-text-color-primary, #111);
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.yt-home-more a:hover,
.yt-home-more a:focus-visible {
    border-color: var(--gt-theme-primary);
    color: var(--gt-theme-primary);
}

/* "Son Eklenen Tarifler": member photos come in any shape; the cards keep the
   portrait shape of the editors' photos so a row lines up. */
.yt-home-latest .gt-image img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

/* Phones: every recipe section of the front page (Platea's recipes widget,
   Elementor's and "Son Eklenen Tarifler") is a strip that scrolls sideways,
   78% wide cards so the next one peeks in, instead of one tall card under
   another. The strip reaches the screen edges (the sections' 12px padding). */
@media (max-width: 767.98px) {
    .home .elementor-widget-platea-recipes-widget .gt-recipe-listing > .row {
        flex-wrap: nowrap;
        gap: 16px;
        margin: 0 -12px;
        padding: 0 12px 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .home .elementor-widget-platea-recipes-widget .gt-recipe-listing > .row::-webkit-scrollbar {
        display: none;
    }

    .home .elementor-widget-platea-recipes-widget .gt-recipe-listing > .row > [class*="col-"] {
        flex: 0 0 78%;
        max-width: 78%;
        margin: 0;
        padding: 0;
        scroll-snap-align: start;
    }

    .yt-home-quick::-webkit-scrollbar,
    .yt-home-category-grid::-webkit-scrollbar {
        display: none;
    }
}

/* Small tablets: two cards and a bit. */
@media (min-width: 576px) and (max-width: 767.98px) {
    .home .elementor-widget-platea-recipes-widget .gt-recipe-listing > .row > [class*="col-"] {
        flex-basis: 45%;
        max-width: 45%;
    }
}

/* Card details in one colour across the sections: the Elementor sections
   were styled one by one (the first two dark, the others the theme's grey). */
body.home .elementor-widget-platea-recipes-widget .gt-recipe-listing .gt-details,
body.home .elementor-widget-platea-recipes-widget .gt-recipe-listing .gt-details a,
body.home .elementor-widget-platea-recipes-widget .gt-recipe-listing .gt-details a:visited {
    color: #313131;
}

body.home .elementor-widget-platea-recipes-widget .gt-recipe-listing .gt-details > ul > li .gt-icon {
    color: #000;
}
