/*
 * AVISTA School Manager — front-end styles.
 *
 * Scoped entirely under .avista-school. No theme selectors are referenced.
 * Apple-inspired: a system font stack (renders as San Francisco on Apple
 * devices), generous whitespace, large tight headlines, soft rounded panels,
 * minimal tables. Purely presentational — the markup stays semantic and
 * crawlable, output is server-rendered, zero front-end JS.
 *
 * Units are px on purpose: Genesis sets html { font-size: 62.5% } (10px base).
 */

.avista-school {
	--ink: #1d1d1f;
	--ink-2: #6e6e73;
	--ink-3: #86868b;
	--surface: #fff;
	--panel: #f5f5f7;
	--hairline: #d2d2d7;
	--hairline-2: #e8e8ed;
	--accent: #0075c3;

	max-width: 1000px;
	margin: 48px auto;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.5;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}

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

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

/* ---- Section panel ---- */

.avista-school__section {
	background: var(--surface);
	border: 1px solid rgba(0, 0, 0, 0.04);
	border-radius: 22px;
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.05);
	padding: 48px;
	margin: 0 0 24px;
}

.avista-school__section:last-child {
	margin-bottom: 0;
}

/*
 * Heading. Large, tight, left-aligned. Overrides the theme's global H2 rule
 * (3em, centered, italic serif); the margin uses !important only because the
 * theme sets margin-bottom with !important.
 */
.avista-school__heading {
	font-family: inherit;
	font-weight: 600;
	font-style: normal;
	font-size: 30px;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var(--ink);
	text-align: left;
	margin: 0 0 28px !important;
}

/* ---- Bucket pie sections (ages, nationalities) ---- */

.avista-school__columns {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 48px;
	flex-wrap: wrap;
}

.avista-school__data {
	flex: 1 1 320px;
	max-width: 560px;
	min-width: 0;
}

.avista-school__table {
	border-collapse: collapse;
	width: 100%;
	margin: 0;
	border: none;
	font-size: 16px;
}

.avista-school__caption {
	caption-side: top;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-3);
	padding: 0 0 14px;
}

.avista-school__table thead th {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-3);
	text-align: left;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--hairline);
}

.avista-school__table thead th:last-child {
	text-align: right;
}

.avista-school__table tbody th,
.avista-school__table tbody td {
	padding: 14px 0;
	border: none;
	border-bottom: 1px solid var(--hairline-2);
}

.avista-school__table tbody th {
	font-weight: 400;
	text-align: left;
	color: var(--ink);
}

.avista-school__table tbody td {
	text-align: right;
	font-weight: 600;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.avista-school__table tbody tr:last-child th,
.avista-school__table tbody tr:last-child td {
	border-bottom: none;
}

.avista-school__summary {
	margin: 22px 0 0;
	max-width: 560px;
	font-size: 17px;
	line-height: 1.5;
	color: var(--ink-2);
}

.avista-school__chart {
	flex: 0 0 260px;
	margin: 0;
	text-align: center;
}

.avista-school__pie {
	display: block;
	width: 100%;
	max-width: 260px;
	height: auto;
	margin: 0 auto;
}

.avista-school__legend {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	text-align: left;
	font-size: 15px;
	color: var(--ink-2);
}

.avista-school__legend li {
	display: flex;
	align-items: center;
	margin: 0 0 9px;
}

.avista-school__swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-right: 11px;
	flex: none;
}

.avista-school__note {
	margin: 26px 0 0;
	font-size: 14px;
	color: var(--ink-3);
}

/* ---- Tags (languages, locations) ---- */

.avista-school__tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.avista-school__tag {
	background: var(--panel);
	border: none;
	border-radius: 980px;
	padding: 10px 20px;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
}

/* ---- Accreditations ---- */

.avista-school__accreditations {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 36px 28px;
	align-items: start;
}

.avista-school__accreditation {
	text-align: center;
}

.avista-school__accreditation-link {
	display: block;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s ease;
}

.avista-school__accreditation-link:hover {
	opacity: 0.7;
}

.avista-school__accreditation-logo {
	display: block;
	max-width: 130px;
	max-height: 64px;
	width: auto;
	margin: 0 auto 14px;
	object-fit: contain;
}

.avista-school__accreditation-name {
	display: block;
	font-weight: 500;
	font-size: 15px;
	color: var(--ink);
}

.avista-school__accreditation-desc {
	display: block;
	font-size: 13px;
	line-height: 1.45;
	color: var(--ink-3);
	margin-top: 6px;
}

/* ---- Reviews: CSS-only horizontal roller (zero JS) ---- */

.avista-school__reviews-overall {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0 0 28px;
}

.avista-school__reviews-overall strong {
	font-size: 44px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.avista-school__stars {
	display: inline-block;
	vertical-align: middle;
	height: 18px;
	width: auto;
}

.avista-school__reviews-count {
	color: var(--ink-3);
	font-size: 15px;
}

.avista-school__roller {
	list-style: none;
	margin: 0;
	padding: 2px 2px 18px;
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 2px;
	-webkit-overflow-scrolling: touch;
}

.avista-school__roller::-webkit-scrollbar {
	height: 8px;
}

.avista-school__roller::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.16);
	border-radius: 999px;
}

.avista-school__review {
	flex: 0 0 320px;
	max-width: 320px;
	scroll-snap-align: start;
	background: var(--panel);
	border: none;
	border-radius: 18px;
	padding: 24px;
}

.avista-school__review-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.avista-school__review-author {
	font-weight: 600;
	font-size: 15px;
	color: var(--ink);
	text-decoration: none;
}

.avista-school__review-when {
	font-size: 13px;
	color: var(--ink-3);
	margin: 0 0 12px;
}

.avista-school__review-text {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink);
	/* Clamp long reviews so cards stay even (CSS-only; text stays in the DOM). */
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.avista-school__reviews-source {
	margin: 16px 0 0;
	font-size: 15px;
}

.avista-school__reviews-source a {
	color: var(--accent);
}

/* ---- Responsive ---- */

@media (max-width: 767px) {
	.avista-school {
		margin: 28px auto;
		font-size: 16px;
	}

	.avista-school__section {
		padding: 28px 22px;
		border-radius: 18px;
	}

	.avista-school__heading {
		font-size: 24px;
		margin: 0 0 22px !important;
	}

	.avista-school__columns {
		display: block;
	}

	.avista-school__data {
		max-width: none;
	}

	.avista-school__chart {
		margin-top: 28px;
	}

	.avista-school__reviews-overall strong {
		font-size: 36px;
	}

	.avista-school__accreditations {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
		gap: 28px 18px;
	}

	/* Let the next review peek so the roller reads as swipeable. */
	.avista-school__review {
		flex-basis: 84%;
		max-width: 84%;
	}
}
