/* ==================================================
   ANCOR — OFFICIAL SUCCESS PARTNERS
   ================================================== */

.ancor-success-partners-official-section {
    display: block !important;
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: clamp(72px, 8vw, 110px) 0 !important;
    overflow: hidden;
    color: #212121;
    background:
        radial-gradient(
            circle at 8% 10%,
            rgba(184, 96, 96, 0.07),
            transparent 28%
        ),
        #faf9f7 !important;
}

.ancor-success-partners-official-section *,
.ancor-success-partners-official-section *::before,
.ancor-success-partners-official-section *::after {
    box-sizing: border-box;
}

.ancor-official-partners-shell {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
}

.ancor-official-partners-heading {
    max-width: 760px;
    margin: 0 auto 45px;
    text-align: center;
}

.ancor-official-partners-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #b86060;
    font-size: 13px;
    font-weight: 900;
}

.ancor-official-partners-kicker::before,
.ancor-official-partners-kicker::after {
    content: "";
    width: 28px;
    height: 1px;
    background: rgba(184, 96, 96, 0.55);
}

.ancor-official-partners-heading h2 {
    margin: 0 0 13px !important;
    color: #212121 !important;
    font-size: clamp(34px, 4vw, 54px) !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.035em;
}

.ancor-official-partners-heading p {
    margin: 0 !important;
    color: #707070 !important;
    font-size: 16px !important;
    line-height: 1.9 !important;
}

.ancor-official-partners-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100%;
}

.ancor-official-partner-card {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    min-height: 300px;
    padding: 30px 24px 25px;
    overflow: hidden;
    border: 1px solid rgba(33, 33, 33, 0.1);
    border-radius: 20px;
    color: #212121 !important;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(33, 33, 33, 0.055);
    text-align: center;
    text-decoration: none !important;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.ancor-official-partner-card:hover,
.ancor-official-partner-card:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(184, 96, 96, 0.4);
    box-shadow: 0 28px 70px rgba(33, 33, 33, 0.1);
    outline: none;
}

.ancor-official-partner-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 175px;
    padding: 18px;
    border-radius: 15px;
    background: #ffffff;
}

.ancor-official-partner-logo {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 120px !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    filter: none !important;
    opacity: 1 !important;
}

.ancor-official-partner-card--housing
.ancor-official-partner-logo {
    max-width: 310px !important;
    max-height: 105px !important;
}

.ancor-official-partner-card--commerce
.ancor-official-partner-logo {
    max-width: 300px !important;
    max-height: 105px !important;
}

.ancor-official-partner-card--ora
.ancor-official-partner-logo {
    max-width: 138px !important;
    max-height: 138px !important;
}

.ancor-official-partner-name {
    display: block;
    margin-top: 20px;
    color: #212121;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.65;
}

.ancor-official-partner-link-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: #957a56;
    font-size: 12px;
    font-weight: 800;
}

.ancor-official-partner-link-label::after {
    content: "↗";
    font-family: Arial, sans-serif;
    font-size: 14px;
}

@media (max-width: 900px) {
    .ancor-official-partners-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
    }

    .ancor-official-partner-card:last-child {
        grid-column: 1 / -1;
        width: min(100%, 520px);
        justify-self: center;
    }
}

@media (max-width: 620px) {
    .ancor-official-partners-shell {
        width: min(100% - 30px, 1280px);
    }

    .ancor-official-partners-grid {
        grid-template-columns: 1fr !important;
    }

    .ancor-official-partner-card,
    .ancor-official-partner-card:last-child {
        grid-column: auto;
        width: 100%;
        min-height: 260px;
    }

    .ancor-official-partner-logo-box {
        height: 145px;
    }

    .ancor-official-partners-heading p {
        font-size: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ancor-official-partner-card {
        transition: none;
    }
}

/* COMMERCE WHITE LOGO VISIBILITY — START */

/*
 * النسخة الرسمية المتاحة من شعار وزارة التجارة
 * بيضاء، لذلك توضع على خلفية داكنة دون تعديل
 * ألوان ملف الشعار نفسه.
 */
.ancor-official-partner-card--commerce
.ancor-official-partner-logo-box {
    background:
        linear-gradient(
            135deg,
            #263b48 0%,
            #172a35 100%
        ) !important;

    border: 1px solid rgba(255, 255, 255, .10);
}

.ancor-official-partner-card--commerce
.ancor-official-partner-logo {
    filter: none !important;
    opacity: 1 !important;
}

/* COMMERCE WHITE LOGO VISIBILITY — END */
