/* =========================================================
BLOG.CSS
Trang:
- Blog
- Danh sách bài viết
- Featured post
- Sidebar
- Search
- Filter
- Pagination

Font: Inter
========================================================= */


/* =========================================================
1. BASE
========================================================= */

.blog-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: #f5f6f8;
    color: #1f2937;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.blog-main {
    flex: 1;
    width: 100%;
    padding: 40px 16px 64px;
    background: #f5f6f8;
}

.blog-layout {
    width: min(1536px, calc(100% - 32px));
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(280px, 1fr);

    gap: 32px;

    align-items: start;
}


/* =========================================================
2. HERO
========================================================= */

.blog-hero {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 48px 0;
    background: linear-gradient(
        110deg,
        #003370 0%,
        #00479b 100%
    );
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 71, 155, 0.6);
    pointer-events: none;
}

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

    width: min(
        1536px,
        calc(100% - 32px)
    );

    margin: 0 auto;
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: #d1d5db;

    font-size: 13px;
    font-weight: 500;
}

.blog-breadcrumb-link {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-breadcrumb-link:hover {
    color: #ff5e00;
}

.blog-breadcrumb-separator {
    color: #6b7280;
}

.blog-breadcrumb-current {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
}

.blog-hero-title {
    margin: 0 0 24px;

    color: #ffffff;

    font-size: clamp(
        30px,
        4vw,
        40px
    );

    line-height: 1.2;

    font-weight: 900;

    text-transform: uppercase;

    letter-spacing: 0.02em;
}

.blog-hero-description {
    max-width: 760px;

    margin: 0;

    color: #e5e7eb;

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
3. CONTENT
========================================================= */

.blog-content {
    min-width: 0;
}


/* =========================================================
4. FILTER BAR
========================================================= */

.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;

    justify-content: space-between;
    align-items: center;

    gap: 16px;

    padding-bottom: 16px;

    margin-bottom: 32px;

    border-bottom: 1px solid #e5e7eb;
}

.blog-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-category-btn {
    min-height: 34px;

    padding: 6px 16px;

    border: 0;

    border-radius: 999px;

    background: #e5e7eb;

    color: #374151;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.blog-category-btn:hover {
    background: #ff5e00;
    color: #ffffff;
}

.blog-category-btn.is-active {
    background: #00479b;
    color: #ffffff;
}

.blog-count {
    display: inline-flex;
    align-items: center;

    min-height: 30px;

    padding: 4px 12px;

    border: 1px solid #e5e7eb;

    border-radius: 6px;

    background: #ffffff;

    color: #6b7280;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
5. SKELETON
========================================================= */

.blog-skeleton-container {
    display: block;
}

.blog-skeleton-featured,
.blog-skeleton-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    animation:
        blog-pulse
        1.5s
        ease-in-out
        infinite;
}

.blog-skeleton-featured {
    height: 384px;
    margin-bottom: 32px;
}

.blog-skeleton-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 24px;
}

.blog-skeleton-card {
    height: 288px;
}

@keyframes blog-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


/* =========================================================
6. FEATURED POST
========================================================= */

.blog-featured-area {
    margin-bottom: 32px;
}

.blog-featured-card {
    display: block;

    overflow: hidden;

    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    color: inherit;

    text-decoration: none;

    box-shadow:
        0 2px 6px
        rgba(15, 23, 42, 0.05);

    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.blog-featured-card:hover {
    box-shadow:
        0 12px 28px
        rgba(15, 23, 42, 0.12);

    transform: translateY(-2px);
}

.blog-featured-inner {
    display: flex;
    flex-direction: column;
}

.blog-featured-image-wrapper {
    position: relative;

    width: 100%;
    height: 256px;

    overflow: hidden;

    background: #f5f6f8;
}

.blog-featured-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s ease;
}

.blog-featured-card:hover
.blog-featured-image {
    transform: scale(1.05);
}

.blog-featured-badge {
    position: absolute;

    top: 16px;
    left: 16px;

    z-index: 2;

    padding: 6px 12px;

    border-radius: 5px;

    background: #ff5e00;

    color: #ffffff;

    font-size: 12px;
    font-weight: 900;

    text-transform: uppercase;

    box-shadow:
        0 2px 6px
        rgba(0, 0, 0, 0.12);
}

.blog-featured-content {
    padding: 24px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 16px;

    margin-bottom: 16px;

    color: #6b7280;

    font-size: 12px;
    font-weight: 700;
}

.blog-meta-item {
    display: inline-flex;
    align-items: center;

    gap: 4px;
}

.blog-meta-icon {
    width: 16px;
    height: 16px;

    color: #00479b;
}

.blog-featured-title {
    margin: 0 0 16px;

    color: #1f2937;

    font-size: 26px;
    line-height: 1.35;

    font-weight: 900;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;

    transition: color 0.2s ease;
}

.blog-featured-card:hover
.blog-featured-title {
    color: #00479b;
}

.blog-featured-summary {
    margin: 0 0 20px;

    color: #4b5563;

    font-size: 14px;
    line-height: 1.7;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: #00479b;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    transition: color 0.2s ease;
}

.blog-read-more.featured {
    color: #ff5e00;
}

.blog-read-more-icon {
    width: 16px;
    height: 16px;

    transition:
        transform 0.3s ease;
}

.blog-featured-card:hover
.blog-read-more-icon {
    transform: translateX(5px);
}


/* =========================================================
7. BLOG GRID
========================================================= */

.blog-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    height: 100%;

    overflow: hidden;

    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow:
        0 2px 6px
        rgba(15, 23, 42, 0.04);

    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.blog-card:hover {
    border-color: rgba(255, 94, 0, 0.5);

    box-shadow:
        0 12px 28px
        rgba(15, 23, 42, 0.10);

    transform: translateY(-3px);
}

.blog-card-image-link {
    display: block;

    height: 208px;

    overflow: hidden;

    position: relative;

    border-bottom:
        1px solid #f3f4f6;

    background: #f5f6f8;

    text-decoration: none;
}

.blog-card-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.7s ease;
}

.blog-card:hover
.blog-card-image {
    transform: scale(1.08);
}

.blog-card-body {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 24px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;

    margin-bottom: 12px;

    color: #9ca3af;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.05em;
}

.blog-card-title-link {
    color: inherit;
    text-decoration: none;
}

.blog-card-title {
    margin: 0 0 12px;

    color: #1f2937;

    font-size: 18px;

    line-height: 1.45;

    font-weight: 900;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;

    transition: color 0.2s ease;
}

.blog-card:hover
.blog-card-title {
    color: #00479b;
}

.blog-card-summary {
    margin: 0 0 20px;

    color: #6b7280;

    font-size: 14px;

    line-height: 1.7;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;
}

.blog-card-read-more {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    margin-top: auto;

    color: #00479b;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    transition:
        color 0.2s ease;
}

.blog-card:hover
.blog-card-read-more {
    color: #ff5e00;
}


/* =========================================================
8. SIDEBAR
========================================================= */

.blog-sidebar {
    position: sticky;

    top: 96px;

    display: flex;
    flex-direction: column;

    gap: 32px;
}

.blog-sidebar-card {
    padding: 24px;

    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow:
        0 2px 8px
        rgba(15, 23, 42, 0.05);
}

.blog-sidebar-title {
    display: flex;
    align-items: center;

    margin: 0 0 16px;

    color: #00479b;

    font-size: 15px;

    font-weight: 900;

    text-transform: uppercase;
}

.blog-sidebar-title-icon {
    width: 20px;
    height: 20px;

    margin-right: 8px;

    color: #ff5e00;

    flex-shrink: 0;
}

.blog-search-box {
    position: relative;
}

.blog-search-input {
    width: 100%;
    height: 42px;

    box-sizing: border-box;

    padding:
        0 44px 0 16px;

    border:
        1px solid #d1d5db;

    border-radius: 6px;

    background: #ffffff;

    color: #1f2937;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.blog-search-input:focus {
    border-color: #ff5e00;

    box-shadow:
        0 0 0 3px
        rgba(255, 94, 0, 0.08);
}

.blog-search-button {
    position: absolute;

    right: 8px;
    top: 50%;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform:
        translateY(-50%);

    border: 0;

    background: transparent;

    color: #9ca3af;

    cursor: pointer;

    transition: color 0.2s ease;
}

.blog-search-button:hover {
    color: #ff5e00;
}

.blog-search-button-icon {
    width: 18px;
    height: 18px;
}


/* =========================================================
9. SIDEBAR LIST
========================================================= */

.blog-sidebar-list {
    display: flex;
    flex-direction: column;

    gap: 16px;
}

.blog-sidebar-post {
    display: flex;

    gap: 12px;

    align-items: center;

    padding-bottom: 12px;

    border-bottom:
        1px solid #f3f4f6;

    color: inherit;

    text-decoration: none;
}

.blog-sidebar-post:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.blog-sidebar-post-image-wrapper {
    width: 64px;
    height: 64px;

    flex-shrink: 0;

    overflow: hidden;

    border:
        1px solid #f3f4f6;

    border-radius: 5px;

    background: #f5f6f8;
}

.blog-sidebar-post-image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.3s ease;
}

.blog-sidebar-post:hover
.blog-sidebar-post-image {
    transform: scale(1.08);
}

.blog-sidebar-post-content {
    min-width: 0;

    flex: 1;
}

.blog-sidebar-post-title {
    margin: 0;

    color: #1f2937;

    font-size: 12px;

    line-height: 1.45;

    font-weight: 700;

    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;

    transition:
        color 0.2s ease;
}

.blog-sidebar-post:hover
.blog-sidebar-post-title {
    color: #00479b;
}

.blog-sidebar-post-date {
    display: block;

    margin-top: 5px;

    color: #9ca3af;

    font-size: 10px;
}

.blog-sidebar-empty {
    margin: 0;

    padding: 16px;

    color: #6b7280;

    font-size: 12px;

    font-style: italic;

    text-align: center;
}


/* =========================================================
10. SIDEBAR SKELETON
========================================================= */

.blog-sidebar-skeleton {
    display: flex;

    gap: 12px;
}

.blog-sidebar-skeleton-image {
    width: 64px;
    height: 64px;

    flex-shrink: 0;

    border-radius: 5px;

    background: #e5e7eb;
}

.blog-sidebar-skeleton-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 8px;

    padding-top: 4px;
}

.blog-sidebar-skeleton-line {
    width: 100%;
    height: 10px;

    border-radius: 4px;

    background: #e5e7eb;
}

.blog-sidebar-skeleton-line.short {
    width: 65%;
}


/* =========================================================
11. EMPTY
========================================================= */

.blog-empty {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 260px;

    padding: 48px 20px;

    background: #ffffff;

    border:
        1px dashed #d1d5db;

    border-radius: 12px;

    text-align: center;
}

.blog-empty-icon {
    width: 48px;
    height: 48px;

    margin-bottom: 12px;

    color: #d1d5db;
}

.blog-empty-title {
    margin: 0;

    color: #1f2937;

    font-size: 18px;

    font-weight: 800;
}


/* =========================================================
12. ERROR
========================================================= */

.blog-error {
    grid-column: 1 / -1;

    padding: 40px 20px;

    background: #fef2f2;

    border:
        1px solid #fee2e2;

    border-radius: 8px;

    color: #dc2626;

    font-size: 14px;

    font-weight: 700;

    text-align: center;
}


/* =========================================================
13. PAGINATION
========================================================= */

.blog-pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 48px;

    margin-bottom: 16px;
}

.blog-pagination-button {
    min-width: 40px;
    min-height: 36px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding:
        6px 12px;

    border:
        1px solid #d1d5db;

    border-radius: 6px;

    background: #ffffff;

    color: #6b7280;

    font-family: inherit;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.blog-pagination-button:hover {
    background: #fff7ed;

    border-color: #ff5e00;

    color: #ff5e00;
}

.blog-pagination-button.is-active {
    background: #00479b;

    border-color: #00479b;

    color: #ffffff;
}


/* =========================================================
14. STATE HELPERS
========================================================= */

.is-hidden {
    display: none !important;
}

.is-flex {
    display: flex !important;
}


/* =========================================================
15. RESPONSIVE
========================================================= */

@media (max-width: 1199px) {

    .blog-layout {
        grid-template-columns:
            minmax(0, 2fr)
            minmax(260px, 1fr);

        gap: 24px;
    }

}


@media (max-width: 900px) {

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-featured-image-wrapper {
        height: 280px;
    }

}


@media (max-width: 768px) {

    .blog-main {
        padding:
            32px 12px 48px;
    }

    .blog-layout,
    .blog-hero-container {
        width:
            calc(100% - 24px);
    }

    .blog-hero {
        padding:
            40px 0;
    }

    .blog-hero-title {
        font-size: 28px;
    }

    .blog-filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-category-filters {
        width: 100%;
    }

    .blog-count {
        align-self: flex-start;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-skeleton-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .blog-featured-image-wrapper {
        height: 220px;
    }

    .blog-featured-content {
        padding: 20px;
    }

    .blog-featured-title {
        font-size: 22px;
    }

    .blog-card-image-link {
        height: 200px;
    }

    .blog-card-body {
        padding: 20px;
    }

    .blog-sidebar-card {
        padding: 20px;
    }

}


@media (max-width: 420px) {

    .blog-hero-title {
        font-size: 25px;
    }

    .blog-featured-title {
        font-size: 20px;
    }

    .blog-card-title {
        font-size: 17px;
    }

    .blog-category-btn {
        padding:
            6px 12px;
    }

}