/* =====================================================
   treneri.css — Treneri un Sporta Klubi lapu stils
   ===================================================== */

/* KONTEINERS */
.tr-container {
	max-width: var(--max, 1200px);
	margin: 0 auto;
	padding: 0 20px;
}

/* LAPAS GALVENE */
.treneri-wrap { padding-bottom: 80px; }

.tr-breadcrumbs {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--muted);
	padding: 24px 0 16px;
}
.tr-breadcrumbs a { color: var(--muted); transition: color .2s; }
.tr-breadcrumbs a:hover { color: var(--text); }
.tr-breadcrumbs svg { width: 14px; height: 14px; flex-shrink: 0; }

.tr-page-title {
	font-size: clamp(28px, 6vw, 48px);
	font-weight: 900;
	color: var(--text);
	margin: 0 0 12px;
	line-height: 1.15;
}
.tr-page-intro {
	font-size: 16px;
	color: var(--muted);
	line-height: 1.7;
	max-width: 600px;
	margin-bottom: 32px;
}

/* ===========================================================
   SLIDER SADAĻA
   =========================================================== */
.tr-slider-section {
	margin: 0 0 48px;
	padding: 32px 0;
	background: var(--card);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.tr-slider-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.tr-section-title {
	font-size: 18px;
	font-weight: 800;
	color: var(--text);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}
.tr-section-title svg {
	width: 20px;
	height: 20px;
	color: var(--brand);
	fill: var(--brand);
}

.tr-slider-controls {
	display: flex;
	gap: 8px;
}
.tr-slider-btn {
	width: 40px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .2s;
}
.tr-slider-btn:hover { border-color: var(--brand); color: var(--text); background: var(--brand); color: var(--brand-ink); }
.tr-slider-btn svg { width: 18px; height: 18px; }

/* SLIDER LENTA */
.tr-slider-outer {
	overflow: hidden;
	padding: 0 20px;
	max-width: var(--max, 1200px);
	margin: 0 auto;
}

.tr-slider {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
}
.tr-slider::-webkit-scrollbar { display: none; }

/* SLIDE KARTĪTE */
.tr-slide {
	flex: 0 0 calc(25% - 15px);
	min-width: 220px;
	scroll-snap-align: start;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius, 18px);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color .2s, transform .25s, box-shadow .25s;
	display: flex;
	flex-direction: column;
}
.tr-slide:hover {
	border-color: var(--brand);
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}

.tr-slide-thumb {
	position: relative;
	aspect-ratio: 3/4;
	overflow: hidden;
	background: var(--line);
}
.tr-slide-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s;
}
.tr-slide:hover .tr-slide-thumb img { transform: scale(1.04); }

.tr-thumb-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	background: var(--line);
}
.tr-thumb-fallback svg { width: 40px; height: 40px; }

.tr-slide-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--brand);
	color: var(--brand-ink);
	font-size: 11px;
	font-weight: 800;
	padding: 4px 8px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	gap: 4px;
}
.sk-badge { background: #3b82f6; color: #fff; }

.tr-slide-body {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.tr-slide-name {
	font-size: 15px;
	font-weight: 800;
	color: var(--text);
	margin: 0;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tr-slide-sub {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.tr-slide-tag,
.tr-slide-loc {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--muted);
	background: var(--line);
	padding: 3px 8px;
	border-radius: 20px;
	width: fit-content;
}

/* SLIDER DOTS */
.tr-slider-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 16px;
}
.tr-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: var(--line);
	cursor: pointer;
	transition: background .2s, transform .2s;
	padding: 0;
}
.tr-dot.active {
	background: var(--brand);
	transform: scale(1.4);
}

/* ===========================================================
   A-Z NAVIGĀCIJA
   =========================================================== */
.tr-az-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 32px 0 20px;
	padding: 16px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
}

.tr-az-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--text);
	border: 1px solid var(--line);
	background: var(--bg);
	text-decoration: none;
	transition: all .15s;
	cursor: pointer;
	padding: 0;
}
.tr-az-btn:hover:not(.disabled) {
	border-color: var(--brand);
	background: var(--brand);
	color: var(--brand-ink);
}
.tr-az-btn.active {
	background: var(--brand);
	color: var(--brand-ink);
	border-color: var(--brand);
	box-shadow: 0 4px 12px rgba(56, 189, 248, .25);
}
.tr-az-btn.disabled {
	opacity: .3;
	cursor: default;
	pointer-events: none;
}

/* Visi poga — platāka */
.tr-az-btn:first-child {
	width: auto;
	padding: 0 14px;
	font-size: 12px;
}

/* REZULTĀTU JOSLA */
.tr-results-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}
.tr-results-count {
	font-size: 14px;
	color: var(--muted);
}
.tr-results-reset {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 4px 10px;
	text-decoration: none;
	transition: all .2s;
}
.tr-results-reset:hover { border-color: var(--text); color: var(--text); }

/* ===========================================================
   KARTĪŠU TĪKLS
   =========================================================== */
.tr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.tr-card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius, 18px);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color .2s, transform .25s, box-shadow .25s;
	position: relative;
}
.tr-card:hover {
	border-color: var(--brand);
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}
.tr-card--featured {
	border-color: rgba(56, 189, 248, .5);
}

.tr-card-thumb {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: var(--line);
}
.sk-card-thumb { aspect-ratio: 16/9; }

.tr-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s;
}
.tr-card:hover .tr-card-thumb img { transform: scale(1.04); }

.tr-card-star {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	background: var(--brand);
	color: var(--brand-ink);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tr-card-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tr-card-name {
	font-size: 16px;
	font-weight: 800;
	color: var(--text);
	margin: 0;
	line-height: 1.3;
}
.tr-card-sub {
	font-size: 13px;
	color: var(--muted);
	margin: 0;
}
.tr-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tr-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--muted);
	background: var(--line);
	padding: 3px 8px;
	border-radius: 20px;
}
.tr-card-excerpt {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tr-card-arrow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 10px 16px;
	color: var(--muted);
	border-top: 1px solid var(--line);
	transition: color .2s;
}
.tr-card:hover .tr-card-arrow { color: var(--brand); }
.tr-card-arrow svg { width: 18px; height: 18px; }

/* ===========================================================
   TUKŠS STĀVOKLIS
   =========================================================== */
.tr-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	text-align: center;
	color: var(--muted);
	gap: 12px;
}
.tr-empty h3 {
	font-size: 20px;
	font-weight: 700;
	color: var(--text);
	margin: 0;
}
.tr-empty p { margin: 0; font-size: 15px; }
.tr-empty-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding: 10px 24px;
	background: var(--brand);
	color: var(--brand-ink);
	font-weight: 700;
	font-size: 14px;
	border-radius: 10px;
	text-decoration: none;
	transition: filter .2s;
}
.tr-empty-btn:hover { filter: brightness(.95); }

/* ===========================================================
   RESPONSĪVS
   =========================================================== */
@media (max-width: 1023px) {
	.tr-slide { flex: 0 0 calc(33.333% - 14px); }
}
@media (max-width: 767px) {
	.tr-slide { flex: 0 0 calc(50% - 10px); }
	.tr-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 479px) {
	.tr-slide { flex: 0 0 260px; }
	.tr-grid { grid-template-columns: 1fr; }
	.tr-az-bar { gap: 4px; }
	.tr-az-btn { width: 32px; height: 32px; font-size: 12px; }
}


/* ====
   BIO PROFILA LAPA (single-treneri.php / single-sporta_klubs.php)
   ==== */

/* BASE & TOKENS (identiski slavenību lapai) */
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* prevent any accidental horizontal scroll */
.bio-main-card,
.bio-main,
.bio-grid,
.container { min-width: 0; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.chip { border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; background: var(--card); font-weight: 700; color: var(--muted); text-decoration: none; font-size: .95rem; transition: all .2s; }
.chip:hover { color: var(--text); background: var(--brand); transform: translateY(-2px); }

.bio-wrap { padding: 0 0 40px; }
.bio-grid { display: grid; grid-template-columns: 320px 1.6fr; gap: 24px; align-items: start; }

@media (min-width: 900px) {
	.bio-sidebar { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
	.mobile-header-overlay { display: none; }
}

.bio-photo { position: relative; line-height: 0; }
.bio-photo img { width: 100%; height: auto; display: block; }

@media (max-width: 899px) {
	.mobile-header-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 20px 20px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; line-height: 1.2; }
	.mobile-header-overlay .bio-name { color: #fff; margin: 0; font-size: 32px; text-shadow: 0 2px 4px rgba(0,0,0,.3); }
	.mobile-header-overlay .kicker { background: var(--brand); color: #000; margin-bottom: 8px; }
	.desktop-header { display: none; }
}

.bio-facts { padding: 18px; }
.bio-facts h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.fact-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 0; font-size: .95rem; border-bottom: 1px dotted var(--line); }
.fact-row:last-child { border-bottom: none; }
.fact-label { font-weight: 700; color: var(--muted); }
.fact-value { color: var(--text); font-weight: 600; }

.bio-main-card { padding: 30px; color: var(--text); }
.kicker { display: inline-flex; padding: 6px 12px; background: var(--brand); color: var(--brand-ink); margin-bottom: 16px; font-weight: 900; border-radius: 8px; font-size: .8rem; text-transform: uppercase; }
.bio-name { margin: 0 0 12px; font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; color: var(--text); }

.bio-social { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.bio-social a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; font-weight: 800; text-decoration: none; color: var(--text); font-size: .85rem; background: var(--card); transition: .2s; }
.bio-social a:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.prose { font-size: 1.1rem; line-height: 1.8; }
.prose p { margin-bottom: 1.5em; }
.prose h2 { font-size: 1.15rem; line-height: 1.35; font-weight: 700; margin: 1.6em 0 .4em; }
.prose h2 strong { font-weight: 700; }
.prose h2 + p { margin-top: 0; }

.more { margin-top: 40px; }
.more-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.more-title { font-size: 24px; font-weight: 900; color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card-link { text-decoration: none; color: inherit; }
.thumb { aspect-ratio: 4/5; overflow: hidden; border-bottom: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.title { padding: 14px 16px; font-weight: 800; font-size: 1.05rem; }

@media (max-width: 899px) {
	.bio-grid { grid-template-columns: 1fr; gap: 16px; }
	.bio-main-card { padding: 22px; }
	.grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 15px; gap: 16px; -webkit-overflow-scrolling: touch; }
	.grid::-webkit-scrollbar { display: none; }
	.grid .card { flex: 0 0 270px; scroll-snap-align: start; }
}

/* Labojuma aicinājums trenera / kluba lapā */
.bio-fix { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 9px 12px; border: 1px solid rgba(56, 189, 248, .5); background: rgba(56, 189, 248, .1); border-radius: 8px; }
.bio-fix p { margin: 0; flex: 1 1 200px; font-size: 12px; line-height: 1.4; color: var(--text); }
.bio-fix-btn { display: inline-block; padding: 5px 10px; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: .75rem; text-decoration: none; white-space: nowrap; transition: filter .2s; }
.bio-fix-btn:hover { filter: brightness(.95); }
