/* CHG Governing Table - frontend */
.chg-governing-table {
    width: 100%;
    max-width: 100%;
    color: var(--chg-gov-text, inherit);
    font-size: var(--chg-gov-font-size, 16px);
}

.chg-gov-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chg-governing-table table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    border-spacing: 0;
    border: var(--chg-gov-border-width, 1px) solid var(--chg-gov-border, #e5e7eb);
    border-radius: var(--chg-gov-radius, 0px);
    overflow: hidden;
    background: var(--chg-gov-row-bg, transparent);
    table-layout: fixed;
}

.chg-governing-table th,
.chg-governing-table td {
    border: var(--chg-gov-border-width, 1px) solid var(--chg-gov-border, #e5e7eb);
    padding: var(--chg-gov-padding, 16px);
    text-align: var(--chg-gov-align, left);
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Stable desktop proportions: S.No. stays narrow and designation gets the remaining space. */
.chg-governing-table th:nth-child(1),
.chg-governing-table td:nth-child(1) {
    width: 8%;
}

.chg-governing-table th:nth-child(2),
.chg-governing-table td:nth-child(2) {
    width: 28%;
}

.chg-governing-table th:nth-child(3),
.chg-governing-table td:nth-child(3) {
    width: 64%;
}

.chg-governing-table .chg-gov-cell-content {
    display: block;
    min-width: 0;
    max-width: 100%;
}

.chg-governing-table thead th {
    background: var(--chg-gov-header-bg, transparent);
    color: var(--chg-gov-header-color, inherit);
    font-weight: 700;
}

.chg-governing-table tbody { color: var(--chg-gov-text, inherit); }
.chg-governing-table tbody tr {
    background: var(--chg-gov-row-bg, transparent);
    transition: background-color .2s ease;
}
.chg-governing-table.chg-striped tbody tr:nth-child(even) {
    background: var(--chg-gov-row-alt-bg, transparent);
}
.chg-governing-table.chg-has-hover tbody tr:hover {
    background: var(--chg-gov-hover-bg, var(--chg-gov-row-alt-bg, #f7f7f7));
}
.chg-governing-table .chg-gov-sno {
    white-space: nowrap;
}
.chg-governing-table .chg-gov-name {
    font-weight: 600;
}
.chg-gov-empty {
    padding: 20px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 767px) {
    .chg-governing-table,
    .chg-governing-table * {
        box-sizing: border-box;
    }

    .chg-governing-table .chg-gov-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .chg-governing-table table {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border: var(--chg-gov-border-width, 1px) solid var(--chg-gov-border, #e5e7eb);
        border-collapse: separate;
        background: var(--chg-gov-row-bg, #fff);
        table-layout: auto;
    }

    .chg-governing-table thead { display: none; }
    .chg-governing-table tbody,
    .chg-governing-table tbody tr { display: block; width: 100%; max-width: 100%; }

    .chg-governing-table tbody tr {
        margin: 0 0 14px;
        border: 0;
        border-bottom: var(--chg-gov-border-width, 1px) solid var(--chg-gov-border, #e5e7eb);
        background: var(--chg-gov-row-bg, #fff);
    }
    .chg-governing-table tbody tr:last-child { margin-bottom: 0; }

    .chg-governing-table tbody td,
    .chg-governing-table tbody td.chg-gov-sno,
    .chg-governing-table tbody td.chg-gov-name,
    .chg-governing-table tbody td.chg-gov-designation {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: stretch;
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
        min-height: 48px;
        margin: 0;
        padding: 0 !important;
        border: 0 !important;
        border-bottom: var(--chg-gov-border-width, 1px) solid var(--chg-gov-border, #e5e7eb) !important;
        background: transparent;
        color: var(--chg-gov-text, inherit);
        text-align: left !important;
        line-height: 1.5;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .chg-governing-table tbody td:last-child { border-bottom: 0 !important; }

    .chg-governing-table tbody td::before {
        content: '';
        display: flex;
        align-items: flex-start;
        width: 112px;
        min-width: 112px;
        max-width: 112px;
        padding: 13px 10px;
        background: var(--chg-gov-label-bg, var(--chg-gov-header-bg, #ff8433));
        color: var(--chg-gov-label-color, var(--chg-gov-header-color, #111));
        font-size: .78em;
        font-weight: 700;
        line-height: 1.35;
        text-transform: uppercase;
        letter-spacing: .01em;
        white-space: nowrap;
        overflow: visible;
        pointer-events: none;
    }

    .chg-governing-table tbody td:nth-child(1)::before { content: 'S.No.'; }
    .chg-governing-table tbody td:nth-child(2)::before { content: 'Name'; }
    .chg-governing-table tbody td:nth-child(3)::before { content: 'Designation'; }

    .chg-governing-table tbody td .chg-gov-cell-content {
        min-width: 0;
        max-width: 100%;
        padding: 13px 10px;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .chg-governing-table tbody td {
        font-size: var(--chg-gov-font-size, 16px);
    }

    .chg-governing-table .chg-gov-name { font-weight: 600; }
}


/* CHG Governing Board profile cards — v2.6.0 */
.chg-gov-cards,
.chg-gov-cards * {
    box-sizing: border-box;
}
.chg-gov-cards {
    --chg-gov-card-bg: #fff;
    --chg-gov-card-border: #d7eafe;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.chg-gov-cards .chg-gov-card {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-width: 0;
    min-height: 150px;
    padding: 20px;
    background: var(--chg-gov-card-bg);
    border: 1px solid var(--chg-gov-card-border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.chg-gov-cards .chg-gov-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    background: var(--e-global-color-accent, #f58220);
}
.chg-gov-cards .chg-gov-card__media img,
.chg-gov-cards img.chg-gov-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center center;
}
.chg-gov-cards .chg-gov-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
    background: var(--e-global-color-accent, #f58220);
}
.chg-gov-cards .chg-gov-card__placeholder--empty {
    background: #f1f7fd;
}
.chg-gov-cards .chg-gov-card__content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.chg-gov-cards .chg-gov-card__name {
    margin: 0 0 8px;
    padding: 0;
    color: var(--e-global-color-primary, #071a8c);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.chg-gov-cards .chg-gov-card__designation {
    margin: 0 0 6px;
    color: #3f78b8;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.chg-gov-cards .chg-gov-card__department {
    margin: 0;
    color: var(--e-global-color-text, #7185b4);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: normal;
}
@media (hover: hover) {
    .chg-gov-cards .chg-gov-card:hover {
        border-color: #b8d8fb;
    }
}
@media (max-width: 1024px) {
    .chg-gov-cards {
        gap: 14px;
    }
    .chg-gov-cards .chg-gov-card {
        gap: 16px;
        padding: 16px;
        min-height: 125px;
    }
    .chg-gov-cards .chg-gov-card__media {
        flex-basis: 120px;
        width: 120px;
        height: 120px;
    }
    .chg-gov-cards .chg-gov-card__name {
        font-size: 21px;
    }
    .chg-gov-cards .chg-gov-card__designation {
        font-size: 17px;
    }
    .chg-gov-cards .chg-gov-card__department {
        font-size: 15px;
    }
}
@media (max-width: 767px) {
    .chg-gov-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .chg-gov-cards .chg-gov-card {
        min-height: 0;
        gap: 14px;
        padding: 14px;
        border-radius: 16px;
    }
    .chg-gov-cards .chg-gov-card__media {
        flex-basis: 104px;
        width: 104px;
        height: 112px;
        border-radius: 12px;
    }
    .chg-gov-cards .chg-gov-card__name {
        margin-bottom: 5px;
        font-size: 18px;
        line-height: 1.3;
    }
    .chg-gov-cards .chg-gov-card__designation {
        margin-bottom: 4px;
        font-size: 15px;
        line-height: 1.35;
    }
    .chg-gov-cards .chg-gov-card__department {
        font-size: 13px;
        line-height: 1.45;
    }
}
@media (max-width: 420px) {
    .chg-gov-cards .chg-gov-card {
        gap: 11px;
        padding: 11px;
    }
    .chg-gov-cards .chg-gov-card__media {
        flex-basis: 82px;
        width: 82px;
        height: 94px;
    }
    .chg-gov-cards .chg-gov-card__name {
        font-size: 16px;
    }
    .chg-gov-cards .chg-gov-card__designation {
        font-size: 14px;
    }
    .chg-gov-cards .chg-gov-card__department {
        font-size: 12px;
    }
}


/* Mobile profile cards: image first, then left-aligned member details. */
@media (max-width: 767px) {
    .chg-gov-cards {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        max-width: 100%;
        gap: 18px;
    }
    .chg-gov-cards .chg-gov-card {
        display: flex;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
        min-width: 0;
        min-height: 0;
        gap: 18px !important;
        padding: 18px;
        text-align: left !important;
    }
    .chg-gov-cards .chg-gov-card__media {
        order: 0;
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: clamp(190px, 58vw, 300px) !important;
        min-height: 0;
        align-self: stretch;
        border-radius: 16px;
    }
    .chg-gov-cards .chg-gov-card__media img,
    .chg-gov-cards .chg-gov-card__placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .chg-gov-cards .chg-gov-card__content {
        order: 1;
        flex: 0 0 auto;
        width: 100%;
        max-width: 100% !important;
        min-width: 0;
        text-align: left !important;
    }
    .chg-gov-cards .chg-gov-card__name {
        margin: 0 0 8px;
        font-size: clamp(21px, 5.8vw, 27px);
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .chg-gov-cards .chg-gov-card__designation {
        font-size: 18px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }
    .chg-gov-cards .chg-gov-card__department {
        font-size: 16px;
        line-height: 1.55;
        overflow-wrap: anywhere;
        word-break: normal;
    }
}
