/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* 导航栏样式 */
.nav-link {
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0ea5e9;
    transition: width 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* 导航栏滚动效果 */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: 12px;
    padding-bottom: 12px;
}

/* 移动端导航菜单 */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Banner 样式 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
}

.banner-slide:nth-child(1) {
    background: url('../banner1.png') center/cover no-repeat;
}

.banner-slide:nth-child(2) {
    background: url('../banner2.png') center/cover no-repeat;
}

.banner-slide:nth-child(3) {
    background: url('../banner1.png') center/cover no-repeat;
}

/* 移动端图片优化 - 确保显示完整 */
@media (max-width: 768px) {
    /* Banner图片优化 */
    .hero-section {
        min-height: 100vh;
        padding: 60px 0;
        position: relative;
    }
    
    .banner-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .banner-slide {
        background-position: top center;
        background-size: cover;
        height: 100%;
        width: 100%;
    }
    
    .banner-slide .container {
        padding-top: 80px;
        padding-bottom: 40px;
        position: relative;
        z-index: 10;
    }
    
    /* 服务卡片图片优化 */
    .service-card .h-48 {
        height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .service-card .h-48 img {
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
    }
    
    /* 确保所有图片在手机上完整显示 */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* 小屏幕手机图片优化 */
@media (max-width: 480px) {
    .hero-section {
        min-height: 80vh;
        padding: 40px 0;
    }
    
    .banner-slide {
        background-position: top 20% center;
        background-size: cover;
    }
    
    .service-card .h-48 {
        height: 160px;
    }
    
    .service-card .h-48 img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

/* 按钮样式 */
.btn-primary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

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

/* 卡片样式 */
.service-card, .team-card, .job-card {
    transition: all 0.3s ease;
}

.service-card:hover, .team-card:hover, .job-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 团队卡片悬停效果 */
.team-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

/* 表单样式 */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
    outline: none;
}

/* 链接样式 */
a {
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    transform: translateY(-1px);
}

/* 滚动动画 */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade.active {
    opacity: 1;
    transform: translateY(0);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in, .fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.rotate {
    animation: rotate 20s linear infinite;
}

/* 波浪动画 */
@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.wave {
    animation: wave 15s linear infinite;
}

/* 骨架屏样式 */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .hero-section {
        height: auto;
        padding: 100px 0 50px;
    }
    
    .banner-slide {
        padding: 100px 0 50px;
    }
    
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}