/*
Theme Name: HuviTERA 2026
Theme URI: https://huvitera.ee
Description: Child theme of Kadence for Erahuvikool HuviTERA. TERA 2025 brand, Gutenberg + PHP templates, no page builder.
Author: HuviTERA
Template: kadence
Version: 0.9.5
Text Domain: huvitera
*/

/* ==========================================================================
   Design tokens — TERA 2025 brand
   ========================================================================== */

:root {
	--ht-orange: #FF7300;
	--ht-orange-dark: #E56700;
	--ht-orange-55: rgba(255, 115, 0, 0.55);
	--ht-orange-30: rgba(255, 115, 0, 0.30);
	--ht-dark: #1D1D1B;
	--ht-cream: #FDF0E6;
	--ht-cream-deep: #F8E2D0;
	--ht-white: #FFFFFF;
	--ht-grey: #6B6B68;
	--ht-line: #E8DCD1;

	/*
	 * Photo overlays are solid colour plus opacity, never gradients. Header
	 * bands use this dark scrim; the orange lives on the slats and on the
	 * hero's standing panels instead.
	 */
	--ht-scrim-dark: rgba(29, 29, 27, 0.62);

	--ht-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--ht-radius: 4px;
	--ht-gap: 1.5rem;
	--ht-wrap: 1200px;

	/*
	 * Kadence's own palette, repointed at the brand. Its stylesheet colours
	 * buttons and accents from these variables — including states we do not
	 * write rules for, such as :visited, which is how a visited Gutenberg
	 * button came back in Kadence's default blue. Overriding the variables
	 * fixes every such rule at once instead of one selector at a time. Only
	 * the accent and button slots are touched; text and background slots are
	 * left alone, since the templates set those themselves.
	 */
	--global-palette1: #FF7300;
	--global-palette2: #E56700;
	--global-palette-btn-bg: #FF7300;
	--global-palette-btn-bg-hover: #E56700;
	--global-palette-btn: #FFFFFF;
	--global-palette-btn-hover: #FFFFFF;
	--global-palette-highlight: #FF7300;
	--global-palette-highlight-alt: #E56700;
	--global-palette-highlight-alt2: #FFFFFF;
}

/* ==========================================================================
   Contact strip above the header
   ========================================================================== */

.ht-topbar {
	background: var(--ht-dark);
	color: var(--ht-white);
	font-size: 0.8rem;
	line-height: 1.2;
}

.ht-topbar__inner {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding: 0.3rem 1rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.3rem 1.75rem;
}

.ht-topbar a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--ht-white);
	text-decoration: none;
}

.ht-topbar .ht-icon {
	flex: none;
	width: 14px;
	height: 14px;
	color: var(--ht-orange);
}

.ht-topbar a:hover,
.ht-topbar a:focus {
	color: var(--ht-orange);
}

/* On a phone the Facebook link keeps only its icon, so the strip fits one line. */
@media (max-width: 480px) {
	.ht-topbar__inner {
		justify-content: center;
		gap: 0.3rem 1.1rem;
	}

	.ht-topbar__fb-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* ==========================================================================
   Sticky header
   ========================================================================== */

/* The logo already says the name; drop the text title beside it. */
body.wp-custom-logo .site-title,
body.wp-custom-logo .site-description {
	display: none;
}

/*
 * A thin brand line under the menu. Drawn as a shadow rather than a border so
 * that turning it on does not nudge the sticky header's height.
 */
#masthead {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ht-white);
	box-shadow: 0 3px 0 var(--ht-orange), 0 6px 14px rgba(29, 29, 27, 0.06);
}

/* Clear the admin bar when logged in, at both of its heights. */
body.admin-bar #masthead {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #masthead {
		top: 46px;
	}
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
	font-family: var(--ht-font);
	color: var(--ht-dark);
	background: var(--ht-white);
}

h1, h2, h3, h4, h5, h6,
.entry-title {
	font-family: var(--ht-font);
	font-weight: 800;
	color: var(--ht-dark);
	letter-spacing: -0.01em;
}

a {
	color: var(--ht-orange);
}

a:hover,
a:focus {
	color: var(--ht-orange-dark);
}

.ht-wrap {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding-inline: 1rem;
}

/* Full-bleed section, content constrained in the middle. */
.ht-section {
	padding-block: clamp(2.5rem, 6vw, 5rem);
}

.ht-section--cream {
	background: var(--ht-cream);
}

.ht-section > * {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding-inline: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ht-btn {
	display: inline-block;
	padding: 0.9rem 2rem;
	background: var(--ht-orange);
	color: var(--ht-white);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	border-radius: var(--ht-radius);
	transition: background 0.15s ease;
}

.ht-btn:hover,
.ht-btn:focus {
	background: var(--ht-orange-dark);
	color: var(--ht-white);
}

.ht-btn--ghost {
	background: transparent;
	color: var(--ht-dark);
	box-shadow: inset 0 0 0 2px var(--ht-dark);
}

.ht-btn--ghost:hover,
.ht-btn--ghost:focus {
	background: var(--ht-dark);
	color: var(--ht-white);
}

/* ==========================================================================
   Diamond (TERA romb) — rotated square photo tile with offset accent layers
   ========================================================================== */

.ht-diamond {
	position: relative;
	width: var(--ht-d, 200px);
	aspect-ratio: 1;
	transform: rotate(45deg);
	overflow: hidden;
	border-radius: 2px;
	background: var(--ht-cream-deep);
}

.ht-diamond img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Counter-rotate and scale by √2 so the photo fills the rotated frame. */
	transform: rotate(-45deg) scale(1.42);
}

/* Flat accent diamonds that sit behind the photos, as in the brand artwork. */
.ht-diamond--accent {
	background: var(--ht-orange-55);
}

.ht-diamond--accent-soft {
	background: var(--ht-orange-30);
}

/* ==========================================================================
   Gallery — "Fotosid ringitööst"
   ========================================================================== */

/*
 * Five across, one page at a time. The track is moved with a transform rather
 * than by scrolling the box: paging then behaves identically everywhere and
 * does not depend on programmatic scrollLeft, which some engines ignore.
 */
.ht-gallery {
	--ht-gal-gap: 0.75rem;
	--ht-per-page: 5;
	overflow: hidden;
	touch-action: pan-y;
}

.ht-gallery__track {
	display: flex;
	gap: var(--ht-gal-gap);
	transition: transform 0.35s ease;
	will-change: transform;
}

.ht-gallery:focus-visible {
	outline: 2px solid var(--ht-orange);
	outline-offset: 4px;
}

@media (max-width: 900px) {
	.ht-gallery { --ht-per-page: 3; }
}

@media (max-width: 600px) {
	.ht-gallery { --ht-per-page: 2; }
}

.ht-gallery__item {
	margin: 0;
	flex: 0 0 calc((100% - (var(--ht-per-page) - 1) * var(--ht-gal-gap)) / var(--ht-per-page));
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--ht-radius);
	background: var(--ht-cream-deep);
}

/* ---- arrows ---- */

.ht-gallery-wrap {
	position: relative;
}

.ht-gallery__arrow {
	position: absolute;
	top: 50%;
	translate: 0 -50%;
	z-index: 2;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--ht-dark);
	background: var(--ht-white);
	border: 1px solid var(--ht-line);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(29, 29, 27, 0.12);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.ht-gallery__arrow:hover:not(:disabled) {
	background: var(--ht-orange);
	border-color: var(--ht-orange);
	color: var(--ht-white);
}

.ht-gallery__arrow:disabled {
	opacity: 0;
	pointer-events: none;
}

.ht-gallery__arrow--prev {
	left: -14px;
}

.ht-gallery__arrow--next {
	right: -14px;
}

@media (max-width: 720px) {
	.ht-gallery__arrow--prev { left: 2px; }
	.ht-gallery__arrow--next { right: 2px; }
}

/* ---- drag ---- */

.ht-gallery {
	cursor: grab;
}

.ht-gallery.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.ht-gallery.is-dragging .ht-gallery__track {
	transition: none;
}

/*
 * Over a photo the cursor says "open", not "grab" — the grab hand made the
 * pictures look as if they could only be dragged. A small magnifier badge on
 * hover says the same to anyone who does not notice the cursor.
 */
.ht-gallery__item a {
	position: relative;
	display: block;
	height: 100%;
	cursor: zoom-in;
}

.ht-gallery.is-dragging .ht-gallery__item a {
	cursor: grabbing;
}

.ht-gallery__item a::after {
	content: "";
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--ht-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14M7 5v4M5 7h4'/%3E%3C/svg%3E") center / 1rem no-repeat;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ht-gallery__item a:hover::after,
.ht-gallery__item a:focus-visible::after {
	opacity: 1;
	transform: scale(1);
}

/* Touch screens have no hover: keep the badge visible there. */
@media (hover: none) {
	.ht-gallery__item a::after {
		opacity: 0.9;
		transform: none;
	}
}

.ht-gallery__dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.ht-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ht-cream-deep);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.ht-dot[aria-current="true"] {
	background: var(--ht-orange);
	transform: scale(1.25);
}

.ht-dot:hover {
	background: var(--ht-orange);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

body.ht-lightbox-open {
	overflow: hidden;
}

.ht-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(0.5rem, 2vw, 1.5rem);
	padding: clamp(1rem, 4vw, 3rem);
	background: rgba(29, 29, 27, 0.92);
}

.ht-lightbox[hidden] {
	display: none;
}

.ht-lightbox__stage {
	margin: 0;
	display: grid;
	justify-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.ht-lightbox__stage img {
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	border-radius: var(--ht-radius);
	background: var(--ht-dark);
}

.ht-lightbox__count {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9rem;
}

.ht-lightbox__nav,
.ht-lightbox__close {
	display: grid;
	place-items: center;
	color: var(--ht-white);
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ht-lightbox__nav {
	width: 52px;
	height: 52px;
	font-size: 2rem;
	line-height: 1;
}

.ht-lightbox__close {
	position: absolute;
	top: clamp(0.75rem, 2vw, 1.5rem);
	right: clamp(0.75rem, 2vw, 1.5rem);
	width: 44px;
	height: 44px;
	font-size: 1.6rem;
	line-height: 1;
}

.ht-lightbox__nav:hover,
.ht-lightbox__close:hover {
	background: var(--ht-orange);
}

.ht-lightbox__nav:focus-visible,
.ht-lightbox__close:focus-visible {
	outline: 2px solid var(--ht-orange);
	outline-offset: 3px;
}

.ht-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.ht-gallery__item:hover img {
	transform: scale(1.04);
}

/* ==========================================================================
   Two-column panel row
   ========================================================================== */

.ht-twocol {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
}

/* Two blocks side by side, stacking below the tablet breakpoint. */
.ht-splitcols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 860px) {
	.ht-splitcols {
		grid-template-columns: 1fr 1fr;
	}
}

.ht-splitcols .ht-panel + .ht-panel {
	margin-top: 1rem;
}

.ht-panel-more {
	margin-top: 1.25rem;
}

/* Placeholder for a field the school has not filled in yet. */
.ht-panel__empty {
	margin: 0;
	color: var(--ht-grey);
	opacity: 0.6;
}

/* ==========================================================================
   Testimonials — one quote at a time, paged with arrows
   ========================================================================== */

/* Without JavaScript: the quotes stack. */
.ht-quotes__track {
	display: grid;
	gap: 1rem;
}

.ht-quotes .ht-quote {
	background: var(--ht-white);
}

.ht-quotes.is-enhanced .ht-quotes__viewport {
	overflow: hidden;
	transition: height 0.3s ease;
}

.ht-quotes.is-enhanced .ht-quotes__track {
	display: flex;
	align-items: flex-start;
	gap: 0;
	transition: transform 0.35s ease;
}

.ht-quotes.is-enhanced .ht-quote {
	flex: 0 0 100%;
}

.ht-quotes:focus-visible {
	outline: 2px solid var(--ht-orange);
	outline-offset: 4px;
}

.ht-quotes__nav {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.9rem;
}

.ht-quotes__arrow {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--ht-white);
	background: var(--ht-orange);
	border: 0;
	border-radius: var(--ht-radius);
	cursor: pointer;
}

.ht-quotes__arrow:hover,
.ht-quotes__arrow:focus-visible {
	background: var(--ht-orange-dark);
}

.ht-quotes__arrow:disabled {
	background: var(--ht-cream-deep);
	color: var(--ht-grey);
	cursor: default;
}

/* Dots rather than "2 / 3": shorter, and it fits a narrow column. */
.ht-quotes__dots {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ht-quotes__dot {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.ht-quotes.is-enhanced .ht-quotes__viewport,
	.ht-quotes.is-enhanced .ht-quotes__track {
		transition: none;
	}
}

/* ==========================================================================
   Teachers beside the schedule on a single huviring
   ========================================================================== */

.ht-teacher-mini {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

/* Hugs its photo and name: stretched to the column it looked half empty. */
.ht-teacher-mini__item {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: fit-content;
	max-width: 100%;
	padding: 0.75rem 1.25rem 0.75rem 0.75rem;
	background: var(--ht-white);
	border-radius: var(--ht-radius);
}

.ht-teacher-mini__photo {
	position: relative;
	flex: none;
	width: 96px;
	height: 96px;
	overflow: hidden;
	border-radius: var(--ht-radius);
	background: var(--ht-dark);
}

.ht-teacher-mini__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ht-teacher-mini__initials {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-weight: 800;
	color: var(--ht-white);
}

.ht-teacher-mini__text {
	display: grid;
	gap: 0.15rem;
}

.ht-teacher-mini__name {
	font-weight: 800;
	color: var(--ht-dark);
	text-decoration: none;
}

a.ht-teacher-mini__name:hover,
a.ht-teacher-mini__name:focus {
	color: var(--ht-orange);
}

/* ==========================================================================
   Times, teacher and feedback — three short blocks on a single huviring
   ========================================================================== */

/*
 * Three columns where they fit, two when they do not, one on a phone. Each
 * block is short, so the row stays shallow instead of one tall column of
 * panels beside another.
 */
.ht-huviring__meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 2rem;
	align-items: start;
}

.ht-huviring__meta .ht-section__title {
	font-size: 1.3rem;
	margin-bottom: 1rem;
}

/* --- the times, read from the timetable --- */

.ht-times {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.6rem;
}

.ht-times__item {
	padding: 0.7rem 0.9rem;
	background: var(--ht-white);
	border-left: 3px solid var(--ht-orange);
	border-radius: var(--ht-radius);
}

.ht-times__when {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-weight: 800;
}

.ht-times__clock {
	font-variant-numeric: tabular-nums;
}

.ht-times__group {
	padding: 0.05rem 0.4rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: var(--ht-grey);
	background: var(--ht-cream);
	border-radius: 2px;
}

.ht-times__where {
	margin: 0.2rem 0 0;
	font-size: 0.9rem;
	color: var(--ht-grey);
}

.ht-when__text p:last-child {
	margin-bottom: 0;
}

.ht-when__more {
	margin: 1rem 0 0;
}

.ht-btn--sm {
	padding: 0.5rem 1.1rem;
	font-size: 0.9rem;
}

.ht-huviring__oppekava {
	margin-top: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ht-why__cta {
	align-self: center;
	text-align: center;
}

/*
 * The logo formation: four diamonds placed top, left, right and bottom inside
 * a square, so the group itself reads as one larger diamond.
 */
/*
 * Neighbouring diamonds face each other across a 45° edge; the gap between
 * them is (size − d) / √2 − d. At 0.47 they overlapped and the four photos
 * merged into one collage; 0.39 leaves a gap of about 4 % of the size, as in
 * the logo.
 */
.ht-cluster {
	--ht-size: clamp(280px, 38vw, 460px);
	--ht-d: calc(var(--ht-size) * 0.39);
	position: relative;
	width: var(--ht-size);
	aspect-ratio: 1;
	margin-inline: auto;
}

/* A dark edge so the four photos read as four tiles, not one picture. */
.ht-cluster .ht-diamond {
	position: absolute;
	width: var(--ht-d);
	box-sizing: border-box;
	border: 2px solid var(--ht-dark);
}

.ht-cluster .ht-diamond:nth-child(1) {
	top: 0;
	left: 50%;
	margin-left: calc(var(--ht-d) / -2);
}

.ht-cluster .ht-diamond:nth-child(2) {
	left: 0;
	top: 50%;
	margin-top: calc(var(--ht-d) / -2);
}

.ht-cluster .ht-diamond:nth-child(3) {
	right: 0;
	top: 50%;
	margin-top: calc(var(--ht-d) / -2);
}

.ht-cluster .ht-diamond:nth-child(4) {
	bottom: 0;
	left: 50%;
	margin-left: calc(var(--ht-d) / -2);
}

/* ==========================================================================
   Cards — huviring / õpetaja listings
   ========================================================================== */

.ht-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	/* Every row the same height, so the whole grid lines up, not just each row. */
	grid-auto-rows: 1fr;
	gap: var(--ht-gap);
}

.ht-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--ht-white);
	border: 1px solid var(--ht-line);
	border-radius: var(--ht-radius);
	overflow: hidden;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* A quiet lift: with twenty cards on the archive a strong hover is restless. */
.ht-card:hover {
	border-color: var(--ht-cream-deep);
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(29, 29, 27, 0.06);
}

/*
 * Fixed ratio, so a portrait photo cannot make one card taller than its
 * neighbours. The body then stretches to fill whatever height the row needs.
 */
.ht-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--ht-cream-deep);
	flex: 0 0 auto;
}

/*
 * Absolutely positioned, so the container's aspect-ratio decides the height.
 * Left in flow the image's own proportions win and every card's photo ends up
 * a different height.
 */
.ht-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ht-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.1rem 1.2rem 1.3rem;
}

.ht-card__title {
	margin: 0 0 0.75rem;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.25;
	/* Two lines maximum, so one long name cannot stretch the whole grid. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Facts sit at the bottom of the card, above a hairline, icons aligned. */
.ht-card__facts {
	margin: auto 0 0;
	padding: 0.9rem 0 0;
	list-style: none;
	border-top: 1px solid var(--ht-line);
	display: grid;
	gap: 0.35rem;
}

.ht-card__facts li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.88rem;
	color: var(--ht-grey);
	line-height: 1.35;
}

.ht-card__facts .ht-icon {
	flex: 0 0 auto;
	margin-top: 0.1rem;
	color: var(--ht-orange);
}

/* The whole card is clickable via a stretched link — no plugin needed. */
.ht-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ht-card__link {
	color: inherit;
	text-decoration: none;
}

.ht-meta {
	font-size: 0.9rem;
	color: var(--ht-grey);
}

/* ==========================================================================
   Teachers — square portraits
   ========================================================================== */

.ht-teachers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 2.5rem 1.5rem;
}

.ht-teacher {
	position: relative;
	text-align: center;
}

.ht-teacher__portrait {
	--ht-d: clamp(140px, 16vw, 180px);
	position: relative;
	width: var(--ht-d);
	aspect-ratio: 1;
	margin: 0 auto 1.2rem;
	overflow: hidden;
	border-radius: var(--ht-radius);
	background: var(--ht-cream);
}

.ht-teacher__portrait img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.ht-teacher--linked:hover .ht-teacher__portrait img {
	transform: scale(1.04);
}

/* Initials stand in for a missing portrait. */
.ht-teacher__initials {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: calc(var(--ht-d, 150px) * 0.30);
	font-weight: 800;
	color: var(--ht-white);
	background: var(--ht-dark);
	letter-spacing: 0.02em;
}

.ht-teacher__name {
	margin: 0 0 0.2rem;
	font-size: 1.15rem;
	font-weight: 800;
}

.ht-teacher__name a {
	color: inherit;
	text-decoration: none;
}

.ht-teacher--linked:hover .ht-teacher__name a {
	color: var(--ht-orange);
}

.ht-teacher__role {
	margin: 0 0 0.4rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ht-orange);
}

.ht-teacher__rings {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ht-grey);
	line-height: 1.5;
}

/* ==========================================================================
   Taxonomy filter bar — replaces JetSmartFilters
   ========================================================================== */

.ht-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.ht-filter {
	padding: 0.42rem 0.8rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ht-dark);
	background: var(--ht-white);
	border: 1px solid var(--ht-line);
	border-radius: 2px;
	cursor: pointer;
}

.ht-filter[aria-pressed="true"] {
	background: var(--ht-orange);
	border-color: var(--ht-orange);
	color: var(--ht-white);
}

/* ==========================================================================
   Tabs — replaces Essential Addons
   ========================================================================== */

.ht-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	border-bottom: 2px solid var(--ht-line);
	margin-bottom: 1.5rem;
}

.ht-tabs__tab {
	padding: 0.7rem 1.2rem;
	font-weight: 700;
	color: var(--ht-grey);
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
}

.ht-tabs__tab[aria-selected="true"] {
	color: var(--ht-dark);
	border-bottom-color: var(--ht-orange);
}

.ht-tabs__panel[hidden] {
	display: none;
}

/* ==========================================================================
   Fact box — asukoht / vanusegrupp / õppetasu on the single huviring
   ========================================================================== */

.ht-facts {
	background: var(--ht-cream);
	border-radius: var(--ht-radius);
	padding: 1.5rem;
}

.ht-facts dt {
	font-weight: 800;
	margin-top: 1rem;
}

.ht-facts dt:first-child {
	margin-top: 0;
}

.ht-facts dd {
	margin: 0.2rem 0 0;
}

/* ==========================================================================
   Slats — the row of uneven orange bars along the bottom of a photo band
   ========================================================================== */

.ht-slats {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	align-items: flex-end;
	pointer-events: none;
}

.ht-slats span {
	flex: 1 1 0;
	background: var(--ht-orange);
}

/*
 * Mixed heights and opacities, not a sequence. Each value is picked so no two
 * neighbours match.
 */
.ht-slats span:nth-child(1) { height: 22px; opacity: 0.85; }
.ht-slats span:nth-child(2) { height: 44px; opacity: 0.40; }
.ht-slats span:nth-child(3) { height: 14px; opacity: 1; }
.ht-slats span:nth-child(4) { height: 58px; opacity: 0.55; }
.ht-slats span:nth-child(5) { height: 30px; opacity: 0.25; }
.ht-slats span:nth-child(6) { height: 48px; opacity: 0.90; }
.ht-slats span:nth-child(7) { height: 20px; opacity: 0.50; }

@media (max-width: 720px) {
	.ht-slats span:nth-child(1) { height: 14px; }
	.ht-slats span:nth-child(2) { height: 26px; }
	.ht-slats span:nth-child(3) { height: 10px; }
	.ht-slats span:nth-child(4) { height: 34px; }
	.ht-slats span:nth-child(5) { height: 18px; }
	.ht-slats span:nth-child(6) { height: 28px; }
	.ht-slats span:nth-child(7) { height: 12px; }
}

/* ==========================================================================
   Front page hero — one photo under a dark scrim
   ========================================================================== */

.ht-hero {
	position: relative;
	display: grid;
	place-items: center;
	min-height: min(78vh, 680px);
	padding: clamp(3rem, 8vw, 6rem) 1rem clamp(4rem, 9vw, 7rem);
	overflow: hidden;
	background: var(--ht-dark) center / cover no-repeat;
}

/* Dark scrim, the same family as the page header bands. */
.ht-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(29, 29, 27, 0.67);
	z-index: 1;
}

/* The same row of orange slats as the page headers, along the bottom edge. */
.ht-hero .ht-slats {
	align-self: end;
	justify-self: stretch;
}

.ht-hero__content {
	position: relative;
	z-index: 4;
	max-width: 46rem;
	text-align: center;
	color: var(--ht-white);
	text-shadow: 0 2px 14px rgba(29, 29, 27, 0.5);
}

.ht-hero__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ht-hero__title {
	margin: 0 0 0.75rem;
	font-size: clamp(2.25rem, 6vw, 4rem);
	line-height: 1.05;
	color: var(--ht-white);
}

.ht-hero__sub {
	margin: 0 0 2rem;
	font-size: clamp(1.1rem, 2.4vw, 1.5rem);
	font-weight: 600;
}

.ht-hero__actions {
	margin: 0;
}

/* ==========================================================================
   Stats band
   ========================================================================== */

.ht-statsband {
	background: var(--ht-dark);
	color: var(--ht-white);
	padding: 1.75rem 1rem;
}

.ht-statsband__list {
	max-width: var(--ht-wrap);
	/* The theme's default ul margin-bottom would push the row off centre. */
	margin: 0 auto;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1.25rem;
	text-align: center;
	align-items: stretch;
}

/*
 * Each cell centres its own content, so a label that wraps to two lines does
 * not push its number off the line its neighbours sit on.
 */
.ht-statsband__list li {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.15rem;
}

.ht-statsband__list strong {
	display: block;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	font-weight: 800;
	color: var(--ht-orange);
	line-height: 1.15;
}

.ht-statsband__list span {
	font-size: 0.95rem;
	line-height: 1.35;
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.ht-section__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin: 0 0 0.5rem;
}

.ht-section__lead {
	margin: 0 0 2rem;
	color: var(--ht-grey);
	font-size: 1.05rem;
}

.ht-section__more {
	margin-top: 2rem;
	text-align: center;
}

/* ==========================================================================
   Valdkond tiles — each its own photo, same wash as the hero
   ========================================================================== */

/*
 * A mosaic rather than a plain row: one large lead tile, two wide ones beside
 * it and a band of three below. With six terms the rows fill exactly; a
 * seventh spans the full width as a closing strip.
 */
.ht-valdkonnad {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-rows: 150px;
	gap: 0.85rem;
}

.ht-valdkond:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.ht-valdkond:nth-child(2) { grid-column: span 3; }
.ht-valdkond:nth-child(3) { grid-column: span 3; }
.ht-valdkond:nth-child(4) { grid-column: span 2; }
.ht-valdkond:nth-child(5) { grid-column: span 2; }
.ht-valdkond:nth-child(6) { grid-column: span 2; }
.ht-valdkond:nth-child(n + 7) { grid-column: span 6; }

/* The lead tile carries more weight. */
.ht-valdkond:nth-child(1) .ht-valdkond__name {
	font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

@media (max-width: 900px) {
	.ht-valdkonnad {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 135px;
	}

	.ht-valdkond:nth-child(1) { grid-column: span 2; grid-row: span 1; }
	.ht-valdkond:nth-child(2),
	.ht-valdkond:nth-child(3),
	.ht-valdkond:nth-child(4),
	.ht-valdkond:nth-child(5),
	.ht-valdkond:nth-child(6) { grid-column: span 1; }
	.ht-valdkond:nth-child(n + 7) { grid-column: span 2; }

	/*
	 * The lead tile takes a full row, the rest pair up. With an even number of
	 * tiles the last one would stand alone beside an empty cell; let it take
	 * the whole row instead.
	 */
	.ht-valdkond:last-child:nth-child(even) { grid-column: span 2; }
}

.ht-valdkond {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.25rem;
	border-radius: var(--ht-radius);
	overflow: hidden;
	background-color: var(--ht-dark);
	background-size: cover;
	background-position: center;
	color: var(--ht-white);
	text-decoration: none;
}

.ht-valdkond::before,
.ht-valdkond::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* A plain dark-grey layer: the photographs keep their own colours. */
.ht-valdkond::before {
	background: rgba(29, 29, 27, 0.45);
	transition: background-color 0.2s ease;
}

/* Hover deepens the same layer. */
.ht-valdkond:hover::before,
.ht-valdkond:focus::before {
	background: rgba(29, 29, 27, 0.62);
}

.ht-valdkond::after {
	content: none;
}

.ht-valdkond__name,
.ht-valdkond__count {
	position: relative;
	z-index: 1;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.ht-valdkond__name {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.25;
}

.ht-valdkond__count {
	font-size: 0.85rem;
	opacity: 0.85;
}

/* ==========================================================================
   Why choose us
   ========================================================================== */

.ht-why__inner {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding-inline: 1rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: center;
}

@media (min-width: 900px) {
	.ht-why__inner {
		grid-template-columns: 1fr 1fr;
	}
}

.ht-why__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ht-why__list li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 1rem;
	font-size: 1.05rem;
}

/* A small TERA diamond instead of a bullet. */
.ht-why__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 0.7rem;
	height: 0.7rem;
	background: var(--ht-orange);
	transform: rotate(45deg);
}

/* ==========================================================================
   Closing call to action
   ========================================================================== */

.ht-cta {
	background: var(--ht-orange);
	color: var(--ht-white);
	padding: clamp(2.5rem, 6vw, 4rem) 1rem;
	text-align: center;
}

.ht-cta__inner {
	max-width: 44rem;
	margin-inline: auto;
}

.ht-cta h2 {
	color: var(--ht-white);
	font-size: clamp(1.6rem, 4vw, 2.25rem);
	margin: 0 0 0.5rem;
}

.ht-cta p {
	margin: 0 0 1.75rem;
	font-size: 1.05rem;
}

.ht-btn--lg {
	padding: 1.05rem 2.4rem;
	font-size: 1.1rem;
}

.ht-btn--onorange {
	background: var(--ht-white);
	color: var(--ht-dark);
}

.ht-btn--onorange:hover,
.ht-btn--onorange:focus {
	background: var(--ht-dark);
	color: var(--ht-white);
}

/* ==========================================================================
   Archive head, filter rows, results
   ========================================================================== */

.ht-pagehead {
	position: relative;
	background: var(--ht-cream);
	padding: clamp(2.5rem, 6vw, 4rem) 1rem;
	overflow: hidden;
}

/* Photo variant: wide, low, dark-scrimmed, slats along the bottom. */
.ht-pagehead--photo {
	background-color: var(--ht-dark);
	background-size: cover;
	background-position: center;
	padding: clamp(3.5rem, 8vw, 6rem) 1rem clamp(4.5rem, 8vw, 6rem);
	text-align: center;
}

/* Taller band for the single huviring, where the cover photo is the subject. */
.ht-pagehead--tall {
	min-height: min(52vh, 460px);
	display: grid;
	align-content: center;
	padding-block: clamp(4.5rem, 10vw, 7.5rem) clamp(5rem, 9vw, 7rem);
}

.ht-pagehead--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ht-scrim-dark);
}

.ht-pagehead__inner {
	position: relative;
	z-index: 2;
	max-width: var(--ht-wrap);
	margin-inline: auto;
}

.ht-pagehead .entry-title {
	font-size: clamp(2rem, 5vw, 3rem);
	margin: 0 0 0.5rem;
}

.ht-pagehead--photo .entry-title {
	color: var(--ht-white);
}

.ht-pagehead__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ht-pagehead--photo .ht-pagehead__eyebrow,
.ht-pagehead--photo .ht-pagehead__lead {
	color: rgba(255, 255, 255, 0.9);
}

.ht-pagehead__lead {
	margin: 0;
	color: var(--ht-grey);
	font-size: 1.05rem;
}

.ht-pagehead--photo .ht-pagehead__lead {
	max-width: 44rem;
	margin-inline: auto;
}

.ht-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.6rem;
}

.ht-filters__label {
	flex: 0 0 4rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ht-grey);
}

a.ht-filter {
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.ht-filter:hover {
	border-color: var(--ht-orange);
	color: var(--ht-orange);
}

a.ht-filter[aria-pressed="true"]:hover {
	color: var(--ht-white);
}

.ht-resultcount {
	margin: 1.5rem 0;
	color: var(--ht-grey);
}

.ht-empty {
	padding: 2.5rem 1rem;
	text-align: center;
	color: var(--ht-grey);
	background: var(--ht-cream);
	border-radius: var(--ht-radius);
}

.ht-card[hidden] {
	display: none;
}

.ht-meta--muted {
	opacity: 0.75;
}

/* ==========================================================================
   Page body — one readable column for Gutenberg content
   ========================================================================== */

.ht-prose {
	max-width: 46rem;
	font-size: 1.05rem;
	line-height: 1.7;
}

.ht-prose > * + * {
	margin-top: 1.1rem;
}

.ht-prose h2 {
	margin-top: 2.5rem;
	font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.ht-prose h3 {
	margin-top: 2rem;
	font-size: 1.2rem;
}

.ht-prose ul {
	padding-left: 0;
	list-style: none;
}

.ht-prose ul li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.6rem;
}

/* The brand diamond doubles as the bullet. */
.ht-prose ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--ht-orange);
	transform: rotate(45deg);
}

.ht-prose ol {
	padding-left: 1.3rem;
}

.ht-prose ol li {
	margin-bottom: 0.6rem;
}

/* Wide blocks (columns, embeds) may break out of the reading measure. */
.ht-prose .alignwide,
.ht-prose .wp-block-columns,
.ht-prose .wp-block-embed,
.ht-prose iframe {
	max-width: none;
	width: 100%;
}

.ht-prose .wp-block-columns {
	gap: 1.5rem;
}

/* ==========================================================================
   Timetable — location tabs, weekday chips, search
   ========================================================================== */

/* A page that carries the timetable gets a wider wrap than a text page. */
.ht-section--wide > * {
	max-width: 1440px;
}

/*
 * The wide page is full width so the tables and the two-column intro can use
 * it; running text is still held to a measure you can read, one block at a time.
 */
.ht-prose--wide {
	max-width: none;
}

/*
 * Roomy: running text keeps the ordinary reading measure, but pictures,
 * columns and photo strips use the whole wrap. Without this a page built from
 * text-and-photo columns squeezes both into 46rem and the photos come out tiny.
 */
.ht-prose--roomy {
	max-width: none;
}

.ht-prose--roomy > p,
.ht-prose--roomy > h2,
.ht-prose--roomy > h3,
.ht-prose--roomy > h4,
.ht-prose--roomy > ul,
.ht-prose--roomy > ol,
.ht-prose--roomy > blockquote {
	max-width: 46rem;
}

.ht-prose--wide > p,
.ht-prose--wide > h2,
.ht-prose--wide > h3,
.ht-prose--wide > ul,
.ht-prose--wide > ol {
	max-width: 72rem;
}

/* The tables themselves use the whole wrap. */
.ht-prose .ht-schedule {
	max-width: none;
	margin-top: 3rem;
}

.ht-schedule__panel[hidden],
.ht-schedule__day[hidden],
.ht-schedule__table tr[hidden],
.ht-schedule__count[hidden] {
	display: none;
}

/* With JavaScript the active tab already names the location. */
.ht-schedule.is-enhanced .ht-schedule__title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.ht-schedule__bar {
	margin-bottom: 1.75rem;
}

.ht-schedule__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	border-bottom: 2px solid var(--ht-line);
}

.ht-schedule__tab {
	padding: 0.7rem 1.1rem;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ht-grey);
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
}

.ht-schedule__tab:hover {
	color: var(--ht-dark);
}

.ht-schedule__tab[aria-selected="true"] {
	color: var(--ht-dark);
	border-bottom-color: var(--ht-orange);
}

.ht-schedule__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 1.25rem;
}

.ht-schedule__label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ht-grey);
	margin-bottom: 0.25rem;
}

.ht-schedule__search input {
	width: min(22rem, 100%);
	padding: 0.5rem 0.75rem;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--ht-dark);
	background: var(--ht-white);
	border: 1px solid var(--ht-line);
	border-radius: 2px;
}

.ht-schedule__search input:focus {
	outline: 2px solid var(--ht-orange);
	outline-offset: 1px;
}

.ht-schedule__days {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-self: flex-end;
}

.ht-schedule__count {
	margin: 0.9rem 0 0;
	font-size: 0.9rem;
	color: var(--ht-grey);
}

/* --- the tables themselves --- */

.ht-schedule__day + .ht-schedule__day {
	margin-top: 2.25rem;
}

.ht-schedule__day h3 {
	position: relative;
	margin: 0 0 0.75rem;
	padding-left: 1.4rem;
	font-size: 1.15rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* The brand diamond marks the day. */
.ht-schedule__day h3::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 0.55rem;
	height: 0.55rem;
	background: var(--ht-orange);
	transform: rotate(45deg);
}

.ht-schedule__scroll {
	overflow-x: auto;
}

.ht-schedule__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.ht-schedule__table th {
	padding: 0.6rem 0.8rem;
	text-align: left;
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ht-white);
	background: var(--ht-dark);
	border: 0;
}

.ht-schedule__table td {
	padding: 0.65rem 0.8rem;
	border: 0;
	border-bottom: 1px solid var(--ht-line);
	vertical-align: top;
}

.ht-schedule__table tbody tr:nth-child(odd) {
	background: var(--ht-cream);
}

.ht-schedule__time {
	white-space: nowrap;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ht-schedule__ring {
	color: var(--ht-dark);
	text-decoration-color: var(--ht-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

.ht-schedule__ring:hover,
.ht-schedule__ring:focus {
	color: var(--ht-orange-dark);
}

/* Status set in front of the ring name: "RÜHM TÄIS!", "Ootab osalejaid!". */
.ht-tag {
	display: inline-block;
	padding: 0.1rem 0.45rem;
	margin-right: 0.15rem;
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
	border-radius: 2px;
	vertical-align: 0.1em;
}

.ht-tag--full {
	background: var(--ht-dark);
	color: var(--ht-white);
}

.ht-tag--open {
	background: var(--ht-orange);
	color: var(--ht-white);
}

/*
 * Between a phone and a desktop the four columns still fit, but only just:
 * ring names and room names wrap onto two lines. Tighten the type and the
 * padding there rather than drop to cards, which would cost the overview.
 */
@media (min-width: 721px) and (max-width: 1000px) {
	.ht-schedule__table {
		font-size: 0.875rem;
	}

	.ht-schedule__table th,
	.ht-schedule__table td {
		padding-inline: 0.5rem;
	}
}

/*
 * On a phone each lesson becomes a small card labelled from the column names,
 * so nobody has to turn the handset sideways to read the timetable.
 */
@media (max-width: 720px) {
	.ht-schedule__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}

	/*
	 * A table sized by its own content would stay as wide as the widest cell
	 * and scroll sideways; as blocks it takes the width it is given.
	 */
	.ht-schedule__table,
	.ht-schedule__table tbody {
		display: block;
		width: 100%;
	}

	.ht-schedule__table tbody tr {
		display: block;
		padding: 0.8rem;
		margin-bottom: 0.6rem;
		background: var(--ht-white);
		border: 1px solid var(--ht-line);
		border-radius: var(--ht-radius);
	}

	.ht-schedule__table tbody tr:nth-child(odd) {
		background: var(--ht-cream);
	}

	.ht-schedule__table td {
		display: flex;
		gap: 0.6rem;
		padding: 0.15rem 0;
		border: 0;
		overflow-wrap: anywhere;
	}

	.ht-schedule__table td:empty {
		display: none;
	}

	.ht-schedule__table td::before {
		content: attr(data-label);
		flex: 0 0 4.75rem;
		font-size: 0.72rem;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--ht-grey);
		padding-top: 0.25em;
	}

	.ht-schedule__tools {
		display: block;
	}

	.ht-schedule__days {
		margin-top: 0.9rem;
	}
}

/* ==========================================================================
   Photos inside page content
   ========================================================================== */

.ht-prose figure.wp-block-image {
	margin: 0;
}

.ht-prose .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ht-radius);
}

/*
 * A row of photos breaking one section from the next. The pictures come in
 * different shapes, so they are cropped to one ratio rather than left to set
 * their own heights.
 */
.ht-photostrip {
	margin-block: 2.75rem;
}

.ht-photostrip .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* One wide photo, read as a band rather than as an illustration. */
.ht-photoband {
	margin-block: 2.75rem;
}

.ht-photoband .wp-block-image img {
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

/* A photo standing beside text keeps the column's full height. */
.ht-prose .are-vertically-aligned-center .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

@media (max-width: 781px) {
	.ht-photoband .wp-block-image img {
		aspect-ratio: 3 / 2;
	}
}

/*
 * Gutenberg buttons in page content. Core's default is a blue pill; these match
 * the .ht-btn used by the templates. A colour picked in the editor still wins,
 * because core writes that as an inline style.
 */
.ht-prose .wp-block-buttons {
	gap: 0.75rem;
	margin-top: 2rem;
}

.ht-prose .wp-block-button__link,
.ht-prose .wp-block-button__link:visited {
	padding: 0.9rem 2rem;
	background: var(--ht-orange);
	color: var(--ht-white);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	border-radius: var(--ht-radius);
	transition: background 0.15s ease;
}

.ht-prose .wp-block-button__link:hover,
.ht-prose .wp-block-button__link:focus {
	background: var(--ht-orange-dark);
	color: var(--ht-white);
}

.ht-prose .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ht-dark);
	border-color: var(--ht-dark);
	border-width: 2px;
}

.ht-prose .is-style-outline .wp-block-button__link:hover,
.ht-prose .is-style-outline .wp-block-button__link:focus {
	background: var(--ht-dark);
	color: var(--ht-white);
}

/* A boxed fact panel, used for contact details and official particulars. */
.ht-panel {
	background: var(--ht-cream);
	border-radius: var(--ht-radius);
	padding: 1.5rem;
}

.ht-panel h3 {
	margin-top: 0;
	font-size: 1.05rem;
}

.ht-panel p:last-child {
	margin-bottom: 0;
}

.ht-card__excerpt {
	margin: 0.5rem 0 0;
	font-size: 0.95rem;
	color: var(--ht-grey);
}

.ht-pagehead__lead p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Single huviring
   ========================================================================== */

.ht-huviring__cta {
	margin-top: 2rem;
}

.ht-section__title--spaced {
	margin-bottom: 1.75rem;
}

.ht-huviring__hero-inner {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding-inline: 1rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

@media (min-width: 900px) {
	.ht-huviring__hero-inner {
		grid-template-columns: 1.2fr 1fr;
	}
}

.ht-huviring__hero .entry-title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	margin: 0.2rem 0 1rem;
}

.ht-huviring__lead {
	font-size: 1.15rem;
	line-height: 1.55;
	margin-bottom: 1.75rem;
	max-width: 34em;
}

.ht-huviring__kirjeldus {
	font-size: 1.05rem;
	margin-bottom: 1.75rem;
}

.ht-huviring__kirjeldus p:first-child {
	/* The opening paragraph already ran in the hero. */
	display: none;
}

.ht-huviring__hero-media {
	position: relative;
	display: grid;
	place-items: center;
	min-height: calc(var(--ht-d, 240px) * 1.5);
	--ht-d: clamp(160px, 26vw, 260px);
}

.ht-huviring__hero-media .ht-diamond--accent-soft {
	position: absolute;
	transform: rotate(45deg) translate(calc(var(--ht-d) * -0.22), calc(var(--ht-d) * -0.22));
}

.ht-huviring__body {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding-inline: 1rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	align-items: start;
}

@media (min-width: 900px) {
	.ht-huviring__body {
		grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
	}
}

.ht-huviring__figure {
	margin: 0 0 1.5rem;
}

.ht-huviring__figure img {
	width: 100%;
	height: auto;
	border-radius: var(--ht-radius);
}

.ht-quote {
	margin: 0;
	padding: 1.5rem;
	background: var(--ht-cream);
	border-left: 4px solid var(--ht-orange);
	border-radius: var(--ht-radius);
}

.ht-quote p:last-child {
	margin-bottom: 0;
}

.ht-quote footer {
	margin-top: 0.75rem;
	font-weight: 600;
}

/* ==========================================================================
   Stats row — "25+ huviringi, 20+ õpetajat, 400+ õpilast"
   ========================================================================== */

.ht-stats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
	font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.ht-stats strong {
	font-weight: 800;
}

/* ==========================================================================
   Listing pages with an introduction above the cards
   ========================================================================== */

/* The introduction sits closer to the cards than a full section would. */
.ht-section--tight {
	padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Extra links and pictures in the side column of a single entry. */
.ht-aside-more {
	margin-top: 1.25rem;
}

.ht-aside-figure {
	margin: 0 0 1.25rem;
}

.ht-aside-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ht-radius);
}

/* ==========================================================================
   Camps — one wide card per camp, stacked
   ========================================================================== */

.ht-camps {
	display: grid;
	gap: 2rem;
}

.ht-camp {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	background: var(--ht-white);
	border-radius: var(--ht-radius);
	overflow: hidden;
	box-shadow: 0 1px 0 var(--ht-line), 0 10px 30px rgba(29, 29, 27, 0.07);
}

.ht-camp__media {
	position: relative;
	min-height: 280px;
	overflow: hidden;
	background: var(--ht-cream-deep);
}

/* A blurred, darkened copy of the picture fills whatever the picture leaves. */
.ht-camp__media::before {
	content: "";
	position: absolute;
	inset: -24px;
	background: var(--ht-camp-bg, none) center / cover no-repeat;
	filter: blur(18px) brightness(0.75);
}

/* The picture itself is shown whole — a poster's lettering must not be cut. */
.ht-camp__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ht-camp__body {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	display: flex;
	flex-direction: column;
}

.ht-camp__tag {
	align-self: flex-start;
	margin: 0 0 0.9rem;
	padding: 0.25rem 0.6rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-white);
	background: var(--ht-orange);
	border-radius: 2px;
}

.ht-camp__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.15;
}

.ht-camp__title a {
	color: inherit;
	text-decoration: none;
}

.ht-camp__title a:hover,
.ht-camp__title a:focus {
	color: var(--ht-orange);
}

.ht-camp__facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
	gap: 1rem 1.5rem;
	margin: 0 0 1.25rem;
}

.ht-camp__facts dt {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ht-grey);
}

.ht-camp__facts dt .ht-icon {
	color: var(--ht-orange);
}

.ht-camp__facts dd {
	margin: 0.2rem 0 0;
	font-weight: 700;
}

.ht-camp__facts dd .ht-meta {
	display: block;
	font-weight: 400;
	font-size: 0.85rem;
}

.ht-camp__excerpt {
	margin: 0 0 1.5rem;
	color: var(--ht-grey);
}

.ht-camp__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: auto 0 0;
}

@media (max-width: 781px) {
	.ht-camp {
		grid-template-columns: 1fr;
	}

	/* Two facts to a row, so the card does not become one long column. */
	.ht-camp__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.9rem 1rem;
	}

	.ht-camp__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}
}

/* ==========================================================================
   News post
   ========================================================================== */

.ht-news__figure {
	margin: 0 0 2rem;
}

.ht-news__figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--ht-radius);
}

.ht-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	max-width: 46rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ht-line);
}

.ht-postnav__link {
	display: block;
	padding: 1rem 1.25rem;
	color: var(--ht-dark);
	text-decoration: none;
	background: var(--ht-cream);
	border-radius: var(--ht-radius);
}

.ht-postnav__link:hover,
.ht-postnav__link:focus {
	background: var(--ht-cream-deep);
}

.ht-postnav__link--next {
	grid-column: 2;
	text-align: right;
}

.ht-postnav__label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ht-orange);
}

.ht-postnav__title {
	display: block;
	margin-top: 0.25rem;
	font-weight: 700;
}

.ht-postnav__all {
	margin-top: 1.5rem;
}

@media (max-width: 600px) {
	.ht-postnav {
		grid-template-columns: 1fr;
	}

	.ht-postnav__link--next {
		grid-column: auto;
		text-align: left;
	}
}

/* ==========================================================================
   Site footer
   ========================================================================== */

.ht-footer {
	background: var(--ht-dark);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.92rem;
	line-height: 1.6;
}

.ht-footer__inner {
	max-width: var(--ht-wrap);
	margin-inline: auto;
	padding: clamp(2.5rem, 5vw, 3.5rem) 1rem 2rem;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
}

.ht-footer__title {
	position: relative;
	margin: 0 0 1rem;
	padding-left: 1.1rem;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ht-white);
}

/* The brand diamond marks each column heading. */
.ht-footer__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 0.5rem;
	height: 0.5rem;
	background: var(--ht-orange);
	transform: rotate(45deg);
}

.ht-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}

.ht-footer p {
	margin: 0;
}

.ht-footer a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
}

.ht-footer a:hover,
.ht-footer a:focus {
	color: var(--ht-orange);
}

.ht-footer__contact a,
.ht-footer__contact span {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.ht-footer__contact .ht-icon {
	flex: none;
	color: var(--ht-orange);
}

/* Kadence's own bottom row (copyright) continues the dark band. */
#colophon,
#colophon .site-bottom-footer-wrap,
#colophon .site-footer-row-container-inner {
	background: var(--ht-dark);
	color: rgba(255, 255, 255, 0.55);
	border-top: 0;
}

#colophon .site-bottom-footer-wrap {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#colophon a {
	color: rgba(255, 255, 255, 0.75);
}

#colophon a:hover,
#colophon a:focus {
	color: var(--ht-orange);
}

@media (max-width: 900px) {
	.ht-footer__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.ht-footer__inner {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   People on the contact page
   ========================================================================== */

.ht-people {
	gap: 2rem;
}

.ht-people .wp-block-column {
	display: grid;
	align-content: start;
	gap: 0.5rem;
}

.ht-people h3 {
	margin: 0;
}

.ht-people p {
	margin: 0;
}

.ht-prose .ht-people__photo {
	margin: 0 0 0.35rem;
}

.ht-prose .ht-people__photo img {
	width: 150px;
	height: 150px;
	object-fit: cover;
	border-radius: var(--ht-radius);
	background: var(--ht-cream-deep);
}

/* ==========================================================================
   Map on the contact page
   ========================================================================== */

.ht-prose .ht-map {
	max-width: none;
	width: 100%;
}

.ht-map iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	min-height: 320px;
	border: 0;
	border-radius: var(--ht-radius);
}
