/*
Theme Name: County Sports Meet
Description: Standalone theme for the Liberia National County Sports Meet — football, basketball, and kickball across Liberia's 15 counties.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: csm-theme
*/

/* -------------------- Reset / base -------------------- */

:root {
	/* Liberian flag colors */
	--csm-red: #bf0a30;
	--csm-blue: #002868;
	--csm-white: #ffffff;
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1e2530;
	line-height: 1.5;
	background: var(--csm-white);
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--csm-blue);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--csm-blue);
	color: #fff;
	padding: 10px 16px;
	z-index: 10000;
}

.skip-link:focus {
	top: 0;
}

.csm-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px;
}

/* -------------------- Header -------------------- */

.csm-site-header {
	border-bottom: 3px solid var(--csm-red);
}

.csm-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	max-width: 1100px;
	margin: 0 auto;
}

.csm-site-title {
	font-size: 20px;
	font-weight: 800;
	margin: 0;
}

.csm-site-title a {
	text-decoration: none;
	color: var(--csm-blue);
}

.csm-nav-toggle {
	display: none;
	background: none;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 8px 12px;
	font-size: 16px;
	cursor: pointer;
}

.csm-primary-nav ul {
	list-style: none;
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
}

.csm-primary-nav a {
	text-decoration: none;
	font-weight: 600;
	color: #1e2530;
}

.csm-primary-nav a:hover {
	color: var(--csm-red);
}

@media (max-width: 700px) {
	.csm-nav-toggle {
		display: block;
	}

	.csm-primary-nav {
		display: none;
		width: 100%;
	}

	.csm-primary-nav.is-open {
		display: block;
	}

	.csm-primary-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 10px 0;
	}

	.csm-primary-nav li {
		border-top: 1px solid #eee;
	}

	.csm-primary-nav a {
		display: block;
		padding: 12px 0;
	}

	.csm-header-inner {
		flex-wrap: wrap;
	}
}

/* -------------------- Footer -------------------- */

.csm-site-footer {
	border-top: 1px solid #e2e2e2;
	margin-top: 60px;
	padding: 24px 20px;
	text-align: center;
	color: #64748b;
	font-size: 13px;
}

/* -------------------- Shared components -------------------- */

.csm-live-badge {
	background: var(--csm-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 2px 8px;
	border-radius: 3px;
	margin-left: 8px;
	vertical-align: middle;
}

.csm-match-card {
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 14px 16px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.csm-match-card .csm-teams {
	font-weight: 600;
}

.csm-match-card .csm-meta {
	color: #666;
	font-size: 13px;
}

.csm-score {
	font-size: 20px;
	font-weight: 700;
}

.csm-section {
	margin: 40px 0;
}

.csm-section h2 {
	color: var(--csm-blue);
	border-bottom: 3px solid var(--csm-red);
	padding-bottom: 8px;
	margin-bottom: 20px;
}

.csm-standings-table {
	width: 100%;
	border-collapse: collapse;
}

.csm-standings-table th {
	background: var(--csm-blue);
	color: #fff;
}

.csm-standings-table th,
.csm-standings-table td {
	padding: 8px 10px;
	text-align: center;
	border-bottom: 1px solid #eee;
}

.csm-standings-table th:first-child,
.csm-standings-table td:first-child {
	text-align: left;
}

.csm-county-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.csm-county-grid a {
	display: block;
	padding: 20px;
	background: #f4f4f5;
	border-radius: 8px;
	text-align: center;
	font-weight: 600;
	text-decoration: none;
	color: var(--csm-blue);
	border-bottom: 3px solid transparent;
}

.csm-county-grid a:hover {
	background: #eef2f9;
	border-bottom-color: var(--csm-red);
}

.csm-county-flag {
	display: block;
	width: 100%;
	height: 90px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 10px;
}

.csm-roster-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 12px;
}

.csm-roster-table th,
.csm-roster-table td {
	padding: 6px 10px;
	border-bottom: 1px solid #eee;
}

.csm-shop-teaser {
	background: var(--csm-blue);
	color: #fff;
	border-top: 4px solid var(--csm-red);
	padding: 30px;
	border-radius: 8px;
	text-align: center;
}

.csm-shop-teaser a {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 600px) {
	.csm-match-card {
		flex-direction: column;
		align-items: flex-start;
	}
}
