@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Roboto:wght@300;400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&display=swap');

:root {
	--color-nav-bg: #5d41ac;
	--color-nav-text: #FFFFFF;
	--color-bg: #f8f9fa;
	--color-article-bg: #FFFFFF;
	--color-article-text: #162344;
	--color1: #5d41ac;
	--color1b: #FFFFFF;
	--color2: #f0ecf9;
	--color2-hover: #e8e4f4;
	--color3: #00B0B0;
	--color-footer-bg: #162344;
	--color-footer-text: #FFFFFF;
	--max-width: 3200px;
	--nav-height: 60px;
	--shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
	--shadow-md: 0 4px 16px rgba(0,0,0,0.12);
}

/* Smaller nav height for mobile */
@media only screen and (max-width: 1000px) {
	:root {
		--nav-height: 32px;
	}
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

nav {
	justify-content: start;
}

body {
	font-family: 'Poppins', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.6;
	background-color: var(--color-bg);
	margin: 0;
	color: var(--color-article-text);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
}

.table-wrapper {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 24px auto;
	border-radius: 12px;
	box-shadow: var(--shadow-md);
}

.table-wrapper > table {
	margin: 0 auto;
	box-shadow: none;
	border-radius: 0;
}

/* Table wrapper inside stat-section - no extra shadows */
.stat-section .table-wrapper {
	box-shadow: none;
	margin: 16px auto;
	border-radius: 8px;
	overflow: hidden;
}

.stat-section .table-wrapper > table {
	border-radius: 8px;
}

.stat-section .table-wrapper > h3 {
	margin: 0 0 12px 0;
}

h1 {
	font-family: 'Montserrat', 'Open Sans', sans-serif;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.5px;
	margin-bottom: 0px;
	margin-top: 0px;
}

h2 {
	font-family: 'Open Sans', sans-serif;
	font-size: 20px;
	font-weight: 600;
}

nav {
	background-color: var(--color-nav-bg);
	color: var(--color-nav-text);
	box-shadow: var(--shadow-md);
}

header {
	padding-top: var(--nav-height);
	display: grid;  
	background-color: var(--color-article-text);
} 

header img {
	width: 100%;
}

header video {
	width: 100%;
}

header iframe {
	width: 100%;
	height: 56vw;
}

header .slideShow {
	grid-row: 1;
	height: 85vh;
}

header .slideShow img {
	object-fit:  cover;
}

main {
	max-width: var(--max-width);
	width: 100%;
	margin: auto;
	flex: 1;
	box-sizing: border-box;
	overflow-x: hidden;
}

article {
	padding-top: calc(var(--nav-height) + 24px);
	padding-left: 32px;
	padding-right: 32px;
	padding-bottom: 64px;
	margin: 24px;
	background-color: var(--color-article-bg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-content: center;
	justify-content: start;
	border-radius: 16px;
	box-shadow: var(--shadow-md);
}

/* Articles following a hero section don't need nav-height padding */
.hero + article {
	padding-top: 32px;
	margin-top: 0;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

article h1 {
	color: var(--color1);
	text-align: center;
	margin-bottom: 8px;
}

article h2 {
	color: #666;
	text-align: center;
	font-weight: 400;
	margin-top: 0;
	margin-bottom: 24px;
}

article a {
	color: var(--color1);
	text-decoration: none;
	transition: color 0.15s ease;
}

article a:hover {
	color: #3d2b7a;
	text-decoration: underline;
}

article ul {
	padding: 0;
	margin: auto;
	list-style-type: none;
}

article > img {
	display: block;
	margin: auto;
	max-width: 100%;
	object-fit: scale-down;
}

article > form {
	margin: 16px auto 16px auto;
}

article > form input {
	font-size: 20px;
	text-align: center;
	border-radius: 10px;
	border: 2px solid #ddd;
	box-shadow: var(--shadow-sm);
	padding: 12px 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	min-width: 280px;
}

article > form input:focus {
	outline: none;
	border-color: var(--color1);
	box-shadow: 0 0 0 3px rgba(93, 65, 172, 0.15);
}

article > form input::placeholder {
	color: #aaa;
}

article > table {
	margin: 24px auto;
	text-align: left;
	border-spacing: 0px;
	border: none;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

article table caption {
	border: none;
	font-size: 18px;
	white-space:  nowrap;
	margin-bottom: 8px;
	color: var(--color3);
	padding: 0;
}

article table .hidden {
    display: none;
}

article table td, article table th {
	padding: 10px 12px;
}

article table th {
	font-size: 16px;
	font-weight: 600;
	background: linear-gradient(180deg, #6b4dc4 0%, var(--color1) 100%);
	color: var(--color1b);
	vertical-align: bottom;
	padding: 12px 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

article table tr:nth-child(even) {
  background-color: var(--color2);
}

article table tbody tr {
  transition: background-color 0.15s ease;
}

article table tbody tr:hover {
  background-color: var(--color2-hover);
}

article textarea {
	width: 100%;
	height: 50vh;
}

/*
 * Results Search Table
 * Columns: 1-first, 2-last, 3-age, 4-gender, 5-hometown, 6-year, 7-5k, 8-10k, 9-half, 10-full, 11-notes
 */
#resultsSearchTable tr *:nth-child(3) {
	text-align: center;
}

#resultsSearchTable tr *:nth-child(2),
#resultsSearchTable tr *:nth-child(5),
#resultsSearchTable tr *:nth-child(6),
#resultsSearchTable tr *:nth-child(7),
#resultsSearchTable tr *:nth-child(8),
#resultsSearchTable tr *:nth-child(9) {
	text-align: right;
}

/* Results table responsive - hide less important columns first */
@media only screen and (max-width: 1200px) {
	#resultsSearchTable {
		font-size: 12px;
	}
	#resultsSearchTable th {
		font-size: 12px;
	}
	/* Hide 5k (7), 10k (8) */
	#resultsSearchTable tr > *:nth-child(7),
	#resultsSearchTable tr > *:nth-child(8) {
		display: none;
	}
}

@media only screen and (max-width: 900px) {
	#resultsSearchTable {
		font-size: 11px;
	}
	/* Hide 5k (7), 10k (8), half (9), notes (11) */
	#resultsSearchTable tr > *:nth-child(7),
	#resultsSearchTable tr > *:nth-child(8),
	#resultsSearchTable tr > *:nth-child(9),
	#resultsSearchTable tr > *:nth-child(11) {
		display: none;
	}
}

@media only screen and (max-width: 600px) {
	#resultsSearchTable {
		font-size: 10px;
	}
	#resultsSearchTable th,
	#resultsSearchTable td {
		padding: 6px 4px;
	}
	/* Hide gender (4), 5k (7), 10k (8), half (9), notes (11) */
	#resultsSearchTable tr > *:nth-child(4),
	#resultsSearchTable tr > *:nth-child(7),
	#resultsSearchTable tr > *:nth-child(8),
	#resultsSearchTable tr > *:nth-child(9),
	#resultsSearchTable tr > *:nth-child(11) {
		display: none;
	}
}

@media only screen and (max-width: 450px) {
	/* Hide gender (4), hometown (5), 5k (7), 10k (8), half (9), notes (11) */
	#resultsSearchTable tr > *:nth-child(4),
	#resultsSearchTable tr > *:nth-child(5),
	#resultsSearchTable tr > *:nth-child(7),
	#resultsSearchTable tr > *:nth-child(8),
	#resultsSearchTable tr > *:nth-child(9),
	#resultsSearchTable tr > *:nth-child(11) {
		display: none;
	}
}

/*
 * Hometown Search Table (perRunnerTable)
 * Columns: 1-name, 2-age, 3-gender, 4-hometown, 5-year, 6-5k, 7-10k, 8-half, 9-full
 */
@media only screen and (max-width: 1200px) {
	#perRunnerTable {
		font-size: 12px;
	}
	/* Hide 5k (6), 10k (7) */
	#perRunnerTable tr > *:nth-child(6),
	#perRunnerTable tr > *:nth-child(7) {
		display: none;
	}
}

@media only screen and (max-width: 900px) {
	#perRunnerTable {
		font-size: 11px;
	}
	/* Hide 5k (6), 10k (7), half (8) */
	#perRunnerTable tr > *:nth-child(6),
	#perRunnerTable tr > *:nth-child(7),
	#perRunnerTable tr > *:nth-child(8) {
		display: none;
	}
}

@media only screen and (max-width: 600px) {
	#perRunnerTable {
		font-size: 10px;
	}
	#perRunnerTable th,
	#perRunnerTable td {
		padding: 6px 4px;
	}
	/* Hide gender (3), 5k (6), 10k (7), half (8) */
	#perRunnerTable tr > *:nth-child(3),
	#perRunnerTable tr > *:nth-child(6),
	#perRunnerTable tr > *:nth-child(7),
	#perRunnerTable tr > *:nth-child(8) {
		display: none;
	}
}

@media only screen and (max-width: 450px) {
	/* Hide gender (3), hometown (4), 5k (6), 10k (7), half (8) */
	#perRunnerTable tr > *:nth-child(3),
	#perRunnerTable tr > *:nth-child(4),
	#perRunnerTable tr > *:nth-child(6),
	#perRunnerTable tr > *:nth-child(7),
	#perRunnerTable tr > *:nth-child(8) {
		display: none;
	}
}

/*
 * Persons Table - Responsive Column Hiding
 * Columns: 1-first, 2-last, 3-sex, 4-age, 5-hometown, 6-total, 7-first year, 8-last year, 9-perfect, 10-fastest, 11-slowest, 12-notes
 * Priority: Keep name (1,2), hide slowest (11) before fastest (10), hide stats (6,7,8,9) at narrow widths
 */

/* At 1400px: Start shrinking, hide slowest column first */
@media only screen and (max-width: 1400px) {
	#personsTable {
		font-size: 13px;
	}
	#personsTable th {
		font-size: 13px;
		padding: 10px 8px;
	}
	#personsTable td {
		padding: 8px 6px;
	}
	/* Hide slowest (11) */
	#personsTable tr > *:nth-child(11) {
		display: none;
	}
}

/* At 1200px: Hide more columns */
@media only screen and (max-width: 1200px) {
	#personsTable {
		font-size: 12px;
	}
	#personsTable th {
		font-size: 12px;
	}
	/* Hide: total (6), first year (7), last year (8), perfect (9), slowest (11) */
	#personsTable tr > *:nth-child(6),
	#personsTable tr > *:nth-child(7),
	#personsTable tr > *:nth-child(8),
	#personsTable tr > *:nth-child(9),
	#personsTable tr > *:nth-child(11) {
		display: none;
	}
}

/* At 900px: Hide fastest too, keep only essential */
@media only screen and (max-width: 900px) {
	#personsTable {
		font-size: 11px;
	}
	#personsTable th {
		font-size: 11px;
		padding: 8px 6px;
	}
	/* Hide: total (6), first year (7), last year (8), perfect (9), fastest (10), slowest (11) */
	#personsTable tr > *:nth-child(6),
	#personsTable tr > *:nth-child(7),
	#personsTable tr > *:nth-child(8),
	#personsTable tr > *:nth-child(9),
	#personsTable tr > *:nth-child(10),
	#personsTable tr > *:nth-child(11) {
		display: none;
	}
}

/* At 600px: Hide notes too if present, show only name, sex, age, hometown */
@media only screen and (max-width: 600px) {
	#personsTable {
		font-size: 11px;
	}
	/* Hide all except first(1), last(2), sex(3), age(4), hometown(5) */
	#personsTable tr > *:nth-child(6),
	#personsTable tr > *:nth-child(7),
	#personsTable tr > *:nth-child(8),
	#personsTable tr > *:nth-child(9),
	#personsTable tr > *:nth-child(10),
	#personsTable tr > *:nth-child(11),
	#personsTable tr > *:nth-child(12) {
		display: none;
	}
}

/* At 450px: Hide hometown, sex - show only names and age */
@media only screen and (max-width: 450px) {
	#personsTable {
		font-size: 10px;
	}
	#personsTable th {
		font-size: 10px;
		padding: 6px 4px;
	}
	#personsTable td {
		padding: 6px 4px;
	}
	/* Hide sex (3), hometown (5), and all stats */
	#personsTable tr > *:nth-child(3),
	#personsTable tr > *:nth-child(5),
	#personsTable tr > *:nth-child(6),
	#personsTable tr > *:nth-child(7),
	#personsTable tr > *:nth-child(8),
	#personsTable tr > *:nth-child(9),
	#personsTable tr > *:nth-child(10),
	#personsTable tr > *:nth-child(11),
	#personsTable tr > *:nth-child(12) {
		display: none;
	}
}


/*
 * Person Info Table
 */
#personInfoTable tbody th {
	text-align: right;
}

/*
 * Login Page
 */

#loginPage {
	background: linear-gradient(135deg, var(--color1) 0%, #7c5dc4 50%, #9b7dd4 100%);
	min-height: 100vh;
}

#loginPage nav {
	display: none;
}

#loginPage main {
	max-width: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
}

#loginPage article {
	background-color: rgba(255, 255, 255, 0.95);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px;
	margin: 24px;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	max-width: 420px;
	width: 100%;
}

#loginPage h1 {
	font-size: 32px;
	color: var(--color1);
	margin-bottom: 8px;
	text-align: center;
}

#loginPage form {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 8px;
}

#loginPage form label {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-article-text);
	margin-top: 12px;
}

#loginPage form input[type='text'],
#loginPage form input[type='password'] {
	font-size: 16px;
	padding: 12px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#loginPage form input[type='text']:focus,
#loginPage form input[type='password']:focus {
	outline: none;
	border-color: var(--color1);
	box-shadow: 0 0 0 3px rgba(93, 65, 172, 0.1);
}

#loginPage form .error {
	text-align: center;
	background-color: #fee2e2;
	color: #dc2626;
	padding: 12px;
	border-radius: 8px;
	font-size: 14px;
	margin-top: 8px;
}

#loginPage form .error:empty {
	display: none;
}

#loginPage form input[type='submit'] {
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
	margin-top: 24px;
	background: linear-gradient(135deg, var(--color1) 0%, #7c5dc4 100%);
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#loginPage form input[type='submit']:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(93, 65, 172, 0.4);
}

/* Mobile adjustments for login page */
@media only screen and (max-width: 480px) {
	#loginPage article {
		margin: 16px;
		padding: 32px 24px;
	}

	#loginPage h1 {
		font-size: 26px;
	}
}


/*
 * Home Page
 */

#aboutPage article h1 {
	margin-bottom: 12px;
}
#aboutPage article p {
	margin: auto;
	max-width: 1200px;
}

#aboutPage article table th {
	text-align: right;

}

#aboutPage article ul li {
	list-style: circle;
}

#aboutPage article a {
	color: var(--color4);
	text-decoration: none;
}

@media only screen and (max-width : 550px) {
	#aboutPage header .slideShow {
		top: -40px;
	}
}

/*
 * SQL Query Page
 */
#sqlQueryPage form {
	width: 100%;
	max-width: 1024px;
	display: flex;
	flex-direction: column;
}

.statistics {
	display: flex;
	flex-direction: column;
	gap: 48px;
	max-width: 1400px;
	margin: auto;
	padding: 0 16px;
	padding-top: calc(var(--nav-height) + 32px);
	overflow-x: hidden;
	box-sizing: border-box;
}

.statistics h1 {
	text-align: center;
	margin: 0 auto 16px;
}

.statistics h2 {
	text-align: center;
	color: var(--color1);
	font-size: 24px;
	margin: 0 0 16px 0;
}

.stat-section {
	background: #fafafa;
	border-radius: 12px;
	padding: 24px;
	box-shadow: var(--shadow-sm);
}

.statistics .graphLegend {
	display: flex;
	justify-content: center;
	gap: 24px;
	list-style: none;
	padding: 12px 20px;
	margin: 16px auto 0;
	background: white;
	border-radius: 8px;
	box-shadow: var(--shadow-sm);
}

.statistics .graphLegend li {
	font-weight: 500;
	font-size: 14px;
}

.statistics svg {
	width: 100%;
	max-width: 1200px;
	height: auto;
	min-height: 400px;
	margin: 0 auto;
	display: block;
	border: 1px solid #ddd;
	border-radius: 12px;
	background: white;
}

.stat-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
	margin-bottom: 32px;
}

.stat-card {
	background: white;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
	box-shadow: var(--shadow-sm);
}

.stat-card-number {
	font-family: 'Montserrat', sans-serif;
	font-size: 36px;
	font-weight: 700;
	color: var(--color1);
	display: block;
}

.stat-card-label {
	font-size: 14px;
	color: #666;
	margin-top: 8px;
}

@media only screen and (max-width: 768px) {
	.statistics .graphLegend {
		flex-direction: column;
		gap: 8px;
		align-items: center;
	}

	.statistics svg {
		min-height: 300px;
	}

	.stat-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}


/*
 * Footer Styles
 */
footer {
	background-color: var(--color-footer-bg);
	color: var(--color-footer-text);
	padding: 48px 32px 24px;
	margin-top: 0;
}

.footer-content {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h3 {
	font-family: 'Montserrat', 'Open Sans', sans-serif;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 16px;
	color: #a8d4ff;
}

.footer-section p {
	font-size: 14px;
	line-height: 1.6;
	opacity: 0.85;
}

.footer-section ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-section ul li {
	margin-bottom: 8px;
}

.footer-section ul li a {
	color: var(--color-footer-text);
	text-decoration: none;
	font-size: 14px;
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.footer-section ul li a:hover {
	opacity: 1;
	text-decoration: underline;
}

.footer-bottom {
	text-align: center;
	padding-top: 24px;
	font-size: 13px;
	opacity: 0.7;
}

/*
 * Hero Section Styles
 */
.hero {
	position: relative;
	background: linear-gradient(135deg, var(--color1) 0%, #3d2b7a 100%);
	color: white;
	padding: calc(var(--nav-height) + 48px) 32px 64px;
	text-align: center;
	margin-bottom: 0;
	overflow: hidden;
}

.hero::before {
	display: none;
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 800px;
	margin: 0 auto;
}

.hero h1 {
	font-family: 'Montserrat', sans-serif;
	font-size: 48px;
	font-weight: 800;
	margin-bottom: 16px;
	color: white;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
	font-size: 20px;
	opacity: 0.95;
	margin-bottom: 32px;
	line-height: 1.5;
}

.hero-stats {
	display: flex;
	justify-content: center;
	gap: 48px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.hero-stat {
	text-align: center;
}

.hero-stat-number {
	font-family: 'Montserrat', sans-serif;
	font-size: 42px;
	font-weight: 800;
	color: #ffd700;
	display: block;
}

.hero-stat-label {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.85;
}

.hero-cta {
	display: inline-block;
	background-color: #ffd700;
	color: var(--color-article-text);
	padding: 14px 32px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: var(--shadow-md);
}

.hero-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* general responsive adjustments */
@media only screen and (max-width : 1200px) {
	nav a {
		font-size: 14px;
	}
}


@media only screen and (max-width : 700px) {
	h1 {
		text-align: center;
		font-size: 26px;
	}

	h2 {
		text-align: center;
		font-size: 20px;
	}

	article {
		margin: 16px;
		padding-left: 16px;
		padding-right: 16px;
	}

	article p {
		margin: 0;
	}

	/* Make tables horizontally scrollable on mobile */
	article > table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.hero h1 {
		font-size: 28px;
	}

	.hero p {
		font-size: 15px;
		padding: 0 8px;
	}

	.hero-stats {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 16px;
		justify-content: space-around;
	}

	.hero-stat {
		flex: 1 1 80px;
		min-width: 80px;
	}

	.hero-stat-number {
		font-size: 28px;
	}

	.hero-stat-label {
		font-size: 11px;
	}

	.stat-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.stat-card {
		padding: 16px 12px;
	}

	.stat-card-number {
		font-size: 28px;
	}

	.stat-card-label {
		font-size: 12px;
	}

	.footer-content {
		grid-template-columns: 1fr;
		text-align: center;
	}
}

@media only screen and (max-width : 550px) {
	h1 {
		text-align: center;
		font-size: 22px;
	}

	h2 {
		text-align: center;
		font-size: 16px;
	}

	article {
		margin: 8px;
		padding-left: 12px;
		padding-right: 12px;
		border-radius: 12px;
	}

	/* Fix stat cards at narrow widths */
	.stat-cards {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin: 0 -4px;
	}

	.stat-card {
		padding: 12px 6px;
		min-width: 0;
		overflow: hidden;
	}

	.stat-card-number {
		font-size: 20px;
		word-break: break-all;
	}

	.stat-card-label {
		font-size: 9px;
		line-height: 1.3;
		word-wrap: break-word;
	}

	.hero {
		padding: calc(var(--nav-height) + 12px) 16px 32px;
	}

	.hero h1 {
		font-size: 18px;
		margin-bottom: 4px;
		margin-top: 0;
	}

	.hero p {
		font-size: 14px;
	}

	.hero-stat-number {
		font-size: 24px;
	}

	.statistics {
		padding: 0 8px;
		padding-top: calc(var(--nav-height) + 24px);
		gap: 32px;
	}

	.statistics h2 {
		font-size: 18px;
	}

	.stat-section {
		padding: 16px 12px;
	}

	.statistics svg {
		min-height: 250px;
	}
}

/* Very narrow screens (iPhone SE, etc.) */
@media only screen and (max-width : 400px) {
	.stat-cards {
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.stat-card {
		padding: 10px 4px;
	}

	.stat-card-number {
		font-size: 18px;
	}

	.stat-card-label {
		font-size: 8px;
	}

	.hero-stats {
		gap: 12px;
	}

	.hero-stat-number {
		font-size: 20px;
	}

	.hero-stat-label {
		font-size: 9px;
	}
}

/*
 * Statistics Page Tables - Make inline tables responsive
 */
.stat-section table {
	font-size: 14px;
}

.stat-section table th,
.stat-section table td {
	padding: 8px 12px;
}

@media only screen and (max-width: 600px) {
	.stat-section table {
		font-size: 12px;
	}
	.stat-section table th,
	.stat-section table td {
		padding: 6px 8px;
	}
}

@media only screen and (max-width: 400px) {
	.stat-section table {
		font-size: 10px;
	}
	.stat-section table th,
	.stat-section table td {
		padding: 4px 6px;
	}
}

/*
 * About Page Table Responsive
 */
@media only screen and (max-width: 600px) {
	#aboutPage article table {
		font-size: 12px;
	}
	#aboutPage article table th,
	#aboutPage article table td {
		padding: 8px 6px;
	}
}

@media only screen and (max-width: 400px) {
	#aboutPage article table {
		font-size: 10px;
	}
	#aboutPage article table th,
	#aboutPage article table td {
		padding: 6px 4px;
		display: block;
		text-align: left !important;
	}
	#aboutPage article table tr {
		display: block;
		margin-bottom: 12px;
		border-bottom: 1px solid #eee;
		padding-bottom: 12px;
	}
	#aboutPage article table th {
		font-weight: 600;
		color: var(--color1);
	}
}

