/* =========================================
   Blog Page Styles
   ========================================= */

/* ---- Hero ---- */
.blog-hero {
    padding: 150px 0 90px;
    background: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Add grid pattern ONLY to background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Crect x='10' y='10' width='80' height='80' rx='20' fill='none' stroke='%23f1f3f9' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center top;
    
    /* Fade the background pattern at the edges */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 80%);
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-navy);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 20px 0 20px 0;
}

.blog-hero-sub {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ---- Featured Post ---- */
.featured-section {
    padding: 0 0 80px;
    position: relative;
    z-index: 2;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
}

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

.post-category {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.featured-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-navy);
    margin-bottom: 20px;
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1.05rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 30px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

/* ---- Blog Grid ---- */
.blog-section {
    padding: 80px 0 120px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.blog-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.blog-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-card-content {
    padding: 30px;
}

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(253, 82, 2, 0.08);
    color: var(--brand-orange);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-navy);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
    color: var(--brand-orange);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Categories ---- */
.categories-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 10px 24px;
    border-radius: 50px;
    background: white;
    border: 1.5px solid #e2e8f0;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-btn:hover, .cat-btn.active {
    border-color: var(--brand-orange);
    color: var(--brand-orange);
    background: rgba(253, 82, 2, 0.05);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .featured-section {
        margin-top: -30px;
        padding-bottom: 40px;
    }
    .featured-card { 
        grid-template-columns: 1fr;
        border-radius: 24px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    }
    .featured-image {
        min-height: 300px;
    }
    .featured-content { padding: 30px; }
    .featured-title { font-size: 1.6rem; margin-bottom: 12px; }
    .featured-excerpt { font-size: 0.95rem; margin-bottom: 20px; }
    
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-hero-title { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .featured-image { min-height: 240px; }
    .featured-title { font-size: 1.4rem; }
    .featured-content { padding: 25px; }
    
    .blog-grid { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; border-radius: 20px; background: transparent; border: none; }
    .newsletter-form input { background: rgba(255,255,255,0.1); height: 60px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.2); margin-bottom: 10px; }
    .newsletter-form button { width: 100%; height: 60px; }
    .blog-hero-title { font-size: 2rem; }
}
