/**
 * 银龄在线门户 — 设计稿参考主题层
 * 仅覆盖门户视觉，不修改 CMS 数据逻辑。加载顺序：在 components.css / home.css 之后。
 */

/* ========= 页面基底 ========= */

body.portal-home,
body.portal-page {
    background: var(--portal-page-bg, #ffffff) !important;
}

.portal-home .scroll-wrapper {
    background: var(--portal-page-bg, #ffffff);
}

/* ========= 双层顶栏 ========= */

.site-header--portal {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    border-bottom: none;
    box-shadow: none;
    background: transparent;
}

.site-header--portal .header-top-bar {
    background: transparent;
    border-bottom: none;
}

/* 顶部快速入口栏 */
.site-header--portal .header-utility-bar {
    background: transparent;
    border-bottom: none;
}

.site-header--portal .header-utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 32px;
    padding: 4px var(--layout-page-padding, 16px);
    max-width: var(--layout-container-max, var(--layout-content-max, 1200px));
    margin: 0 auto;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.site-header--portal .header-quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 28px;
    min-width: 0;
}

.site-header--portal .header-quick-links a {
    color: #666;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.site-header--portal .header-quick-links a:hover,
.site-header--portal .header-quick-links a:focus-visible {
    color: var(--portal-nav-bg, #c30d23);
}

.site-header--portal .header-utility-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 16px;
}

.site-header--portal .header-utility-actions .top-nav-action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    font-size: 14px;
}

.site-header--portal .header-utility-actions .top-nav-action-text,
.site-header--portal .header-utility-actions .top-nav-action-text a {
    color: #666;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}

.site-header--portal .header-utility-actions .top-nav-action-text:hover,
.site-header--portal .header-utility-actions .top-nav-action-text a:hover {
    color: var(--portal-nav-bg, #c30d23);
}

.site-header--portal .header-utility-actions .top-nav-action-item img {
    width: 14px;
    height: 14px;
}

.site-header--portal .header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--layout-page-padding, 24px);
    gap: 16px;
    max-width: var(--layout-container-max, var(--layout-content-max, 1200px));
    margin: 0 auto;
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.site-header--portal .site-brand {
    flex-shrink: 0;
}

.site-header--portal .brand-logo {
    width: 280px;
    height: 72px;
}

.site-header--portal .header-top-tools {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 设计稿：白色搜索框 */
.portal-search-form {
    display: flex;
    align-items: stretch;
    height: 36px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.portal-search-input {
    border: none;
    outline: none;
    padding: 0 12px;
    width: 220px;
    font-size: 16px;
}

.portal-search-btn {
    border: none;
    background: var(--portal-nav-bg, #c30d23) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") center / 18px no-repeat;
    color: transparent;
    width: 36px;
    min-width: 36px;
    padding: 0;
    font-size: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.portal-search-btn:hover {
    background-color: var(--portal-nav-bg-hover, #a80a1c);
}

.portal-home .ph-hero {
    padding-top: 16px;
}

.site-header--portal .top-nav-actions {
    gap: 8px;
}

.site-header--portal .top-nav-action-item {
    padding: 4px 8px;
}

.site-header--portal .top-search-toggle {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--portal-nav-bg, #c30d23) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.site-header--portal .top-search-toggle:hover,
.site-header--portal .top-search-toggle:focus-visible {
    background-color: var(--portal-nav-bg-hover, #a80a1c);
}

/* 红色主导航条：背景全宽，文字区域与主体同宽居中（对齐 ph-policy-panel-head 高度） */
.site-header--portal .header-main-nav {
    width: 100%;
    background: var(--portal-nav-bg, #c30d23);
}

.site-header--portal .header-main-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 var(--layout-page-padding, 16px);
    min-height: 42px;
    width: 100%;
    max-width: var(--layout-container-max, var(--layout-content-max, 1200px));
    margin: 0 auto;
    background: transparent;
    box-sizing: border-box;
}

.site-header--portal .header-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    width: auto;
}

.site-header--portal .header-nav-separator {
    display: none;
}

.site-header--portal .header-nav-link {
    color: #fff;
    font-size: 1rem;
    padding: 12px 14px;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
    transform: none;
}

.site-header--portal .header-nav-link:hover,
.site-header--portal .header-nav-link:focus-visible,
.site-header--portal .header-nav-link[aria-current="true"] {
    color: #fff;
    background: rgba(0, 0, 0, 0.12);
    font-weight: 500;
    transform: none;
}

.site-header--portal .header-nav-item::after {
    display: none;
}

.site-header--portal .nav-dropdown {
    top: 100%;
    border-top: 2px solid var(--portal-nav-bg, #c30d23);
}

.site-header--portal .header-nav-item:hover .nav-dropdown,
.site-header--portal .header-nav-item:focus-within .nav-dropdown {
    margin-top: 0;
}

/* ========= 首屏：新闻轮播 + 公告（参考设计） ========= */

.portal-home .activity-section {
    display: none;
}

.portal-home .main-background-section {
    background: none;
    min-height: 0;
    padding-top: var(--space-md, 24px);
}

.portal-home .main-background-container {
    padding-top: 0;
}

.portal-home .red-news-section.is-modern {
    margin-top: 0;
    padding-top: 0;
}

.portal-home .red-news-section.is-modern .red-news-layout {
    min-height: 360px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.portal-home .red-news-section.is-modern .red-news-title {
    color: var(--portal-nav-bg, #c30d23);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    text-shadow: none;
}

.portal-home .red-news-section.is-modern .red-news-panel {
    background: #fafafa;
}

.portal-home .red-news-section.is-modern .red-news-tab.is-active {
    background: var(--portal-nav-bg, #c30d23);
    color: #fff;
}

/* ========= 模块标题：蓝竖线 + 横排（部分区块） ========= */

.portal-home .guoqing-section .normal-card-title,
.portal-home .action-section .normal-card-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-left: 12px;
    border-left: 4px solid var(--portal-accent-blue, #1677ff);
    align-items: center;
}

.portal-home .guoqing-section .normal-card-title .title,
.portal-home .action-section .normal-card-title .title {
    color: var(--color-text, #333);
    font-size: var(--font-title-md, 2rem);
    width: auto;
    line-height: 1.3;
    text-shadow: none;
    writing-mode: horizontal-tb;
    white-space: nowrap;
}

.portal-home .guoqing-section .normal-card-title .title br,
.portal-home .action-section .normal-card-title .title br {
    display: none;
}

/* ========= 页脚（ylzx 全站，portal-theme 仅门户引用） ========= */

.site-footer {
    background: transparent;
    color: #333;
}

.site-footer .footer-main {
    background: #FBF8F5;
    padding: 0;
}

.site-footer .footer-main ._link {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    left: auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.site-footer .footer-main .footer-links .footer-link {
    color: #0D0D0D;
    text-decoration: none;
}

.site-footer .footer-main .footer-links .footer-link:hover {
    color: #e60012;
    text-decoration: none;
}

.site-footer .footer-main ._list li a {
    color: #0D0D0D;
    text-decoration: none;
}

.site-footer .footer-main ._list li a:hover {
    color: #0D0D0D;
    text-decoration: none;
}

.site-footer .footer-section-title {
    color: #333;
}

.site-footer .footer-bottom-line {
    color: #666;
}

.site-footer .footer-bottom-line a {
    color: #666;
    text-decoration: none;
}

.site-footer .footer-bottom-line a:hover {
    color: #666;
    text-decoration: underline;
}

/* ========= 设计稿截图微调：更紧凑的头部 ========= */

.site-header--portal .header-top-inner {
    max-width: var(--layout-content-max, 1200px);
    min-height: 62px;
    padding: 8px 16px;
}

.site-header--portal .brand-logo {
    width: 220px;
    height: 56px;
    object-fit: contain;
}

.portal-search-form {
    height: 30px;
    border-radius: 0;
}

.portal-search-input {
    width: 190px;
    font-size: 14px;
}

.portal-search-btn {
    padding: 0;
    width: 36px;
    min-width: 36px;
    font-size: 0;
}

.site-header--portal .top-nav-action-item {
    padding: 0 4px;
    font-size: 14px;
}

.site-header--portal .top-nav-action-item img {
    width: 16px;
    height: 16px;
}

.site-header--portal .header-main-nav-inner {
    max-width: var(--layout-container-max, var(--layout-content-max, 1200px));
    margin: 0 auto;
    min-height: 42px;
}

.site-header--portal .header-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.site-header--portal .header-nav-link {
    flex: 1 1 auto;
    padding: 10px 6px;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
}


/* ========= 响应式 ========= */

@media (max-width: 1199px) {
    .site-header--portal .brand-logo {
        width: 200px;
        height: 56px;
    }

    .site-header--portal .header-main-nav-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .site-header--portal .header-nav {
        flex-wrap: nowrap;
    }

    .site-header--portal .header-nav-link {
        font-size: 15px;
        padding: 10px 12px;
    }
}

@media (max-width: 767px) {
    .site-header--portal .header-utility-inner {
        flex-wrap: wrap;
        padding: 6px 16px;
        gap: 8px;
    }

    .site-header--portal .header-quick-links {
        gap: 0 16px;
    }

    .site-header--portal .header-top-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 16px;
    }

    .site-header--portal .header-top-tools {
        width: 100%;
        justify-content: space-between;
    }

    .portal-home .red-news-section.is-modern .red-news-layout {
        min-height: 0;
    }
}
