/* CSS变量定义 - 主题颜色 */
:root {
    --primary: #0F3460;
    /* 主色调：深蓝色 */
    --secondary: #D4AF37;
    /* 辅色调：金黄色 */
    --dropdown-bg: #001991;
    /* 下拉菜单背景色 */
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 页面基础样式 */
body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 - 控制页面内容宽度 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== 顶部导航栏 ==================== */
.top-nav {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo样式 */
.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

/* ==================== 主导航样式 ==================== */
.main-nav ul {
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 40px;
    position: relative;
}

.main-nav ul li a {
    font-weight: 600;
    font-size: 16px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--secondary);
}

/* 激活状态的菜单项 */
.active-menu-item a {
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
}

/* ==================== 下拉菜单样式 ==================== */
.dropdown {
    position: static;
}

/* 下拉菜单内容容器 */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dropdown-bg);
    padding: 0;
    display: none;
    grid-template-columns: 280px 1fr;
    gap: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 鼠标悬停时显示下拉菜单 */
.dropdown:hover .dropdown-content {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

/* 下拉菜单左侧 - 图片区域 */
.dropdown-left {
    background-color: var(--dropdown-bg);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.menu-image {
    width: 100%;
    height: 220px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 左侧图片区域的标题和描述 */
.menu-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
}

.menu-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    max-width: 220px;
}

/* 下拉菜单右侧 - 子菜单区域 */
.dropdown-right {
    padding: 40px 30px;
    background-color: var(--dropdown-bg);
    display: flex;
    flex-direction: column;
}

.dropdown-right-top {
    margin-bottom: 30px;
}

/* 一级菜单标题 */
.primary-menu-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.primary-menu-subtitle {
    color: var(--secondary);
    font-size: 16px;
    font-weight: 500;
}

/* 二级菜单列表 */
.submenu-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.submenu-list a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    font-weight: 600;
    padding: 12px 20px;
    transition: all 0.3s;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    min-width: 180px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

.submenu-list a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

/* ==================== 语言切换下拉菜单 ==================== */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-current {
    background: transparent;
    color: var(--primary);
    border: 1px solid #ddd;
    padding: 8px 30px 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 100px;
    position: relative;
    font-size: 14px;
}

.language-current:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.language-current i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s;
    color: #666;
}

.language-dropdown.active .language-current i {
    transform: translateY(-50%) rotate(180deg);
}

.language-list {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    display: none;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #eee;
    margin-top: 5px;
}

.language-dropdown.active .language-list {
    display: block;
}

.language-option {
    padding: 10px 15px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f5f5f5;
    display: block;
    font-size: 14px;
    text-align: left;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f9f9f9;
    color: var(--primary);
}

.language-option.active {
    color: var(--primary);
    font-weight: 600;
    background-color: #f0f7ff;
}

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary);
    margin-left: 30px;
    margin-right: 30px;
}

/* ==================== 联系我们页面特定样式 ==================== */
.contact-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e4a7a 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.contact-section {
    padding: 80px 0;
}

.contact-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 24px;
    color: white;
}

.contact-details h4 {
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-details p {
    color: #666;
    margin-bottom: 5px;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: #0d2b4d;
    transform: translateY(-2px);
}

.department-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.department-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), #1e4a7a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.department-icon i {
    font-size: 28px;
    color: white;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .main-nav ul li a {
        padding: 15px;
        display: block;
    }

    .contact-hero {
        padding: 60px 0;
    }

    .contact-section {
        padding: 60px 0;
    }

    .contact-card {
        padding: 25px;
    }

    .contact-info-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}


/* ==================== 轮播图样式 ==================== */
.hero-slider {
    position: relative;
    height: 800px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 100px;
    left: 100px;
    color: white;
    max-width: 500px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content h2 {
    font-size: 42px;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.slide-btn {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.slide-btn:hover {
    background: white;
    transform: translateY(-3px);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* ==================== 新闻资讯列表样式 ==================== */
.news-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    padding: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.news-item .img {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.news-item .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item .content {
    flex: 1;
    margin-left: 1rem;
}

.news-item .content h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0F3460;
}

.news-item .content p {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.news-item .date {
    text-align: center;
    margin-left: 1rem;
    flex-shrink: 0;
    background-color: #fff8e1;
    border-radius: 8px;
    padding: 0.5rem;
    width: 80px;
}

.news-item .date h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #D4AF37;
}

.news-item .date h4 {
    font-size: 0.875rem;
    color: #888;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    background-color: #0F3460;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #2c5282;
}