@import "/shared/css/root.css?v=1.4";

/* barva se přepíná podle vybrané pobočky (data-gym na body) */
:root {
	--accent-color: var(--color-red);
}

body[data-gym="pelhrimov"] {
	--accent-color: var(--color-purple);
}

body.modal-open {
	overflow: hidden;
}

/****************************
    NAVBAR (navbar.htm)
****************************/
.burger-menu li:hover {
	background-color: var(--accent-color);
}

.burger-menu li.nav-accent {
	border: 1px solid var(--accent-color);
	border-radius: 10px;
}

.nav-link-accent {
	border: 1px solid var(--accent-color);
}

.nav-link-accent:hover {
	color: white;
	background: var(--accent-color);
}

.footer-section h3::after {
	background: var(--accent-color);
}

/****************************
    COOKIES BAR
****************************/
#cookieDecline {
	background: var(--accent-color);
}

.cookie-bar a {
	color: var(--accent-color);
}

/****************************
    SECTION CVIKY
****************************/
#section-cviky {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 40px 100px;
}

#section-cviky .headline {
	padding-top: 70px;
	margin-bottom: 20px;
}

.cviky-intro {
	color: #bbb;
	font-size: 1rem;
	line-height: 1.6;
	text-align: center;
	max-width: 760px;
	margin: 0 auto 40px;
}

/* --- upozornění, že videa potřebují souhlas s cookies --- */
.cviky-consent {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	max-width: 900px;
	margin: 0 auto 50px;
	background: #111;
	padding: 25px 30px;
	border-radius: 12px;
	box-sizing: border-box;
}

.cviky-consent.active {
	display: flex;
}

.cviky-consent p {
	color: #ccc;
	font-size: 0.95rem;
	line-height: 1.6;
}

.cviky-consent-btn,
.cvik-consent-btn {
	flex-shrink: 0;
	background: #fff;
	color: #000;
	font-weight: 700;
	text-decoration: none;
	padding: 12px 22px;
	border-radius: 8px;
	transition: all 0.25s ease;
}

.cviky-consent-btn:hover,
.cvik-consent-btn:hover {
	background: var(--accent-color);
	color: #fff;
}

/* --- výběr pobočky --- */
.gym-filter {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 50px;
}

.gym-filter span {
	font-weight: 600;
	text-transform: uppercase;
	color: #aaa;
}

.gym-btn {
	background: transparent;
	border: none;
	color: #fff;
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 10px 22px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.gym-btn.active[data-gym="jihlava"],
.gym-btn:hover[data-gym="jihlava"] {
	background: var(--color-red);
}

.gym-btn.active[data-gym="pelhrimov"],
.gym-btn:hover[data-gym="pelhrimov"] {
	background: var(--color-purple);
}

/* --- kategorie + hledání --- */
.cviky-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 50px;
}

.category-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.category-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #111;
	border: none;
	color: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 10px 18px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
	background: var(--accent-color);
}

.category-count {
	font-size: 0.75rem;
	color: #777;
	transition: color 0.3s ease;
}

.category-btn:hover .category-count,
.category-btn.active .category-count {
	color: rgba(255, 255, 255, 0.75);
}

.cviky-search {
	flex: 0 0 260px;
	background: #111;
	border: 1px solid #262626;
	border-radius: 8px;
	color: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	padding: 10px 16px;
	outline: none;
	transition: border-color 0.25s ease;
}

.cviky-search::placeholder {
	color: #777;
}

.cviky-search:focus {
	border-color: var(--accent-color);
}

/* --- skupiny a mřížka videí --- */
.cviky-list.animate {
	animation: cvikyIn 0.3s ease;
}

.cviky-group {
	margin-bottom: 60px;
}

.cviky-group:last-child {
	margin-bottom: 0;
}

.cviky-group-title {
	display: flex;
	align-items: baseline;
	gap: 12px;
	color: #fff;
	font-size: 1.8rem;
	font-weight: 800;
	text-transform: uppercase;
	border-left: 5px solid var(--accent-color);
	padding-left: 14px;
	line-height: 1.1;
	margin-bottom: 25px;
}

.cviky-group-title span {
	font-size: 0.9rem;
	font-weight: 600;
	color: #777;
}

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

/* --- karta videa (vychází z karty trenéra) --- */
.cvik-card {
	display: flex;
	flex-direction: column;
	background: #111;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	overflow: hidden;
	color: #eee;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cvik-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

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

.cvik-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
}

.cvik-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.cvik-card:hover .cvik-thumb img {
	transform: scale(1.05);
}

/* bez souhlasu s cookies se náhled z YouTube nenačte */
.cvik-thumb-consent {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	color: #777;
	font-size: 0.85rem;
	line-height: 1.5;
	text-align: center;
	transition: color 0.25s ease;
}

.cvik-card:hover .cvik-thumb-consent {
	color: #bbb;
}

/* play ikona */
.cvik-play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	transition: transform 0.25s ease, background 0.25s ease;
}

.cvik-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-35%, -50%);
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.cvik-card:hover .cvik-play {
	background: var(--accent-color);
	transform: scale(1.1);
}

.cvik-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 1rem 1.5rem;
	flex-grow: 1;
}

.cvik-category {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 2px;
	color: #888;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.cvik-name {
	font-size: 1.15rem;
	font-weight: 600;
	color: #fff;
	line-height: 1.25;
}

.cvik-btn {
	flex-shrink: 0;
	background: #fff;
	color: #000;
	padding: 0.5rem 1rem;
	border-radius: 10px;
	font-weight: 500;
	font-size: 0.95rem;
	transition: all 0.25s ease;
}

.cvik-card:hover .cvik-btn {
	background: var(--accent-color);
	color: #fff;
}

/* --- prázdný stav --- */
.cviky-empty {
	color: #aaa;
	text-align: center;
	padding: 40px 0;
}

@keyframes cvikyIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/****************************
    VIDEO MODAL
****************************/
.cvik-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cvik-modal.active {
	opacity: 1;
	visibility: visible;
}

.cvik-modal-content {
	width: 100%;
	max-width: 1100px;
	max-height: 100%;
	overflow-y: auto;
	background: #0e0e0e;
	border-radius: 20px;
	padding: 25px 30px 30px;
	box-sizing: border-box;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.cvik-modal.active .cvik-modal-content {
	animation: modalFadeIn 0.35s ease;
}

.cvik-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 18px;
}

.cvik-modal-header h3 {
	color: #fff;
	font-size: 1.6rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.2;
}

.close-modal {
	background: none;
	border: none;
	color: var(--accent-color);
	font-size: 38px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.2s ease, color 0.25s ease;
}

.close-modal:hover {
	transform: scale(1.15);
	color: #fff;
}

.cvik-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: calc(100svh - 190px);
	background: #000;
	border-radius: 12px;
	overflow: hidden;
}

.cvik-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cvik-modal-yt,
.cvik-consent-link {
	display: inline-block;
	margin-top: 16px;
	color: #aaa;
	font-size: 0.9rem;
	text-decoration: underline;
	text-decoration-color: var(--accent-color);
	text-underline-offset: 4px;
	transition: color 0.25s ease;
}

.cvik-modal-yt:hover,
.cvik-consent-link:hover {
	color: #fff;
}

/* bez souhlasu s cookies je místo přehrávače text s odkazem na YouTube */
.cvik-consent {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 25px;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 12px;
	padding: 40px;
	box-sizing: border-box;
	text-align: center;
}

.cvik-modal.no-consent .cvik-consent {
	display: flex;
}

.cvik-modal.no-consent .cvik-frame,
.cvik-modal.no-consent .cvik-modal-yt {
	display: none;
}

.cvik-consent p {
	color: #ccc;
	font-size: 1rem;
	line-height: 1.7;
	max-width: 600px;
}

.cvik-consent-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 15px 30px;
}

.cvik-consent-link {
	margin-top: 0;
}

@keyframes modalFadeIn {
	from {
		transform: translateY(30px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/****************************
    RESPONSIVNES
****************************/
@media (max-width: 900px) {
	.cviky-toolbar {
		flex-direction: column;
		align-items: stretch;
		margin-bottom: 40px;
	}

	.cviky-search {
		flex-basis: auto;
	}
}

@media (max-width: 600px) {
	#section-cviky {
		padding: 0 20px 80px;
	}

	#section-cviky .headline {
		padding-top: 50px;
	}

	.gym-filter {
		gap: 8px;
		margin-bottom: 35px;
	}

	.gym-btn {
		font-size: 1rem;
		padding: 8px 16px;
	}

	.category-btn {
		font-size: 0.8rem;
		padding: 8px 14px;
	}

	.cviky-group {
		margin-bottom: 45px;
	}

	.cviky-group-title {
		font-size: 1.4rem;
		margin-bottom: 20px;
	}

	/* na mobilu 2 sloupce, ať se nemusí scrollovat přes 35 velkých karet */
	.cviky-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.cvik-card {
		border-radius: 12px;
	}

	.cvik-info {
		padding: 10px 12px 12px;
	}

	.cvik-name {
		font-size: 0.9rem;
	}

	.cvik-btn {
		display: none;
	}

	.cvik-play {
		width: 40px;
		height: 40px;
		margin: -20px 0 0 -20px;
	}

	.cvik-play::after {
		border-width: 7px 0 7px 12px;
	}

	.cvik-thumb-consent {
		padding: 10px;
		font-size: 0.7rem;
		line-height: 1.4;
	}

	.cvik-modal {
		padding: 10px;
	}

	.cvik-modal-content {
		padding: 18px 16px 20px;
		border-radius: 16px;
	}

	.cvik-modal-header h3 {
		font-size: 1.2rem;
	}

	.cviky-consent {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		padding: 20px;
		margin-bottom: 35px;
	}

	.cvik-consent {
		padding: 25px 18px;
		gap: 20px;
	}

	.cvik-consent p {
		font-size: 0.9rem;
	}
}

@media (max-width: 340px) {
	.cviky-grid {
		grid-template-columns: 1fr;
	}
}
