/* ==============================================================
   CHUYÊN MỤC TIN TỨC & BÀI VIẾT (ARCHIVE BLOG) - BIO MINH LONG
   Style đồng bộ chuẩn mực với Trang Chủ, Trang Giới Thiệu & Trang Liên Hệ
   ============================================================== */

:root {
    --bml-dark: #0e382b;
    --bml-dark-deep: #07281c;
    --bml-dark-light: #134e3a;
    --bml-lime: #cae88d;
    --bml-lime-vibrant: #c8ea66;
    --bml-lime-soft: rgba(202, 232, 141, 0.15);
    --bml-lime-border: rgba(202, 232, 141, 0.35);
    --bml-text-dark: #1e293b;
    --bml-text-muted: #64748b;
    --bml-font: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --bml-radius-card: 20px;
    --bml-radius-pill: 50px;
}

/* --- XÓA HOÀN TOÀN KHOẢNG CÁCH DƯỚI HEADER MENU --- */
body.archive #main,
body.blog #main,
body.category #main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.blog-wrapper.blog-archive,
.blog-archive.page-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background-color: #f8faf8;
    padding-bottom: 60px;
    font-family: var(--bml-font);
}

.bml-archive-container-row {
    max-width: 1240px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 15px;
}

.bml-archive-container-col {
    padding: 0 !important;
}

/* ==============================================================
   1. HERO BANNER (.bml-archive-hero)
   ============================================================== */
.bml-archive-hero {
    position: relative;
    background: linear-gradient(135deg, #07281c 0%, #0e382b 60%, #124c39 100%);
    color: #ffffff;
    padding: 60px 20px 52px;
    margin-top: 0 !important;
    margin-bottom: 45px;
    overflow: hidden;
    font-family: var(--bml-font);
    box-shadow: 0 10px 30px rgba(7, 40, 28, 0.15);
}

/* Ambient glow & decorative mesh */
.bml-archive-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(202, 232, 141, 0.18) 0%, rgba(202, 232, 141, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.bml-archive-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(14, 56, 43, 0.45) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.bml-hero-bg-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.bml-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Breadcrumbs */
.bml-archive-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 18px;
}

.bml-archive-breadcrumbs a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.25s ease;
}

.bml-archive-breadcrumbs a:hover {
    color: var(--bml-lime);
}

.bml-bc-sep {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.bml-bc-current {
    color: var(--bml-lime);
    font-weight: 700;
}

/* Eco badge pill */
.bml-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: var(--bml-radius-pill);
    background: rgba(202, 232, 141, 0.12);
    border: 1px solid var(--bml-lime-border);
    color: var(--bml-lime);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    backdrop-filter: blur(8px);
}

.bml-badge-icon {
    font-size: 14px;
}

/* Archive title */
.bml-archive-title {
    font-family: var(--bml-font);
    font-size: 38px;
    font-weight: 900;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Subtitle */
.bml-archive-desc {
    max-width: 720px;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 28px;
    font-weight: 400;
}

/* Category Filter Tabs */
.bml-category-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.bml-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--bml-radius-pill);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(6px);
}

.bml-cat-tab:hover {
    background: rgba(202, 232, 141, 0.2);
    border-color: rgba(202, 232, 141, 0.5);
    color: var(--bml-lime);
    transform: translateY(-2px);
}

.bml-cat-tab.active {
    background: var(--bml-lime);
    color: var(--bml-dark-deep);
    border-color: var(--bml-lime);
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(202, 232, 141, 0.4);
    transform: translateY(-2px);
}

.bml-cat-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.bml-cat-tab.active .tab-count {
    background: var(--bml-dark-deep);
    color: var(--bml-lime);
}

/* ==============================================================
   2. POSTS GRID & CARDS
   ============================================================== */
.bml-posts-archive-wrapper {
    width: 100%;
    margin-top: 10px;
}

.bml-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* Post Card */
.bml-post-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: var(--bml-radius-card);
    overflow: hidden;
    border: 1px solid rgba(14, 56, 43, 0.08);
    box-shadow: 0 4px 20px rgba(14, 56, 43, 0.04);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 100%;
}

.bml-post-card:hover {
    transform: translateY(-7px);
    border-color: rgba(14, 56, 43, 0.18);
    box-shadow: 0 16px 36px rgba(14, 56, 43, 0.12);
}

/* Card Media / Thumbnail */
.bml-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #e2e8f0;
}

.bml-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.bml-post-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bml-post-card:hover .bml-post-thumb {
    transform: scale(1.08);
}

/* Category Badge over Image */
.bml-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(7, 40, 28, 0.88);
    backdrop-filter: blur(8px);
    color: var(--bml-lime);
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(202, 232, 141, 0.3);
    z-index: 2;
    text-decoration: none;
    transition: all 0.25s ease;
}

.bml-card-badge:hover {
    background: var(--bml-lime);
    color: var(--bml-dark-deep);
    border-color: var(--bml-lime);
}

/* Card Body */
.bml-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta info */
.bml-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bml-text-muted);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.bml-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bml-meta-item svg {
    color: #10b981;
}

.bml-meta-dot {
    color: #cbd5e1;
}

/* Post Title */
.bml-card-title {
    font-family: var(--bml-font);
    font-size: 17.5px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--bml-dark);
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

.bml-card-title a {
    color: var(--bml-dark);
    text-decoration: none;
    transition: color 0.25s ease;
}

.bml-card-title a:hover {
    color: #15803d;
}

/* Excerpt */
.bml-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--bml-text-muted);
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Card Footer */
.bml-card-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(14, 56, 43, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bml-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13.5px;
    color: var(--bml-dark);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

.bml-arrow-icon {
    transition: transform 0.25s ease;
    color: #15803d;
}

.bml-card-cta:hover {
    color: #15803d;
}

.bml-card-cta:hover .bml-arrow-icon {
    transform: translateX(5px);
}

/* Empty posts state */
.bml-empty-posts {
    text-align: center;
    padding: 70px 24px;
    background: #ffffff;
    border-radius: var(--bml-radius-card);
    border: 1px solid rgba(14, 56, 43, 0.08);
    box-shadow: 0 4px 20px rgba(14, 56, 43, 0.04);
    margin: 20px 0 50px;
}

.bml-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.bml-empty-title {
    font-family: var(--bml-font);
    font-size: 22px;
    font-weight: 800;
    color: var(--bml-dark);
    margin-bottom: 10px;
}

.bml-empty-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--bml-text-muted);
    max-width: 520px;
    margin: 0 auto 24px;
}

/* ==============================================================
   3. PAGINATION
   ============================================================== */
.bml-pagination-wrapper {
    display: flex !important;
    justify-content: center !important;
    margin: 40px 0 60px !important;
}

.bml-pagination-wrapper .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.bml-pagination-wrapper .page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border: none !important;
    display: inline-block !important;
}

.bml-pagination-wrapper .page-numbers .page-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(14, 56, 43, 0.12) !important;
    color: var(--bml-dark) !important;
    font-family: var(--bml-font) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(14, 56, 43, 0.04) !important;
    transition: all 0.25s ease !important;
}

.bml-pagination-wrapper .page-numbers .page-number:hover {
    background: var(--bml-lime) !important;
    color: var(--bml-dark-deep) !important;
    border-color: var(--bml-lime) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(202, 232, 141, 0.4) !important;
}

.bml-pagination-wrapper .page-numbers .page-number.current {
    background: var(--bml-dark-deep) !important;
    color: var(--bml-lime) !important;
    border-color: var(--bml-dark-deep) !important;
    box-shadow: 0 4px 14px rgba(7, 40, 28, 0.3) !important;
}

/* ==============================================================
   4. CTA BANNER (.bml-archive-cta-banner)
   ============================================================== */
.bml-archive-cta-banner {
    position: relative;
    background: linear-gradient(135deg, #07281c 0%, #0e382b 100%);
    border-radius: 24px;
    padding: 42px 48px;
    margin: 20px 0 30px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(7, 40, 28, 0.15);
    border: 1px solid rgba(202, 232, 141, 0.2);
}

.bml-cta-decor-circle {
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(202, 232, 141, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.bml-cta-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.bml-cta-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(202, 232, 141, 0.15);
    border: 1px solid rgba(202, 232, 141, 0.35);
    color: var(--bml-lime);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.bml-cta-title {
    font-family: var(--bml-font);
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.bml-cta-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.bml-cta-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.bml-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--bml-radius-pill);
    font-family: var(--bml-font);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bml-btn-cta.primary {
    background: var(--bml-lime);
    color: var(--bml-dark-deep);
    box-shadow: 0 4px 16px rgba(202, 232, 141, 0.35);
}

.bml-btn-cta.primary:hover {
    background: #d8f58b;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(202, 232, 141, 0.5);
    color: var(--bml-dark-deep);
}

.bml-btn-cta.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bml-btn-cta.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    color: #ffffff;
}

/* ==============================================================
   5. RESPONSIVE BREAKPOINTS
   ============================================================== */
@media (max-width: 1024px) {
    .bml-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .bml-archive-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 30px;
    }

    .bml-cta-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .bml-archive-hero {
        padding: 45px 16px 35px;
        margin-bottom: 30px;
    }

    .bml-archive-title {
        font-size: 28px;
    }

    .bml-archive-desc {
        font-size: 14.5px;
        margin-bottom: 20px;
    }

    .bml-cat-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

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

    .bml-card-title {
        font-size: 16.5px;
        min-height: auto;
    }

    .bml-archive-cta-banner {
        padding: 26px 20px;
        border-radius: 18px;
    }

    .bml-cta-title {
        font-size: 20px;
    }

    .bml-btn-cta {
        width: 100%;
        justify-content: center;
    }
}
