/**
 * NexusBlog Main Stylesheet
 * Complete Version - All styles from original HTML files
 * Version: 1.0.0
 */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafcfc;
    color: #1a1a2e;
    line-height: 1.5;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f5;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.98);
    width: 100%;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 0;
    gap: 16px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.85;
}

.logo img {
    max-height: 50px;
    width: auto;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.2s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.current-menu-item {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.current-menu-item::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #2c3e50;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.search-toggle-btn:hover {
    background: #f1f5f9;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #1f2937;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: #f1f5f9;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 28px 20px;
        box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 24px 24px;
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.25s;
        z-index: 99;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

/* Search Panel */
.search-panel {
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    background: white;
    padding: 24px 32px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 24px 24px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.25s;
    z-index: 98;
    border-bottom: 1px solid #eef2f5;
}

.search-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-panel-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.search-panel-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 60px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.search-panel-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-panel-btn {
    background: #2563eb;
    border: none;
    color: white;
    padding: 0 28px;
    border-radius: 60px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-panel-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .search-panel {
        top: 70px;
        padding: 20px;
    }
    
    .search-panel-inner {
        flex-direction: column;
    }
    
    .search-panel-btn {
        padding: 12px 20px;
    }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-left: 5px solid #2563eb;
    padding-left: 18px;
    margin-bottom: 28px;
    margin-top: 16px;
    position: relative;
}

.section-title i {
    margin-right: 10px;
    color: #2563eb;
}

/* ===== FEATURED POSTS GRID ===== */
.featured-section {
    margin: 48px 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.featured-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 36px -12px rgba(0, 0, 0, 0.12);
}

.card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    background: #e2e8f0;
}

.card-content {
    padding: 20px 22px 26px;
}

.card-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 10px 0 8px;
    line-height: 1.3;
}

.card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #2563eb;
}

.card-excerpt {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ===== RECENT POSTS GRID ===== */
.recent-grid {
    display: block;
    margin-bottom: 48px;
}

.recent-card {
    display: flex;
    gap: 24px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.25s ease;
    border: 1px solid #edf2f7;
    cursor: pointer;
    margin-bottom: 28px;
}

.recent-card:last-child {
    margin-bottom: 0;
}

.recent-card:hover {
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.recent-img-card {
    width: 140px;
    height: 140px;
    object-fit: cover;
    flex-shrink: 0;
    background: #cbd5e1;
    display: block;
}

.recent-content {
    padding: 16px 20px 16px 0;
    flex: 1;
}

.recent-meta {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.recent-meta i {
    margin-right: 4px;
}

.recent-meta a {
    color: #2563eb;
    text-decoration: none;
}

.recent-meta a:hover {
    text-decoration: underline;
}

.recent-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.35;
}

.recent-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.recent-title a:hover {
    color: #2563eb;
}

.recent-excerpt {
    color: #4b5563;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ===== BLOG GRID LAYOUT ===== */
.blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 48px 0;
}

.main-content {
    flex: 2.5;
    min-width: 0;
}

.sidebar {
    flex: 1.2;
    min-width: 260px;
}

/* ===== SIDEBAR WIDGETS ===== */
.widget {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #eef2f5;
    margin-bottom: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f5;
    position: relative;
}

.widget-title i {
    margin-right: 8px;
    color: #2563eb;
}

/* Categories */
.category-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.cat-chip {
    background: #f1f5f9;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cat-chip i {
    font-size: 0.8rem;
}

.cat-chip:hover,
.cat-chip.active-cat {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.cat-chip .cat-count {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 4px;
}

/* Popular Posts */
.popular-section {
    margin-top: 20px;
}

.popular-list {
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #ecf3fa;
    transition: background 0.2s ease;
    cursor: pointer;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    background: #fafcff;
}

.popular-rank {
    font-weight: 800;
    font-size: 1.4rem;
    color: #cbd5e1;
    width: 36px;
    transition: color 0.2s ease;
}

.popular-item:hover .popular-rank {
    color: #2563eb;
}

.popular-thumb {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
    background: #d9e2ef;
    flex-shrink: 0;
    display: block;
}

.popular-info {
    flex: 1;
}

.popular-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    margin-bottom: 4px;
}

.popular-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.popular-title a:hover {
    color: #2563eb;
}

.popular-views {
    font-size: 0.7rem;
    color: #6c757d;
}

.popular-views i {
    margin-right: 2px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 20px;
    flex-wrap: wrap;
}

.page-btn,
.pagination .page-numbers {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    color: #1a1a2e;
    display: inline-block;
}

.page-btn:hover,
.pagination .page-numbers:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.page-btn.active,
.pagination .page-numbers.current {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* ===== SINGLE POST STYLES ===== */
.single-post-wrapper {
    max-width: 950px;
    margin: 32px auto 60px;
    background: white;
    border-radius: 28px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.back-home:hover {
    gap: 12px;
}

.post-header {
    margin-bottom: 24px;
}

.post-category {
    display: inline-block;
    background: #eef2ff;
    color: #4f46e5;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.post-category a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #0a0c10;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: #6c757d;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f5;
    margin-bottom: 28px;
}

.post-meta i {
    margin-right: 4px;
}

.featured-image {
    width: 100%;
    border-radius: 20px;
    margin: 20px 0 32px;
    max-height: 450px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: block;
}

/* Post Content Typography */
.post-content {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 1.12rem;
    line-height: 1.7;
    color: #2c3e50;
}

.post-content p {
    margin-bottom: 1.4rem;
}

.post-content h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 1.8rem 0 0.8rem;
    color: #1e293b;
}

.post-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.6rem;
    color: #334155;
}

.post-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563;
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.4rem 0;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.post-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1rem 2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: block;
}

/* Share Section */
.share-section {
    margin: 40px 0 32px;
    padding: 24px 0;
    border-top: 1px solid #eef2f5;
    border-bottom: 1px solid #eef2f5;
}

.share-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    background: #f1f5f9;
    color: #1e293b;
}

.share-btn i {
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook:hover {
    background: #1877f2;
    color: white;
}

.share-btn.linkedin:hover {
    background: #0a66c2;
    color: white;
}

.share-btn.copy:hover {
    background: #10b981;
    color: white;
}

/* Author Box */
.author-box {
    background: #f8fafc;
    border-radius: 20px;
    padding: 28px;
    margin: 32px 0;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #eef2f5;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.author-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.author-name a:hover {
    color: #2563eb;
}

.author-title {
    font-size: 0.85rem;
    color: #2563eb;
    margin-bottom: 8px;
    font-weight: 500;
}

.author-bio {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 12px;
}

.author-social a {
    color: #64748b;
    margin-right: 16px;
    font-size: 1rem;
    transition: color 0.2s ease;
    text-decoration: none;
}

.author-social a:hover {
    color: #2563eb;
}

/* Comments Section */
.comments-section {
    margin-top: 48px;
    padding-top: 8px;
}

.comments-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: #0f172a;
}

.comment-form {
    background: #f8fafc;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 40px;
    border: 1px solid #eef2f5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-comment {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s ease;
    margin-top: 12px;
}

.submit-comment:hover {
    background: #1e40af;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment-item {
    background: white;
    border: 1px solid #eef2f5;
    border-radius: 20px;
    padding: 20px;
    transition: all 0.2s ease;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #475569;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}

.comment-date {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
}

.comment-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
    margin-left: 52px;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 20px;
}

/* Related Posts */
.related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #eef2f5;
}

.related-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    background: #f8fafc;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eef2f5;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.1);
}

.related-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.related-info {
    padding: 14px;
}

.related-info h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1e293b;
    line-height: 1.4;
}

.related-cat {
    font-size: 0.65rem;
    color: #4f46e5;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    margin-top: 64px;
    width: 100%;
    border-top: 1px solid #1e293b;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 32px 32px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 180px;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
    letter-spacing: -0.2px;
}

.footer-col p,
.footer-col a {
    color: #cbd5e6;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #60a5fa;
}

.footer-categories-list,
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-categories-list li,
.footer-menu li {
    margin-bottom: 10px;
}

.footer-categories-list li a,
.footer-menu li a {
    display: inline-block;
    transition: transform 0.2s ease;
}

.footer-categories-list li a:hover,
.footer-menu li a:hover {
    transform: translateX(4px);
}

.social-icons {
    display: flex;
    gap: 18px;
    margin-top: 16px;
}

.social-icons a {
    font-size: 1.4rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.social-icons a:hover {
    transform: translateY(-2px);
}

.newsletter-form {
    margin-top: 12px;
}

.newsletter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #334155;
    border-radius: 40px;
    background: #1e293b;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #2563eb;
}

.newsletter-input::placeholder {
    color: #94a3b8;
}

.newsletter-submit {
    width: 100%;
    margin-top: 10px;
    padding: 10px 20px;
    background: #2563eb;
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.newsletter-submit:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e2a3a;
    padding: 24px 20px;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ===== UTILITY CLASSES ===== */
.no-results {
    background: #f8fafc;
    border-radius: 32px;
    padding: 48px;
    text-align: center;
    color: #475569;
}

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

/* Image Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Page Links */
.page-links {
    margin: 2rem 0;
    text-align: center;
}

.page-links .page-number {
    display: inline-block;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: #1a1a2e;
}

.page-links .page-number:hover {
    background: #2563eb;
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .blog-grid {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .blog-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 32px;
        padding: 40px 24px 24px;
    }
    
    .single-post-wrapper {
        padding: 24px 20px;
        margin: 16px 0 40px;
        border-radius: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .recent-card {
        flex-direction: column;
    }
    
    .recent-img-card {
        width: 100%;
        height: 180px;
    }
    
    .recent-content {
        padding: 16px 20px 20px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-date {
        margin-left: 0;
    }
    
    .comment-text {
        margin-left: 0;
    }
    
    .widget {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding-left: 14px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .sidebar,
    .share-section,
    .related-posts,
    .comments-section,
    .site-footer,
    .back-home {
        display: none;
    }
    
    .single-post-wrapper {
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}
/* Ensure images render immediately */
img {
    display: block;
    opacity: 1 !important;
    transition: none !important;
}

/* Remove lazy loading fade effect */
img[loading="lazy"] {
    opacity: 1 !important;
}

/* Ensure images have background while loading */
.recent-img-card,
.popular-thumb,
.card-img {
    background-color: #e2e8f0;
    min-height: auto;
}

/* Prevent layout shift during image load */
.recent-card,
.featured-card,
.popular-item {
    contain: content;
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
/* Performance optimizations */
img {
    display: block;
    background-color: #e2e8f0;
}

/* Critical images get priority */
img[fetchpriority="high"] {
    content-visibility: auto;
}

/* Lazy loading images */
img[loading="lazy"] {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
}

/* Reduce paint time */
.featured-card, .recent-card, .popular-item {
    contain: layout style paint;
}

/* Optimize font rendering */
body {
    text-rendering: optimizeSpeed;
}

/* Reduce motion for performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Critical CSS inlined, rest loads async */
.non-critical {
    display: none;
}

/* Optimize sidebar loading */
.sidebar {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

/* Responsive grid improvements */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recent-card {
        flex-direction: column;
    }
    
    .recent-img-card {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}
/* Author page specific styles - only if needed */
.author-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.author-avatar-large img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .author-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .author-stats {
        justify-content: center;
    }
    
    .social-links-large {
        justify-content: center;
    }
}