/* ============================================================
   Certificates page — certificates.html
   ============================================================ */

/* ---- Product group banner (.series modifier) — shorter, smaller product photo ---- */
.t-product-banner {
    min-height: auto;
    padding: 64px 0;
}

.t-product-banner .series-img img {
    max-width: 60%;
    max-height: 220px;
}

/* ---- Certificate grid ---- */
.cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 980px) {
    .t-product-banner {
        padding: 56px 0;
    }

    .t-product-banner .series-img img {
        max-width: 70%;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cert-grid {
        gap: 20px;
    }
}

/* ---- Certificate card ---- */
.cert-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.25s,
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.25s;
    -webkit-tap-highlight-color: transparent;
}

.cert-card:hover {
    box-shadow: var(--shadow-deep);
    transform: translateY(-4px);
    border-color: var(--navy-soft);
}

.cert-card:active {
    transform: scale(0.98) !important;
    box-shadow: var(--shadow-soft);
    transition:
        transform 0.1s ease-out,
        box-shadow 0.1s ease-out;
}

.cert-card-body {
    padding: 32px 32px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cert-card-body h3 {
    margin-top: 8px;
    margin-bottom: 0;
}

.cert-card-body p {
    margin-top: 12px;
    color: var(--ink-mute);
    flex: 1;
}

/* ---- Thumbnail button ---- */
.cert-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: none;
    border-top: 1px solid var(--rule);
    background: var(--cream);
    padding: 24px;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.cert-thumb:hover {
    background: var(--cream-deep);
}

.cert-thumb:active {
    transform: scale(0.95) !important;
    transition:
        background 0.08s ease-out,
        transform 0.08s ease-out;
}

.cert-thumb img {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--r);
    transition: transform 0.3s ease;
}

.cert-thumb:hover img {
    transform: scale(1.04);
}

.cert-thumb-label {
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--navy-mid);
}

/* ---- Modal overlay ---- */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 24, 48, 0.6);
    padding: 24px;
}

.cert-modal-box {
    background: var(--paper);
    border-radius: var(--r);
    box-shadow: var(--shadow-deep);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 52px 32px 32px;
    text-align: center;
    animation: certModalIn 0.25s ease;
}

.cert-modal.is-closing .cert-modal-box {
    animation: certModalOut 0.18s ease forwards;
}

.cert-modal-box img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r);
}

.cert-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-mute);
    padding: 8px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        color 0.2s,
        background 0.2s,
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.cert-modal-close:hover {
    color: var(--ink);
    background: var(--navy-tint);
}

.cert-modal-close:active {
    transform: scale(0.9);
    transition: transform 0.08s ease-out;
}

@keyframes certModalIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes certModalOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ---- CTA strip responsive ---- */
@media (max-width: 980px) {
    .cta-strip-inner {
        flex-direction: column;
        text-align: center;
    }
}
