/* ==========================================================================
   TK Content Sliders — front-end styles
   Self-contained styling for the TK Case Study Slider and TK News Slider
   Divi modules. Values mirror the original hand-built sliders exactly.
   ========================================================================== */

/* Zero out the Divi module wrapper spacing so the slider sits flush. */
.et_pb_module.tk_case_study_slider,
.et_pb_module.tk_news_slider {
	margin: 0 !important;
}

/* Full-bleed container = the "section". Breaks out to full viewport width
   regardless of the row/column it's dropped into. */
.tk-slider-embed {
	position: relative;
	overflow: hidden;
	left: 50%;
	right: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
}

/* ---- Oversized background heading (watermark) ----
   Scoped under .tk-slider-embed so it never touches the original sliders.
   In normal flow with a negative bottom margin, so the cards overlap only the
   heading's bottom edge by a small, fixed amount (matching the originals'
   ~40px), regardless of heading size or where the module is placed. */
.tk-slider-embed .tk-work-bg-heading,
.tk-slider-embed .tk-news-bg-heading {
	position: relative !important; /* beat any original absolute rule still on the page */
	top: auto !important;
	left: auto !important;
	margin: 0 0 -40px 0 !important;
	padding: 0 0 0 3vw !important;
	font-family: 'Montserrat', sans-serif !important;
	font-weight: 700 !important;
	font-size: clamp(80px, 14vw, 200px) !important;
	line-height: 0.9 !important;
	pointer-events: none;
	user-select: none;
}
.tk-slider-embed .tk-work-bg-heading { color: rgba(96, 111, 129, 0.4) !important; } /* on dark section */
.tk-slider-embed .tk-news-bg-heading { color: rgba(96, 111, 129, 0.2) !important; } /* on white section */

/* ==========================================================================
   Scroll row (shared mechanics)
   ========================================================================== */
.tk-work-slider-row.et_pb_row,
.tk-news-slider-row.et_pb_row {
	position: relative !important;
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding-left: 3vw !important;
	padding-right: 3vw !important;
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 16px;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 3vw;
	scroll-padding-right: 3vw;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.tk-work-slider-row.et_pb_row::-webkit-scrollbar,
.tk-news-slider-row.et_pb_row::-webkit-scrollbar {
	display: none;
}

/* Overlap is produced by the heading's negative bottom margin above, so the
   slider row itself needs no extra top margin when the heading is shown. */
.tk-slider--has-heading .tk-work-slider-row.et_pb_row,
.tk-slider--has-heading .tk-news-slider-row.et_pb_row {
	margin-top: 0 !important;
}

/* ==========================================================================
   Cards (shared)
   ========================================================================== */
.tk-work-slider-row .et_pb_column.tk-work-card,
.tk-news-slider-row .et_pb_column.tk-news-card {
	flex: 0 0 calc((94vw - 32px) / 3) !important;
	width: calc((94vw - 32px) / 3) !important;
	margin: 0 !important;
	padding: 0 !important;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 16px;
	text-decoration: none !important;
}

.tk-work-card .et_pb_image,
.tk-news-card .et_pb_image {
	width: 100%;
	margin: 0 !important;
}
.tk-work-card .et_pb_image .et_pb_image_wrap,
.tk-news-card .et_pb_image .et_pb_image_wrap {
	display: block;
	width: 100%;
	border-radius: 15px;
	overflow: hidden;
	aspect-ratio: 608 / 358;
}
.tk-work-card .et_pb_image .et_pb_image_wrap { background-color: #111111; }
.tk-news-card .et_pb_image .et_pb_image_wrap { background-color: #eeeeee; }

.tk-slider-noimg { display: block; width: 100%; height: 100%; }

.tk-work-card .et_pb_image img,
.tk-news-card .et_pb_image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}
.tk-work-card:hover .et_pb_image img,
.tk-news-card:hover .et_pb_image img {
	transform: scale(1.04);
}

/* Card title (shared type, different colors) */
.tk-work-card .tk-work-card-title,
.tk-work-card .tk-work-card-title p,
.tk-news-card .tk-news-card-title,
.tk-news-card .tk-news-card-title p {
	font-family: 'Montserrat', sans-serif !important;
	font-weight: 600 !important;
	font-size: 22px !important;
	line-height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	transition: color 0.3s !important;
}
.tk-work-card .tk-work-card-title,
.tk-work-card .tk-work-card-title p { color: #FFFFFF !important; }
.tk-news-card .tk-news-card-title,
.tk-news-card .tk-news-card-title p { color: #000000 !important; }

/* News titles: cap at two lines with an ellipsis (scoped to this module). */
.tk-slider-embed .tk-news-card-title .et_pb_text_inner {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tk-work-card:hover .tk-work-card-title,
.tk-work-card:hover .tk-work-card-title p,
.tk-news-card:hover .tk-news-card-title,
.tk-news-card:hover .tk-news-card-title p {
	color: #5887DA !important;
}

/* ---- Card label pill (shared by Work + News) ---- */
.tk-work-card .tk-work-card-category,
.tk-news-card .tk-news-card-category { margin: 0 !important; padding: 0 !important; line-height: 1 !important; }
.tk-work-card .tk-work-card-category .et_pb_text_inner,
.tk-news-card .tk-news-card-category .et_pb_text_inner { margin: 0 !important; padding: 0 !important; line-height: 1 !important; }

.tk-work-card .tk-work-card-category .tk-work-card-tag,
.tk-news-card .tk-news-card-category .tk-news-card-tag {
	display: inline-block;
	background-color: #C3D8EB;
	color: #000000;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 12px;
	line-height: 1;
	padding: 7px 14px;
	border-radius: 50px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* ==========================================================================
   Controls row (arrows + View All)
   ========================================================================== */
.tk-work-controls-row.et_pb_row,
.tk-news-controls-row.et_pb_row {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 40px 3vw 0 !important;
}
.tk-work-controls-row.et_pb_row > .et_pb_column,
.tk-news-controls-row.et_pb_row > .et_pb_column {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.tk-slider-controls-right { text-align: right; }

/* Arrow buttons */
.tk-work-arrow,
.tk-news-arrow {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-right: 16px;
	padding: 0;
	transition: background-color 0.3s, color 0.3s, opacity 0.3s;
}
.tk-work-arrow { border: 1px solid #FFFFFF; color: #FFFFFF; }
.tk-news-arrow { border: 1px solid #000000; color: #000000; }

.tk-work-arrow svg,
.tk-news-arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.tk-work-arrow:hover:not(:disabled),
.tk-work-arrow:focus-visible:not(:disabled) {
	background-color: #FFFFFF;
	color: #000000;
	outline: none;
}
.tk-news-arrow:hover:not(:disabled),
.tk-news-arrow:focus-visible:not(:disabled) {
	background-color: #000000;
	color: #FFFFFF;
	outline: none;
}
.tk-work-arrow:focus-visible,
.tk-news-arrow:focus-visible {
	box-shadow: 0 0 0 3px rgba(88, 135, 218, 0.5);
}
.tk-work-arrow:disabled,
.tk-news-arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* "View All" button — glass-style link, themed per variant */
.tk-slider-viewall {
	display: inline-block;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	padding: 14px 28px;
	border-radius: 50px;
	border: 1px solid currentColor;
	transition: background-color 0.3s, color 0.3s;
}
.tk-slider--work .tk-slider-viewall { color: #FFFFFF; }
.tk-slider--news .tk-slider-viewall { color: #000000; }
.tk-slider--work .tk-slider-viewall:hover,
.tk-slider--work .tk-slider-viewall:focus-visible { background-color: #FFFFFF; color: #000000; }
.tk-slider--news .tk-slider-viewall:hover,
.tk-slider--news .tk-slider-viewall:focus-visible { background-color: #000000; color: #FFFFFF; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
	.tk-slider--has-heading .tk-work-slider-row.et_pb_row,
	.tk-slider--has-heading .tk-news-slider-row.et_pb_row { margin-top: 0 !important; }
	.tk-work-slider-row .et_pb_column.tk-work-card,
	.tk-news-slider-row .et_pb_column.tk-news-card {
		flex: 0 0 calc((94vw - 16px) / 2) !important;
		width: calc((94vw - 16px) / 2) !important;
	}
}

@media (max-width: 767px) {
	.tk-slider--has-heading .tk-work-slider-row.et_pb_row,
	.tk-slider--has-heading .tk-news-slider-row.et_pb_row { margin-top: 0 !important; }
	/* Smaller heading on phones -> shallower overlap. */
	.tk-slider-embed .tk-work-bg-heading,
	.tk-slider-embed .tk-news-bg-heading { margin-bottom: -20px !important; }
	.tk-work-slider-row .et_pb_column.tk-work-card,
	.tk-news-slider-row .et_pb_column.tk-news-card {
		flex: 0 0 85vw !important;
		width: 85vw !important;
	}

	.tk-work-card .tk-work-card-title,
	.tk-work-card .tk-work-card-title p,
	.tk-news-card .tk-news-card-title,
	.tk-news-card .tk-news-card-title p { font-size: 18px !important; line-height: 26px !important; }
	.tk-work-card .tk-work-card-category .tk-work-card-tag,
	.tk-news-card .tk-news-card-category .tk-news-card-tag { font-size: 11px; padding: 5px 11px; }
}
