/* =============================================================
   Elite Pearl Charter — "Our Elite Services in Dubai"

   Copy on the left, the eight service links on the right from
   1200px up; stacked below that. Monochrome, same gradient
   accent as the rest of the site.
   ============================================================= */

.epc-services {
	background: var(--epc-black);
	color: var(--epc-silver);
	border-top: 1px solid var(--epc-line-soft);
}

.epc-services__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	width: 100%;
	max-width: var(--epc-container);
	margin-inline: auto;
	padding: 4rem var(--epc-gutter);
}

@media (min-width: 768px) {
	.epc-services__inner {
		padding-block: 5.5rem;
		gap: 3rem;
	}
}

/*
 * The link column is deliberately narrower than the copy column. At an even
 * split each pill ran ~554px wide against a longest label of ~300px, leaving
 * 250px of dead space inside every row.
 */
@media (min-width: 1200px) {
	.epc-services__inner {
		grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
		/* stretch, not start: the aside must match the copy column's height for
		   the image below the links to have leftover space to fill. */
		align-items: stretch;
		gap: 3.5rem;
		padding-block: 7rem;
	}
}

/* Wide desktops have room for two link columns, which fills them properly. */
@media (min-width: 1536px) {
	.epc-services__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: 4rem;
	}
}

/* --- Copy column ------------------------------------------------ */

.epc-services__eyebrow {
	margin: 0 0 0.75rem;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.6875rem, 1.6vw, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--epc-silver);
}

.epc-services__heading {
	margin: 0;
	font-family: var(--epc-font-serif);
	font-size: clamp(1.625rem, 4.6vw, 2.75rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-wrap: balance;
}

.epc-services__rule {
	display: block;
	width: 72px;
	height: 1px;
	margin: 1.25rem 0 1.5rem;
	background: linear-gradient(
		to right,
		rgb(255 255 255 / 70%) 0%,
		transparent 100%
	);
}

.epc-services__text {
	margin: 0;
	max-width: 68ch;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.875rem, 2vw, 1rem);
	line-height: 1.9;
	color: var(--epc-grey);
}

.epc-services__cta {
	margin-top: 2rem;
}

@media (max-width: 479.98px) {
	.epc-services__cta {
		width: 100%;
	}
}

/* --- Service links ----------------------------------------------- */

.epc-services__list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 560px) {
	.epc-services__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
	}
}

/* One column beside the copy, so each label stays on one line. */
@media (min-width: 1200px) {
	.epc-services__list {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}
}

/*
 * Two columns from 1536px. Padding and gaps tighten here so the longest label,
 * "Private Yacht Charter Dubai", still fits on one line in the narrower pill.
 */
@media (min-width: 1536px) {
	.epc-services__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.6rem;
	}

	.epc-services__link {
		gap: 0.55rem;
		padding: 0.85rem 0.9rem;
	}
}

.epc-services__link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	overflow: hidden;
	padding: 0.95rem 1.1rem;
	font-family: var(--epc-font-sans);
	font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	color: var(--epc-nav-idle);
	background: var(--epc-ink-950);
	border: 1px solid var(--epc-line-soft);
	border-radius: 10px;
	transition: color 300ms var(--epc-ease),
		border-color 300ms var(--epc-ease),
		transform 300ms var(--epc-ease);
}

/* The diamond marker, drawn rather than typed so it is never read aloud. */
.epc-services__link::before {
	content: "";
	flex-shrink: 0;
	width: 7px;
	height: 7px;
	background: var(--epc-gradient-title);
	transform: rotate(45deg);
	transition: transform 300ms var(--epc-ease);
}

.epc-services__label {
	flex: 1;
}

.epc-services__arrow {
	flex-shrink: 0;
	font-size: 0.75rem;
	opacity: 0;
	color: var(--epc-white);
	transform: translateX(-6px);
	transition: opacity 300ms var(--epc-ease),
		transform 300ms var(--epc-ease);
}

.epc-services__link:hover,
.epc-services__link:focus-visible {
	color: var(--epc-white);
	border-color: rgb(255 255 255 / 42%);
	transform: translateX(4px);
}

.epc-services__link:hover::before,
.epc-services__link:focus-visible::before {
	transform: rotate(135deg);
}

.epc-services__link:hover .epc-services__arrow,
.epc-services__link:focus-visible .epc-services__arrow {
	opacity: 1;
	transform: translateX(0);
}

.epc-services__link:focus-visible {
	outline: 2px solid var(--epc-white);
	outline-offset: 2px;
}

/* --- Reduced motion ----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.epc-services__link,
	.epc-services__link::before,
	.epc-services__arrow {
		transition-duration: 0.01ms !important;
	}

	.epc-services__link:hover,
	.epc-services__link:focus-visible {
		transform: none;
	}
}

/* --- Aside: links plus the fill image ------------------------------- */

.epc-services__aside {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/*
 * The image only exists to fill the space under the links, which only appears
 * once the section splits into two columns at 1200px. Below that everything
 * stacks and there is no gap, so it would just add scrolling.
 */
.epc-services__figure {
	display: none;
	margin: 0;
	overflow: hidden;
	border: 1px solid rgb(141 143 142 / 35%);
	border-radius: 14px;
	box-shadow:
		0 10px 30px rgb(0 0 0 / 35%),
		inset 0 1px 0 rgb(255 255 255 / 6%);
}

@media (min-width: 1200px) {
	.epc-services__figure {
		display: block;
		/* Grows to take whatever height the copy column leaves over. */
		flex: 1;
		min-height: 180px;
		/*
		 * Capped because object-fit: cover scales to the binding dimension, and
		 * past roughly 420px tall the box starts demanding more source height
		 * than even the 1620px variant has on a 2x display, which shows as a
		 * soft, upscaled image.
		 */
		max-height: 420px;
	}
}

.epc-services__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 760ms var(--epc-ease-soft);
}

.epc-services__figure:hover .epc-services__img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.epc-services__img {
		transition-duration: 0.01ms !important;
	}

	.epc-services__figure:hover .epc-services__img {
		transform: none;
	}
}
