/* 添加字体声明 */
@font-face {
    font-family: 'Cocogoose';
    src: url('/font/Cocogoose.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #D35400;
    --nav-height: 80px;
}

body {
    font-family: Arial, sans-serif;
    background-color: #333;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    background: #B84A1A;  /* 深橙色背景 */
    z-index: 1000;
    height: var(--nav-height);
}

nav {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    height: 40px;
}

.logo img {
    height: 100%;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;  /* 改为白色文字 */
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #fff;  /* 悬停时保持白色 */
    background: rgba(255, 255, 255, 0.1);  /* 添加半透明白色背景 */
}

.nav-links a.active {
    color: #fff;  /* 选中时为白色 */
    border: 1px solid #fff;  /* 白色边框 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* 在移动端可以改为汉堡菜单 */
    }
}

.hero {
    height: 1080px;
    width: 100%;
    overflow: hidden;
    position: relative; /* 添加相对定位 */
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1080px; /* 改为与hero一致的高度 */
    z-index: 1;
}

.hero-bg {
    width: 100%;
    height: 1080px;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    z-index: 2;
    bottom: 50px;
    left: 20%; /* 与 hero-text 对齐 */
    width: 60%; /* 左右各留20% */
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 1s;
    pointer-events: none;
    transform: none; /* 移除之前的 transform */
}

.hero-content img {
    width: 100%;
    height: auto;
}

.hero-button {
    /* position: relative;
    z-index: 2;
    left: 20%;
    top: 28%;
    transform: translateY(-50%); */
    width: 150px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 50px;
    background-color: #B7410E;
    color: #FFFFFF;
    border-radius: 14px;
    font-weight: bold;
    opacity: 0;
    animation: scaleIn 2s ease forwards;
    animation-delay: 0.6s;
    margin-top: 80px;
}

.hero-text {
    position: relative;
    z-index: 3; /* 提高文字的层级，确保在图片上方 */
    left: 20%;
    top: 200px;
    display: block;
    color: #FFFFFF;
    opacity: 0;
    transform-origin: left;
    animation: scaleTextIn 2s ease forwards;
    animation-delay: 0.5s;
    min-height: 300px; /* 确保文字区域有足够空间 */
}

.hero-text span:first-child {
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: bold;
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 3px solid #B7410E;
    margin-bottom: 10px;
}

.hero-text div {
    margin-top: 70px;
    font-size: 60px;
    font-weight: bold;
    line-height: 10px;
    font-family: 'Cocogoose', sans-serif;  /* 应用新字体 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero {
        height: 100vh;
    }

    .hero-bg-container {
        height: 100vh;
    }

    .hero-bg {
        height: 100vh;
    }

    .hero-content {
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        bottom: 30px;
        padding: 0 20px;
    }

    .hero-text {
        min-height: auto; /* 移动端不需要固定高度 */
    }

    .hero-button {
        display: none;
    }

    /* 移动端 hero-text 样式 */
    .hero-text {
        left: 5%; /* 调整左边距 */
        top: 15%;
        width: 90%; /* 控制文本区域宽度 */
        min-height: 350px;
    }

    .hero-text span:first-child {
        font-size: 16px; /* 减小第一行文字大小 */
        padding-bottom: 5px; /* 减小下边框间距 */
        border-bottom: 2px solid #B7410E; /* 减小下边框粗细 */
        line-height: 40px;
    }

    .hero-text div {
        margin-top: 6vw; /* 减小行间距 */
        font-size: 7vw; /* 减小标题文字大小 */
        line-height: 32px; /* 调整行高 */
    }

    .mobile-only.hero-button {
        display: inline-block;
        position: static;
        transform: none;
        width: 80%;
        margin: 10px 0;
        opacity: 1;
        animation: none;
        line-height: 40px;
        height: 40px;
        font-size: 14px;
        border-radius: 10px;
        background-color: #B7410E;
        color: white !important;
        border: none !important;
    }

    .nav-links .hero-button {
        background-color: #B7410E;
        color: white !important;
        border: none !important;
    }
}

.about-us {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #191919, #333333);
    position: relative;
    overflow: hidden;
}

.about-us-container {
    padding-top: 120px;
    padding-bottom: 100px;
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #F0F0F0;
    border-radius: 20px;
}

.about-bg {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 150px;
    font-family: 'Cocogoose', sans-serif;
    font-weight: bold;
    color: #333333;
    white-space: nowrap;
    z-index: 1;
    opacity: 0.03;  /* 保持一定的透明度 */
}

.about-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
    text-align: center;
}

.about-header {
    margin-bottom: 40px;
}

.about-header h2 {
    color: #FFFFFF;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(30px);
}

.about-header .underline {
    width: 40px;
    height: 3px;
    background-color: #B7410E;
    margin: 0 auto 15px;
}

.about-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    opacity: 0;
    transform: translateY(30px);
}

.about-description {
    color: #333333;
    font-size: 20px;
    line-height: 1.8;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    font-family: "Microsoft YaHei", sans-serif;
    font-weight: normal;  /* Regular 字重 */
    opacity: 0;
    transform: translateY(30px);
    padding: 10px;
}

/* 添加动画 */
.about-content {
    opacity: 0;
    transform: translateY(50px);
    animation: slideUpFade 1.5s ease forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-us img {
    width: 100%;
    height: auto;
    display: block; /* 移除图片底部可能的间隙 */
}

/* 添加平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

.advantage {
    background-color: #333;
    padding: 60px 20px;
    color: white;
    opacity: 0;
    transform: translateY(50px);
}

.advantage.animate {
    animation: advantageAnimation 1.2s ease forwards;
}

.advantage .underline {
    width: 40px;
    height: 3px;
    background-color: #B7410E;
    margin: 0 auto 15px;
}

@keyframes advantageAnimation {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advantage-header {
    text-align: center;
    margin-bottom: 50px;
}

.advantage-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.advantage-header p {
    color: #999;
    font-size: 18px;
}

.advantage-cards {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.advantage .card {
    flex: 1;
    /* background: white; */
    border-radius: 10px;
    padding: 20px;
}

.advantage .card img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .advantage-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .advantage .card {
        width: 100%;
        max-width: 400px;
    }
}

.services {
    background-color: #B84A1A;
    padding: 40px 20px 60px;
}

.services-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
}

.services-header.animate {
    animation: fadeUpAnimation 1s ease forwards;
}

.service-item {
    opacity: 0;
    transform: translateY(40px);
}

.service-item:nth-child(1).animate {
    animation: fadeUpAnimation 0.8s ease forwards;
    animation-delay: 0.3s;
}

.service-item:nth-child(2).animate {
    animation: fadeUpAnimation 1s ease forwards;
    animation-delay: 0.5s;
}

.service-item:nth-child(3).animate {
    animation: fadeUpAnimation 1.2s ease forwards;
    animation-delay: 0.7s;
}

.service-item:nth-child(4).animate {
    animation: fadeUpAnimation 1.4s ease forwards;
    animation-delay: 0.9s;
}

.services-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.services-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: white;
    margin: 10px auto 0;
}

.services-header p {
    font-size: 18px;
    opacity: 0.8;
}

.services-grid {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 20px;
}

.service-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 移动端单列显示 */
    }
}

.cases {
    background-color: #333;
    padding: 40px 20px 60px;
}

.cases-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.cases-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.cases-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #B7410E;
    margin: 10px auto 0;
}

.cases-header p {
    font-size: 18px;
    color: #999;
}

.cases-grid {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
}

.case-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cases {
        padding: 30px 15px 45px;
    }
    
    .cases-header h2 {
        font-size: 28px;
    }
}

.contact {
    background-color: #333;
    padding: 60px 20px;
    color: white;
}

.contact .underline {
    width: 40px;
    height: 3px;
    background-color: #B7410E;
    margin: 0 auto 15px;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.contact-header p {
    color: #999;
    font-size: 18px;
}

.contact-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-map {
    width: 100%;
}

.map-container {
    position: relative;
    width: 100%; /* 修改为100%宽度 */
    display: flex;
    justify-content: center;
}

.map-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 调整信息框的位置，使其相对于地图图片定位 */
.location-info1 {
    position: absolute;
    left: 33.5%;
    top: 23.5%;
    background-color: transparent;
}

.location-info2 {
    position: absolute;
    left: 49%;
    top: 26%;
    background-color: transparent;
}


.location-info3 {
    position: absolute;
    left: 70%;
    top: 26%;
    background-color: transparent;
}

.info-box {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 500px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4px;
    padding-left: 76px;
}

.info-box span {
    display: block;
    width: 100px;
    margin-bottom: 6px;
    border: none;
    border-radius: 4px;
    color: #444;
    font-size: 12px;
}

.info-box1 {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 180px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 4px;
    padding-left: 76px;
}

.info-box1 span {
    display: block;
    width: 100px;
    margin-bottom: 6px;
    border: none;
    border-radius: 4px;
    color: #444;
    font-size: 12px;
}

.info-box2 {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 220px;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 6px;
    padding-left: 76px;
}

.info-box2 span {
    display: block;
    width: 100px;
    margin-bottom: 6px;
    border: none;
    border-radius: 4px;
    color: #444;
    font-size: 12px;
}

/* 修改动画关键帧 */
@keyframes scaleTextIn {
    from {
        transform: scale(1.2);  /* 从大字体开始 */
        opacity: 0;
    }
    to {
        transform: scale(1);    /* 缩小到正常大小 */
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 添加动画类 */
.about-header h2.animate {
    animation: fadeUpAnimation 1s ease forwards;
}

.about-header p.animate {
    animation: fadeUpAnimation 1s ease forwards;
    animation-delay: 0.3s;
}

.about-description.animate {
    animation: fadeUpAnimation 1s ease forwards;
    animation-delay: 0.6s;
}

/* 修改动画关键帧 */
@keyframes fadeUpAnimation {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加新的动画关键帧 */
@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 修改 cases 相关样式 */
.cases-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    opacity: 0;
    transform: translateY(30px);
}

.cases-header.animate {
    animation: fadeUpAnimation 1s ease forwards;
}

.case-item {
    opacity: 0;
}

/* 从左往右的动画 */
.case-item:nth-child(1).animate {
    animation: slideFromLeft 1.2s ease forwards;
    animation-delay: 0.3s;
}

.case-item:nth-child(3).animate {
    animation: slideFromLeft 1.2s ease forwards;
    animation-delay: 0.7s;
}

/* 从右往左的动画 */
.case-item:nth-child(2).animate {
    animation: slideFromRight 1.2s ease forwards;
    animation-delay: 0.5s;
}

.case-item:nth-child(4).animate {
    animation: slideFromRight 1.2s ease forwards;
    animation-delay: 0.9s;
}

.back-to-top {
    position: fixed;
    bottom: -4px;
    right: 40px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top img {
    height: 30px;
}

/* 底部导航栏样式 */
footer {
    background: #ccc;
    height: var(--nav-height);
    width: 100%;
}

.footer-nav {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.copyright {
    color: #333;
    font-size: 14px;
}

.footer-links a {
    color: #999999 !important;  /* 覆盖原有的白色文字 */
    border-color: #808080 !important;  /* 覆盖原有的白色边框 */
}

.footer-links a:hover {
    background: rgba(0, 0, 0, 0.1) !important;  /* 修改悬停背景色 */
}

.footer-links a.active {
    background: rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-nav {
        flex-direction: column;
        padding: 20px;
        height: auto;
    }
    
    .copyright {
        margin-bottom: 15px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 汉堡菜单图标样式 */
.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 汉堡菜单激活状态 */
.menu-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* 修改现有的响应式样式 */
@media (max-width: 768px) {
    body {
        width: 100%;
        overflow-x: hidden; /* 防止水平滚动 */
    }

    .menu-icon {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100vw; /* 使用视口宽度 */
        background: #B84A1A;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
    }

    /* 确保所有section都不会产生水平滚动 */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* 在最顶部添加视口相关的meta样式 */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .location-info1 {
        position: absolute;
        left: 25%; /* 调整移动端位置 */
        top: 1%;
    }

    .info-box.info-box-phone {
        width: 300px; /* 减小宽度 */
        height: 150px; /* 减小高度 */
        padding-top: 2px;
        padding-left: 38px; /* 调整内边距 */
    }

    .info-box.info-box-phone span {
        font-size: 10px; /* 减小字体大小 */
        margin-bottom: 3px;
    }

    /* 调整地图容器在移动端的样式 */
    .map-container {
        width: 100%;
    }
}

/* 移动端专用样式 */
.mobile-only {
    display: none;
}

.global-support {
    text-align: center;
    margin-top: 50px;
}

.global-support h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.global-support p {
    color: #999;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact {
        padding: 40px 15px;
    }
    
    .contact-header h2 {
        font-size: 28px;
    }

    .global-support {
        margin-top: 30px;
        padding: 0 20px;
    }
}
