/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RANKINGS PAGES â€“ data tables, filters, pagination, cards
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Page hero (reusable) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rankings-hero {
	background: linear-gradient(135deg, var(--green-900) 0%, var(--green-600) 100%);
	color: var(--white);
	text-align: center;
	padding: 3.5rem 1rem 2.5rem;
}

.rankings-hero h1 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.rankings-hero p {
	font-size: 1.05rem;
	opacity: 0.85;
	max-width: 640px;
	margin: 0 auto;
}

/* â”€â”€ Intro / description block â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rankings-intro {
	padding: 3.75rem 1rem 1.5rem;
	color: var(--gray-700);
	line-height: 1.7;
}

.rankings-intro .section-header h2,
.rankings-intro .section-header p {
	text-align: center;
	color: var(--gray-900);
}

.rankings-intro .section-header p {
	color: var(--gray-700);
}

.rankings-intro>p {
	text-align: center;
	max-width: 900px;
	margin: 1rem auto;
}

/* â”€â”€ Overall CTA row â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.overall-cta-row {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: center;
	margin: 1.5rem auto 0;
	max-width: 900px;
	padding: 0 1rem;
}

.btn-gradient {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.6rem;
	border-radius: 6px;
	font-family: "Poppins", system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	color: var(--white);
	background: linear-gradient(135deg, var(--green-600), var(--green-500));
	transition: opacity 0.2s, transform 0.15s;
}

.btn-gradient:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

.service-banner {
	background: linear-gradient(135deg, var(--green-600), var(--green-500));
	color: var(--white);
	padding: 1.5rem 2rem;
	border-radius: 10px;
	text-align: center;
	width: 100%;
}

.service-banner p {
	margin-bottom: 0.75rem;
}

.service-banner a {
	color: var(--accent);
	font-weight: 600;
	text-decoration: underline;
}

.service-banner img {
	width: 100%;
	max-width: 220px;
	height: auto;
	margin: 0 auto 1rem;
	display: block;
}

/* â”€â”€ Filter card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.filter-card {
	background: var(--white);
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	margin: 0 auto 1.5rem;
	max-width: 1100px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

.filter-group {
	flex: 1 1 180px;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.filter-group label {
	font-family: "Poppins", system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--gray-700);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.filter-input,
.filter-select {
	padding: 0.55rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.9rem;
	font-family: inherit;
	background: var(--white);
	transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
	outline: none;
	border-color: var(--green-500);
	box-shadow: 0 0 0 3px rgba(47, 125, 77, 0.12);
}

/* â”€â”€ Table wrapper â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table-responsive {
	max-width: 1100px;
	margin: 0 auto 2rem;
	padding: 0;
	/* Removing side padding on the wrapper so edge-to-edge scroll works */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
}

.table-responsive .data-table {
	min-width: 800px;
	/* Force scroll on mobile instead of crushing columns */
}

/* â”€â”€ Table controls (entries-per-page + pagination) â”€â”€â”€â”€â”€ */
.table-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.entries-control {
	font-family: "Poppins", system-ui, sans-serif;
	font-size: 0.85rem;
	color: var(--gray-700);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.entries-control select {
	padding: 0.3rem 0.5rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.85rem;
	background: var(--white);
}

.pagination-controls {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-family: "Poppins", system-ui, sans-serif;
	font-size: 0.85rem;
}

.pagination-controls button {
	padding: 0.35rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: var(--white);
	cursor: pointer;
	font-size: 0.85rem;
	transition: background 0.15s, color 0.15s;
}

.pagination-controls button:hover:not(:disabled) {
	background: var(--green-500);
	color: var(--white);
	border-color: var(--green-500);
}

.pagination-controls button.active {
	background: var(--green-600);
	color: var(--white);
	border-color: var(--green-600);
	font-weight: 600;
}

.pagination-controls button:disabled {
	opacity: 0.4;
	cursor: default;
}

.pagination-info {
	font-size: 0.82rem;
	color: var(--gray-700);
	margin-top: 0.5rem;
	text-align: center;
}

/* â”€â”€ Data table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	white-space: nowrap;
	table-layout: fixed;
	/* Columns sized by th width; display:none on th collapses cleanly */
}


.data-table thead {
	background: var(--green-900);
	color: var(--white);
}

.data-table th {
	padding: 0.7rem 0.65rem;
	font-family: "Poppins", system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-align: left;
	position: sticky;
	top: 0;
	z-index: 1;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

/* Sort indicators via CSS — no DOM changes needed */
.data-table th[data-sort-dir]::after {
	content: '';
	display: inline-block;
	width: 0.9em;
	text-align: center;
	margin-left: 4px;
	opacity: 0.5;
	font-size: 0.75em;
	vertical-align: middle;
}

.data-table th[data-sort-dir="asc"]::after {
	content: '▲';
	opacity: 1;
}

.data-table th[data-sort-dir="desc"]::after {
	content: '▼';
	opacity: 1;
}

.data-table th.num,
.data-table td.num {
	text-align: center;
}

.data-table td {
	padding: 0.6rem 0.65rem;
	border-bottom: 1px solid #e5e7eb;
	vertical-align: middle;
	white-space: normal;
	word-wrap: break-word;
}

.data-table tbody tr:hover {
	background: rgba(47, 125, 77, 0.05);
}

.data-table tbody tr:nth-child(even) {
	background: rgba(238, 241, 238, 0.45);
}

.data-table tbody tr:nth-child(even):hover {
	background: rgba(47, 125, 77, 0.07);
}

/* hidden columns toggled by JS */
.data-table .col-hidden {
	display: none;
}

/* highlighted category column */
.data-table th.col-highlight {
	background: var(--green-500);
}

.data-table td.col-highlight-val {
	font-weight: 700;
	color: var(--green-600);
}

/* university link inside tables */
.uni-link {
	color: var(--green-600);
	text-decoration: none;
	font-weight: 600;
}

.uni-link:hover {
	text-decoration: underline;
}

.uni-location {
	display: block;
	font-size: 0.78rem;
	color: var(--gray-700);
	font-weight: 400;
	white-space: normal;
}

/* country-rank column header may wrap */
.data-table th.col-country-rank {
	white-space: normal;
	word-break: break-word;
	text-align: center;
}
.data-table td.col-country-rank {
	text-align: center;
}

/* â”€â”€ Trees badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.trees-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.65rem;
	border-radius: 20px;
	font-family: "Poppins", system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.82rem;
}

.trees-badge--gold {
	background: #fef3c7;
	color: #92400e;
}

.trees-badge--silver {
	background: #f0f0f0;
	color: #4a4a4a;
}

.trees-badge--bronze {
	background: #fde8d8;
	color: #7c3a12;
}

.trees-badge--green {
	background: #d1fae5;
	color: #065f46;
}

/* â”€â”€ Archive table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.data-table--archive th,
.data-table--archive td {
	white-space: normal;
}

.data-table--archive a {
	color: var(--green-600);
	text-decoration: none;
	font-weight: 500;
}

.data-table--archive a:hover {
	text-decoration: underline;
}

/* â”€â”€ Category cards grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	max-width: 1100px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.category-card {
	background: var(--white);
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 1.75rem 1.25rem;
	text-align: center;
	text-decoration: none;
	color: var(--gray-900);
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--green-600), var(--green-500));
	border-radius: 50%;
	color: var(--white);
}

.category-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.category-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.category-card p {
	font-size: 0.85rem;
	color: var(--gray-700);
}

/* â”€â”€ Population / Area image cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.pop-area-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	max-width: 1100px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.pop-area-card {
	background: var(--white);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: var(--gray-900);
	border: 1px solid #e5e7eb;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pop-area-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pop-area-card img {
	width: 100%;
	height: auto;
	display: block;
}

.pop-area-card .card-body {
	padding: 1.25rem;
}

.pop-area-card h3 {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.3rem;
}

.pop-area-card p {
	font-size: 0.85rem;
	color: var(--gray-700);
}

/* â”€â”€ Threshold note â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.threshold-note {
	text-align: center;
	font-size: 0.9rem;
	color: var(--gray-700);
	margin: 0.5rem auto 1.5rem;
	max-width: 1100px;
	padding: 0 1rem;
}

/* â”€â”€ Compare iframe â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.compare-iframe-wrap {
	max-width: 1100px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.compare-iframe-wrap iframe {
	width: 100%;
	height: 700px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
}

/* â”€â”€ Search standalone (trees, top50, archive) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.search-standalone {
	max-width: 1100px;
	margin: 1.5rem auto 1rem;
	padding: 0 1rem;
}

.search-standalone .filter-input {
	width: 100%;
	max-width: 360px;
}

/* â”€â”€ Responsive tweaks for ranking pages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
	.rankings-hero {
		padding: 2.5rem 1rem 2rem;
	}

	.rankings-hero h1 {
		font-size: 1.5rem;
	}

	.filter-card {
		padding: 1rem;
		margin: 0 1rem 1.5rem;
	}

	.filter-row {
		display: flex;
		flex-direction: column;
		gap: 0.75rem;
	}

	.filter-group {
		flex: 1 1 100%;
		width: 100%;
	}

	.filter-input,
	.filter-select {
		width: 100%;
	}

	.table-controls {
		flex-direction: column;
		align-items: flex-start;
		padding: 0 1rem;
		gap: 1rem;
	}

	.category-grid,
	.pop-area-cards {
		grid-template-columns: 1fr;
	}

	.compare-iframe-wrap iframe {
		height: 500px;
	}

	.data-table {
		font-size: 0.8rem;
	}

	.data-table th,
	.data-table td {
		padding: 0.6rem 0.5rem;
	}
}

/* ═══════════════════════════════════════════════════════════
   FAQ PAGE — /rankings/faq
   ═══════════════════════════════════════════════════════════ */

/* ── Hero spacing tweaks for FAQ ─────────────────────────── */
.faq-hero .page-hero-content,
.page-hero--about .page-hero-content {
	padding-top: 1rem;
}

@media (max-width: 640px) {
	.page-hero--about {
		min-height: 42vh;
		padding: 5rem 0 3rem;
	}

	.page-hero-content h1 {
		font-size: clamp(1.7rem, 6vw, 2.4rem);
		margin-bottom: 0.4rem;
	}

	.page-hero-content .hero-subtitle {
		font-size: 0.95rem;
	}
}

/* ── Page layout ─────────────────────────────────────────── */
.faq-page-section {
	padding: 4.5rem 0 5rem;
	background: #fff;
}

.faq-layout {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 3.5rem;
	align-items: start;
}

/* ── Sticky sidebar ──────────────────────────────────────── */
.faq-sidebar {
	position: sticky;
	top: 120px;
}

.faq-sidebar-title {
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--gray-700);
	margin-bottom: .75rem;
}

.faq-sidebar-nav {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: .15rem;
}

.faq-sidebar-link {
	display: block;
	padding: .5rem .85rem;
	border-radius: 6px;
	font-size: .88rem;
	color: var(--gray-700);
	text-decoration: none;
	transition: background .2s, color .2s;
	border-left: 2px solid transparent;
}

.faq-sidebar-link:hover {
	background: var(--green-100);
	color: var(--green-900);
}

.faq-sidebar-link.is-active {
	background: var(--green-100);
	color: var(--green-900);
	font-weight: 600;
	border-left-color: var(--green-600);
}

/* ── FAQ groups ──────────────────────────────────────────── */
.faq-group {
	margin-bottom: 3.5rem;
}

.faq-group-title {
	font-size: clamp(1.15rem, 2.5vw, 1.4rem);
	font-weight: 700;
	color: var(--green-900);
	margin-bottom: 1.25rem;
	padding-bottom: .75rem;
	border-bottom: 2px solid var(--green-100);
}

/* ── Accordion items ─────────────────────────────────────── */
.faq-item {
	border-bottom: 1px solid #e5e7eb;
}

.faq-q {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.1rem 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: .95rem;
	font-weight: 600;
	color: var(--gray-900);
	transition: color .2s;
	margin-left: 1rem;
}

.faq-q:hover {
	color: var(--green-600);
}

.faq-item.is-open .faq-q {
	color: var(--green-900);
}

/* ── Answer panel ────────────────────────────────────────── */
.faq-a {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .35s ease;
	margin-left: 1rem;
}

.faq-a > * {
	overflow: hidden;
}

.faq-item.is-open .faq-a {
	grid-template-rows: 1fr;
}

.faq-a p,
.faq-a ul {
	padding-bottom: 1.25rem;
	color: var(--gray-700);
	line-height: 1.75;
	font-size: .93rem;
}

.faq-a ul {
	padding-left: 1.25rem;
	padding-bottom: 1.25rem;
}

.faq-a li {
	margin-bottom: .4rem;
}

.faq-a a {
	color: var(--green-600);
	text-decoration: underline;
}

.faq-a a:hover {
	color: var(--green-900);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
	.faq-layout {
		grid-template-columns: 1fr;
	}

	.faq-sidebar {
		position: static;
		display: none;
	}
}

@media (max-width: 640px) {
	.faq-page-section {
		padding: 2.5rem 0 3.5rem;
	}

	.faq-layout {
		gap: 2rem;
	}

	.faq-group-title {
		font-size: 1.05rem;
		margin-bottom: 1rem;
		padding-bottom: .6rem;
	}

	.faq-q {
		font-size: .88rem;
		padding: .9rem 0;
	}

	.faq-a p,
	.faq-a ul {
		font-size: .88rem;
		line-height: 1.7;
	}

	.faq-group {
		margin-bottom: 2.5rem;
	}
/* ── FAQ CTA banner ──────────────────────────────────────── */
.faq-cta-section {
	background: var(--green-900);
	padding: 4rem 0;
}

.faq-cta-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}

.faq-cta-text h2 {
	font-size: clamp(1.3rem, 2.5vw, 1.8rem);
	color: #fff;
	margin-bottom: .5rem;
}

.faq-cta-text p {
	color: rgba(255, 255, 255, .8);
	line-height: 1.65;
	max-width: 480px;
}

.faq-cta-actions {
	display: flex;
	gap: 1rem;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.btn-outline-light {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, .55);
	padding: .7rem 1.5rem;
	border-radius: 6px;
	font-weight: 600;
	font-size: .9rem;
	text-decoration: none;
	transition: background .2s, border-color .2s;
}

.btn-outline-light:hover {
	background: rgba(255, 255, 255, .12);
	border-color: #fff;
}

@media (max-width: 640px) {
	.faq-cta-inner {
		flex-direction: column;
		text-align: center;
	}

	.faq-cta-actions {
		justify-content: center;
	}
}}