/*
 * Наши правки поверх темы Mobirise.
 * Файл подключается последним, поэтому переопределяет её правила.
 */

/* --------------------------------------------- патенты и сертификаты ---
 * Было: документы лежали белыми листами прямо на тёмно-сером фоне #c1c1c1,
 * а их заголовок стоял на белом - блок выглядел разорванным надвое.
 * Стало: заголовок и документы на общем сером #eee из палитры сайта,
 * а сами документы - в белых рамках, которые на сером хорошо отделяются.
 */

/* Заголовок и документы под ним обязательно на одном фоне. */
.cid-rtWUd2oi0I,          /* «Патенти та свідоцтва» - заголовок */
.cid-rtWQEbyxeX {         /* сами документы */
    background-color: #eee;
}

.cid-rtWQEbyxeX {
    padding-bottom: 70px;
}

.certs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 26px 22px;
    max-width: 1000px;
    margin: 0 auto;
}

.cert { margin: 0; }

.cert-frame {
    background: #fff;
    border: 1px solid #e6e9ec;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
    cursor: pointer;
    transition: box-shadow .18s ease, transform .18s ease;

    /* Одинаковая высота у всех документов, пропорция листа A4. */
    aspect-ratio: 1 / 1.32;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-frame:hover,
.cert-frame:focus-visible {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    transform: translateY(-3px);
    outline: none;
}

/* Документ показываем целиком: обрезать бумагу с печатями нельзя. */
.cert-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.cert figcaption {
    margin-top: 12px;
    text-align: center;
    font-size: .95rem;
    line-height: 1.35;
    color: #4a5560;
}

@media (prefers-reduced-motion: reduce) {
    .cert-frame { transition: none; }
    .cert-frame:hover { transform: none; }
}

@media (max-width: 480px) {
    .certs { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
    .cert figcaption { font-size: .85rem; }
}
