/* 合作伙伴页面专用样式 */

/* 页面整体样式 */
.partners-content {
    background-color: #f7f6ff;
    min-height: 100vh;
    padding-top: 3.875rem;
}

/* 导航栏激活状态 */
.header-menu ul li a.active {
    color: #6668fa;
    font-weight: 600;
    position: relative;
}

/* Hero区域 */
.partners-hero {
    /* background: linear-gradient(135deg, rgb(102, 107, 250) 0%, rgb(80, 85, 220) 100%); */
    background: #6668fa;
    color: white;
    padding: 4rem 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.partners-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.partners-hero-container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.partners-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out;
}

.partners-hero-title .highlight {
    background: linear-gradient(45deg, #fff, #f0f2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.partners-hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    border-radius: 0.125rem;
}

.partners-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.partners-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 0.25rem;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    border-radius: 0.125rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #f0f2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* 合作伙伴分类区域 */
.partners-categories {
    padding: 3rem 0;
    background-color: #fff;
}

.partners-container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 2rem;
    user-select: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 0.25rem;
    background: linear-gradient(90deg, #6668fa, rgb(80, 85, 220));
    border-radius: 0.125rem;
}

/* Tab导航样式 */
.partners-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 3rem;
    border-radius: 0.75rem;
    background: rgba(102, 104, 250, 0.1);
    padding: 0.25rem;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}

.tab-button {
    background: transparent;
    border: none;
    padding: 0.75rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #6668fa;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    flex: 1;
}

.tab-button:hover {
    background: rgba(102, 104, 250, 0.1);
}

.tab-button.active {
    background: #6668fa;
    color: white;
    box-shadow: 0 0.125rem 0.5rem rgba(102, 104, 250, 0.3);
}

.partners-grid-container {
    margin-top: 2rem;
}

/* 合作伙伴网格 */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.partner-card {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border-radius: 1rem;
    padding: 1.75rem;
    border: 0.0625rem solid rgba(102, 107, 250, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(2rem);
    box-shadow: 0 0.25rem 1rem rgba(102, 107, 250, 0.1);
}

.partner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.25rem;
    background: linear-gradient(90deg, rgb(102, 107, 250), rgb(80, 85, 220));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1rem 2rem rgba(102, 107, 250, 0.25);
    border-color: rgba(102, 107, 250, 0.3);
}

.partner-card:hover::before {
    opacity: 1;
}

.partner-logo {
    width: 9.375rem;
    height: 1.875rem;
    margin: 0 auto;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, rgba(102, 107, 250, 0.1), rgba(80, 85, 220, 0.1)); */
    border-radius: 0.75rem;
    overflow: hidden;
}

.partner-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
}

.logo-placeholder {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(102, 107, 250);
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(102, 107, 250, 0.1), rgba(80, 85, 220, 0.1));
    border-radius: 0.5rem;
    border: 0.125rem dashed rgba(102, 107, 250, 0.3);
    transition: all 0.3s ease;
}

.partner-card:hover .logo-placeholder {
    background: linear-gradient(135deg, rgba(102, 107, 250, 0.2), rgba(80, 85, 220, 0.2));
    border-color: rgba(102, 107, 250, 0.5);
}

.partner-info {
    flex: 1;
    padding-bottom: 2.5rem; /* 为右下角的按钮留出空间 */
}

.partner-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.partner-description {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.partner-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: linear-gradient(135deg, rgba(102, 107, 250, 0.1), rgba(80, 85, 220, 0.1));
    color: rgb(102, 107, 250);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 0.0625rem solid rgba(102, 107, 250, 0.2);
    transition: all 0.3s ease;
}

.partner-card:hover .tag {
    background: linear-gradient(135deg, rgba(102, 107, 250, 0.2), rgba(80, 85, 220, 0.2));
    border-color: rgba(102, 107, 250, 0.4);
    transform: translateY(-0.125rem);
}

/* 合作伙伴按钮样式 */
.partner-actions {
    position: absolute;
    right: 1.75rem;
    bottom: 1.75rem;
}

.partner-btn {
    background: linear-gradient(135deg, #6668fa, rgb(80, 85, 220));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.5rem rgba(102, 104, 250, 0.2);
}

.partner-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(102, 104, 250, 0.3);
}

/* 合作CTA区域 */
.partnership-cta {
    /* background: linear-gradient(135deg,
        rgba(102, 107, 250, 0.03) 0%,
        rgba(102, 107, 250, 0.01) 50%,
        rgba(80, 85, 220, 0.03) 100%); */
    padding: 5rem 0;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    /* border-top: 0.0625rem solid rgba(102, 107, 250, 0.1); */
    border-bottom: 0.0625rem solid rgba(102, 104, 250, 0.1);
    user-select: none;
}

.cta-container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 3rem;
}

.cta-benefits {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.benefit-icon {
    font-size: 2rem;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #6668fa, rgb(80, 85, 220));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.benefit-icon:nth-child(2n) {
    animation-delay: 0.5s;
}

.benefit-icon:nth-child(3n) {
    animation-delay: 1s;
}

.benefit-text {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #6668fa, rgb(80, 85, 220));
    color: white;
    box-shadow: 0 0.25rem 1rem rgba(102, 104, 250, 0.3);
}

.cta-btn.primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1.5rem rgba(102, 104, 250, 0.4);
}

.cta-btn.secondary {
    background: transparent;
    color: #6668fa;
    border: 0.125rem solid #6668fa;
}

.cta-btn.secondary:hover {
    background: #6668fa;
    color: white;
    transform: translateY(-0.125rem);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.5rem);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .partners-hero-title {
        font-size: 2.5rem;
    }

    .partners-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .partners-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .partners-tabs {
        flex-direction: column;
        gap: 0.25rem;
        max-width: 20rem;
    }

    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .cta-benefits {
        flex-direction: column;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 20rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .partners-hero {
        padding: 3rem 0 4rem 0;
    }

    .partners-categories {
        padding: 2rem 0;
    }

    .partnership-cta {
        padding: 3rem 0;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .partners-hero-title {
        font-size: 2rem;
    }

    .partners-hero-subtitle {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .partner-card {
        padding: 1.5rem;
    }
}

/* 加载动画 */
.partners-content {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 滚动指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(90deg, rgb(102, 107, 250), rgb(80, 85, 220));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

/* 页面加载时的渐入效果 */
.partner-card {
    will-change: transform, opacity;
}

.partners-hero-container > * {
    will-change: transform, opacity;
}

/* 优化性能 */
.partner-card:hover,
.cta-btn:hover,
.benefit-icon {
    will-change: transform;
}

/* 无障碍和可访问性 */
.cta-btn:focus,
.partner-card:focus {
    outline: 0.125rem solid rgb(102, 107, 250);
    outline-offset: 0.125rem;
}

/* 弹出框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.25rem);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 25rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: rgb(102, 107, 250);
}

.modal-content h2 {
    color: rgb(102, 107, 250);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.contact-info {
    text-align: center;
}

.contact-item {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.contact-item strong {
    color: rgb(102, 107, 250);
}

.contact-qr {
    margin-top: 1.5rem;
}

.contact-qr p {
    color: #666;
    margin-bottom: 1rem;
}

.qr-placeholder {
    width: 8rem;
    height: 8rem;
    border: 0.125rem dashed rgba(102, 107, 250, 0.3);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: rgb(102, 107, 250);
    font-size: 0.875rem;
    background: linear-gradient(135deg, rgba(102, 107, 250, 0.05), rgba(80, 85, 220, 0.05));
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .partner-card {
        border-width: 0.125rem;
        border-color: rgb(102, 107, 250);
    }

    .tag {
        border-width: 0.125rem;
        font-weight: 600;
    }
}
