/**
 * Tournaments page styles (pages/template-tournaments.php)
 * Hero, venue and CTA are shared components (page-hero, venue-info, cta-band);
 * the upcoming card is components/tournament-card.css.
 *
 * 1. Our Tournaments
 * 2. Tournament Rules
 * 3. Past Tournaments
 * 4. Responsive
 */

/* ============================ OUR TOURNAMENTS ============================ */
.our-tournaments .section-head__copy,
.tournament-rules .section-head__copy,
.past-tournaments .section-head__copy {
	max-width: calc(646 * var(--u));
}

.our-tournaments__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: calc(34 * var(--u));
	align-items: stretch;
}

/* ============================ TOURNAMENT RULES ============================ */
.tournament-rules {
	padding-bottom: var(--space-96);
}

.tournament-rules .section-head {
	margin-bottom: var(--space-56);
}

.tournament-rules__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-30);
	align-items: stretch;
}

.tournament-rules__card {
	display: flex;
	flex-direction: column;
	gap: calc(11.4 * var(--u));
	padding: calc(39 * var(--u)) calc(37 * var(--u)) var(--space-48);
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
}

.tournament-rules__icon {
	display: inline-flex;
	width: calc(52 * var(--u));
	height: calc(52 * var(--u));
	min-width: 34px;
	min-height: 34px;
	color: var(--black);
}

.tournament-rules__icon svg,
.tournament-rules__icon-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tournament-rules__title {
	padding-top: calc(20.8 * var(--u));
	font-size: var(--fs-card-heading);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.015em;
	line-height: 1.02;
	color: var(--heading-color);
}

.tournament-rules__text {
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-light);
	line-height: 1.45;
	color: var(--text-color);
}

.tournament-rules__points {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	margin: 0;
	padding: var(--space-2) 0 0;
	list-style: none;
}

.tournament-rules__point {
	position: relative;
	padding-left: var(--space-26);
	font-size: var(--fs-24);
	line-height: 1.4;
	color: var(--text-color);
}

.tournament-rules__point::before {
	content: "";
	position: absolute;
	top: 0.46em;
	left: 0;
	width: calc(10 * var(--u));
	height: calc(10 * var(--u));
	min-width: 7px;
	min-height: 7px;
	background: var(--primary-color);
	border-radius: var(--radius-xs);
}

.tournament-rules__bar {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-30);
	margin-top: calc(34 * var(--u));
	padding: calc(38 * var(--u)) var(--space-40);
	overflow: hidden;
	background: var(--black);
	border-radius: var(--radius-lg);
}

.tournament-rules__bar::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: calc(8 * var(--u));
	min-height: 5px;
	background: var(--flag-thirds-muted);
}

.tournament-rules__bar-copy {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--space-8);
	min-width: 280px;
}

.tournament-rules__bar-title {
	font-size: var(--fs-32);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.015em;
	line-height: 1.55;
	color: var(--white);
}

.tournament-rules__bar-text {
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-light);
	line-height: 1.45;
	color: var(--muted-on-dark);
}

.tournament-rules__download {
	min-height: 0;
	padding: calc(22.5 * var(--u)) calc(41 * var(--u));
	text-transform: none;
}

/* ============================ PAST TOURNAMENTS ============================ */
.past-tournaments__count {
	font-size: var(--fs-intro);
	font-weight: var(--font-weight-light);
	line-height: 1.5;
	color: var(--text-color);
}

.past-tournaments__count-num {
	font-weight: var(--font-weight-regular);
	color: var(--heading-color);
}

.past-tournaments__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-30) calc(34 * var(--u));
}

.past-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--white);
	border: var(--stroke-thin) solid var(--border-color);
	border-radius: var(--radius-lg);
	transition: box-shadow var(--transition-base);
}

.past-card:hover {
	box-shadow: var(--shadow-md);
}

.past-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--light-bg-alt);
}

.past-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.past-card__bar {
	position: absolute;
	inset: auto 0 0;
	height: calc(9 * var(--u));
	min-height: 5px;
	background: var(--crumb-divider);
}

.past-card__badge {
	position: absolute;
	top: calc(22 * var(--u));
	left: calc(22 * var(--u));
	padding: calc(8.5 * var(--u)) var(--space-18) calc(8.7 * var(--u));
}

.past-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: calc(38 * var(--u)) var(--space-40) var(--space-40);
}

.past-card__meta {
	display: flex;
	flex-direction: column;
	gap: var(--space-10);
	margin: 0 0 var(--space-18);
	padding: 0;
	list-style: none;
}

.past-card__meta-item {
	display: flex;
	align-items: center;
	gap: var(--space-10);
	font-size: var(--fs-24);
	font-weight: var(--font-weight-medium);
	line-height: 1.55;
	color: var(--text-color);
}

.past-card__title {
	margin-bottom: var(--space-14);
	font-size: var(--fs-statement);
	font-weight: var(--font-weight-black);
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--heading-color);
}

.past-card__link {
	color: inherit;
}

.past-card__link:hover {
	color: var(--primary-color);
}

.past-card__summary {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-light);
	line-height: 1.58;
	color: var(--text-color);
}

/* ============================ RESPONSIVE ============================ */

/* --- LG --- */
@media (max-width: 1200px) {
	.our-tournaments__grid,
	.tournament-rules__grid,
	.past-tournaments__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

/* --- MD / Tablet --- */
@media (max-width: 992px) {
	.tournament-rules {
		padding-bottom: var(--section-spacing);
	}

	.tournament-rules__card {
		padding: 28px 24px 32px;
	}
}

/* --- SM / Mobile --- */
@media (max-width: 768px) {
	.our-tournaments__grid,
	.tournament-rules__grid,
	.past-tournaments__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.tournament-rules__bar {
		padding: 32px 20px 24px;
	}

	.past-card__body {
		padding: 24px 20px;
	}
}

/* --- XS / Small Mobile --- */
@media (max-width: 575px) {
	.tournament-rules__bar-copy {
		min-width: 0;
	}

	.tournament-rules__download {
		width: 100%;
	}
}
