/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Hero区域 */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 30px;
    }
}

/* 通用区块样式 */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 公司概览 */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--text-dark);
    font-weight: 600;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.image-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.image-item:hover img {
    transform: scale(1.05);
}

/* 核心业务 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.service-details ul {
    list-style: none;
    padding-left: 0;
}

.service-details li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.service-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* 技术系统 */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.tech-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tech-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tech-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 优势特色 */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.advantage-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.advantage-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* 数据案例 */
.case-item {
    margin-bottom: 4rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.case-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.case-item:last-child {
    margin-bottom: 0;
}

.case-content {
    padding: 2.5rem;
}

.case-text {
    margin-bottom: 2rem;
}

.case-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 500;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.case-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.case-image-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--bg-light);
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 200px;
    max-height: 400px;
}

/* 兼容不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 4 / 3) {
    .case-image-item {
        height: 250px;
    }
}

.case-image-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.case-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
    background: var(--bg-light);
    /* 确保图片在不同设备上正确显示 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.case-image-item:hover img {
    transform: scale(1.05);
}

/* 团队与文化 */
.team-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.team-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.team-text p {
    margin-bottom: 1.5rem;
}

.team-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* 展望未来 */
.future-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.future-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.future-content .highlight {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.future-content .slogan {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 2rem;
}

/* 联系我们 */
.contact-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contact-section .section-title {
    color: white;
}

.contact-section .section-title::after {
    background: white;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: stretch;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.contact-icon {
    font-size: 2.5rem;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

.contact-phone {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    letter-spacing: 1px;
}


.map-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.map {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* 图片查看器（灯箱） */
.image-viewer {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.image-viewer.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#viewer-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    transition: opacity 0.3s ease;
}

/* 图片加载器 */
.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10002;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loader-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.image-viewer-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
}

/* 图片点击效果 */
img:not(.map):not(#viewer-image) {
    cursor: pointer !important;
    transition: var(--transition);
    pointer-events: auto !important;
}

img:not(.map):not(#viewer-image):hover {
    opacity: 0.9;
    transform: scale(1.02);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .case-images {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .case-image-item {
        aspect-ratio: 4 / 3;
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .team-images {
        grid-template-columns: 1fr;
    }

    .case-item {
        margin-bottom: 3rem;
    }

    .case-content {
        padding: 1.5rem;
    }

    .case-description {
        font-size: 1rem;
        padding: 1rem;
    }

    .case-images {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .case-image-item {
        aspect-ratio: 16 / 9;
        min-height: 180px;
        max-height: 300px;
    }

    .case-image-item img {
        height: 100%;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .map {
        max-height: 280px;
    }
    
    .map-container {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .service-card,
    .advantage-card {
        padding: 1.5rem;
    }

    .case-content {
        padding: 1rem;
    }

    .case-description {
        font-size: 0.95rem;
        padding: 0.8rem;
    }

    .case-image-item {
        aspect-ratio: 16 / 9;
        min-height: 150px;
        max-height: 250px;
    }

    .case-images {
        gap: 0.8rem;
    }

    .image-viewer-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
        width: 40px;
        height: 40px;
    }

    #viewer-image {
        max-width: 95%;
        max-height: 85%;
    }

    .image-viewer-info {
        bottom: 15px;
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1400px) {
    .case-image-item {
        max-height: 350px;
    }
}

/* 横屏平板优化 */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .case-images {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .case-image-item {
        aspect-ratio: 3 / 2;
    }
}
