/* 现代化移动端 Hero 和 Header 设计 */

/* 桌面端重置 - 确保桌面端不受移动端样式影响 */
@media screen and (min-width: 769px) {
    body {
        padding-top: 0 !important;
    }
    
    header {
        position: relative !important;
    }
    
    /* 确保桌面端视频正常显示 */
    .video-section {
        position: relative !important;
        z-index: auto !important;
        background-color: #f3f7ff !important;
        padding: 100px 0 !important;
    }
    
    .youtube-container {
        position: relative !important;
        z-index: auto !important;
        width: 100% !important;
        height: 0 !important;
        padding-bottom: 56.25% !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    #company-video {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        z-index: auto !important;
    }
    
    .video-placeholder {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: auto !important;
    }
}

/* 移动端 Header 现代化设计 */
@media screen and (max-width: 768px) {
    /* Header 重新设计 */
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        height: 60px !important;
        padding: 0 !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s ease !important;
    }
    
    header .container {
        height: 60px !important;
        padding: 0 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Logo 区域优化 */
    .logo {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        margin: 0 !important;
    }
    
    .logo a {
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        height: 40px !important;
    }
    
    .logo-img {
        height: 35px !important;
        width: auto !important;
        margin-right: 8px !important;
        object-fit: contain !important;
    }
    
    .logo h1 {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        color: #0066cc !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        max-width: 120px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* 汉堡菜单现代化 */
    .mobile-menu-toggle {
        width: 40px !important;
        height: 40px !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 8px !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(0, 102, 204, 0.1) !important;
    }
    
    .mobile-menu-toggle span {
        width: 22px !important;
        height: 2px !important;
        background: #0066cc !important;
        margin: 2px 0 !important;
        transition: all 0.3s ease !important;
        border-radius: 1px !important;
        display: block !important;
    }
    
    /* 汉堡菜单动画效果 */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px) !important;
    }
    
    /* 导航菜单现代化 */
    nav {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
        z-index: 999 !important;
    }
    
    nav.mobile-menu-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    nav ul {
        list-style: none !important;
        margin: 0 !important;
        padding: 20px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    nav li {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    nav a {
        display: block !important;
        padding: 15px 20px !important;
        color: #333 !important;
        text-decoration: none !important;
        font-size: 1.1rem !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
        border-left: 4px solid transparent !important;
        position: relative !important;
    }
    
    nav a:hover,
    nav a.active {
        background: linear-gradient(90deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 102, 204, 0.05) 100%) !important;
        color: #0066cc !important;
        border-left-color: #0066cc !important;
        transform: translateX(5px) !important;
    }
    
    /* 为body添加顶部间距，避免被固定header遮挡 - 仅在移动端生效 */
    body {
        padding-top: 60px !important;
    }
    
    /* 确保视频区域在移动端正常显示 */
    .video-section {
        margin-top: 0 !important;
        padding-top: 40px !important;
    }
    
    .youtube-container {
        position: relative !important;
        z-index: 1 !important;
    }
}

/* Hero 区域现代化设计 */
@media screen and (max-width: 768px) {
    /* Hero 容器重新设计 */
    .hero {
        height: calc(100vh - 60px) !important;
        min-height: 500px !important;
        max-height: 700px !important;
        position: relative !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin-top: 0 !important;
    }
    
    /* Hero 轮播容器 */
    .hero-carousel {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .carousel-slide {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        opacity: 0 !important;
        transition: opacity 0.8s ease-in-out !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }
    
    .carousel-slide.active {
        opacity: 1 !important;
    }
    
    /* Hero 背景图片优化 */
    .slide-background {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        z-index: 1 !important;
        opacity: 0.9 !important;
    }
    
    /* Hero 内容区域 */
    .hero .container {
        position: relative !important;
        z-index: 2 !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 15px !important;
        text-align: center !important;
    }
    
    .hero-content,
    .hero-content-right {
        width: 100% !important;
        max-width: 400px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-radius: 20px !important;
        padding: 30px 25px !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        transform: translateY(20px) !important;
        animation: heroFadeIn 1s ease-out 0.5s forwards !important;
        opacity: 0 !important;
    }
    
    .hero-content h1,
    .hero-content-right h1 {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #0066cc !important;
        margin: 0 0 15px 0 !important;
        line-height: 1.3 !important;
        background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
    }
    
    .hero-content p,
    .hero-content-right p {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        color: #555 !important;
        margin: 0 0 20px 0 !important;
        font-weight: 400 !important;
    }
    
    /* Hero 按钮优化 */
    .hero .btn {
        background: linear-gradient(135deg, #0066cc 0%, #004499 100%) !important;
        color: white !important;
        border: none !important;
        padding: 12px 30px !important;
        border-radius: 25px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        display: inline-block !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3) !important;
    }
    
    .hero .btn:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 12px 30px rgba(0, 102, 204, 0.4) !important;
    }
    
    /* 轮播控制点现代化 */
    .carousel-dots {
        position: absolute !important;
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 12px !important;
        z-index: 3 !important;
    }
    
    .dot {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.5) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
    }
    
    .dot.active {
        background: #0066cc !important;
        border-color: #0066cc !important;
        transform: scale(1.2) !important;
    }
    
    /* 轮播箭头隐藏（移动端使用滑动） */
    .carousel-arrow {
        display: none !important;
    }
}

/* Hero 动画效果 */
@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 小屏幕进一步优化 */
@media screen and (max-width: 480px) {
    header {
        height: 55px !important;
    }
    
    header .container {
        height: 55px !important;
        padding: 0 12px !important;
    }
    
    .logo-img {
        height: 30px !important;
        margin-right: 6px !important;
    }
    
    .logo h1 {
        font-size: 0.8rem !important;
        max-width: 100px !important;
    }
    
    nav {
        top: 55px !important;
    }
    
    body {
        padding-top: 55px !important;
    }
    
    .hero {
        height: calc(100vh - 55px) !important;
        min-height: 450px !important;
    }
    
    .hero-content,
    .hero-content-right {
        padding: 25px 20px !important;
        max-width: 350px !important;
    }
    
    .hero-content h1,
    .hero-content-right h1 {
        font-size: 1.6rem !important;
    }
    
    .hero-content p,
    .hero-content-right p {
        font-size: 1rem !important;
    }
    
    .carousel-dots {
        bottom: 20px !important;
    }
    
    .dot {
        width: 10px !important;
        height: 10px !important;
        gap: 10px !important;
    }
}

/* 极小屏幕优化 */
@media screen and (max-width: 360px) {
    header {
        height: 50px !important;
    }
    
    header .container {
        height: 50px !important;
        padding: 0 10px !important;
    }
    
    .logo-img {
        height: 28px !important;
    }
    
    .logo h1 {
        font-size: 0.75rem !important;
        max-width: 90px !important;
    }
    
    nav {
        top: 50px !important;
    }
    
    body {
        padding-top: 50px !important;
    }
    
    .hero {
        height: calc(100vh - 50px) !important;
        min-height: 400px !important;
    }
    
    .hero-content,
    .hero-content-right {
        padding: 20px 15px !important;
        max-width: 300px !important;
        border-radius: 15px !important;
    }
    
    .hero-content h1,
    .hero-content-right h1 {
        font-size: 1.4rem !important;
        margin-bottom: 12px !important;
    }
    
    .hero-content p,
    .hero-content-right p {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    .hero .btn {
        padding: 10px 25px !important;
        font-size: 0.9rem !important;
    }
}

/* 触摸设备优化 */
@media screen and (max-width: 768px) and (pointer: coarse) {
    .mobile-menu-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    nav a {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .dot {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .dot::before {
        content: '' !important;
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: currentColor !important;
    }
}

/* 页面过渡优化 */
@media screen and (max-width: 768px) {
    .page-transition {
        opacity: 0 !important;
        transform: translateY(20px) !important;
        transition: all 0.6s ease-out !important;
    }
    
    .page-transition.loaded {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
} 