/* ==========================================================================
   Leadership / Board of Trustees – modern profile cards
   Used by Areas/User/Views/Committee/Index.cshtml (/c/board-of-trustees and other wings).
   Photo -> uploads-server fallback -> initials avatar (never a broken image).
   ========================================================================== */

/* section headings: "Religious Wing", "Administrative Wing", ... */
.tr-section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 34px 0 20px;
}
.tr-section-head:first-child { margin-top: 10px; }
.tr-section-head::before,
.tr-section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(194, 65, 12, .45), transparent);
}
.tr-section-title {
    margin: 0;
    padding: 8px 22px;
    border-radius: 999px;
    background: #fff4e6;
    border: 1px solid rgba(194, 65, 12, .25);
    color: #7a1f0e;
    font-family: 'BenguiatStd-Book', Georgia, serif;
    font-size: 19px;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* profile card */
.tr-card {
    height: 100%;
    background: #fff;
    border: 1px solid rgba(122, 31, 14, .10);
    border-radius: 20px;
    padding: 26px 16px 22px;
    text-align: center;
    box-shadow: 0 10px 26px -16px rgba(90, 30, 5, .40);
    transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s cubic-bezier(.2, .7, .2, 1), border-color .3s;
    position: relative;
    overflow: hidden;
}
.tr-card::before { /* warm band behind the photo */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 92px;
    background: linear-gradient(135deg, #fde3c2 0%, #fbd09a 100%);
}
.tr-card:hover {
    transform: translateY(-6px);
    border-color: rgba(232, 118, 27, .45);
    box-shadow: 0 22px 40px -18px rgba(90, 30, 5, .5);
}

/* round photo with a gold ring; initials sit underneath and show if there is no photo */
.tr-photo {
    --tr-color: #c2410c;
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto 16px;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 210deg, #f4c55b, #e8761b, #f4c55b, #d9a520, #f4c55b);
    box-shadow: 0 10px 22px -10px rgba(90, 30, 5, .55);
}
.tr-initials,
.tr-img {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    border: 3px solid #fff;
}
.tr-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .25), transparent 55%), var(--tr-color);
    color: #fff;
    font-family: 'BenguiatStd-Medium', Georgia, serif;
    font-size: 40px;
    letter-spacing: .04em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.tr-img {
    object-fit: cover;
    background: transparent; /* initials stay visible while a photo is still loading */
    z-index: 1;
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.tr-img.tr-img-missing { display: none; }
.tr-card:hover .tr-img { transform: scale(1.04); }

.tr-name {
    margin: 0 0 6px;
    color: #2b1a0e;
    font-family: 'Poppins-Medium', 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.35;
}
.tr-role {
    display: inline-block;
    margin-top: 2px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff4e6;
    color: #a3330f;
    font-size: 12.5px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

@media (max-width: 575px) {
    .tr-card { padding: 20px 10px 18px; border-radius: 16px; }
    .tr-card::before { height: 74px; }
    .tr-photo { width: 104px; height: 104px; }
    .tr-initials { font-size: 32px; }
    .tr-name { font-size: 14.5px; }
    .tr-role { font-size: 11px; padding: 3px 9px; }
    .tr-section-title { font-size: 16px; padding: 6px 14px; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-card, .tr-img { transition: none !important; }
}
