/**
 * Engel About page — certification modals
 * Loaded by about.tpl only
 */

.ea-about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.ea-cert-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ea-cert-modal.is-open {
    display: flex;
}

.ea-cert-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 14, 28, 0.78);
    backdrop-filter: blur(4px);
}

.ea-cert-modal__dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-height: min(92vh, 900px);
    overflow: auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    -webkit-overflow-scrolling: touch;
}

.ea-cert-modal__dialog--list {
    max-width: 920px;
    padding: 1.75rem 1.5rem 1.5rem;
}

.ea-cert-modal__dialog--image {
    max-width: min(960px, 100%);
    padding: 1rem 1rem 1.25rem;
}

.ea-cert-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.875rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: rgba(11, 29, 58, 0.08);
    color: #0B1D3A;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ea-cert-modal__close:hover {
    background: rgba(184, 9, 9, 0.12);
    color: #B80909;
}

.ea-cert-modal__head {
    padding-right: 2.75rem;
    margin-bottom: 1.375rem;
}

.ea-cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
}

.ea-cert-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    padding: 1.125rem 1rem;
    border: 1px solid rgba(11, 29, 58, 0.1);
    border-radius: 0.75rem;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ea-cert-card:hover,
.ea-cert-card:focus {
    outline: none;
    border-color: rgba(184, 9, 9, 0.35);
    background: #fff;
    box-shadow: 0 8px 24px rgba(184, 9, 9, 0.1);
    transform: translateY(-2px);
}

.ea-cert-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 0.625rem;
    background: rgba(184, 9, 9, 0.1);
    color: #B80909;
    font-size: 1.25rem;
}

.ea-cert-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0B1D3A;
    line-height: 1.35;
}

.ea-cert-card__issuer {
    font-size: 0.75rem;
    color: rgba(11, 29, 58, 0.58);
    line-height: 1.4;
}

.ea-cert-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-right: 2.75rem;
}

.ea-cert-modal__back {
    border: 0;
    background: transparent;
    color: #B80909;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
}

.ea-cert-modal__back:hover {
    color: #960707;
}

.ea-cert-image-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0B1D3A;
    margin: 0 0 0.875rem;
    padding-right: 0.5rem;
    line-height: 1.4;
}

.ea-cert-image-wrap {
    background: #f1f5f9;
    border-radius: 0.625rem;
    padding: 0.625rem;
    overflow: auto;
    max-height: calc(92vh - 120px);
}

.ea-cert-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 0.375rem;
}

@media (max-width: 991px) {
    .ea-cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .ea-about-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ea-cert-modal {
        padding: 0.625rem;
        align-items: flex-end;
    }

    .ea-cert-modal__dialog {
        max-height: 94vh;
        border-radius: 1rem 1rem 0 0;
    }

    .ea-cert-modal__dialog--list {
        padding: 1.375rem 1rem 1.125rem;
    }

    .ea-cert-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .ea-cert-card {
        padding: 0.875rem;
    }

    .ea-cert-image-wrap {
        max-height: calc(94vh - 110px);
        padding: 0.375rem;
    }
}
