/* ===== BLOG STYLES - MOBILE FIRST ===== */

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.blog-hero {
    position: relative;
    z-index: 2;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Layout */
.blog-main {
    padding: 3rem 0;
    background: #f8f9fa;
    min-height: 60vh;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    background: #4a90e2;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: #357abd;
}

.sidebar-toggle.active {
    background: #357abd;
}

/* Sidebar */
.blog-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.sidebar-widget h3 i {
    color: #4a90e2;
    margin-right: 0.5rem;
}

/* Search Form */
.search-form {
    position: relative;
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px 0 0 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #4a90e2;
}

.search-form button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #357abd;
}

/* Categories List */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.categories-list a:hover,
.categories-list a.active {
    background: #f8f9fa;
    color: #4a90e2;
    transform: translateX(3px);
}

.categories-list a i {
    margin-right: 0.5rem;
    opacity: 0.7;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recent-posts h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.recent-posts a:hover h4 {
    color: #4a90e2;
}

.recent-posts time {
    font-size: 0.8rem;
    color: #6c757d;
}

.recent-posts time i {
    margin-right: 0.3rem;
}

/* Blog Content */
.blog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 2rem;
}

/* Active Filters */
.active-filters {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #4a90e2;
}

.active-filters h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #2c3e50;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-tag {
    background: #4a90e2;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-tag a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    opacity: 0.8;
}

.filter-tag a:hover {
    opacity: 1;
}

.clear-filters {
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

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

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-category {
    background: #4a90e2;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.article-date i {
    margin-right: 0.3rem;
}

.article-title {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #4a90e2;
}

.article-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.article-author {
    color: #6c757d;
    font-size: 0.85rem;
}

.article-author i {
    margin-right: 0.3rem;
}

.read-more {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #357abd;
}

.read-more i {
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-articles i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-articles h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.no-articles a {
    color: #4a90e2;
    text-decoration: none;
}

.no-articles a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-number {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #f8f9fa;
    border-color: #4a90e2;
    color: #4a90e2;
}

.pagination-number.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

/* ===== TABLET STYLES ===== */
@media (min-width: 768px) {
    .blog-hero h1 {
        font-size: 3rem;
    }
    
    .blog-layout {
        grid-template-columns: 300px 1fr;
        gap: 3rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .article-footer {
        flex-direction: row;
    }
    
    .pagination-links {
        flex-wrap: nowrap;
    }
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 1024px) {
    .blog-main {
        padding: 4rem 0;
    }
    
    .blog-layout {
        grid-template-columns: 350px 1fr;
        gap: 4rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    
    .blog-content {
        padding: 3rem;
    }
    
    .sidebar-widget h3 {
        font-size: 1.2rem;
    }
}

/* ===== MOBILE SPECIFIC ===== */
@media (max-width: 767px) {
    .blog-header {
        padding: 5rem 0 3rem;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .blog-main {
        padding: 2rem 0;
    }
    
    .blog-content {
        padding: 1.5rem;
        margin-top: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .blog-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 2rem 1.5rem;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .blog-sidebar.mobile-open {
        left: 0;
    }
    
    .blog-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    
    .blog-sidebar.mobile-open::before {
        opacity: 1;
        pointer-events: auto;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .active-filters {
        padding: 0.75rem;
    }
    
    .filter-tags {
        gap: 0.25rem;
    }
    
    .pagination-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .pagination-numbers {
        order: 2;
    }
    
    .pagination-btn {
        padding: 1rem 1.5rem;
        width: 100%;
        max-width: 200px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .article-card,
    .read-more i,
    .categories-list a {
        transition: none;
    }
    
    .article-card:hover {
        transform: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .blog-header,
    .blog-sidebar,
    .pagination {
        display: none;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
} 