/* 移动端样式 */
body.mobile-menu-open {
    overflow: hidden;
}

html {
    font-size: 16px;
}

/* 移动端导航菜单 */
.mobile-header {
    background-color: #B80E15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.mobile-logo {
    height: 2.4rem;
}

.mobile-logo img {
    height: 3.75rem;
    width: 18.75rem;
}

.mobile-menu-btn {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.2rem;
    justify-content: center;
}

.mobile-menu-btn img {
    width: 100%;
    height: auto;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: block;
    visibility: hidden;
}

/* 透明遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 菜单内容区 */
.mobile-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 1002;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
}

.mobile-menu-container.active {
    visibility: visible;
}

.mobile-menu-container.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu-container.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    height: 4rem;
    /* 100px */
    padding-left: 1rem;
    padding-right: 1rem;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    height: 100%;
    width: 70%;
    max-width: 15rem;
}

.mobile-menu-logo img {
    height: 100%;
    width: 70vw;
}

.mobile-menu-logo-text {
    display: flex;
    flex-direction: column;
}

.mobile-menu-title {
    color: #c00;
    font-size: 16px;
    font-weight: bold;
}

.mobile-menu-subtitle {
    color: #666;
    font-size: 12px;
}

.mobile-menu-close {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    z-index: 1002;
}

.mobile-menu-close img {
    width: 100%;
    height: auto;
    display: block;
}

/* 菜单主体部分 - 红色背景 */
.mobile-menu-body {
    background-color: transparent;
    overflow-y: auto;
}

/* 菜单内容包装器 - 红色背景 */
.mobile-menu-body {
    background-color: #B80E15;
}

.mobile-search-box {
    background-color: #f5f5f5;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    padding: 0.3rem 1rem;
    margin: 1rem;
}

.mobile-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    outline: none;
}

.mobile-search-btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-search-btn img {
    width: 100%;
    height: auto;
}

.mobile-search-box img {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
    margin-right: 0.625rem;
}

/* 移动端导航菜单列表 - 新版本 */
.mobile-nav {
    margin-top: 10px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 0.5px solid #999;
}

.mobile-nav-list li a, .submenu-header {
    display: block;
    padding: 0.9375rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}

.submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-title {
    flex: 1;
}

.mobile-nav-list li.has-submenu {
    position: relative;
}

/* 旧版移动端菜单样式 - 保留以兼容旧代码 */
.mobile-nav-menu {
    background-color: #c00;
    color: #fff;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.mobile-nav-link {
    display: block;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}

.mobile-submenu-toggle {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* 新版子菜单 */
.submenu-toggle {
    position: absolute;
    right: 0.9375rem;
    top: 0.9375rem;
    font-size: 1.125rem;
    color: #fff;
    cursor: pointer;
}

.mobile-submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-submenu li a {
    padding-left: 1.875rem;
    font-size: 0.875rem;
}

.mobile-submenu.active {
    display: block;
}

/* 旧版子菜单 - 保留以兼容旧代码 */
.mobile-submenu {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-submenu-link {
    display: block;
    padding: 12px 15px 12px 30px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 确保移动端和桌面端的正确显示 */
/* 移动端底部样式 */
.mobile-footer {
    display: none;
    background-color: #B80E15;
    padding: 1rem;
    color: #fff;
    text-align: center;
}

.mobile-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-footer-logo {
    width: 5rem;
    height: 6rem;
    margin-bottom: 2rem;
    margin-top: 1.2rem;
}

.mobile-footer-info {
    font-size: 0.9rem;
    line-height: 1rem;
}

.mobile-footer-info p {
    margin: 0.3rem 0;
}

@media (max-width: 768px) {

    .desktop-header,
    .pc-footer {
        display: none !important;
    }

    .mobile-header,
    .mobile-footer {
        display: flex !important;
    }

    .mobile-menu-container.active {
        display: block;
    }

    .mobile-menu-container {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-header,
    .mobile-footer {
        display: none !important;
    }
    
    .pc-footer {
        display: block !important;
    }
}

.mobile-submenu-link:last-child {
    border-bottom: none;
}

.mobile-news-list {
    padding: 15px;
}

.mobile-news-item {
    margin-bottom: 15px;
    display: flex;
}

.mobile-news-item:before {
    content: "•";
    color: #c00;
    margin-right: 10px;
    font-size: 16px;
}

.mobile-news-link {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em;
}

.mobile-news-date {
    color: #c00;
    font-size: 12px;
}

/* 头部样式 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.site-title {
    font-size: 1rem;
    max-width: 200px;
}

.mobile-menu-toggle {
    display: block;
    width: 24px;
    height: 24px;
    position: relative;
    cursor: pointer;
}

.search-box {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.main-nav {
    display: none;
}

.mobile-news {
    display: block;
    margin: 15px 0;
}

.news-tabs {
    display: flex;
    border-bottom: 2px solid #c00;
    margin-bottom: 10px;
}

.news-tabs a {
    padding: 8px 15px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    background-color: #f5f5f5;
}

.news-tabs a.active {
    background-color: #c00;
    color: #fff;
    border-color: #c00;
}

.news-list .news-item {
    border-bottom: 1px dashed #ddd;
    padding: 10px 0;
}

.news-list .news-item a {
    display: flex;
    align-items: baseline;
}

.news-date {
    flex-shrink: 0;
    color: #999;
    font-size: 0.8rem;
    margin-right: 10px;
}

.news-title {
    font-size: 0.9rem;
    font-weight: normal;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 党建专栏 */
.icon-link {
    width: 25%;
}

/* 教学资源 */
.resource-item {
    width: 25%;
}

.resource-item h3 {
    font-size: 0.9rem;
}

/* 党校风采 */
.highlight-item {
    width: 100%;
    padding: 0 5px;
}

/* 底部区域 */
.footer-info {
    font-size: 0.8rem;
}

.qrcode img {
    width: 60px;
    height: 60px;
}

.qrcode p {
    font-size: 0.7rem;
}

.mobile-footer{
    background-color: white;
    color: #657079;
}

footer{
    margin-top: 0;
    padding: 0 !important;
}