/* 1Lag: список материалов на главной */

.home-page main {
    padding-top: 23px;
    padding-bottom: 220px;
    min-height: 900px;
}

.home-page h1 {
    font: 400 35px/1.3 "Press Start 2P",monospace;
    margin: 0 0 17px;
}

.intro {
    max-width: 920px;
    font-size: 15px;
    line-height: 1.25;
    margin: 0 0 20px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0,900px) minmax(220px,300px);
    gap: 50px;
    align-items: start;
}

.cards {
    min-width: 0;
}

.card {
    background: var(--card);
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 13px;
    margin-bottom: 20px;
    min-height: 205px;
    transition: background .2s ease-out;
}

.card:hover {
    background: #544444;
}

.card .cover {
    width: 45%;
    height: 225px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.card .body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h2 {
    font: 400 18px/1.23 "Press Start 2P",monospace;
    color: var(--red);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card p {
    font-size: 15px;
    line-height: 1.22;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    justify-content: space-between;
    margin-top: 10px;
}

.author {
    font: 400 10px/1.35 "Press Start 2P",monospace;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 6px;
}

.author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.read {
    font: 400 11px/1.2 "Press Start 2P",monospace;
    color: var(--red);
    white-space: nowrap;
}

.ad img {
    width: 100%;
    border-radius: 11px;
}

.ad {
    position: sticky;
    top: 20px;
}

.demo-note {
    font: 12px/1.3 Montserrat,Arial,sans-serif;
    color: #aaa;
    margin: 7px 2px;
}

.pagination {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.pagination span {
    border: 1px solid #6c5858;
    border-radius: 4px;
    padding: 5px 12px;
    font: 14px Montserrat,Arial,sans-serif;
}

.pagination .current {
    background: var(--red);
    border-color: var(--red);
}

@media (max-width:1100px) {
    .layout {
        grid-template-columns: minmax(0,1fr) 235px;
        gap: 25px;
    }

    .card h2 {
        font-size: 15px;
    }

    .card .cover {
        height: 215px;
    }

    .card p {
        font-size: 14px;
    }
}

@media (max-width:800px) {
    .home-page main {
        padding-top: 24px;
        padding-bottom: 80px;
        min-height: 700px;
    }

    .home-page h1 {
        font-size: 25px;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .ad {
        position: static;
        width: min(300px,100%);
        margin: 0 auto;
    }
}

@media (max-width:560px) {
    .home-page h1 {
        font-size: 21px;
        line-height: 1.5;
    }

    .intro {
        font-size: 14px;
    }

    .card {
        flex-direction: column;
        padding: 7px;
    }

    .card .cover {
        width: 100%;
        height: auto;
        aspect-ratio: 1.9;
    }

    .card .body {
        padding: 6px;
    }

    .card h2 {
        font-size: 14px;
        line-height: 1.6;
    }

    .card p {
        font-size: 14px;
    }

    .author {
        font-size: 9px;
    }

    .read {
        font-size: 9px;
    }
}
