/* ===== 06.1 Home page ===== */

.home-page {
    margin-top: 20px;
}

.home-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.home-layout > .page_content.left {
    flex: 1 1 auto;
    min-width: 0;
}

.home-sidebar {
    width: 280px;
    flex: 0 0 280px;
    margin-top: 66px;
}

.home-slider {
    position: relative;
    margin: 0 0 20px;
    overflow: hidden;
}

.home-slider__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.home-slider__track::-webkit-scrollbar {
    display: none;
}

.home-slider__item {
    position: relative;
    min-width: calc(33.333% - 11px);
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    transition:
        transform .35s ease,
        box-shadow .35s ease;
}

.home-slider__item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.home-slider__item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: 14px;
    opacity: 0;
    box-shadow:
        inset 0 0 0 1px rgba(120, 180, 255, 0.16),
        inset 0 0 22px rgba(90, 160, 255, 0.08);
    transition: opacity .35s ease;
}

.home-slider__link {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.home-slider__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.home-slider__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .65s ease;
}

.home-slider__overlay {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 3;
    padding: 18px;
    color: #fff;
    background:
        linear-gradient(to top,
            rgba(0, 0, 0, 0.82),
            rgba(0, 0, 0, 0.34),
            transparent
        );
}

.home-slider__title,
.home-slider__subtitle,
.home-slider__rating {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.home-slider__title {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.15;
    transition: transform .35s ease;
}

.home-slider__subtitle,
.home-slider__rating {
    font-size: 14px;
    opacity: .95;
    transition: transform .35s ease;
}

.home-slider__item:hover {
    transform: translateY(-3px);
    box-shadow: none;
}

.home-slider__item:hover::after {
    opacity: 1;
}

.home-slider__item:hover .home-slider__image img {
    transform: scale(1.04);
}

.home-slider__item:hover .home-slider__title,
.home-slider__item:hover .home-slider__subtitle,
.home-slider__item:hover .home-slider__rating {
    transform: translateY(-2px);
}

.home-slider__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.home-slider__rating-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f6c343;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.home-slider__rating-value {
    display: inline-block;
}

.home-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.home-slider__nav:hover {
    background: rgba(15, 23, 42, 0.78);
}

.home-slider__nav:active {
    transform: translateY(-50%) scale(0.96);
}

.home-slider__nav--prev {
    left: 10px;
}

.home-slider__nav--next {
    right: 10px;
}


.home-slider:hover .home-slider__nav {
    opacity: 1;
    pointer-events: auto;
}

.home-widget {
    max-width: 100%;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(190, 205, 220, 0.70);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 249, 252, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 10px 24px rgba(18, 38, 63, 0.07);
}

.home-widget__title {
    max-width: 100%;
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    color: #1f3f63;
}

.home-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-comments__item {
    padding: 14px;
    border: 1px solid rgba(205, 218, 230, 0.80);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease,
        background .18s ease;
}

.home-comments__item:hover {
    transform: translateY(-1px);
    border-color: #d6e0ea;
    background: #fbfcfe;
    box-shadow: 0 6px 14px rgba(31, 63, 99, 0.05);
}

.home-comments__post {
    display: inline-block;
    margin-left: -8px;
    margin-right: -8px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.35;
    color: #2f89db;
    text-decoration: none;
    transition:
        color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.home-comments__post:hover {
    color: #2563eb;
    text-decoration: none;
    background: #f4f8fe;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.10);
}

.home-comments__meta {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #6b7280;
}

.home-comments__dot {
    margin: 0 6px;
}

.home-comments__text {
    display: block;
    margin-top: 8px;
    margin-left: -8px;
    margin-right: -8px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    text-decoration: none;
    transition:
        color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.home-comments__text:hover {
    color: #111827;
    text-decoration: none;
    background: #f3f7fc;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.10);
}

.home-recommended__item {
    display: flex;
    gap: 10px;
}

.home-recommended__thumb {
    width: 72px;
    flex: 0 0 72px;
}

.home-recommended__thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.home-promo__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #1f3f63;
    background: #fff;
    border: 1px solid #cfd9e3;
}

.home-promo__btn--accent {
    background: #2fc8b5;
    border-color: #2fc8b5;
    color: #fff;
}

@media (max-width: 1200px) {
    .home-widget .home-random-title {
        max-width: 420px;
    }

    .home-widget .home-random-title__thumb img {
        max-height: 520px;
        object-fit: cover;
    }
}

@media (max-width: 1100px) {
    .home-layout {
        flex-direction: column;
    }

    .home-sidebar {
        width: 100%;
        flex: none;
    }

    .home-slider__item {
        min-width: calc(50% - 8px);
    }

    .home-sidebar .home-widget .home-random-title {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .home-sidebar .home-widget .home-random-title__thumb img {
        max-height: none;
    }
}

@media (max-width: 767px) {
    .home-slider__item {
        min-width: 100%;
        height: 220px;
    }
}

.home-promo__buttons--icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

.home-promo__btn--icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0;
    border: 1px solid rgba(190, 205, 220, 0.95);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 6px 14px rgba(18, 38, 63, 0.07);
    min-width: 0;
    box-sizing: border-box;
    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.home-promo__btn--icon img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.home-promo__btn--icon:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 10px 22px rgba(18, 38, 63, 0.12);
}

.home-promo__btn--telegram:hover {
    border-color: rgba(34, 158, 217, 0.40);
}

.home-promo__btn--boosty:hover {
    border-color: rgba(255, 122, 26, 0.40);
}

.home-promo__btn--vk:hover {
    border-color: rgba(0, 119, 255, 0.40);
}

.home-promo__btn--donationalerts:hover {
    border-color: rgba(243, 115, 53, 0.40);
}

.home-random-title {
    position: relative;
    display: block;
    width: 100%;
    max-width: 320px;
    color: inherit;
    text-decoration: none;
}

.home-random-title:hover,
.home-random-title:focus,
.home-random-title:active,
.home-random-title:visited {
    color: inherit;
    text-decoration: none;
}

.home-random-title__body {
    display: block;
    min-width: 0;
}

.home-random-title__thumb {
    display: block;
    width: 100%;
    margin: 0 0 12px;
}

.home-random-title__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.home-random-title__title {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    text-decoration: none;
}

.home-random-title__subtitle {
    margin: 0 0 8px;
    font-size: 14px;
    color: #6b7280;
}

.home-random-title__rating {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1f3f63;
}

.home-random-title__rating::first-letter {
    font-size: 25px;
    color: #f4c44d;
}

.home-random-title__actions {
    position: absolute;
    right: 2px;
    bottom: -13px;
    margin-top: 0;
    z-index: 3;
}

.home-random-title__reroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    text-decoration: none;
    color: #1f3f63;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(207, 217, 227, 0.85);
    box-shadow: 0 3px 10px rgba(31, 63, 99, 0.06);
    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.home-random-title__reroll svg {
    width: 24px;
    height: 24px;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform .35s ease;
}

.home-random-title__reroll:hover {
    color: #2fc8b5;
    border-color: rgba(47, 200, 181, 0.35);
    background: #fff;
    box-shadow: 0 5px 14px rgba(31, 63, 99, 0.08);
}

.home-random-title__reroll:hover svg {
    transform: rotate(45deg);
}

.home-random-title__reroll:active {
    transform: scale(0.97);
}
