/*!
 * Aagam — Projects Slider
 *
 * Every selector is namespaced under .ags. There is no reset and no global
 * rule, so dropping this onto an existing theme cannot change anything outside
 * the slider. Sizes are viewport-relative, matching the reference build.
 */

.ags {
	--ags-orange: #d64008;
	--ags-orange-alt: #d54f1c;
	--ags-ink: #111111;
	--ags-panel: #7a7a7a;
	--ags-sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--ags-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Image frame: 16:10, capped so it never dominates a very wide screen.
	   Width is chosen so the Next arrow always clears the copy block — see the
	   panel/offset vars below, which scale together to keep "image covers
	   exactly half the grey panel" true at every width. */
	--ags-img-w: min(53vw, 820px);
	--ags-img-h: min(33.125vw, 512px);
	--ags-panel-w: min(320px, 24vw);
	--ags-img-x: min(160px, 12vw); /* always half of --ags-panel-w */

	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 0 0 56px;
	margin: 0;
}

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

.ags img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 0;
}

.ags button {
	font: inherit;
	margin: 0;
	cursor: pointer;
}

/* ------------------------------------------------------------- heading */

.ags-title {
	width: 100%;
	margin: 0;
	padding: 0;
	text-align: center;
	font-family: var(--ags-sans);
	font-size: 30px;
	font-weight: 500;
	line-height: 39px;
	letter-spacing: normal;
	text-transform: none;
	color: var(--ags-ink);
}

.ags-sub {
	width: 810px;
	max-width: 100%;
	margin: 8px auto 0;
	padding: 0 20px;
	text-align: center;
	font-family: var(--ags-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 23.1px;
	color: var(--ags-ink);
}

/* --------------------------------------------------------------- stage */

.ags-stagewrap {
	width: 100%;
	margin-top: 24px;
}

.ags-stage {
	position: relative;
	width: 100%;
	padding: 8px 0 0;
}

.ags-panel {
	display: none;
}

/* ---------------------------------------------------------- image column */

.ags-imgcol {
	/* deliberately no z-index: a stacking context here would trap the arrows
	   below the copy column, which paints at z-index 2 */
	position: relative;
	width: 100%;
	padding: 0 20px;
}

.ags-imgshift,
.ags-imgbox {
	position: relative;
	width: 100%;
}

.ags-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #e8e8e8;
}

@supports not (aspect-ratio: 16 / 10) {
	.ags-frame {
		height: 0;
		padding-top: 62.5%;
	}
}

.ags-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.ags-img.is-on {
	opacity: 1;
}

/* ------------------------------------------------------------ nav arrows */

.ags-nav {
	display: none;
}

.ags-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--ags-orange);
	border-radius: 9999px;
	background: #ffffff;
	color: var(--ags-orange);
	line-height: 0;
	box-shadow: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ags-btn:hover,
.ags-btn:focus-visible {
	background: var(--ags-orange);
	color: #ffffff;
}

.ags-btn--sm {
	width: 36px;
	height: 36px;
}

.ags-navlabel {
	margin-top: 8px;
	font-family: var(--ags-sans);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	color: var(--ags-ink);
}

/* ----------------------------------------------------------- copy column */

.ags-copycol {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 20px;
	/* paints above the image column, so it must not swallow arrow clicks */
	pointer-events: none;
}

.ags-grid {
	display: grid;
	grid-template-columns: 1fr;
}

.ags-spacer {
	display: none;
}

.ags-copywrap {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-top: 24px;
}

.ags-copies {
	display: grid;
	width: 100%;
	pointer-events: auto;
}

.ags-copy {
	grid-column: 1;
	grid-row: 1;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s ease;
}

.ags-copy.is-on {
	opacity: 1;
	pointer-events: auto;
}

.ags-h3 {
	margin: 0;
	padding: 0;
	font-family: var(--ags-sans);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	text-transform: none;
	color: var(--ags-ink);
}

.ags-loc {
	margin: 4px 0 0;
	padding: 0;
	font-family: var(--ags-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 19.5px;
	color: var(--ags-orange-alt);
}

.ags-typ {
	margin: 4px 0 0;
	padding: 0;
	font-family: var(--ags-body);
	font-size: 13px;
	font-weight: 400;
	line-height: 21.45px;
	color: rgba(17, 17, 17, 0.7);
}

.ags-desc {
	margin: 12px 0 0;
	padding: 0;
	font-family: var(--ags-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 23.1px;
	color: var(--ags-ink);
}

.ags-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	padding: 10px;
	border: 1px solid var(--ags-orange);
	border-radius: 0;
	background: #ffffff;
	font-family: var(--ags-sans);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: normal;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ags-ink);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ags-cta:hover,
.ags-cta:focus-visible {
	background: var(--ags-orange);
	color: #ffffff;
	text-decoration: none;
}

/* --------------------------------------------------------- dots / mobile */

.ags-mobnav {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	margin-top: 24px;
	pointer-events: auto;
}

.ags-dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ags-dot {
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 9999px;
	background: rgba(17, 17, 17, 0.3);
	transition: width 0.3s ease, background-color 0.3s ease;
}

.ags-dot.is-on {
	width: 18px;
	background: var(--ags-orange);
}

/* ========================================================== >= 1025px === */
/* Two columns only from 1025px up. Between 768 and 1024 the copy block would
   land on top of the image, so those widths use the stacked layout. */

@media (min-width: 1025px) {
	.ags {
		padding-bottom: 56px;
	}

	.ags-stage {
		padding: 64px 0;
		min-height: calc(var(--ags-img-h) + 128px);
	}

	.ags-panel {
		display: block;
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		width: var(--ags-panel-w);
		background: var(--ags-panel);
	}

	.ags-imgcol {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		width: auto;
		padding: 0;
	}

	/* exactly half the grey panel, so the image straddles its right edge */
	.ags-imgshift {
		margin-left: var(--ags-img-x);
	}

	.ags-imgbox {
		width: var(--ags-img-w);
	}

	.ags-nav {
		display: flex;
		flex-direction: column;
		align-items: center;
		position: absolute;
		top: 50%;
		z-index: 3; /* above .ags-copycol, whose text block reaches this far */
	}

	.ags-nav--prev {
		left: 0;
		transform: translate(calc(-100% - 16px), -50%);
	}

	.ags-nav--next {
		right: 0;
		transform: translate(calc(100% + 16px), -50%);
	}

	.ags-copycol {
		padding: 0 10px;
	}

	.ags-grid {
		grid-template-columns: 1fr 1fr;
		gap: 20px;
	}

	.ags-spacer {
		display: block;
	}

	.ags-copywrap {
		align-items: flex-end;
		margin-top: 0;
		padding: 10px;
	}

	/* 54% of the column — lines up with the philosophy sections' right text */
	.ags-copies,
	.ags-mobnav {
		width: 54%;
	}

	.ags-h3 {
		font-size: 30px;
		line-height: 42px;
	}

	.ags-mobnav .ags-btn {
		display: none;
	}
}

/* ============================================================ <= 480px === */

@media (max-width: 480px) {
	.ags-title {
		font-size: 24px;
		line-height: 32px;
	}

	.ags-h3 {
		font-size: 22px;
		line-height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ags-img,
	.ags-copy,
	.ags-dot {
		transition: none;
	}
}
