@import "reset.css";

:root {
    --bgColor: #f9fafc;
    --textColor: #272325;

    --desktopMainWidth: 700px;
    --headerHeight: 80px;

    --postPreviewHeight: 390px;
}

.page {
    background-color: var(--bgColor);
    color: var(--textColor);
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', system-ui, serif;
}

.page__body {
    margin: 0;
    padding: 1em;
}

.page__content {
    max-width: var(--desktopMainWidth);
    margin: 0 auto;
    padding: 1em;
    padding-top: 2em;
}

.header {
    height: var(--headerHeight);
    display: flex;
    align-items: center;
}

.header__logo {
    height: 100%;
    margin: 0 auto;
}

.header__logo {
    a {
        display: block;
        height: 100%;
    }

    img {
        height: 100%;
    }
}

ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

/* TODO: сделать на гридах чтобы 3 поста макс в строке */
.posts-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.post {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: var(--postPreviewHeight);
    position: relative;

    padding: 16px;
    margin: 0 auto;
    background-color: white;
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.08) 0 1px 5px;
}

.post:hover {
    transform: scale(1.01);
    transition-duration: .1s;
}

.post__title {
    font-weight: 600;
}

.post > img {
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
}

.post__link {
    position: absolute;
    padding: var(--postPreviewHeight) 324px 0 0;
    border-radius: 16px;
    top: 0;
    left: 0;
}

.post__meta {
    font-size: 12px;
    color: #606060;
    margin-top: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;

    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}