/* ==========================================================
   SSPKM – Management Desk + Trustee pages
   ========================================================== */

/* ---------- shared section heading ---------- */
.sec-head {
    margin-bottom: 38px;
}

.sec-head .eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 5px 14px;
    border-radius: 50px;
    background: rgba(249, 88, 60, .09);
    margin-bottom: 12px;
}

.sec-head h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 300;
}

.sec-head h2 b {
    font-weight: 700;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

hr.title-underline.center {
    margin: 16px auto 0;
}

/* shared portrait frame (replaces the old grey 2px border) */
.trustee-img {
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
}

/* ==========================================================
   MANAGEMENT DESK
   ========================================================== */
#main-trustee {
    padding: 70px 0 20px;
    background:
        radial-gradient(520px 300px at 0% 0%, rgba(58, 124, 202, .10), transparent 70%),
        radial-gradient(480px 320px at 100% 60%, rgba(249, 88, 60, .08), transparent 70%), #fff;
}

#main-trustee .row {
    margin-bottom: 56px;
}

@media (min-width:992px) {
    #main-trustee .row {
        display: flex;
        align-items: flex-start;
    }

    #main-trustee .row:nth-of-type(even) {
        flex-direction: row-reverse;
    }

    /* zig-zag */
}

/* portrait: formal white mat + thin outline (the photo files carry their own dark border, so crop it by scaling inside an overflow:hidden box) */
#main-trustee .col-md-3 {
    padding-top: 14px;
}

#main-trustee .trustee-img {
    position: relative;
    width: 100% !important;
    max-width: 230px;
    margin: 0 auto !important;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 0 9px #fff, 0 0 0 10px #dfe6f0, 0 18px 38px rgba(11, 31, 58, .16);
    transition: box-shadow .5s var(--ease);
}

#main-trustee .trustee-img img {
    display: block;
    width: 100%;
    transform: scale(1.07);
}

#main-trustee .row:hover .trustee-img {
    box-shadow: 0 0 0 9px #fff, 0 0 0 10px #c9d6e8, 0 24px 46px rgba(11, 31, 58, .22);
}

/* message card */
#main-trustee .col-md-9 {
    position: relative;
    background: #fff;
    border-radius: 28px;
    padding: 40px 46px 34px !important;
    box-shadow: 0 18px 50px rgba(11, 31, 58, .10);
    border: 1px solid rgba(11, 31, 58, .05);
}

#main-trustee .col-md-9::before {
    content: "\201C";
    position: absolute;
    top: 6px;
    right: 34px;
    font: 700 150px/1 Georgia, serif;
    color: rgba(45, 95, 156, .10);
    pointer-events: none;
}

#main-trustee .col-md-9::after {
    content: "";
    position: absolute;
    left: 0;
    top: 36px;
    bottom: 36px;
    width: 5px;
    border-radius: 0 5px 5px 0;
    background: var(--brand);
}

#main-trustee h1 {
    font-size: 34px;
    font-weight: 800 !important;
    margin: 0 0 10px;
    letter-spacing: -.02em;
}

#main-trustee h3.position {
    display: inline-block;
    margin: 0 0 6px;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600 !important;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--brand);
}

#main-trustee h3:not(.position) {
    font-size: 21px;
    font-weight: 300;
    color: var(--brand);
    margin: 22px 0 4px;
}

#main-trustee h3:not(.position)+p {
    font-weight: 600;
    color: var(--ink);
}

#main-trustee p {
    text-align: left !important;
    color: #3b4656;
    line-height: 1.95;
    font-size: 15.5px;
    margin-bottom: 14px;
}

/* office bearers */
#general-trustee {
    background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%) !important;
    padding: 60px 0 40px !important;
}

#general-trustee .row.text-center {
    display: flex;
    flex-wrap: wrap;
}

#general-trustee .row.text-center>.col-md-12:empty {
    display: none;
}

#general-trustee .row.text-center>.col-md-4 {
    display: flex;
    margin-bottom: 30px;
}

.pcard {
    position: relative;
    flex: 1;
    overflow: hidden;
    text-align: center;
    background: #fff;
    border-radius: 26px;
    padding: 34px 22px 28px;
    box-shadow: 0 10px 30px rgba(11, 31, 58, .08);
    border: 1px solid rgba(11, 31, 58, .05);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.pcard::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--brand-2), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .6s var(--ease);
}

.pcard:hover {
    transform: translateY(-10px);
    box-shadow: 0 26px 54px rgba(11, 31, 58, .18);
}

.pcard:hover::before {
    transform: scaleX(1);
}

/* square portrait frame - the WHOLE photo is shown (contain), nothing is cropped */
.pcard .trustee-img,
#general-trustee>.container>.row.display-flex .trustee-img {
    width: 170px !important;
    height: 212px !important;
    margin: 0 auto 18px !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5fa !important;
    border: 1px solid #dfe6f0 !important;
    box-shadow: 0 8px 20px rgba(11, 31, 58, .10);
    transition: box-shadow .5s var(--ease), border-color .5s;
}

.pcard .trustee-img img,
#general-trustee>.container>.row.display-flex .trustee-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border: 0;
    border-radius: 0;
    transition: transform .6s var(--ease);
}

.pcard:hover .trustee-img,
#general-trustee>.container>.row.display-flex .row:hover .trustee-img {
    border-color: #b9c9e0 !important;
    box-shadow: 0 14px 30px rgba(11, 31, 58, .18);
}

.pcard:hover .trustee-img img,
#general-trustee>.container>.row.display-flex .row:hover .trustee-img img {
    transform: scale(1.04);
}

.pcard h4 {
    font-size: 18px;
    font-weight: 700 !important;
    margin: 0 0 10px;
}

.pcard h5 {
    display: inline-block;
    margin: 0;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
    background: rgba(45, 95, 156, .09);
}

/* past presidents / secretaries -> two cards */
#list-trustee {
    background: linear-gradient(180deg, var(--bg-soft), #fff) !important;
    padding: 60px 0 70px !important;
}

#list-trustee .col-md-6.border-right-orange {
    padding: 0 15px !important;
}

#list-trustee .col-md-6.border-right-orange::after {
    display: none !important;
}

#list-trustee .col-md-6:not(.border-right-orange) {
    padding: 0 15px !important;
}

#list-trustee .col-md-6 {
    margin-bottom: 24px;
}

#list-trustee table {
    background: #fff;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(11, 31, 58, .10);
    border: 1px solid rgba(11, 31, 58, .05);
    padding: 0 0 14px;
}

#list-trustee table td[colspan] {
    padding: 20px 24px !important;
    border-bottom: 0;
    margin: 0;
    background: linear-gradient(120deg, #143a6b, var(--brand) 55%, var(--brand-2));
}

#list-trustee .secretaries-table td[colspan] {
    background: linear-gradient(120deg, #c8391f, var(--accent) 55%, var(--accent-2));
}

#list-trustee table td[colspan] h2 {
    color: #fff;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
}

#list-trustee table tr:first-child:hover td {
    background: inherit;
}

#list-trustee table td:first-child {
    position: relative;
    padding-left: 44px !important;
}

#list-trustee table td[colspan]:first-child {
    padding-left: 24px !important;
}

#list-trustee table td:last-child {
    padding-right: 24px !important;
}

#list-trustee table tr:not(:first-child) td:first-child::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 19px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand-2);
    box-shadow: 0 0 0 4px rgba(58, 124, 202, .12);
    transition: transform .3s var(--ease);
}

#list-trustee .secretaries-table tr:not(:first-child) td:first-child::before {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(249, 88, 60, .12);
}

#list-trustee .secretaries-table td:first-child {
    color: #c8391f;
}

#list-trustee table tr:not(:first-child):hover td:first-child::before {
    transform: scale(1.35);
}

/* ==========================================================
   TRUSTEE PAGE (members come from the database)
   ========================================================== */
#general-trustee>.container>.row.display-flex {
    margin-left: -12px;
    margin-right: -12px;
}

#general-trustee>.container>.row.display-flex>[class*='col-'] {
    padding: 0 12px;
    margin-bottom: 26px;
}

#general-trustee>.container>.row.display-flex>[class*='col-']>.row {
    flex: 1;
    margin: 0;
    padding: 30px 12px 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(11, 31, 58, .08);
    border: 1px solid rgba(11, 31, 58, .05);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

#general-trustee>.container>.row.display-flex>[class*='col-']>.row::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--brand-2), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .6s var(--ease);
}

#general-trustee>.container>.row.display-flex>[class*='col-']>.row:hover {
    transform: translateY(-10px);
    box-shadow: 0 26px 54px rgba(11, 31, 58, .18);
}

#general-trustee>.container>.row.display-flex>[class*='col-']>.row:hover::before {
    transform: scaleX(1);
}

#general-trustee>.container>.row.display-flex .row .col-md-12 {
    padding-left: 8px;
    padding-right: 8px;
}

#general-trustee .names {
    width: auto !important;
    margin: 0 0 6px !important;
    font-size: 14px !important;
    color: var(--muted);
    line-height: 1.5;
}

#general-trustee .names b {
    display: block;
    font-size: 17px;
    font-weight: 700 !important;
    color: var(--ink);
    margin-bottom: 3px;
}

/* ---------- responsive ---------- */
@media (max-width:991px) {
    #main-trustee .row {
        margin-bottom: 40px;
    }

    #main-trustee .col-md-3 {
        margin-bottom: 38px;
    }

    #main-trustee .col-md-9 {
        padding: 32px 26px 26px !important;
    }
}

@media (max-width:767px) {
    .sec-head h2 {
        font-size: 26px;
    }

    #main-trustee {
        padding: 44px 0 10px;
    }

    #main-trustee .trustee-img {
        max-width: 190px;
    }

    #main-trustee .col-md-9 {
        padding: 28px 20px 22px !important;
        border-radius: 22px;
    }

    #main-trustee .col-md-9::before {
        font-size: 100px;
        right: 18px;
    }

    #main-trustee h1 {
        font-size: 26px;
    }

    #main-trustee p {
        font-size: 14.5px;
        line-height: 1.8;
    }

    #general-trustee .row.text-center>.col-md-4 {
        margin-bottom: 20px;
    }

    .pcard .trustee-img,
    #general-trustee>.container>.row.display-flex .trustee-img {
        width: 128px !important;
        height: 160px !important;
    }

    #general-trustee>.container>.row.display-flex {
        margin-left: -6px;
        margin-right: -6px;
    }

    #general-trustee>.container>.row.display-flex>[class*='col-'] {
        padding: 0 6px;
        margin-bottom: 14px;
    }

    #general-trustee>.container>.row.display-flex>[class*='col-']>.row {
        padding: 20px 4px 12px;
        border-radius: 18px;
    }

    #general-trustee .names {
        font-size: 12px !important;
    }

    #general-trustee .names b {
        font-size: 14px;
    }

    #list-trustee {
        padding: 40px 0 50px !important;
    }

    #list-trustee table td[colspan] {
        padding: 16px 18px !important;
    }
}

@media (prefers-reduced-motion:reduce) {

    .pcard:hover,
    #main-trustee .row:hover .trustee-img {
        transform: none;
    }
}