/* ===================================================================
   FlexProfile Blog Styles
   css/blog.css
   =================================================================== */

/* === BLOG MAIN PAGE === */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    margin-bottom: 60px;
    border-radius: 0 0 30px 30px;
}

.blog-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.blog-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.blog-search {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    position: relative;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
}

.search-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* === BLOG LAYOUT === */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    margin-bottom: 80px;
}

.blog-main {
    min-width: 0; /* Prevents grid overflow */
}

/* === FEATURED POST === */
.featured-post {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    border: 2px solid #e1e8ed;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.featured-post-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.author-name {
    font-weight: 600;
    color: #2d3748;
}

.post-date, .reading-time {
    color: #718096;
    font-size: 0.9rem;
}

.featured-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #2d3748;
}

.featured-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post-title a:hover {
    color: #667eea;
}

.featured-post-excerpt {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 25px;
}

.featured-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.featured-post-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* === ACTIVE FILTERS === */
.active-filters {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
}

.active-filters h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 1.1rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-tag {
    background: #667eea;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tag a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.clear-filters {
    color: #e53e3e;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.clear-filters:hover {
    text-decoration: underline;
}

/* === BLOG POSTS GRID === */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.blog-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 0;
}

.post-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-reading-time {
    color: #718096;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-card-content {
    padding: 15px 25px;
}

.post-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

.post-card-title a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card-title a:hover {
    color: #667eea;
}

.post-card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-mini {
    background: #edf2f7;
    color: #4a5568;
    padding: 4px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-mini:hover {
    background: #667eea;
    color: white;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.author-name-small {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.post-meta {
    text-align: right;
}

.post-date {
    color: #718096;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
}

.post-stats-mini {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #718096;
}

/* === NO POSTS === */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 15px;
}

.no-posts p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* === PAGINATION === */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0;
}

.pagination-btn, .pagination-number {
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover, .pagination-number:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pagination-current {
    padding: 12px 18px;
    background: #667eea;
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

/* === SIDEBAR === */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 2px solid #f7fafc;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === CATEGORIES === */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-list a:hover, .category-list a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(5px);
}

.count {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.category-list a:not(.active) .count {
    background: #e2e8f0;
    color: #718096;
}

/* === TAG CLOUD === */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    background: #f7fafc;
    color: #4a5568;
    padding: 8px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-cloud-item:hover, .tag-cloud-item.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* === RECENT POSTS === */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.recent-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 10px;
}

.recent-post-link:hover {
    background: #f7fafc;
    transform: translateX(5px);
}

.recent-post-title {
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    margin-bottom: 5px;
}

.recent-post-date {
    font-size: 0.85rem;
    color: #718096;
}

/* === NEWSLETTER WIDGET === */
.newsletter-widget {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.newsletter-widget .sidebar-title {
    color: white;
}

.newsletter-widget p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-input {
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
}

.newsletter-btn {
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background: #f7fafc;
    transform: translateY(-2px);
}

.newsletter-disclaimer {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 10px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr 300px;
        gap: 40px;
    }
}

@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .blog-sidebar {
        order: -1;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 0 15px;
    }
    
    .blog-title {
        font-size: 2.5rem;
    }
    
    .blog-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-post {
        padding: 25px;
    }
    
    .featured-post-title {
        font-size: 1.8rem;
    }
    
    .featured-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 60px 0 40px;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-input, .search-btn {
        border-radius: 0;
    }
    
    .search-btn {
        border-radius: 0 0 15px 15px;
    }
    
    .featured-post {
        padding: 20px;
    }
    
    .post-card-content, .post-card-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .blog-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn, .pagination-number, .pagination-current {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}