/* Home title sections and horizontal poster rows. */

.home-section-empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #a99b92;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.home-section-list {
    min-width: 0;
    display: grid;
    gap: 34px;
    margin-top: 38px;
}

.home-title-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.home-title-section {
    min-width: 0;
    overflow-x: hidden;
}

/* Keep the first row immediately rendered and defer later rows until they
   approach the viewport. Their HTML remains server-rendered for SEO. */
.home-title-section:not(:first-child) {
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
}

.home-title-section h2::before {
    content: "";
    width: 5px;
    height: 22px;
    border-radius: 999px;
    background: #ff7a1a;
}

.home-title-row {
    width: 100%;
    min-width: 0;
    display: flex;
    gap: 16px;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 12px;
    list-style: none;
    scrollbar-color: rgba(255, 122, 26, 0.48) rgba(255, 255, 255, 0.04);
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.home-title-row::-webkit-scrollbar {
    height: 6px;
}

.home-title-row::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.home-title-row::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 122, 26, 0.48);
}

.home-title-row::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 122, 26, 0.72);
}

.home-title-row::-webkit-scrollbar-button {
    display: none;
}

.home-title-row-item {
    flex: 0 0 auto;
    min-width: 0;
    scroll-snap-align: start;
}

/* This accessibility rule is page-wide because it covers several Home components. */
@media (prefers-reduced-motion: reduce) {
    .home-hero-preview,
    .home-hero-preview-copy,
    .home-title-poster img {
        animation: none;
        transition: none;
    }
}

@media (max-width: 640px) {
    .home-section-list {
        gap: 28px;
        margin-top: 30px;
    }

    .home-title-section h2 {
        margin-bottom: 12px;
        font-size: 20px;
    }

    .home-title-row {
        width: calc(100% + 24px);
        gap: 12px;
        margin-inline: -12px;
        padding-inline: 12px;
    }
}
