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

.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DC 100%);
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--dark);
    margin-bottom: var(--space-sm);
}

.page-header p {
    font-size: 1.125rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   FILTER SECTION
   =========================== */

.filter-section {
    padding: var(--space-lg) 0;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-container {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-container::-webkit-scrollbar {
    height: 4px;
}

.filter-container::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}

.filter-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.filter-btn .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.2);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-container svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-container input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ===========================
   FEATURED ARTICLE
   =========================== */

.featured-section {
    padding: var(--space-lg) 0;
    background: var(--bg);
}

.featured-article {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.featured-article:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.featured-image {
    position: relative;
    overflow: hidden;
}

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

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--accent);
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.875rem;
}

.featured-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-category {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.article-category.website {
    background: #E0E7FF;
    color: #4338CA;
}

.article-category.automation {
    background: #DBEAFE;
    color: #1E40AF;
}

.article-category.ai {
    background: #FEE2E2;
    color: #B91C1C;
}

.featured-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: var(--space-sm);
}

.featured-content p {
    font-size: 1.125rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--gray);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===========================
   ARTICLES GRID
   =========================== */

.articles-section {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.article-card.hidden {
    display: none;
}

.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-body .article-category {
    margin-bottom: var(--space-sm);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.article-excerpt {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    flex: 1;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.article-footer .meta-item {
    font-size: 0.8125rem;
}

/* Loading Skeleton */
.article-skeleton {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    padding: var(--space-md);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.skeleton-tag {
    width: 80px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 100px;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    width: 100%;
    height: 28px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.skeleton-text {
    width: 90%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: var(--space-md);
}

.skeleton-meta {
    width: 120px;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--space-xl) 0;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

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

.no-results p {
    color: var(--gray);
    font-size: 1rem;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: var(--space-lg);
}

/* ===========================
   NEWSLETTER SECTION
   =========================== */

.newsletter-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

.newsletter-box {
    text-align: center;
    color: var(--white);
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.newsletter-box h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.newsletter-box > p {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-body);
}

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

.newsletter-form .btn-primary {
    background: var(--white);
    color: var(--secondary-dark);
    flex-shrink: 0;
}

.newsletter-form .btn-primary:hover {
    background: var(--bg);
}

.newsletter-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .filter-section {
        position: relative;
        top: 0;
    }
    
    .featured-content h2 {
        font-size: 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-box h2 {
        font-size: 1.75rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .filter-btn span:first-child {
        font-size: 0.8125rem;
    }
    
    .search-container {
        max-width: 100%;
    }
}
