/* BLOG.CSS SECTION FOR BLOG.PHP & SEARCH.PHP */

.blog-top {
    background: #2f3033;
    height: 60px;
    display: flex;
    align-items: center;   
}

.blog-inner-container {
    width: 100%;
    max-width: 1200px;
}

.title-divider,
.meta-divider {
    background: #444;
    margin: 10px auto;
}

.title-divider {
    width: 100%;
    height: 2px;
    position: relative;
    top: -5px;
}

.meta-divider {
    height: 1px;
    margin: 5px 0;
}

.sort-form {
    display: flex;
    margin-left: auto;
    width: 520px;
    gap: 20px;
}

.sort-button {
    background-color: #3a3b40; 
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.2em;
    border: 1px solid #555;
}

.sort-button:hover, .pagination a:hover, .blog-post-tags a:hover {
    background-color: #555;
    color: #f0a500; 
    transition: color 0.3s;
}

.sort-form label,
.posts-per-page-form label {
    color: #d1d1d1;
    margin-right: 10px;
    font-weight: bold;
}

.sort-form select {
    padding: 5px 12px;
}

.posts-per-page-form select {
    padding: 5px 10px;
}

.sort-form select,
.posts-per-page-form select {
    border: 1px solid #555;
    background-color: #333;
    color: #d1d1d1;
    border-radius: 5px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sort-form select:focus,
.posts-per-page-form select:focus {
    border-color: #888;
    box-shadow: 0 0 5px rgba(136, 136, 136, 0.5);
}

.sort-form select option,
.posts-per-page-form select option {
    background-color: #333;
    color: #d1d1d1;
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Blog Post Card */
.blog-post-card {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.blog-post-card:hover {
    transform: scale(1.02);
}

.blog-post-image {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.blog-post-image img {
    height: 100%;
}

.blog-post-content {
    margin-left: 20px;
    overflow: hidden;
    width: 670px;
    height: 242px;
}

.blog-post-meta-content {
    width: 179.7px;
    position: absolute;
    right: 10px;
}

.meta-inner-container {
    background: #333; 
    border-radius: 10px;
    padding: 20px;
    width: 179.7px;
    height: 222px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    margin: 10px auto;
    box-sizing: border-box;
}

.blog-post-title h2 {
    font-size: 20px;
    color: #ffffff;
    padding: 10px;
    width: 100%;
}

.blog-post-date {
    font-size: 14px;
    color: #ccc; 
    margin-top: auto;
    text-align: center;
}

.blog-post-excerpt {
    font-size: 16px;
    color: #ccc;
}

.blog-post-category {
    font-size: 14px;
    color: #e0e0e0; 
    font-weight: bold;
    text-align: center;
}

.blog-post-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.blog-post-tags a {
    padding: 5px 10px;
    background-color: #555;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
}

.pagination-container {
    background: #2f3033;
    height: 60px;
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-right: 0;

}

.pagination a,
.pagination span {
    color: #fff;
    padding: 5px 15px;
    margin: 0 5px;
    text-decoration: none;
    background: #444;
    border-radius: 5px;
}

.pagination .current {
    background: #222;
    font-weight: bold;
}

.posts-per-page {
    margin-left: auto;
    width: 210px;
}


@media (max-width: 1024px) {

    .blog-posts {
        gap: 5px;
    }

    .blog-title {
        padding-left: 10px;
    }

    .blog-post-title h2 {
        margin: 0;
    }

    .blog-post-title-container {
        margin-bottom: -10px;
        text-align: left;
    }

    .blog-posts {
        align-items: center;
    }

    .blog-post-link {
        flex-basis: 100%;
        max-width: none;
    }

    .blog-post-card {
        padding: 10px;
        flex-direction: row;
        max-width: none;
        height: 170px;
        margin-bottom: 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
    }

    .blog-post-image {
        width: 147px;
    }

    .blog-post-content {
        width: 60%;
    }

    .blog-post-excerpt {
        top: 20px;
        text-align: left;
    }

    .pagination {
    margin-left: 0;
    }

    .meta-divider {
        margin: 0;
    }

    .blog-post-meta-content {
        height: 122px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        top: 0;
    }

    .meta-inner-container {
        margin-top: 55px;
    }

    .blog-post-tags a {
        padding: 3px 5px;
        font-size: 10px;
    }

}

@media (max-width: 768px) {

    .sort-form,
    .blog-post-meta-content {
        display: none !important;
    }

    .blog-posts {
        gap: 5px;
    }

    .blog-title {
        padding-left: 10px;
        top: 15px;
    }

    .blog-title h1 {
        font-size: 24px;
    }

    .blog-post-title-container {
        margin-bottom: -10px;
        text-align: left;
    }

    .blog-posts {
        align-items: center;
    }

    .blog-post-card {
        padding: 10px;
        backdrop-filter: blur(10px);
        height: 170px; 
        margin-bottom: 10px; 
    }

    .blog-post-image {
        width: 147px;
    }

    .blog-post-content {
        width: 90%;
    }

    .blog-post-excerpt {
        top: 20px;
        text-align: left;
    }
    
    .pagination {
    margin-left: 0;
    }

}
