/* =========================================
   1. CSS Variables & Reset (Modern 2026)
   ========================================= */
:root {
    --primary-color: #004a99; /* Corporate Tech Blue */
    --primary-dark: #003370;
    --accent-color: #00c3ff;  /* Cyan accent */
    --text-dark: #1a1f2c;     /* Softer black */
    --text-body: #4a5568;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    --card-radius: 16px;      /* Modern larger radius */
    --btn-radius: 50px;       /* Pill shape for buttons */
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    
    --font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. Layout
   ========================================= */
.blog-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px; /* Reduced top padding as banner handles it */
}

/* =========================================
   3. NEW MODERN BANNER (2026 Style)
   ========================================= */
.modern-banner {
    position: relative;
    width: 100%;
    height: 400px; /* Banner Height */
    border-radius: 24px;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 74, 153, 0.15);
}

/* Background Image Layer */
.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dark Blue Overlay (Gradient) */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 74, 153, 0.9), rgba(0, 51, 112, 0.75));
    z-index: 2;
}

/* Text Content */
.banner-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    padding: 20px;
    color: #ffffff;
}

.banner-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 15px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

/* Banner Stats (Optional visual element) */
.banner-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   4. Filters (Pill Shape)
   ========================================= */
.category-filter-wrapper {
    margin-bottom: 50px;
    text-align: center;
}

.category-filters {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: var(--bg-white);
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: var(--btn-radius);
    color: var(--text-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 74, 153, 0.2);
}

/* =========================================
   5. Featured Post (Horizontal Layout)
   ========================================= */
.featured-post {
    margin-bottom: 60px;
}

.blog-card.featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Image wider than text */
    min-height: 400px;
}

.blog-card.featured .card-image {
    height: 100%;
    border-radius: var(--card-radius) 0 0 var(--card-radius); /* Left rounded only */
}

.blog-card.featured .card-content {
    justify-content: center;
    padding: 40px;
}

.blog-card.featured h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.blog-card.featured h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card.featured h2 a:hover {
    color: var(--primary-color);
}

/* =========================================
   6. Standard Grid & Cards
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px 30px;
    margin-bottom: 80px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* Image Area */
.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background-color: #eee;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.08);
}

.category-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--primary-color);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Content Area */
.card-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.meta-data {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.meta-data i {
    color: var(--accent-color);
}

.card-content h3 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.card-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    background-image: linear-gradient(var(--primary-color), var(--primary-color));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s;
}

.card-content h3 a:hover {
    color: var(--primary-color);
    background-size: 100% 2px;
}

.card-content p {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
}

.read-more i {
    margin-left: 8px;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.read-more:hover i {
    transform: translateX(4px);
}

/* =========================================
   7. Pagination (Modern)
   ========================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    list-style: none;
    display: flex;
    padding: 0;
    gap: 8px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--text-body);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.page-link:hover:not(.disabled) {
    background-color: #eef2f6;
    color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 74, 153, 0.3);
}

.page-link.disabled {
    color: #cbd5e0;
    cursor: default;
}

/* =========================================
   8. Responsive Design
   ========================================= */
@media screen and (max-width: 992px) {
    .modern-banner { height: auto; padding: 40px 20px; }
    .banner-content h1 { font-size: 2.5rem; }
    
    .blog-card.featured {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .blog-card.featured .card-image {
        height: 300px;
        border-radius: var(--card-radius) var(--card-radius) 0 0;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 600px) {
    .blog-container { padding: 0 16px 40px; }
    .modern-banner { border-radius: 0; margin-left: -16px; margin-right: -16px; width: calc(100% + 32px); }
    .banner-content h1 { font-size: 2rem; }
    
    .category-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex: 0 0 auto;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .card-content { padding: 24px 20px; }
}