/* blog styles */

* {
    margin: 0;
    padding: 0;
}

/* loading spinner */

.loading {
    position: fixed;
    z-index: 99999;
    background: var(--loading);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: center; 
}

/* main */

main {
    width: 100%;
    min-height: calc(100dvh - 70px);
    display: flex;
    justify-content: center;
    padding: 0 3%;
    padding-top: 70px;
}

main .content {
    width: 100%;
    max-width: 1280px;
    background-color: var(--body-bg);
    padding-bottom: 30px;
}

/* posts cards */

section.posts {
    width: 100%;
    /* background-color: #ddd; */
    padding: 0 20px;
}

section.posts > .title {
    font-weight: 600;
    font-size: 40px;
    margin-bottom: 20px;
    text-align: center;
}

section.posts .categories {
    /* background: red; */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 35px;
    margin-bottom: 30px;
}

section.posts .categories .category {
    height: 30px;
}

section.posts .categories .category a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: var(--category-bg);
    color: var(--category-color);
    text-decoration: none;
    padding: 0 10px;
    border-radius: 5px;
    transition: .2s;
}

section.posts .categories .category.active a {
    background-color: var(--category-bg-active);
}

section.posts .categories .category a:hover {
    background-color: var(--category-bg-hover);
}


.posts-content {
    width: 100%;
    /* background-color: #ccc; */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.posts-content .post {
    position: relative;
    width: 350px;
    height: 400px;
    background-color: var(--body-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow .2s;
    cursor: pointer;
    border: 1px solid var(--post-border);
}

.posts-content .post:hover {
    /* scale: 1.05; */
    box-shadow: 0px 7px 29px 0px var(--post-box-shadow);
}

.posts-content .post .image {
    width: 100%;
    height: 50%;
}

.posts-content .post .image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.posts-content .post .content {
    width: 100%;
    height: 50%;
    padding: 20px;
}

.posts-content .post .creation-date {
    /* margin-top: 10px;  */
}

.posts-content .post .title {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 24px;
}

.posts-content .post .subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    white-space: pre-wrap;
}

.posts-content .post .read-more {
    display: none;
}

.posts-content .post .category {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.posts-content .post .category a {
    background-color: var(--category-bg);;
    color: var(--category-color);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: .2s;
}

.posts-content .post .category a:hover {
    background-color: var(--category-bg-hover);
}


@media only screen and (max-width: 600px) {
    section.posts > .title {
        font-size: 32px;
    }
}
