/**
 * Favourite moments collage — justified rows (same height, width by aspect).
 */

.m306-mom {
	--m306-mom-ink: #182220;
	--m306-mom-gap: 20px;
	--m306-mom-row-h: clamp(200px, 26vw, 340px);
	--m306-mom-title-font: 'Cinzel', 'Times New Roman', serif;
	--m306-mom-body-font: 'Fahkwang', 'Times New Roman', serif;

	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: #fff;
	box-sizing: border-box;
}

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

.m306-mom__wrap {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--m306-mom-gap);
	width: 100%;
	background: #fff;
}

.m306-mom__row {
	display: flex;
	align-items: stretch;
	gap: var(--m306-mom-gap);
	width: 100%;
	height: var(--m306-mom-row-h);
}

.m306-mom__cell {
	/* Grow by aspect ratio so wider photos take more horizontal space */
	flex: var(--ar, 1) 1 0%;
	position: relative;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #ececec;
	line-height: 0;
	min-width: 0;
	height: 100%;
}

.m306-mom__cell img,
.m306-mom .m306-mom__cell img,
.elementor .m306-mom__cell img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center !important;
	position: static !important;
	inset: auto !important;
}

.m306-mom__card {
	position: absolute;
	z-index: 3;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(720px, 92%);
	max-width: calc(100% - 40px);
	background: #fff;
	padding: clamp(28px, 3.5vw, 44px) clamp(36px, 5vw, 64px);
	text-align: center;
	color: var(--m306-mom-ink);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
}

.m306-mom__title {
	margin: 0 0 22px;
	font-family: var(--m306-mom-title-font);
	font-size: clamp(18px, 2vw, 26px);
	font-weight: 400;
	letter-spacing: 0.2em;
	line-height: 1.25;
	text-transform: uppercase;
	color: #182220;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.m306-mom__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	text-align: left;
}

.m306-mom__footer--single {
	justify-content: center;
	text-align: center;
}

.m306-mom__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin: 0;
	font-family: var(--m306-mom-body-font);
	font-size: 14px;
	font-weight: 300;
	letter-spacing: 0.04em;
	line-height: 1.35;
	color: #182220;
}

.m306-mom__footer--single .m306-mom__meta {
	align-items: center;
}

.m306-mom__socials {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.m306-mom__footer--single .m306-mom__socials {
	justify-content: center;
}

.m306-mom__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #d7d7d7;
	border-radius: 50%;
	color: #182220;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.m306-mom__social:hover,
.m306-mom__social:focus-visible,
.elementor .m306-mom__social:hover,
.elementor .m306-mom__social:focus-visible {
	background: #a7d9cf !important;
	border-color: #a7d9cf !important;
	color: #182220 !important;
	opacity: 1;
	outline: none;
}

@media (max-width: 720px) {
	.m306-mom {
		--m306-mom-row-h: clamp(140px, 38vw, 200px);
	}

	.m306-mom__row {
		/* 2+2 on small screens still justified within each half-row via flex */
		flex-wrap: wrap;
		height: auto;
	}

	.m306-mom__cell {
		flex: var(--ar, 1) 1 calc(50% - (var(--m306-mom-gap) / 2));
		height: var(--m306-mom-row-h);
	}

	/* Max 4 photos on mobile: first row only (wraps 2 + 2) */
	.m306-mom__row + .m306-mom__row {
		display: none;
	}

	/* Title stacked word under word */
	.m306-mom__word {
		display: block;
	}

	.m306-mom__card {
		width: min(320px, 86%);
		padding: 22px 18px;
	}

	.m306-mom__title {
		font-size: 16px;
		white-space: normal;
		margin-bottom: 16px;
	}

	.m306-mom__footer {
		flex-direction: column;
		align-items: center;
		gap: 14px;
		text-align: center;
	}

	.m306-mom__meta {
		align-items: center;
	}

	.m306-mom__socials {
		justify-content: center;
	}
}
