/**
 * AFAM Team styles: the registrar.test team pattern (centred cards, circular photo with a ring, name over role, lift on hover,
 * profile in a dialog) in AFAM colours and fonts. Layouts: grid, list, featured.
 * Author: Kiriago <kiryc0de@gmail.com> (https://github.com/kirycode/)
 */
.afam-team-wrap { --afam-team-green: var(--afam-green-900, #084c2c); --afam-team-gold: var(--afam-gold-500, #cbae2d); --afam-team-role: #8a4b08; }
.afam-team-wrap .afam-team__group { margin: 40px 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--afam-team-gold); font-family: var(--afam-font-head, serif); font-size: 1.5rem; color: var(--afam-team-green); }
.afam-team-wrap .afam-team__group:first-child { margin-top: 0; }
.afam-team { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 24px; margin: 0 0 8px; padding: 0; list-style: none; align-items: stretch; }
@media (max-width: 1024px) { .afam-team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .afam-team { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.afam-team__item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; padding: 30px 22px 26px; border-radius: 10px; background: #fff; box-shadow: 0 6px 24px rgba(8, 76, 44, 0.09); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.afam-team__item.is-clickable { cursor: pointer; }
.afam-team__item.is-clickable:is(:hover, :focus-within) { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(8, 76, 44, 0.18); }
@media (prefers-reduced-motion: reduce) { .afam-team__item { transition: none; } .afam-team__item.is-clickable:is(:hover, :focus-within) { transform: none; } }
.afam-team__media { flex: 0 0 auto; width: 140px; height: 140px; margin-bottom: 18px; display: flex; align-items: center; justify-content: center; }
.afam-team__media--sm { width: 96px; height: 96px; margin: 0; }
.afam-team__photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 22%; display: block; box-shadow: 0 0 0 4px var(--afam-team-gold); }
.afam-team__initials { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; background: var(--afam-team-green); box-shadow: inset 0 0 0 5px var(--afam-team-gold); color: #fff; font-family: var(--afam-font-head, serif); font-weight: 700; font-size: 2.6rem; letter-spacing: 1px; line-height: 1; user-select: none; }
.afam-team__media--sm .afam-team__initials { font-size: 1.9rem; }
.afam-team__body { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.afam-team .afam-team__name { margin: 0 0 4px; font-family: var(--afam-font-head, serif); font-size: 1.3125rem; font-weight: 700; line-height: 1.3; color: var(--afam-team-green); letter-spacing: 0; text-transform: none; }
.afam-team .afam-team__open { all: unset; cursor: pointer; color: inherit; font: inherit; }
.afam-team .afam-team__open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 10px; }
.afam-team .afam-team__open:focus-visible::after { outline: 3px solid var(--afam-team-green); outline-offset: 2px; }
.afam-team .afam-team__role { margin: 0; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--afam-team-role); line-height: 1.45; }
.afam-team .afam-team__aff { margin: 0; font-size: 0.9375rem; color: var(--afam-ink-700, #444); line-height: 1.5; }
/* list layout */
.afam-team--list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.afam-team--list .afam-team__item { flex-direction: row; text-align: left; align-items: center; gap: 20px; padding: 16px 22px; }
.afam-team--list .afam-team__media { width: 84px; height: 84px; margin: 0; }
.afam-team--list .afam-team__initials { font-size: 1.6rem; }
.afam-team--list .afam-team__body { align-items: flex-start; }
@media (max-width: 560px) { .afam-team--list .afam-team__item { gap: 14px; padding: 14px; } .afam-team--list .afam-team__media { width: 64px; height: 64px; } }
/* featured layout: first person large and horizontal */
.afam-team--featured-one { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
.afam-team__item.is-featured { flex-direction: row; text-align: left; align-items: center; gap: 32px; padding: 36px 40px; background: var(--afam-team-green); }
.afam-team__item.is-featured .afam-team__media { width: 200px; height: 200px; margin: 0; }
.afam-team__item.is-featured .afam-team__body { align-items: flex-start; }
.afam-team .afam-team__item.is-featured > .afam-team__body .afam-team__name { color: #fff; font-size: 1.75rem; }
.afam-team .afam-team__item.is-featured > .afam-team__body .afam-team__role { color: var(--afam-team-gold); }
.afam-team .afam-team__item.is-featured > .afam-team__body .afam-team__aff { color: #e8f0e2; }
.afam-team .afam-team__item.is-featured .afam-team__open:focus-visible::after { outline-color: #fff; }
@media (max-width: 700px) { .afam-team__item.is-featured { flex-direction: column; text-align: center; padding: 28px 20px; } .afam-team__item.is-featured .afam-team__body { align-items: center; } .afam-team__item.is-featured .afam-team__media { width: 150px; height: 150px; } }
/* profile dialog */
.afam-team__dhead { display: flex; align-items: center; gap: 18px; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1px solid #e6ede2; }
.afam-team__dhead .afam-team__role { margin: 0 0 2px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8a4b08; }
.afam-team__dhead .afam-team__aff { margin: 0; color: #444; }
.afam-team__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.afam-team__dialog .afam-team__link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid #336600; border-radius: 999px; color: #336600; font-weight: 700; text-decoration: none; }
.afam-team__dialog .afam-team__link:is(:hover, :focus-visible) { background: #336600; color: #fff; }
/* U-017: 4 / 3 / 2 / 1 columns; a short last row is centred (flex), never left half-empty. */
.afam-team--grid { display: flex; flex-wrap: wrap; justify-content: center; --c: var(--cols, 3); }
.afam-team--grid > .afam-team__item { flex: 0 0 calc((100% - (var(--c) - 1) * 24px) / var(--c)); min-width: 0; box-sizing: border-box; }
@media (max-width: 1279px) { .afam-team--grid { --c: min(var(--cols, 3), 3); } }
@media (max-width: 1024px) { .afam-team--grid { --c: min(var(--cols, 3), 2); } }
@media (max-width: 560px) { .afam-team--grid { --c: 1; gap: 18px; } .afam-team--grid > .afam-team__item { flex-basis: 100%; } }
.afam-team .afam-team__phd { display: block; margin-top: 2px; font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--afam-ink-700, #444); }
.afam-team .afam-team__term { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--afam-team-green); }
.afam-team__dialog .afam-team__phd { display: inline; font-size: inherit; }
.afam-team__facts { margin: 0 0 14px; }
.afam-team__facts dt { margin: 12px 0 2px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #8a4b08; }
.afam-team__facts dd { margin: 0; line-height: 1.55; }
/* U-017: the circular photo must survive the content skin (img height/radius resets) inside Elementor containers. */
.afam-team-wrap .afam-team .afam-team__media .afam-team__photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.afam-team-wrap .afam-team .afam-team__name .afam-team__phd { font-family: var(--afam-font-body, sans-serif); font-weight: 500; font-size: 0.875rem; color: var(--afam-ink-700, #444); }

/* U-027 review A8: coloured committee member cards (layout="committee"). Chair = gold badge, Member = green badge, region = separate chip. */
.afam-team-wrap .afam-cmlist { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 1024px) { .afam-team-wrap .afam-cmlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .afam-team-wrap .afam-cmlist { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.afam-team-wrap .afam-cm { display: flex; gap: 16px; align-items: flex-start; margin: 0; padding: 20px 18px; background: #fff; border: 1px solid #d7e3dc; border-top: 5px solid #0c643a; border-radius: 12px; box-shadow: 0 6px 20px rgba(8, 76, 44, 0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.afam-team-wrap .afam-cm:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(8, 76, 44, 0.14); }
.afam-team-wrap .afam-cm.is-chair { border-top-color: #cbae2d; background: linear-gradient(180deg, #fffaf0 0, #fff 70%); }
.afam-team-wrap .afam-cm__av { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #0c643a; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #cbae2d; }
.afam-team-wrap .afam-cm:not(.is-chair) .afam-cm__av { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #0c643a; }
.afam-team-wrap .afam-cm__photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.afam-team-wrap .afam-cm__ini { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-family: var(--afam-font-head, serif); font-size: 1.35rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0c643a, #084c2c); }
.afam-team-wrap .afam-cm.is-chair .afam-cm__ini { color: #3b3000; background: linear-gradient(135deg, #e3c94f, #cbae2d); }
.afam-team-wrap .afam-cm__body { min-width: 0; flex: 1 1 auto; text-align: left; }
.afam-team-wrap .afam-cm__name { margin: 0 0 8px; font-family: var(--afam-font-head, serif); font-size: 1.15rem; line-height: 1.25; color: #084c2c; text-align: left; overflow-wrap: anywhere; }
.afam-team-wrap .afam-cm__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; text-align: left; }
.afam-team-wrap .afam-cm__badge, .afam-team-wrap .afam-cm__region { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.4; }
.afam-team-wrap .afam-cm__badge--chair { background: #cbae2d; color: #2f2700; }
.afam-team-wrap .afam-cm__badge--member { background: #0c643a; color: #fff; }
.afam-team-wrap .afam-cm__region { background: #fdebd9; color: #6e3406; letter-spacing: 0.02em; text-transform: none; font-weight: 700; }
.afam-team-wrap .afam-cm__aff { margin: 0; font-size: 0.95rem; line-height: 1.5; color: #2b3a31; text-align: left; }
@media (prefers-reduced-motion: reduce) { .afam-team-wrap .afam-cm { transition: none; } .afam-team-wrap .afam-cm:hover { transform: none; } }
