/* Blog Specific Styles */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 150px 0 80px;
    margin-top: 70px;
    text-align: center;
    position: relative;
}

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

.blog-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.blog-content {
    padding: 5rem 0;
    background: var(--bg-light);
}

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

.blog-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-white);
    transition: all 0.3s ease;
}

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

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.filter-container {
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.blog-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.blog-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

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

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

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

.blog-card .card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.blog-card .card-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-card .card-content h3 a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.blog-card .card-content h3 a:hover {
    color: var(--primary-color);
}

.blog-card .card-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

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

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-number:hover,
.page-number.active {
    background: var(--primary-color);
    color: white;
}

.pagination-dots {
    padding: 0 0.5rem;
    color: var(--text-light);
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.popular-post img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-content h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.popular-content h4 a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.popular-content h4 a:hover {
    color: var(--primary-color);
}

.popular-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.category-list li a:hover {
    color: var(--primary-color);
}

.category-list li a span {
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form .btn {
    justify-self: stretch;
}

.social-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-link-widget.twitter {
    background: #1da1f2;
}

.social-link-widget.youtube {
    background: #ff0000;
}

.social-link-widget.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.social-link-widget i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar {
        order: -1;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 120px 0 60px;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

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

    .blog-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        min-width: auto;
    }

    .filter-container {
        min-width: auto;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pagination-numbers {
        order: -1;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }

    .social-widget {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .social-link-widget {
        flex: 1;
        min-width: 150px;
        justify-content: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card .card-content {
        padding: 1rem;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .page-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .popular-post {
        flex-direction: column;
        gap: 0.5rem;
    }

    .popular-post img {
        width: 100%;
        height: 120px;
    }
}

/* Loading and Animation States */
.blog-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

.blog-card.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.no-results p {
    font-size: 1rem;
}