/* 联系我们页面专用样式 */

:root {
    --primary-color: #32228b;
    --secondary-color: #343a40;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #777;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-right: 10px;
    transition: var(--transition);
}

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

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin: 0 15px;
    position: relative;
}

.main-nav ul li a {
    color: var(--dark-gray);
    padding: 5px 0;
    font-size: 1.1rem;
    position: relative;
    display: block;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a.active {
    color: var(--primary-color);
    font-weight: 500;
}


/* 下拉菜单样式 */

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 4px;
    padding: 8px 0;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

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


/* 移动端菜单 */

.navbar {
    display: none;
    /* 桌面端导航默认隐藏，移动端不显示 */
}


/* 顶部固定导航（移动端） */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    /* 确保在内容上方 */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}


/* 菜单按钮样式 */

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    z-index: 1000;
}


/* 侧边栏导航 */

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    /* 默认隐藏在右侧 */
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1001;
    /* 高于遮罩层和导航栏 */
    padding-top: 70px;
    /* 预留顶部导航高度 */
}

.sidebar.active {
    right: 0;
    /* 显示侧边栏 */
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}

.nav-list {
    padding: 0 20px;
}

.nav-list li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.nav-list a {
    color: #333;
    font-size: 1rem;
    display: block;
    padding: 5px 0;
}

.nav-list a.active {
    color: #32228b;
    font-weight: bold;
}


/* 移动端子菜单样式 */

.nav-list .dropdown-menu {
    margin-left: 20px;
    margin-top: 10px;
    position: static;
    box-shadow: none;
    min-width: auto;
    padding: 0;
}

/* 标题样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 英雄区域 */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 联系信息 */
.contact-info {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 确保在较大屏幕上显示为四列 */
@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.contact-item {
    background-color: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(50, 34, 139, 0.2);
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(50, 34, 139, 0.3);
}

.contact-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.contact-details p {
    color: var(--text-light);
    margin-bottom: 5px;
}

/* 联系表单和地图 */
.contact-section {
    padding: 100px 0;
    background-color: var(--light-color);
}

.contact-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 50px;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 联系表单 */
.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.contact-form p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

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

.required {
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

/* 地图 */
.contact-map {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-map h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.map-container {
    width: 100%;
    min-height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.contact-form {
    min-height: 400px;
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f1f1f1;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
}

.map-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.map-info p {
    margin-bottom: 15px;
}


/* 表单提交按钮加载状态 */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* 地图查看按钮 */
.map-info .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
}

