/* Blog Styles - Matching Youni Academy Design System */

/* Posts Filter */
.posts-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Pinned Posts Grid */
.pinned-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Dynamic columns based on number of posts */
.pinned-posts.posts-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: row;
}

.pinned-posts.posts-6 {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: row;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Post Card Styles - Using existing design system */
.post-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.post-card.pinned {
    border: 2px solid var(--purple);
}

.post-card.pinned::before {
    content: '📌';
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--purple);
    color: white;
    padding: 5px 8px;
    border-radius: 50%;
    font-size: 12px;
    z-index: 10;
}

.post-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--light-grey);
}

.post-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.post-type {
    background-color: var(--lavender-blush);
    color: var(--purple);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 11px;
}

.post-type.video {
    background-color: #e3f2fd;
    color: var(--blue);
}

.post-type.tutorial {
    background-color: #e8f5e8;
    color: var(--green);
}

.post-date {
    font-size: 12px;
    color: #666;
}

.post-read-time {
    font-size: 12px;
    color: #999;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-description {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.post-read-more {
    color: var(--purple);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.post-read-more:hover {
    color: var(--pink);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pinned-posts,
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .posts-filter {
        justify-content: center;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 1rem;
    }
    
    .post-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .posts-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
