/*
Theme Name: Haiwang Blog
Theme URI: https://haiwangweb.com/
Author: Haiwang
Description: WordPress blog theme using Haiwang site header and footer.
Version: 1.0.0
Text Domain: haiwang-blog
*/

body.haiwang-blog {
    background: #f6f8fb;
}

.haiwang-site-header {
    background: #fff;
    position: relative;
    z-index: 100;
}

.haiwang-promo-bar {
    height: 44px;
    background: #1477f8;
    color: #fff;
}

.haiwang-promo-inner {
    max-width: 1260px;
    height: 44px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    position: relative;
}

.haiwang-promo-text {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 44px;
    white-space: nowrap;
}

.haiwang-promo-text:hover {
    color: #fff;
    opacity: .92;
}

.haiwang-promo-button {
    min-width: 134px;
    height: 36px;
    padding: 0 24px;
    border-radius: 4px;
    background: #fff;
    color: #f04663;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    line-height: 36px;
}

.haiwang-promo-button:hover {
    color: #f04663;
    background: #fff;
    opacity: .95;
}

.haiwang-promo-close {
    position: absolute;
    right: -16px;
    top: 0;
    height: 44px;
    width: 44px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .45);
    font-size: 30px;
    line-height: 44px;
    font-weight: 300;
}

.haiwang-main-nav {
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.haiwang-nav-inner {
    height: 82px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) auto;
    align-items: center;
    gap: 34px;
}

.haiwang-brand-wrap,
.haiwang-brand {
    display: flex;
    align-items: center;
}

.haiwang-brand {
    padding: 0;
    margin: 0;
}

.haiwang-brand img {
    width: 164px;
    max-height: 58px;
    object-fit: contain;
}

.haiwang-nav-toggle,
.haiwang-nav-close {
    display: none;
}

.haiwang-nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.haiwang-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.haiwang-nav-list > li {
    display: flex;
    align-items: center;
}

.haiwang-nav-list > li > a {
    color: #141827;
    font-size: 13px;
    font-weight: 700;
    line-height: 82px;
    white-space: nowrap;
    padding: 0;
}

.haiwang-nav-list > li > a:hover,
.haiwang-nav-list > li.active > a {
    color: #1477f8;
}

.haiwang-promotion-link {
    position: relative;
    gap: 4px;
    display: inline-flex;
    align-items: center;
}

.haiwang-hot-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff4f4f;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
}

.haiwang-rebate-badge {
    position: absolute;
    top: 11px;
    left: 28px;
    min-width: 66px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ff4f5f;
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: 800;
}

.haiwang-nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.haiwang-login,
.haiwang-register {
    min-width: 88px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 40px;
}

.haiwang-login {
    background: #1d2646;
}

.haiwang-register {
    background: #0787ff;
}

.haiwang-lang {
    position: relative;
}

.haiwang-lang > a.lang-switch-a {
    height: 38px;
    padding: 0 13px;
    border: 1px solid #aeb4c0;
    border-radius: 4px;
    color: #232838;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.haiwang-lang .dropdown-menu {
    min-width: 128px;
    top: 100%;
    right: 0;
    left: auto;
    padding: 6px 0;
}

.haiwang-lang .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.haiwang-lang .dropdown-menu img {
    width: 17px;
    height: 17px;
}

.haiwang-blog .overlay-screen {
    display: none;
}

/* Blog and archive pages */
.haiwang-blog-section,
.haiwang-archive-page {
    background: #f7f9ff;
    padding: 76px 0 90px;
}

.haiwang-archive-container {
    max-width: 1180px;
}

.haiwang-page-heading {
    max-width: 860px;
    margin-bottom: 42px;
}

.haiwang-page-heading h1 {
    color: #0c266c;
    font-size: 42px;
    line-height: 1.25;
    margin-bottom: 12px;
    font-weight: 900;
}

.haiwang-page-heading p {
    color: #6d7493;
    font-size: 18px;
    margin: 0;
}

.haiwang-blog-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.haiwang-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.haiwang-category-tabs a {
    align-items: center;
    background: #fff;
    border: 1px solid #dde6ff;
    border-radius: 999px;
    color: #27315f;
    display: inline-flex;
    font-weight: 700;
    height: 40px;
    padding: 0 17px;
}

.haiwang-category-tabs a:hover,
.haiwang-category-tabs a.active {
    background: #1477f8;
    border-color: #1477f8;
    color: #fff;
}

.haiwang-search-form {
    display: flex;
    gap: 10px;
    width: 100%;
}

.haiwang-search-form input {
    background: #fff;
    border: 1px solid #dde6ff;
    border-radius: 8px;
    flex: 1;
    height: 48px;
    min-width: 0;
    padding: 0 14px;
}

.haiwang-search-form button {
    background: #1477f8;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
    padding: 0 20px;
}

.haiwang-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.haiwang-post-card {
    background: #fff;
    border: 1px solid #e7ebf4;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(31, 42, 79, .07);
    color: #172033;
    display: block;
    overflow: hidden;
}

.haiwang-post-card:hover {
    color: #172033;
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(31, 42, 79, .11);
}

.haiwang-post-card-image {
    aspect-ratio: 16 / 9;
    background: #eef3fb;
    overflow: hidden;
    position: relative;
}

.haiwang-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.haiwang-post-card-image span {
    position: absolute;
    left: 14px;
    top: 14px;
    background: rgba(20, 119, 248, .94);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    padding: 7px 11px;
}

.haiwang-post-card-body {
    padding: 23px 24px 22px;
}

.haiwang-post-card-body h2 {
    color: #101828;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.38;
    margin: 0 0 12px;
}

.haiwang-post-card-body p {
    color: #667085;
    line-height: 1.76;
    margin-bottom: 18px;
}

.haiwang-post-card-meta {
    color: #7d879a;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 14px;
}

.haiwang-archive-pagination {
    margin-top: 34px;
}

.haiwang-archive-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.haiwang-archive-pagination .page-numbers {
    align-items: center;
    background: #fff;
    border: 1px solid #e1e6f5;
    border-radius: 8px;
    color: #27315f;
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    min-width: 42px;
    padding: 0 14px;
}

.haiwang-archive-pagination .page-numbers.current,
.haiwang-archive-pagination .page-numbers:hover {
    background: #1477f8;
    border-color: #1477f8;
    color: #fff;
}

.haiwang-empty {
    background: #fff;
    border: 1px solid #e8ebf4;
    border-radius: 8px;
    color: #6d7493;
    font-size: 18px;
    padding: 40px;
    text-align: center;
}

.haiwang-breadcrumb {
    color: #6f7892;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
}

.haiwang-breadcrumb a,
.haiwang-breadcrumb span {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
}

.haiwang-archive-hero {
    background: linear-gradient(135deg, #1477f8 0%, #4da7ff 100%);
    color: #fff;
    margin: -76px 0 44px;
    padding: 86px 0 76px;
}

.haiwang-archive-hero .haiwang-breadcrumb,
.haiwang-archive-hero .haiwang-breadcrumb a,
.haiwang-archive-hero .haiwang-breadcrumb span {
    color: rgba(255, 255, 255, .88);
    justify-content: center;
}

.haiwang-archive-hero h1 {
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 auto;
    max-width: 840px;
    text-align: center;
}

.haiwang-archive-hero p {
    color: rgba(255, 255, 255, .88);
    font-size: 17px;
    line-height: 1.75;
    margin: 16px auto 0;
    max-width: 720px;
    text-align: center;
}

.haiwang-category-filter-section {
    background: #fff;
    border-bottom: 1px solid #e8ebf4;
    margin: -76px 0 34px;
    padding: 54px 0 30px;
}

.haiwang-category-filter-section .haiwang-page-heading {
    margin-bottom: 24px;
}

.haiwang-search-hero .haiwang-search-form {
    background: rgba(255, 255, 255, .95);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(10, 32, 92, .14);
    margin: 28px auto 0;
    max-width: 620px;
    padding: 8px;
}

.haiwang-search-hero .haiwang-search-form input {
    border: 0;
}

.haiwang-search-empty {
    max-width: 760px;
    margin: 0 auto;
}

.haiwang-search-empty h2 {
    color: #050b22;
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 14px;
}

.haiwang-search-empty p {
    color: #5f6b86;
    font-size: 16px;
    line-height: 1.8;
    margin: 0 0 24px;
}

.haiwang-search-empty a {
    align-items: center;
    background: #1477f8;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 44px;
    justify-content: center;
    padding: 0 20px;
}

/* Single post page */
.single-post-page {
    background: #f8fafc;
    padding: 72px 0 88px;
}

.haiwang-single-container {
    max-width: 1040px;
}

.haiwang-single-shell,
.haiwang-single-container > .haiwang-breadcrumb,
.haiwang-single-hero,
.haiwang-single-cover,
.haiwang-single-entry-card {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.haiwang-single-hero {
    margin-bottom: 26px;
}

.haiwang-single-kicker {
    align-items: center;
    background: #eef5ff;
    border-radius: 999px;
    color: #1477f8;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 14px;
    padding: 8px 12px;
}

.haiwang-single-hero h1 {
    color: #101828;
    font-size: clamp(31px, 3.2vw, 44px);
    font-weight: 900;
    line-height: 1.28;
    margin-bottom: 14px;
}

.haiwang-single-meta {
    color: #667085;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.haiwang-single-meta a {
    color: #344054;
}

.haiwang-single-cover {
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.haiwang-single-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.haiwang-single-entry-card {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    padding: 34px 42px;
}

.haiwang-single-content {
    color: #344054;
    font-size: 17px;
    line-height: 1.9;
    max-width: 740px;
}

.haiwang-single-content p {
    margin-bottom: 20px;
}

.haiwang-single-content h1,
.haiwang-single-content h2,
.haiwang-single-content h3,
.haiwang-single-content h4,
.haiwang-single-content h5 {
    color: #101828;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.42;
}

.haiwang-single-content h2 {
    border-left: 4px solid #1477f8;
    font-size: 23px;
    margin: 30px 0 14px;
    padding-left: 14px;
}

.haiwang-single-content h3 {
    font-size: 20px;
    margin: 26px 0 12px;
}

.haiwang-single-content ul,
.haiwang-single-content ol {
    list-style: none !important;
    margin: 0 0 22px;
    padding-left: 2em !important;
}

.haiwang-single-content ol {
    counter-reset: haiwang-post-ordered-list;
}

.haiwang-single-content li {
    display: block !important;
    font-size: 16px;
    line-height: 1.82;
    margin-bottom: 8px;
    padding-left: 1.9em !important;
    position: relative;
}

.haiwang-single-content ul > li::before {
    color: #667085;
    content: "·";
    font-weight: 900;
    left: .45em;
    position: absolute;
    top: 0;
}

.haiwang-single-content ol > li {
    counter-increment: haiwang-post-ordered-list;
}

.haiwang-single-content ol > li::before {
    color: #667085;
    content: counter(haiwang-post-ordered-list) ".";
    font-weight: 800;
    left: .15em;
    position: absolute;
    text-align: right;
    top: 0;
    width: 1.25em;
}

.haiwang-single-content blockquote {
    background: #f7f9ff;
    border: 1px solid #e5ebff;
    border-left: 4px solid #1477f8;
    border-radius: 8px;
    margin: 28px 0;
    padding: 18px 22px;
}

.haiwang-single-content img {
    border-radius: 8px;
    height: auto;
    max-width: 100%;
}

.haiwang-single-notice {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #edf1f7;
    border-radius: 8px;
    color: #667085;
    display: flex;
    gap: 12px;
    line-height: 1.7;
    margin: 34px auto 0;
    max-width: 740px;
    padding: 14px 16px;
}

.haiwang-single-notice strong {
    color: #101828;
    flex: 0 0 auto;
    font-size: 14px;
}

.haiwang-post-nav,
.haiwang-related-posts {
    max-width: 860px;
    margin: 34px auto 0;
}

.haiwang-post-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.haiwang-post-nav-card {
    background: #fff;
    border: 1px solid #e7ebf4;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(31, 42, 79, .07);
    color: #101828;
    display: grid;
    gap: 7px;
    overflow: hidden;
    padding-bottom: 18px;
}

.haiwang-post-nav-card img {
    aspect-ratio: 16 / 7;
    object-fit: cover;
    width: 100%;
}

.haiwang-post-nav-card span,
.haiwang-post-nav-card time {
    color: #667085;
    font-size: 13px;
    padding: 0 18px;
}

.haiwang-post-nav-card strong {
    color: #101828;
    font-size: 17px;
    line-height: 1.45;
    padding: 0 18px;
}

.haiwang-post-nav-card.is-next {
    text-align: right;
}

.haiwang-related-posts h2 {
    color: #101828;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 18px;
}

@media (max-width: 991px) {
    .haiwang-promo-inner {
        justify-content: flex-start;
        gap: 12px;
        overflow: hidden;
    }

    .haiwang-promo-text {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }

    .haiwang-promo-button {
        display: none;
    }

    .haiwang-promo-close {
        right: 0;
    }

    .haiwang-nav-inner {
        height: 70px;
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }

    .haiwang-brand img {
        width: 145px;
    }

    .haiwang-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        color: #1d2646;
        font-size: 22px;
    }

    .haiwang-nav-menu {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        padding: 72px 24px 24px;
        background: #fff;
        box-shadow: -16px 0 32px rgba(20, 34, 66, .16);
        align-items: flex-start;
        justify-content: flex-start;
        transition: right .24s ease;
        z-index: 1002;
    }

    .haiwang-nav-menu.show {
        right: 0;
    }

    .haiwang-nav-close {
        display: inline-flex;
        position: absolute;
        right: 18px;
        top: 18px;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: #1d2646;
        font-size: 22px;
    }

    .haiwang-nav-list {
        width: 100%;
        display: block;
    }

    .haiwang-nav-list > li > a {
        width: 100%;
        line-height: 48px;
        border-bottom: 1px solid #edf1f6;
    }

    .haiwang-nav-actions {
        gap: 10px;
    }

    .haiwang-login,
    .haiwang-register {
        min-width: 68px;
        height: 36px;
        font-size: 13px;
    }

    .haiwang-lang {
        display: none;
    }

    .haiwang-blog .overlay-screen.opened {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .42);
        z-index: 1001;
    }

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

    .haiwang-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .haiwang-post-nav {
        grid-template-columns: 1fr;
    }

    .haiwang-post-nav-card.is-next {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .haiwang-blog-section,
    .haiwang-archive-page {
        padding: 48px 0 64px;
    }

    .haiwang-page-heading h1,
    .haiwang-archive-hero h1 {
        font-size: 32px;
    }

    .haiwang-card-grid {
        grid-template-columns: 1fr;
    }

    .haiwang-search-form {
        flex-direction: column;
    }

    .haiwang-search-form button {
        height: 46px;
    }

    .haiwang-archive-hero {
        margin-top: -48px;
        padding: 58px 0 52px;
    }

    .haiwang-category-filter-section {
        margin-top: -48px;
        padding-top: 42px;
    }

    .single-post-page {
        padding: 46px 0 64px;
    }

    .haiwang-single-entry-card {
        padding: 26px 20px;
    }

    .haiwang-single-hero h1 {
        font-size: 30px;
    }

    .haiwang-single-meta {
        gap: 6px;
    }
}
