/* صفحة «أعضاء الجهة» في منصة المجتمع الجيومكاني.
   تُحمَّل بعد css/site.css و css/GEOSA_Community_Home.css (أقسام المنصة cm-*).

   الصفحة تحوي أقسام الجهات كلها، والسكربت js/GEOSA_Community_Org.js يُظهر
   الجهة المطلوبة في الرابط (?org=NN) ويخفي البقية؛ وبلا سكربت تظهر كلها.

   بطاقة العضو على نمط بطاقة العضوية في المصدر: شعار الجهة في رأس أبيض،
   وتحته شريط بلون المنصة فيه اسم العضو ومسمّاه. */

.co-org {
    padding: 0;   /* UDesign تعطي كل section حشوة 40px */
}

.co-org[hidden],
.co-org__head[hidden] {
    display: none;
}

.co-org:not([hidden]) ~ .co-org:not([hidden]) {
    margin-top: 56px;
}

/* رأس الجهة: شعارها واسمها وعدد أعضائها */
.co-org__head {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.co-org__logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 96px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.co-org__logo img,
.co-card__logo img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.co-org__name {
    margin: 0;
    font-size: 1.5rem !important;
    font-weight: 700;
    line-height: 1.5;
    color: #161616;
}

.co-org__count {
    margin: 4px 0 0;
    font-size: 1rem;
    color: #384250;
}

/* ===== بطاقات الأعضاء ===== */
.co-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.co-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #d2d6db;
    border-radius: 16px;
    background: #fff;
    aspect-ratio: 3 / 4;   /* طولية كبطاقة العضوية */
}

.co-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44%;
    min-height: 0;
    padding: 28px;
    border-top: 8px solid #104631;
    background: #fff;
}

.co-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: #1b8354;
    text-align: center;
}

.co-card__name {
    margin: 0;
    padding: 6px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    font-size: 1.125rem !important;   /* UDesign تفرض حجم h3 على الجوال */
    font-weight: 700;
    line-height: 1.6;
    color: #fff;
}

.co-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #e5f5ec;
}

/* ===== العودة ===== */
.co-back {
    margin-top: 40px;
}

.co-back .dga-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-inline: 24px !important;   /* حشوة الزر الافتراضية 16px تُلصق السهم بالحافة */
}

.co-back__arrow {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

@media (max-width: 1199.98px) {
    .co-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .co-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 575.98px) {
    .co-org__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .co-org__name {
        font-size: 1.25rem !important;
    }

    .co-cards {
        grid-template-columns: minmax(0, 300px);
        justify-content: center;
        gap: 20px;
    }
}
