/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 链接样式 */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* 列表样式 */
ul, ol {
    list-style: none;
}

/* 表单元素样式 */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

/* 根变量定义 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
}

/* 基础布局 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
    width: 100%;
}

.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

/* 间距工具类 */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }

/* 文字工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 标题样式 */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 主内容区域 */
.main-content {
    min-height: 100vh;
    width: 100%;
}

/* 英雄区域 */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 0;
}

.hero-text {
    max-width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#digital {
    background-attachment: scroll; /* 移动端禁用fixed背景 */
    background-size: cover;
    background-position: center;
}

#digital::before {
    background: rgba(0, 0, 0, 0.5); /* 移动端加深遮罩 */
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.98);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    backdrop-filter: blur(10px);
}

.nav-menu.active {
    left: 0;
}

.nav-item {
    margin: 1rem 0;
}

.hamburger {
    display: flex;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 移动端关于我们上下布局 */
.about-top-section {
    grid-template-columns: 1fr;
    gap: 40px;
}

.about-video-section {
    order: 1;
}

.about-text-section {
    order: 2;
    padding-left: 0;
    text-align: center;
}

/* 客户案例去掉左右图标 */
.client-slider-container {
    padding: 0 20px;
}

.prev-btn,
.next-btn {
    display: none;
}

/* 数字化展示全屏左侧内容 */
.digital-showcase {
    grid-template-columns: 1fr;
    gap: 40px;
}

.digital-grid.full-width {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
    gap: 20px;
    padding: 0 15px;
}

.digital-item {
    padding: 1.5rem;
}

.digital-icon {
    font-size: 2.5rem;
}

.digital-preview {
    display: none;
}

/* 移动端友情链接适配 */
.contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 100%;
}

.contact-info,
.contact-form {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.contact-info h3,
.contact-form h3 {
    font-size: 20px;
    text-align: center;
}

.contact-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.contact-item i {
    margin-right: 0;
    margin-bottom: 10px;
}

/* 友情链接 */
.friendship-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.friendship-links h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.link-item::before {
    content: "🔗";
    font-size: 14px;
    margin-right: 4px;
}

@media (max-width: 576px) {
    .digital-grid.full-width {
        grid-template-columns: 1fr;
        max-width: 280px;
        gap: 20px;
    }
    
    /* 移动端友情链接适配 */
    .links-container {
        gap: 12px;
        justify-content: center;
        padding: 0 1rem;
    }
    
    .link-item {
        padding: 8px 16px;
        font-size: 13px;
    }
}
}

/* 响应式设计 - 兼容各大终端 */

/* 超大屏幕 (1200px以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 大屏幕 (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .client-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 中等屏幕 (768px - 991px) - 平板横屏 */
@media (max-width: 991px) and (min-width: 768px) {
    #home {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        min-height: auto;
        padding: 3rem 2rem;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-text {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 3.2rem;
        line-height: 1.3;
        margin-bottom: 2rem;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
        line-height: 1.6;
        margin-bottom: 2.5rem;
        opacity: 0.85;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .client-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .digital-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-item {
        align-items: center;
        text-align: center;
    }
    
    /* 重新设计的关于我们平板适配 */
    .about-top-section {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-text-section {
        padding-left: 0;
        text-align: center;
    }
    
    .about-text-section .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* 小屏幕 (481px - 767px) - 手机横屏/平板竖屏 */
@media (max-width: 767px) and (min-width: 481px) {
    :root {
        --section-padding: 2rem 1rem;
    }
    
    #home {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding: 2rem 1.5rem;
        min-height: auto;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-text {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 2.8rem;
        line-height: 1.25;
        margin-bottom: 1.5rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        line-height: 1.5;
        margin-bottom: 2rem;
        opacity: 0.85;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .client-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .digital-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-item {
        align-items: center;
        text-align: center;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .floating-card {
        display: none;
    }
    
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .client-slider-container {
        padding: 0 40px;
    }
    
    .prev-btn,
    .next-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
}

/* 超小屏幕 (320px - 480px) - 手机竖屏 */
@media (max-width: 480px) {
    :root {
        --section-padding: 1.5rem 0.5rem;
    }
    
    #home {
        min-height: 100vh;
        height: 100vh;
        max-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1.5rem;
        min-height: auto;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .hero-text {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2.4rem;
        line-height: 1.3;
        margin-bottom: 1.2rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.5;
        margin-bottom: 1.8rem;
        opacity: 0.85;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        word-break: break-word;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 260px;
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        font-weight: 600;
    }
    

    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card,
    .client-item,
    .digital-item {
        padding: 1.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .client-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .client-item {
        padding: 1rem;
    }
    
    .digital-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .digital-item {
        padding: 1.5rem;
    }
    
    .digital-icon {
        font-size: 2.5rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .section {
        padding: 1.5rem 0.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        word-break: break-word;
    }
    
    .section-subtitle {
        font-size: 1rem;
        word-break: break-word;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .footer-section {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .footer-section h3,
    .footer-section h4 {
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
        padding: 0;
        margin: 0;
    }
    
    .footer-section ul li {
        text-align: center;
    }
    
    .footer-bottom {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    .client-slider-container {
        padding: 0 30px;
    }
    
    .prev-btn,
    .next-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .prev-btn {
        left: 0;
    }
    
    .next-btn {
        right: 0;
    }
    
    .qr-popup {
        width: 100px;
        padding: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .nav {
        padding: 0 1rem;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    /* 重新设计的关于我们超小屏幕适配 */
    .about-top-section {
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .about-video-section .video-container video {
        height: 250px;
    }
    
    .about-text-section h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .about-text-section p {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .about-text-section .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .about-bottom-section h3 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificate-image {
        height: 200px;
    }
    
    /* 资质展示移动端适配 */
    .qualification-item,
    .qualification-item.reverse {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .qualification-image {
        width: 150px;
        height: 112px;
        margin: 0 auto;
    }
    
    .qualification-info {
        padding: 0;
    }
    
    .qualification-info h4 {
        font-size: 1.2rem;
    }
    
    .qualification-info p {
        font-size: 0.95rem;
    }
}

/* 移动端通用修复 */
@media (max-width: 768px) {
    .contact-grid,
    .footer-content {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    .contact-info,
    .contact-form,
    .footer-section {
        width: 100%;
        max-width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .contact-item {
        align-items: center;
        text-align: center;
    }
    
    .footer-section h3,
    .footer-section h4 {
        text-align: center;
    }
    
    .footer-section ul {
        text-align: center;
        padding: 0;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .contact-grid,
    .footer-content {
        padding: 0 0.5rem;
    }
}

/* 超小屏幕 (小于320px) */
@media (max-width: 319px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
}

/* 动画和过渡效果 */
.section {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

/* 触摸设备优化 */
.touch-device .service-card,
.touch-device .client-item,
.touch-device .digital-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.touch-hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.back-to-top.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端返回顶部按钮 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* 合作伙伴和友情链接区域 */
.partners-friendship-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 0;
    position: relative;
}

.partners-friendship-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.partners-friendship-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.partners-section {
    margin-bottom: 60px;
    text-align: center;
}

.partners-section h3,
.friendship-links h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.partners-section h3::after,
.friendship-links h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.partner-item {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 180px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.partner-logo {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.friendship-links {
    text-align: center;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.link-item::before {
    content: "🔗";
    font-size: 14px;
    transition: transform 0.3s ease;
}

.link-item:hover::before {
    transform: rotate(45deg);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .partners-friendship-section {
        padding: 60px 0;
    }
    
    .partners-section,
    .friendship-links {
        margin-bottom: 50px;
    }
    
    .partners-section h3,
    .friendship-links h3 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
    }
    
    .partner-item {
        padding: 20px 15px;
        height: 100px;
        max-width: 150px;
    }
    
    .partner-logo {
        max-height: 50px;
    }
    
    .links-container {
        gap: 15px;
        justify-content: center;
    }
    
    .link-item {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .partners-friendship-section {
        padding: 40px 0;
    }
    
    .partners-section h3,
    .friendship-links h3 {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .partner-item {
        padding: 15px 10px;
        height: 80px;
        max-width: 120px;
    }
    
    .partner-logo {
        max-height: 40px;
    }
    
    .links-container {
        gap: 12px;
    }
    
    .link-item {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* 移动端滚动优化 */
@media (max-width: 768px) {
    .main-content {
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        overflow-x: hidden;
    }
    
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}