/* ===== BLOG LISTING PAGE ===== */

/* --- Hero --- */
.blog-hero-container {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #0a1628 0%, #1a2d50 100%);
    overflow: hidden;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 80px 24px 48px;
}

.blog-hero-badge {
    display: inline-block;
    background: var(--brand-primary-soft);
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary-mid);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 16px;
    margin-bottom: 1rem;
}

.blog-hero-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.blog-hero-content p {
    color: rgba(255,255,255,0.72);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto;
}

/* --- Featured Post --- */
.flx-blog-featured {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 24px;
}

.featured-inner {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 460px;
    text-decoration: none;
}

.featured-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-inner:hover .featured-bg-img {
    transform: scale(1.03);
}

.featured-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    z-index: 1;
}

.featured-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 2.5rem;
    z-index: 2;
    color: #fff;
}

.featured-badge {
    display: inline-block;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.featured-body h2 {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    max-width: 640px;
}

.featured-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
    opacity: 0.85;
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- Controls: filter pills + search --- */
.flx-blog-controls {
    border-bottom: 1px solid #eaecf0;
    background: #fff;
    position: sticky;
    top: 72px;
    z-index: 10;
}

.flx-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.flx-blog-controls .flx-blog-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.blog-filter-pills {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.blog-pill {
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    border: 1.5px solid #e0e3eb;
    background: transparent;
    color: #5a6478;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.blog-pill:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.blog-pill.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    font-weight: 600;
}

.blog-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f5f7fa;
    border: 1.5px solid #e0e3eb;
    border-radius: 50px;
    padding: 0 1rem;
    transition: border-color 0.2s;
}

.blog-search-box:focus-within {
    border-color: var(--brand-primary);
    background: #fff;
}

.blog-search-box i {
    color: #aab0bd;
    font-size: 1rem;
    flex-shrink: 0;
}

.blog-search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.875rem;
    color: #1a2035;
    padding: 0.55rem 0;
    width: 200px;
}

.blog-search-box input::placeholder {
    color: #aab0bd;
}

/* --- Post Grid --- */
.flx-blog-section {
    padding: 2.5rem 0 5rem;
    background: #f8f9fb;
}

.flx-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}

/* --- Post Card --- */
.flx-post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid #eaecf0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}

.flx-post-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.09);
    transform: translateY(-3px);
}

.flx-post-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.flx-post-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.flx-post-card:hover .flx-post-img-wrap img {
    transform: scale(1.04);
}

.flx-post-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
}

.flx-post-body {
    padding: 1.25rem 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.flx-post-meta {
    font-size: 0.78rem;
    color: #8a94a6;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.flx-post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flx-post-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a2035;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flx-post-excerpt {
    font-size: 0.875rem;
    color: #5a6478;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.flx-post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: auto;
}

.flx-post-read-more i {
    transition: transform 0.2s;
}

.flx-post-card:hover .flx-post-read-more i {
    transform: translateX(3px);
}

/* --- Pagination --- */
.blog-pagination {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .flx-post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .flx-post-grid {
        grid-template-columns: 1fr;
    }
    .featured-inner {
        height: 320px;
    }
    .featured-body {
        padding: 1.25rem 1.5rem;
    }
    .flx-blog-controls .flx-blog-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .blog-search-box input {
        width: 100%;
    }
    .blog-search-box {
        width: 100%;
    }
}
