/*
 * Blog home (home.php) redesign.
 * Enqueued only when is_home() and every rule is scoped to
 * body.blog-home-v2, so no other blog page is affected.
 */

/* ----------------- page shell + white header ----------------- */
.blog-home-v2,
.blog-home-v2.ast-separate-container {
    background-color: #fff;
}

.blog-home-v2 #ast-desktop-header,
.blog-home-v2 div#ast-mobile-header {
    background-image: none !important;
    background-color: #fff !important;
    position: relative;
    z-index: 9999;
    padding: 0 20px;
}

.blog-home-v2.ast-theme-transparent-header #masthead:after {
    display: none;
}

.blog-home-v2.ast-theme-transparent-header #masthead .main-header-menu a.menu-link,
.blog-home-v2.ast-theme-transparent-header #masthead .ast-menu-toggle {
    color: #1B2E5F;
}

.blog-home-v2 .site-primary-header-wrap {
    padding-bottom: 20px;
}

.blog-home-v2 .header-account .btn.btn-outline-light {
    color: #1B2E5F;
    border-color: #1B2E5F;
}

.blog-home-v2 .header-account .btn.btn-outline-light.free-trl {
    color: #fff;
}

.blog-home-v2 .ast-mobile-header-wrap .menu-toggle,
.blog-home-v2 .ast-mobile-header-wrap .ast-mobile-svg {
    color: #1B2E5F;
    fill: #1B2E5F;
}

.blog-home-v2 #content > .ast-container {
    display: block;
    max-width: 1640px;
    padding: 0 20px;
}

.bh-wrap {
    width: 100%;
    padding: 0 0 40px;
    color: #33475B;
}

.bh-section-title {
    font-size: 40px;
    font-weight: 500;
    line-height: 1.2;
    color: #1B2E5F;
    margin: 0;
}

/* ----------------- hero ----------------- */
.bh-hero.h-blog {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 470px;
    border-radius: 16px;
    overflow: hidden;
    /* blog-bg.webp fades to white in its bottom third; scale by height so
       only the course/sky part shows behind the dark overlay. */
    background: url(../images/blog-bg.webp) no-repeat;
    text-align: center;
}

.bh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
}

.bh-hero-inner {
    position: relative;
    max-width: 860px;
    padding: 140px 20px 40px 20px;
}

.bh-hero-title {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 16px;
}

.bh-hero-desc {
    font-size: 21px;
    line-height: 1.4;
    color: #fff;
    margin: 0;
}

/* ----------------- categories ----------------- */
.bh-cats {
    display: flex;
    align-items: center;
    gap: 20px 60px;
    margin: 40px 0 0;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 12px;
}

.bh-cats-label {
    font-size: 24px;
    font-weight: 500;
    color: #181A2A;
    white-space: nowrap;
}

.bh-cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bh-cats-list li {
    margin: 0;
}

.bh-cat-pill {
    display: inline-block;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    color: #181A2A8A;
    background: #fff;
    border: 1px solid #007DB21A;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.bh-cat-pill:hover,
.bh-cat-pill:focus-visible {
    color: #1B2E5F;
    border-color: #1B2E5F;
}

.bh-cat-pill.is-active {
    color: #fff;
    background: #1B2E5F;
    border-color: #1B2E5F;
}

/* ----------------- latest blogs ----------------- */
.bh-latest {
    margin-top: 40px;
}

.bh-posts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-home-v2 .bh-card {
    display: flex;
    gap: 20px;
    padding: 18px;
    margin: 0;
    border-radius: 10px;
    box-shadow: none;
    background: linear-gradient(69.21deg, #FFFFFF 74.85%, #DBEFF9 94.08%);
    border: 1px solid #0003;
}

.bh-card-thumb {
    flex: 0 0 46%;
    display: block;
    aspect-ratio: 1200 / 628;
    overflow: hidden;
    background: #E6EAF0;
    align-self: flex-start;
}

.bh-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.bh-card:hover .bh-card-thumb img {
    transform: scale(1.04);
}

.bh-card-body {
    flex: 1;
    min-width: 0;
}

.bh-card-cat {
    display: inline-block;
    font-size: 14px;
    color: #D3393F;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 500;
    outline: none;
}

.bh-card-cat:hover {
    text-decoration: underline;
}

.bh-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    margin: 0 0 10px;
    outline: none;
}

.bh-card-title a {
    color: #1B2E5F;
    text-decoration: none;
}

.bh-card-title a:hover {
    color: #D3393F;
}

.bh-card-excerpt {
    font-size: 16px;
    line-height: 1.55;
    color: #33475B;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bh-empty {
    margin-top: 30px;
}

/* ----------------- pagination ----------------- */
.bh-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.bh-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 10px;
    font-size: 22px;
    color: #1B2E5F;
    background: #BFE3F7;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
}

.bh-pagination .page-numbers.current {
    color: #fff;
    background: #1B2E5F;
}

.bh-pagination .page-numbers.dots {
    background: transparent;
}

.bh-pagination .page-numbers.prev,
.bh-pagination .page-numbers.next {
    gap: 10px;
    padding: 0 20px;
    color: #fff;
    background: #D3393F;
    border-radius: 5px;
}

.bh-pagination .page-numbers.prev {
    margin-right: 40px;
}

.bh-pagination .page-numbers.next {
    margin-left: 40px;
}

.bh-pagination a.page-numbers:hover {
    background: #1B2E5F;
    color: #fff;
}

.bh-pagination .page-numbers.prev:hover,
.bh-pagination .page-numbers.next:hover {
    background: #b1282d;
}

/* ----------------- explore games ----------------- */
.bh-games {
    margin-top: 70px;
}

.bh-games-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.bh-games-all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    color: #1B2E5F;
    text-decoration: none;
}

.bh-games-all:hover {
    color: #D3393F;
}

.bh-games-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.bh-game {
    position: relative;
    display: block;
    aspect-ratio: 1 / 0.8;
    overflow: hidden;
    border-radius: 10px;
}

.bh-game img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.bh-game::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0.83%, #34461A 100%);
}

.bh-game:hover img {
    transform: scale(1.06);
}

.bh-game-name {
    position: absolute;
    left: 16px;
    right: 14px;
    bottom: 15px;
    z-index: 1;
    font-size: 24px;
    line-height: 1.2;
    color: #fff;
}

.bh-latest .format-standard .bh-card-thumb::after {
    content: "";
    background: linear-gradient(45deg, rgba(255, 255, 255, .12), transparent);
    transition: .3s ease-in-out;
    -webkit-transition: .4s ease-in-out;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    left: 0;
    transform: translateX(100%);
    display: block;
}

.bh-latest .format-standard:hover .bh-card-thumb::after {
    transform: translate(0);
}


/* ----------------- responsive ----------------- */
@media (max-width: 1200px) {
    .blog-home-v2 .bh-card {
        flex-direction: column;
    }

    .bh-card-thumb {
        flex-basis: auto;
        width: 100%;
    }

    .bh-games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 921px) {
    .bh-hero {
        min-height: 340px;
    }

    .bh-hero-title {
        font-size: 36px;
    }

    .bh-hero-desc {
        font-size: 18px;
    }

    .bh-section-title {
        font-size: 30px;
    }

    .bh-cat-pill {
        padding: 8px 12px;
        font-size: 15px;
    }
    .bh-cats-label {
        font-size: 22px;
    }
    .bh-posts {
        gap: 30px;
        margin-top: 20px;
    }
    .bh-pagination .page-numbers {
        padding: 0 10px;
        font-size: 16px;
    }


}

@media (max-width: 767px) {
    .blog-home-v2 #content > .ast-container {
        padding: 0 16px;
    }

    .bh-hero {
        min-height: 260px;
        border-radius: 12px;
    }

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

    .bh-hero-desc {
        font-size: 16px;
    }

    .bh-cats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        margin: 20px 0 0;
    }
    .bh-hero-inner {
        padding: 40px 20px 40px 20px;
    }
    #content.site-content {
        margin-top: 0;
    }
    .bh-cats-label {
        font-size: 18px;
    }

    .bh-cat-pill {
        font-size: 14px;
        padding: 7px 12px;
    }

    .bh-latest {
        margin-top: 30px;
    }

    .bh-section-title {
        font-size: 20px;
    }
.bh-games-all svg {
    width: 16px;
    height: 16px;
}
    .bh-posts {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 12px;
    }

    .blog-home-v2 .bh-card {
        padding: 14px;
    }

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

    .bh-pagination {
        gap: 8px;
    }
    
    .bh-pagination .page-numbers {
        min-width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .bh-pagination .page-numbers.prev,
    .bh-pagination .page-numbers.next {
        padding: 0 12px;
        margin: 0;
    }

    .bh-games {
        margin-top: 40px;
    }

    .bh-games-all {
        font-size: 14px;
    }

    .bh-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 20px;
    }

    .bh-game-name {
        font-size: 16px;
    }

.bh-cats-list {
    gap: 8px;
}
.bh-cat-pill {
    font-size: 12px;
    padding: 7px 8px;
}
.bh-cats-list {
    gap: 8px;
}
.bh-card-excerpt {
    font-size: 14px;
}
}
