/**
 * Blog Styles - Academia Fleming
 * Professional blog design based on NYT/BBC best practices
 * Typography optimized for readability (16-18px, 1.6 line-height, 600-700px line length)
 */

/* ====================================
   BLOG HERO
   ==================================== */

.blog-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.blog-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.blog-hero-content {
    max-width: 800px;
}

.blog-hero-label {
    display: inline-block;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.blog-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    margin: 0 0 20px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.blog-hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: white; /* Changed from gray to white as requested */
    margin: 0;
    max-width: 700px;
    font-weight: 400;
}

/* ====================================
   MAIN CONTAINER
   ==================================== */

.blog-main-container {
    background: #fafafa;
    padding: 60px 0 80px;
}

.blog-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Generous padding - not at the edge */
}

/* ====================================
   CATEGORY FILTER
   ==================================== */

.blog-categories {
    display: flex;
    gap: 12px;
    margin-bottom: 60px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 24px;
    border: none;
    background: white;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.category-btn:hover {
    background: #f3f4f6;
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.category-btn.active {
    background: #1e3a8a;
    color: white;
    box-shadow: 0 2px 8px rgba(30,58,138,0.3);
}

/* ====================================
   FEATURED ARTICLE (NYT-style)
   ==================================== */

.featured-article {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 60px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

.featured-article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.featured-link {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.featured-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    min-height: 400px;
}

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

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #1e3a8a;
    color: white;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 2px;
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6b7280;
}

.featured-category {
    color: #1e3a8a;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.meta-separator {
    color: #d1d5db;
}

.featured-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.featured-excerpt {
    font-size: 17px;
    line-height: 1.65;
    color: #4b5563;
    margin: 0 0 24px 0;
    max-width: 600px; /* Optimal line length */
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.read-time {
    color: #9ca3af;
}

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

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
}

.article-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

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

.article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-image-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f3f4f6;
}

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

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

.article-content {
    padding: 32px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #6b7280;
}

.article-category {
    color: #1e3a8a;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 14px 0;
    letter-spacing: -0.01em;
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 20px 0;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}

.article-author {
    font-weight: 500;
}

.article-read-time {
    color: #9ca3af;
}

/* ====================================
   EMPTY STATE
   ==================================== */

.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: #6b7280;
}

.empty-state svg {
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

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

.newsletter-section {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 60px 0;
}

.newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
}

.newsletter-content p {
    font-size: 17px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 32px 0;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    color: white;
}

.social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-link.tiktok {
    background: #000000;
}

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

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

@media (max-width: 1024px) {
    .featured-link {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 32px;
    }

    .featured-image {
        min-height: 300px;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
}

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

    .blog-hero-container,
    .blog-content-wrapper,
    .newsletter-container {
        padding: 0 24px;
    }

    .blog-hero-title {
        font-size: 2rem;
    }

    .blog-hero-subtitle {
        font-size: 1.1rem;
    }

    .blog-categories {
        margin-bottom: 40px;
    }

    .featured-article {
        margin-bottom: 40px;
    }

    .featured-content {
        padding: 24px;
    }

    .featured-title {
        font-size: 1.5rem;
    }

    .featured-excerpt {
        font-size: 16px;
    }

    .featured-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-content {
        padding: 24px;
    }

    .article-title {
        font-size: 1.25rem;
    }

    .social-links {
        flex-direction: column;
        width: 100%;
    }

    .social-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-hero-container,
    .blog-content-wrapper,
    .newsletter-container {
        padding: 0 16px;
    }

    .blog-hero {
        padding: 40px 0 60px;
    }

    .category-btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .featured-content {
        padding: 20px;
    }

    .article-content {
        padding: 20px;
    }
}
