/**
 * AFAM home page sections (DES-008): hero, intro and stats, membership, conference, publications, spotlight, news, call to action.
 * Author: Kiriago <kiryc0de@gmail.com> (https://github.com/kirycode/)
 */
.afam-btn--outline-light { background: transparent; color: #fff; border-color: #fff; }
.afam-scope .afam-btn--outline-light { color: #fff; }
.afam-btn--outline-light:hover { background: #fff; color: var(--afam-green-900); }
.afam-scope .afam-btn--outline-light:hover { color: var(--afam-green-900); }

/* Hero */
.afam-hero { position: relative; overflow: hidden; background: var(--afam-green-900); color: #fff; isolation: isolate; }
.afam-hero__pic,
.afam-hero__pic img { display: block; width: 100%; }
.afam-hero__pic img { height: clamp(360px, 38vw, 560px); object-fit: cover; object-position: center 35%; }
.afam-hero__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8, 76, 44, 0.92) 0%, rgba(8, 76, 44, 0.78) 38%, rgba(8, 76, 44, 0.25) 75%, rgba(8, 76, 44, 0.05) 100%); }
.afam-hero__inner { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; justify-content: center; max-width: var(--afam-content-width); margin: 0 auto; padding: 0 var(--afam-sp-5); box-sizing: border-box; }
.afam-hero .afam-hero__title { color: #fff; font-size: var(--afam-fs-h1); max-width: 18ch; margin: 0 0 var(--afam-sp-3); }
.afam-hero__eyebrow { margin: 0 0 var(--afam-sp-2); font-size: var(--afam-fs-small); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--afam-gold-300); }
.afam-hero .afam-hero__text { max-width: 46ch; margin: 0 0 var(--afam-sp-5); font-size: 1.125rem; color: #fff; }
.afam-hero__cta { display: flex; flex-wrap: wrap; gap: var(--afam-sp-3); margin: 0; }
@media (max-width: 767px) {
	.afam-hero__pic img { height: 460px; }
	.afam-hero__shade { background: linear-gradient(180deg, rgba(8, 76, 44, 0.55) 0%, rgba(8, 76, 44, 0.9) 100%); }
	.afam-hero__inner { justify-content: flex-end; padding-bottom: var(--afam-sp-6); }
	.afam-hero .afam-hero__title { max-width: none; }
	.afam-hero .afam-hero__text { font-size: 1rem; }
	.afam-hero__cta .afam-btn { flex: 1 1 100%; }
}

/* Sections */
.afam-home-section { padding: var(--afam-sp-8) 0; }
.afam-home-section--alt { background: var(--afam-surface); }
.afam-home-section--green { background: var(--afam-green-900); color: #fff; }
.afam-home-section--green h2,
.afam-home-section--green h3 { color: #fff; }
@media (max-width: 1024px) { .afam-home-section { padding: var(--afam-sp-7) 0; } }
@media (max-width: 767px) { .afam-home-section { padding: var(--afam-sp-7) 0 40px; } }

.e-con.afam-grid-3, .afam-grid-3 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--afam-sp-5); }
.e-con.afam-grid-4, .afam-grid-4 { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--afam-sp-5); }
@media (max-width: 1024px) { .afam-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .afam-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .afam-grid-3, .afam-grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* Latest posts */
.afam-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--afam-sp-5); }
@media (max-width: 1024px) { .afam-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .afam-cards { grid-template-columns: minmax(0, 1fr); } }
.afam-post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.afam-post-card__img img { display: block; width: 100%; height: 190px; object-fit: cover; }
.afam-post-card .afam-post-card__date { margin: var(--afam-sp-4) var(--afam-sp-5) 0; font-size: var(--afam-fs-small); color: var(--afam-ink-700); }
.afam-post-card h3 { margin: var(--afam-sp-2) var(--afam-sp-5) var(--afam-sp-5); font-size: 1.125rem; line-height: 1.35; }
.afam-post-card h3 a { color: var(--afam-green-900); text-decoration: none; }
.afam-post-card h3 a:hover { text-decoration: underline; }
.afam-post-card h3 a:focus-visible { outline: none; box-shadow: var(--afam-focus-ring); }

/* Conference */
.afam-conf { display: flex; flex-direction: column; gap: var(--afam-sp-2); align-items: flex-start; }
.afam-conf .afam-conf__label { margin: 0; font-size: var(--afam-fs-small); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--afam-gold-300); }
.afam-conf .afam-conf__when { margin: 0 0 var(--afam-sp-3); font-family: var(--afam-font-head); font-weight: 700; font-size: var(--afam-fs-h2); line-height: 1.2; color: #fff; }

/* Stats row */
.e-con.afam-stats, .afam-stats { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--afam-sp-4); }
@media (max-width: 767px) { .afam-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Page-level: stop the legacy theme from creating horizontal scroll on desktop widths */
html, body { overflow-x: clip; }

/* Home page building blocks (Elementor containers carry these classes) */
.afam-home-hero { width: 100%; }
.afam-home-section > .afam-inner,
.afam-home-section .afam-inner { max-width: var(--afam-content-width); margin-left: auto; margin-right: auto; width: 100%; box-sizing: border-box; }
.afam-scope .afam-h .elementor-heading-title { font-family: var(--afam-font-head); font-weight: 700; color: var(--afam-green-900); line-height: 1.25; margin: 0; }
.afam-scope h2.elementor-heading-title { font-size: var(--afam-fs-h2); }
.afam-scope h3.elementor-heading-title { font-size: var(--afam-fs-h3); }
.afam-scope .elementor-widget-text-editor,
.afam-scope .elementor-widget-text-editor p { font-family: var(--afam-font-body); font-size: 1.0625rem; line-height: var(--afam-lh-body); color: var(--afam-ink-900); max-width: 70ch; }
.afam-scope.afam-home-section--green .afam-h .elementor-heading-title { color: #fff; }
.afam-scope.afam-home-section--green .elementor-widget-text-editor,
.afam-scope.afam-home-section--green .elementor-widget-text-editor p { color: #fff; }
.afam-actions { display: flex; flex-wrap: wrap; gap: var(--afam-sp-3); }
.afam-card.e-con { padding: var(--afam-sp-5); }
.afam-scope .afam-card .elementor-widget-text-editor p { font-size: 1rem; }

/* Elementor button widgets styled with tokens */
.afam-scope .afam-wbtn .elementor-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--afam-sp-5); border: 2px solid transparent; border-radius: var(--afam-hdr-cta-radius); font-family: var(--afam-font-body); font-size: 0.9375rem; font-weight: 700; line-height: 1; transition: background-color var(--afam-transition), color var(--afam-transition); }
.afam-wbtn .elementor-button:focus-visible { outline: none; box-shadow: var(--afam-focus-ring); }
.afam-scope .afam-wbtn--primary .elementor-button { background: var(--afam-green-600); color: #fff; }
.afam-scope .afam-wbtn--primary .elementor-button:hover { background: var(--afam-green-500); color: #fff; }
.afam-scope .afam-wbtn--ghost .elementor-button { background: transparent; color: var(--afam-green-600); border-color: var(--afam-green-600); }
.afam-scope .afam-wbtn--ghost .elementor-button:hover { background: var(--afam-green-600); color: #fff; }
.afam-scope .afam-wbtn--cta .elementor-button { background: var(--afam-cta-bg); color: var(--afam-cta-fg); }
.afam-scope .afam-wbtn--cta .elementor-button:hover { background: var(--afam-cta-bg-hover); color: var(--afam-cta-fg-hover); }
.afam-scope .afam-wbtn--light .elementor-button { background: transparent; color: #fff; border-color: #fff; }
.afam-scope .afam-wbtn--light .elementor-button:hover { background: #fff; color: var(--afam-green-900); }
.afam-home-section--green .afam-wbtn--light .elementor-button:focus-visible { box-shadow: 0 0 0 2px var(--afam-green-900), 0 0 0 5px #fff; }
.afam-home-section--green .afam-btn--primary:focus-visible { box-shadow: 0 0 0 2px var(--afam-green-900), 0 0 0 5px #fff; }

/* President message (existing html widget) keeps working inside the new section */
.afam-home-section .afam-welcome-section { max-width: var(--afam-content-width); margin: 0 auto; }

/* Hero typography and height fixes */
.afam-hero .afam-hero__title { font-size: clamp(1.75rem, 1.1rem + 2vw, 2.875rem); max-width: 20ch; }
.afam-hero__pic img { height: clamp(380px, 36vw, 520px); }
.afam-hero__inner { padding-top: var(--afam-sp-5); padding-bottom: var(--afam-sp-5); }
@media (max-width: 767px) { .afam-hero__pic img { height: 480px; } .afam-hero .afam-hero__title { font-size: 1.75rem; } }

/* Grids inside Elementor containers: gap and equal cards */
.e-con.afam-grid-3, .e-con.afam-grid-4, .e-con.afam-stats { gap: var(--afam-sp-5); }
.afam-card.e-con { height: 100%; box-sizing: border-box; align-content: start; }

/* President message card: the legacy block expects a dark page, so give it readable colours here */
.afam-home-section .afam-welcome-card { background: #fff !important; box-shadow: 0 8px 24px rgba(8, 76, 44, 0.12); } /* !important: the legacy card sets its own gradient */
.afam-home-section .afam-welcome-content p,
.afam-home-section .afam-welcome-content p strong { color: var(--afam-ink-900) !important; }
.afam-home-section .afam-president-info h3 { color: var(--afam-green-900) !important; }
.afam-home-section .afam-president-info p { color: var(--afam-ink-700) !important; }

/* Responsive grids: selectors must match the .e-con rule above (same specificity, later in the file) */
@media (max-width: 1024px) { .e-con.afam-grid-3, .e-con.afam-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .e-con.afam-grid-3, .e-con.afam-grid-4 { grid-template-columns: minmax(0, 1fr); } .e-con.afam-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* President message: show the whole letter instead of a 325 px scroll box (axe: scrollable region not focusable) */
.afam-home-section .afam-welcome-content { max-height: none !important; overflow: visible !important; } /* !important: legacy inline-limited block */
.afam-home-section .afam-welcome-content p { max-width: 75ch; }

/* Hero slider (DES-021) */
.afam-hero__slides { position: relative; }
.afam-slide { display: none; position: relative; }
.afam-slide.is-active { display: block; animation: afam-fade 600ms ease both; }
@keyframes afam-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .afam-slide.is-active { animation: none; } }
.afam-hero__inner { padding-bottom: 72px; }
.afam-hero .afam-hero__dates { margin: 0 0 var(--afam-sp-3); font-family: var(--afam-font-head); font-weight: 700; font-size: 1.375rem; color: var(--afam-gold-300); }
.afam-hero__controls { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
.afam-hero__controls > * { pointer-events: auto; }
.afam-hero__btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%; background: rgba(8, 76, 44, 0.75); color: #fff; cursor: pointer; padding: 0; }
.afam-hero__btn:hover { background: var(--afam-green-900); }
.afam-hero__btn:focus-visible,
.afam-hero__dot:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--afam-green-900); }
.afam-hero__play .i-play { display: none; }
.afam-hero.is-paused .afam-hero__play .i-play { display: block; }
.afam-hero.is-paused .afam-hero__play .i-pause { display: none; }
.afam-hero__dots { display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.afam-hero__dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.afam-hero__dot::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid #fff; background: rgba(8, 76, 44, 0.6); }
.afam-hero__dot.is-active::before { background: var(--afam-gold-500); border-color: var(--afam-gold-500); }
@media (max-width: 767px) { .afam-hero__inner { padding-bottom: 76px; } .afam-hero__btn { width: 44px; height: 44px; } }

/* ===== U-011 revision 1 home sections ===== */
/* DES-023: News (2/3) and Member Spotlight (1/3) in one row; stacked on mobile */
.e-con.afam-split { display: grid !important; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--afam-sp-6, 32px); align-items: start; } /* !important: Elementor container display */
@media (max-width: 900px) { .e-con.afam-split { grid-template-columns: minmax(0, 1fr); } }
.afam-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afam-cards--1 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) { .afam-cards--2 { grid-template-columns: minmax(0, 1fr); } }
/* titles are not underlined except on hover or focus */
.afam-scope .afam-post-card h3 a { text-decoration: none; }
.afam-scope .afam-post-card h3 a:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
.afam-split .afam-post-card__img img { height: 170px; }

/* centred sections (AJOM, Join CTA, final CTA) */
.afam-scope.afam-center .afam-inner { align-items: center; text-align: center; max-width: 820px; margin-left: auto; margin-right: auto; }
.afam-scope.afam-center .e-con.afam-inner { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; align-items: center; }
.afam-scope.afam-final .e-con.afam-inner { max-width: none; }
.afam-scope.afam-center .e-con.afam-actions, .afam-actions--center { justify-content: center; width: 100%; }
.afam-scope.afam-center .elementor-widget-text-editor p, .afam-scope.afam-center .elementor-widget-text-editor { text-align: center; }
.afam-scope.afam-center .elementor-widget { width: 100%; }
.afam-scope.afam-final .elementor-widget { width: auto; }
.afam-scope.afam-center .elementor-widget-text-editor, .afam-scope.afam-center .elementor-widget-heading { text-align: center; }
.afam-eyebrow, .afam-eyebrow p { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8a4b08; }
.afam-scope.afam-home-section--green .afam-eyebrow, .afam-scope.afam-home-section--green .afam-eyebrow p { color: var(--afam-gold-300); }
.afam-lead p { font-size: 1.125rem; line-height: 1.65; }
.afam-scope.afam-join { background: var(--afam-green-900); border-top: 6px solid var(--afam-gold-500); } /* solid colour: axe cannot measure gradients */
.afam-scope.afam-final .afam-inner { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; max-width: none; gap: 20px 32px; }
.afam-scope.afam-final h2 { font-size: 1.375rem; margin: 0; }

/* DES-025: five counters */
.e-con.afam-stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1024px) { .e-con.afam-stats--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .e-con.afam-stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.afam-stat__num { font-variant-numeric: tabular-nums; }

/* DES-027: minimal President block and dialog */
.afam-pres { display: flex; align-items: center; gap: var(--afam-sp-5, 24px); max-width: 760px; margin: 0 auto; }
.afam-pres__photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 4px solid #fff; box-shadow: 0 6px 20px rgba(8, 76, 44, 0.18); }
.afam-pres__name { margin: 0; color: var(--afam-green-900); font-size: 1.25rem; }
.afam-pres__role { margin: 2px 0 8px; color: var(--afam-ink-700); font-size: 0.9375rem; }
.afam-pres__teaser { margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .afam-pres { flex-direction: column; text-align: center; } }
.afam-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 24px 64px rgba(8, 76, 44, 0.35); color: var(--afam-ink-900); background: #fff; }
.afam-dialog::backdrop { background: rgba(8, 40, 24, 0.6); }
.afam-dialog__head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--afam-green-900); color: #fff; }
.afam-dialog__head h2 { margin: 0; color: #fff; font-size: 1.125rem; }
.afam-dialog__close { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.afam-dialog__close:is(:hover, :focus-visible) { background: rgba(255, 255, 255, 0.18); outline: 2px solid #fff; }
.afam-dialog__body { padding: 20px 24px 28px; overflow-y: auto; max-height: calc(100vh - 140px); }
.afam-dialog__body p { margin: 0 0 1em; }
@media (prefers-reduced-motion: no-preference) { .afam-dialog[open] { animation: afam-dlg 180ms ease-out; } @keyframes afam-dlg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } } }

/* ===== U-011 revision 2 (U-012) ===== */
/* DES-033: hero slides stack in one grid cell (no height jump), split layout shows the whole artwork */
:root { --afam-hero-h: clamp(440px, 32vw, 500px); }
@media (max-width: 767px) { :root { --afam-hero-h: 520px; } }
.afam-hero__slides { display: grid; }
.afam-slide, .afam-slide.is-active { display: block; grid-area: 1 / 1; position: relative; animation: none; opacity: 0; visibility: hidden; transition: opacity 500ms ease, visibility 0s linear 500ms; }
.afam-slide.is-active { opacity: 1; visibility: visible; transition: opacity 500ms ease; }
@media (prefers-reduced-motion: reduce) { .afam-slide, .afam-slide.is-active { transition: none; } }
.afam-slide:not(.afam-slide--split) { min-height: var(--afam-hero-h); }
.afam-slide:not(.afam-slide--split) .afam-hero__pic { position: absolute; inset: 0; }
.afam-slide:not(.afam-slide--split) .afam-hero__pic img { height: 100%; }
.afam-slide--split { background: var(--afam-green-900); }
.afam-slide--split .afam-hero__pic { display: block; position: relative; }
.afam-slide--split .afam-hero__pic img { width: 100%; height: clamp(200px, 40vw, 360px); max-width: none; object-fit: contain; object-position: center; }
.afam-slide--split .afam-hero__inner { position: relative; inset: auto; max-width: 760px; padding: 8px 24px 88px; }
.afam-slide--split .afam-hero__title { font-size: clamp(1.75rem, 1rem + 1.8vw, 2.5rem); max-width: 16ch; }
@media (min-width: 1366px) {
	.afam-slide--split { min-height: var(--afam-hero-h); }
	.afam-slide--split .afam-hero__pic { width: auto; left: auto; position: absolute; top: 0; bottom: 0; right: 0; }
	.afam-slide--split .afam-hero__pic img { width: auto; height: 100%; }
	.afam-slide--split .afam-hero__inner { position: absolute; inset: 0; max-width: var(--afam-hdr-box, 1400px); margin: 0 auto; padding: 24px max(24px, calc(var(--afam-hero-h) * 1.875 + 24px - (100vw - var(--afam-hdr-box, 1400px)) / 2)) 72px 32px; }
}

/* DES-034 / DES-035: News (2 at a time) and Spotlight (1 at a time) carousels */
.afam-carousel { position: relative; min-width: 0; }
.afam-carousel__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.afam-carousel__viewport::-webkit-scrollbar { display: none; }
.afam-carousel__viewport:focus-visible { outline: 3px solid var(--afam-green-600); outline-offset: 4px; }
.afam-carousel__track { display: flex; gap: 20px; }
.afam-carousel__track > .afam-card { flex: 0 0 calc((100% - 20px * (var(--per, 1) - 1)) / var(--per, 1)); scroll-snap-align: start; min-width: 0; }
@media (max-width: 700px) { .afam-carousel__track > .afam-card { flex-basis: 100%; } }
.afam-carousel__nav { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 16px; }
.afam-carousel.is-single .afam-carousel__nav { display: none; }
.afam-carousel__btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--afam-green-600); border-radius: 50%; background: #fff; color: var(--afam-green-600); cursor: pointer; position: relative; }
.afam-carousel__btn::after { content: ""; position: absolute; inset: -4px; }
.afam-carousel__btn:hover:not(:disabled) { background: var(--afam-green-600); color: #fff; }
.afam-carousel__btn:disabled { opacity: 0.4; cursor: default; }
.afam-carousel__btn:focus-visible, .afam-carousel__dot:focus-visible { outline: 3px solid var(--afam-green-600); outline-offset: 2px; }
.afam-carousel__dots { display: inline-flex; align-items: center; gap: 2px; }
.afam-carousel__dot { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.afam-carousel__dot::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #c5d3bc; }
.afam-carousel__dot.is-active::before { background: var(--afam-green-600); inset: 7px; }
.afam-split__main, .afam-split__side { min-width: 0; }
.afam-split .afam-post-card__img img { height: 190px; }
.afam-split .afam-post-card h3 { font-size: 1.0625rem; }

/* DES-036: President and testimonials in one section */
.e-con.afam-duo { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: stretch; } /* !important: Elementor container display */
@media (max-width: 900px) { .e-con.afam-duo { grid-template-columns: minmax(0, 1fr); } }
.afam-duo__col { display: flex; flex-direction: column; min-width: 0; gap: 16px; }
.afam-duo__col > .elementor-widget:last-child { flex: 1 1 auto; }
.afam-duo__col > .elementor-widget:last-child > .elementor-widget-container { height: 100%; }
.afam-scope .afam-duo__col .afam-h .elementor-heading-title { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8a4b08; font-family: var(--afam-font-body); margin: 0; }
.afam-duo__quote .afam-showcase { height: 100%; }
.afam-duo__quote .afam-t-slider { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 40px 40px 28px; border-radius: 18px; background: var(--afam-green-900); color: #fff; position: relative; overflow: hidden; }
.afam-duo__quote .afam-t-slider::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(203, 174, 45, 0.12); pointer-events: none; }
.afam-duo__quote .afam-t-slider__track { flex: 1 1 auto; align-content: start; }
.afam-pres { display: flex; align-items: flex-start; gap: 28px; max-width: none; margin: 0; height: 100%; box-sizing: border-box; padding: 36px; border-radius: 18px; background: #fff; border: 1px solid #dfe8d8; box-shadow: 0 12px 32px rgba(8, 76, 44, 0.08); }
.afam-pres__photo { width: 160px; height: 200px; border-radius: 16px; object-fit: cover; object-position: center 20%; flex: 0 0 auto; border: 0; box-shadow: 0 10px 24px rgba(8, 76, 44, 0.2); }
.afam-pres__text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.afam-pres__name { margin: 0; font-size: 1.5rem; color: var(--afam-green-900); }
.afam-pres__role { margin: 4px 0 14px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--afam-ink-700); }
.afam-pres__teaser { margin: 0 0 20px; font-family: var(--afam-font-head); font-size: 1.0625rem; line-height: 1.6; color: var(--afam-ink-900); display: block; -webkit-line-clamp: unset; overflow: visible; }
@media (max-width: 600px) { .afam-pres { flex-direction: column; align-items: center; text-align: center; padding: 28px 22px; } .afam-pres__text { align-items: center; } .afam-pres__photo { width: 140px; height: 175px; } .afam-duo__quote .afam-t-slider { padding: 32px 24px 24px; } }

/* DES-038: counters with a refined accent bar and equal heights */
.e-con.afam-stats--5 { align-items: stretch; }
.afam-stats .elementor-widget, .afam-stats .elementor-widget-container { height: 100%; }
.afam-scope .afam-card.afam-stat { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 22px 22px 20px; border: 0; border-left: 4px solid var(--afam-gold-500); border-radius: 4px 14px 14px 4px; background: linear-gradient(180deg, #fff 0%, var(--afam-surface) 100%); box-shadow: 0 6px 20px rgba(8, 76, 44, 0.07); text-align: left; }
.afam-scope .afam-card.afam-stat > a { display: flex; flex-direction: column; gap: 4px; height: 100%; text-decoration: none; }
.afam-scope .afam-stat .afam-stat__icon { color: var(--afam-green-600); margin-bottom: 6px; }
.afam-scope .afam-stat .afam-stat__num { display: block; font-family: var(--afam-font-head); font-size: clamp(2rem, 1.4rem + 1.4vw, 2.75rem); font-weight: 700; line-height: 1.05; color: var(--afam-green-600); }
.afam-scope .afam-stat .afam-stat__label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.4; text-transform: uppercase; color: var(--afam-ink-700); min-height: 2.8em; }

/* DES-039: AJOM and Join blocks, whole block centred, decorated, buttons never underlined */
.afam-cta { position: relative; overflow: hidden; text-align: center; }
.afam-cta__bg { position: absolute; inset: 0; pointer-events: none; }
.afam-cta--light { background: var(--afam-surface); color: var(--afam-ink-900); }
.afam-cta--light .afam-cta__bg { background-image: radial-gradient(circle at 1px 1px, rgba(51, 102, 0, 0.16) 1.2px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%); mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%); }
.afam-cta--dark { background: var(--afam-green-900); color: #fff; border-top: 6px solid var(--afam-gold-500); }
.afam-cta--dark .afam-cta__bg { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 26px); -webkit-mask-image: radial-gradient(ellipse at center, transparent 25%, #000 90%); mask-image: radial-gradient(ellipse at center, transparent 25%, #000 90%); }
.afam-cta__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 760px; margin: 0 auto; padding: 72px 24px; }
.afam-cta__art { color: var(--afam-green-600); margin-bottom: 14px; }
.afam-cta--dark .afam-cta__art { color: var(--afam-gold-300); }
.afam-cta .afam-cta__eyebrow { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8a4b08; }
.afam-cta--dark .afam-cta__eyebrow { color: var(--afam-gold-300); }
.afam-cta .afam-cta__title { margin: 0; font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.2; color: var(--afam-green-900); }
.afam-cta--dark .afam-cta__title { color: #fff; }
.afam-cta__rule { display: block; width: 72px; height: 2px; margin: 22px auto; background: var(--afam-gold-500); position: relative; }
.afam-cta__rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; background: var(--afam-gold-500); transform: translate(-50%, -50%) rotate(45deg); outline: 6px solid var(--afam-surface); }
.afam-cta--dark .afam-cta__rule::after { outline-color: var(--afam-green-900); }
.afam-cta .afam-cta__text { margin: 0 auto 28px; max-width: 65ch; font-size: 1.0625rem; line-height: 1.7; color: inherit; }
.afam-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.afam-cta .afam-btn, .afam-hero .afam-btn, .afam-pres .afam-btn { text-decoration: none; }
.afam-cta .afam-btn:hover, .afam-cta .afam-btn:focus { text-decoration: none; }
.afam-btn--outline { background: transparent; border: 2px solid var(--afam-green-600); color: var(--afam-green-600); }
.afam-btn--outline:hover { background: var(--afam-green-600); color: #fff; }
@media (max-width: 520px) { .afam-cta__inner { padding: 56px 20px; } .afam-cta__actions .afam-btn { flex: 1 1 100%; } }
.afam-home-section.afam-flush { padding: 0 !important; } /* !important: Elementor container padding set in the data */
/* Buttons are never underlined */
.afam-scope a.afam-btn, .afam-scope a.afam-btn:hover, .afam-scope a.afam-btn:focus, .afam-scope .afam-wbtn .elementor-button, .afam-scope .afam-wbtn .elementor-button:hover, .afam-scope .afam-wbtn .elementor-button:focus, .afam-hdr a.elementor-button { text-decoration: none; }

/* ---- self-review fixes (round 1) ---- */
/* hero: the picture fades into the green panel (no seam); controls move under the text on wide screens */
.afam-slide--split .afam-hero__pic img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3.4%); mask-image: linear-gradient(90deg, transparent 0, #000 3.4%); }
@media (min-width: 1366px) {
	.afam-hero__controls { left: max(32px, calc((100% - var(--afam-hdr-box, 1400px)) / 2 + 32px)); right: auto; justify-content: flex-start; }
}
/* nested Elementor containers: no extra default padding, so every section aligns on the same edge */
.afam-home-section .afam-inner, .afam-home-section .afam-split, .afam-home-section .afam-split__main, .afam-home-section .afam-split__side, .afam-home-section .afam-stats, .afam-home-section .afam-duo, .afam-home-section .afam-duo__col, .afam-home-section .afam-actions { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; }
/* news and spotlight pictures: posters keep their top (title) */
.afam-split .afam-post-card__img img { object-position: center top; height: 200px; }
/* President card: content centred in the card */
.afam-pres { align-items: center; }
.afam-pres__photo { width: 168px; height: 210px; }
/* final thin CTA on one line */
.afam-scope.afam-final .e-con.afam-inner { --flex-direction: row; --flex-wrap: wrap; --justify-content: center; --align-items: center; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 32px; max-width: none; }
.afam-scope.afam-final .elementor-widget { width: auto; margin: 0; }

.afam-pres__photo { width: 184px; height: 230px; }
.afam-pres { padding: 40px; }

/* ---- self-review fixes (round 2) ---- */
.afam-slide--split .afam-hero__pic img { height: clamp(220px, 40vw, 340px); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3.4%, #000 95%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 3.4%, #000 95%, transparent 100%); }
@media (min-width: 1366px) {
	.afam-slide--split .afam-hero__pic img { height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3.4%); mask-image: linear-gradient(90deg, transparent 0, #000 3.4%); }
}
/* page content shares the header box: 1400 px, centred */
.afam-home-section > .e-con.afam-inner, .afam-home-section > .e-con-inner > .e-con.afam-inner { width: 100%; max-width: var(--afam-hdr-box, 1400px); margin-left: auto; margin-right: auto; }
/* posters keep their whole picture */
.afam-split .afam-post-card__img { display: block; background: #eef3ea; }
.afam-split .afam-post-card__img img { height: 300px; object-fit: contain; object-position: center; }

/* ---- self-review fixes (round 3) ---- */
@media (max-width: 1024px) {
	.e-con.afam-stats--5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.e-con.afam-stats--5 > *:nth-child(-n+3) { grid-column: span 2; }
	.e-con.afam-stats--5 > *:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 767px) {
	.e-con.afam-stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.e-con.afam-stats--5 > * { grid-column: auto; }
	.e-con.afam-stats--5 > *:last-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .afam-cta__actions .afam-btn { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; text-align: center; } }
.afam-pres__teaser { font-style: italic; font-weight: 400; } /* the self-hosted regular serif is the italic (fonts budget, ADR D-02) */

/* ---- self-review fixes (round 4) ---- */
@media (max-width: 767px) {
	.e-con.afam-stats--5 > *:nth-child(n) { grid-column: auto; }
	.e-con.afam-stats--5 > *:nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 359px) { .afam-cta__actions .afam-btn { flex: 1 1 100%; } }

/* ---- self-review fixes (round 5) ---- */
/* slide change: the outgoing slide fades first, the incoming one follows, so two texts never overlap */
.afam-slide, .afam-slide.is-active { transition: opacity 220ms ease, visibility 0s linear 220ms; }
.afam-slide.is-active { transition: opacity 320ms ease 200ms; }
.afam-home-section .afam-grid-3, .afam-home-section .afam-grid-4 { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; }
@media (prefers-reduced-motion: reduce) { .afam-slide, .afam-slide.is-active { transition: none; } }

/* DES-046 (U-014): President portrait in an arched frame with a gold ring, an offset green shape and a soft shadow */
.afam-pres__frame { position: relative; display: block; flex: 0 0 auto; width: 184px; aspect-ratio: 4 / 5; margin: 0 12px 12px 0; isolation: isolate; }
.afam-pres__frame::before { content: ""; position: absolute; z-index: -1; inset: 14px -12px -12px 14px; border-radius: 92px 92px 18px 18px; background: var(--afam-green-900); }
.afam-pres__frame::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 92px 92px 18px 18px; box-shadow: inset 0 0 0 3px var(--afam-gold-500, #cbae2d); pointer-events: none; }
.afam-pres__frame picture { display: block; width: 100%; height: 100%; }
.afam-pres .afam-pres__frame .afam-pres__photo { display: block; width: 100%; height: 100%; border-radius: 92px 92px 18px 18px; object-fit: cover; object-position: 50% 22%; box-shadow: 0 14px 30px rgba(8, 76, 44, 0.28); }
@media (max-width: 600px) { .afam-pres__frame { width: 160px; margin: 0 12px 12px 0; } .afam-pres__frame::before { border-radius: 80px 80px 16px 16px; } .afam-pres .afam-pres__frame .afam-pres__photo, .afam-pres__frame::after { border-radius: 80px 80px 16px 16px; } }

/* ---- quick fix U-027h: News and Member Spotlight columns end at the same height ---- */
/* both picture areas are the same height */
.afam-split .afam-post-card__img img, .afam-split .afam-spc__img { display: block; width: 100%; height: 240px; aspect-ratio: auto; object-fit: contain; object-position: center top; background: #eef3ea; }
.afam-split .afam-spc__img.afam-sp__ini { display: flex; }
@media (max-width: 900px) { .afam-split .afam-post-card__img img, .afam-split .afam-spc__img { height: 220px; } }
/* the shortcode's own "All member spotlights" button duplicates the section button (and rendered empty): hidden inside the split */
.afam-split .afam-spc-all { display: none; }
/* two columns: equal-height cards, "View All" buttons on one line at the bottom */
@media (min-width: 901px) {
	.e-con.afam-split { align-items: stretch; }
	.afam-split .afam-split__main, .afam-split .afam-split__side { display: flex; flex-direction: column; min-height: 0; }
	.afam-split .elementor-widget-shortcode { flex: 1 1 auto; display: flex; flex-direction: column; }
	.afam-split .elementor-widget-shortcode > .elementor-widget-container, .afam-split .elementor-widget-shortcode .elementor-shortcode { flex: 1 1 auto; display: flex; flex-direction: column; }
	.afam-split .afam-carousel { flex: 1 1 auto; display: flex; flex-direction: column; }
	.afam-split .afam-carousel__viewport { flex: 1 1 auto; }
	.afam-split .afam-carousel__track { height: 100%; }
	.afam-split .afam-carousel__track > .afam-card { display: flex; flex-direction: column; }
	.afam-split .afam-spc-wrap { flex: 1 1 auto; display: flex; flex-direction: column; padding-bottom: 52px; } /* 52px = the news dots row, so card bottoms line up */
	.afam-split .afam-spc-grid { flex: 1 1 auto; }
	.afam-split .afam-spc-grid > li { display: flex; }
	.afam-split .afam-spc-grid > li > article { flex: 1 1 auto; }
	.afam-split .afam-split__main > .afam-actions, .afam-split .afam-split__side > .afam-actions { margin-top: auto; }
}
/* stacked: the spotlight widget keeps its own height (it was stretched far below the card) */
@media (max-width: 900px) { .afam-split .elementor-widget-shortcode { flex: 0 0 auto; height: auto; min-height: 0; } .afam-split .afam-spc-wrap, .afam-split .elementor-shortcode { height: auto; } }
@media (max-width: 900px) { .e-con.afam-split { display: flex !important; flex-direction: column; gap: 40px; } .afam-split .afam-split__main, .afam-split .afam-split__side { flex: 0 0 auto; height: auto; } } /* !important: Elementor container display */
@media (max-width: 900px) { .afam-split .afam-split__main, .afam-split .afam-split__side { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 20px; } } /* stacked: plain grid, so the widget is not stretched */

/* ---- quick fix U-027h round 2: same picture height, tags on one line ---- */
.e-con.afam-split .afam-carousel .afam-post-card__img img, .e-con.afam-split .afam-spc-wrap .afam-spc__img { height: 220px; aspect-ratio: auto; }
.e-con.afam-split .afam-spc__tags { flex-wrap: nowrap; overflow: hidden; gap: 6px; }
.e-con.afam-split .afam-spc__tags li { flex: 0 1 auto; white-space: nowrap; font-size: 0.75rem; padding: 2px 8px; }
.e-con.afam-split .afam-spc__tags li:nth-child(n+3) { display: none; }
