/*
 * Home page (resources/views/index.blade.php), 01.12.2026. Plain CSS: the Tailwind build is not rebuilt on the server.
 */

/* The first block on phones takes the shape of the video (9:16): the video is shown whole, nothing of the chef is
   cut off, and «Нове і популярне» starts right after it. Never taller than the screen. Wide screens: as before.
   Fixed 01.12.2026 (Nikita, iPhone): with aspect-ratio and max-height: 100dvh the block got narrower than the screen
   and changed its size while Safari's bars hid and showed during scrolling. Now the width is always the whole screen,
   the height is the video's shape from the width, and the cap is the small screen height (svh), which does not change
   while scrolling; browsers without svh take vh. */
@media (max-width: 1023.98px) {
    #top.yc-hero {
        width: 100%;
        height: calc(100vw * 16 / 9);
        aspect-ratio: auto;
        max-height: 100vh;
        max-height: 100svh;
    }
}

/* The headline over the video: what is inside, then the line from the admin, then the button. */
.ych-hero-count {
    display: block;
    margin: 0 auto 10px;
    max-width: 320px;
    font-size: 22px;
    line-height: 1.2;
    text-transform: uppercase;
}

.ych-hero-sub {
    display: block;
    margin: 0 auto 22px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: .02em;
    text-transform: uppercase;
    opacity: .9;
}

@media (min-width: 768px) {
    .ych-hero-count {
        max-width: 700px;
        font-size: 44px;
    }

    .ych-hero-sub {
        max-width: 700px;
        margin-bottom: 36px;
        font-size: 18px;
    }
}

/* «Нове і популярне». */
.ych-strip {
    background: #fff;
    color: #0d0d0d;
}

.ych-strip-inner {
    padding-top: 14px;
    padding-bottom: 16px;
}

.ych-strip-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ych-strip-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
}

.ych-strip-head a {
    flex: none;
    color: #028a59;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* Three whole cards on a phone; the row moves by whole cards. */
.ych-strip-row {
    --gap: 10px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--gap)) / 3);
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ych-strip-row::-webkit-scrollbar {
    display: none;
}

.ych-card {
    display: block;
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
}

.ych-card-img {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    background: #f2f2f2;
}

.ych-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ych-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.ych-badge-new {
    background: #03bd7a;
    color: #fff;
}

.ych-badge-hit {
    background: #0d0d0d;
    color: #fff;
}

.ych-card-name {
    display: -webkit-box;
    margin-top: 6px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (min-width: 1024px) {
    .ych-strip-inner {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .ych-strip-head h2 {
        font-size: 26px;
    }

    .ych-strip-head a {
        font-size: 16px;
    }

    .ych-strip-row {
        --gap: 16px;
        grid-auto-columns: calc((100% - 5 * var(--gap)) / 6);
    }

    .ych-card-name {
        font-size: 15px;
    }
}
