/**
 * 证书资质 /page/?slug=certificate
 * 深空蓝 + 金色点缀，与 front.css / about / contact 一致
 */

.cert-page { background: var(--bg); }

.cert-hero {
    padding: 56px 0 64px;
    background:
        radial-gradient(ellipse 80% 60% at 85% 20%, rgba(201, 162, 39, .18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(59, 130, 246, .2) 0%, transparent 50%),
        linear-gradient(145deg, var(--dark) 0%, var(--primary-dark) 48%, #163a8a 100%);
}
.cert-hero .breadcrumb { margin-bottom: 28px; }
.cert-hero-main { max-width: 720px; position: relative; }
.cert-hero-kicker {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-light);
    font-weight: 600;
}
.cert-hero-title {
    margin: 0;
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}
.cert-hero-lead {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .82);
    max-width: 38em;
}
.cert-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.cert-hero-actions .btn-lg {
    padding: .7rem 1.4rem;
    font-weight: 600;
    border-radius: 10px;
}
.cert-hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.cert-highlights {
    margin-top: -28px;
    position: relative;
    z-index: 2;
    padding-bottom: 8px;
}
.cert-highlight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.cert-highlight-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-right: 1px solid var(--border);
}
.cert-highlight-list li:last-child { border-right: 0; }
.cert-highlight-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 86, 219, .1), rgba(201, 162, 39, .12));
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
}
.cert-highlight-list strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}
.cert-highlight-list span span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cert-section { padding: 56px 0; }
.cert-section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 36px;
}
.cert-section-head h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 800;
    color: var(--dark);
}
.cert-section-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.cert-intro-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.85;
}

.cert-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}
.cert-filter {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--dark);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}
.cert-filter:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.cert-filter.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(26, 86, 219, .25);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.cert-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .28s ease, box-shadow .28s ease;
    animation: certFadeUp .55s ease both;
    animation-delay: var(--cert-delay, 0s);
}
.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
@keyframes certFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.cert-card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(145deg, #eef4ff, #f8fafc);
    border: 0;
    padding: 0;
    cursor: zoom-in;
    overflow: hidden;
}
.cert-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.cert-card:hover .cert-card-media img { transform: scale(1.05); }
.cert-card-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, .72);
    color: #fff;
    opacity: 0;
    transform: translateY(6px);
    transition: .25s ease;
}
.cert-card:hover .cert-card-zoom {
    opacity: 1;
    transform: translateY(0);
}
.cert-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    background:
        radial-gradient(circle at 70% 30%, rgba(201, 162, 39, .18), transparent 50%),
        linear-gradient(145deg, #e8f0ff, #f8fafc);
}
.cert-card-placeholder i {
    font-size: 48px;
    color: var(--primary);
    opacity: .85;
}

.cert-card-body { padding: 18px 18px 20px; }
.cert-card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--primary);
    background: rgba(26, 86, 219, .08);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.cert-card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 750;
    color: var(--dark);
    line-height: 1.35;
}
.cert-card-body > p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-muted);
}
.cert-card-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cert-card-meta li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}
.cert-card-meta i {
    color: var(--accent);
    margin-top: 1px;
}

.cert-empty {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
.cert-empty i {
    font-size: 42px;
    display: block;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.cert-cta {
    padding: 0 0 72px;
}
.cert-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 40px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 60% 80% at 100% 50%, rgba(201, 162, 39, .2), transparent 55%),
        linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: #fff;
}
.cert-cta-inner h2 {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 800;
}
.cert-cta-inner p {
    margin: 0;
    opacity: .82;
    font-size: 14px;
}
.cert-cta-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent) 0%, #a88620 100%);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.cert-cta-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(201, 162, 39, .35);
}

/* Lightbox */
.cert-lightbox[hidden] { display: none !important; }
.cert-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.cert-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, .78);
    backdrop-filter: blur(4px);
}
.cert-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(920px, 100%);
    max-height: 90vh;
    background: #0a1628;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    animation: certLightboxIn .28s ease;
}
@keyframes certLightboxIn {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}
.cert-lightbox-title {
    margin: 0 40px 12px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.cert-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 80px);
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
}
.cert-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
}
.cert-lightbox-close:hover { background: rgba(255, 255, 255, .22); }

@media (max-width: 991.98px) {
    .cert-grid { grid-template-columns: repeat(2, 1fr); }
    .cert-highlight-list { grid-template-columns: repeat(2, 1fr); }
    .cert-highlight-list li:nth-child(2) { border-right: 0; }
    .cert-highlight-list li:nth-child(1),
    .cert-highlight-list li:nth-child(2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 575.98px) {
    .cert-hero { padding: 40px 0 52px; }
    .cert-grid { grid-template-columns: 1fr; }
    .cert-highlight-list { grid-template-columns: 1fr; }
    .cert-highlight-list li {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .cert-highlight-list li:last-child { border-bottom: 0; }
    .cert-cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px 22px;
    }
    .cert-section { padding: 40px 0; }
}
