/**
 * Blog Archive Section Styles
 * Based on Figma design: https://www.figma.com/design/HdhVruCm1xwQDVCTo1yHyd/Website-TAM-dental?node-id=606-7367
 */

.blog-archive-section {
    padding: 96px 32px 64px;
    background: #ffffff;
}

.blog-archive-section .container {
    max-width: 1216px;
    margin: 0 auto;
}

/* Header Section */
.blog-archive-section .blog-archive-header {
    text-align: center;
    margin-bottom: 64px;
}

.blog-archive-section .blog-archive-header .pre-header {
    display: inline-block;
    color: #0B76AD;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.56;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.blog-archive-section .blog-archive-header .main-heading {
    color: #181D27;
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -1.5px;
    margin: 0 auto;
    max-width: 800px;
}

/* Blog Posts Container */
.blog-archive-section .blog-posts-container {
    margin-top: 64px;
}

.blog-archive-section .section-title {
    color: #181D27;
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.56;
    letter-spacing: -1px;
    margin-bottom: 32px;
}

/* Blog Grid Layout */
.blog-archive-section .blog-posts-grid {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

/* Featured Blog Card (First Post) */
.blog-archive-section .featured-blog-card {
    flex: 0 0 calc(50% - 16px);
    max-width: 592px;
}

.blog-archive-section .featured-blog-card .blog-card-image {
    width: 100%;
    height: 394px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.blog-archive-section .featured-blog-card .blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Secondary Blog Cards Container */
.blog-archive-section .secondary-blog-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Regular Blog Card */
.blog-archive-section .blog-card {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.blog-archive-section .blog-card .blog-card-image {
    flex: 0 0 213px;
    height: 213px;
    border-radius: 16px;
    overflow: hidden;
}

.blog-archive-section .blog-card .blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Blog Card Content */
.blog-archive-section .blog-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-archive-section .blog-card .blog-card-content {
    flex: 1;
    gap: 24px;
}

/* Blog Meta */
.blog-archive-section .blog-meta {
    margin-bottom: 8px;
}

.blog-archive-section .blog-date {
    color: #0B76AD;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.43;
    letter-spacing: -0.2px;
}

/* Blog Title */
.blog-archive-section .blog-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.blog-archive-section .featured-blog-card .blog-title-link {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.blog-archive-section .blog-title {
    color: #181D27;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.56;
    letter-spacing: -0.2px;
    margin: 0;
}

.blog-archive-section .blog-title a {
    color: inherit;
    text-decoration: none;
}

.blog-archive-section .blog-title a:hover,
.blog-archive-section .blog-title-link:hover .blog-title {
    color: #0B76AD;
}

.blog-archive-section .arrow-icon {
    flex-shrink: 0;
    margin-top: 2px;
    transition: transform 0.2s ease;
}

.blog-archive-section .blog-title-link:hover .arrow-icon {
    transform: translate(2px, -2px);
}

/* Blog Excerpt */
.blog-archive-section .blog-excerpt {
    color: #535862;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin: 4px 0 16px;
}

/* Category Badges */
.blog-archive-section .blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.blog-archive-section .category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.2px;
    text-align: center;
    background: #F6FBFD;
    color: #0B76AD;
    border: 1px solid #DBF0FB;
}

/* Different category colors */
.blog-archive-section .category-badge.category-general {
    background: #F6FBFD;
    color: #0B76AD;
    border-color: #DBF0FB;
}

.blog-archive-section .category-badge.category-implant,
.blog-archive-section .category-badge.category-implants {
    background: #FFFAEB;
    color: #B54708;
    border-color: #FEDF89;
}

.blog-archive-section .category-badge.category-cosmetic {
    background: #FEF3F2;
    color: #B42318;
    border-color: #FECDCA;
}

.blog-archive-section .category-badge.category-orthodontics {
    background: #F4F3FF;
    color: #5925DC;
    border-color: #D9D6FE;
}

.blog-archive-section .category-badge.category-kids-dental {
    background: #F0F9FF;
    color: #0369A1;
    border-color: #BAE6FD;
}

.blog-archive-section .category-badge.category-uncategorized {
    background: #F5F5F5;
    color: #717680;
    border-color: #E5E5E5;
}

/* RTL Support for Arabic */
[lang="ar"] .blog-archive-section {
    direction: rtl;
}

[lang="ar"] .blog-archive-section h1.main-heading {
    text-align: center !important;
}

[lang="ar"] .blog-archive-section .section-title {
    text-align: right;
}

[lang="ar"] .blog-archive-section .blog-posts-grid {
    direction: rtl;
}

[lang="ar"] .blog-archive-section .featured-blog-card,
[lang="ar"] .blog-archive-section .blog-card {
    direction: rtl;
}

[lang="ar"] .blog-archive-section .blog-categories {
    justify-content: flex-start;
}

[lang="ar"] .blog-archive-section .blog-date,
[lang="ar"] .blog-archive-section .blog-title,
[lang="ar"] .blog-archive-section .blog-excerpt {
    text-align: right;
}

[lang="ar"] .blog-archive-section .blog-title {
    line-height: 1.4;
    font-family: 'IBM Plex Sans Arabic', 'Poppins', sans-serif;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-archive-section .blog-posts-grid {
        flex-direction: column;
    }
    
    .blog-archive-section .featured-blog-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .blog-archive-section .secondary-blog-cards {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-archive-section {
        padding: 64px 24px 48px;
    }
    
    .blog-archive-section .blog-archive-header .main-heading {
        font-size: 36px;
    }
    
    .blog-archive-section .blog-archive-header .pre-header {
        font-size: 18px;
    }
    
    .blog-archive-section .blog-card {
        flex-direction: column;
    }
    
    .blog-archive-section .blog-card .blog-card-image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }
    
    .blog-archive-section .featured-blog-card .blog-card-image {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .blog-archive-section {
        padding: 48px 16px 32px;
    }
    
    .blog-archive-section .blog-archive-header .main-heading {
        font-size: 28px;
    }
    
    .blog-archive-section .blog-posts-grid {
        gap: 24px;
    }
    
    .blog-archive-section .secondary-blog-cards {
        gap: 24px;
    }
}