/**
 * DWTJ Global Layout
 * Hide default WordPress / GeneratePress page title area for all Pages.
 * Template pages use their own H1 inside custom layout.
 */

body.page .site-main > article > .inside-article > header,
body.page .site-main > article > .inside-article > .entry-header,
body.page .site-main > article > .inside-article > .page-header,
body.page .site-main > article > .inside-article header.entry-header,
body.page .site-main > article > .inside-article header.page-header,
body.page .entry-header,
body.page .page-header,
body.page .inside-article > header {
    display: none !important;
}

/* 不用 display:none 隐藏 H1；由 generate_show_title 在 PHP 层禁用 GP 默认标题 */

body.page .inside-article,
body.page .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page .entry-content > .dwtj-core-page:first-child,
body.page .inside-article > .dwtj-core-page:first-child {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   全站导航（GeneratePress header）— 桌面端单行、Logo 与菜单尺寸统一
   -------------------------------------------------------------------------- */
.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e9e9ee;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 20;
}

.main-navigation .main-nav ul li a,
.main-navigation .main-nav ul li a:visited {
    color: #111111;
    font-weight: 700;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
    color: #e3182f;
}

.main-navigation,
.main-navigation ul ul {
    background: transparent !important;
}

@media (min-width: 769px) {
    .site-header,
    .main-navigation,
    .inside-header {
        box-sizing: border-box;
    }

    .inside-header {
        max-width: 1180px;
        margin: 0 auto;
        padding: 12px 20px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 28px;
        flex-wrap: nowrap;
    }

    .site-logo,
    .site-branding,
    .site-branding-container {
        flex: 0 0 auto;
        margin-bottom: 0 !important;
        max-width: 210px;
    }

    .site-logo a {
        display: block;
        line-height: 0;
    }

    .site-logo img,
    .site-header .header-image,
    .site-header .is-logo-image,
    .custom-logo {
        width: auto !important;
        max-width: 210px !important;
        max-height: 58px !important;
        height: auto !important;
        display: block;
    }

    .nav-float-right .inside-header .main-navigation,
    .nav-float-left .inside-header .main-navigation,
    #site-navigation {
        float: none;
        clear: none;
    }

    .main-navigation,
    #site-navigation {
        flex: 1 1 auto;
        min-width: 0;
    }

    .main-navigation .inside-navigation {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    .main-navigation .main-nav > ul,
    .main-navigation .main-nav > ul.menu {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0;
        white-space: nowrap;
        float: none;
        letter-spacing: normal;
    }

    .main-navigation .main-nav ul li,
    .main-navigation .main-nav > ul > li {
        flex: 0 0 auto;
        float: none;
        display: block;
    }

    .main-navigation .main-nav ul li a {
        padding-left: 13px;
        padding-right: 13px;
        font-size: 15px;
        line-height: 56px;
        white-space: nowrap;
    }
}

@media (min-width: 769px) and (max-width: 1280px) {
    .site-logo,
    .site-branding {
        max-width: 190px;
    }

    .site-logo img,
    .site-header .header-image,
    .site-header .is-logo-image,
    .custom-logo {
        max-width: 190px !important;
        max-height: 52px !important;
    }

    .inside-header {
        gap: 20px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .main-navigation .main-nav ul li a {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .inside-header {
        padding: 12px 20px;
    }

    .custom-logo,
    .site-header .header-image,
    .site-logo img {
        max-width: 170px;
        height: auto;
    }
}

/* --------------------------------------------------------------------------
   核心页统一浅色页脚（8 个 PG 专题页），与 GeneratePress 默认版权条分离；首页使用自带 footer 不在此列
   -------------------------------------------------------------------------- */
body.dwtj-core-footer-active .site-info {
    display: none !important;
}

body.dwtj-core-footer-active .site-footer {
    background: #f8fafc;
}

.dwtj-core-footer {
    width: 100%;
    box-sizing: border-box;
    padding: 28px 20px 32px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid #e5e7eb;
}

.dwtj-core-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 24px 28px;
    align-items: start;
}

.dwtj-core-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dwtj-core-footer-brand-name {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.dwtj-core-footer-brand-tag {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.04em;
}

.dwtj-core-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-content: start;
}

.dwtj-core-footer-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dwtj-core-footer-nav a:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.dwtj-core-footer-safe p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #475569;
}

.dwtj-core-footer-bottom {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}

.dwtj-core-footer-copy {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 900px) {
    .dwtj-core-footer-inner {
        grid-template-columns: 1fr;
    }

    .dwtj-core-footer-nav {
        justify-content: flex-start;
    }

    .dwtj-core-footer-bottom {
        margin-top: 8px;
    }
}

.site-footer .site-info .copyright-bar {
    max-width: 100%;
    overflow-x: hidden;
}

.dwtj-footer-copy {
    box-sizing: border-box;
    max-width: 40rem;
    margin: 0 auto;
    padding: 14px 20px 18px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    line-height: 1.75;
    word-break: break-word;
}

.dwtj-footer-copy p {
    margin: 0 0 6px;
}

.dwtj-footer-copy p:last-child {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .dwtj-footer-copy {
        padding: 12px 16px 16px;
        font-size: 12px;
        line-height: 1.7;
    }
}

