/* Buď Štědrý – Dětské domovy. Breakpointy: 4K ≥ 2400, notebook ≤ 1366, tablet ≤ 1024, mobil ≤ 767.
 * Ikony: Lucide (ISC), tah 2.5 se zaoblenými konci – ladí s favikonou. */

.bs-dd-grid,
.bs-dd-stats,
.bs-dd-hit-wrap {
	--bs-dd-red: var(--c-red, #ee2a24);
	--bs-dd-radius: 16px;
	--bs-dd-shadow: 0 4px 12px 0 rgba(26, 15, 5, .05);
	font-family: 'Satoshi Variable', sans-serif;
	color: var(--c-black, #000);
}

/* ---------- Kompaktní dlaždice ---------- */
.bs-dd-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 32px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.bs-dd-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
	padding: 14px 40px 14px 14px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: var(--bs-dd-radius);
	box-shadow: var(--bs-dd-shadow);
	color: inherit;
	text-decoration: none;
	transition: border-color .3s, box-shadow .3s;
}

a.bs-dd-item:hover,
a.bs-dd-item:focus-visible {
	border-color: rgba(238, 42, 36, .45);
	box-shadow: 0 6px 18px 0 rgba(26, 15, 5, .08);
}

a.bs-dd-item:focus-visible {
	outline: 2px solid var(--bs-dd-red);
	outline-offset: 2px;
}

.bs-dd-photo {
	position: relative;
	flex-shrink: 0;
	display: block;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border-radius: 12px;
	background: #fbf2ef;
}

.bs-dd-grid .bs-dd-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bs-dd-noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bs-dd-red);
}

.bs-dd-noimg svg {
	width: 34px;
	height: 34px;
}

.bs-dd-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.bs-dd-kraj {
	font-family: 'Gloria Hallelujah', cursive;
	font-size: 14px;
	line-height: 1.3;
	color: var(--bs-dd-red);
}

.bs-dd-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.02em;
}

.bs-dd-deti {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 1.4;
	opacity: .7;
}

.bs-dd-deti svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.bs-dd-more {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	width: 20px;
	height: 20px;
	color: var(--bs-dd-red);
	opacity: .5;
	transition: opacity .3s, transform .3s;
}

.bs-dd-more svg {
	width: 100%;
	height: 100%;
}

a.bs-dd-item:hover .bs-dd-more {
	opacity: 1;
	transform: translate(2px, -2px);
}

.bs-dd-empty {
	text-align: center;
	opacity: .6;
}

/* ---------- Statistiky ---------- */
.bs-dd-stats {
	--bs-dd-radius: 24px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 24px;
	background: #fff;
	border: 2px solid var(--bs-dd-red);
	border-radius: var(--bs-dd-radius);
	box-shadow: var(--bs-dd-shadow);
}

.bs-dd-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 8px 24px;
	text-align: center;
}

.bs-dd-stat + .bs-dd-stat {
	border-left: 1px solid #ececec;
}

.bs-dd-stat-ico {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--bs-dd-red);
	color: #fff;
}

.bs-dd-stat-ico svg {
	display: block;
	width: 32px;
	height: 32px;
}

.bs-dd-stat-num {
	font-family: 'Gloria Hallelujah', cursive;
	font-size: 56px;
	line-height: 1.1;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}

.bs-dd-inf {
	font-family: 'Satoshi Variable', sans-serif;
	font-weight: 500;
	font-size: 64px;
	line-height: 1;
	padding: 4px 0 6px;
}

.bs-dd-stat-label {
	max-width: 220px;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: -.02em;
}

/* ---------- Breakpointy ---------- */
@media (min-width: 2400px) {
	.bs-dd-grid { max-width: 1500px; gap: 36px 40px; }
	.bs-dd-photo { width: 110px; height: 110px; }
	.bs-dd-name { font-size: 20px; }
	.bs-dd-kraj, .bs-dd-deti { font-size: 17px; }
	.bs-dd-stats { max-width: 1380px; padding: 50px 30px; }
	.bs-dd-stat-ico { width: 80px; height: 80px; }
	.bs-dd-stat-ico svg { width: 40px; height: 40px; }
	.bs-dd-stat-num { font-size: 70px; }
	.bs-dd-stat-label { font-size: 20px; max-width: 280px; }
}

@media (max-width: 1366px) {
	.bs-dd-grid { gap: 24px; }
	.bs-dd-photo { width: 76px; height: 76px; }
	.bs-dd-name { font-size: 15px; }
	.bs-dd-kraj, .bs-dd-deti { font-size: 13px; }
	.bs-dd-stats { --bs-dd-radius: 20px; }
	.bs-dd-stat-ico { width: 56px; height: 56px; }
	.bs-dd-stat-ico svg { width: 28px; height: 28px; }
	.bs-dd-stat-num { font-size: 48px; }
	.bs-dd-stat-label { font-size: 15px; }
}

@media (max-width: 1024px) {
	.bs-dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
	.bs-dd-stat { padding: 8px 12px; }
}

@media (max-width: 767px) {
	.bs-dd-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.bs-dd-item { padding: 10px 36px 10px 10px; gap: 12px; }
	.bs-dd-photo { width: 68px; height: 68px; }
	.bs-dd-more { top: 10px; right: 10px; }
	.bs-dd-stats { --bs-dd-radius: 16px; grid-template-columns: minmax(0, 1fr); padding: 8px 20px; }
	.bs-dd-stat { padding: 20px 0; }
	.bs-dd-stat + .bs-dd-stat { border-left: 0; border-top: 1px solid #ececec; }
	.bs-dd-stat-num { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.bs-dd-item, .bs-dd-more { transition: none; }
	a.bs-dd-item:hover .bs-dd-more { transform: none; }
}

/* Podíl z ČR pod číslem */
.bs-dd-stat-sub {
	display: inline-block;
	margin-top: 4px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(238, 42, 36, .08);
	font-size: 14px;
	line-height: 1.3;
	letter-spacing: -.01em;
	color: var(--bs-dd-red);
}

.bs-dd-stat-sub strong {
	font-weight: 700;
}

@media (max-width: 1366px) {
	.bs-dd-stat-sub { font-size: 13px; }
}

@media (min-width: 2400px) {
	.bs-dd-stat-sub { font-size: 17px; }
}

/* ---------- Hláška pod nadpisem (subtilní) + konfety ---------- */
.bs-dd-hit-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 12px 0 44px;
}

.bs-dd-hit {
	position: relative;
	margin: 0;
	font-size: 18px;
	line-height: 1.4;
	letter-spacing: -.02em;
	text-align: center;
	color: var(--c-black, #000);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .5s ease, transform .5s ease;
}

.bs-dd-hit.is-in {
	opacity: 1;
	transform: none;
}

.bs-dd-hit strong {
	font-weight: 700;
	color: var(--bs-dd-red);
}

.bs-dd-confetti {
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 50;
	pointer-events: none;
	border-radius: 2px;
}

/* Tlačítko 🎉 – znovu spustí konfety */
.bs-dd-hit .bs-dd-hit-pop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	min-width: 0;
	margin: -.3em 0 -.3em .1em;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	font-size: 1.05em;
	line-height: 1;
	position: relative;
	top: -.16em; /* opticky na střed textu */
	vertical-align: middle;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform .2s ease, background-color .2s ease;
}

/* Po kliknutí myší nic nezůstává podbarvené; hover jen na zařízeních s myší */
.bs-dd-hit .bs-dd-hit-pop:hover,
.bs-dd-hit .bs-dd-hit-pop:focus,
.bs-dd-hit .bs-dd-hit-pop:active {
	background: transparent; /* přebije magentový hover z resetu šablony (na dotyku „ulpí“) */
	color: inherit;
}

@media (hover: hover) {
	.bs-dd-hit .bs-dd-hit-pop:hover {
		background: rgba(238, 42, 36, .08);
		transform: rotate(-12deg) scale(1.15);
	}

	.bs-dd-hit .bs-dd-hit-pop:hover > span {
		animation-play-state: paused;
	}
}

/* Jemné zavrtění každé 3 s */
.bs-dd-hit .bs-dd-hit-pop > span {
	display: block;
	transform-origin: 50% 70%;
	animation: bs-dd-jiggle 3s ease-in-out infinite;
}

@keyframes bs-dd-jiggle {
	0%, 15%, 100% { transform: rotate(0); }
	3% { transform: rotate(-14deg); }
	6% { transform: rotate(12deg); }
	9% { transform: rotate(-7deg); }
	12% { transform: rotate(3deg); }
}

.bs-dd-hit .bs-dd-hit-pop img.emoji {
	display: block;
	margin: 0 !important;
	vertical-align: 0 !important;
}

.bs-dd-hit .bs-dd-hit-pop:focus-visible {
	background: rgba(238, 42, 36, .08);
	outline: 2px solid var(--bs-dd-red);
	outline-offset: 2px;
}

/* Klik: „cvakne“ jen emoji uvnitř, tlačítko drží hover stav */
.bs-dd-hit .bs-dd-hit-pop.is-pop.is-pop > span {
	animation: bs-dd-popper .45s ease;
	animation-play-state: running;
}

@keyframes bs-dd-popper {
	0% { transform: scale(1); }
	40% { transform: rotate(-16deg) scale(1.25); }
	100% { transform: scale(1); }
}

@media (min-width: 2400px) {
	.bs-dd-hit { font-size: 22px; }
}

@media (max-width: 1366px) {
	.bs-dd-hit-wrap { margin: 10px 0 36px; }
	.bs-dd-hit { font-size: 17px; }
}

@media (max-width: 767px) {
	.bs-dd-hit-wrap { margin: 8px 0 28px; }
	.bs-dd-hit { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.bs-dd-hit { opacity: 1; transform: none; transition: none; }
	.bs-dd-hit .bs-dd-hit-pop { display: none; } /* bez animací nemá tlačítko smysl */
}

/* ---------- Štítek [bs_stitek] (např. „Vánoce 2026“) – jemný, barevná ikona ---------- */
.bs-stitek-wrap {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0 0 28px;
}

.bs-stitek {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 13px 5px 9px;
	background: #f6f2ec;
	border-radius: 999px;
	font-family: 'Satoshi Variable', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: rgba(0, 0, 0, .72);
}

.bs-stitek svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

@media (min-width: 2400px) {
	.bs-stitek { font-size: 17px; padding: 7px 16px 7px 12px; }
	.bs-stitek svg { width: 22px; height: 22px; }
}

@media (max-width: 1366px) {
	.bs-stitek-wrap { margin-bottom: 24px; }
}

@media (max-width: 767px) {
	.bs-stitek-wrap { margin-bottom: 20px; }
	.bs-stitek { font-size: 13px; padding: 4px 11px 4px 8px; }
	.bs-stitek svg { width: 16px; height: 16px; }
}

/* ---------- Seznam: hledání, filtr kraje, „Zobrazit další“ ---------- */
.bs-dd-list {
	--bs-dd-red: var(--c-red, #ee2a24);
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	font-family: 'Satoshi Variable', sans-serif;
	color: var(--c-black, #000);
}

.bs-dd-list .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.bs-dd-tools {
	display: none; /* bez JS se nástroje nezobrazí, ukážou se všechny domovy */
	gap: 16px;
	margin: 0 0 32px;
}

.bs-dd-list.is-ready .bs-dd-tools {
	display: flex;
}

.bs-dd-search,
.bs-dd-filter {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
}

.bs-dd-search {
	flex: 1 1 auto;
}

.bs-dd-filter {
	flex: 0 0 300px;
}

.bs-dd-search svg,
.bs-dd-filter svg {
	position: absolute;
	top: 50%;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	pointer-events: none;
	color: rgba(0, 0, 0, .45);
}

.bs-dd-search svg { left: 16px; }
.bs-dd-filter svg { right: 16px; }

.bs-dd-list .bs-dd-q,
.bs-dd-list .bs-dd-kraje {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 18px 0 48px;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 16px;
	box-shadow: 0 4px 12px 0 rgba(26, 15, 5, .05);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.2;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s, box-shadow .2s;
}

.bs-dd-list .bs-dd-kraje {
	padding: 0 48px 0 18px;
	cursor: pointer;
	text-overflow: ellipsis;
}

.bs-dd-list .bs-dd-q::placeholder {
	color: rgba(0, 0, 0, .45);
}

.bs-dd-list .bs-dd-q:focus,
.bs-dd-list .bs-dd-kraje:focus {
	outline: none;
	border-color: rgba(238, 42, 36, .55);
	box-shadow: 0 0 0 3px rgba(238, 42, 36, .12);
}

.bs-dd-list .bs-dd-item[hidden] {
	display: none;
}

.bs-dd-none {
	margin: 8px 0 0;
	padding: 32px 16px;
	text-align: center;
	font-size: 16px;
	color: rgba(0, 0, 0, .6);
}

.bs-dd-foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 32px 0 0;
}

.bs-dd-count {
	margin: 0;
	font-size: 14px;
	color: rgba(0, 0, 0, .55);
}

.bs-dd-count:empty {
	display: none;
}

.bs-dd-list .bs-dd-moreb {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 12px 28px;
	background: #fff;
	border: 1.5px solid var(--c-black, #000);
	border-radius: 999px;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--c-black, #000);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .2s, color .2s, border-color .2s;
}

.bs-dd-list .bs-dd-moreb:hover,
.bs-dd-list .bs-dd-moreb:focus,
.bs-dd-list .bs-dd-moreb:active {
	background: #fff;
	color: var(--c-black, #000);
	border-color: var(--c-black, #000);
}

@media (hover: hover) {
	.bs-dd-list .bs-dd-moreb:hover {
		background: var(--bs-dd-red);
		border-color: var(--bs-dd-red);
		color: #fff;
	}
}

.bs-dd-list .bs-dd-moreb:focus-visible {
	outline: 2px solid var(--bs-dd-red);
	outline-offset: 3px;
}

.bs-dd-list .bs-dd-moreb[hidden] {
	display: none;
}

@media (min-width: 2400px) {
	.bs-dd-list { max-width: 1500px; }
	.bs-dd-list .bs-dd-q, .bs-dd-list .bs-dd-kraje { height: 60px; font-size: 19px; }
	.bs-dd-filter { flex-basis: 360px; }
}

@media (max-width: 1024px) {
	.bs-dd-filter { flex-basis: 260px; }
}

@media (max-width: 767px) {
	.bs-dd-list.is-ready .bs-dd-tools { flex-direction: column; gap: 10px; margin-bottom: 20px; }
	.bs-dd-filter { flex-basis: auto; }
	.bs-dd-list .bs-dd-q, .bs-dd-list .bs-dd-kraje { height: 48px; font-size: 16px; border-radius: 14px; }
	.bs-dd-foot { margin-top: 24px; }
}

/* Widget se shortcodem vždy přes celou šířku sekce – jinak se v Elementoru (zarovnání na střed) seznam po filtrování zúží */
.elementor-widget:has(> .elementor-shortcode > .bs-dd-list),
.elementor-widget:has(> .elementor-shortcode > .bs-dd-stats) {
	align-self: stretch;
	width: 100%;
	max-width: 100%;
}

.bs-dd-count .bs-dd-total::before {
	content: "·";
	margin: 0 12px;
}

/* Návrh pod hláškou „nic jsme nenašli“ */
.bs-dd-suggest {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: -16px 0 8px;
}

.bs-dd-suggest[hidden] {
	display: none;
}

.bs-dd-suggest-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 12px;
	margin: 0;
	font-size: 16px;
	text-align: center;
}

.bs-dd-list .bs-dd-suggest-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 16px;
	background: rgba(238, 42, 36, .08);
	border: 0;
	border-radius: 999px;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--bs-dd-red);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .2s, color .2s;
}

.bs-dd-list .bs-dd-suggest-btn::after {
	content: "→";
}

.bs-dd-list .bs-dd-suggest-btn:hover,
.bs-dd-list .bs-dd-suggest-btn:focus,
.bs-dd-list .bs-dd-suggest-btn:active {
	background: rgba(238, 42, 36, .08);
	color: var(--bs-dd-red);
}

@media (hover: hover) {
	.bs-dd-list .bs-dd-suggest-btn:hover {
		background: var(--bs-dd-red);
		color: #fff;
	}
}

.bs-dd-list .bs-dd-suggest-btn:focus-visible {
	outline: 2px solid var(--bs-dd-red);
	outline-offset: 2px;
}
