/* Header Section */
.blog-head {
    padding: 10vh 0;
    background-color: var(--text-100-color);
}

.blog-head .wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.blog-head h1 {
    font-size: clamp(30px, 8vw, 60px);
    color: var(--black);
}

.blog-head p {
    font-size: clamp(20px, 4vw, 26px);
    font-weight: lighter;
    max-width: 800px;
}

/* Search Form */
.search-form {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 10px 10px;
    padding-inline-start: 20px;
    border: 1px solid var(--text-200-color);
    border-radius: 100px;
    background-color: #FFF;
}

.search-form input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
}

.search-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* Layout */
.posts-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 50px;
    margin: 50px auto;
    align-items: flex-start;
}

main.posts-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 110px;
}

/* Posts List */
.index-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
    /* overflow: hidden; */
}

article.index-post {
    display: flex;
    gap: 30px;
    align-items: center;
    animation-name: fadeIn;
    animation-timeline: view();
    animation-range: entry;
}

a.index-post__cover {
    flex-shrink: 0;
    position: relative;
    animation: zoomIn;
    animation-timeline: view();
    animation-range: entry;
}

a.index-post__cover img {
    height: auto;
    width: 400px;
    height: 260px;
    border-radius: 20px;
    object-fit: cover;
}

span.index-post__category {
    position: absolute;
    top: 20px;
    inset-inline-start: 20px;
    background-color: #ffaa00a6;
    border-radius: 40px;
    padding: 5px 10px;
    backdrop-filter: blur(5px);
    color: var(--black);
}

h2.index-post__title a {
    font-size: clamp(18px, 3vw, 30px);
    color: var(--black);
}

h2.index-post__title a:hover {
    color: var(--primary-color);
}

.index-post__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

p.index-post__excerpt {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-300-color);
}

a.index-post__read-more {
    width: max-content;
}

a.index-post__read-more:hover {
    background-color: var(--secondary-color);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination a,
.pagination strong {
    padding: 10px 14px;
    background-color: var(--text-100-color);
    border-radius: 53px;
    line-height: 100%;
    transition: 0.1s;
}

.pagination strong {
    background-color: var(--primary-color);
    color: #FFF;
}

.pagination a:hover {
    background-color: var(--text-200-color);
}

/* Post Meta */

.index-post__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

span.index-post__date {
    display: flex;
    align-items: center;
    gap: 5px;
}

span.index-post__date i {
    width: 16px;
}

.index-post__author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.index-post__author img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 100px;
}

/* Featured Post */
article.featured-post {
    height: 30vw;
    background-size: cover;
    padding: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 20px;
    overflow: hidden;
    max-height: 500px;
}

h2.featured-post__title a {
    font-size: clamp(26px, 7vw, 40px);
    color: var(--white);
    position: relative;
    z-index: 1;
    max-width: 500px;
    display: block;
    text-shadow: 1px 1px #000000;
}

p.featured-post__excerpt {
    color: var(--text-100-color);
    line-height: 1.5;
    font-size: 20px;
    font-weight: lighter;
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin-top: 20px;
    text-shadow: 1px 1px #000000;
}

article.featured-post:after {
    content: "";
    width: 100%;
    height: 90%;
    bottom: 0;
    right: 0;
    position: absolute;
    background: linear-gradient(0deg, #000000, transparent);
}

/* RESPONSIVE */
@media all and (max-width: 1440px) {
    a.index-post__cover img {
        width: 200px;
        height: 200px;
    }

    .posts-wrapper {
        gap: 30px;
        grid-template-columns: 1fr 30vw;
    }

    article.featured-post {
        height: 100%;
        max-height: 100%;
        padding-top: 10vw;
    }
}

@media all and (max-width: 960px) {
    .posts-wrapper {
        grid-template-columns: 1fr;
    }

    article.featured-post {
        padding-top: 20vw;
    }

    main.posts-main {
        position: static;
    }

    aside.posts-sidebar {
        position: static;
    }
}

@media all and (max-width: 640px) {
    article.index-post {
        flex-direction: column;
    }

    a.index-post__cover img {
        width: 100%;
        height: auto;
    }

}