/*
Theme Name: Fitness Slunce
Theme URI: https://fitness-slunce.cz/
Author: FH Media
Author URI: https://fhmedia.cz/
Description: Bloková šablona pro Fitness Slunce Tábor. Editace přímo ve WordPressu bez page builderu.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fitness-slunce
*/

/* ---------- Základ ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }

/* Nadpisy: diakritika u písma Anton potřebuje prostor */
h1, h2, h3, h4, .wp-block-heading { text-wrap: balance; }

/* Nadpis nad sekcí (malý, proložený, velkými písmeny) */
.fs-eyebrow {
	font-size: 14px !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.4;
}

/* Řádek ceníku / otevírací doby: popis vlevo, cena vpravo */
.fs-row {
	display: flex !important;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--preset--color--line-light);
}
.fs-row:last-child { border-bottom: 0; }
.fs-row > * { margin: 0 !important; }
.fs-row > :first-child { min-width: 0; }
.fs-row > :last-child { white-space: nowrap; flex-shrink: 0; text-align: right; font-weight: 700; }
.has-black-background-color .fs-row,
.fs-dark .fs-row { border-bottom-color: var(--wp--preset--color--line-dark); }

/* Karty */
.fs-card { border-radius: 10px; overflow: hidden; }
.fs-card > .wp-block-image { margin: 0; }
.fs-card > .wp-block-image img { border-radius: 0; width: 100%; height: 240px; object-fit: cover; display: block; }
.fs-card-body { padding: 24px 24px 28px; }
.fs-card a { text-decoration: none; }

/* Rozvrh */
.fs-schedule { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fs-day { border: 1px solid #26262A; border-radius: 10px; }
.fs-day > * { margin-block-start: 0; }
.fs-slot { border-top: 1px solid var(--wp--preset--color--line-dark); padding-top: 12px; margin-top: 14px !important; }
.fs-slot p { margin: 0 !important; }
.fs-slot .fs-time { font-size: 13px; font-weight: 700; color: var(--wp--preset--color--red-light); }
.fs-slot .fs-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.fs-slot .fs-name a { color: #fff; text-decoration: underline; text-decoration-color: #4A4A50; text-underline-offset: 3px; }
.fs-slot .fs-who { font-size: 13px; color: var(--wp--preset--color--muted-light); }

/* Mřížky karet, které se samy zalamují */
.fs-grid-4 { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.fs-grid-3 { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.fs-grid-trainers { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fs-grid-4 > *, .fs-grid-3 > *, .fs-grid-trainers > *, .fs-schedule > * { margin: 0 !important; }

/* Karta trenéra (odkaz se šipkou) */
.fs-trainer { border-radius: 8px; position: relative; }
.fs-trainer p { margin: 0 !important; }
.fs-trainer .fs-trainer-name a { color: inherit; text-decoration: none; font-weight: 600; }
.fs-trainer .fs-trainer-name a::after { content: ""; position: absolute; inset: 0; }
.fs-trainer::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px;
	border-right: 2.2px solid var(--wp--preset--color--red-dark); border-top: 2.2px solid var(--wp--preset--color--red-dark);
	transform: translateY(-50%) rotate(45deg);
}
.fs-trainer:hover { outline: 2px solid var(--wp--preset--color--red); }

/* Tlačítka */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor; color: inherit; background: transparent;
	padding: 14px 25px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(127,127,127,.12); color: inherit; }

/* Hlavička */
.fs-header .wp-block-navigation a { color: #E8E8EA; }
.fs-header .wp-block-navigation a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--wp--preset--color--red); }
.fs-header .wp-block-navigation__submenu-container { background: var(--wp--preset--color--black) !important; border: 1px solid #26262A !important; border-radius: 8px; padding: 8px 0; min-width: 220px !important; }
.fs-header .wp-block-navigation__submenu-container a { padding: 8px 16px !important; }
.fs-header .wp-block-site-logo img { width: auto; height: 60px; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open { padding: 28px; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open a { font-size: 20px; }
@media (max-width: 600px) {
	.fs-header .wp-block-site-logo img { height: 48px; }
	.fs-header-cta { display: none !important; }
}

/* Patička */
.fs-footer a { color: var(--wp--preset--color--muted-light); text-decoration: none; }
.fs-footer a:hover { color: #fff; }

/* Úvodní fotka: na mobilu tmavší překryv kvůli čitelnosti */
@media (max-width: 720px) {
	.fs-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(10,10,11,.8) 0%, rgba(10,10,11,.9) 100%) !important; opacity: 1 !important; }
	.fs-hero { min-height: 0 !important; padding-top: 72px !important; padding-bottom: 64px !important; }
	.fs-tall img { height: 360px !important; }
}

/* Vysoké fotky v sekcích */
.fs-tall img { width: 100%; object-fit: cover; }

/* Galerie */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 8px; }

/* Text profilů a lekcí */
.fs-prose ul { padding-left: 1.2em; }
.fs-prose li { margin-bottom: 6px; }

/* Přístupnost */
:where(a, button):focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 3px; }
.screen-reader-text:focus { clip: auto !important; }

/* Odkazy v nadpisech karet */
.fs-card h3 a, .fs-card .wp-block-heading a { color: inherit; text-decoration: none; }
.fs-card h3 a:hover { color: var(--wp--preset--color--red); }
.fs-card a:hover img { opacity: .92; }

/* Karty bez výchozího odsazení skupiny s pozadím (cenové karty mají vlastní) */
.fs-card { padding: 0; }
.fs-tall img { height: 520px; }

/* Sekce stránek na sebe navazují bez mezery */
.fs-sections > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* Fotka v kartě vždy přes celou šířku, i když je obalená odkazem */
.fs-card > .wp-block-image a { display: block; }

/* Členství: cena za měsíc a zvýraznění nejvýhodnější varianty */
.fs-permonth { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--wp--preset--color--muted-light); }
.fs-row-best {
	position: relative;
	margin: 22px -14px 0 !important;
	padding: 18px 14px 14px !important;
	border: 1.5px solid var(--wp--preset--color--red) !important;
	border-radius: 8px;
	background: rgba(227, 6, 19, .12);
}
.fs-row-best .fs-permonth { color: var(--wp--preset--color--red-light); font-weight: 600; }
.fs-badge {
	position: absolute;
	top: -11px;
	left: 12px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--wp--preset--color--red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.4;
	white-space: nowrap;
}

/* =========================================================
   Prémiová vrstva: hlavička, hero, detaily, pohyb
   ========================================================= */
::selection { background: var(--wp--preset--color--red); color: #fff; }
:root { --fs-ease: cubic-bezier(.2, .7, .2, 1); --fs-header-h: 92px; }

/* --- Hlavička: lepí se nahoře, přes úvodní fotku je průhledná, po scrollu matné sklo --- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}
.fs-header {
	position: relative;
	transition: background-color .35s var(--fs-ease), padding .35s var(--fs-ease);
}
/* Sklo na pseudo-prvku: rozmazání přímo na hlavičce by rozbilo mobilní menu přes celou obrazovku */
.fs-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	background: rgba(12, 12, 13, .78);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	border-bottom: 1px solid rgba(255, 255, 255, .07);
	transition: opacity .35s var(--fs-ease);
}
.fs-header .wp-block-site-logo img { transition: height .35s var(--fs-ease); }
.fs-scrolled .fs-header { padding-top: 10px !important; padding-bottom: 10px !important; }
.fs-scrolled .fs-header::before { opacity: 1; }
.fs-scrolled .fs-header .wp-block-site-logo img { height: 48px; }

/* Stránky začínající velkou fotkou: hlavička leží přes ni */
body:has(.fs-sections > .wp-block-cover:first-child) .wp-site-blocks > header.wp-block-template-part {
	position: fixed;
	left: 0;
	right: 0;
}
body:has(.fs-sections > .wp-block-cover:first-child) .fs-header {
	background: linear-gradient(180deg, rgba(10, 10, 11, .55) 0%, rgba(10, 10, 11, 0) 100%) !important;
}
body:has(.fs-sections > .wp-block-cover:first-child) .fs-sections > .wp-block-cover:first-child {
	padding-top: calc(var(--fs-header-h) + 56px) !important;
}
.fs-header .wp-block-navigation-item__content { position: relative; }
.fs-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 2px;
	background: var(--wp--preset--color--red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--fs-ease);
}
.fs-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.fs-header .wp-block-navigation a:hover { text-decoration: none; }
.fs-header .wp-block-navigation__submenu-container {
	background: rgba(14, 14, 15, .96) !important;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .6);
}

/* --- Úvodní fotka --- */
@media (min-width: 721px) {
	.fs-hero { min-height: min(94vh, 900px) !important; }
	.fs-hero h1 { font-size: clamp(56px, 7vw, 104px) !important; letter-spacing: .005em; }
}
.fs-hero .wp-block-cover__image-background { animation: fs-hero-in 2.2s var(--fs-ease) both; }
@keyframes fs-hero-in { from { transform: scale(1.08); } to { transform: scale(1); } }
.fs-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 140px;
	background: linear-gradient(180deg, rgba(15, 15, 16, 0) 0%, var(--wp--preset--color--black) 100%);
	pointer-events: none;
}
.fs-hero .wp-block-cover__inner-container { position: relative; z-index: 2; }
.fs-page-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 90px;
	background: linear-gradient(180deg, rgba(15, 15, 16, 0) 0%, rgba(15, 15, 16, .6) 100%);
	pointer-events: none;
}
.fs-page-hero .wp-block-cover__inner-container { position: relative; z-index: 2; }

/* --- Nadpisek sekce s červenou linkou --- */
.fs-eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.fs-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; flex: none; }

/* --- Tlačítka --- */
.wp-block-button__link { transition: transform .25s var(--fs-ease), box-shadow .25s var(--fs-ease), background-color .25s, color .25s; }
.wp-block-button:not(.is-style-outline) > .wp-block-button__link::after {
	content: "→";
	display: inline-block;
	margin-left: 10px;
	transition: transform .25s var(--fs-ease);
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px -10px rgba(227, 6, 19, .55);
}
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover::after { transform: translateX(4px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { transform: translateY(-2px); }

/* --- Pruh s fakty --- */
.fs-facts .fs-grid-4 { gap: 0; }
.fs-facts .fs-grid-4 > * { padding: 6px 28px; border-left: 1px solid var(--wp--preset--color--line-dark); }
.fs-facts .fs-grid-4 > :first-child { padding-left: 0; border-left: 0; }
.fs-facts .fs-grid-4 > * > :first-child { font-size: clamp(34px, 3.4vw, 46px) !important; }
@media (max-width: 1100px) {
	.fs-facts .fs-grid-4 { grid-template-columns: 1fr 1fr; row-gap: 26px; }
	.fs-facts .fs-grid-4 > * { padding: 0 0 0 20px; }
	.fs-facts .fs-grid-4 > :nth-child(odd) { padding-left: 0; border-left: 0; }
}

/* --- Tmavé sekce: jemná červená záře --- */
.fs-dark { position: relative; isolation: isolate; }
.fs-dark::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(55% 60% at 100% 0%, rgba(227, 6, 19, .13) 0%, rgba(227, 6, 19, 0) 70%),
		radial-gradient(40% 50% at 0% 100%, rgba(227, 6, 19, .06) 0%, rgba(227, 6, 19, 0) 70%);
}

/* --- Karty --- */
.fs-card {
	transition: transform .45s var(--fs-ease), box-shadow .45s var(--fs-ease);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 0 0 1px rgba(0, 0, 0, .04);
}
.fs-card.fs-dark { box-shadow: none; }
.fs-grid-4 .fs-card:hover, .fs-grid-trainers-photo .fs-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .04);
}
.fs-card > .wp-block-image { overflow: hidden; }
.fs-card > .wp-block-image img { transition: transform .9s var(--fs-ease), opacity .3s; }
.fs-card:hover > .wp-block-image img { transform: scale(1.06); opacity: 1; }
/* Čísla zón 01-04 */
#posilovna .fs-grid-4 { counter-reset: fs-zone; }
#posilovna .fs-grid-4 > .fs-card .fs-card-body h3::before {
	counter-increment: fs-zone;
	content: "0" counter(fs-zone);
	display: block;
	margin-bottom: 10px;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--wp--preset--color--red-dark);
}

/* --- Rozvrh --- */
.fs-day { transition: border-color .3s, transform .3s var(--fs-ease); }
.fs-day:hover { border-color: #3A3A40; }
.fs-day.is-today { border-color: var(--wp--preset--color--red); box-shadow: 0 0 0 1px var(--wp--preset--color--red) inset; position: relative; }
.fs-day.is-today h3::after {
	content: "Dnes";
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--wp--preset--color--red);
	color: #fff;
	font-family: var(--wp--preset--font-family--inter);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	vertical-align: 4px;
}
@media (max-width: 720px) {
	.fs-schedule {
		display: flex !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 12px;
		margin-right: calc(-1 * var(--wp--style--root--padding-right, 20px));
		padding-right: var(--wp--style--root--padding-right, 20px);
		padding-bottom: 8px;
		scrollbar-width: none;
	}
	.fs-schedule::-webkit-scrollbar { display: none; }
	.fs-schedule > .fs-day { flex: 0 0 72%; scroll-snap-align: start; }
}

/* --- Trenéři: seznam s fotkami --- */
.fs-trainer { transition: transform .3s var(--fs-ease), box-shadow .3s var(--fs-ease); }
.fs-trainer:hover { outline: 0; transform: translateY(-2px); box-shadow: 0 16px 32px -18px rgba(0, 0, 0, .35), 0 0 0 1.5px var(--wp--preset--color--red); }
.fs-trainer .fs-avatar { margin: 0 !important; flex: none; }
.fs-trainer .fs-avatar img { width: 48px !important; height: 48px !important; border-radius: 50%; object-fit: cover; object-position: 50% 25%; display: block; }

/* --- Profil trenéra a texty --- */
.fs-prose ul.fs-checks, .fs-prose ul.fs-list-2col { list-style: none; padding-left: 0; }
.fs-prose ul.fs-checks li, .fs-prose ul.fs-list-2col li { position: relative; padding-left: 26px; }
.fs-prose ul.fs-checks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .5em;
	width: 10px;
	height: 6px;
	border-left: 2px solid var(--wp--preset--color--red);
	border-bottom: 2px solid var(--wp--preset--color--red);
	transform: rotate(-45deg);
}
.fs-prose ul.fs-list-2col { columns: 2 260px; column-gap: 32px; }
.fs-prose ul.fs-list-2col li { break-inside: avoid; }
.fs-prose ul.fs-list-2col li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .55em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--red);
}
.fs-prose ul.fs-pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fs-prose ul.fs-pills li {
	margin: 0;
	padding: 8px 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line-light);
	font-size: 15px;
	line-height: 1.3;
}
.fs-tall img { border-radius: 12px; }
@media (min-width: 782px) {
	.fs-profile-photo { position: sticky; top: calc(var(--fs-header-h) + 24px); align-self: flex-start; }
}

/* --- Galerie --- */
.wp-block-gallery.has-nested-images figure.wp-block-image { overflow: hidden; border-radius: 10px; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { transition: transform .9s var(--fs-ease); }
.wp-block-gallery.has-nested-images figure.wp-block-image:hover img { transform: scale(1.05); }

/* --- Patička --- */
.fs-footer-grid { display: grid !important; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.fs-footer-grid > * { margin: 0 !important; }
.fs-footer h4 { margin: 0 0 14px !important; font-family: var(--wp--preset--font-family--inter); font-size: 12px !important; font-weight: 700; letter-spacing: .14em; color: #fff; }
.fs-footer p { margin: 0 0 6px !important; line-height: 1.6; }
.fs-footer .fs-footer-bottom { border-top: 1px solid #1F1F23; padding-top: 22px; margin-top: 48px !important; }
.fs-footer .wp-block-social-links { gap: 10px; }
.fs-footer .wp-block-social-links .wp-social-link { background: #1B1B1E !important; color: #fff !important; transition: background-color .25s; }
.fs-footer .wp-block-social-links .wp-social-link:hover { background: var(--wp--preset--color--red) !important; transform: none; }
@media (max-width: 960px) { .fs-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fs-footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* --- Vyjíždění obsahu při scrollu (zapíná skript) --- */
.fs-reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--fs-ease), transform .8s var(--fs-ease) !important; }
.fs-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.fs-footer { border-top: 1px solid #1F1F23; }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.fs-footer .wp-block-social-links { font-size: 20px; }
.fs-grid-trainers { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; }

/* Mobilní menu: čistý seznam zarovnaný doleva, podmenu bez rámečků */
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start !important; padding-top: 24px; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: flex-start !important; text-align: left; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 22px !important; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--anton); font-size: 30px !important; text-transform: uppercase; line-height: 1.2; }
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	background: transparent !important; border: 0 !important; border-left: 2px solid var(--wp--preset--color--red) !important; border-radius: 0;
	box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 4px 0 4px 16px !important; margin-top: 10px; gap: 10px !important;
}
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { font-size: 17px !important; padding: 2px 0 !important; color: var(--wp--preset--color--muted-light); }
.fs-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { display: none; }
.fs-slot .fs-who a { color: #fff; text-decoration: underline; text-decoration-color: #4A4A50; text-underline-offset: 3px; white-space: nowrap; }
.fs-lesson-trainer { margin-top: 12px !important; max-width: 420px; }
.fs-grid-3 { grid-template-columns: repeat(auto-fit, minmax(max(290px, calc((100% - 40px) / 3)), 1fr)) !important; }
