/* ==========================================================================
   web.css - 全球管制物项查询系统 前台全局样式
   ========================================================================== */


/* ==========================================================================
   1. 基础 / 全局样式
   ========================================================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

.code-text {
    font-family: Consolas, "Courier New", monospace;
}

/* ==========================================================================
   1.5. 宽屏容器
   ========================================================================== */

/* 标准容器 - 最大宽度 1320px */
.container {
    max-width: 1320px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* 宽屏容器 - 最大宽度 1600px，适合宽屏显示器 */
.container-lg {
    max-width: 1600px;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* 超宽屏容器 - 最大宽度 1920px，适合超宽屏显示器 */
.container-xl {
    max-width: 100%;
    /* padding-right: 20px;
    padding-left: 20px; */
    margin-right: auto;
    margin-left: auto;
}


/* ==========================================================================
   2. 导航栏
   ========================================================================== */

.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    padding: 1rem 0 !important;
}

.navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}


/* ==========================================================================
   3. 通用组件
   ========================================================================== */

.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.06);
}

.item-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(13, 110, 253, 0.08);
}


/* ==========================================================================
   4. 首页 - 轮播图
   ========================================================================== */

.carousel-section {
    margin: 0 0;
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.85);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
    bottom: 30px;
}

.carousel-caption h2 {
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.carousel-caption p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* 轮播图控制器样式 */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    background: transparent;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) opacity(0.8);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.3);
}

.carousel-indicators [data-bs-slide-to] {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-indicators [data-bs-slide-to].active {
    background-color: #fff;
}


/* ==========================================================================
   5. 首页 - 统计卡片
   ========================================================================== */

.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card .stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.stat-card .stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}


/* ==========================================================================
   6. 首页 - 跨模块检索 / 查询区域
   ========================================================================== */

.search-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: 2rem 0;
}

.search-section h3 {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}


/* ==========================================================================
   7. 首页 - 公告列表
   ========================================================================== */

.announcement-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

.announcement-item {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.announcement-item:hover {
    background: #e9ecef;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item .announcement-title {
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.3rem;
}

.announcement-item .announcement-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.announcement-item .announcement-summary {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 0.5rem;
}

.announcement-list::-webkit-scrollbar {
    width: 6px;
}

.announcement-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.announcement-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.announcement-list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}


/* ==========================================================================
   8. 表单控件
   ========================================================================== */

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}


/* ==========================================================================
   9. 查询按钮
   ========================================================================== */

.btn-search {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
    color: #fff;
}


/* ==========================================================================
   10. 首页 - 搜索结果卡片
   ========================================================================== */

.search-result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}


/* ==========================================================================
   11. 首页 - 关于 / 概览区块
   ========================================================================== */

.about-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: 2rem 0;
}

.about-section h2 {
    color: #1e3c72;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.about-section p {
    color: #495057;
    line-height: 1.8;
    margin-bottom: 1rem;
}


/* ==========================================================================
   12. 首页 - 功能卡片 / 快速入口
   ========================================================================== */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: #2a5298;
    margin-bottom: 1rem;
}

.feature-title {
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.9rem;
    color: #6c757d;
}


/* ==========================================================================
   13. 首页 - 联系我们区块
   ========================================================================== */

.contact-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 3rem 2rem;
    margin-top: 2rem;
}

.contact-section h2 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contact-section p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-item i {
    font-size: 1.5rem;
}

.contact-item a {
    color: #fff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.contact-item a:hover {
    opacity: 1;
}


/* ==========================================================================
   14. 美国管制物项页 - ECCN 工具栏
   ========================================================================== */

.eccn-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.eccn-toolbar .eccn-categ {
    min-width: 220px;
    flex: 0 0 220px;
}

.eccn-toolbar .eccn-search {
    flex: 0 1 320px;
    min-width: 240px;
}

.eccn-toolbar .eccn-search-input {
    display: flex;
}

.eccn-toolbar .eccn-search-input input {
    border-right: 0;
    border-radius: .375rem 0 0 .375rem;
}

.eccn-toolbar .eccn-search-input button {
    border-radius: 0 .375rem .375rem 0;
    white-space: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
}


/* ==========================================================================
   15. 美国管制物项页 - ECCN 展开/收起开关
   ========================================================================== */

.eccn-toggle-all {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    user-select: none;
    color: #1e3c72;
    font-weight: 500;
}

.eccn-toggle-all .switch {
    width: 36px;
    height: 20px;
    background: #cfd6dd;
    border-radius: 12px;
    position: relative;
    transition: background .2s;
}

.eccn-toggle-all .switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: left .2s;
}

.eccn-toggle-all.is-on .switch {
    background: #3b6db5;
}

.eccn-toggle-all.is-on .switch::after {
    left: 18px;
}


/* ==========================================================================
   16. 美国管制物项页 - ECCN 分类
   ========================================================================== */

.eccn-category {
    margin-bottom: 0.75rem;
}

.eccn-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2a5298;
    color: #fff;
    padding: .9rem 1.25rem;
    cursor: pointer;
    font-weight: 700;
    user-select: none;
    border-radius: 4px;
}

.eccn-category-header:hover {
    background: #1e3c72;
}

.eccn-category-header .label {
    font-size: 1.05rem;
}

.eccn-category-header .toggle {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .08em;
    opacity: .9;
}

.eccn-category-body {
    background: #fff;
    padding: 1rem 1.25rem;
    border: 1px solid #e6e9ec;
    border-top: 0;
}


/* ==========================================================================
   17. 美国管制物项页 - ECCN 分组
   ========================================================================== */

.eccn-group {
    margin-bottom: 1rem;
}

.eccn-group-header {
    font-weight: 700;
    color: #212529;
    font-size: 1.05rem;
    padding: .4rem 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.eccn-group-header .arrow {
    color: #2a5298;
    transition: transform .2s;
}

.eccn-group-body {
    padding-left: 1rem;
    border-left: 2px solid #e6e9ec;
    margin-top: .4rem;
}


/* ==========================================================================
   18. 美国管制物项页 - ECCN 描述区块
   ========================================================================== */

.eccn-meta-desc {
    background: #fdf6e3;
    border: 1px solid #ece1b1;
    border-radius: 4px;
    padding: .8rem 1rem;
    margin: .6rem 0 .8rem 0;
    line-height: 1.7;
    color: #1a1a1a;
    font-size: .95rem;
}


/* ==========================================================================
   19. 美国管制物项页 - ECCN 物项条目
   ========================================================================== */

.eccn-item {
    border: 1px solid #2a5298;
    border-radius: 4px;
    margin-bottom: .8rem;
    background: #fff;
    overflow: hidden;
}

.eccn-item-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .75rem 1rem;
    cursor: pointer;
    user-select: none;
}

.eccn-item-header .code {
    font-family: Consolas, 'Courier New', monospace;
    font-weight: 700;
    color: #2a5298;
    min-width: 80px;
    flex: 0 0 auto;
}

.eccn-item-header .title {
    flex: 1;
    line-height: 1.5;
    font-weight: bold;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}

.eccn-item-header .arrow {
    color: #2a5298;
}

.eccn-item-body {
    padding: 0 1rem 1rem 1rem;
    line-height: 1.7;
    color: #000000;
    font-size: 1rem;
}

.eccn-item-placeholder {
    font-style: italic;
    color: #6c757d;
    font-size: .85rem;
}


/* ==========================================================================
   20. 美国管制物项页 - GPO 表格（BIS 官网 cclData 内嵌）
   ========================================================================== */

.gpotbl_div {
    margin: 0.75rem 0 1rem;
}

.gpotbl_div table.gpo_table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.gpotbl_div table.gpo_table th,
.gpotbl_div table.gpo_table td {
    border: 1px solid #c8d4e3;
    padding: .45rem .75rem;
    vertical-align: top;
    text-align: left;
    line-height: 1.45;
}

.gpotbl_div table.gpo_table thead th {
    background: #2a5298;
    color: #fff;
    font-weight: 700;
    text-align: center;
    white-space: normal;
}

.gpotbl_div table.gpo_table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.gpotbl_div table.gpo_table tbody tr:nth-child(even) td {
    background: #e4ebf5;
}

.gpotbl_div table.gpo_table tbody tr:hover td {
    background: #d2dcee;
}

.gpotbl_div .center {
    text-align: center;
}


/* ==========================================================================
   21. 美国管制物项页 - Note 样式
   ========================================================================== */

.eccn-item-body div.note {
    margin-left: 3rem;
    padding: 1rem;
    background: #fcf8e3;
}


/* ==========================================================================
   22. 美国管制物项页 - Category 5 Part / Subgroup 层级
   ========================================================================== */

.eccn-part {
    margin-bottom: 1rem;
    border: 1px solid #2a5298;
    border-radius: 4px;
    background: #edf1f9;
    overflow: hidden;
}

.eccn-part-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2a5298;
    color: #fff;
    padding: .65rem 1rem;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
}

.eccn-part-header:hover {
    background: #1e3c72;
}

.eccn-part-header .arrow {
    color: #fff;
    transition: transform .2s;
}

.eccn-part-body {
    padding: .8rem 1rem;
    background: #fff;
}

.eccn-subgroup {
    margin-bottom: .8rem;
    border: 1px solid #b5c7dc;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.eccn-subgroup-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #1e3c72;
    background: #e4ebf5;
}

.eccn-subgroup-header:hover {
    background: #d2dcee;
}

.eccn-subgroup-header .arrow {
    transition: transform .2s;
}

.eccn-subgroup-body {
    padding: .5rem .9rem .9rem 1.4rem;
    border-top: 1px solid #e6e9ec;
}

.eccn-subgroup-empty {
    font-style: italic;
    color: #6c757d;
    font-size: .85rem;
}


/* ==========================================================================
   23. 各国管制链接页
   ========================================================================== */

.country-section {
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.country-section-header {
    background: linear-gradient(90deg, #3b6db5 0%, #2a5298 100%);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.country-link-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid #e9ecef;
}

.country-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(13, 110, 253, 0.1);
}


/* ==========================================================================
   24. 响应式设计
   ========================================================================== */

@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .search-section {
        padding: 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
    }
}
