/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5f8d;
    --secondary-color: #4a90a4;
    --accent-color: #f39c12;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

/* 导航样式 */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.dropdown-trigger {
    cursor: default;
}

.nav-link.dropdown-trigger:hover {
    color: var(--primary-color);
    cursor: default;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

/* 下拉菜单样式 */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    list-style: none;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    padding: 10px 0;
    margin-top: 5px;
    border-radius: 4px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.dropdown-menu a::before {
    content: '→';
    position: absolute;
    left: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-weight: bold;
    transform: translateX(-5px);
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    transform: translateX(10px);
    padding-left: 28px;
}

.dropdown-menu a:hover::before {
    opacity: 1;
    left: 10px;
    transform: translateX(0);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 轮播图样式 */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 60px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.carousel-slide-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.carousel-slide-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-slide-content p {
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    color: var(--white);
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

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

.indicator.active {
    background: var(--white);
}

/* 内容区域 */
.content-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

/* 卡片样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card p {
    color: #666;
    line-height: 1.8;
}

/* 留言板样式 */
.message-section {
    background: var(--light-bg);
    padding: 60px 0;
}

.message-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.message-form {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

.btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.message-list {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 600px;
    overflow-y: auto;
}

.message-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.message-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-author strong {
    color: var(--primary-color);
    font-size: 18px;
}

.message-email {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.message-date {
    color: #999;
    font-size: 14px;
}

.message-content {
    color: var(--text-color);
    line-height: 1.8;
    margin-top: 10px;
}

.message-phone {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.no-messages {
    text-align: center;
    color: #999;
    padding: 40px;
}

.success-message {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #4caf50;
    color: var(--white);
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
    z-index: 2000;
}

.success-message.show {
    opacity: 1;
    transform: translateX(0);
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        margin: 10px 0 0 20px;
        background: transparent;
    }

    .dropdown-menu a {
        padding: 8px 20px;
        font-size: 14px;
    }

    .hero-carousel {
        height: 300px;
    }

    .carousel-slide-content h2 {
        font-size: 28px;
    }

    .carousel-slide-content p {
        font-size: 16px;
    }

    .message-container {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 28px;
    }
}

