/* ==========================================================================
   Poběž 1 km a pomáhej – Srdce dětem
   Mobile-first, layout výhradně přes flexbox, jediný breakpoint 768px.
   ========================================================================== */

/* --- Font ---------------------------------------------------------------- */

@font-face {
	font-family: "LidlFontPro";
	src: url("../fonts/LidlFontPro-Book.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "LidlFontPro";
	src: url("../fonts/LidlFontPro-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "LidlFontPro";
	src: url("../fonts/LidlFontPro-Semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "LidlFontPro";
	src: url("../fonts/LidlFontPro-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* --- Proměnné ------------------------------------------------------------ */

:root {
	--color-blue: #0050aa;
	--color-blue-dark: #003c80;
	--color-red: #e60a14;
	--color-red-dark: #c40810;
	--color-white: #fff;
	--color-black: #353b42;
	--color-gray: #929292;
	--color-light-gray: #d5d5d5;
	--color-bg: #f4f5f6;
	--color-green: #3f7d3f;

	--radius: 8px;
	--radius-sm: 6px;
	--gap: 14px;
	--field-height: 52px;
}

/* --- Reset --------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--color-bg);
	color: var(--color-black);
	font-family: "LidlFontPro", Arial, Helvetica, sans-serif;
	font-weight: 300;
	font-size: 18px;
	line-height: 1.35;
}

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

a {
	color: inherit;
}

/* Skrytí pro čtečky – prvek zůstává v tab pořadí (na rozdíl od display:none). */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --- Stránka ------------------------------------------------------------- */

.page {
	max-width: 1024px;
	margin: 0 auto;
	padding: 24px 16px 48px;
}

/* --- Hlavička ------------------------------------------------------------ */

.page__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-bottom: 28px;
	text-align: center;
}

.page__logo {
	flex: 0 0 auto;
	display: block;
	line-height: 0;
}

.page__logo img {
	width: 150px;
	height: auto;
}

.page__titles {
	flex: 1 1 auto;
	min-width: 0;
}

.page__title {
	margin: 0;
	font-size: 2.1rem;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.01em;
}

.page__subtitle {
	margin: 6px 0 0;
	font-size: 1.35rem;
	font-weight: 300;
}

/* --- Krok ---------------------------------------------------------------- */

.step {
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	min-width: 0; /* fieldset jinak nerespektuje flex shrink potomků */
}

.step__title {
	display: block;
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	font-size: 1.2rem;
	font-weight: 700;
}

.step__num {
	font-weight: 700;
}

/* --- 1. Karty s typem běhu ----------------------------------------------- */

.cards {
	display: flex;
	flex-direction: column;
	gap: var(--gap);
}

.cards__item {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
}

/* Radio je vizuálně skryté, ale ovladatelné z klávesnice. */
.cards__input,
.amounts__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.card {
	--accent: var(--color-blue);

	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	background-color: var(--color-white);
	border: 2px solid var(--color-light-gray);
	border-radius: var(--radius);
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
	border-color: var(--accent);
}

.cards__input:checked + .card {
	--accent: var(--color-red);

	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cards__input:focus-visible + .card {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

/* SVG dědí barvu přes fill="currentColor", takže se přebarví spolu s kartou. */
.card__icon {
	flex: 0 0 auto;
	width: auto;
	height: 50px;
	color: var(--accent);
	transition: color 0.15s;
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.card__title {
	color: var(--accent);
	font-size: 1.05rem;
	font-weight: 700;
	transition: color 0.15s;
}

.card__text {
	font-weight: 300;
	font-size: 0.95rem;
}

/* --- 2. Výše příspěvku --------------------------------------------------- */

.amounts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap);
}

.amounts__item {
	flex: 1 1 calc(50% - var(--gap));
	min-width: 0;
	display: flex;
}

.amount {
	--accent: var(--color-blue);
	--accent-dark: var(--color-blue-dark);

	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--field-height);
	padding: 10px 18px;
	background-color: var(--accent);
	border: 2px solid var(--accent);
	border-radius: var(--radius-sm);
	color: var(--color-white);
	font-size: 1.15rem;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.amount:hover {
	background-color: var(--accent-dark);
	border-color: var(--accent-dark);
}

/* Vybraná částka je červená, nevybraná modrá – stejná logika jako u karet. */
.amounts__input:checked + .amount {
	--accent: var(--color-red);
	--accent-dark: var(--color-red-dark);

	box-shadow: 0 0 0 3px rgba(230, 10, 20, 0.25);
}

.amounts__input:focus-visible + .amount {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

/* Vlastní částka – bílé pole s rámečkem, ne barevná pilulka. */
.amount--own {
	padding: 0;
	background-color: var(--color-white);
	border-color: var(--color-light-gray);
	cursor: text;
}

.amount--own:hover {
	background-color: var(--color-white);
	border-color: var(--color-gray);
}

.amounts__input:checked + .amount--own {
	background-color: var(--color-white);
	border-color: var(--color-red);
	box-shadow: 0 0 0 3px rgba(230, 10, 20, 0.18);
}

.amount__field {
	width: 100%;
	height: 100%;
	min-height: calc(var(--field-height) - 4px);
	padding: 10px 16px;
	background: transparent;
	border: 0;
	border-radius: inherit;
	color: var(--color-black);
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 300;
	text-align: center;
}

.amount__field::placeholder {
	color: var(--color-black);
	opacity: 1;
}

.amount__field:focus {
	outline: 0;
}

/* --- 3. Osobní údaje ----------------------------------------------------- */

.fields {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap);
}

.fields__item {
	flex: 1 1 100%;
	min-width: 0;
	display: flex;
}

.field {
	flex: 1 1 auto;
	width: 100%;
	min-height: var(--field-height);
	padding: 12px 18px;
	background-color: var(--color-white);
	border: 2px solid var(--color-light-gray);
	border-radius: var(--radius-sm);
	color: var(--color-black);
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 300;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.field::placeholder {
	color: var(--color-black);
	opacity: 1;
}

.field:hover {
	border-color: var(--color-gray);
}

.field:focus {
	border-color: var(--color-blue);
	box-shadow: 0 0 0 3px rgba(0, 80, 170, 0.18);
	outline: 0;
}

/* Chybu hlásíme, až když uživatel něco napsal – ne u prázdného pole. */
.field:invalid:not(:placeholder-shown) {
	border-color: var(--color-red);
}

/* --- Souhlas ------------------------------------------------------------- */

.consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 22px 0;
	font-size: 1rem;
}

.consent__box {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--color-white);
	border: 2px solid var(--color-light-gray);
	border-radius: 4px;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s, background-color 0.15s;
}

.consent__box:hover {
	border-color: var(--color-gray);
}

/* Fajfka nakreslená rámečkem, žádný obrázek. */
.consent__box::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 7px;
	width: 6px;
	height: 12px;
	border: solid var(--color-white);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.15s;
}

.consent__box:checked {
	background-color: var(--color-blue);
	border-color: var(--color-blue);
}

.consent__box:checked::after {
	transform: rotate(45deg) scale(1);
}

.consent__box:focus-visible {
	outline: 3px solid var(--color-blue);
	outline-offset: 2px;
}

.consent__label {
	flex: 1 1 auto;
	cursor: pointer;
}

.consent__label a {
	color: inherit;
	text-decoration: underline;
}

.consent__label a:hover {
	color: var(--color-blue);
}

/* --- Tlačítka ------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--field-height);
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.btn--submit {
	width: 100%;
	min-height: 62px;
	background-color: var(--color-blue);
	border-color: var(--color-blue);
	color: var(--color-white);
	font-size: 1.3rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.btn--submit:hover {
	background-color: var(--color-blue-dark);
	border-color: var(--color-blue-dark);
}

.btn--back {
	background-color: var(--color-white);
	border-color: var(--color-light-gray);
	color: var(--color-black);
	font-weight: 300;
}

.btn--back:hover {
	border-color: var(--color-gray);
}

.btn:focus-visible {
	outline: 3px solid var(--color-blue);
	outline-offset: 2px;
}

/* --- Patička formuláře --------------------------------------------------- */

.foot {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	gap: 14px;
	margin-top: 16px;
}

.foot__payu {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	font-size: 0.95rem;
	text-align: center;
}

.icon-lock {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: var(--color-green);
}

/* --- Obsahová patička ---------------------------------------------------- */

.about {
	margin-top: 40px;
	padding: 24px 20px;
	background-color: var(--color-white);
	border-radius: var(--radius);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.about__title {
	margin: 0 0 16px;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.15;
}

.about__text {
	margin: 0 0 16px;
	max-width: 68ch;
	line-height: 1.55;
}

.about__legal {
	margin: 28px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--color-light-gray);
	color: var(--color-gray);
	font-size: 0.8rem;
	line-height: 1.5;
}

.operator {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-top: 32px;
	text-align: center;
}

.operator__logo {
	flex: 0 0 auto;
	width: 130px;
	height: auto;
}

.operator__info {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.9rem;
	font-style: normal; /* <address> je v prohlížečích kurzívou */
	line-height: 1.6;
}

.operator__label,
.operator__name,
.operator__contact {
	display: block;
}

.operator__label {
	margin-bottom: 10px;
	color: var(--color-gray);
}

.operator__name {
	font-size: 1.25rem;
	font-weight: 700;
}

.operator__contact {
	margin-top: 10px;
}

.operator__info a {
	color: var(--color-blue);
	text-decoration: underline;
}

.operator__info a:hover {
	color: var(--color-blue-dark);
}

/* --- Desktop ------------------------------------------------------------- */

@media (min-width: 768px) {

	.page {
		padding: 32px 24px 64px;
	}

	.page__header {
		flex-direction: row;
		align-items: center;
		gap: 28px;
		margin-bottom: 34px;
		text-align: left;
	}

	.page__logo img {
		width: 190px;
	}

	.page__title {
		font-size: 3.4rem;
	}

	.page__subtitle {
		font-size: 1.7rem;
	}

	.cards {
		flex-direction: row;
	}

	.amounts {
		flex-wrap: nowrap;
	}

	.amounts__item {
		flex: 1 1 0;
	}

	/* Vlastní částka má delší text, tak dostane víc místa. */
	.amounts__item--own {
		flex: 1.4 1 0;
	}

	.fields__item {
		flex: 1 1 calc(50% - var(--gap));
	}

	.foot {
		flex-direction: row;
		justify-content: flex-start;
		gap: 20px;
	}

	.foot__payu {
		/* Text zůstane opticky uprostřed, tlačítko Zpět vlevo. */
		margin-right: 96px;
	}

	.about {
		margin-top: 48px;
		padding: 36px 40px;
	}

	.about__title {
		font-size: 2rem;
	}

	.operator {
		flex-direction: row;
		align-items: center;
		gap: 30px;
		margin-top: 36px;
		text-align: left;
	}

	.operator__logo {
		width: 160px;
	}
}

/* --- Omezení animací ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
