/* Case study slides block (layout_blocks/case_study_slides_block.php).
   Plain CSS, loaded only on pages that use the block. Colours and type follow the theme:
   blue #3D5B9E, orange #F47B20, dark var(--theme-dark), ABC Favorit, square corners, hard shadow. */

.case_study_slides_block .cs-intro { margin-bottom: 40px; }
.case_study_slides_block .cs-intro .content p { max-width: 36em; }

.cs-slides { position: relative; }

.cs-track { display: flex; flex-direction: column; gap: 60px; }

.cs-slide { position: relative; }

.cs-image { position: relative; background: var(--theme-dark); overflow: hidden; }
.cs-image img {
	display: block;
	width: 100%;
	height: clamp(320px, 48vw, 680px);
	object-fit: cover;
}

.cs-counter {
	position: absolute;
	top: 20px;
	left: 20px;
	background: var(--theme-dark);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	line-height: 1;
	padding: 10px 14px;
}

.cs-panel {
	position: relative;
	margin: -110px 0 0 40px;
	max-width: 820px;
	background: #fff;
	padding: 34px 36px 36px;
	box-shadow: 4px 4px 0 -1px var(--theme-dark);
	border: 1px solid var(--theme-dark);
	color: #3D5B9E;
}

.cs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.cs-tag {
	background: #F47B20;
	color: var(--theme-dark);
	font-weight: 800;
	font-size: 14px;
	line-height: 1;
	padding: 8px 12px;
}
.cs-place { font-size: 15px; color: #3D5B9E; }

.cs-panel .cs-title {
	font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
	line-height: 1.05;
	font-weight: 800;
	color: #3D5B9E;
	margin: 0 0 16px;
}

.cs-text { margin: 0 0 20px; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); color: #3D5B9E; }

.cs-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cs-facts li {
	border: 2px solid #3D5B9E;
	color: #3D5B9E;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	padding: 8px 12px;
}

.cs-panel .cs-link { margin-top: 26px; display: inline-flex; }

/* Slider controls (shown by the script) */
.cs-controls {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	display: flex;
	gap: 8px;
}
.cs-controls[hidden], .cs-thumbs[hidden] { display: none; }

.cs-arrow {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--theme-dark);
	border: 0;
	border-radius: 0;
	cursor: pointer;
	box-shadow: 4px 4px 0 -1px var(--theme-dark);
	transition: background 0.3s, color 0.3s;
}
.cs-arrow:hover { background: #F47B20; }

.cs-thumbs {
	margin-top: 40px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}
.cs-thumb {
	display: block;
	text-align: left;
	background: #fff;
	border: 2px solid #C9E3EB;
	border-radius: 0;
	padding: 8px;
	cursor: pointer;
	color: #3D5B9E;
	transition: border-color 0.3s;
}
.cs-thumb img { display: block; width: 100%; height: 100px; object-fit: cover; }
.cs-thumb span { display: block; margin-top: 10px; font-weight: 800; font-size: 15px; line-height: 1.2; }
.cs-thumb:hover { border-color: #3D5B9E; }
.cs-thumb[aria-current="true"] { border-color: #F47B20; }

.cs-arrow:focus-visible, .cs-thumb:focus-visible { outline: 3px solid #F47B20; outline-offset: 2px; }

/* Slider mode */
.cs-slides.is-slider .cs-track { display: block; }
.cs-slides.is-slider .cs-slide[hidden] { display: none; }
.cs-slides.is-slider .cs-slide.is-entering { animation: cs-fade 0.5s ease; }
@keyframes cs-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.cs-slides.is-slider .cs-slide.is-entering { animation: none; }
}

@media (max-width: 991px) {
	.cs-panel { margin: -60px 16px 0; padding: 24px 22px 26px; }
	.cs-controls { top: 14px; right: 14px; }
	.cs-counter { top: 14px; left: 14px; }
	.cs-arrow { width: 46px; height: 46px; }
	.cs-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
	.cs-thumb img { height: 80px; }
}
