/* Homepage blocks: continue reading, genres, trending. Colors follow style.css. */
.hb {
    --hb-brand: #6C5DD3;
    --hb-brand-soft: #F0EEFF;
    --hb-ink: #11142D;
    --hb-muted: #808191;
    --hb-border: #ECECF2;
    padding: 28px 0;
}

.hb-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.hb-head h2 {
    margin: 6px 0 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--hb-ink);
}

.hb-head > h2 {
    margin: 0;
}

.hb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--hb-brand-soft);
    color: var(--hb-brand);
    font-size: 13px;
    font-weight: 600;
}

.hb-eyebrow--hot {
    background: #FFF1E6;
    color: #EA580C;
}

.hb-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: var(--hb-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, box-shadow .15s;
}

.hb-link:hover {
    background: #5546c2;
    color: #fff;
    box-shadow: 0 6px 18px rgba(108, 93, 211, .3);
}

.hb-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 14px;
    scrollbar-width: thin;
    scrollbar-color: #D9D5F6 transparent;
}

.hb-scroller::-webkit-scrollbar {
    height: 6px;
}

.hb-scroller::-webkit-scrollbar-thumb {
    background: #D9D5F6;
    border-radius: 3px;
}

.hb-scroller > * {
    scroll-snap-align: start;
}

/* ---------------------------------------------------------- continue reading */

.hb-continue {
    background: linear-gradient(180deg, #F7F6FF 0%, rgba(247, 246, 255, 0) 100%);
}

.hb-cc {
    flex: 0 0 380px;
    max-width: 85vw;
    display: flex;
    gap: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: 18px;
    text-decoration: none;
    color: var(--hb-ink);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.hb-cc:hover {
    border-color: #D9D5F6;
    box-shadow: 0 10px 30px rgba(17, 20, 45, .08);
    transform: translateY(-2px);
    color: var(--hb-ink);
}

.hb-cc__cover {
    flex: 0 0 96px;
    height: 136px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--hb-brand-soft);
    box-shadow: 0 4px 12px rgba(17, 20, 45, .12);
}

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

.hb-cc__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hb-cc__body h3 {
    margin: 2px 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hb-cc__body p {
    margin: 0;
    font-size: 13px;
    color: var(--hb-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hb-cc__progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.hb-cc__progress strong {
    font-size: 13px;
    color: var(--hb-brand);
}

.hb-meter {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--hb-brand-soft);
    overflow: hidden;
}

.hb-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6C5DD3, #9B8CFF);
}

.hb-cc__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hb-brand);
}

.hb-cc__cta .fa-solid {
    transition: transform .2s;
}

.hb-cc:hover .hb-cc__cta .fa-solid {
    transform: translateX(3px);
}

/* ---------------------------------------------------------- genres */

.hb-genres__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.hb-genre {
    --tone: #6C5DD3;
    --tone-soft: #F0EEFF;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--hb-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--hb-ink);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.hb-genre:hover {
    border-color: var(--tone);
    box-shadow: 0 8px 24px rgba(17, 20, 45, .07);
    transform: translateY(-2px);
    color: var(--hb-ink);
}

.hb-genre__icon {
    flex: 0 0 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--tone-soft);
    color: var(--tone);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}

.hb-genre:hover .hb-genre__icon {
    background: var(--tone);
    color: #fff;
}

.hb-genre__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hb-genre__name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.hb-genre__count {
    font-size: 13px;
    color: var(--hb-muted);
}

.hb-genre__arrow {
    font-size: 12px;
    color: #C4C4D0;
    transition: color .2s, transform .2s;
}

.hb-genre:hover .hb-genre__arrow {
    color: var(--tone);
    transform: translateX(3px);
}


/* ---------------------------------------------------------- recommended */

.hb-rec__box {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    border-radius: 24px;
    background: #FFF6EF;
}

.hb-rec__shape {
    position: absolute;
    pointer-events: none;
}

.hb-rec__shape--1 {
    right: -140px;
    top: -160px;
    width: 320px;
    height: 320px;
    color: #F5DCC8;
}

.hb-rec__shape--2 {
    left: 300px;
    top: 28px;
    width: 62px;
    height: 28px;
    color: #FF9F59;
}

.hb-rec__shape--3 {
    left: -100px;
    bottom: -110px;
    width: 216px;
    height: 216px;
    color: #F5DCC8;
}

.hb-rec__intro {
    position: relative;
    z-index: 1;
    flex: 0 0 260px;
}

.hb-rec__intro h2 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--hb-ink);
}

.hb-rec__intro p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6B6E80;
}

.hb-rec__nav {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.hb-rec__arrow {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--hb-ink);
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(17, 20, 45, .08);
    transition: background .15s, color .15s, transform .1s;
}

.hb-rec__arrow:hover {
    background: var(--hb-brand);
    color: #fff;
}

.hb-rec__arrow:active {
    transform: scale(.94);
}

.hb-rec__arrow:disabled {
    opacity: .4;
    cursor: default;
    background: #fff;
    color: var(--hb-ink);
}

.hb-rec__list {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 4px 10px;
    scrollbar-width: none;
}

.hb-rec__list::-webkit-scrollbar {
    display: none;
}

.hb-rec__item {
    flex: 0 0 170px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--hb-ink);
}

.hb-rec__item:hover {
    color: var(--hb-ink);
}

.hb-rec__cover {
    display: block;
    height: 230px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 20, 45, .12);
    transition: transform .2s, box-shadow .2s;
}

.hb-rec__item:hover .hb-rec__cover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(17, 20, 45, .18);
}

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

.hb-rec__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 991px) {
    .hb-rec__box {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 28px 24px;
    }

    .hb-rec__intro {
        flex: none;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        column-gap: 16px;
        row-gap: 4px;
    }

    .hb-rec__intro h2 {
        margin: 0;
        font-size: 24px;
    }

    .hb-rec__intro p {
        grid-column: 1;
        font-size: 14px;
    }

    .hb-rec__nav {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin: 0;
    }

    .hb-rec__shape--2 {
        display: none;
    }
}

@media (max-width: 575px) {
    .hb-rec__box {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .hb-rec__intro {
        grid-template-columns: 1fr;
    }

    .hb-rec__nav,
    .hb-rec__shape--2 {
        display: none;
    }

    .hb-rec__item {
        flex-basis: 136px;
    }

    .hb-rec__cover {
        height: 184px;
    }
}

/* ---------------------------------------------------------- trending */

.hb-tr {
    position: relative;
    flex: 0 0 236px;
    padding-left: 62px;
    text-decoration: none;
    color: var(--hb-ink);
}

.hb-tr:hover {
    color: var(--hb-ink);
}

.hb-tr__rank {
    position: absolute;
    left: 0;
    bottom: 70px;
    z-index: 0;
    font-size: 120px;
    font-weight: 800;
    line-height: .8;
    color: #fff;
    -webkit-text-stroke: 3px #D9D5F6;
    letter-spacing: -6px;
    pointer-events: none;
    transition: -webkit-text-stroke-color .2s;
}

.hb-tr:hover .hb-tr__rank {
    -webkit-text-stroke-color: var(--hb-brand);
}

.hb-tr__cover {
    position: relative;
    z-index: 1;
    height: 230px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--hb-brand-soft);
    border: 1px solid #ddd;
    box-shadow: 0 6px 18px rgba(17, 20, 45, .1);
    transition: transform .2s, box-shadow .2s;
}

.hb-tr:hover .hb-tr__cover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(17, 20, 45, .16);
}

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

.hb-tr__badge {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(17, 20, 45, .7);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hb-tr h3 {
    position: relative;
    z-index: 1;
    margin: 12px 0 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

.hb-tr__readers {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: var(--hb-muted);
}

.hb-tr__readers .fa-regular {
    color: var(--hb-brand);
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 767px) {
    .hb {
        padding: 20px 0;
    }

    .hb-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .hb-head h2 {
        font-size: 24px;
    }

    .hb-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .hb-genres__grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hb-genre {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .hb-genre__arrow {
        display: none;
    }

    .hb-genre__name {
        font-size: 14px;
    }

    .hb-cc {
        flex-basis: 300px;
    }

    .hb-cc__cover {
        flex-basis: 78px;
        height: 112px;
    }

    .hb-tr {
        flex-basis: 186px;
        padding-left: 46px;
    }

    .hb-tr__cover {
        height: 180px;
    }

    .hb-tr__rank {
        font-size: 90px;
        letter-spacing: -4px;
    }
}
