/* Blog Page Styles */
.blog-header {
    background: #ffffff;
    color: #000000;
    padding: 6rem 0 4rem;
    margin-top: 80px;
    border-bottom: 1px solid #e5e7eb;
}

.blog-nav {
    display: none; /* Hidden - using top-nav instead */
}

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

.blog-hero h1 {
    font-family: 'Inter', sans-serif !important;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #000000;
}

.blog-hero p {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.25rem;
    color: #6b7280;
}

.blog-main {
    min-height: 60vh;
    background: #ffffff;
}

.blog-filters {
    background: #ffffff;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

#search-input {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: white;
}

#tag-filter {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-family: 'Inter', sans-serif;
    min-width: 150px;
    height: 48px;
}

#featured-filter {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #06B6D4 0%, #4F46E5 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#featured-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

#featured-filter.active {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
}

.blog-content {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.blog-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid #e5e7eb;
}

.blog-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #d1d5db;
}

/* Thumbnails and fit-img utility - load this LAST to override global img rules */
.thumb-180 {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-200-350 {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 140px !important;
    max-height: 140px !important;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fit-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 140px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    transform: none !important;
}

/* Keep hover zoom but target wrapper->img to avoid global img rules */
.blog-post-card:hover .fit-img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.blog-post-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #000000;
    line-height: 1.4;
    font-weight: 600;
}

.blog-post-excerpt {
    font-family: 'Inter', sans-serif;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.blog-post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.blog-post-tag {
    background: linear-gradient(135deg, #06B6D4 0%, #4F46E5 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #06B6D4 0%, #4F46E5 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.read-more {
    display: inline-block;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #764ba2;
}

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

.pagination button {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #667eea;
}

.pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .blog-hero p {
        font-size: 1.1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    #search-input {
        min-width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .blog-post-content {
        padding: 1.5rem;
    }
    
    .blog-hero {
        padding: 0 1rem;
    }
    
    .blog-hero h1 {
        font-size: 2rem;
    }
}

/* Blog Recap Section on Homepage */
#blog-recap {
    background: #ffffff;
    padding: 5rem 2rem;
}

.blog-header-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.blog-main-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 3.5rem;
    font-weight: 800;
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* New Blog Card Style */
.blog-card-new {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card-new:hover .blog-card-image img {
    transform: scale(1.05);
}

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

.blog-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
    font-family: 'Inter', sans-serif;
}

.badge-article {
    background: #dbeafe;
    color: #1e40af;
}

.badge-video {
    background: #fce7f3;
    color: #be185d;
}

.badge-tutorial {
    background: #ddd6fe;
    color: #5b21b6;
}

.blog-card-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    flex: 1;
}

.blog-card-footer {
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.author-name {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    text-align: left;
}

.post-meta {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem;
    color: #6b7280;
}

@media (max-width: 768px) {
    .blog-main-title {
        font-size: 2.5rem;
    }
    
    .blog-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .blog-main-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    #blog-recap {
        padding: 3rem 1rem;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .blog-card-body {
        padding: 1rem;
    }
}

