/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  GeneratePress Child Theme
 Author:       HVD
 Template:     generatepress
 Version:      1.0.4
*/

/* ==========================================================================
   1. GLOBAL & RESETS
   ========================================================================== */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-content,
.inside-page-header {
    padding: 10px !important;
}

/* ==========================================================================
   2. SINGLE POST & PAGES
   ========================================================================== */

/* --- Entry Header & Decorative Background --- */
/* --- Entry Header & Decorative Background --- */
.entry-header {
    position: relative;
    margin-bottom: 30px;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px;
}

/* Khi có ảnh đại diện làm nền */
.entry-header.has-featured-image {
    background-size: cover;
    background-position: center;
    aspect-ratio: 19 / 6;
    padding: 40px 30px;
}

/* Lớp phủ để chữ dễ đọc hơn khi có ảnh nền */
.entry-header-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.entry-header.has-featured-image .entry-header-overlay {
    display: block;
}

.entry-header-container {
    position: relative;
    z-index: 2;
    padding: 40px 50px;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.entry-header:not(.has-featured-image) .entry-header-container {
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* nền chấm bi hiện đại */
.entry-header::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 180px;
    height: 180px;
    background-image: radial-gradient(#bfdbfe 1.4px, transparent 1.4px);
    background-size: 14px 14px;
    opacity: 0.65;
    border-radius: 50%;
}

.entry-header.has-featured-image::before {
    opacity: 0.2;
}

/* mảng blur nhẹ góc trái dưới */
.entry-header::after {
    content: "";
    position: absolute;
    bottom: -35px;
    left: -35px;
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.10), transparent 70%);
    border-radius: 50%;
}

.entry-header.has-featured-image::after {
    opacity: 0.2;
}

.entry-header .entry-title {
    margin: 0 0 16px;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
}

.entry-header.has-featured-image .entry-title {
    color: #fff;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.entry-header .entry-title a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

.entry-header .entry-title a:hover {
    color: #2563eb;
}

/* --- Entry Meta --- */
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.entry-header .entry-meta {
    margin-top: 0;
    justify-content: center;
}

.entry-meta>span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 50px;
    transition: all 0.25s ease;
}

.entry-header.has-featured-image .entry-meta>span {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.entry-meta>span:hover {
    background: #eef6ff;
    transform: translateY(-2px);
}

.entry-header.has-featured-image .entry-meta>span:hover {
    background: rgba(0, 0, 0, 0.5);
}

.entry-meta .gp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 15px;
}

.entry-meta .gp-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.entry-meta a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.entry-header.has-featured-image .entry-meta a {
    color: #fff;
}

.entry-meta a:hover {
    color: #2563eb;
}

.entry-header.has-featured-image .entry-meta a:hover {
    color: #bfdbfe;
}

.entry-meta .tags-links {
    flex-wrap: wrap;
    border-radius: 16px;
    max-width: 100%;
}

/* hide duplicate updated */
.entry-header .posted-on .updated {
    display: none;
}

/* --- Post Navigation --- */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 35px 0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    min-height: 88px;
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    transform: translateY(-4px);
    border-color: #dbeafe;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.08);
}

.post-navigation .nav-next {
    justify-content: space-between;
    text-align: right;
}

.post-navigation .gp-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-navigation .gp-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.post-navigation .prev,
.post-navigation .next {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.post-navigation a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation a:hover {
    color: #2563eb;
}

/* labels nhỏ cho accessibility hoặc hidden text */
.post-navigation .nav-previous::before {
    content: "← Previous Post";
    display: block;
    position: absolute;
    opacity: 0;
}

.post-navigation .nav-next::before {
    content: "Next Post →";
    display: block;
    position: absolute;
    opacity: 0;
}

/* ==========================================================================
   3. ARCHIVE & CATEGORY PAGES
   ========================================================================== */
.page-header {
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* hiệu ứng nền nhẹ */
.page-header::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 50%;
}

.page-header .page-title {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 34px;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

/* gạch nhấn dưới title */
.page-header .page-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin-top: 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

/* ==========================================================================
   4. HOMEPAGE SECTIONS
   ========================================================================== */

.bs-homepage-content {
    padding: 20px 0;
    overflow-x: hidden;
}

/* --- Features Section --- */
.bs-features-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.bs-feature-block {
    flex: 1 1 calc(33.333% - 20px);
    color: #fff;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.bs-feature-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bs-feature-image {
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
}

.bs-feature-image img {
    width: auto;
    height: 100%;
    max-width: 80%;
    object-fit: contain;
}

.bs-feature-content {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bs-feature-content h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.bs-feature-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.5;
}

.bs-feature-block.gradient-1 {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
}

.bs-feature-block.gradient-2 {
    background: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
}

.bs-feature-block.gradient-3 {
    background: linear-gradient(135deg, #ff4b1f 0%, #ff9068 100%);
}

.bs-feature-block.gradient-4 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bs-feature-block.gradient-5 {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

/* --- Category Header (Modernized) --- */
.bs-category-section {
    position: relative;
    padding: 24px;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    overflow: hidden;
}

/* nền chấm nhẹ góc phải */
.bs-category-section::before {
    content: "";
    position: absolute;
    top: -18px;
    right: -18px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-image: radial-gradient(#c7dbff 1.3px, transparent 1.3px);
    background-size: 13px 13px;
    opacity: .65;
}

/* blur góc trái */
.bs-category-section::after {
    content: "";
    position: absolute;
    left: -35px;
    bottom: -35px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, .10), transparent 72%);
}

.bs-category-section>* {
    position: relative;
    z-index: 2;
}

.bs-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 24px;
}

.bs-cat-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #0f172a;
}

/* gạch nhấn */
.bs-cat-title::after {
    content: "";
    display: block;
    width: 58px;
    height: 4px;
    margin-top: 10px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.bs-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all .25s ease;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.bs-view-all:hover {
    transform: translateY(-2px);
    background: #1d4ed8;
    box-shadow: 0 12px 22px rgba(37, 99, 235, .24);
}

.bs-view-all .dashicons {
    width: auto;
    height: auto;
    font-size: 15px !important;
    line-height: 1 !important;
    transition: transform .2s ease;
}

.bs-view-all:hover .dashicons {
    transform: translateX(3px);
}

/* --- Posts Slider / Grid --- */
.bs-posts-slider {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.bs-post-item {
    display: flex;
    flex-direction: column;
}

.bs-post-thumbnail {
    overflow: hidden;
    border-radius: 6px;
}

.bs-post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.bs-post-thumbnail:hover img {
    transform: scale(1.05);
}

.bs-post-content {
    margin-top: 12px;
}

.bs-post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.bs-post-title a {
    color: #333;
    text-decoration: none;
}

.bs-post-title a:hover {
    color: #0073aa;
}

/* ==========================================================================
   5. MEDIA QUERIES
   ========================================================================== */

/* Desktop only */
@media (min-width: 1025px) {
    .bs-posts-slider {
        flex-wrap: wrap;
    }

    .bs-post-item {
        flex: 0 0 calc(25% - 15px);
    }
}

/* Tablet & Mobile (Swipe horizontal) */
@media (max-width: 1024px) {

    .bs-features-section,
    .bs-posts-slider {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px;
    }

    .bs-features-section::-webkit-scrollbar,
    .bs-posts-slider::-webkit-scrollbar {
        display: none;
    }

    .bs-features-section {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tablet specific */
@media (max-width: 1024px) and (min-width: 768px) {
    .bs-feature-block {
        flex: 0 0 calc(40% - 15px);
        min-width: unset;
        scroll-snap-align: start;
    }

    .bs-post-item {
        flex: 0 0 calc(40% - 10px);
        scroll-snap-align: start;
    }
}

/* Mobile specific */
@media (max-width: 768px) {

    .entry-meta,
    .entry-header {
        padding: 15px;
        gap: 10px;
    }

    .entry-meta>span,
    .entry-header .entry-meta>span {
        width: 100%;
        border-radius: 12px;
        padding: 10px 14px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .post-navigation .nav-next {
        text-align: left;
        justify-content: flex-start;
    }

    .entry-header.has-featured-image {
        aspect-ratio: 16 / 9;
        padding: 30px 20px;
    }

    .entry-header.has-featured-image .entry-header-container {
        padding: 25px 20px;
        margin: 0 15px;
        border-radius: 16px;
    }

    .post-navigation .nav-previous,
    .post-navigation .nav-next {
        padding: 16px;
        min-height: auto;
    }

    .page-header {
        padding: 26px 22px;
        border-radius: 14px;
    }

    .page-header .page-title {
        font-size: 26px;
    }

    .page-header .page-title::after {
        width: 58px;
        margin-top: 12px;
    }

    .entry-header .entry-title {
        font-size: 26px;
    }

    .entry-header::before {
        width: 130px;
        height: 130px;
    }

    .bs-feature-block {
        flex: 0 0 calc(83.33% - 15px);
        min-width: unset;
        scroll-snap-align: start;
    }

    .bs-post-item {
        flex: 0 0 calc(77% - 10px);
        scroll-snap-align: start;
    }

    .bs-cat-title {
        font-size: 20px;
    }

    .bs-category-section {
        padding: 18px;
        border-radius: 14px;
    }
}