/* ==========================================
   全局样式优化
   ========================================== */
:root {
    /* 主色调优化 - 增强对比度和饱和度 */
    --primary-color: #1a4d8f;
    --secondary-color: #2b8ed6;
    --accent-color: #1e6bb8;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --gradient-start: #1a4d8f;
    --gradient-end: #2b8ed6;
    
    /* 新增颜色变量 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* 阴影优化 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 过渡效果 */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 优化渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 优化浮动动画 - 更自然的运动 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-25px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

/* 优化脉冲动画 - 更柔和的效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* 新增动画：淡入缩放 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 新增动画：滑动进入 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 新增动画：滑动进入右侧 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 新增动画：旋转 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 新增动画：弹跳 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'SimHei', sans-serif;
    color: #334155;
    line-height: 1.7;
    overflow-x: hidden;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================
   导航栏样式优化
   ========================================== */
.navbar {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(26, 77, 143, 0.98) 0%, rgba(43, 142, 214, 0.98) 100%);
    padding: 0.6rem 0;
    box-shadow: var(--shadow-xl);
}

.logo-img {
    height: 48px;
    width: auto;
    transition: transform var(--transition-base);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-brand:hover .logo-img {
    transform: scale(1.08) rotate(3deg);
}

.brand-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    margin: 0 0.3rem;
    border-radius: 30px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::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 var(--transition-slow), height var(--transition-slow);
}

.navbar-nav .nav-link:hover::before {
    width: 300px;
    height: 300px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   Hero/Banner区域优化
   ========================================== */
.hero-section {
    min-height: 100vh;
    background: url('../images/banner.png') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

/* Banner区装饰圆形 - 优化动画 */
.hero-section::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 70%, transparent 100%);
    border-radius: 50%;
    top: -120px;
    right: -120px;
    animation: float 8s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.2);
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 70%, transparent 100%);
    border-radius: 50%;
    bottom: 120px;
    left: 60px;
    animation: float 10s ease-in-out infinite;
    animation-delay: 1.5s;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.15);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(26, 77, 143, 0.88) 0%,
            rgba(43, 142, 214, 0.82) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    font-size: 1.6rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.95);
}

/* 优化动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in-delay {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* 按钮样式优化 */
.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all var(--transition-base);
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(26, 77, 143, 0.5);
    background: linear-gradient(135deg, var(--accent-color), var(--gradient-end));
}

.btn-primary:active {
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2.5px solid #fff;
    border-radius: 50px;
    font-weight: 700;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn-outline-light:hover::before {
    width: 400px;
    height: 400px;
}

.btn-outline-light:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* ==========================================
   通用区块样式优化
   ========================================== */
section {
    position: relative;
    overflow: hidden;
}

/* 区块装饰元素 - 优化效果 */
section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26, 77, 143, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    pointer-events: none;
    animation: pulse 12s ease-in-out infinite;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-color);
    position: relative;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 100px;
    height: 5px;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(26, 77, 143, 0.3);
}

/* ==========================================
   关于我们 - 特色卡片优化
   ========================================== */
.feature-card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end), var(--gradient-start));
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform var(--transition-slow);
    animation: gradientShift 4s linear infinite;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.feature-icon {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.4);
    transition: all var(--transition-base);
    animation: pulse 4s ease-in-out infinite;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 10px 30px rgba(26, 77, 143, 0.5);
}

.feature-card .card-title {
    font-weight: 800;
    color: var(--dark-color);
}

/* ==========================================
   服务项目卡片优化
   ========================================== */
.service-card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end), var(--gradient-start));
    background-size: 200% 100%;
    transform: scaleX(0);
    transition: transform var(--transition-slow);
    animation: gradientShift 3s linear infinite;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: var(--shadow-2xl);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 1.2rem;
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.4);
    transition: all var(--transition-base);
    animation: pulse 3.5s ease-in-out infinite;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 12px 35px rgba(26, 77, 143, 0.6);
}

/* ==========================================
   联系我们优化
   ========================================== */
.contact-card {
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end), var(--gradient-start));
    background-size: 200% 100%;
    animation: gradientShift 4s linear infinite;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1.8rem;
    margin-bottom: 2rem;
    transition: all var(--transition-base);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.4);
    transition: all var(--transition-base);
    animation: pulse 4s ease-in-out infinite;
}

.contact-item:hover .contact-icon {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 10px 30px rgba(26, 77, 143, 0.5);
}

.contact-info h5 {
    font-weight: 800;
    color: var(--dark-color);
}

/* ==========================================
   Footer优化
   ========================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1e293b 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end), var(--gradient-start));
    background-size: 200% 100%;
    animation: gradientShift 5s linear infinite;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    transition: all var(--transition-base);
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transform: translateY(-5px) rotate(360deg);
    color: #fff;
    box-shadow: 0 8px 25px rgba(26, 77, 143, 0.5);
}

/* ==========================================
   返回顶部按钮优化
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 35px;
    right: 35px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 6px 20px rgba(26, 77, 143, 0.5);
    z-index: 9999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    animation: fadeInScale 0.5s ease-out;
}

.back-to-top:hover {
    transform: translateY(-8px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(26, 77, 143, 0.6);
}

.back-to-top:active {
    transform: translateY(-4px);
}

/* ==========================================
   响应式设计优化
   ========================================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .hero-section .lead {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.8rem 2.2rem !important;
        font-size: 1rem;
    }

    .brand-text {
        font-size: 1.3rem;
    }

    .logo-img {
        height: 42px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .feature-card,
    .service-card {
        border-radius: 16px;
    }

    .feature-icon,
    .service-icon,
    .contact-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }
}

/* ==========================================
   背景装饰和粒子效果优化
   ========================================== */
.bg-light {
    position: relative;
    background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 100%) !important;
}

.bg-light::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(43, 142, 214, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -300px;
    left: -300px;
    pointer-events: none;
    animation: pulse 10s ease-in-out infinite;
}

/* 添加装饰性几何图形 */
.contact-card::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(26, 77, 143, 0.06), rgba(43, 142, 214, 0.06));
    border-radius: 24px;
    top: -25px;
    right: -25px;
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

.contact-card .card-body {
    position: relative;
    z-index: 1;
}

/* 关于我们区域背景装饰 */
#about {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
}

#about::before {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle at center, rgba(26, 77, 143, 0.1) 0%, rgba(43, 142, 214, 0.04) 50%, transparent 70%);
    border-radius: 50%;
    top: 10%;
    left: -250px;
    pointer-events: none;
    z-index: 0;
    animation: pulse 15s ease-in-out infinite;
}

#about::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at center, rgba(43, 142, 214, 0.12) 0%, rgba(26, 77, 143, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    bottom: 5%;
    right: -120px;
    pointer-events: none;
    z-index: 0;
    animation: float 18s ease-in-out infinite;
}

#about .container {
    position: relative;
    z-index: 1;
}

/* 服务项目区域背景装饰 */
#services {
    position: relative;
    background:
        radial-gradient(circle at 20% 80%, rgba(26, 77, 143, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(43, 142, 214, 0.05) 0%, transparent 50%),
        #ffffff;
}

#services::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at center, rgba(26, 77, 143, 0.12) 0%, rgba(43, 142, 214, 0.06) 40%, transparent 70%);
    border-radius: 50%;
    top: -120px;
    right: -180px;
    pointer-events: none;
    z-index: 0;
    animation: pulse 12s ease-in-out infinite;
}

#services::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at center, rgba(43, 142, 214, 0.14) 0%, rgba(26, 77, 143, 0.07) 40%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    pointer-events: none;
    z-index: 0;
    animation: float 15s ease-in-out infinite;
}

#services .container {
    position: relative;
    z-index: 1;
}

/* ==========================================
   新增：滚动动画效果
   ========================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   新增：加载动画
   ========================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================
   新增：焦点状态优化
   ========================================== */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 77, 143, 0.3);
}

/* ==========================================
   新增：打印样式
   ========================================== */
@media print {
    .navbar,
    .footer,
    .back-to-top {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ==========================================
   新增：暗色模式支持
   ========================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1e293b;
        --dark-color: #f8fafc;
    }
    
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }
}

/* ==========================================
   新增：可访问性优化
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
