/**
 * Matches listing page — inspired by html/matches.html
 * Real-data sections only (no gallery / live stats / H2H dummy).
 */

.ar-matches .ar-matches-page {
	--emerald-900: var(--ar-emerald-900, #002f13);
	--emerald-800: var(--ar-emerald-800, #054b21);
	--emerald-700: var(--ar-emerald-700, #0b4a24);
	--emerald-600: var(--ar-emerald-600, #186939);
	--gold-700: var(--ar-gold-700, #88734c);
	--gold-500: var(--ar-gold-500, #ab9671);
	--gold-300: var(--ar-gold-300, #cbba9c);
	--iron-900: var(--ar-iron-900, #262729);
	--iron-500: var(--ar-iron-500, #656769);
	--paper: var(--ar-paper, #fff);
	--paper-warm: var(--ar-paper-warm, #fbf9f6);
	--line: rgba(38, 39, 41, 0.09);
	--ease: var(--ar-ease, cubic-bezier(0.16, 0.84, 0.44, 1));
	--shadow-soft: var(--ar-shadow-soft, 0 20px 60px -30px rgba(0, 25, 10, 0.18));
	--shadow-card: var(--ar-shadow-card, 0 12px 40px -20px rgba(0, 25, 10, 0.14));
	--pad: var(--ar-pad, 80px);
	background: var(--paper);
	color: var(--iron-900);
}

.ar-matches .the-content-con,
.ar-matches .the-content-page,
.ar-matches .pt-row,
.ar-matches .pt-col {
	margin: 0;
	padding: 0;
	max-width: none;
	width: 100%;
}

.ar-matches-page a {
	text-decoration: none;
	color: inherit;
}

.ar-matches-page .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.ar-matches-page .ar-wrap-wide {
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: var(--pad, 80px);
}

@media (max-width: 1024px) {
	.ar-matches-page .ar-wrap-wide {
		padding-inline: 40px;
	}
}
@media (max-width: 640px) {
	.ar-matches-page .ar-wrap-wide {
		padding-inline: 24px;
	}
}

/* ===== Filters ===== */
.ar-matches-filters {
	position: sticky;
	top: 72px;
	z-index: 40;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	padding-block: 1rem;
}

.ar-matches-filters-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.ar-matches-view-tabs {
	display: flex;
	gap: 0.55rem;
	flex-wrap: wrap;
}

.ar-matches-pill {
	padding: 0.65rem 1.25rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 700;
	border: 1.5px solid var(--emerald-600);
	color: var(--emerald-700);
	background: #fff;
	transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
	white-space: nowrap;
}

.ar-matches-pill:hover {
	background: var(--paper-warm);
}

.ar-matches-pill.is-active {
	background: var(--emerald-700);
	border-color: var(--emerald-700);
	color: #fff;
}

.ar-matches-filter-form {
	display: flex;
	gap: 0.55rem;
	flex-wrap: wrap;
	align-items: center;
}

.ar-matches-filter-form select,
.ar-matches-filter-form input[type='search'] {
	border: 1.5px solid var(--line);
	border-radius: 999px;
	padding: 0.6rem 1rem;
	font-size: 0.85rem;
	font-family: inherit;
	color: var(--iron-900);
	background: var(--paper-warm);
	max-width: 220px;
}

.ar-matches-filter-form input[type='search'] {
	min-width: 160px;
}

.ar-matches-search-btn {
	padding: 0.6rem 1.1rem;
	border-radius: 999px;
	border: none;
	background: var(--emerald-600);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	font-family: inherit;
	cursor: pointer;
}

@media (max-width: 900px) {
	.ar-matches-filters-row {
		flex-direction: column;
		align-items: stretch;
	}
	.ar-matches-view-tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 0.25rem;
	}
	.ar-matches-filter-form select,
	.ar-matches-filter-form input[type='search'] {
		max-width: none;
		flex: 1 1 140px;
	}
}

/* ===== Section chrome ===== */
.ar-matches-featured,
.ar-matches-upcoming,
.ar-matches-previous,
.ar-matches-news {
	padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.ar-matches-previous,
.ar-matches-news {
	background: var(--paper-warm);
}

.ar-matches-section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.5rem;
	margin-bottom: 2.5rem;
	flex-wrap: wrap;
}

.ar-matches-eyebrow {
	margin: 0;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-700);
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.ar-matches-eyebrow::before {
	content: '';
	width: 1.25rem;
	height: 2px;
	background: var(--gold-500);
	border-radius: 2px;
}

.ar-matches-section-head h2 {
	margin: 0.65rem 0 0;
	font-size: clamp(2rem, 3.6vw, 2.85rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--iron-900);
	text-wrap: balance;
}

.ar-matches-section-head > p {
	margin: 0;
	color: var(--iron-500);
	font-size: 1rem;
	max-width: 26rem;
	line-height: 1.7;
}

.ar-matches-empty {
	margin: 0;
	padding: 1.5rem 1.25rem;
	text-align: center;
	font-weight: 600;
	color: var(--iron-500);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 1rem;
}

.ar-matches-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 1280px;
	margin: 0 auto;
	padding-inline: var(--pad, 80px);
}

.ar-matches-divider span {
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(171, 150, 113, 0.55) 50%, transparent);
}

.ar-matches-divider img {
	opacity: 0.55;
	flex-shrink: 0;
}

/* ===== Featured card ===== */
.ar-nm-card {
	position: relative;
	overflow: hidden;
	border-radius: 2rem;
	background: linear-gradient(150deg, var(--emerald-800) 0%, var(--emerald-900) 65%, #011a0a 100%);
	box-shadow: var(--shadow-soft);
	padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem) 2.5rem;
	text-align: center;
	color: #fff;
}

.ar-nm-pattern {
	position: absolute;
	inset: 0;
	background-repeat: repeat;
	background-size: 80px 78px;
	opacity: 0.05;
	pointer-events: none;
}

.ar-nm-badge {
	position: absolute;
	top: 1.4rem;
	inset-inline-start: 1.4rem;
	z-index: 2;
	background: var(--gold-500);
	color: var(--emerald-900);
	font-size: 0.78rem;
	font-weight: 800;
	padding: 0.45rem 1rem;
	border-radius: 999px;
}

.ar-nm-comp {
	position: relative;
	z-index: 1;
	margin: 0 0 1.5rem;
	color: var(--gold-300);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.ar-nm-teams {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(1.25rem, 4vw, 3.5rem);
}

.ar-nm-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	width: min(180px, 28vw);
}

.ar-nm-team span {
	font-size: 1.05rem;
	font-weight: 800;
	color: #fff;
}

.ar-nm-team.is-win span {
	color: var(--gold-300);
}

.ar-mc-crest {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 50%;
	background: var(--paper-warm);
	box-shadow: var(--shadow-card);
	overflow: hidden;
}

.ar-nm-team .ar-mc-crest {
	width: 6rem;
	height: 6rem;
}

.ar-mc-crest img {
	width: 70%;
	height: 70%;
	object-fit: contain;
}

.ar-mc-crest em {
	font-style: normal;
	font-weight: 800;
	font-size: 1.4rem;
	color: var(--emerald-700);
}

.ar-nm-vs {
	position: relative;
	z-index: 1;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 800;
	color: var(--gold-300);
	min-width: 4rem;
}

.ar-nm-meta {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	gap: 1.75rem;
	margin-top: 1.75rem;
	flex-wrap: wrap;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.9rem;
}

.ar-nm-meta div {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.ar-nm-meta svg {
	width: 1rem;
	height: 1rem;
	stroke: var(--gold-300);
	flex-shrink: 0;
}

.ar-nm-countdown {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	gap: 0.85rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.ar-cd-box {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	border-radius: 1rem;
	padding: 0.9rem 1.1rem;
	min-width: 4.5rem;
}

.ar-cd-box span {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
}

.ar-cd-box small {
	font-size: 0.68rem;
	color: var(--gold-300);
	letter-spacing: 0.04em;
}

.ar-nm-actions {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	gap: 0.85rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.ar-matches-page .ar-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0.9rem 1.6rem;
	border-radius: 999px;
	transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.ar-matches-page .ar-btn svg {
	width: 1rem;
	height: 1rem;
}

.ar-matches-page .ar-btn-primary {
	background: var(--emerald-600);
	color: #fff;
	box-shadow: var(--shadow-card);
}

.ar-matches-page .ar-btn-primary:hover {
	background: var(--emerald-700);
	transform: translateY(-2px);
}

/* ===== Upcoming grid ===== */
.ar-matches-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

@media (max-width: 1024px) {
	.ar-matches-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 640px) {
	.ar-matches-grid {
		grid-template-columns: 1fr;
	}
}

.ar-match-card {
	background: linear-gradient(150deg, var(--emerald-800) 0%, var(--emerald-900) 65%, #011a0a 100%);
	border-radius: 1.4rem;
	box-shadow: var(--shadow-card);
	padding: 1.5rem 1.35rem;
	text-align: center;
	color: #fff;
	transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.ar-match-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-soft);
}

.ar-mc-comp {
	margin: 0 0 0.9rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--gold-300);
	letter-spacing: 0.03em;
}

.ar-mc-teams {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 0.9rem;
}

.ar-mc-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	width: 5.5rem;
}

.ar-mc-team .ar-mc-crest {
	width: 3.25rem;
	height: 3.25rem;
}

.ar-mc-team span {
	font-size: 0.78rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.ar-mc-vs {
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--gold-300);
}

.ar-mc-meta {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.65);
}

.ar-mc-status {
	display: inline-block;
	margin-top: 0.45rem;
	margin-bottom: 0.9rem;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: var(--gold-300);
}

.ar-mc-btns {
	display: flex;
	gap: 0.45rem;
	justify-content: center;
	flex-wrap: wrap;
}

.ar-mc-btns a {
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	color: #fff;
	transition: background 0.25s var(--ease);
}

.ar-mc-btns a:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ===== Previous list ===== */
.ar-prev-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.ar-prev-card {
	display: flex;
	align-items: center;
	gap: 1.15rem;
	background: #fff;
	border-radius: 1.4rem;
	box-shadow: var(--shadow-card);
	padding: 1.25rem 1.4rem;
	border: 1px solid var(--line);
	transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

a.ar-prev-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-soft);
}

.ar-pc-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	width: 5.75rem;
	flex-shrink: 0;
}

.ar-pc-team .ar-mc-crest {
	width: 3rem;
	height: 3rem;
}

.ar-pc-team span {
	font-size: 0.78rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.3;
	color: var(--iron-900);
}

.ar-pc-team.is-win span {
	color: var(--emerald-700);
	font-weight: 800;
}

.ar-pc-score {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--iron-900);
	flex-shrink: 0;
	min-width: 4.5rem;
	text-align: center;
}

.ar-pc-info {
	flex: 1;
	min-width: 0;
}

.ar-pc-comp {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--gold-700);
	letter-spacing: 0.03em;
}

.ar-pc-date {
	font-size: 0.8rem;
	color: var(--iron-500);
	margin-top: 0.25rem;
}

.ar-pc-link {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--emerald-700);
	white-space: nowrap;
	flex-shrink: 0;
}

@media (max-width: 720px) {
	.ar-prev-card {
		flex-wrap: wrap;
		justify-content: center;
		text-align: center;
	}
	.ar-pc-info {
		width: 100%;
		order: 4;
	}
	.ar-pc-link {
		width: 100%;
		order: 5;
	}
}

/* ===== Related news ===== */
.ar-matches-news-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.35rem;
}

@media (max-width: 900px) {
	.ar-matches-news-grid {
		grid-template-columns: 1fr;
	}
}

.ar-matches-news-card {
	display: grid;
	border-radius: 1.25rem;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-card);
	transition: transform 0.3s var(--ease);
}

.ar-matches-news-card:hover {
	transform: translateY(-3px);
}

.ar-mn-photo {
	aspect-ratio: 16 / 10;
	background: #26272a;
	overflow: hidden;
}

.ar-mn-photo img,
.ar-mn-fallback {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ar-mn-fallback {
	background: linear-gradient(135deg, var(--emerald-800), #26272a);
}

.ar-mn-body {
	padding: 1.1rem 1.2rem 1.35rem;
}

.ar-mn-cat {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--gold-700);
	margin-bottom: 0.45rem;
}

.ar-mn-body h3 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--iron-900);
	text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
	.ar-match-card,
	.ar-prev-card,
	.ar-matches-news-card,
	.ar-matches-page .ar-btn {
		transition: none;
	}
	.ar-match-card:hover,
	a.ar-prev-card:hover,
	.ar-matches-news-card:hover,
	.ar-matches-page .ar-btn-primary:hover {
		transform: none;
	}
}
