/* Eben – Tímy */

.eben-tim,
.eben-timy__grid,
.eben-timy__nav {
	--eben-tim-bg: #f7f7f7;
	--eben-tim-border: #e6e6e6;
	--eben-tim-accent: #5ac5c8;
	--eben-tim-muted: #6b6b6b;
	--eben-tim-radius: 18px;
}

/* ---------------------------------------------------------------- Detail */

.eben-tim {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	max-width: 980px;
}

body.single-eben_tim .wp-block-post-content,
body.single-eben_tim .is-layout-constrained > .wp-block-post-content,
body.single-eben_tim .wp-block-post-content > .eben-tim {
	width: 100%;
	max-width: 980px;
}

.eben-tim__head {
	background: #ece7e2;
	border: none;
	border-radius: var(--eben-tim-radius);
	padding: 20px 24px;
}

.eben-tim__breadcrumb {
	font-size: 13px;
	color: var(--eben-tim-muted);
	margin: 0 0 4px;
}

.eben-tim__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.eben-tim__breadcrumb a:hover {
	text-decoration: underline;
}

.eben-tim__sep {
	margin: 0 8px;
	opacity: 0.6;
}

/* Titulok nesmie prebiť obsah stránky – téma dáva h1 cez 40px. */
.eben-tim__title {
	margin: 0;
	font-size: clamp(24px, 3.4vw, 32px);
	font-weight: 700;
	line-height: 1.15;
}

.eben-tim__emails {
	margin: 6px 0 0;
	font-size: 14px;
}

.eben-tim__emails a {
	color: var(--eben-tim-muted);
	text-decoration: none;
}

.eben-tim__emails a:hover {
	color: inherit;
	text-decoration: underline;
}

.eben-tim__desc {
	margin-top: 10px;
	max-width: 62ch;
	font-size: 15px;
	line-height: 1.5;
	font-weight: 400;
	color: #3f3f3f;
}

.eben-tim__desc > *:first-child {
	margin-top: 0;
}

.eben-tim__desc > *:last-child {
	margin-bottom: 0;
}

.eben-tim__group-title {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--eben-tim-muted);
}

/* Líder, zástupca a členovia patria k sebe – držíme ich bližšie než ostatné bloky. */
.eben-tim__group + .eben-tim__group {
	margin-top: -8px;
}

/* Od tejto šírky sa popisok zmestí vedľa mien – ušetrí to riadok na každú skupinu. */
@media (min-width: 560px) {
	.eben-tim__group:not(.eben-tim__group--extra) {
		display: grid;
		grid-template-columns: 92px 1fr;
		align-items: start;
		column-gap: 14px;
	}

	.eben-tim__group:not(.eben-tim__group--extra) .eben-tim__group-title {
		margin: 0;
		padding-top: 13px;
	}
}

.eben-tim__empty {
	color: var(--eben-tim-muted);
	font-style: italic;
}

/* Karty ľudí */

.eben-tim__group-body {
	position: relative;
	min-width: 0;
}

/* Veľké tímy sa zbalia na prvých 6 ľudí; rozbalenie ide bez JavaScriptu. */

.eben-tim__more-toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

/* Číslo musí sedieť s Eben_Timy_Render::VISIBLE_LIMIT + 1. */
.eben-tim__people--clamped > .eben-tim__person:nth-child(n + 7) {
	display: none;
}

.eben-tim__more-toggle:checked ~ .eben-tim__people--clamped > .eben-tim__person {
	display: flex;
}

.eben-tim__more {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	color: var(--eben-tim-muted);
	cursor: pointer;
	border-bottom: 1px dashed currentColor;
}

.eben-tim__more:hover {
	color: inherit;
}

.eben-tim__more-hide {
	display: none;
}

.eben-tim__more-toggle:checked ~ .eben-tim__more .eben-tim__more-show {
	display: none;
}

.eben-tim__more-toggle:checked ~ .eben-tim__more .eben-tim__more-hide {
	display: inline;
}

.eben-tim__more-toggle:focus-visible ~ .eben-tim__more {
	outline: 2px solid var(--eben-tim-accent);
	outline-offset: 3px;
}

/* Karty sa prispôsobia dĺžke mena – mriežka nechávala pri krátkych menách veľké diery. */
.eben-tim__people {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.eben-tim__person {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	background: #fff;
	border: 1px solid var(--eben-tim-border);
	border-radius: 999px;
	padding: 4px 14px 4px 4px;
	min-width: 0;
}

.eben-tim__group--lead .eben-tim__person,
.eben-tim__group--deputy .eben-tim__person {
	border-color: var(--eben-tim-accent);
	box-shadow: 0 2px 10px rgba(90, 197, 200, 0.18);
}

.eben-tim__avatar {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--eben-tim-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.eben-tim__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eben-tim__avatar--initials {
	background: var(--eben-tim-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
}

.eben-tim__person-name {
	font-size: 14px;
	line-height: 1.25;
	min-width: 0;
	overflow-wrap: anywhere;
}

.eben-tim__extra > *:first-child {
	margin-top: 0;
}

.eben-tim__content {
	border-top: 1px solid var(--eben-tim-border);
	margin-top: 4px;
	padding-top: 24px;
}

.eben-tim__content > *:first-child {
	margin-top: 0;
}

/* -------------------------------------------------- Prehľad a podtímy */

.eben-timy__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.eben-timy__card {
	background: #ece7e2;
	border: none;
	border-radius: 10px;
	padding: 10px 8px;
	min-width: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
	.eben-timy__card:hover {
		transform: translateY(-2px);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
	}
}

.eben-timy__card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.eben-timy__card-title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.eben-timy__card-leader {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--eben-tim-muted);
}

.eben-timy__card-children {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.eben-timy__card-children a {
	display: inline-block;
	background: #fff;
	border: 1px solid var(--eben-tim-border);
	border-radius: 999px;
	padding: 3px 8px;
	font-size: 12px;
	line-height: 1.3;
	text-decoration: none;
	color: var(--eben-tim-muted);
}

.eben-timy__card-children a:hover {
	background: var(--eben-tim-accent);
	border-color: var(--eben-tim-accent);
	color: #fff;
}

.eben-timy__grid--compact .eben-timy__card {
	padding: 10px 8px;
}

.eben-timy__grid--compact .eben-timy__card-title {
	font-size: 15px;
}

@media (min-width: 640px) {
	.eben-timy__grid {
		gap: 16px;
	}

	.eben-timy__card {
		border-radius: 14px;
		padding: 20px;
	}

	.eben-timy__card-title {
		font-size: 20px;
	}

	.eben-timy__card-leader {
		margin-top: 6px;
		font-size: 14px;
		white-space: normal;
	}

	.eben-timy__card-children {
		margin-top: 14px;
		gap: 6px;
	}

	.eben-timy__card-children a {
		padding: 4px 12px;
		font-size: 13px;
	}

	.eben-timy__grid--compact .eben-timy__card {
		padding: 16px;
	}

	.eben-timy__grid--compact .eben-timy__card-title {
		font-size: 18px;
	}
}

/* ------------------------------------------------------------ Navigácia */

.eben-timy__nav {
	border-top: 1px solid var(--eben-tim-border);
	padding-top: 24px;
}

.eben-timy__nav-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--eben-tim-muted);
}

.eben-timy__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.eben-timy__nav-item a {
	display: inline-block;
	background: var(--eben-tim-bg);
	border: 1px solid var(--eben-tim-border);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	text-decoration: none;
	color: inherit;
}

.eben-timy__nav-item a:hover {
	border-color: var(--eben-tim-accent);
}

.eben-timy__nav-item.is-child a {
	font-size: 13px;
	color: var(--eben-tim-muted);
}

.eben-timy__nav-item.is-current a {
	background: var(--eben-tim-accent);
	border-color: var(--eben-tim-accent);
	color: #fff;
	font-weight: 600;
}

@media (max-width: 600px) {
	.eben-tim__head {
		padding: 18px;
	}

	.eben-tim__person-name {
		font-size: 13px;
	}
}
