/* ==================================
   TRAINING CATALOGUE
   ================================== */

.af-catalogue__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 24px;
}

.af-catalogue__search {
	flex: 1;
	min-width: 200px;
}

.af-catalogue__search-input {
	width: 100%;
	padding: 10px 16px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	transition: border-color 0.2s;
}

.af-catalogue__search-input:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.af-catalogue__sort-select {
	padding: 10px 16px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
}

.af-catalogue__favorites-toggle {
	background: none;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px 12px;
	cursor: pointer;
	color: #999;
	transition: all 0.2s;
}

.af-catalogue__favorites-toggle--active {
	color: #e25555;
	border-color: #e25555;
	background: #fef2f2;
}

/* Filters */
.af-catalogue__filters {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.af-catalogue__filter-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.af-catalogue__filter-label {
	font-weight: 600;
	font-size: 13px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	min-width: 100px;
}

.af-catalogue__filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.af-catalogue__filter-btn {
	padding: 6px 14px;
	border: 1px solid #ddd;
	border-radius: 20px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}

.af-catalogue__filter-btn:hover {
	border-color: #999;
}

.af-catalogue__filter-btn--active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.af-catalogue__duration-inputs {
	display: flex;
	gap: 8px;
}

.af-catalogue__duration-inputs input {
	width: 100px;
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
}

/* Grid */
.af-catalogue__grid {
	display: grid;
	gap: 24px;
}

.af-catalogue__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.af-catalogue__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.af-catalogue__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
	.af-catalogue__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
	.af-catalogue__grid { grid-template-columns: 1fr; }
}

.af-catalogue__loading,
.af-catalogue__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	color: #666;
	font-size: 15px;
}

.af-catalogue__pagination {
	text-align: center;
	margin-top: 32px;
}

.af-catalogue__load-more {
	padding: 12px 32px;
	font-size: 15px;
	border-radius: 8px;
}

/* ==================================
   TRAINING CARD
   ================================== */

.af-training-card {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s, box-shadow 0.2s;
}

.af-training-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.af-training-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f0f0f1;
}

.af-training-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.af-training-card__duration {
	position: absolute;
	bottom: 8px;
	left: 8px;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}

.af-training-card__free-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #16a34a;
	color: #fff;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.af-training-card__fav {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #ccc;
	transition: all 0.2s;
}

.af-training-card__fav:hover {
	color: #e25555;
}

.af-training-card__fav--active {
	color: #e25555;
}

.af-training-card__body {
	padding: 16px;
}

.af-training-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 8px;
}

.af-training-card__badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.af-training-card__badge--difficulty {
	background: #eff6ff;
	color: #1d4ed8;
}

.af-training-card__badge--type {
	background: #f0fdf4;
	color: #15803d;
}

.af-training-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
}

.af-training-card__title a {
	color: inherit;
	text-decoration: none;
}

.af-training-card__title a:hover {
	color: #2271b1;
}

/* Locked overlay */
.af-training-card--locked .af-training-card__thumb::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(3px);
}

.af-training-card__lock-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	gap: 8px;
	opacity: 0;
	transition: opacity 0.2s;
}

.af-training-card--locked:hover .af-training-card__lock-overlay {
	opacity: 1;
}

/* ==================================
   CHALLENGE LIST
   ================================== */

.af-challenges__grid {
	display: grid;
	gap: 24px;
}

.af-challenges__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.af-challenges__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.af-challenges__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
	.af-challenges__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
	.af-challenges__grid { grid-template-columns: 1fr; }
}

.af-challenges__loading,
.af-challenges__empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	color: #666;
}

/* ==================================
   CHALLENGE CARD
   ================================== */

.af-challenge-card {
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	flex-direction: column;
}

.af-challenge-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.af-challenge-card__thumb {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f0f0f1;
}

.af-challenge-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.af-challenge-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.af-challenge-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.3;
}

.af-challenge-card__title a {
	color: inherit;
	text-decoration: none;
}

.af-challenge-card__title a:hover {
	color: #2271b1;
}

.af-challenge-card__desc {
	color: #666;
	font-size: 14px;
	margin: 0 0 12px;
	line-height: 1.5;
}

.af-challenge-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.af-challenge-card__meta-item {
	font-size: 12px;
	color: #666;
	background: #f5f5f5;
	padding: 3px 10px;
	border-radius: 4px;
}

/* Progress bar */
.af-challenge-card__progress {
	margin-bottom: 12px;
}

.af-challenge-card__progress-bar {
	height: 6px;
	background: #e5e7eb;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 4px;
}

.af-challenge-card__progress-fill {
	height: 100%;
	background: #16a34a;
	border-radius: 3px;
	transition: width 0.3s;
}

.af-challenge-card__progress-label {
	font-size: 12px;
	color: #666;
}

/* CTA buttons */
.af-challenge-card__cta {
	display: inline-block;
	text-align: center;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
	margin-top: auto;
	transition: all 0.15s;
}

.af-challenge-card__cta--start {
	background: #2271b1;
	color: #fff;
}

.af-challenge-card__cta--start:hover {
	background: #135e96;
}

.af-challenge-card__cta--continue {
	background: #16a34a;
	color: #fff;
}

.af-challenge-card__cta--continue:hover {
	background: #15803d;
}

.af-challenge-card__cta--done {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.af-challenge-card__cta--locked {
	background: #f5f5f5;
	color: #999;
	cursor: not-allowed;
}

/* ==================================
   SINGLE TRAINING
   ================================== */

.af-single-training {
	max-width: 900px;
	margin: 0 auto;
	/*padding: 24px;*/
}

.af-single-training__breadcrumb {
	margin-bottom: 12px;
}

.af-single-training__breadcrumb a {
	color: #2271b1;
	text-decoration: none;
	font-size: 14px;
}

.af-single-training__title {
	font-size: 32px;
	margin: 0 0 16px;
}

.af-single-training__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.af-single-training__meta-item {
	font-size: 13px;
	color: #555;
	background: #f5f5f5;
	padding: 4px 12px;
	border-radius: 4px;
}

.af-single-training__meta-item--free {
	background: #f0fdf4;
	color: #15803d;
	font-weight: 600;
}

/* Video embed */
.af-single-training__video {
	margin-bottom: 24px;
}

.af-single-training__video-embed {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	border-radius: 12px;
}

.af-single-training__video-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Actions */
.af-single-training__actions {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
}

@media (max-width: 480px) {
	.af-single-training__actions { flex-direction: column; }
}

.af-single-training__complete-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: 2px solid #ddd;
	border-radius: 8px;
	background: #fff;
	font-size: 15px;
	cursor: pointer;
	transition: all 0.2s;
}

.af-single-training__complete-btn:hover {
	border-color: #16a34a;
	color: #16a34a;
}

.af-single-training__complete-btn--done {
	border-color: #16a34a;
	background: #f0fdf4;
	color: #16a34a;
}

.af-single-training__fav-btn {
	display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.af-single-training__fav-btn:hover {
	color: #e25555;
	border-color: #e25555;
}

.af-single-training__fav-btn--active {
	color: #e25555;
	border-color: #e25555;
	background: #fef2f2;
}

.af-single-training__description {
	line-height: 1.7;
	font-size: 16px;
}

/* Locked state */
.af-single-training__locked {
	text-align: center;
	padding: 64px 24px;
	background: #f9fafb;
	border-radius: 12px;
}

.af-single-training__locked-icon .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #999;
}

.af-single-training__subscribe-btn {
	display: inline-block;
	padding: 14px 32px;
	background: #2271b1;
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	margin-top: 16px;
}

/* Navigation */
.af-single-training__nav {
	display: flex;
	justify-content: space-between;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e5e7eb;
}

.af-single-training__nav a {
	color: #2271b1;
	text-decoration: none;
	font-weight: 500;
}

.af-single-training__nav-next--locked {
	color: #999;
	cursor: not-allowed;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 500; 
}

.af-single-training__nav-next--locked .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ==================================
   SINGLE CHALLENGE
   ================================== */

.af-single-challenge {
	max-width: 900px;
	margin: 0 auto;
	/*padding: 24px;*/
}

.af-single-challenge__title {
	font-size: 32px;
	margin: 0 0 16px;
}

.af-single-challenge__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.af-single-challenge__meta-item {
	font-size: 13px;
	color: #555;
	background: #f5f5f5;
	padding: 4px 12px;
	border-radius: 4px;
}

.af-single-challenge__meta-item--beginner { background: #f0fdf4; color: #15803d; }
.af-single-challenge__meta-item--intermediate { background: #fffbeb; color: #b45309; }
.af-single-challenge__meta-item--advanced { background: #fef2f2; color: #dc2626; }
.af-single-challenge__meta-item--ordered { background: #eff6ff; color: #1d4ed8; }

.af-single-challenge__description {
	margin-bottom: 24px;
	line-height: 1.7;
}

/* Progress bar */
.af-single-challenge__progress-bar-wrap {
	margin-bottom: 32px;
}

.af-single-challenge__progress-bar {
	height: 10px;
	background: #e5e7eb;
	border-radius: 5px;
	overflow: hidden;
	margin-bottom: 8px;
}

.af-single-challenge__progress-fill {
	height: 100%;
	background: #16a34a;
	border-radius: 5px;
	transition: width 0.3s;
}

.af-single-challenge__progress-label {
	font-size: 14px;
	color: #666;
	font-weight: 500;
}

/* Enroll button */
.af-single-challenge__enroll {
	margin-bottom: 32px;
}

.af-single-challenge__enroll-btn {
	padding: 14px 32px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.af-single-challenge__enroll-btn:hover {
	background: #135e96;
}

/* Items list */
.af-single-challenge__items {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.af-single-challenge__heading {
	margin-top: 24px;
	margin-bottom: 8px;
}

.af-single-challenge__heading h2 {
	font-size: 20px;
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #e5e7eb;
}

.af-single-challenge__rest-day {
	padding: 12px 16px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	color: #92400e;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
}

.af-single-challenge__training {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: all 0.15s;
}

.af-single-challenge__training:hover {
	border-color: #2271b1;
	box-shadow: 0 1px 4px rgba(34, 113, 177, 0.1);
}

.af-single-challenge__training--done {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.af-single-challenge__training--locked {
	opacity: 0.5;
	cursor: not-allowed;
}

.af-single-challenge__training--locked:hover {
	border-color: #e5e7eb;
	box-shadow: none;
}

.af-single-challenge__training-index {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #f0f0f1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: #666;
	flex-shrink: 0;
}

.af-single-challenge__training--done .af-single-challenge__training-index {
	background: #16a34a;
	color: #fff;
}

.af-single-challenge__training-status {
	flex-shrink: 0;
	display: contents;
}

.af-single-challenge__training--done .af-single-challenge__training-status .dashicons {
	color: #16a34a;
}

.af-single-challenge__training--locked .af-single-challenge__training-status .dashicons {
	color: #999;
}

.af-single-challenge__training-link {
	flex: 1;
	color: #111;
	text-decoration: none;
	font-weight: 500;
}

.af-single-challenge__training-link:hover {
	color: #2271b1;
}

.af-single-challenge__training-link--disabled {
	cursor: not-allowed;
	color: #999;
}

.af-single-challenge__training-duration {
	flex-shrink: 0;
	font-size: 13px;
	color: #666;
	background: #f5f5f5;
	padding: 2px 10px;
	border-radius: 10px;
}

/* Scheduled training state */
.af-single-challenge__training--scheduled {
	background: #f9fafb;
	border-color: #e5e7eb;
	opacity: 0.7;
	cursor: default;
}

.af-single-challenge__training--scheduled .af-single-challenge__training-status .dashicons {
	color: #8b5cf6;
}

.af-single-challenge__training-scheduled-date {
	flex-shrink: 0;
	font-size: 12px;
	color: #8b5cf6;
	background: #ede9fe;
	padding: 2px 10px;
	border-radius: 10px;
	white-space: nowrap;
}

/* Locked state */
.af-single-challenge__locked {
	text-align: center;
	padding: 64px 24px;
	background: #f9fafb;
	border-radius: 12px;
}

.af-single-challenge__locked-icon .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #999;
}

.af-single-challenge__subscribe-btn {
	display: inline-block;
	padding: 14px 32px;
	background: #2271b1;
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	margin-top: 16px;
}
