/* ===== 全局重置 & 字体 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #1a1a1a;
    line-height: 1.5;
}

/* ===== 工具类 ===== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.badge {
    display: inline-block;
    background: #e6edf6;
    color: #0052a5;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0b1e33;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.section-subtitle {
    color: #4d627a;
    font-size: 1rem;
    margin-bottom: 28px;
    border-left: 4px solid #0071c5;
    padding-left: 16px;
    font-weight: 400;
}

/* ===== 顶部工具栏 ===== */
.top-bar {
    background-color: #0b1e33;
    color: #d1dae6;
    font-size: 0.75rem;
    padding: 6px 0;
    border-bottom: 1px solid #1c3550;
}

.top-bar .flex-row {
    justify-content: flex-end;
}

.top-bar a {
    color: #b0c7df;
    text-decoration: none;
    margin-left: 24px;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: white;
}

.top-bar i {
    margin-right: 6px;
    font-size: 0.7rem;
}

/* ===== 主Header ===== */
.main-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    padding: 16px 0;
    border-bottom: 1px solid #e9edf2;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: #0071c5;
    width: 180px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0b1e33;
    letter-spacing: -0.5px;
}

.logo-text small {
    font-weight: 300;
    font-size: 0.9rem;
    color: #4d627a;
    margin-left: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a {
    text-decoration: none;
    color: #1f3349;
    transition: color 0.15s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: #0071c5;
    border-bottom-color: #0071c5;
}

.nav-links .active {
    color: #0071c5;
    border-bottom-color: #0071c5;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions i {
    font-size: 1.2rem;
    color: #3a526e;
    cursor: pointer;
    transition: color 0.2s;
}

.header-actions i:hover {
    color: #0071c5;
}

.search-box {
    background: #f0f3f8;
    border-radius: 24px;
    padding: 6px 16px 6px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 0.85rem;
    width: 180px;
    outline: none;
    color: #1a2b40;
}

.search-box i {
    color: #6b7f99;
    font-size: 0.9rem;
}

/* ===== Hero Banner ===== */
.hero-banner {
    background: linear-gradient(145deg, #0a2640 0%, #163a5e 100%);
    color: white;
    padding: 48px 0;
    margin-bottom: 40px;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 24px;
    max-width: 480px;
}

.hero-btn {
    background: #ffb81c;
    border: none;
    color: #0b1e33;
    font-weight: 600;
    padding: 12px 36px;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover {
    background: #ffcd4a;
    transform: scale(1.02);
}

.hero-stats {
    display: flex;
    gap: 40px;
    background: rgba(255, 255, 255, 0.06);
    padding: 20px 32px;
    border-radius: 60px;
    backdrop-filter: blur(2px);
    margin-top: 16px;
}

.hero-stats span {
    font-weight: 300;
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-stats strong {
    font-weight: 600;
    font-size: 1.3rem;
    display: block;
}

.hero-image {
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.hero-image .hero-thumb-img {
    width: 360px;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.4s ease;
    display: block;
}

.hero-image .hero-thumb-img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 184, 28, 0.5);
}

/* ===== 卡片式链接样式 - 全页通用 ===== */
.card-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    cursor: pointer;
}

/* 通用标题链接 - 带下划线装饰 */
.card-link h1,
.card-link h2,
.card-link h3,
.card-link h4 {
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    margin: 0;
}

/* 所有 card-link 的下划线 */
.card-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #ffb81c, #ffd966);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}

/* 悬停时下划线展开 */
.card-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Hero 区域的特殊样式 - 保持金色渐变文字 */
.hero-text .card-link h1 {
    font-size: 2.6rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #ffb81c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.hero-text .card-link:hover h1 {
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 184, 28, 0.3);
}

/* 产品卡片标题链接 - 保持蓝色调 */
.product-card .card-link h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b1e33;
    transition: all 0.3s ease;
}

.product-card .card-link:hover h3 {
    color: #0071c5;
    transform: translateX(4px);
}

/* ----- 卡片缩略图（首页产品卡片） ----- */
.product-thumbnail {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: #f0f3f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.product-thumbnail i {
    font-size: 3.2rem;
    color: #0071c5;
    opacity: 0.5;
}

.product-thumbnail .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-thumbnail .thumb-img {
    transform: scale(1.05);
}

/* 设计资源区块的链接 */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    position: relative;
}

.feature-item .card-link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    margin: -12px -16px;
    transition: all 0.3s ease;
    width: 100%;
    flex: 1;
}

.feature-item .card-link:hover {
    background: rgba(0, 113, 197, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 197, 0.06);
}

.feature-item .card-link h4 {
    font-weight: 600;
    margin-bottom: 6px;
    color: #0b1e33;
    transition: all 0.3s ease;
    white-space: nowrap; /* ✅ 防止标题换行 */
}

.feature-item .card-link:hover h4 {
    color: #0071c5;
    transform: translateX(3px);
}

.feature-item .card-link p {
    color: #4d627a;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.feature-item .card-link:hover p {
    color: #1f3349;
}

/* 设计资源区块 - 下划线样式 */
.feature-item .card-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 16px;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #0071c5, #4da6ff);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}

.feature-item .card-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 设计资源区块 - 整体卡片悬停效果 */
.feature-item .card-link {
    display: block;
    padding: 8px 12px;
    border-radius: 12px;
    margin: -8px -12px;
    transition: all 0.3s ease;
    width: 100%;
}

.feature-item .card-link:hover {
    background: rgba(0, 113, 197, 0.05);
    transform: translateY(-2px);
}

/* 通用卡片链接的点击反馈 */
.card-link:active {
    transform: scale(0.98);
}

/* 确保所有卡片链接的下划线颜色适配不同场景 */
.hero-text .card-link::after {
    background: linear-gradient(135deg, #ffb81c, #ffd966);
    height: 3px;
}

.product-card .card-link::after {
    background: linear-gradient(135deg, #0071c5, #4da6ff);
}

/* 移动端适配 */
@media (max-width: 992px) {
    .hero-text .card-link h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .hero-text .card-link h1 {
        font-size: 1.6rem;
    }
    
    .feature-item .card-link {
        padding: 4px 8px;
        margin: -4px -8px;
    }
}

/* ===== 分类标签 - 修复居中对齐 ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: -20px 0 32px 0;
    background: white;
    padding: 16px 28px;
    border-radius: 60px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #edf2f7;
    justify-content: center;
    /* ✅ 水平居中 */
    align-items: center;
    /* ✅ 垂直居中 */
}

.category-tabs a {
    text-decoration: none;
    color: #1f3a57;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: 0.15s;
}

.category-tabs a:hover {
    color: #0071c5;
    border-bottom-color: #0071c5;
}

.category-tabs .active-cat {
    color: #0071c5;
    border-bottom-color: #0071c5;
}

/* ===== 产品卡片 - 修复居中对齐 ===== */
.product-grid {
    margin: 40px 0 50px;
}

/* 让产品标题行占满容器宽度 */
.product-grid .flex-row {
    width: 100%;
}

/* 确保网格容器居中 */
.product-grid .grid-4 {
    justify-items: center;
    /* 网格项目居中 */
}

/* 修复每个卡片占满网格单元格 */
.product-card {
    background: white;
    border-radius: 20px;
    padding: 24px 18px 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid #eef2f7;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    /* 确保卡片填满单元格 */
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 60, 120, 0.08);
    border-color: #cbd9e9;
}

.product-tag {
    background: #e3ecf5;
    color: #0052a5;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 30px;
    align-self: flex-start;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 14px 0 6px;
    color: #0b1e33;
}

.product-desc {
    font-size: 0.85rem;
    color: #4d627a;
    margin-bottom: 16px;
    flex: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
    margin-top: 4px;
}

.video-linkage {
    font-weight: 700;
    color: #0b1e33;
    font-size: 0.8rem;
}

.product-price small {
    font-weight: 400;
    font-size: 0.75rem;
    color: #6f85a0;
    margin-left: 4px;
}

.product-actions i {
    color: #6b7f99;
    margin-left: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.product-actions i:hover {
    color: #0071c5;
}

/* ===== 特色区块 ===== */
.feature-section {
    background: white;
    border-radius: 32px;
    padding: 40px 36px;
    margin: 48px 0;
    border: 1px solid #eef2f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.feature-item i {
    font-size: 2rem;
    color: #0071c5;
    background: #e7f0fa;
    padding: 12px;
    border-radius: 18px;
    min-width: 56px;
    text-align: center;
}

.feature-item h4 {
    font-weight: 600;
    margin-bottom: 6px;
    color: #0b1e33;
}

.feature-item p {
    color: #4d627a;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== Footer ===== */
.footer {
    background: #0b1e33;
    color: #b8ccdf;
    padding: 48px 0 32px;
    margin-top: 60px;
    border-radius: 40px;
}

.footer a {
    color: #b8ccdf;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}

.footer a:hover {
    color: white;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 60px;
    margin-bottom: 30px;
}

.footer-col h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid #1f3550;
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #7a93b0;
}

.footer-social i {
    font-size: 1.2rem;
    margin-left: 18px;
    color: #8aa4c2;
    transition: 0.2s;
}

.footer-social i:hover {
    color: white;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .search-box input {
        width: 120px;
    }
}

@media (max-width: 600px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        padding: 16px 20px;
    }

    .category-tabs {
        border-radius: 30px;
        padding: 14px 18px;
        gap: 8px 14px;
    }

    .top-bar .flex-row {
        justify-content: center;
        gap: 12px;
    }

    .top-bar a {
        margin-left: 0;
    }

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

    .header-actions .search-box {
        display: none;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
}