/* 变量定义和重置样式 - 与内页共用 */
:root {
    --primary-color: #ad0f19;
    --secondary-color: #ea9425;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --section-spacing: 80px;
}

a { color: inherit; text-decoration: none; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 - 与内页共用 */
.navbar {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    padding: 0 10px;          /* 导航栏内边距 */
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 40px;       /* LOGO 和导航之间的间距 */
    flex-shrink: 0;
}

.logo:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.logo-img {
    height: 88px;
    width: auto;
}

/* ====== 导航栏永不折行 ====== */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding-right: 80px;     /* 预占搜索区域空间，减少加载时的抖动 */
}

/* 导航栏加载中：透明但仍可交互 */
.nav-links.loading {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

/* 导航栏加载完成：完全显示 */
.nav-links.loaded {
    opacity: 1;
}

.nav-links li {
    position: relative;
    margin-left: 40px;
    flex-shrink: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 21px;
    padding: 25px 0;
    transition: var(--transition);
    display: block;
    position: relative;
    white-space: nowrap !important;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.dropdown a i {
    display: none;
    margin-left: 5px;
    font-size: 12px;
    transition: var(--transition);
}

.dropdown:hover a i {
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    border-radius: 8px;
    overflow: hidden;
    padding: 5px 0;
}

.dropdown:hover .dropdown-menu,
.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--text-color);
    transition: var(--transition);
    font-size: 17px;
    font-weight: 400;
}

.dropdown-menu a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    padding-left: 25px;
}

/* 搜索样式 - 与内页共用 */
.search-container {
    position: relative;
    margin-left: 20px;
}

.search-icon {
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.search-icon::before {
    content: '';
    width: 28px;
    height: 28px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D'0%200%201024%201024'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M482.133333%20724.845714A252.952381%20252.952381%200%201%201%20735.085714%20471.893333a253.318095%20253.318095%200%200%201-252.952381%20252.952381z%20m0-457.142857A204.190476%20204.190476%200%201%200%20686.32381%20471.893333%20204.312381%20204.312381%200%200%200%20482.133333%20268.190476z'%2F%3E%3Cpath%20d%3D'M615.94819%20660.72381l34.486858-34.486858L787.748571%20763.550476l-34.474666%2034.486857z'%2F%3E%3C%2Fsvg%3E");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D'0%200%201024%201024'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M482.133333%20724.845714A252.952381%20252.952381%200%201%201%20735.085714%20471.893333a253.318095%20253.318095%200%200%201-252.952381%20252.952381z%20m0-457.142857A204.190476%20204.190476%200%201%200%20686.32381%20471.893333%20204.312381%20204.312381%200%200%200%20482.133333%20268.190476z'%2F%3E%3Cpath%20d%3D'M615.94819%20660.72381l34.486858-34.486858L787.748571%20763.550476l-34.474666%2034.486857z'%2F%3E%3C%2Fsvg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

.search-icon:hover::before {
    background-color: var(--secondary-color);
}

.search-icon svg,
.search-icon i {
    display: none;
}

.search-icon:hover {
    color: var(--secondary-color);
}

.search-box {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;               /* 稍微收窄一点，适应按钮 */
    background-color: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 12px 15px;
    display: none;
    z-index: 101;

    /* ✅ 新增：弹性布局，让输入框和按钮在一行 */
    display: none;
    align-items: center;
    gap: 8px;
}

/* ✅ 当激活时显示为 flex */
.search-box.active {
    display: flex;
}

.search-input {
    flex: 1;                    /* 占满剩余宽度 */
    padding: 10px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
}

/* 移动端控制按钮 - 与内页共用 */
.mobile-controls {
    display: none;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn, .mobile-search-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--white);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.mobile-search-btn {
    font-size: 24px;
    width: 44px;
    height: 44px;
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-search-btn::before {
    content: '';
    width: 28px;
    height: 28px;
    display: block;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'><path fill='white' d='M482.133333 724.845714A252.952381 252.952381 0 1 1 735.085714 471.893333a253.318095 253.318095 0 0 1-252.952381 252.952381z m0-457.142857A204.190476 204.190476 0 1 0 686.32381 471.893333 204.312381 204.312381 0 0 0 482.133333 268.190476z'/><path fill='white' d='M615.94819 660.72381l34.486858-34.486858L787.748571 763.550476l-34.474666 34.486857z'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.3s ease;
}

.mobile-search-btn:hover::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024'><path fill='%23ea9425' d='M482.133333 724.845714A252.952381 252.952381 0 1 1 735.085714 471.893333a253.318095 253.318095 0 0 1-252.952381 252.952381z m0-457.142857A204.190476 204.190476 0 1 0 686.32381 471.893333 204.312381 204.312381 0 0 0 482.133333 268.190476z'/><path fill='%23ea9425' d='M615.94819 660.72381l34.486858-34.486858L787.748571 763.550476l-34.474666 34.486857z'/></svg>");
}

.mobile-search-btn svg {
    display: none;
}

.mobile-menu-btn {
    width: 36px;
    height: 36px;
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn::before {
    content: '';
    width: 20px;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    top: 12px;
}

.mobile-menu-btn::after {
    content: '';
    width: 20px;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    bottom: 12px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn:hover::before,
.mobile-menu-btn:hover::after,
.mobile-menu-btn:hover span {
    background-color: var(--secondary-color);
}

.mobile-menu-btn:hover, .mobile-search-btn:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn svg {
    display: none;
}

/* 移动端搜索容器 - 与内页共用 */
.mobile-search-container {
    display: none;
    position: relative;
}

.mobile-search-box {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: none;
    z-index: 1001;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-search-box.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.mobile-search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(234, 148, 37, 0.2);
}

/* 移动端导航下拉菜单 - 与内页共用 */
.mobile-nav {
    position: fixed;
    top: 120px;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    z-index: 999;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    display: none;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    display: block;
}

.mobile-nav-links {
    list-style: none;
    padding: 20px;
    width: 100%;
}

.mobile-nav-links li {
    margin-bottom: 0;
    position: relative;
    width: 100%;
}

.mobile-nav-links .dropdown > a {
    position: relative;
    padding: 12px 40px 12px 15px;
    width: 100%;
    display: block;
    color: var(--white);
    transition: var(--transition);
    border-radius: 4px;
}

.mobile-nav-links .dropdown.active > a {
    background-color: var(--secondary-color);
    color: var(--white);
}

.mobile-nav-links .dropdown > a:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--white);
}

.mobile-nav-links .dropdown.active > a:after {
    transform: translateY(-50%) rotate(180deg);
}

/* ====== 移动端导航下拉菜单 - 增强版 ====== */

/* 1. 菜单容器：默认收起 */
.mobile-nav-links .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin: 0;
    border-radius: 0;
    width: 100%;
    display: block !important;
    border: none;
}

/* 2. 菜单容器：展开状态 */
.mobile-nav-links .dropdown.active .dropdown-menu {
    max-height: 500px;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 5px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* 3. 菜单项 li */
.mobile-nav-links .dropdown-menu li {
    margin-bottom: 0;
    width: 100%;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 4. ★★★ 核心修复：菜单链接 ★★★ */
.mobile-nav-links .dropdown-menu a {
    color: #ffffff !important;           /* 强制白色文字 */
    font-size: 15px !important;          /* 强制字号 */
    padding: 10px 15px 10px 30px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    display: block;
    position: relative;
    transition: var(--transition);
    opacity: 1 !important;
    visibility: visible !important;
    line-height: 1.4 !important;         /* 确保行高正常 */
    text-indent: 0 !important;           /* 防止缩进 */
    letter-spacing: normal !important;   /* 防止字间距异常 */
    font-weight: normal !important;      /* 防止加粗异常 */
    text-transform: none !important;     /* 防止大小写转换 */
}

/* 5. 圆点指示器 */
.mobile-nav-links .dropdown-menu a:before {
    content: '•';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 16px;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 6. 悬停效果 */
.mobile-nav-links .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    padding-left: 38px !important;
}

/* 7. 最后一项去掉边框 */
.mobile-nav-links .dropdown-menu a:last-child {
    border-bottom: none !important;
}

.mobile-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    transition: var(--transition);
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}

.mobile-nav-links a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* 底部样式 - 与内页共用 */
.footer {
    background-color: #1a1a1a;
    color: var(--white);
    padding: 60px 0 30px;
    position: relative;
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

.footer-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255 255 255 / 0%);
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 0px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 20px;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    color: #fffffe(--secondary-color);
    margin-right: 10px;
    width: 20px;
}

.platform-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.platform-icon {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.platform-icon i {
    font-size: 28px;
    color: var(--white);
    transition: var(--transition);
}

.platform-icon:hover i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.qrcode-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: var(--white);
    padding: 0px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 120px;
    height: 120px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
    margin-bottom: 35px;
}

.platform-icon:hover .qrcode-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.qrcode-popup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.qrcode-label {
    text-align: center;
    font-size: 13px;
    color: var(--white);
    margin-top: 6px;
    display: block;
}

/* 友情链接 - 两列三行网格布局 */
.links {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 两列等宽 */
    gap: 6px 20px;                    /* 行间距6px，列间距20px */
    padding: 0;
}

.links a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;                  /* 稍小字号让布局更紧凑 */
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;              /* 防止文字折行破坏两列对齐 */
}

.links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ffffff;
    color: #ffffff;
    font-size: 15px;
}

/* 返回顶部按钮 - 与内页共用 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    font-size: 20px;
}

.back-to-top::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid currentColor;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.back-to-top svg,
.back-to-top i {
    display: none;
}

@media (max-width: 1300px) {
  /* 导航栏切换为移动端（保持原逻辑） */
  .mobile-controls { display: flex; }
  .mobile-menu-btn, .mobile-search-btn { display: block; }
  .nav-links { display: none; }
  .mobile-nav { display: block; }
  .search-container { display: none; }
  .mobile-search-container { display: block; }

  /* 通知公告同步切换为移动端样式（核心修正） */
  .news-container {
    flex-direction: column !important; /* 左右→上下堆叠 */
    width: 100% !important;
  }
  .news-main, .news-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px !important; /* 侧边栏下移 */
  }

  /* 通知列表项：文字不截断+自适应 */
  .notice-item {
    display: flex !important;
    align-items: flex-start !important;
    word-break: break-word !important; /* 长文本换行 */
  }
  .notice-date {
    flex-shrink: 0 !important; /* 日期块不收缩 */
    width: 50px !important;
    height: 55px !important;
    margin-right: 10px !important;
  }
  .notice-text {
    flex-grow: 1 !important; /* 文字区域自适应 */
    white-space: normal !important; /* 取消单行截断 */
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4 !important;
    font-size: 13px !important; /* 适配移动端字号 */
  }

  /* 侧边栏标题（如“通知公告”） */
  .news-sidebar .sidebar-title { /* 假设侧边栏标题类为sidebar-title */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
  }
}

/* 移动端底部调整 */
@media (max-width: 767px) {
    .footer-section {
        min-width: 100%;
    }
    
    .platform-icons {
        justify-content: center;
    }
    
    .links a {
        font-size: 15px;
        margin-right: 12px;
        margin-bottom: 8px;
    }
    
    .copyright {
        font-size: 12px;
    }
}

/* ====== 终极修复：强制所有页面移动端二级菜单文字显示 ====== */
.mobile-nav-links .dropdown-menu a,
.mobile-nav-links .dropdown-menu a:link,
.mobile-nav-links .dropdown-menu a:visited {
    color: #ffffff !important;
    font-size: 15px !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    line-height: 1.4 !important;
}


/* ====== 首页电脑端搜索提交按钮（缩小版） ====== */
.search-box .tj,
.search-box input[name="submit_button"] {
    padding: 8px 12px;
    background-color: #ad0f19;
    color: #ffffff;
    border: 2px solid #ad0f19;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.search-box .tj:hover,
.search-box input[name="submit_button"]:hover {
    background-color: #8a0c14;
    border-color: #8a0c14;
}


/* 移动端侧边栏标题栏点击反馈 */
.mobile-sidebar-header {
   -webkit-tap-highlight-color: rgba(173, 15, 25, 0.2);
   cursor: pointer;
}
 
/* 链接点击反馈 */
.mobile-nav-link {
   -webkit-tap-highlight-color: rgba(173, 15, 25, 0.1);
}
 
/* 顶部导航点击反馈 */
#mobileMenuBtn {
   -webkit-tap-highlight-color: transparent;
}

@media (max-width: 576px) {
    .mobile-menu-btn, .mobile-search-btn {
        padding: 0px;
    }
}