/* ==========================================================================
   CricHD front-end theme  (matches app.crichd.com layout)
   --------------------------------------------------------------------------
   Color tokens are kept in :root so a re-skin only needs a few values changed.
   ========================================================================== */
:root {
	--brand:        #198754;     /* primary green   */
	--brand-dark:   #146c43;
	--brand-light:  #d1e7dd;
	--accent:       #f97316;     /* orange CTA      */
	--accent-dark:  #c2410c;
	--bg:           #f3f4f6;     /* page background */
	--card:         #e5e7eb;     /* light card bg   */
	--card-2:       #f8f9fa;     /* nested rows     */
	--text:         #1f2937;
	--muted:        #6b7280;
	--border:       #d1d5db;
	--banner:       #2c3e57;
	--banner-text:  #ffffff;
	--radius-lg:    10px;
	--radius-md:    8px;
	--radius-sm:    6px;
	--shadow-sm:    0 1px 2px rgba(0,0,0,.05);
	--shadow-md:    0 2px 8px rgba(0,0,0,.06);
	--font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html, body { height: 100%; margin: 0; }
body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover, a:focus { color: var(--accent); text-decoration: none; }

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

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--brand); color: #fff;
	padding: 8px 12px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

/* -------------------------------------------------------- header */
.site-header {
	background: var(--brand);
	color: #fff;
	padding: 14px 0;
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: var(--shadow-sm);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: nowrap;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo {
	height: 36px;
	width: auto;
	filter: brightness(0) invert(1);  /* white logo on green */
}

.primary-menu {
	display: flex;
	gap: 18px;
	align-items: center;
	flex-wrap: wrap;
}
.primary-menu a {
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	padding: 6px 4px;
	position: relative;
	transition: color .15s;
	white-space: nowrap;
}
.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu a.active {
	color: #fff;
}
.primary-menu a.active::after,
.primary-menu a:hover::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
}

.menu-toggle {
	display: none;
	background: transparent;
	border: 0;
	width: 36px; height: 36px;
	padding: 6px;
	cursor: pointer;
}
.menu-toggle span {
	display: block;
	height: 2px;
	background: #fff;
	margin: 5px 0;
	border-radius: 2px;
	transition: transform .2s;
}

/* -------------------------------------------------------- breadcrumbs */
.breadcrumb-wrap {
	background: transparent;
	padding: 12px 0 0;
}
.breadcrumb-list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 4px;
	font-size: 12px;
	color: var(--muted);
}
.breadcrumb-list li { display: inline-flex; align-items: center; }
.breadcrumb-list .sep { margin: 0 6px; color: var(--border); }
.breadcrumb-list a { color: var(--brand-dark); }
.breadcrumb-list [aria-current="page"] { color: var(--text); font-weight: 500; }

/* -------------------------------------------------------- main grid */
.site-main { padding: 16px 0 32px; }

.layout-grid {
	display: grid;
	grid-template-columns: 220px 1fr 220px;
	gap: 16px;
	align-items: flex-start;
}

@media (max-width: 992px) {
	.layout-grid { grid-template-columns: 200px 1fr; }
	.right-column,
	.top-teams { display: none; }
}
@media (max-width: 768px) {
	.layout-grid { grid-template-columns: 1fr; }
	.left-column, .right-column { order: 2; }
}

/* -------------------------------------------------------- side cards */
.left-column,
.right-column {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.side-card {
	background: var(--card);
	border-radius: var(--radius-lg);
	padding: 14px 12px;
	box-shadow: var(--shadow-sm);
}
.side-card-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 12px;
	padding: 0 4px;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin: 0; }
.side-list li.empty-row {
	padding: 8px 6px; color: var(--muted); font-size: 12px;
}

.side-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 6px;
	border-radius: var(--radius-sm);
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	transition: background .15s;
}
.side-list a:hover { background: rgba(0,0,0,.04); color: var(--brand-dark); }
.side-list a.active,
.side-list a[aria-current="page"] {
	background: var(--brand);
	color: #fff;
}
.side-list a.active .circle-logo,
.side-list a[aria-current="page"] .circle-logo {
	box-shadow: 0 0 0 2px rgba(255,255,255,.6);
}

.side-name { line-height: 1.2; }

/* -------------------------------------------------------- circle logos */
.circle-logo {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: #fff;
	display: inline-flex;
	align-items: center; justify-content: center;
	overflow: hidden;
	flex: 0 0 28px;
	box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.circle-logo img {
	width: 100%; height: 100%;
	object-fit: contain;
	padding: 2px;
}
.circle-logo.lg {
	width: 36px; height: 36px;
	flex: 0 0 36px;
}
.circle-logo .fa { color: var(--brand-dark); font-size: 14px; }
.circle-logo .flag { font-size: 18px; line-height: 1; }

/* -------------------------------------------------------- main center card */
.main-card {
	background: var(--card);
	border-radius: var(--radius-lg);
	padding: 18px;
	box-shadow: var(--shadow-sm);
	min-height: 200px;
}

.page-heading h1 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 14px;
	color: var(--text);
}

/* -------------------------------------------------------- league cards (homepage) */
.league-card {
	background: var(--card-2);
	border-radius: var(--radius-md);
	margin-bottom: 12px;
	overflow: hidden;
}
.league-card-head {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	background: rgba(0,0,0,.03);
}
.league-head-link {
	display: flex; align-items: center;
	gap: 10px;
	color: var(--text);
	font-weight: 600;
}
.league-head-name { font-size: 14px; }

.event-rows { list-style: none; margin: 0; padding: 0; }
.event-row { border-top: 1px solid rgba(0,0,0,.04); }
.event-row:first-child { border-top: 0; }

.event-row-link {
	display: grid;
	grid-template-columns: 90px 1fr 28px;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	color: var(--text);
	transition: background .15s;
}
.event-row-link:hover {
	background: rgba(25,135,84,.05);
	color: var(--text);
}

.event-status { display: flex; align-items: center; }
.event-time { font-size: 12px; color: var(--muted); }

.badge-live {
	display: inline-block;
	background: #fee2e2;
	color: #b91c1c;
	font-weight: 700;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 4px;
	border-left: 3px solid #dc2626;
}

.event-teams {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.team {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.team-logo {
	width: 18px; height: 18px;
	border-radius: 50%;
	object-fit: contain;
	background: #fff;
	flex: 0 0 18px;
}
.team-name {
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.event-cta {
	color: var(--muted);
	font-size: 14px;
	text-align: right;
}
.event-row-link:hover .event-cta { color: var(--accent); }

/* Small league/tournament badge shown under the two team names */
.event-league-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--muted);
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.event-league-tag .fa { font-size: 10px; opacity: .7; }

/* Horizontal chip row of all tournaments inside a category page */
.cat-leagues {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	margin-bottom: 14px;
	background: #fff;
	border: 1px solid rgba(0,0,0,.05);
	border-radius: 8px;
}
.cat-leagues-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-right: 4px;
}
.cat-league-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 13px;
	color: var(--text);
	background: #f3f4f6;
	border: 1px solid rgba(0,0,0,.04);
	border-radius: 999px;
	transition: background .15s, color .15s, border-color .15s;
}
.cat-league-chip:hover {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}
.cat-league-chip img {
	border-radius: 50%;
	background: #fff;
	object-fit: contain;
	flex: 0 0 16px;
}
.cat-league-chip .fa { font-size: 11px; opacity: .65; }
.cat-league-chip:hover .fa { opacity: 1; }
@media (max-width: 480px) {
	.cat-leagues { padding: 10px; gap: 6px; }
	.cat-league-chip { font-size: 12px; padding: 5px 10px; }
}

@media (max-width: 480px) {
	.event-row-link { grid-template-columns: 70px 1fr 24px; gap: 8px; }
	.team-name { font-size: 12px; }
}

/* -------------------------------------------------------- empty state */
.empty-state {
	padding: 24px 16px;
	text-align: center;
	color: var(--muted);
	background: var(--card-2);
	border-radius: var(--radius-md);
	margin-bottom: 12px;
}
.empty-state p { margin: 0; }

/* -------------------------------------------------------- SEO copy below content */
.seo-copy {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(0,0,0,.06);
	color: var(--text);
	font-size: 13px;
	line-height: 1.6;
}
.seo-copy h1, .seo-copy h2, .seo-copy h3 {
	color: #b91c1c;
	font-size: 16px;
	font-weight: 700;
	margin: 16px 0 8px;
}
.seo-copy h1:first-child, .seo-copy h2:first-child, .seo-copy h3:first-child { margin-top: 0; }
.seo-copy p { margin: 0 0 10px; }

/* -------------------------------------------------------- footer */
.site-footer {
	background: var(--brand);
	color: #fff;
	padding: 18px 0;
	text-align: center;
	margin-top: 32px;
}
.footer-links {
	display: flex;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 8px;
	font-size: 12px;
}
.footer-links a {
	color: #fff;
	opacity: .9;
}
.footer-links a:hover { opacity: 1; color: #fff; }
.footer-copy { font-size: 13px; }
.footer-home { font-size: 13px; margin-top: 4px; }
.footer-home a {
	color: #fff;
	text-decoration: underline;
	margin-left: 4px;
}

/* -------------------------------------------------------- mobile menu */
@media (max-width: 768px) {
	.menu-toggle { display: block; }
	.primary-menu {
		display: none;
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--brand-dark);
		flex-direction: column;
		gap: 0;
		padding: 8px 16px 12px;
	}
	.primary-menu.open { display: flex; }
	.primary-menu a {
		padding: 10px 4px;
		border-bottom: 1px solid rgba(255,255,255,.08);
	}
	.primary-menu a:last-child { border-bottom: 0; }
	.primary-menu a.active::after,
	.primary-menu a:hover::after { display: none; }
	.site-header { position: relative; }
}
