/* ========================================
   JDL Overseas Hero区域动画增强
   Hero Section Animations & Effects
   ======================================== */

/* ========== Hero区域增强样式 ========== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 动态渐变背景 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        #1e6e2a 0%,
        #28a745 35%,
        #5cb85c 65%,
        #7ed688 100%
    );
    background-size: 300% 300%;
    animation: gradientFlow 20s ease infinite;
    z-index: 0;
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 装饰性波浪层 */
.hero::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 120px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,60 C200,20 400,100 600,60 C800,20 1000,100 1200,60 L1200,120 L0,120 Z" fill="%23f8f9fa"/></svg>') repeat-x;
    background-size: 1200px 120px;
    animation: waveMove 15s linear infinite;
    z-index: 2;
}

@keyframes waveMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 1200px 0;
    }
}

/* Hero内容容器 */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 标题动画 */
.hero-title {
    font-size: 56px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out 0.2s both;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero-title-main {
    display: block;
    font-size: 64px;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.hero-title-sub {
    display: block;
    font-size: 48px;
    font-weight: 400;
    opacity: 0.95;
}

/* 副标题动画 */
.hero-subtitle {
    font-size: 22px;
    color: white;
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.4s both;
    text-shadow: 0 1px 10px rgba(0,0,0,0.1);
    opacity: 0.95;
}

/* 按钮容器动画 */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* 淡入上移动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浮动装饰元素 */
.hero-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.15;
    z-index: 0;
}

.hero-decoration-1 {
    top: 15%;
    left: 8%;
    width: 120px;
    height: 120px;
    animation: float1 12s ease-in-out infinite;
}

.hero-decoration-2 {
    top: 20%;
    right: 10%;
    width: 100px;
    height: 100px;
    animation: float2 15s ease-in-out infinite;
}

.hero-decoration-3 {
    bottom: 25%;
    left: 12%;
    width: 80px;
    height: 80px;
    animation: float3 10s ease-in-out infinite;
}

.hero-decoration-4 {
    bottom: 30%;
    right: 15%;
    width: 90px;
    height: 90px;
    animation: float1 13s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-40px) rotate(-10deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(5deg);
    }
}

/* 光点粒子效果 - 简化兼容版 */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 12s ease-in-out infinite;
    -webkit-animation: particleFloat 12s ease-in-out infinite;
}

/* 简化粒子样式 - 只保留12个 */
.particle:nth-child(1) {
    width: 6px;
    height: 6px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.particle:nth-child(2) {
    width: 8px;
    height: 8px;
    left: 25%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.particle:nth-child(3) {
    width: 5px;
    height: 5px;
    left: 40%;
    animation-delay: 4s;
    animation-duration: 8s;
}

.particle:nth-child(4) {
    width: 7px;
    height: 7px;
    left: 55%;
    animation-delay: 1s;
    animation-duration: 11s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    left: 70%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.particle:nth-child(6) {
    width: 8px;
    height: 8px;
    left: 85%;
    animation-delay: 5s;
    animation-duration: 13s;
}

.particle:nth-child(7) {
    width: 5px;
    height: 5px;
    left: 15%;
    animation-delay: 2.5s;
    animation-duration: 10s;
}

.particle:nth-child(8) {
    width: 7px;
    height: 7px;
    left: 60%;
    animation-delay: 4.5s;
    animation-duration: 11s;
}

/* 绿色粒子（点缀） - 简化版 */
.particle:nth-child(9) {
    width: 6px;
    height: 6px;
    left: 30%;
    background: rgba(126, 214, 136, 0.8);
    animation-delay: 1.5s;
    animation-duration: 12s;
}

.particle:nth-child(10) {
    width: 7px;
    height: 7px;
    left: 50%;
    background: rgba(126, 214, 136, 0.8);
    animation-delay: 3.5s;
    animation-duration: 10s;
}

.particle:nth-child(11) {
    width: 5px;
    height: 5px;
    left: 75%;
    background: rgba(126, 214, 136, 0.8);
    animation-delay: 5.5s;
    animation-duration: 11s;
}

.particle:nth-child(12) {
    width: 6px;
    height: 6px;
    left: 90%;
    background: rgba(126, 214, 136, 0.8);
    animation-delay: 6.5s;
    animation-duration: 9s;
}

/* 粒子浮动动画 - 简化版（WebKit兼容） */
@-webkit-keyframes particleFloat {
    0% {
        bottom: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

@keyframes particleFloat {
    0% {
        bottom: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

/* 按钮增强动画 */
.hero-buttons .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero-buttons .btn:hover::before {
    width: 300px;
    height: 300px;
}

.hero-buttons .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* 滚动提示箭头 */
.hero-scroll-hint {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s ease-in-out infinite;
}

.hero-scroll-hint svg {
    width: 32px;
    height: 32px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* 徽章标识动画 */
.hero-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-3px);
}

.hero-badge svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

/* ========== 响应式适配 ========== */

@media (max-width: 1024px) {
    .hero {
        min-height: 75vh;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-title-main {
        font-size: 52px;
    }
    
    .hero-title-sub {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 60px 20px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-title-main {
        font-size: 40px;
    }
    
    .hero-title-sub {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 16px;
        align-items: center;  /* 确保按钮在移动端居中对齐 */
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-badges {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .hero-decoration {
        display: none;
    }
    
    /* 移动端粒子优化 - 确保可见性 */
    .hero-particles {
        z-index: 1 !important;
        display: block !important;
    }
    
    .particle {
        display: block !important;
        visibility: visible !important;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 65vh;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-title-main {
        font-size: 32px;
    }
    
    .hero-title-sub {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-scroll-hint {
        display: none;
    }
    
    /* 小屏幕粒子优化 - 简化动画 */
    .hero-particles {
        z-index: 1 !important;
    }
    
    .particle {
        animation-duration: 8s !important;
        -webkit-animation-duration: 8s !important;
    }
}

/* ========== 性能优化 ========== */

@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero::after,
    .hero-title,
    .hero-subtitle,
    .hero-buttons,
    .hero-badges,
    .hero-decoration-1,
    .hero-decoration-2,
    .hero-decoration-3,
    .hero-decoration-4,
    .particle,
    .hero-scroll-hint {
        animation: none !important;
    }
    
    .hero-buttons .btn:hover {
        transform: none;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .hero {
        min-height: auto;
        page-break-after: always;
    }
    
    .hero::before,
    .hero::after,
    .hero-decoration,
    .hero-particles,
    .hero-scroll-hint {
        display: none;
    }
}

/* ========== 横幅产品展示图（背景层） ========== */
.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    pointer-events: none;
    animation: fadeInScale 1.2s ease-out 0.3s both;
}

.hero-products-image {
    width: auto;
    max-width: 1200px;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    object-position: center;
    display: block;
    opacity: 0.85;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
    transition: all 0.5s ease;
}

.hero:hover .hero-products-image {
    opacity: 0.95;
    transform: scale(1.02);
}

/* 图片淡入缩放动画 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 0.85;
        transform: scale(1);
    }
}

/* 响应式适配 - 横幅图片 */
@media (max-width: 1400px) {
    .hero-products-image {
        max-width: 95%;
        max-height: 500px;
    }
}

@media (max-width: 1024px) {
    .hero-products-image {
        max-width: 90%;
        max-height: 450px;
        opacity: 0.75;
    }
}

@media (max-width: 768px) {
    .hero-products-image {
        max-width: 85%;
        max-height: 400px;
        opacity: 0.65;
    }
}

@media (max-width: 480px) {
    .hero-products-image {
        max-width: 80%;
        max-height: 300px;
        opacity: 0.55;
    }
}

/* 如果图片加载失败，隐藏容器 */
.hero-products-image[style*="display: none"] {
    display: none !important;
}






