/* Blog Page Styles */

/* Blog Content */
.blog-content {
    padding: 3rem 0;
    background-color: var(--white);
}

/* Blog content specific layout with spacing */
.blog-content .row {
    margin: 0 -1rem;
    gap: 2rem;
}

.blog-content .col-md-8,
.blog-content .col-md-4 {
    padding: 0 1rem;
}

/* Desktop layout with proper spacing */
@media (min-width: 769px) {
    .blog-content .col-md-8 {
        flex: 0 0 65%;
        max-width: 65%;
    }
    
    .blog-content .col-md-4 {
        flex: 0 0 32%;
        max-width: 32%;
    }
}

/* Blog Posts Grid */
#blog-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Featured card spans full width */
.featured-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--white) 0%, #f8f9ff 100%);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.featured-card .post-content {
    padding: 2.5rem;
}

.featured-card .post-title {
    font-size: 1.75rem;
    line-height: 1.3;
}

.featured-card .post-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
}

.featured-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

/* Blog post cards now use common card styles from components.css */
.blog-post-card {
    /* Inherits from .card in components.css */
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-post-card .post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-card .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.blog-post-card .post-category {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
}

.blog-post-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    line-height: 1.3;
}

.blog-post-card .post-title a {
    color: inherit;
    text-decoration: none;
}

.blog-post-card .post-title a:hover {
    color: var(--primary-color);
}

.blog-post-card .post-excerpt {
    color: var(--gray-700);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.blog-post-card .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-post-card .read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.blog-post-card .read-more:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.blog-post-card .read-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Sidebar */
.blog-sidebar {
    /* Remove default sticky positioning */
}

/* Sidebar sticky positioning for desktop only */
@media (min-width: 769px) {
    .blog-sidebar {
        position: sticky;
        top: 100px;
    }
}

.sidebar-widget {
    background: linear-gradient(135deg, var(--white) 0%, #fafbff 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--gray-100);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.sidebar-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.sidebar-widget:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.sidebar-widget:hover::before {
    transform: scaleX(1);
}

.sidebar-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    border-bottom: 3px solid var(--gray-200);
    padding-bottom: 1rem;
    position: relative;
    font-weight: 800;
    text-align: center;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-post-item {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

.recent-post-item:hover {
    background-color: var(--gray-50);
}

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

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.recent-post-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.recent-post-title a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center;
}

.tag-item {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    color: var(--gray-700);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition-normal);
    border: 2px solid var(--gray-300);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    z-index: -1;
}

.tag-item:hover {
    color: var(--white);
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tag-item:hover::before {
    left: 0;
}

/* Pagination styles are now in components.css */

/* Responsive Design */
@media (max-width: 768px) {
    .blog-header {
        padding: 3rem 0 2rem;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-content {
        padding: 2rem 0;
    }
    
    /* Reset gap for mobile and add vertical spacing */
    .blog-content .row {
        gap: 0;
        flex-direction: column;
    }
    
    .blog-content .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 3rem;
    }
    
    .blog-content .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .featured-post .post-content {
        padding: 1.5rem;
    }
    
    .featured-post .post-title {
        font-size: 1.5rem;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-sidebar {
        position: static;
        margin-top: 0;
    }
    
    .sidebar-widget {
        margin-bottom: 2rem;
        padding: 2rem;
        border-radius: var(--radius-lg);
    }
    
    .sidebar-widget h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        text-align: left;
    }
    
    .sidebar-widget h3::after {
        left: 0;
        transform: none;
        width: 30%;
    }
    
    .tag-cloud {
        justify-content: flex-start;
        gap: 0.75rem;
    }
    
    .tag-item {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 576px) {
    .featured-post .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .blog-post-card .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .blog-post-card .post-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}
