/* Training Section - Enhanced for Dynamic Content */
.schedule-athletic {
	background: var(--charcoal);
	color: var(--white);
	position: relative;
	overflow: hidden;
	min-height: 70vh;
}

.schedule-athletic::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, var(--basketball-orange) 2px, transparent 2px);
	background-size: 20px 20px;
	opacity: 0.1;
	animation: float 6s ease-in-out infinite;
}

@keyframes float {
	0%, 100% { transform: translateY(0px); }
	50% { transform: translateY(-20px); }
}

/* Static Training Items (for fallback) */
.schedule-item-athletic {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 0;
	border-left: 4px solid var(--basketball-orange);
	backdrop-filter: blur(10px);
	transition: all 0.3s ease;
	clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
}

.schedule-item-athletic:hover {
	border-left-color: var(--woodley-green);
	background: rgba(255,255,255,0.1);
	transform: translateX(5px);
}

/* Dynamic Training Cards */
.training-card-dynamic {
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	border-left: 4px solid var(--basketball-orange);
	backdrop-filter: blur(10px);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 1.5rem;
	height: 100%;
	overflow: hidden;
	position: relative;
}

.training-card-dynamic::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.05) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.training-card-dynamic:hover {
	border-left-color: var(--woodley-green);
	background: rgba(255,255,255,0.08);
	transform: translateY(-8px) scale(1.02);
	box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.training-card-dynamic:hover::before {
	opacity: 1;
}

/* Training Card Components */
.training-card-header {
	margin-bottom: 1rem;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	padding-bottom: 1rem;
}

.training-card-header h5 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.training-card-header .badge {
	font-size: 0.75rem;
	padding: 0.35rem 0.8rem;
	border-radius: 20px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.training-card-body {
	flex-grow: 1;
}

.training-date {
	display: flex;
	align-items: center;
	font-size: 0.9rem;
	margin-bottom: 0.75rem;
}

.training-date i {
	margin-right: 0.5rem;
}

.training-description {
	margin-top: 0.75rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Training Status Badges */
.badge.bg-success {
	background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.badge.bg-warning {
	background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
}

.badge.bg-danger {
	background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
}

.badge.bg-secondary {
	background: linear-gradient(135deg, #6c757d, #495057) !important;
}

/* Training Pagination Styles */
.training-pagination-nav {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255,255,255,0.1);
}

.training-pagination {
	margin-bottom: 0;
	--bs-pagination-padding-x: 0.75rem;
	--bs-pagination-padding-y: 0.5rem;
	--bs-pagination-font-size: 0.95rem;
	--bs-pagination-color: white;
	--bs-pagination-bg: rgba(255,255,255,0.1);
	--bs-pagination-border-width: 1px;
	--bs-pagination-border-color: rgba(255,255,255,0.2);
	--bs-pagination-border-radius: 0.375rem;
	--bs-pagination-hover-color: white;
	--bs-pagination-hover-bg: var(--basketball-orange);
	--bs-pagination-hover-border-color: var(--basketball-orange);
	--bs-pagination-focus-color: white;
	--bs-pagination-focus-bg: var(--basketball-orange);
	--bs-pagination-focus-border-color: var(--basketball-orange);
	--bs-pagination-active-color: white;
	--bs-pagination-active-bg: var(--woodley-green);
	--bs-pagination-active-border-color: var(--woodley-green);
	--bs-pagination-disabled-color: rgba(255,255,255,0.3);
	--bs-pagination-disabled-bg: rgba(255,255,255,0.05);
	--bs-pagination-disabled-border-color: rgba(255,255,255,0.1);
}

.training-page-btn {
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	color: white;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-weight: 500;
	min-width: 40px;
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.training-page-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
	transition: left 0.6s ease;
}

.training-page-btn:hover:not(:disabled) {
	background: var(--basketball-orange);
	border-color: var(--basketball-orange);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.training-page-btn:hover:not(:disabled)::before {
	left: 100%;
}

.training-page-btn:focus {
	background: var(--basketball-orange);
	border-color: var(--basketball-orange);
	color: white;
	outline: none;
	box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

.training-page-btn:active {
	transform: translateY(0);
}

.page-item.active .training-page-btn {
	background: var(--woodley-green);
	border-color: var(--woodley-green);
	color: white;
	box-shadow: 0 4px 12px rgba(0, 204, 102, 0.4);
	position: relative;
}

.page-item.active .training-page-btn::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	height: 2px;
	background: var(--basketball-orange);
	border-radius: 1px;
}

.page-item.active .training-page-btn:hover {
	background: var(--woodley-green);
	border-color: var(--woodley-green);
	transform: none;
	color: white;
}

.training-page-btn:disabled {
	background: rgba(255,255,255,0.05);
	border-color: rgba(255,255,255,0.1);
	color: rgba(255,255,255,0.3);
	cursor: not-allowed;
	opacity: 0.6;
}

.training-page-btn:disabled:hover {
	background: rgba(255,255,255,0.05);
	border-color: rgba(255,255,255,0.1);
	color: rgba(255,255,255,0.3);
	transform: none;
	box-shadow: none;
}

.page-item.disabled .page-link {
	background: transparent;
	border: none;
	color: rgba(255,255,255,0.4);
	cursor: default;
	padding: 0.5rem 0.75rem;
}

/* Training Pagination Icons */
.training-page-btn i {
	font-size: 0.9rem;
	transition: transform 0.3s ease;
}

.training-page-btn:hover:not(:disabled) i {
	transform: scale(1.1);
}

/* Loading and Error States */
.training-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	flex-direction: column;
	gap: 1rem;
}

.training-loading .spinner-border {
	width: 3rem;
	height: 3rem;
	border-width: 0.3em;
}

.training-error {
	text-align: center;
	padding: 2rem;
	background: rgba(220, 53, 69, 0.1);
	border: 1px solid rgba(220, 53, 69, 0.3);
	border-radius: 12px;
	margin: 2rem 0;
}

.training-no-data {
	text-align: center;
	padding: 3rem 2rem;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 12px;
	margin: 2rem 0;
}

/* Training Icons */
.training-card-header i {
	transition: all 0.3s ease;
}

.training-card-dynamic:hover .training-card-header i {
	transform: scale(1.1);
}

/* Responsive Design for Training */
@media (max-width: 992px) {
	.training-card-dynamic {
		margin-bottom: 1.5rem;
	}

	.training-pagination-nav {
		margin-top: 2rem;
	}

	.training-pagination {
		--bs-pagination-padding-x: 0.6rem;
		--bs-pagination-padding-y: 0.4rem;
		--bs-pagination-font-size: 0.9rem;
	}

	.training-page-btn {
		padding: 0.4rem 0.6rem;
		min-width: 35px;
	}
}

@media (max-width: 768px) {
	.schedule-athletic::before {
		width: 150px;
		height: 150px;
		background-size: 15px 15px;
	}

	.training-card-dynamic {
		padding: 1.25rem;
		border-radius: 8px;
		margin-bottom: 1rem;
	}

	.training-card-header {
		margin-bottom: 0.75rem;
		padding-bottom: 0.75rem;
	}

	.training-card-header h5 {
		font-size: 1.1rem;
	}

	.training-card-header i {
		font-size: 1.2rem !important;
	}

	.training-card-header .badge {
		font-size: 0.7rem;
		padding: 0.25rem 0.6rem;
	}

	.training-date {
		font-size: 0.85rem;
	}

	.training-description {
		font-size: 0.9rem;
	}

	.training-pagination-nav {
		margin-top: 1.5rem;
		padding-top: 1.5rem;
	}

	.training-pagination {
		--bs-pagination-padding-x: 0.5rem;
		--bs-pagination-padding-y: 0.35rem;
		--bs-pagination-font-size: 0.85rem;
	}

	.training-page-btn {
		padding: 0.35rem 0.5rem;
		font-size: 0.85rem;
		min-width: 32px;
	}

	.training-page-btn i {
		font-size: 0.8rem;
	}

	/* Simplify pagination on mobile */
	.pagination .page-item:not(.active):not(:first-child):not(:last-child):not(:nth-child(2)):not(:nth-last-child(2)) {
		display: none;
	}
}

@media (max-width: 576px) {
	.training-card-dynamic {
		padding: 1rem;
	}

	.training-card-header {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
		padding-bottom: 0.5rem;
	}

	.training-card-header .d-flex {
		width: 100%;
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 0.25rem;
	}

	.training-card-header h5 {
		font-size: 1rem;
		margin-bottom: 0.1rem;
	}

	.training-card-header p {
		font-size: 0.8rem;
		margin-bottom: 0;
	}

	.training-card-header .badge {
		align-self: flex-end;
		font-size: 0.6rem;
		padding: 0.3rem 0.6rem;
		white-space: nowrap;
		min-width: fit-content;
	}

	.training-date {
		font-size: 0.75rem;
		margin-bottom: 0.25rem;
	}

	.training-description {
		font-size: 0.8rem;
		margin-top: 0.25rem;
	}

	.training-card-header i {
		font-size: 1rem !important;
	}

	.schedule-item-athletic {
		clip-path: none;
		border-radius: 8px;
	}

	.training-pagination {
		--bs-pagination-padding-x: 0.4rem;
		--bs-pagination-padding-y: 0.3rem;
		--bs-pagination-font-size: 0.8rem;
		flex-wrap: wrap;
		justify-content: center;
	}

	.training-page-btn {
		padding: 0.3rem 0.4rem;
		font-size: 0.8rem;
		min-width: 28px;
		margin: 0.1rem;
	}

	.training-pagination-nav {
		margin-top: 1rem;
		padding-top: 1rem;
	}

	/* Show only essential pagination items on very small screens */
	.pagination .page-item:not(.active):not(:first-child):not(:last-child) {
		display: none;
	}

	.pagination .page-item.active {
		order: 2;
	}

	.pagination .page-item:first-child {
		order: 1;
	}

	.pagination .page-item:last-child {
		order: 3;
	}
}

/* Animation Enhancements */
.fade-in {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUp 0.6s ease forwards;
}

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

/* Pulse animation for active pagination */
.page-item.active .training-page-btn {
	animation: pulse-active 2s ease-in-out infinite;
}

@keyframes pulse-active {
	0%, 100% {
		box-shadow: 0 4px 12px rgba(0, 204, 102, 0.4);
	}
	50% {
		box-shadow: 0 4px 20px rgba(0, 204, 102, 0.6);
	}
}

/* Accessibility Improvements */
.training-page-btn:focus-visible {
	outline: 3px solid var(--basketball-orange);
	outline-offset: 2px;
}

.training-card-dynamic:focus-within {
	outline: 2px solid var(--woodley-green);
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.training-card-dynamic {
		border-width: 2px;
		border-left-width: 6px;
	}

	.training-page-btn {
		border-width: 2px;
		font-weight: 600;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.training-card-dynamic,
	.training-page-btn,
	.training-card-header i {
		transition: none;
	}

	.training-card-dynamic:hover {
		transform: none;
	}

	.training-page-btn:hover:not(:disabled) {
		transform: none;
	}

	.fade-in {
		animation: none;
		opacity: 1;
		transform: none;
	}

	@keyframes float {
		0%, 100% { transform: translateY(0px); }
	}

	.page-item.active .training-page-btn {
		animation: none;
	}
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
	.training-card-dynamic {
		background: rgba(255,255,255,0.03);
		border-color: rgba(255,255,255,0.08);
	}

	.training-card-dynamic:hover {
		background: rgba(255,255,255,0.06);
	}

	.training-page-btn {
		background: rgba(255,255,255,0.08);
		border-color: rgba(255,255,255,0.15);
	}
}