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

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #1e88e5;
    --accent-color: #ff9800;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --gradient: linear-gradient(135deg, #2c5aa0 0%, #1e88e5 100%);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

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

.navbar > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.2;
}

.nav-brand img {
    height: 38px;
    width: 38px;
    object-fit: contain;
    margin-right: 10px;
    flex-shrink: 0;
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 4px;
}

.nav-item {
    margin-left: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s, border-color 0.3s;
    padding: 8px 14px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: 15px;
}

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

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

.nav-dropdown > .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-dropdown > .nav-link::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform 0.3s;
}

.nav-dropdown:hover > .nav-link::after,
.nav-dropdown.open > .nav-link::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px 0;
    z-index: 1001;
    list-style: none;
    margin: 0;
}

.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown.open > .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 10px 18px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    border-bottom: none;
    transition: background 0.2s, color 0.2s;
}

.nav-dropdown-menu li a:hover {
    background: rgba(44, 90, 160, 0.06);
    color: var(--primary-color);
}

.nav-dropdown-menu li a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: rgba(44, 90, 160, 0.08);
}

/* 轮播图样式 */
.hero {
    height: 600px;
    position: relative;
    overflow: hidden;
    background: #1a2a3a;
}

.hero-slider {
    height: 100%;
    position: relative;
}

.hero-slide {
    height: 100%;
    position: relative;
    display: none;
    background: #1a2a3a;
}

.hero-slide.active {
    display: block;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #1a2a3a;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 2;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: rgba(0,0,0,0.5);
    z-index: -1;
    border-radius: 10px;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* 区块通用样式 */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
}

/* 公司简介 */
.about-section {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

/* 服务卡片 */
.services-section {
    background: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 30px;
}

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

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
    margin-top: auto;
}

.service-link:hover {
    border-bottom-color: var(--primary-color);
}

/* 技术实力 */
.technology-section {
    background: var(--white);
}

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

.tech-item {
    text-align: center;
    padding: 30px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: transform 0.3s;
}

.tech-item:hover {
    transform: translateY(-3px);
}

.tech-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

.tech-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.tech-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* 图片画廊 */
.gallery-section {
    background: var(--bg-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.gallery-overlay p {
    font-size: 14px;
    opacity: 0.9;
}

/* 联系表单 */
.contact-section {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 20px;
    margin-right: 15px;
    margin-top: 3px;
}

.contact-item div strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-item div span {
    color: var(--text-light);
}

.contact-form h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

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

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

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

/* 页脚 */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 36px;
    margin-bottom: 30px;
    align-items: start;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 18px;
    color: var(--white);
    letter-spacing: 0.5px;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.footer-brand img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    margin-right: 10px;
    border-radius: 4px;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

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

.contact-list li {
    display: flex;
    align-items: flex-start;
}

.contact-list li i {
    margin-right: 10px;
    margin-top: 3px;
    width: 16px;
}

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

/* 响应式设计 - 平板 */
@media (max-width: 992px) {
    .nav-link {
        padding: 8px 10px;
        font-size: 14px;
    }

    .nav-brand a {
        font-size: 15px;
    }

    .about-content {
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer-brand {
        justify-content: flex-start;
    }
}

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

    /* 手机端导航 - 汉堡菜单弹出 */
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        padding: 0;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 500;
        border-bottom: none !important;
        border-left: 3px solid transparent;
        transition: all 0.2s;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--primary-color);
        background: rgba(44, 90, 160, 0.06);
        border-left-color: var(--primary-color);
    }

    /* 移动端下拉菜单 */
    .nav-dropdown > .nav-link::after {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        margin-left: 4px;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background: rgba(44, 90, 160, 0.04);
        display: none;
    }

    .nav-dropdown.open > .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-menu li a {
        padding: 12px 24px;
        font-size: 14px;
        color: var(--text-secondary);
        justify-content: center;
        text-align: center;
        border-left: 3px solid transparent;
    }

    .nav-dropdown-menu li a:hover,
    .nav-dropdown-menu li a.active {
        background: rgba(44, 90, 160, 0.08);
        color: var(--primary-color);
        border-left-color: var(--primary-color);
    }

    /* 手机端LOGO缩小 */
    .nav-brand a {
        font-size: 13px;
    }

    .nav-brand img {
        height: 32px;
        width: 32px;
        margin-right: 8px;
    }

    /* 手机端hero */
    .hero {
        height: 420px;
    }

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

    .hero-subtitle {
        font-size: 15px;
    }

    /* 手机端通用区块 */
    section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .section-header h2 {
        font-size: 26px;
    }

    .section-header p {
        font-size: 15px;
    }

    /* 手机端两列网格 */
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-number {
        font-size: 20px;
    }

    /* 手机端服务卡片 */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 28px 24px;
    }

    /* 手机端技术 */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tech-item {
        padding: 20px 16px;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    /* 手机端图片画廊 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-item {
        height: 160px;
        border-radius: 8px;
    }

    /* 手机端联系信息 */
    .contact-item {
        padding: 12px;
    }

    .contact-item i {
        font-size: 18px;
        margin-right: 12px;
        width: 24px;
        text-align: center;
    }

    /* 手机端表单 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 15px;
    }

    /* 手机端页脚 */
    .footer {
        padding: 40px 0 16px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        text-align: left;
    }

    .footer-brand {
        justify-content: flex-start;
    }

    .contact-list li {
        justify-content: flex-start;
        font-size: 13px;
    }

    .footer-bottom {
        font-size: 12px;
        margin-top: 0;
        padding-top: 16px;
    }

    /* 手机端按钮 */
    .btn {
        padding: 10px 24px;
        font-size: 15px;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .navbar > .container {
        min-height: 56px;
    }

    .nav-menu {
        top: 56px;
    }

    .nav-brand a {
        font-size: 12px;
    }

    .nav-brand img {
        height: 28px;
        width: 28px;
        margin-right: 6px;
    }

    .container {
        padding: 0 16px;
    }

    section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .hero {
        height: 320px;
    }

    .hero-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-item {
        padding: 14px 10px;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .service-card {
        padding: 24px 18px;
    }

    .tech-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .tech-item {
        padding: 16px 12px;
    }

    .tech-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .tech-item h4 {
        font-size: 14px;
    }

    .tech-item p {
        font-size: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-item {
        height: 130px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 16px 12px;
    }

    .contact-item i {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

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

    /* 轮播控制按钮 */
    .hero-prev, .hero-next {
        padding: 10px 14px;
        font-size: 18px;
    }

    .hero-prev { left: 10px; }
    .hero-next { right: 10px; }

    .dot {
        width: 8px;
        height: 8px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 成功消息样式 */
.success-message {
    background: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.error-message {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}
