/* Týden svobody – Akce v zahraničí */

.tsaz {
	--tsaz-red: #ee263e;
	--tsaz-ink: #111;
	--tsaz-text: #222;
	--tsaz-muted: #6b6b6b;
	--tsaz-grey: #efefef;
	--tsaz-white: #fff;
	color: var(--tsaz-ink);
	font-family: inherit;
}

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

/* ---------- Mřížka a karty ---------- */

.tsaz-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
	gap: 16px;
}

.tsaz-card {
	background: var(--tsaz-white);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.tsaz-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	cursor: pointer;
	background: var(--tsaz-grey);
}

/* Všechny fotky v řádku mají stejnou výšku podle nejnižší z nich (dopočítá JS).
   Bez JS se fotka zobrazí v původním poměru stran. !important kvůli šablonám,
   které obrázkům vnucují height: auto. */
.tsaz-card__media .tsaz-card__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: center;
	transition: transform .4s ease;
}

.tsaz-card__media.is-grayscale .tsaz-card__img {
	filter: grayscale(1);
}

.tsaz-card:hover .tsaz-card__img {
	transform: scale(1.03);
}

.tsaz-card__body {
	flex: 1 1 auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tsaz-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tsaz-chip {
	display: inline-block;
	background: var(--tsaz-grey);
	color: var(--tsaz-ink);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 400;
}

.tsaz-chip--date {
	background: var(--tsaz-red);
	font-weight: 700;
}

.tsaz-chip--tba {
	color: #555;
	font-weight: 700;
}

.tsaz-chip--place {
	font-weight: 700;
}

.tsaz .tsaz-card__title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.03em;
	text-wrap: balance;
	cursor: pointer;
	color: var(--tsaz-ink);
}

.tsaz-card__title:hover {
	color: var(--tsaz-red);
}

.tsaz .tsaz-card__location {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin: -6px 0 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--tsaz-muted);
}

.tsaz-card__location .fa-map-pin {
	flex: 0 0 auto;
	font-size: .9em;
}

.tsaz .tsaz-card__perex {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: #333;
}

.tsaz .tsaz-card__more {
	align-self: flex-start;
	margin-top: auto;
	padding: 2px 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--tsaz-ink);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.tsaz .tsaz-card__more:hover,
.tsaz .tsaz-card__more:focus-visible {
	background: none;
	color: var(--tsaz-red);
}

.tsaz .tsaz-card__more:focus-visible,
.tsaz-modal__close:focus-visible,
.tsaz-detail__link:focus-visible {
	outline: 2px solid var(--tsaz-ink);
	outline-offset: 3px;
}

/* ---------- Modal ---------- */

.tsaz-modal {
	width: min(760px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--tsaz-white);
	color: var(--tsaz-ink);
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}

.tsaz-modal[open] {
	display: flex;
	flex-direction: column;
	animation: tsaz-in .2s ease-out;
}

.tsaz-modal::backdrop {
	background: rgba(17, 17, 17, .6);
}

@keyframes tsaz-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tsaz-modal[open] { animation: none; }
	.tsaz-card__media .tsaz-card__img { transition: none; }
}

.tsaz-modal__scroll {
	overflow-y: auto;
	overscroll-behavior: contain;
	outline: none; /* po otevření má fokus (kvůli posunu klávesnicí), rámeček je zbytečný */
	max-height: calc(100dvh - 32px);
}

.tsaz .tsaz-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--tsaz-white);
	color: var(--tsaz-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}

.tsaz .tsaz-modal__close:hover {
	background: var(--tsaz-ink);
	color: var(--tsaz-white);
}

.tsaz-detail__media {
	background: var(--tsaz-grey);
	line-height: 0;
}

.tsaz-detail__media .tsaz-detail__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
}

.tsaz-detail__body {
	padding: clamp(22px, 4vw, 40px);
	padding-top: clamp(20px, 3vw, 32px);
}

.tsaz .tsaz-detail__title {
	margin: 0;
	padding-right: 36px;
	font-size: clamp(26px, 3.4vw, 36px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.035em;
	text-wrap: balance;
	color: var(--tsaz-ink);
}

/* Bez obrázku se nadpis nesmí krýt s křížkem. */
.tsaz-detail__media + .tsaz-detail__body .tsaz-detail__title {
	padding-right: 0;
}

.tsaz .tsaz-detail__place {
	margin: 8px 0 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--tsaz-muted);
}

.tsaz-detail__text {
	margin-top: 20px;
	font-size: 16px;
	line-height: 1.6;
	color: var(--tsaz-text);
}

.tsaz-detail__text > :first-child { margin-top: 0; }
.tsaz-detail__text > :last-child { margin-bottom: 0; }

.tsaz-detail__text p,
.tsaz-detail__text ul,
.tsaz-detail__text ol,
.tsaz-detail__text table,
.tsaz-detail__text figure {
	margin: 0 0 1em;
}

.tsaz-detail__text h3,
.tsaz-detail__text h4 {
	margin: 1.4em 0 .5em;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--tsaz-ink);
}

.tsaz-detail__text ul,
.tsaz-detail__text ol {
	padding-left: 1.3em;
}

.tsaz-detail__text a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tsaz-detail__text a:hover {
	color: var(--tsaz-red);
}

.tsaz-detail__text img {
	max-width: 100%;
	height: auto;
}

.tsaz-detail__text .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.tsaz-detail__text .alignleft { float: left; margin: 0 1em 1em 0; }
.tsaz-detail__text .alignright { float: right; margin: 0 0 1em 1em; }
.tsaz-detail__text .wp-caption { max-width: 100%; }
.tsaz-detail__text .wp-caption-text { font-size: 13px; color: var(--tsaz-muted); margin-top: 6px; }

.tsaz-detail__text table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.35;
	background: var(--tsaz-grey);
	border-radius: 10px;
	overflow: hidden;
}

.tsaz-detail__text th,
.tsaz-detail__text td {
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid #dedede;
	text-align: left;
	vertical-align: baseline;
}

.tsaz-detail__text tr:last-child td { border-bottom: 0; }
.tsaz-detail__text td:first-child { font-weight: 700; white-space: nowrap; }

.tsaz .tsaz-detail__links {
	clear: both;
	margin: 24px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
}

.tsaz .tsaz-detail__link {
	font-size: 16px;
	font-weight: 700;
	color: var(--tsaz-ink);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.tsaz .tsaz-detail__link:hover {
	color: var(--tsaz-red);
}

html.tsaz-lock,
html.tsaz-lock body {
	overflow: hidden;
}
