/* ==========================================
   BLOG PAGE STYLES
   ========================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Container Override for Blog */
.blog-content .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Blog Hero Section */
.blog-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.blog-hero::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="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.blog-hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.blog-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blog-hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.95;
}

/* Blog Search */
.blog-search {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.blog-search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.blog-search-input:focus {
    outline: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.blog-search-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #667eea;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.blog-search-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Blog Categories Filter */
.blog-categories {
    padding: 30px 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 100;
    transition: all 0.3s ease;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.category-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Blog Content Layout */
.blog-content {
    background: #f8f9fa;
    padding: 60px 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
    padding-right: 420px;
}

@media (min-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 50px;
        padding-right: 420px;
    }
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
}

.blog-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-placeholder-image {
    transform: scale(1.1);
}

.gradient-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gradient-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.gradient-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.gradient-6 { background: linear-gradient(135deg, #30cfd0, #330867); }

.blog-category-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #64748b;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-card:hover h3 {
    color: #667eea;
}

.blog-card-content > p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-tags .tag {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-tags .tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 12px;
    color: #764ba2;
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: fixed;
    right: 0;
    top: 0;
    width: 400px;
    height: 100vh;
    overflow-y: auto;
    padding: 140px 30px 30px 30px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
    z-index: 90;
}

.blog-sidebar::-webkit-scrollbar {
    width: 8px;
}

.blog-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.blog-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.blog-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.sidebar-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card h3 i {
    color: #667eea;
}

/* Author Card */
.author-card {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 48px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.author-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    justify-content: center;
}

.author-card > p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

.author-bio {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.author-social a {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-social a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-post-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.popular-post-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.popular-post-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.popular-post-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.popular-post-date {
    font-size: 12px;
    color: #64748b;
}

/* Newsletter Card */
.newsletter-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.newsletter-card h3 {
    color: white;
}

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

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

.newsletter-form input {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

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

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Categories Sidebar */
.sidebar-categories {
    list-style: none;
    padding: 0;
}

.sidebar-categories li {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 0;
}

.sidebar-categories li:last-child {
    border-bottom: none;
}

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-categories a:hover {
    color: #667eea;
    padding-left: 8px;
}

.sidebar-categories a span {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #f1f5f9;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

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

.pagination-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-number {
    width: 44px;
    height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.pagination-number:hover {
    border-color: #667eea;
    color: #667eea;
}

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

.pagination-dots {
    color: #94a3b8;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        padding-right: 20px;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .blog-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
        overflow-y: visible;
        padding: 30px 20px;
        order: 2;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 0 60px;
        min-height: 40vh;
    }
    
    .blog-hero-content h1 {
        font-size: 2rem;
    }
    
    .blog-hero-content p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .blog-search {
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-search-input {
        padding: 14px 20px;
    }
    
    .blog-search-btn {
        width: 100%;
        height: 48px;
        border-radius: 10px;
    }
    
    .blog-categories {
        padding: 20px 0;
        top: 70px;
    }
    
    .category-filters {
        gap: 8px;
        padding: 0 10px;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .blog-content {
        padding: 40px 0;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-content h3 {
        font-size: 1.3rem;
    }
    
    .blog-pagination {
        gap: 8px;
        margin-top: 40px;
    }
    
    .pagination-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .pagination-number {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 100px 0 40px;
        min-height: 35vh;
    }
    
    .blog-hero-content h1 {
        font-size: 1.75rem;
    }
    
    .blog-hero-content p {
        font-size: 0.95rem;
    }
    
    .blog-categories {
        padding: 15px 0;
    }
    
    .category-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .category-btn i {
        display: none;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .sidebar-card {
        padding: 20px;
    }
    
    .sidebar-card h3 {
        font-size: 1.1rem;
    }
    
    .pagination-btn span {
        display: none;
    }
}

/* Footer Spacing Fix */
.footer {
    margin-top: 80px;
}

/* Scroll to Top Button Enhancement */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}
