/**
 * 导航栏样式优化
 * 改善头部导航栏的布局协调性
 */

/* ===== 导航栏基础优化 ===== */

/* 1. 导航栏容器优化 */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* 2. 导航容器布局优化 */
.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    height: 70px !important;
    gap: 20px !important;
}

/* 3. Logo区域优化 */
.logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
}

.logo-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    color: inherit !important;
    gap: 15px !important;
}

/* Logo样式已移至logo-styles.css */

.logo-text {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
}

.logo-text .company-name {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
    white-space: nowrap !important;
}

.logo-text .company-en {
    font-size: 11px !important;
    color: #666 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* 4. 导航菜单优化 */
.nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    flex: 1 !important;
    justify-content: center !important;
}

.nav-link {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    position: relative !important;
}

.nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1) !important;
}

.nav-link.active {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.15) !important;
}

/* 导航链接下划线效果 */
.nav-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 2px !important;
    background: #667eea !important;
    transition: all 0.3s ease !important;
    transform: translateX(-50%) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80% !important;
}

/* 5. 联系我们按钮优化 */
.contact-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: 120px !important;
    position: relative !important;
    overflow: hidden !important;
}

.contact-btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: left 0.5s ease !important;
}

.contact-btn:hover::before {
    left: 100% !important;
}

.contact-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.contact-btn.active {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
}

/* 6. 汉堡菜单优化 */
.hamburger {
    display: none !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.hamburger .bar {
    width: 20px !important;
    height: 2px !important;
    background: #333 !important;
    margin: 2px 0 !important;
    border-radius: 1px !important;
    transition: 0.3s !important;
    transform-origin: center !important;
}

/* ===== 响应式优化 ===== */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 16px !important;
        gap: 16px !important;
    }
    
    .nav-menu {
        gap: 20px !important;
    }
    
    .nav-link {
        font-size: 15px !important;
        padding: 8px 14px !important;
    }
    
    .contact-btn {
        padding: 10px 20px !important;
        font-size: 15px !important;
        min-width: 110px !important;
    }
    
    .logo-img {
        width: 48px !important;
        height: 48px !important;
    }
    
    .logo-text .company-name {
        font-size: 19px !important;
    }
    
    .logo-text .company-en {
        font-size: 10px !important;
    }
}

/* 移动端设备 (768px以下) */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px !important;
        gap: 12px !important;
        height: 65px !important;
    }

    /* 隐藏桌面端导航菜单 */
    .nav-menu {
        display: none !important;
    }

    /* 隐藏移动端联系我们按钮 */
    .contact-btn {
        display: none !important;
    }

    /* 显示汉堡菜单 */
    .hamburger {
        display: flex !important;
    }

    /* 调整Logo大小 - 移动端保持较大尺寸 */
    .logo-img {
        width: 45px !important;
        height: 45px !important;
    }

    .logo-text .company-name {
        font-size: 18px !important;
    }

    .logo-text .company-en {
        font-size: 9px !important;
    }
}

/* 小屏手机 (480px以下) */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px !important;
        gap: 8px !important;
        height: 60px !important;
    }
    
    .logo-img {
        width: 42px !important;
        height: 42px !important;
    }
    
    .logo-text .company-name {
        font-size: 17px !important;
    }
    
    .logo-text .company-en {
        font-size: 8px !important;
    }
    
    .contact-btn {
        padding: 6px 12px !important;
        font-size: 13px !important;
        min-width: 90px !important;
    }
    
    .hamburger {
        width: 40px !important;
        height: 40px !important;
    }
    
    .hamburger .bar {
        width: 18px !important;
        height: 2px !important;
    }
}

/* 超小屏手机 (360px以下) */
@media (max-width: 360px) {
    .nav-container {
        padding: 0 8px !important;
        gap: 6px !important;
    }
    
    .logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .logo-text .company-name {
        font-size: 16px !important;
    }
    
    .logo-text .company-en {
        font-size: 7px !important;
    }
    
    .contact-btn {
        padding: 5px 10px !important;
        font-size: 12px !important;
        min-width: 80px !important;
    }
}

/* ===== 特殊状态优化 ===== */

/* 滚动时的导航栏 */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.15) !important;
}

/* 汉堡菜单激活状态 */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px) !important;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0 !important;
    transform: scale(0) !important;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px) !important;
}

/* ===== 动画优化 ===== */

/* 平滑过渡 */
.navbar,
.nav-container,
.logo,
.nav-menu,
.contact-btn,
.hamburger {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 悬停效果 */
.nav-link:hover,
.contact-btn:hover,
.hamburger:hover {
    transition: all 0.2s ease !important;
}

/* ===== 无障碍优化 ===== */

/* 焦点状态 */
.nav-link:focus,
.contact-btn:focus,
.hamburger:focus {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover,
    .contact-btn:hover,
    .hamburger:hover {
        background: transparent !important;
        transform: none !important;
    }
    
    .nav-link:active,
    .contact-btn:active,
    .hamburger:active {
        background: rgba(102, 126, 234, 0.1) !important;
    }
}

/* ===== Hero区域样式优化 ===== */

/* Hero区域基础样式 */
.hero-section {
    height: 75vh !important;
    position: relative !important;
    background: linear-gradient(135deg, #4CAF50 0%, #1976D2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 70px !important;
    overflow: hidden !important;
}

/* Hero内容容器 */
.hero-content {
    text-align: center !important;
    color: white !important;
    max-width: 800px !important;
    padding: 0 20px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Hero主标题 */
.hero-title {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
    color: white !important;
    white-space: nowrap !important;
    letter-spacing: 1px !important;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2) !important;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1) !important;
}

/* Hero副标题 */
.hero-subtitle {
    font-size: 1.5rem !important;
    margin-bottom: 40px !important;
    color: white !important;
    font-weight: 500 !important;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.6),
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.5px !important;
    line-height: 1.8 !important;
    opacity: 1 !important;
}

/* Hero按钮区域 */
.hero-buttons {
    display: flex !important;
    gap: 20px !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 20 !important;
}

/* Hero指示点 */
.hero-dots {
    position: absolute !important;
    bottom: 50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 15px !important;
    z-index: 100 !important;
}

/* Hero指示点样式 */
.dot {
    width: 15px !important;
    height: 15px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    position: relative !important;
    overflow: hidden !important;
}

.dot.active {
    background: white !important;
    transform: scale(1.5) !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8) !important;
}

/* Hero滑块样式 */
.hero-slider {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
}

.hero-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: translateX(100px) !important;
    transition: all 0.8s ease-in-out !important;
}

.hero-slide.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* 响应式Hero样式 */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 70vh !important;
        margin-top: 65px !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
    }
    
    .hero-buttons {
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 60vh !important;
        margin-top: 60px !important;
    }
    
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-buttons {
        gap: 10px !important;
    }
    
    .hero-dots {
        bottom: 30px !important;
    }
}
