/* 1. Header (Fixed Top - already in style.css, here we override background) */
header.inner-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* Ensure on top */
}

/* Make nav links dark on white header */
header.inner-header .main-nav a {
    color: #333;
}

header.inner-header .main-nav a:hover,
header.inner-header .main-nav a.active {
    color: var(--primary-color);
}

header.inner-header .main-nav a::after {
    bottom: -5px;
}


/* 
   2. FIXED BANNER AREA 
   User Requirement: "Sliding time fixed head and middle image, that is to say only slide words"
*/
:root {
    --banner-height: 200px;
}

.inner-banner {
    /* Dimensions */
    width: 100%;
    height: var(--banner-height);
    /* Fixed height as requested/set */

    /* 防止图片超出设定的高度 (比如设置了 height: 120% 的图片会被硬裁剪) */
    overflow: hidden;

    /* Fixed Positioning Logic */
    position: fixed;
    top: var(--header-height);
    /* Starts immediately after the 80px header */
    left: 0;
    z-index: 5;
    /* Lower than header (1000) but stays above default body */

    background-color: transparent;
    /* Changed from #f5f5f5 to avoid white/grey gap if image loads slowly or is smaller */
    display: block;
}

.inner-banner img {
    display: block;
    width: 100%;
    height: 120%;
    /* Fill the fixed container */
    object-fit: cover;
    /* Maintain aspect ratio */
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 10%;
    /* Left aligned as in image */
    transform: translateY(-50%);
    color: #fff;
    font-size: 32px;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Better readability on images */
    z-index: 10;
    pointer-events: none;
    letter-spacing: 5px;
}


/* 
   3. SCROLLABLE CONTENT AREA 
   Reverted to isolated box scroll: fixes sticky headings and avoids any body lock conflicts.
*/
.inner-content {
    /* Fixed container defining the scrollable viewport */
    position: fixed;
    top: calc(var(--header-height) + var(--banner-height));
    bottom: 0;
    left: 0;
    width: 100%;

    /* Enabled isolated scrolling within this block */
    overflow-y: auto;
    overflow-x: hidden;

    background-color: #fff;
    z-index: 4;

    /* Internal Padding - No top padding so sticky header works automatically */
    padding-top: 0;
    padding-bottom: 100px;
}

.inner-content .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.inner-content h1 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    font-weight: 400;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.inner-content p {
    font-size: 16px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 0px;
    margin-top: 0px;
    text-align: justify;
}


/* =========================================
   富文本容器修正
   ========================================= */
.inner-content .news-detail-container h1,
.inner-content .news-detail-container h2,
.inner-content .news-detail-container h3,
.inner-content .news-detail-container h4,
.inner-content .news-detail-container h5,
.inner-content .news-detail-container h6,
.inner-content .news-detail-container strong,
.inner-content .news-detail-container b,
.inner-content .news-detail-container em,
.inner-content .news-detail-container i,
.inner-content .news-detail-container pre,
.inner-content .news-detail-container ul,
.inner-content .news-detail-container ol,
.inner-content .news-detail-container li,
.inner-content .news-detail-container blockquote {
    all: revert;
}

/* 修正 revert 带来的系统自带的丑陋大边距，稍微收拢一点标题间隙 */
.inner-content .news-detail-container h1,
.inner-content .news-detail-container h2,
.inner-content .news-detail-container h3,
.inner-content .news-detail-container h4,
.inner-content .news-detail-container h5,
.inner-content .news-detail-container h6 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0;
    border-bottom: none;
    line-height: 1.4;
}

.rich-text-content {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    word-break: break-word;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4,
.rich-text-content h5,
.rich-text-content h6 {
    color: #333;
    line-height: 1.4;
    font-weight: 600;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0;
    border-bottom: none;
}

.rich-text-content h1 {
    font-size: 32px;
}

.rich-text-content h2 {
    font-size: 28px;
}

.rich-text-content h3 {
    font-size: 24px;
}

.rich-text-content h4 {
    font-size: 20px;
}

.rich-text-content h5 {
    font-size: 18px;
}

.rich-text-content h6 {
    font-size: 16px;
}

.rich-text-content p,
.rich-text-content div {
    margin-top: 0;
    margin-bottom: 0;
}

.rich-text-content strong,
.rich-text-content b {
    font-weight: 700;
}

.rich-text-content em,
.rich-text-content i {
    font-style: italic;
}

.rich-text-content u {
    text-decoration: underline;
}

.rich-text-content s,
.rich-text-content del {
    text-decoration: line-through;
}

.rich-text-content sub {
    vertical-align: sub;
    font-size: 75%;
}

.rich-text-content sup {
    vertical-align: super;
    font-size: 75%;
}

.rich-text-content ul,
.rich-text-content ol {
    margin: 0 0 1em 1.5em;
    padding-left: 1.5em;
}

.rich-text-content ul {
    list-style: disc;
}

.rich-text-content ol {
    list-style: decimal;
}

.rich-text-content li {
    display: list-item;
    margin: 0.25em 0;
}

.rich-text-content blockquote {
    margin: 1em 0;
    padding: 0.75em 1em;
    border-left: 4px solid var(--primary-color, #00baa4);
    background: #f7f9fb;
    color: #666;
}

.rich-text-content pre {
    margin: 1em 0;
    padding: 1em;
    overflow-x: auto;
    white-space: pre-wrap;
    background: #f5f5f5;
    border-radius: 6px;
    font-family: Consolas, "Courier New", monospace;
}

.rich-text-content code {
    font-family: Consolas, "Courier New", monospace;
}

.rich-text-content table {
    width: 100%;
    margin: 1em 0;
    border-collapse: collapse;
}

.rich-text-content th,
.rich-text-content td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.rich-text-content a {
    color: var(--secondary-color, #005eb8);
    text-decoration: underline;
}

.rich-text-content img,
.rich-text-content video,
.rich-text-content iframe {
    max-width: 100%;
    height: auto;
}

.rich-text-content img {
    display: block;
    margin: 1em auto;
}

.rich-text-content hr {
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid #e5e5e5;
}


/* 
   3.5 PAGE HEADING SECTION 
   Locked to the top of the scrollable inner-content viewport
*/
.page-heading {
    text-align: left;
    margin-bottom: 40px;
    padding-top: 25px !important;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);

    /* Sticky properties with premium glassmorphism effect */
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

/* Enforce guaranteed spacing below sticky header for ALL inner content containers */
.page-heading+.container {
    padding-top: 13px !important;
}

.section-main-title {
    font-size: 26px !important;
    color: #1a1a1a;
    font-weight: 500;
    letter-spacing: 2px;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    position: relative;
    padding-left: 20px;
    display: flex;
    align-items: center;
}

/* Premium accent bar matching brand color */
.section-main-title::before {
    content: "";
    position: absolute;
    left: 0;
    width: 4px;
    height: 75%;
    background: var(--primary-color, #00baa4);
    /* Using goldwind primary color */
    border-radius: 2px;
}


/* 
   4. FIXED FOOTER 
*/
.inner-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;

    z-index: 2000 !important;
    color: #333 !important;
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 15px 0;

    text-align: center;
    pointer-events: auto;
}

.inner-footer a {
    color: #333 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.inner-footer p {
    margin: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 
   ========================================
   RESPONSIVE DESIGN (Inner Pages)
   ========================================
*/
@media (max-width: 1024px) {
    :root {
        --banner-height: 160px;
    }

    header.inner-header {
        height: 60px;
    }

    .banner-text {
        font-size: 18px;
        left: 5%;
        width: 90%;
        line-height: 1.3;
    }

    .inner-content {
        padding-top: 0;
        padding-bottom: 140px;
        /* 特意留出极大的安全区以避开移动端换行的多行页脚 */
    }

    .inner-content .container {
        padding: 0 15px;
    }

    .inner-content h1 {
        font-size: 22px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .section-main-title {
        font-size: 18px !important;
    }

    .inner-content p {
        font-size: 14px;
        line-height: 1.6;
    }

    .inner-footer {
        padding: 10px 0;
        font-size: 10px;
    }

    .inner-footer p {
        flex-direction: column;
        gap: 5px;
    }
}

/* 
   ========================================
   LANDSCAPE / SHORT SCREEN OPTIMIZATION
   ========================================
   When height is < 620px (e.g. mobile landscape mode), 
   the viewport is too short for fixed-position containers. 
   We revert to standard native document flow scrolling.
*/
@media (max-height: 620px) {

    /* Only allow native scrolling if the mobile navigation menu is NOT open */
    html:not(:has(.nav-active)) {
        overflow-y: auto !important;
    }

    body.inner-page:not(:has(.nav-active)) {
        overflow: auto !important;
        height: auto !important;
    }

    .inner-banner {
        position: relative !important;
        top: 0 !important;
        margin-top: 60px;
        /* equivalent to mobile header height */
        height: min(150px, 40vh);
        /* further shrink banner */
    }

    .inner-content {
        position: relative !important;
        top: 0 !important;
        bottom: auto !important;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 50px !important;
    }

    .page-heading {
        top: 60px !important;
        /* adhere correctly under the mobile header */
    }

    .inner-footer {
        position: relative !important;
        bottom: auto !important;
        margin-top: 0;
    }
}
