/* common.css */
html {
    box-sizing: border-box;
    overflow-x: hidden; /* Added to prevent horizontal scrollbar */
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

:root {
    --primary-color: #C63935;
    --primary-color-dark: #A82F2C;
    --primary-color-rgb: 198, 57, 53;
    --secondary-color: #C63935;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --border-color: #e5e5e5;
    --bg-color: #f5f5f5;
    --white: #fff;
}

body {
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Added to prevent horizontal scrollbar */
    word-break: break-word; /* Added to prevent long words from overflowing */
    /* min-width: 1200px; */
}

body > main {
    flex: 1 0 auto;
    width: 100%;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* 80px for header + 20px extra space */
}

.container {
    width: 100%; /* Changed from 1200px to 100% for responsiveness */
    max-width: 1400px; /* Added max-width */
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%; /* Ensure all images are responsive */
    height: auto; /* Maintain aspect ratio */
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 更多按钮 */
.more-btn {
    display: inline-block;
    padding: 6px 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.more-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* 查看更多链接 */
.more-link {
    text-align: right;
    margin-top: 20px;
}

.more-link a {
    color: var(--primary-color);
    font-size: 15px;
}

.more-link a:hover {
    color: var(--primary-color-dark);
}

/* 标题样式 */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
    position: relative;
}

.section-title p {
    font-size: 16px;
    color: var(--lighter-text);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title-line {
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

/* 页面区块 */
.section {
    padding: 60px 0;
}

.section:nth-child(even) {
    background-color: var(--bg-color);
}

/* 顶部导航 */
.header {
    background-image: url('../images/headerbg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px; /* Default desktop height */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.logo {
    height: 110px;
    display: flex;
    align-items: center;
    max-width: 450px;
    min-width: 250px;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 100%;
    min-width: 0;
}

.logo img {
    height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

/* 头部操作按钮区域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    flex-shrink: 0;
}

.action-btn {
    padding: 6px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.action-btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-color-rgb), 0.3);
}

/* 微信按钮容器 */
.wechat-btn {
    position: relative;
}

/* 微信二维码弹窗 */
.wechat-qrcode {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 200px;
    text-align: center;
}

.wechat-qrcode::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.wechat-btn:hover .wechat-qrcode,
.wechat-btn.active .wechat-qrcode {
    opacity: 1;
    visibility: visible;
    top: calc(100% + 5px);
}

.wechat-qrcode img {
    width: 150px;
    height: 150px;
    display: block;
    margin: 0 auto 10px;
}

.wechat-qrcode p {
    font-size: 13px;
    color: var(--text-color);
    margin: 0;
}

/* 微信图标按钮 */
.wechat-icon-btn {
    width: 38px;
    height: 30px;
    padding: 0;
    background-color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wechat-icon-btn:hover {
    background-color: #f7f7f7 !important;
}

.icon-wechat {
    background-image: url('../images/wechat.png');
}

.wechat-icon-btn .icon-wechat {
    width: 20px;
    height: 20px;
    display: block;
}

/* OA按钮 */
.oa-btn {
    background-color: var(--secondary-color);
}

.oa-btn:hover {
    background-color: var(--primary-color-dark);
}

.nav {
    /* No default display or flex-direction here, handled by nav-list or media queries */
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex; /* Desktop: horizontal layout */
    flex-direction: row; /* Desktop: horizontal layout */
}

.nav-item {
    position: relative;
    margin: 0 5px;
    width: auto; /* Desktop: auto width */
    text-align: left; /* Desktop: left align */
}

.nav-item > a {
    display: block;
    padding: 0 10px;
    line-height: 80px; /* Desktop: matches header height */
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
}

.nav-item:hover > a,
.nav-item.active > a {
    color: var(--primary-color);
}
.article-title {
    text-align: center;
    margin-bottom: 10px;
}

.article-title h2 {
    text-align: center;
    margin: 0;
    padding: 0;
}

.article-meta {
    text-align: center;
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.article-meta span {
    display: inline-block;
    margin: 0 15px;
    color: #666;
    font-size: 14px;
}

.meta-category {
    padding: 4px 12px;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 13px;
}

.meta-date,
.meta-views {
    color: #999;
}

.nav-item.active > a:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 3px;
    background-color: var(--primary-color);
}

/* 下拉菜单 */
.sub-menu {
    position: absolute;
    top: 80px; /* Matches desktop header height */
    left: 0;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    width: max-content;
    max-width: calc(100vw - 40px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown on hover for desktop */
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex; /* Show on hover for desktop */
    align-items: stretch;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.sub-menu li {
    border-bottom: none;
    border-right: none;
    flex: 0 0 auto;
}

.sub-menu a {
    display: block;
    padding: 12px 18px;
    color: var(--text-color);
    font-size: 14px;
    white-space: nowrap;
}

.sub-menu a:hover {
    background-color: #f9f9f9;
    color: var(--primary-color);
}

/* 底部 */
.footer {
    background-color: #2c3e50;
    color: #b3b3b3;
    flex-shrink: 0;
    padding: 50px 0 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 0;
}

.footer-col {
    width: 23%;
}

.footer-col h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.contact-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.contact-list i {
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--white);
}

.link-list li {
    margin-bottom: 10px;
}

.link-list a:hover {
    color: var(--white);
}

.qrcode {
    text-align: center;
}

.qrcode img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.qrcode img:hover {
    transform: scale(1.05);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    line-height: 1.8;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.footer-bottom a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom .separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom .beian-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* 返回顶部 */
#back-to-top {
    display: none;
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 46px;
    height: 46px;
    border-radius: 4px;
    background: var(--primary-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 998;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#back-to-top:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

#back-to-top .icon-up {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background: none;
}

#back-to-top .icon-up::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 54%;
    width: 13px;
    height: 13px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* 图标 */
[class^="icon-"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-location {
    /* background-image: url('../images/icon-location.png'); */
}

.icon-phone {
    /* background-image: url('../images/icon-phone.png'); */
}

.icon-email {
    /* background-image: url('../images/icon-email.png'); */
}

.icon-fax {
    /* background-image: url('../images/icon-fax.png'); */
}

/* 内页通用样式 */
.page-banner {
    height: 300px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    margin-top: 80px;
}

.page-banner:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.page-title {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    color: var(--white);
    z-index: 1;
}

.page-title h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
}

.breadcrumb li {
    margin: 0 5px;
}

.breadcrumb li:after {
    content: "/";
    margin-left: 10px;
}

.breadcrumb li:last-child:after {
    display: none;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

/* 页面内容区 */
.page-content {
    padding: 50px 0;
}

.page-container {
    display: flex;
}

.sidebar {
    width: 260px;
    margin-right: 40px;
}

.main-content {
    flex: 1;
}

.sidebar-title {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 500;
}

.sidebar-menu {
    border: 1px solid var(--border-color);
    border-top: none;
}

.sidebar-menu li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #f9f9f9;
    color: var(--primary-color);
    padding-left: 25px;
}

/* 404页面 */
.not-found-page {
    min-height: calc(100vh - 340px);
    padding: 160px 0 90px;
    background: #f6f7f9;
    display: flex;
    align-items: center;
}

.not-found-panel {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 40px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.not-found-code {
    color: var(--primary-color);
    font-size: 72px;
    line-height: 1;
    font-weight: 700;
    margin-bottom: 18px;
}

.not-found-panel h1 {
    color: var(--text-color);
    font-size: 28px;
    margin-bottom: 14px;
}

.not-found-panel p {
    color: var(--light-text);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 28px;
}

.not-found-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 桌面端布局优化 */
@media screen and (min-width: 1200px) {
    .header .container {
        gap: 15px;
        max-width: 1400px;
    }
    
    .nav {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    
    .header-actions {
        margin-left: 0;
        position: static;
        gap: 8px;
    }
    
    .action-btn {
        box-shadow: none;
    }
}

/* 移动端适配 */
@media screen and (max-width: 1199px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    body {
        min-width: auto;
    }

    /* 导航栏移动端样式 */
    .header {
        width: 100%; /* Ensure header takes full width */
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0;
    }

    .header .container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 0 12px;
        overflow: hidden;
    }

    .logo {
        flex: 1 1 auto;
        height: 46px;
        max-width: calc(100vw - 78px);
        min-width: 0;
        overflow: hidden;
    }

    .logo img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 46px;
    }

    /* 移动端头部操作按钮 */
    .header-actions {
        position: fixed;
        bottom: 20px;
        right: 20px;
        flex-direction: column;
        gap: 10px;
        z-index: 999;
        margin-left: 0;
    }

    .action-btn {
        padding: 10px 16px;
        font-size: 13px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    #back-to-top {
        display: none !important;
    }
    
    .wechat-icon-btn {
        width: 48px;
        height: 44px;
        padding: 0;
    }
    
    .wechat-icon-btn .icon-wechat {
        width: 24px;
        height: 24px;
    }

    /* 移动端微信二维码显示 */
    .wechat-qrcode {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1002;
    }

    .wechat-btn.active .wechat-qrcode {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* 遮罩层 */
    #wechat-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%; /* Ensure nav takes full width */
        background-color: var(--white);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 998;
        max-height: 0; /* Initially hidden */
        overflow: hidden; /* Hide overflow content */
        transition: max-height 0.3s ease-in-out; /* Smooth transition */
        flex: none;
        display: block;
        justify-content: flex-start;
    }

    .nav.show {
        max-height: 500px; /* Sufficient height to show all content */
        overflow: auto; /* Allow scrolling if content exceeds max-height */
    }

    .nav-list {
        flex-direction: column;
        width: 100%; /* Ensure nav-list takes full width */
        padding: 10px 0;
    }

    .nav-item {
        margin: 0;
        width: 100%; /* Ensure nav-item takes full width */
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item > a {
        line-height: 40px;
        padding: 10px 0;
    }

    .nav-item.active > a:after {
        display: none;
    }

    .sub-menu {
        position: static;
        width: 100%; /* Ensure sub-menu takes full width */
        max-width: none;
        box-shadow: none;
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0; /* Initially hidden */
        overflow: hidden; /* Hide overflow content */
        transition: max-height 0.3s ease-in-out; /* Smooth transition */
    }

    .nav-item:hover .sub-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        max-width: none;
        transform: none;
    }

    .sub-menu li {
        background: #f9f9f9;
        border-bottom: none;
        border-right: none;
    }

    .sub-menu a {
        padding: 8px 0; /* Keep this padding for sub-menu items */
    }
    

    /* 页脚移动端样式 */
    .footer {
        padding: 40px 0 0;
    }

    .footer-top {
        flex-wrap: wrap;
        gap: 30px;
    }

    .footer-col {
        width: calc(50% - 15px); /* Adjusted width for two columns */
        margin-bottom: 0;
        text-align: left;
    }

    .footer-col h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .contact-list li {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .link-list li {
        font-size: 13px;
        margin-bottom: 8px;
    }

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

    /* 标题样式调整 */
    .section-title h2 {
        font-size: 24px;
    }

    .section-title p {
        font-size: 14px;
    }

    /* 按钮样式调整 */
    .btn, .more-btn {
        width: 100%;
        text-align: center;
    }

    /* Hamburger menu styles */
    .menu-toggle {
        display: block; /* Always show hamburger on mobile */
        position: relative;
        z-index: 1001; /* Ensure it's above everything else */
        pointer-events: auto; /* Ensure it receives click events */
        width: 30px; /* Explicit width */
        height: 20px; /* Explicit height */
        /* background-color: red; */ /* Temporary: for debugging visibility */
        top: 5px; /* Slightly adjust position */
    }

    .menu-toggle span {
        display: block;
        width: 100%; /* Ensure spans fill parent width */
        height: 2px;
        background-color: var(--text-color); /* Revert to original color */
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }

    .menu-toggle span:nth-child(1) {
        top: 0;
    }

    .menu-toggle span:nth-child(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    .menu-toggle span:nth-child(3) {
        bottom: 0;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
        bottom: 9px;
    }
}

/* Tablet specific adjustments for nav (if needed) */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .container {
        max-width: 720px;
    }
    
    /* 平板设备导航样式 */
    .nav {
        flex: none;
        display: block;
    }
    
    /* Revert nav-list and nav-item to more compact horizontal layout for tablets */
    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item {
        width: auto;
    }

    /* 页脚平板样式优化 */
    .footer-top {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin: 0 -10px;
        padding: 0;
    }

    .footer-col {
        width: calc(50% - 10px);
        box-sizing: border-box;
        padding: 0 10px;
        margin-bottom: 20px;
        text-align: left;
    }

    .qrcode {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
    }

    .qrcode img {
        margin-bottom: 0;
    }

    .footer-col h3 {
        font-size: 16px;
        margin-bottom: 15px;
        text-align: left;
    }

    .contact-list li,
    .link-list li {
        font-size: 13px;
        margin-bottom: 8px;
        text-align: left;
    }
}

/* Smaller mobile screens (max 767px) */
@media screen and (max-width: 767px) {
    .section {
        padding: 40px 0; /* Adjusted padding for smaller screens */
    }

    .section-title {
        margin-bottom: 30px;
    }

    .page-banner {
        height: 250px;
        margin-top: 50px;
    }

    .page-title h1 {
        font-size: 28px;
    }

    .breadcrumb {
        font-size: 14px;
        flex-wrap: wrap;
        padding: 0 16px;
    }

    .breadcrumb li:nth-child(3):last-child {
        display: none;
    }

    .breadcrumb li:nth-child(2):nth-last-child(2):after {
        display: none;
    }

    .not-found-page {
        min-height: calc(100vh - 260px);
        padding: 110px 0 60px;
    }

    .not-found-panel {
        padding: 40px 22px;
    }

    .not-found-code {
        font-size: 56px;
    }

    .not-found-panel h1 {
        font-size: 24px;
    }

    .not-found-panel p {
        font-size: 14px;
    }

    .not-found-actions .btn {
        min-width: 112px;
    }

    .page-container {
        flex-direction: column; /* Stack sidebar and main content vertically */
        display: block; /* Ensure block display for vertical stacking */
    }

    .sidebar {
        width: 100%; /* Full width on mobile */
        margin-bottom: 30px; /* Space between sidebar and main content */
    }

    .main-content {
        width: 100%; /* Full width on mobile */
        padding-left: 0; /* Remove left padding from main content */
    }

    .footer {
        padding: 40px 0 0;
    }

    /* 页脚手机样式优化 */
    .footer-top {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin: 0 -10px; /* Offset child padding for spacing */
    }

    .footer-col {
        width: calc(50% - 10px); /* Two columns */
        box-sizing: border-box;
        padding: 0 10px; /* Internal spacing */
        margin-bottom: 20px; /* Vertical spacing */
        text-align: left;
    }

    /* Specific style for the last footer-col (assuming it's the QR code column) */
    .footer-top .footer-col:last-child {
        width: 100%; /* Make last column full width */
        text-align: center; /* Center its content */
        padding: 0 15px; /* Adjust padding for full width */
    }

    /* Styles for footer-content structure (e.g., contact.html) */
    .footer-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        margin: 0 -10px;
    }

    .footer-info,
    .footer-qrcode {
        width: calc(50% - 10px);
        box-sizing: border-box;
        padding: 0 10px;
        margin-bottom: 20px;
        text-align: left;
    }

    /* General h3, li, and p styles for all footer columns */
    .footer-col h3,
    .footer-info h3 {
        font-size: 15px;
        margin-bottom: 12px;
        text-align: left; /* Default left align */
    }

    /* Center specific h3 (e.g., in the QR code column or footer-qrcode) */
    .footer-top .footer-col:last-child h3,
    .footer-qrcode h3 {
        text-align: center;
    }

    .footer-col h3:after {
        width: 30px;
    }

    .contact-list li,
    .link-list li,
    .footer-info p {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .contact-list li {
        padding-left: 20px;
    }

    /* QR code image and text centering */
    .qrcode img {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-qrcode p {
        text-align: center;
    }

    .footer-bottom {
        padding: 15px 0;
        font-size: 12px;
    }

    /* Further adjust for very small screens (max 480px) to stack columns */
    @media screen and (max-width: 480px) {
        .footer-col,
        .footer-info,
        .footer-qrcode {
            width: 100%; /* Stack them vertically on very small screens */
            padding: 0 15px;
            text-align: center;
        }

        /* Ensure titles and lists are centered when stacked */
        .footer-col h3,
        .footer-info h3,
        .footer-qrcode h3 {
            text-align: center;
        }

        .footer-col ul,
        .footer-info ul,
        .footer-info p {
            text-align: center;
        }

        .contact-list li {
            justify-content: center;
            padding-left: 0;
        }
    }
}

@media screen and (max-width: 480px) {
    .section-title h2 {
        font-size: 26px;
    }

    .section-title p {
        font-size: 14px;
    }

    .page-title h1 {
        font-size: 26px;
    }

    .breadcrumb {
        font-size: 13px;
    }

    .breadcrumb li {
        font-size: 13px;
        margin: 0 4px;
    }

    .sidebar-title {
        font-size: 16px;
    }

    .sidebar-menu a {
        font-size: 13px;
        padding: 10px 15px;
    }

    .sidebar-block-title {
        font-size: 16px;
    }

    .latest-announcements .latest-item a {
        font-size: 13px;
    }

    .footer-info,
    .footer-qrcode {
        width: 100%;
        padding: 0 15px;
        text-align: center;
    }

    .footer-info h3,
    .footer-qrcode h3 {
        text-align: center;
    }

    .footer-info ul,
    .footer-info p {
        text-align: center;
    }

    .contact-list li {
        justify-content: center;
        padding-left: 0;
    }

    /* 页脚超小屏幕适配 */
    .footer-col,
    .footer-info,
    .footer-qrcode {
        width: 100%; /* Stack them vertically on very small screens */
        padding: 0 15px;
        text-align: center;
    }

    /* Ensure titles and lists are centered when stacked */
    .footer-col h3,
    .footer-info h3,
    .footer-qrcode h3 {
        text-align: center;
    }

    .footer-col ul,
    .footer-info ul,
    .footer-info p {
        text-align: center;
    }

    .contact-list li {
        justify-content: center;
        padding-left: 0;
    }
}

/* 通用卡片样式 */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 15px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 15px 0;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-title a {
    color: inherit;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-desc {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    color: var(--lighter-text);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Mobile specific styles for navigation (max 991px) */
@media screen and (max-width: 991px) {
    .nav-item.open > .sub-menu {
        max-height: 500px !important; /* Force open to full height */
        overflow: auto !important;    /* Allow scrolling if content overflows */
    }

    /* Ensure main nav also uses max-height for animation, if not already */
    .nav {
        max-height: 0; /* Initially hidden */
        overflow: hidden; /* Hide overflow content */
        transition: max-height 0.3s ease-in-out; /* Smooth transition */
    }

    .nav.show {
        max-height: 500px; /* Sufficient height to show all content */
        overflow: auto; /* Allow scrolling if content exceeds max-height */
    }
}
