/**
 * Blogfull Filter CSS
 */

/* Container */
.blogfull-filter-container {
    width: 100%;
    margin: 0 auto 30px;
    padding: 0px 10px;
}

/* Filter Buttons */
.blogfull-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.blogfull-filter-button {
    width: 150px;
    display: inline-block;
    border: none !important;
    padding: 8px 16px;
    margin: 0 auto 10px auto;
    background: linear-gradient(180deg, #c19be9 0%, #000 30%) !important;
    box-shadow: 1px 1px 5px 1px #888;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.blogfull-filter-button:hover {
    display: inline-block;
    border: none !important;
    padding: 8px 16px;
    background: linear-gradient(180deg, #000 0%, #c19be9 30%);
    box-shadow: 1px 1px 5px 1px #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.blogfull-filter-button.active {
    box-shadow: 1px 1px 5px 1px #fff;
}

/* Posts Grid */
.blogfull-filter-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Post Item */
.blogfull-filter-post {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 5px 1px #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blogfull-filter-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Post Link */
.blogfull-filter-post-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Thumbnail */
.blogfull-filter-thumbnail {
    height: 300px;
    overflow: hidden;
    background-color: #f5f5f5; /* Background color if image is missing */
    display: flex;
    align-items: center;
    justify-content: center;
}

.blogfull-filter-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blogfull-filter-thumbnail:hover img {
    transform: scale(1.05);
}

/* Placeholder for missing images */
.blogfull-filter-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eaeaea;
    position: relative;
}

.blogfull-filter-placeholder:before {
    content: '\f03e'; /* Image icon from FontAwesome */
    font-family: 'dashicons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    color: #cccccc;
}

/* Content */
.blogfull-filter-content {
    padding: 15px 20px 20px;
    display: flex;
    flex-direction: column;
}

/* Categories */
.blogfull-filter-categories {
    margin-bottom: 10px;
}

.blogfull-filter-category {
    display: none
}

/* Title */
.blogfull-filter-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    color: #333;
    height: 2.8em; /* Fixed 2-line height (1.4 × 2) */
    overflow: hidden;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    text-overflow: ellipsis;
}

.blogfull-filter-post:hover .blogfull-filter-title {
    color: #007bff;
}

/* Loader */
.blogfull-filter-loader {
    text-align: center;
    padding: 20px;
}

.blogfull-filter-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* No posts found */
.no-posts-found {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Pagination */
.blogfull-filter-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 15px 0;
}

.blogfull-pagination-button,
.blogfull-pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 5px;
    padding: 0 15px;
    background: linear-gradient(180deg, #c19be9 0%, #000 30%);
    box-shadow: 1px 1px 5px 1px #888;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #fff;
}

.blogfull-pagination-button:hover:not([disabled]),
.blogfull-pagination-number:hover:not(.active) {
    opacity: 0.9;
}

.blogfull-pagination-number.active {
    background-color: #c19be9;
    color: #fff;
    cursor: default;
    box-shadow: 1px 1px 5px 1px #fff;
}

.blogfull-pagination-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.blogfull-pagination-numbers {
    display: flex;
    align-items: center;
}

/* Author styles */
.blogfull-filter-author {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.blogfull-filter-avatar {
    margin-right: 8px;
}

.blogfull-filter-avatar img {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
}

.blogfull-filter-author-name {
    font-size: 16px !important;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .blogfull-filter-posts {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .blogfull-filter-posts {
        grid-template-columns: 1fr;
    }
    
    .blogfull-filter-buttons {
        justify-content: flex-start;
    }
}
