/*
 * I Already Won Fitness: Coaches listing Page (/coaches/)  v1.0.0
 * Prompt 11 (CPT-LISTING-ARCHIVE v6.3). Template: page-coaches.php
 * Loaded only on the Page with the slug "coaches" by inc/base-template-assets.php.
 *
 * Tokens: IAWF-DSM-20261019 (--awb-color1..10, --awb-typography1/3).
 * Components (not restyled here): iawf-btn, iawf-link-arrow,
 * --iawf-icon-arrow, --iawf-ease-out (IAWF-RCM-20261019).
 *
 * Breakpoints from the design: 960px (hero becomes two columns that fill
 * the screen height), 1100px (four ways-to-train cards in a row) and 640px
 * (DSM small screen; phone below 640px).
 */

/* --------------------------------------------------------------------------
   Page chrome: full-width bands on this Page only
   (doubled ID outranks every Avada #main rule, including 100% Width padding)
   -------------------------------------------------------------------------- */

html body:has(.iawf-coaches) #main#main {
	padding-left: 0;
	padding-right: 0;
}

html body:has(.iawf-coaches) #main#main > .fusion-row {
	max-width: none;
	min-width: 0;
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

/* --------------------------------------------------------------------------
   Root and resets inside the template
   -------------------------------------------------------------------------- */

.iawf-coaches {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	--iawf-cl-vh: 100vh;
	--iawf-cl-pt: 128px;
	--iawf-cl-pb: 56px;
	background: var(--awb-color1);
	color: var(--awb-color8);
}

@supports (height: 100svh) {
	.iawf-coaches {
		--iawf-cl-vh: 100svh;
	}
}

.iawf-coaches p,
.iawf-coaches ul,
.iawf-coaches li,
.iawf-coaches h1,
.iawf-coaches h2,
.iawf-coaches h3 {
	margin: 0;
	padding: 0;
}

.iawf-coaches ul {
	list-style: none;
}

/* A long word must wrap inside its column instead of setting its width */
.iawf-coaches .iawf-coaches__eyebrow,
.iawf-coaches .iawf-coaches__heading,
.iawf-coaches .iawf-coaches__role,
.iawf-coaches .iawf-coaches__name,
.iawf-coaches .iawf-coaches__ways-heading,
.iawf-coaches .iawf-coaches__card-title {
	overflow-wrap: anywhere;
}

.iawf-coaches__hero-inner > * {
	min-width: 0;
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   1. Hero + coach tiles
   -------------------------------------------------------------------------- */

.iawf-coaches__hero-inner {
	max-width: 1680px;
	margin: 0 auto;
	padding: var(--iawf-cl-pt) clamp(20px, 4vw, 64px) var(--iawf-cl-pb);
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(32px, 4vw, 72px);
	align-items: end;
}

.iawf-coaches__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(16px, 2.4vh, 24px);
	gap: clamp(16px, 2.4svh, 24px);
	min-width: 0;
}

html body .iawf-coaches h1.iawf-coaches__eyebrow {
	font-family: var(--awb-typography3-font-family);
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--awb-color5);
}

.iawf-coaches .iawf-coaches__heading {
	max-width: 100%;
	font-family: var(--awb-typography1-font-family);
	font-size: clamp(40px, min(6.8vw, 11vh), 104px);
	font-size: clamp(40px, min(6.8vw, 11svh), 104px);
	font-weight: 800;
	line-height: .9;
	letter-spacing: -.02em;
	text-transform: uppercase;
	text-wrap: balance;
	overflow-wrap: break-word;
	color: var(--awb-color8);
}

/* Design: the hero button label never wraps */
.iawf-coaches__intro .fusion-button.iawf-btn {
	white-space: nowrap;
}

.iawf-coaches .iawf-coaches__lead {
	max-width: 480px;
	font-size: clamp(15px, 1.15vw, 17px);
	line-height: 1.6;
	color: var(--awb-color7);
	text-wrap: pretty;
}

/* Coach tiles: two per row at every width */
.iawf-coaches__tiles {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.iawf-coaches__tile {
	min-width: 0;
	min-height: 0;
}

.iawf-coaches a.iawf-coaches__tile-link,
.iawf-coaches a.iawf-coaches__tile-link:hover,
.iawf-coaches a.iawf-coaches__tile-link:focus {
	color: var(--awb-color8);
	text-decoration: none;
}

.iawf-coaches a.iawf-coaches__tile-link {
	position: relative;
	display: block;
	height: 100%;
	aspect-ratio: 4 / 5;
	border-radius: 20px;
	overflow: hidden;
	background: var(--awb-color2);
	border: 1px solid var(--awb-color9);
	isolation: isolate;
}

.iawf-coaches a.iawf-coaches__tile-link:focus-visible {
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

.iawf-coaches .iawf-coaches__tile-img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center 30%;
}

/* No-photo placeholder */
.iawf-coaches__nophoto {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-bottom: 56px;
}

.iawf-coaches .iawf-coaches__nophoto-img {
	display: block;
	width: clamp(56px, 6vw, 88px);
	height: clamp(56px, 6vw, 88px);
	object-fit: contain;
	opacity: .9;
}

.iawf-coaches__nophoto-label {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-align: center;
	color: var(--awb-color6);
}

/* Bottom shade under the caption */
.iawf-coaches__shade {
	position: absolute;
	inset: auto 0 0 0;
	z-index: -1;
	height: 50%;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .88));
}

.iawf-coaches__caption {
	position: absolute;
	left: clamp(14px, 1.6vw, 22px);
	right: clamp(14px, 1.6vw, 22px);
	bottom: clamp(14px, 1.6vw, 20px);
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
}

.iawf-coaches__titles {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.iawf-coaches__role {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--awb-color5);
	overflow-wrap: break-word;
}

.iawf-coaches .iawf-coaches__name {
	font-family: var(--awb-typography1-font-family);
	font-size: clamp(20px, 1.9vw, 30px);
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: var(--awb-color8);
	overflow-wrap: break-word;
}

/* Tile arrow: ring turns into a white disc with a black arrow and lifts 2px
   while the tile is hovered or focused (design: whole tile triggers it). */
.iawf-coaches__arrow {
	position: relative;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid color-mix(in srgb, var(--awb-color8) 50%, transparent);
	background: transparent;
	color: var(--awb-color8);
	transition: background .25s, border-color .25s, color .25s, transform .25s;
}

.iawf-coaches__arrow::before,
.iawf-coaches__card-arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 15px;
	height: 12px;
	margin: -6px 0 0 -7.5px;
	background-color: currentColor;
	-webkit-mask: var(--iawf-icon-arrow) center / contain no-repeat;
	mask: var(--iawf-icon-arrow) center / contain no-repeat;
}

.iawf-coaches a.iawf-coaches__tile-link:focus-visible .iawf-coaches__arrow {
	border-color: var(--awb-color8);
	background: var(--awb-color8);
	color: var(--awb-color1);
	transform: translateY(-2px);
}

@media (hover: hover) and (pointer: fine) {
	.iawf-coaches a.iawf-coaches__tile-link:hover .iawf-coaches__arrow {
		border-color: var(--awb-color8);
		background: var(--awb-color8);
		color: var(--awb-color1);
		transform: translateY(-2px);
	}
}

/* --------------------------------------------------------------------------
   2. Train with them (ways-to-train cards)
   -------------------------------------------------------------------------- */

.iawf-coaches__ways {
	border-top: 1px solid var(--awb-color9);
}

.iawf-coaches__ways-inner {
	max-width: 1680px;
	margin: 0 auto;
	padding: clamp(64px, 6vw, 96px) clamp(20px, 4vw, 64px);
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 3.4vw, 48px);
}

.iawf-coaches__ways-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px 48px;
}

.iawf-coaches__ways-titles {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.iawf-coaches .iawf-coaches__ways-eyebrow {
	font-family: var(--awb-typography3-font-family);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--awb-color5);
}

.iawf-coaches .iawf-coaches__ways-heading {
	font-size: clamp(36px, 4.8vw, 80px);
	line-height: .92;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.iawf-coaches .iawf-coaches__ways-intro {
	max-width: 440px;
	font-size: clamp(15px, 1.1vw, 16px);
	line-height: 1.65;
	color: var(--awb-color7);
	text-wrap: pretty;
}

.iawf-coaches__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.iawf-coaches__card {
	display: flex;
	min-width: 0;
}

.iawf-coaches .iawf-coaches__card-link,
.iawf-coaches a.iawf-coaches__card-link:hover,
.iawf-coaches a.iawf-coaches__card-link:focus {
	color: var(--awb-color8);
	text-decoration: none;
}

.iawf-coaches .iawf-coaches__card-link {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 3vw, 44px);
	padding: clamp(22px, 2vw, 28px);
	border-radius: 20px;
	background: var(--awb-color2);
	border: 1.5px solid var(--awb-color3);
	transition: background .25s, border-color .25s, color .25s, transform .25s;
}

.iawf-coaches a.iawf-coaches__card-link:focus-visible {
	background: var(--awb-color8);
	border-color: var(--awb-color8);
	color: var(--awb-color1);
	transform: translateY(-2px);
	outline: 2px solid var(--awb-color8);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.iawf-coaches a.iawf-coaches__card-link:hover {
		background: var(--awb-color8);
		border-color: var(--awb-color8);
		color: var(--awb-color1);
		transform: translateY(-2px);
	}
}

.iawf-coaches__card-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
}

.iawf-coaches__card-tag {
	padding-top: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: inherit;
	opacity: .6;
}

.iawf-coaches__card-arrow {
	position: relative;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	background: transparent;
	color: inherit;
}

.iawf-coaches__card-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.iawf-coaches .iawf-coaches__card-title {
	font-size: clamp(22px, 1.8vw, 30px);
	line-height: .95;
	letter-spacing: -.01em;
	color: inherit;
	overflow-wrap: break-word;
}

.iawf-coaches__card-desc {
	font-size: clamp(15px, 1.1vw, 16px);
	line-height: 1.55;
	color: inherit;
	opacity: .75;
}

/* --------------------------------------------------------------------------
   3. Reviews (header + reviews plugin widget)
   -------------------------------------------------------------------------- */

.iawf-coaches__reviews {
	border-top: 1px solid var(--awb-color9);
	padding: clamp(64px, 6vw, 96px) 0;
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 3.4vw, 48px);
}

.iawf-coaches__reviews-head-wrap {
	width: 100%;
	max-width: 1544px;
	margin: 0 auto;
	padding: 0 clamp(20px, 5vw, 72px);
}

.iawf-coaches__reviews-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px 48px;
}

.iawf-coaches__reviews-titles {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 820px;
}

.iawf-coaches .iawf-coaches__reviews-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--awb-typography3-font-family);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--awb-color8);
}

.iawf-coaches__stars {
	font-size: 16px;
	letter-spacing: .1em;
	color: var(--awb-color5);
}

.iawf-coaches .iawf-coaches__reviews-heading {
	font-size: clamp(30px, 3.8vw, 60px);
	line-height: 1;
	letter-spacing: -.015em;
	text-wrap: balance;
}

.iawf-coaches__reviews-track {
	position: relative;
	overflow: hidden;
	/* The reviews slider is a long row of cards; it must never decide how
	   wide the page is (on the live site it stretched the whole profile). */
	contain: inline-size;
}

.iawf-coaches__fade {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	width: clamp(40px, 10vw, 200px);
	pointer-events: none;
}

.iawf-coaches__fade--left {
	left: 0;
	background: linear-gradient(90deg, var(--awb-color1) 15%, rgba(0, 0, 0, 0));
}

.iawf-coaches__fade--right {
	right: 0;
	background: linear-gradient(270deg, var(--awb-color1) 15%, rgba(0, 0, 0, 0));
}

/* --------------------------------------------------------------------------
   Four ways-to-train cards in a row (1100px and up)
   -------------------------------------------------------------------------- */

@media (min-width: 1100px) {
	.iawf-coaches__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* --------------------------------------------------------------------------
   Wide: hero fills the screen, tiles fill the right column (960px and up)
   -------------------------------------------------------------------------- */

@media (min-width: 960px) {
	.iawf-coaches {
		--iawf-cl-pt: clamp(112px, 15vh, 140px);
		--iawf-cl-pb: clamp(28px, 4vh, 48px);
	}

	@supports (height: 100svh) {
		.iawf-coaches {
			--iawf-cl-pt: clamp(112px, 15svh, 140px);
			--iawf-cl-pb: clamp(28px, 4svh, 48px);
		}
	}

	body.admin-bar .iawf-coaches {
		--iawf-cl-vh: calc(100vh - 32px);
	}

	@supports (height: 100svh) {
		body.admin-bar .iawf-coaches {
			--iawf-cl-vh: calc(100svh - 32px);
		}
	}

	.iawf-coaches__hero-inner {
		min-height: var(--iawf-cl-vh);
		grid-template-columns: minmax(0, 1fr) minmax(0, min(640px, 52%));
	}

	/* The tile column is 640px wide, or 52% of the row on narrower desktops so
	   the heading keeps whole words.
	   Four coaches fill the column exactly (two rows); more coaches add rows
	   of at least 200px and the hero grows instead of squeezing the tiles. */
	.iawf-coaches__tiles {
		min-height: calc(var(--iawf-cl-vh) - var(--iawf-cl-pt) - var(--iawf-cl-pb));
		grid-auto-rows: minmax(200px, 1fr);
	}

	.iawf-coaches a.iawf-coaches__tile-link {
		aspect-ratio: auto;
	}
}

/* --------------------------------------------------------------------------
   Phone (below 640px)
   -------------------------------------------------------------------------- */

@media (max-width: 639.98px) {
	.iawf-coaches {
		--iawf-cl-pt: 88px;
		--iawf-cl-pb: 40px;
	}

	.iawf-coaches__hero-inner {
		padding-left: 20px;
		padding-right: 20px;
	}

	.iawf-coaches__intro {
		gap: 14px;
	}

	.iawf-coaches .iawf-coaches__heading {
		font-size: 36px;
	}

	.iawf-coaches__nophoto-label {
		display: none;
	}

	/* Two tiles side by side at 390px leave about 90px for the name next to
	   the arrow; 18px keeps names such as ORGANIC on one line. */
	.iawf-coaches__caption {
		left: 12px;
		right: 12px;
		gap: 8px;
	}

	.iawf-coaches .iawf-coaches__name {
		font-size: 18px;
	}

	.iawf-coaches__cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.iawf-coaches__reviews-head {
		justify-content: center;
		text-align: center;
	}

	.iawf-coaches__reviews-titles {
		align-items: center;
	}

	.iawf-coaches a.iawf-coaches__reviews-link {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.iawf-coaches__arrow,
	.iawf-coaches .iawf-coaches__card-link {
		transition: none;
	}

	.iawf-coaches a.iawf-coaches__tile-link:focus-visible .iawf-coaches__arrow,
	.iawf-coaches a.iawf-coaches__card-link:focus-visible {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
	.iawf-coaches a.iawf-coaches__tile-link:hover .iawf-coaches__arrow,
	.iawf-coaches a.iawf-coaches__card-link:hover {
		transform: none;
	}
}
