.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
    align-items: stretch;
}

.partner-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 16px;
    background: var(--white);
    border: 1px solid var(--n200);
    border-radius: 24px;
    box-sizing: border-box;
    transition: box-shadow .2s, transform .2s;
}

.partner-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.partner-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 208px;
    max-width: 100%;
    height: 83.33px;
    margin-inline: auto;
}

.partner-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.partner-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.partner-card__name {
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
    color: var(--text-black);
}

.partner-card__desc {
    font-size: 16px;
    font-weight: 400;
    line-height: 30px;
    color: var(--n500);
}

.partner-card--cooperator {
    gap: 24px;
    justify-content: center;
}

.partner-card--cooperator .partner-card__body {
    gap: 16px;
}

.certificates-band {
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    background: #F9FAFB;
    padding-block: 80px;
}

/* نقشة نقط في ركنين: نسخة أعلى البداية والتانية أسفل الطرف.
   الـ SVGs متقصوصة على الجزء الظاهر، فبتتحط بحجمها الطبيعي. */
.certificates-band::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 462px;
    height: 327px;
    background-image: url('../images/textures/related-projects-pattern-topleft.svg');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.certificates-band::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-end: 66px; /* 1440 − 878 − 496 */
    width: 496px;
    height: 430px;
    background-image: url('../images/textures/related-projects-pattern-bottomright.svg');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

html[dir="rtl"] .certificates-band::before,
html[dir="rtl"] .certificates-band::after {
    transform: scaleX(-1);
}

.certificates-band .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.certificates-band__title {
    font-size: 32px;
    font-weight: 600;
    line-height: 48px;
    text-align: center;
    color: var(--text-black);
}

.certificates-band__list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.certificate-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 400px;
    max-width: 100%;
    padding: 24px 16px;
    background: var(--white);
    border: 1px solid var(--n100);
    border-radius: 24px;
    box-sizing: border-box;
}

.certificate-card__image {
    height: 258px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--n100);
    border-radius: 16px;
    overflow: hidden;
}

.certificate-card__image img {
    display: block;
    width: 287px;
    max-width: 100%;
    aspect-ratio: 287 / 230;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.certificate-card__title {
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
    text-align: center;
    color: var(--text-black);
}

@media (max-width: 900px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .certificates-band {
        padding-block: 48px;
    }
    .certificates-band::before,
    .certificates-band::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}
