﻿/* Certificates page */
.certificates-section {
    width: 100%;
    padding: clamp(26px, 4vw, 46px);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d9e5ef;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0, 59, 112, 0.1);
}

.certificates-section h1,
.certificates-section h2,
.certificates-section h3 {
    color: var(--color-text);
    font-family: var(--site-font-family);
    font-weight: 700;
    line-height: 1.18;
    text-align: center;
}

.certificates-section h1 {
    margin: 0 0 34px;
    font-size: clamp(30px, 4vw, 46px);
}

.certificates-section h2 {
    margin: 42px 0 24px;
    font-size: clamp(24px, 3vw, 32px);
}

.certificates-section h3 {
    margin: 54px 0 24px;
    font-size: clamp(22px, 2.6vw, 30px);
}

.certificates-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 24px;
    align-items: start;
    margin: 28px 0 34px;
}

.certificate-item {
    min-width: 0;
    padding: 16px;
    text-align: center;
    background: #f7fbfe;
    border: 1px solid #d9e5ef;
    border-radius: 8px;
}

.certificate-item img {
    display: block;
    width: 100%;
    max-height: 310px;
    margin: 0 auto 14px;
    object-fit: contain;
    cursor: zoom-in;
    border-radius: 6px;
}

.certificate-item p,
.certificate-description,
.protocol-text {
    margin: 0 auto 20px;
    color: #25455f;
    font-size: 16px;
    line-height: 1.65;
}

.certificate-description {
    max-width: 820px;
    text-align: center;
}

.protocol-text,
.certificates-section .protocol-text {
    max-width: 880px;
    text-align: left;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    padding: 72px 20px 30px;
    overflow: auto;
    background: rgba(0, 0, 0, 0.88);
    text-align: center;
}

.modal-content {
    display: block;
    width: auto;
    max-width: min(92vw, 780px);
    max-height: 86vh;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-out;
}

.close {
    position: fixed;
    top: 18px;
    right: 28px;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 640px) {
    .certificates-section {
        padding: 22px;
    }

    .certificates-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* Refined certificates scale */
.certificates-section {
    border-radius: 6px;
    padding: clamp(24px, 3.6vw, 40px);
}

.certificates-section h1,
.certificates-section h2,
.certificates-section h3 {
    color: var(--site-ink, var(--color-text));
    font-family: var(--site-font-family);
}

.certificates-section h1 {
    font-size: clamp(30px, 3.2vw, 40px);
}

.certificates-section h2 {
    font-size: clamp(22px, 2.4vw, 30px);
}

.certificates-section h3 {
    font-size: clamp(19px, 2vw, 24px);
}

.certificate-item {
    border-radius: 6px;
}

.certificate-item p,
.certificate-description,
.protocol-text {
    color: var(--site-muted, var(--color-muted));
}
