/* ==========================================================================
   子页面增强样式 - Subpage Enhancements
   ========================================================================== */

/* Page Header 增强 */
.th-page-header {
    position: relative;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #0080ff 100%);
    /* Match .th-hero: fixed navbar sits over the band — pad past --nav-height */
    padding: calc(var(--space-4xl) + var(--nav-height)) 0 var(--space-3xl);
    overflow: clip;
}

/* 动态背景装饰 */
.th-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.th-page-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.th-page-header .th-container {
    position: relative;
    z-index: 1;
}

.th-page-title {
    color: var(--white);
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease-out;
}

.th-page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-xl);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.th-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.th-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color var(--transition-base);
}

.th-breadcrumb a:hover {
    color: var(--white);
}

/* 卡片增强 */
.th-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
    animation: fadeInUp 0.6s ease-out backwards;
    overflow: hidden;
}

.th-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.th-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.15);
}

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

/* 为网格中的卡片添加交错动画 */
.th-grid .th-card:nth-child(1) { animation-delay: 0.1s; }
.th-grid .th-card:nth-child(2) { animation-delay: 0.2s; }
.th-grid .th-card:nth-child(3) { animation-delay: 0.3s; }
.th-grid .th-card:nth-child(4) { animation-delay: 0.4s; }
.th-grid .th-card:nth-child(5) { animation-delay: 0.5s; }
.th-grid .th-card:nth-child(6) { animation-delay: 0.6s; }
.th-grid .th-card:nth-child(7) { animation-delay: 0.7s; }
.th-grid .th-card:nth-child(8) { animation-delay: 0.8s; }
.th-grid .th-card:nth-child(9) { animation-delay: 0.9s; }

/* 卡片图标增强 */
.th-card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.th-card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.th-card:hover .th-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.th-card:hover .th-card-icon::before {
    left: 100%;
}

.th-card-icon img {
    width: 48px;
    height: 48px;
    filter: brightness(0) saturate(100%) invert(35%) sepia(98%) saturate(1234%) hue-rotate(193deg) brightness(95%) contrast(101%);
    transition: transform var(--transition-base);
}

.th-card:hover .th-card-icon img {
    transform: scale(1.1);
}

/* 卡片标题增强 */
.th-card-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--secondary);
    margin-bottom: var(--space-md);
    transition: color var(--transition-base);
}

.th-card:hover .th-card-title {
    color: var(--primary);
}

/* 按钮增强 */
.th-btn-outline {
    position: relative;
    overflow: hidden;
}

.th-btn-outline::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.th-btn-outline:hover::after {
    width: 300px;
    height: 300px;
}

.th-btn-outline:hover {
    color: var(--white);
    border-color: var(--primary);
}

/* 服务特性列表增强 */
.th-service-features {
    list-style: none;
    padding: 0;
    margin: var(--space-lg) 0;
}

.th-service-features li {
    padding: var(--space-sm) 0;
    color: var(--gray-700);
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all var(--transition-base);
}

.th-service-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    font-weight: var(--font-bold);
    font-size: var(--text-sm);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.th-card:hover .th-service-features li::before {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.2);
}

/* 案例卡片增强 */
.th-case-card {
    overflow: hidden;
}

.th-case-image {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.th-case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.th-case-card:hover .th-case-image img {
    transform: scale(1.1);
}

.th-case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9) 0%, rgba(0, 128, 255, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.th-case-card:hover .th-case-overlay {
    opacity: 1;
}

.th-case-view {
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.th-case-card:hover .th-case-view {
    transform: translateY(0);
}

/* 案例标签 */
.th-case-meta {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.th-case-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-lighter);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.th-case-card:hover .th-case-tag {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* 案例统计 */
.th-case-stats {
    display: flex;
    gap: var(--space-xl);
    margin: var(--space-lg) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.th-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.th-stat-icon {
    font-size: var(--text-2xl);
}

.th-stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--primary);
}

.th-stat-label {
    font-size: var(--text-sm);
    color: var(--gray-600);
}

/* 新闻分类标签 */
.th-news-category {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
}

.th-category-tech {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary);
}

.th-category-industry {
    background: rgba(0, 168, 232, 0.1);
    color: var(--accent);
}

.th-category-company {
    background: rgba(44, 62, 80, 0.1);
    color: var(--secondary);
}

.th-card:hover .th-news-category {
    transform: translateY(-2px);
}

/* 联系表单增强 */
.th-contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    animation: fadeInUp 0.8s ease-out;
}

.th-contact-info,
.th-contact-form-wrapper {
    animation: fadeInUp 0.8s ease-out backwards;
}

.th-contact-info {
    animation-delay: 0.2s;
}

.th-contact-form-wrapper {
    animation-delay: 0.4s;
}

.th-contact-item {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
}

.th-contact-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.12);
}

.th-contact-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.th-contact-item:hover .th-contact-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

/* FAQ 增强 */
.th-faq-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.th-faq-item:nth-child(1) { animation-delay: 0.1s; }
.th-faq-item:nth-child(2) { animation-delay: 0.2s; }
.th-faq-item:nth-child(3) { animation-delay: 0.3s; }
.th-faq-item:nth-child(4) { animation-delay: 0.4s; }
.th-faq-item:nth-child(5) { animation-delay: 0.5s; }

.th-faq-icon {
    transition: all 0.3s ease;
}

.th-faq-item.active .th-faq-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* 动画关键帧 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .th-contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .th-page-title {
        font-size: var(--text-3xl);
    }

    .th-page-subtitle {
        font-size: var(--text-base);
    }

    .th-card-icon {
        width: 64px;
        height: 64px;
    }

    .th-card-icon img {
        width: 36px;
        height: 36px;
    }

    .th-case-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
}
