/*
 * Susunan Kepengurusan (About > Board) — one cohesive portrait-card system.
 * The featured Ketua and the core team share a single horizontally aligned
 * grid ("Pengurus Inti"), using the exact same card language as the division
 * grids below: edge-to-edge image, dark bottom scrim, green role label above
 * a white name, subtle hover lift. The Ketua is only mildly more prominent
 * (a slightly larger card on desktop) — not a standalone hero. All selectors
 * are scoped to this page's markup (.pf-pcard*, .pf-team-grid, .pf-sec-head,
 * .pf-division, .pf-contribute-card*) so nothing else in the theme changes.
 */

/* --- Section headings with trailing rule -------------------------------- */
.pf-sec-head {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin-bottom: 22px;
}

.pf-sec-head__title {
	font-family: var(--pf-font-display);
	font-weight: 700;
	font-size: clamp(1.35rem, 2.6vw, 1.85rem);
	letter-spacing: -.025em;
	color: var(--pf-ink);
}

.pf-sec-head__title--sm {
	font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

.pf-sec-head__rule {
	flex: 1;
	height: 1.5px;
	background: linear-gradient(90deg, rgba(0, 155, 77, .28), rgba(0, 155, 77, 0));
}

.pf-sec-head__count {
	flex: none;
	font-size: 12.5px;
	font-weight: 600;
	color: #9A9A9A;
}

/* --- Portrait card ------------------------------------------------------- */
.pf-pcard {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	aspect-ratio: 4 / 5;
	background: #E8F3EA;
	box-shadow: 0 1px 2px rgba(6, 53, 30, .06), 0 30px 60px -42px rgba(6, 53, 30, .55);
	transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s;
}

/* Deep-green tile behind the portrait: the graceful fallback shown when a
   member has no Featured Image yet. Kept dark so the white/green overlay text
   below has reliable contrast on photo-less cards (an image, when present,
   covers it entirely). */
.pf-pcard__tile {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(158deg, #0C4A2B, #06351E);
}

.pf-pcard__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: center;
	transition: transform .65s cubic-bezier(.16, 1, .3, 1);
}

/* Bottom scrim carrying role + name. The extra mid-stops keep the scrim
   opaque up through the role label (which sits above the name), so both stay
   readable over arbitrary photos — including bright ones — not just at the
   very bottom edge. */
.pf-pcard__overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 16px 15px;
	background: linear-gradient(to top, rgba(5, 26, 15, .94), rgba(5, 26, 15, .78) 42%, rgba(5, 26, 15, .34) 74%, rgba(5, 26, 15, 0));
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.pf-pcard__role {
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.pf-pcard__role--head {
	color: #8FE870;
}

.pf-pcard__role--muted {
	color: rgba(255, 255, 255, .72);
}

.pf-pcard__name {
	margin-top: 4px;
	font-family: var(--pf-font-display);
	font-weight: 700;
	font-size: 1.06rem;
	line-height: 1.16;
	letter-spacing: -.01em;
	color: #fff;
	overflow-wrap: anywhere;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
}

/* --- Pengurus Inti: featured Ketua + core team as one aligned row --------
   Flex row (not the auto grid the divisions use) purely so the Ketua card can
   be a touch wider on desktop while every card's top still sits on one line
   (align-items:flex-start — the slightly taller Ketua just extends a little
   lower). Card width is fixed so a lone Ketua stays compact instead of
   stretching to fill the row. */
.pf-team-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: flex-start;
}

.pf-team-grid .pf-pcard {
	flex: 0 0 auto;
	width: 232px;
}

/* Ketua: mildly more prominent — ~14% wider than a regular card (desktop
   only; equalised on tablet/mobile below). Same aspect ratio, same overlay,
   same green role label. */
.pf-team-grid .pf-pcard--lead {
	width: 264px;
	border-radius: 26px;
}

/* --- Grids --------------------------------------------------------------- */
.pf-pcard-grid {
	display: grid;
	gap: 16px;
}

.pf-pcard-grid--division {
	grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.pf-division {
	margin-bottom: 48px;
}

.pf-division:last-of-type {
	margin-bottom: 16px;
}

/* --- Hover (pointer devices only) --------------------------------------- */
@media (hover: hover) {
	.pf-pcard:hover {
		transform: translateY(-8px);
		box-shadow: 0 2px 4px rgba(6, 53, 30, .08), 0 50px 90px -40px rgba(6, 53, 30, .62);
	}

	.pf-pcard:hover .pf-pcard__img {
		transform: scale(1.06);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pf-pcard,
	.pf-pcard__img {
		transition: none;
	}

	.pf-pcard:hover {
		transform: none;
	}

	.pf-pcard:hover .pf-pcard__img {
		transform: none;
	}
}

/* --- Contribute CTA (wide gradient panel) ------------------------------- */
.pf-contribute-card {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	padding: 28px;
	box-shadow: 0 24px 50px -30px rgba(0, 155, 77, .6);
}

.pf-contribute-card--wide {
	margin-top: 8px;
	border-radius: 30px;
	padding: clamp(36px, 5vw, 64px);
	background-image: linear-gradient(135deg, #06351E, #0B6B39 65%, #00A651);
	box-shadow: 0 40px 90px -50px rgba(0, 155, 77, .7);
}

.pf-contribute-card__glow {
	position: absolute;
	top: -90px;
	right: -40px;
	width: 340px;
	height: 340px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(126, 217, 87, .4), rgba(126, 217, 87, 0) 70%);
	filter: blur(30px);
	pointer-events: none;
}

.pf-contribute-card__body {
	position: relative;
	max-width: 640px;
}

.pf-contribute-card__title {
	font-family: var(--pf-font-display);
	font-weight: 800;
	font-size: clamp(1.6rem, 3.2vw, 2.4rem);
	line-height: 1.06;
	letter-spacing: -.025em;
	color: #fff;
}

.pf-contribute-card__text {
	margin-top: 14px;
	font-size: clamp(1rem, 1.3vw, 1.15rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, .82);
}

.pf-contribute-card__link {
	margin-top: 26px;
	align-self: flex-start;
}

/* --- Empty state --------------------------------------------------------- */
.pf-pengurus-empty {
	border-radius: var(--pf-radius-lg);
	border: 1px dashed rgba(0, 122, 61, .35);
	background: linear-gradient(135deg, rgba(0, 122, 61, .06), rgba(0, 166, 81, .1));
	padding: 40px 30px;
	text-align: center;
	color: var(--pf-muted);
	font-weight: 600;
}

/* --- Hero title (scoped to this page) ------------------------------------
   Mirrors the size the hero used before (kept as a page-scoped rule instead
   of an inline style so it can be shrunk on very narrow screens). Desktop and
   tablet are unchanged; at <=430px the title scales down and is allowed to
   break so long words like "Kepengurusan" can't overflow the viewport. */
.pf-pengurus-title {
	font-size: clamp(2.4rem, 5.4vw, 4.4rem);
}

/* --- Responsive ---------------------------------------------------------- */
/* Tablet: Pengurus Inti collapses to 2 equal-width cards per row (Ketua no
   longer larger, so the 2-up rows stay clean). Phones use the shared
   single-column rule below. */
@media (max-width: 900px) {
	.pf-team-grid {
		gap: 16px;
	}

	.pf-team-grid .pf-pcard,
	.pf-team-grid .pf-pcard--lead {
		width: calc((100% - 16px) / 2);
	}
}

@media (max-width: 640px) {
	/* Pengurus Inti and division members intentionally share one mobile
	   container layout. The cards themselves already use the same .pf-pcard
	   component, so this keeps every visual dimension and treatment equal. */
	.pf-team-grid,
	.pf-pcard-grid--division {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.pf-team-grid .pf-pcard,
	.pf-team-grid .pf-pcard--lead {
		width: auto;
	}

	.pf-team-grid .pf-pcard--lead {
		border-radius: 24px;
	}
}

@media (max-width: 430px) {
	.pf-pengurus-title {
		font-size: clamp(1.9rem, 8.5vw, 2.4rem);
		overflow-wrap: anywhere;
		hyphens: auto;
	}

	.pf-pcard__name {
		font-size: .98rem;
	}
}
