/* ==========================================================================
   Galleria De Rings: Lab-grown diamonds guide (home page, below Top
   Jewellery Trends)
   On white:
   - Centred small label, serif heading (last word italic), intro line.
   - A bento of three white rounded cards (hairline edge, soft shadow):
       left:  tall card, picture on top (slanted bottom edge), text below
       right: wide card, text left + picture right (slanted left edge)
              wide card, picture left (slanted right edge) + text right
     Each card: small number, serif heading, text, navy outline pill button
     (a navy curtain sweeps in on hover).
   Pictures are loose-diamond photos laid out on a soft backdrop; the
   photos' white backdrop takes the picture colour through a multiply blend.
   Tablets and phones: one card under the other, picture on top.
   ========================================================================== */

.lab-edu {
	--lab-radius: clamp(18px, 1.8vw, 24px);
	--lab-card: var(--g-white);
	--lab-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	padding: clamp(56px, 6.5vw, 100px) clamp(16px, 4vw, 64px);
	background: var(--g-white);
}

.lab-edu__inner {
	max-width: 1240px;
	margin: 0 auto;
}

/* Heading */
.lab-edu__head {
	max-width: 640px;
	margin: 0 auto clamp(30px, 3.6vw, 52px);
	text-align: center;
}

.lab-edu__eyebrow {
	margin: 0 0 12px;
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.lab-edu__title {
	margin: 0 0 14px;
	color: var(--g-navy);
	font-family: var(--g-font-heading);
	font-size: clamp(30px, 3.4vw, 46px);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.01em;
}

.lab-edu__title em {
	font-style: italic;
}

.lab-edu__intro {
	margin: 0;
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 1rem;
	line-height: 1.6;
}

/* Bento */
.lab-edu__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 2fr);
	gap: clamp(16px, 2vw, 26px);
}

.lab-edu__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(11, 19, 42, 0.08);
	border-radius: var(--lab-radius);
	background: var(--lab-card);
	box-shadow: 0 18px 40px -34px rgba(11, 19, 42, 0.4);
}

.lab-edu__card--why {
	grid-row: 1 / span 2;
}

.lab-edu__card--what,
.lab-edu__card--cert {
	display: grid;
	align-items: stretch;
}

.lab-edu__card--what {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.lab-edu__card--cert {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.lab-edu__card--what .lab-edu__media {
	order: 2;
}

/* Picture (slanted edge towards the text) */
.lab-edu__media {
	position: relative;
	overflow: hidden;
	min-height: 260px;
	background: var(--lab-bg, #eceef2);
}

.lab-edu__card--why .lab-edu__media {
	--lab-bg: #eceef2; /* cool light grey */

	aspect-ratio: 1 / 0.92;
	min-height: 0;
	clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
}

.lab-edu__card--what .lab-edu__media {
	--lab-bg: #ebe9ef; /* soft lilac grey */

	clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}

.lab-edu__card--cert .lab-edu__media {
	--lab-bg: #efe7dc; /* warm sand */

	clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}

.lab-edu__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* One loose diamond: placed and turned by the template's --x/--y/--w/--r. */
.lab-edu__stone {
	position: absolute;
	top: var(--y);
	left: var(--x);
	display: block;
	width: var(--w);
	height: auto;
	mix-blend-mode: multiply; /* the photo's white backdrop takes the picture colour */
	transform: rotate(var(--r, 0deg));
}

.lab-edu__badge {
	position: absolute;
	bottom: 12%;
	left: 40%;
	padding: 7px 16px;
	border-radius: 999px;
	background: var(--g-white);
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 8px 20px -14px rgba(11, 19, 42, 0.5);
	transform: translateX(-50%);
}

/* Text */
.lab-edu__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(24px, 2.6vw, 38px);
}

.lab-edu__card--why .lab-edu__body {
	padding-top: clamp(10px, 1.2vw, 18px);
}

.lab-edu__num {
	margin-bottom: 8px;
	color: var(--g-navy);
	font-family: var(--g-font-heading);
	font-size: 1.05rem;
	font-style: italic;
	opacity: 0.55;
}

.lab-edu__card-title {
	margin: 0 0 clamp(12px, 1.2vw, 16px);
	color: var(--g-navy);
	font-family: var(--g-font-heading);
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.lab-edu__text {
	margin: 0 0 clamp(20px, 2vw, 28px);
	color: var(--g-text);
	font-family: var(--g-font-body);
	font-size: 0.95rem;
	line-height: 1.7;
}

/* Button pinned to the bottom of the card */
.lab-edu__btn {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: auto;
	padding: 0 26px;
	overflow: hidden;
	border: 1px solid var(--g-navy);
	border-radius: 999px;
	color: var(--g-navy);
	font-family: var(--g-font-body);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.3s var(--lab-ease) 0.05s;
}

.lab-edu__btn::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: var(--g-navy);
	content: "";
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform 0.45s var(--lab-ease);
}

.lab-edu__btn:hover,
.lab-edu__btn:focus-visible {
	color: var(--g-white);
}

.lab-edu__btn:hover::before,
.lab-edu__btn:focus-visible::before {
	transform: scaleX(1);
	transform-origin: left center;
}

.lab-edu__btn:focus-visible {
	outline: 2px solid var(--g-navy);
	outline-offset: 3px;
}

/* Tablets and phones: one column, every card picture on top */
@media (max-width: 991px) {
	.lab-edu__grid {
		grid-template-columns: 1fr;
	}

	.lab-edu__card--why {
		grid-row: auto;
	}

	.lab-edu__card--what,
	.lab-edu__card--cert {
		display: flex;
		flex-direction: column;
	}

	.lab-edu__card--what .lab-edu__media {
		order: 0;
	}

	.lab-edu__card .lab-edu__media,
	.lab-edu__card--why .lab-edu__media {
		aspect-ratio: 16 / 10;
		min-height: 0;
		clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
	}

	.lab-edu__card .lab-edu__body {
		padding: 16px 22px 26px;
	}
}

@media (max-width: 767px) {
	.lab-edu {
		padding: 48px 16px 56px;
	}

	.lab-edu__title {
		font-size: clamp(28px, 7.6vw, 34px);
	}

	.lab-edu__card-title {
		font-size: 24px;
	}

	.lab-edu__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lab-edu__btn,
	.lab-edu__btn::before {
		transition: none;
	}
}
