/* ============================================
   知识产权证书页面 - 10模版专用样式 (v3)
   Layout: 暗色科技Hero + 顶部标签导航 + 3列瀑布流网格 + 全屏查看器
   ============================================ */

/* ===== Hero Banner (暗色科技风) ===== */
.cert-hero {
    position: relative;
    padding: 150px 0 70px;
    background: #070b14;
    overflow: hidden;
    text-align: center;
}

.cert-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 35%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 72%);
}

.cert-hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cert-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.cert-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.06);
    font-size: 0.82rem;
    font-weight: 600;
    color: #22d3ee;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.cert-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.cert-hero h1 .highlight {
    background: linear-gradient(135deg, #818cf8, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cert-hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.45);
    max-width: 550px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* ===== Hero Stats ===== */
.cert-hero-stats {
    display: flex;
    justify-content: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 600px;
    margin: 0 auto;
}

.cert-hero-stat {
    flex: 1;
    text-align: center;
    padding: 20px 16px;
    position: relative;
}

.cert-hero-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
}

.cert-hero-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.cert-hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== Main Content ===== */
.cert-main {
    padding: 60px 0 80px;
    background: #0a0f1a;
}

/* ===== Category Filter (顶部标签) ===== */
.cert-filter {
    display: flex;
    gap: 4px;
    margin-bottom: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cert-filter::-webkit-scrollbar {
    display: none;
}

.cert-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: -1px;
}

.cert-filter-btn:hover {
    color: rgba(255, 255, 255, 0.6);
}

.cert-filter-btn.active {
    color: #818cf8;
    border-bottom-color: #818cf8;
}

.cert-filter-btn i {
    font-size: 0.85rem;
}

.cert-filter-btn .count {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 8px;
    border-radius: 8px;
    margin-left: 2px;
}

.cert-filter-btn.active .count {
    color: rgba(129, 140, 248, 0.5);
    background: rgba(99, 102, 241, 0.1);
}

/* ===== Category Section ===== */
.cert-category {
    display: block;
}

.cert-category.hidden {
    display: none;
}

.cert-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cert-category-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.cert-category-count {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
    padding: 2px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Certificate Grid (3列) ===== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.cert-category:last-child .cert-grid {
    margin-bottom: 0;
}

/* ===== Certificate Card ===== */
.cert-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.4s ease;
    overflow: hidden;
}

.cert-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.cert-card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 70%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
}

.cert-card-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-card-image-wrap img {
    transform: scale(1.06);
}

.cert-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-card:hover .cert-card-overlay {
    opacity: 1;
}

.cert-card-overlay i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.cert-card-body {
    padding: 14px 18px 18px;
    position: relative;
}

.cert-card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.12), transparent);
}

.cert-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.cert-card-sub {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* ===== Fullscreen Viewer ===== */
.cert-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.cert-viewer.active {
    display: flex;
}

.cert-viewer-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 3001;
}

.cert-viewer-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.cert-viewer-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cert-viewer-image.show {
    opacity: 1;
    transform: scale(1);
}

.cert-viewer-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 2px solid rgba(255, 255, 255, 0.04);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: viewerSpin 0.7s linear infinite;
}

@keyframes viewerSpin {
    to { transform: rotate(360deg); }
}

.cert-viewer-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 40px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cert-viewer-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    font-weight: 600;
}

.cert-viewer-sub {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 2px;
}

.cert-viewer-counter {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.cert-viewer-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 3001;
}

.cert-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

.cert-viewer-nav.prev { left: 24px; }
.cert-viewer-nav.next { right: 24px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .cert-hero {
        padding: 120px 0 50px;
    }

    .cert-hero h1 {
        font-size: 2rem;
    }

    .cert-hero p {
        font-size: 0.92rem;
        margin-bottom: 28px;
    }

    .cert-hero-stats {
        flex-wrap: wrap;
    }

    .cert-hero-stat {
        flex: 0 0 50%;
        padding: 14px 12px;
    }

    .cert-hero-stat:nth-child(2)::after {
        display: none;
    }

    .cert-hero-stat-value {
        font-size: 1.5rem;
    }

    .cert-hero-stat-label {
        font-size: 0.7rem;
    }

    .cert-main {
        padding: 40px 0 60px;
    }

    .cert-filter-btn {
        padding: 12px 18px;
        font-size: 0.82rem;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .cert-card-image-wrap {
        padding-top: 75%;
    }

    .cert-card-image-wrap img {
        padding: 10px;
    }

    .cert-card-body {
        padding: 10px 14px 14px;
    }

    .cert-card-title {
        font-size: 0.78rem;
    }

    .cert-card-sub {
        font-size: 0.68rem;
    }

    .cert-category-header h2 {
        font-size: 1rem;
    }

    .cert-viewer {
        padding: 20px;
    }

    .cert-viewer-image {
        max-width: 100vw;
        max-height: 70vh;
    }

    .cert-viewer-info {
        padding: 14px 20px;
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .cert-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .cert-viewer-nav.prev { left: 10px; }
    .cert-viewer-nav.next { right: 10px; }

    .cert-viewer-close {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cert-hero h1 {
        font-size: 1.5rem;
    }

    .cert-hero p {
        font-size: 0.85rem;
    }

    .cert-hero-badge {
        font-size: 0.72rem;
        padding: 6px 14px;
    }

    .cert-hero-stat-value {
        font-size: 1.2rem;
    }

    .cert-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cert-filter-btn {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    .cert-category-header h2 {
        font-size: 0.9rem;
    }
}
