/* =========================================================
   Kurs Steps widget (stipendisti - horizontalno i vertikalno)
   ========================================================= */

@keyframes kursMeshGradient {
	0% {
		background-position: 0% 20%;
	}
	25% {
		background-position: 100% 50%;
	}
	50% {
		background-position: 50% 70%;
	}
	100% {
		background-position: 0% 20%;
	}
}

.kurs-steps-widget {
	padding: 48px 24px;
	border-radius: 16px;
	background: #0f172a;
	color: #f8fafc;
}

.kurs-steps-header {
	text-align: center;
	margin-bottom: 32px;
}

.kurs-steps-header h2 {
	font-size: 2rem;
	margin: 0 0 8px;
}

.kurs-steps-header p {
	margin: 0;
	opacity: 0.7;
}

/* =========================================================
   "Pretraži" preklopnik + filteri
   ========================================================= */

.kurs-steps-search {
	margin-bottom: 24px;
}

.kurs-steps-search-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	color: #f8fafc;
	margin-bottom: 12px;
}

.kurs-steps-search-toggle input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #3b82f6;
}

.kurs-steps-filters {
	display: none;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
}

.kurs-steps-filters.kurs-steps-filters-visible {
	display: flex;
}

.kurs-steps-filter-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kurs-steps-filter-field label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.65;
}

.kurs-steps-filter {
	background: #1e293b;
	color: #f8fafc;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 0.85rem;
	min-width: 160px;
}

.kurs-steps-filter-reset {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #f8fafc;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 0.85rem;
	cursor: pointer;
	align-self: flex-end;
	transition: background 0.2s ease;
}

.kurs-steps-filter-reset:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   HORIZONTALNI layout (isti obrazac kao Kurs Timeline)
   ========================================================= */

.kurs-steps-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
}

.kurs-steps-scroll {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 4px 32px;
	scroll-behavior: smooth;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
	flex: 0 1 auto;
	margin-left: auto;
	margin-right: auto;
	min-width: 0;
}

.kurs-steps-scroll::-webkit-scrollbar {
	display: none;
}

.kurs-step-item {
	flex: 0 0 220px;
	scroll-snap-align: start;
}

.kurs-step-card {
	position: relative;
	border-radius: 16px;
	background: #1e293b;
	border: 1px solid rgba(255, 255, 255, 0.1);
	cursor: pointer;
	transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
	height: 280px;
	overflow: hidden;
}

.kurs-step-img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	opacity: 0;
	transform: scale(1.05);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.kurs-step-img[src] {
	opacity: 1;
}

.kurs-step-card:hover .kurs-step-img,
.kurs-step-card:focus .kurs-step-img {
	transform: scale(1.12);
}

.kurs-step-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( to bottom, transparent 30%, rgba(15, 23, 42, 0.95) );
	opacity: 0;
	transition: opacity 0.5s ease;
}

.kurs-step-img[src] ~ .kurs-step-overlay {
	opacity: 1;
}

.kurs-step-card:hover,
.kurs-step-card:focus {
	transform: translateY(-10px);
	border-color: #3b82f6;
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
	outline: none;
}

.kurs-step-date-tag {
	position: absolute;
	top: 16px;
	left: 16px;
	background: #3b82f6;
	color: #fff;
	padding: 3px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	z-index: 2;
}

.kurs-step-subtitle-tag {
	display: inline-block;
	margin-top: 4px;
	background: rgba(255, 255, 255, 0.15);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff;
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 10px;
	font-weight: 600;
}

.kurs-step-body {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 20px;
	z-index: 2;
}

.kurs-step-body h3 {
	margin: 0;
	font-size: 1.2rem;
	color: #fff;
}

.kurs-step-body p {
	margin: 6px 0 0;
	font-size: 0.85rem;
	color: #cbd5e1;
}

.kurs-step-axis {
	margin-top: 16px;
	height: 1px;
	background: rgba(255, 255, 255, 0.1);
	position: relative;
	display: flex;
	justify-content: center;
}

.kurs-step-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #0f172a;
	border: 3px solid #94a3b8;
	position: absolute;
	top: -7px;
	transition: 0.3s ease;
}

.kurs-step-item:hover .kurs-step-dot,
.kurs-step-item:focus-within .kurs-step-dot,
.kurs-step-item.is-active .kurs-step-dot {
	transform: scale(1.3);
}

.kurs-step-arrow {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: #f8fafc;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: 0.25s ease;
}

.kurs-step-arrow:hover {
	background: #3b82f6;
	border-color: #3b82f6;
}

/* =========================================================
   VERTIKALNI layout
   ========================================================= */

.kurs-steps-vertical {
	position: relative;
	padding: 20px 0;
	max-width: 900px;
	margin: 0 auto;
}

.kurs-step-v-line {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(255, 255, 255, 0.15);
}

.kurs-steps-vertical-one-side .kurs-step-v-line {
	left: 20px;
}

.kurs-steps-vertical-zigzag .kurs-step-v-line {
	left: 50%;
	transform: translateX(-50%);
}

.kurs-step-v-item {
	position: relative;
	margin-bottom: 40px;
	width: 100%;
}

.kurs-steps-vertical-one-side .kurs-step-v-item {
	padding-left: 56px;
}

.kurs-steps-vertical-zigzag .kurs-step-v-item {
	display: flex;
}

.kurs-steps-vertical-zigzag .kurs-step-v-left {
	justify-content: flex-start;
	padding-right: 44px;
}

.kurs-steps-vertical-zigzag .kurs-step-v-right {
	justify-content: flex-end;
	padding-left: 44px;
}

.kurs-step-v-dot {
	position: absolute;
	top: 8px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #3b82f6;
	border: 3px solid #0f172a;
	box-shadow: 0 0 0 2px #3b82f6;
	z-index: 2;
}

.kurs-steps-vertical-one-side .kurs-step-v-dot {
	left: 15px;
}

.kurs-steps-vertical-zigzag .kurs-step-v-dot {
	left: 50%;
	transform: translateX(-50%);
}

.kurs-step-v-card {
	position: relative;
	overflow: hidden;
	min-height: 110px;
	background: #1e293b;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	cursor: pointer;
	transition: border-color 0.3s ease, transform 0.3s ease;
}

.kurs-step-v-card:hover,
.kurs-step-v-card:focus {
	border-color: #3b82f6;
	transform: translateY(-4px);
	outline: none;
}

.kurs-step-v-img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	display: block;
}

/* Pocetno stanje prije nego GSAP preuzme kontrolu (sprjecava "bljesak"
   potpuno vidljive slike prije prvog izvrsavanja steps.js). GSAP zatim
   gasi/ukljucuje opacity/transform inline stilom prema data-anim-*
   atributima - ovdje namjerno NEMA transform/transition, to sad u
   potpunosti vodi GSAP (vidi initVerticalAnimation u steps.js). */
.kurs-step-v-img.kurs-step-v-animate {
	opacity: 0;
}

.kurs-step-v-img.kurs-step-v-animate.kurs-step-v-visible {
	opacity: 1;
}

.kurs-step-v-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( to bottom, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.92) 100% );
}

.kurs-step-v-body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 110px;
	padding: 16px;
}

.kurs-step-v-date {
	display: inline-block;
	align-self: flex-start;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	background: #3b82f6;
	padding: 2px 10px;
	border-radius: 20px;
	margin-bottom: 6px;
}

.kurs-step-v-body h3 {
	margin: 0;
	font-size: 1.05rem;
	color: #fff;
}

.kurs-step-v-subtitle {
	display: inline-block;
	margin-top: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: rgba(255, 255, 255, 0.15);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	padding: 2px 10px;
	border-radius: 20px;
}

/* Mobitel - cik-cak se UVIJEK vraća na jednu stranu (nema prostora za dvije kolone) */
@media ( max-width: 640px ) {
	.kurs-steps-vertical-zigzag .kurs-step-v-line {
		left: 20px;
		transform: none;
	}

	.kurs-steps-vertical-zigzag .kurs-step-v-item {
		display: block;
		padding-left: 56px;
		padding-right: 0;
	}

	.kurs-steps-vertical-zigzag .kurs-step-v-dot {
		left: 15px;
		transform: none;
	}

	.kurs-step-item {
		flex: 0 0 180px;
	}

	.kurs-step-card {
		height: 240px;
	}
}

/* =========================================================
   Popup (dijeli isti dizajn kao Kurs Timeline)
   ========================================================= */

.kurs-step-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
}

.kurs-step-modal[hidden] {
	display: none;
}

.kurs-step-modal-overlay {
	position: absolute;
	inset: 0;
}

.kurs-step-modal-box {
	position: relative;
	background: #0f172a;
	color: #f8fafc;
	width: 100%;
	max-width: 560px;
	max-height: 85vh;
	overflow-y: auto;
	border-radius: 20px;
	padding: 32px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.kurs-step-modal-img {
	width: 100% !important;
	height: 220px !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: top center;
	display: block;
	border-radius: 12px;
	margin-bottom: 20px;
}

.kurs-step-modal-box h2 {
	margin: 0 0 6px;
	color: #fff;
}

.kurs-step-modal-meta {
	color: #3b82f6;
	font-size: 0.9rem;
	margin: 0 0 16px;
}

.kurs-step-modal-content {
	line-height: 1.7;
	color: #cbd5e1;
	margin-bottom: 20px;
}

.kurs-step-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px;
}

.kurs-step-modal-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #3b82f6;
	text-decoration: none;
	font-weight: 600;
}
