/* ============================================
   光明区规范性文件栏目 - 统一样式表
   主色调：#d5e5fa，扁平化设计
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* background-color: #f0f4f9; */
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #1f2d3d;
    line-height: 1.5;
}



.gfx-main-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.gfx-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: visible !important;
}

/* ========= 一级 Tab ========= */
.gfx-tab-primary {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0 1.5rem;
    border-bottom: 1px solid #e9edf2;
    background: #fff;
}

.gfx-tab-pri-item {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 1.2rem;
    color: #4a5b6e;
    text-decoration: none;
    border-radius: 30px 30px 0 0;
    transition: all 0.2s;
}

.gfx-tab-pri-item.active {
    background-color: #d5e5fa;
    color: #0a5b8c;
    font-weight: 600;
    border-bottom: 2px solid #2c7cb6;
}

.gfx-tab-pri-item:not(.active):hover {
    background-color: #eef3fc;
    color: #2c7cb6;
}

/* ========= 二级 Tab ========= */
.gfx-tab-secondary {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem 0.5rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
}

.gfx-tab-sec-item {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    color: #3e5a76;
    text-decoration: none;
    transition: all 0.2s;
}

.gfx-tab-sec-item.active {
    background-color: #d5e5fa;
    color: #005a8c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gfx-tab-sec-item:hover:not(.active) {
    background-color: #e9f0f9;
}

/* ========= 搜索区域 ========= */
.gfx-search-area {
    background-color: #f9fbfd;
    margin: 1.5rem 1.5rem 1.5rem 1.5rem;
    padding: 1.25rem 1rem;
    border-radius: 28px;
    border: 1px solid #e2e9f2;
}

.gfx-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    justify-content: center;
}

.gfx-search-field {
    flex: 1;
    min-width: 180px;
}

.gfx-search-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #2c3e50;
}

.gfx-search-field input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #cbdae9;
    border-radius: 40px;
    font-size: 0.9rem;
    transition: 0.2s;
    background: #fff;
}

.gfx-search-field input:focus {
    outline: none;
    border-color: #2c7cb6;
    box-shadow: 0 0 0 3px rgba(44, 124, 182, 0.1);
}

.gfx-search-action {
    display: flex;
    align-items: center;
}

.gfx-btn {
    border: none;
    background: #eef2f7;
    padding: 0.6rem 1.6rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.gfx-btn-primary {
    background-color: #2c7cb6;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gfx-btn-primary:hover {
    background-color: #1f6392;
    transform: translateY(-1px);
}

/* ========= 列表样式 ========= */
.gfx-list-wrapper {
    padding: 0 1.5rem 2rem 1.5rem;
}

.gfx-list-header {
    display: flex;
    background-color: #d5e5fa;
    border-radius: 16px;
    padding: 0.9rem 0.5rem;
    font-weight: 600;
    color: #1a4b6e;
    margin-bottom: 0.5rem;
}

.gfx-list-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding: 1rem 0.5rem;
    transition: background 0.15s;
    position: relative;
}

.gfx-list-item:hover {
    background-color: #fafcff;
}

.col-number {
    width: 8%;
    text-align: center;
    font-weight: 500;
    color: #4f6f8f;
}

.col-name {
    width: 48%;
    padding: 0 0.5rem;
    position: relative;
}

.col-date,
.col-wh {
    width: 18%;
    text-align: center;
    font-size: 0.9rem;
}

.article-link {
    text-decoration: none;
    color: #1f3b4c;
    font-weight: 500;
    transition: color 0.2s;
}

.article-link:hover {
    color: #2c7cb6;
    text-decoration: underline;
}

/* ========= 悬浮卡片（核心修复） ========= */
.article-hover-card {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    width: 360px;
    max-width: 85vw;
    padding: 12px 16px;
    border: 1px solid #dee6ef;
    margin-top: 6px;
}

/* 鼠标悬停时显示卡片 */
.gfx-list-item:hover .article-hover-card {
    display: block;
}

/* 如果卡片超出右侧屏幕，可选用JS动态调整，但纯CSS不做溢出处理，用户可滚动 */
.hover-card-inner p {
    margin: 8px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #2d4259;
}

.hover-card-inner strong {
    color: #1f6392;
}

.full-title {
    background: #f5f9fe;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 8px 0;
}

/* 修复悬浮卡片被裁剪问题 */
.gfx-list-wrapper,
.gfx-list-table,
.gfx-list-body,
.gfx-list-item {
    overflow: visible !important;
}

/* ========= 分页样式 ========= */
.gfx-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.gfx-page-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    background: #f4f8fc;
    color: #2c5a7a;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid #e2e9f2;
}

.gfx-page-link:hover {
    background-color: #d5e5fa;
    border-color: #bdd4eb;
}

.gfx-page-link.current {
    background-color: #2c7cb6;
    color: white;
    border-color: #2c7cb6;
    pointer-events: none;
}

/* ========= 移动端适配 ========= */
@media (max-width: 768px) {
    .gfx-main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .gfx-list-header {
        display: none;
    }

    .gfx-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        border-radius: 20px;
        background: #ffffff;
        margin-bottom: 0.75rem;
        border: 1px solid #e6edf4;
    }

    .col-number {
        width: auto;
        font-size: 0.8rem;
        background: #eef3fc;
        display: inline-block;
        padding: 0.2rem 0.8rem;
        border-radius: 30px;
        margin-bottom: 0.6rem;
    }

    .col-name {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .col-date,
    .col-wh {
        width: 100%;
        text-align: left;
        padding: 0.2rem 0;
        display: flex;
        justify-content: space-between;
        border-top: 1px dashed #eef3fc;
        margin-top: 0.4rem;
    }

    .col-date::before {
        content: "发布日期";
        font-weight: 600;
        color: #4a627a;
    }

    .col-wh::before {
        content: "文号";
        font-weight: 600;
        color: #4a627a;
    }

    .gfx-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gfx-btn {
        width: 100%;
        text-align: center;
    }

    .article-hover-card {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-height: 70vh;
        overflow: auto;
    }

    .gfx-list-item:hover .article-hover-card::before {
        display: none;
    }
}