/* Styling for the filter pills */
.filter-pill {
    background-color: #ffff;
    color: black;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 10px; /* Makes it look like a pill */
    cursor: pointer;
    font-size: var(--page-posts-card-span);
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.filter-pill:hover {
    background-color: #f3f4f7;
    color: black;
}

.filter-pill.active {
    background-color: #f3f4f7;
}

.title-date-data h2 {
    font-size: var(--page-posts-card-title);
}

.post-meta {
    font-size: var(--page-posts-card-span);
}

.filter-pill {
    font-size: var(--page-posts-card-span);
}

.filter-pill:focus {
    outline: none;
}

.category-pills {
    padding-top: 3rem;
    padding-bottom: 2rem;
    width: 75%;
    margin: auto;
}
/* Styling for the post gallery */
.posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
    gap: 20px;
    row-gap: 50px;
    width: 75%;
    justify-content: center;
    padding-bottom: 5rem;
    margin: auto;
}

.gallery-item {
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    height: auto;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid #eaeaea;
    height: 250px;
    object-fit: cover;
}

.title-date-data {
    padding: 15px;
    text-align: left;
    margin-bottom: 20px;
}

.title-date-data > h2 {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limits text to 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: capitalize;
}
h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.post-meta {
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    color: #777;
    text-align: left;
}

.post-excerpt {
    font-style: italic;
    color: #555;
    margin: 10px 0;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .posts-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets and mobile */
    }
}

@media screen and (max-width: 1500px) {
    .gallery-item {
        background: #f9f9f9;
        border-radius: 8px;
        box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: transform 0.3s ease;
        height: auto;
    }
}

@media screen and (max-width: 1000px) {
    .posts-container {
        width: 90%;
    }

    .category-pills {
        width: 90%;
    }
}

@media screen and (max-width: 575px) {
    .filter-pill {
        font-size: var(--page-posts-card-span);
        width: 100px;
    }
}

@media screen and (max-width: 450px) {
    .posts-container {
        width: 80%;
        row-gap: 40px;
    }

    .gallery-item {
        height: auto;
    }

    .gallery-item img {
        /* width: 100%; */
        /* height: auto; */
        border-bottom: 2px solid #eaeaea;
        /* height: 55%; */
        object-fit: cover;
    }

    .category-pills {
        width: 80%;
    }

    .posts-container {
        grid-template-columns: repeat(1, 1fr); /* 2 columns for tablets and mobile */
    }
}

@media screen and (max-width: 416px) {
    .category-pills {
        display: flex;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 416px) {
    .category-pills {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}
