/* Our Work Showcase widget — the portfolio overview page: a main
   heading + subheading, then one horizontally scrollable row per
   category, each with its own heading, prev/next arrows and a
   corner-bracket "View All" button. Card styling follows Website
   Project Showcase V2 (full-bleed image, tint, hover zoom, Anton
   title). */

.aiol-ows {
	--aiol-ows-gap: 24px;
	--aiol-ows-row-gap: 56px;
	--aiol-ows-per-view: 3.5;

	box-sizing: border-box;
}

.aiol-ows *,
.aiol-ows *::before,
.aiol-ows *::after {
	box-sizing: border-box;
}

/* ---------- Intro ---------- */
.aiol-ows__intro {
	margin-bottom: 40px;
}

.aiol-ows__heading {
	margin: 0;
	font-family: 'Anton', sans-serif;
	font-size: 44px;
	font-weight: 400;
	line-height: 1.15;
	color: #141515;
}

.aiol-ows__subheading {
	margin: 14px 0 0;
	max-width: 720px;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: #5c5c5c;
}

/* ---------- Row ---------- */
.aiol-ows__row + .aiol-ows__row {
	margin-top: var(--aiol-ows-row-gap);
}

.aiol-ows__row-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-bottom: 18px;
}

.aiol-ows__row-title {
	margin: 0;
	font-family: 'Poppins', sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #141515;
}

.aiol-ows__row-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

/* ---------- Arrows ---------- */
.aiol-ows__nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.aiol-ows__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid #DADADA;
	border-radius: 50%;
	background-color: transparent;
	color: #141515;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.aiol-ows__nav-btn:hover:not( [disabled] ) {
	background-color: #141515;
	border-color: #141515;
	color: #ffffff;
}

.aiol-ows__nav-btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* ---------- Track ---------- */
.aiol-ows__track {
	display: flex;
	gap: var(--aiol-ows-gap);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	/* Keeps a swipe from handing off to the page once the strip hits
	   either end. */
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
	touch-action: pan-x;
	scroll-behavior: smooth;
	/* Room for the cards' hover lift/shadow so it is not clipped by the
	   scroll container. */
	padding-bottom: 4px;
}

.aiol-ows__track::-webkit-scrollbar {
	display: none;
}

.aiol-ows__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
	user-select: none;
}

.aiol-ows__track.is-dragging .aiol-ows__card {
	pointer-events: none;
}

/* ---------- Card ---------- */
.aiol-ows__card {
	position: relative;
	display: block;
	flex: 0 0 calc( ( 100% - ( var(--aiol-ows-per-view) - 1 ) * var(--aiol-ows-gap) ) / var(--aiol-ows-per-view) );
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	overflow: hidden;
	background-color: #D9D9D9;
	scroll-snap-align: start;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

/* The image sits on its own layer so the hover zoom scales only the
   picture — the card's corners and its caption never move. */
.aiol-ows__card-bg {
	position: absolute;
	inset: 0;
	display: block;
	background-size: cover;
	background-position: center;
	transform: scale( 1 );
	transition: transform 500ms ease;
	will-change: transform;
}

.aiol-ows__card:hover .aiol-ows__card-bg {
	transform: scale( 1.08 );
}

.aiol-ows__card-overlay {
	position: absolute;
	inset: 0;
	display: block;
	background-color: rgba( 0, 0, 0, 0.28 );
	pointer-events: none;
}

.aiol-ows__card-body {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
}

.aiol-ows__card-sub {
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	line-height: 1.2;
	color: rgba( 255, 255, 255, 0.75 );
}

.aiol-ows__card-title {
	font-family: 'Anton', sans-serif;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.1;
	text-transform: uppercase;
	color: #ffffff;
}

/* ---------- View All button — static corner brackets, plus a small
   solid square whose layout space is always reserved (so the button
   never changes width) that repeatedly grows from zero on hover.
   Matches Project Showcase V2's CTA. ---------- */
.aiol-ows__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	text-decoration: none;
	color: #141515;
	white-space: nowrap;
}

.aiol-ows__cta-text {
	font-family: 'Poppins', sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

.aiol-ows__cta-corner {
	position: absolute;
	width: 12px;
	height: 12px;
	border: 0 solid #141515;
	transition: width 0.6s ease, height 0.6s ease;
}

.aiol-ows__cta-corner--tl {
	top: 0;
	left: 0;
	border-top-width: 1px;
	border-left-width: 1px;
}

.aiol-ows__cta-corner--tr {
	top: 0;
	right: 0;
	border-top-width: 1px;
	border-right-width: 1px;
}

.aiol-ows__cta-corner--bl {
	bottom: 0;
	left: 0;
	border-bottom-width: 1px;
	border-left-width: 1px;
}

.aiol-ows__cta-corner--br {
	bottom: 0;
	right: 0;
	border-bottom-width: 1px;
	border-right-width: 1px;
}

.aiol-ows__cta:hover .aiol-ows__cta-corner {
	width: 16px;
	height: 16px;
}

.aiol-ows__cta-icon {
	display: inline-block;
	width: 4px;
	height: 4px;
	flex-shrink: 0;
	background-color: currentColor;
	transform: scale( 0 );
}

.aiol-ows__cta:hover .aiol-ows__cta-icon {
	animation: aiol-ows-cta-grow 2.2s ease-out infinite;
}

@keyframes aiol-ows-cta-grow {
	0% {
		transform: scale( 0 );
	}
	100% {
		transform: scale( 1 );
	}
}

/* ---------- Responsive ---------- */
@media ( max-width: 1024px ) {
	.aiol-ows__heading {
		font-size: 34px;
	}

	.aiol-ows__intro {
		margin-bottom: 32px;
	}
}

@media ( max-width: 767px ) {
	.aiol-ows__heading {
		font-size: 26px;
	}

	.aiol-ows__row-title {
		font-size: 17px;
	}

	.aiol-ows__card-title {
		font-size: 18px;
	}

	.aiol-ows__card-body {
		padding: 14px 16px;
	}

	/* The heading keeps the first line to itself and the controls drop
	   below it, rather than all three squeezing onto one row. */
	.aiol-ows__row-head {
		align-items: flex-start;
	}

	.aiol-ows__row-actions {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
	}
}

/* Someone who has asked the OS for less motion gets no zoom, no pulsing
   square, and instant (not smoothly animated) arrow scrolling. */
@media ( prefers-reduced-motion: reduce ) {
	.aiol-ows__track {
		scroll-behavior: auto;
	}

	.aiol-ows__card-bg,
	.aiol-ows__cta-corner {
		transition: none;
	}

	.aiol-ows__card:hover .aiol-ows__card-bg {
		transform: none;
	}

	.aiol-ows__cta:hover .aiol-ows__cta-icon {
		animation: none;
	}
}
