/* Memoriez Stories — front-end */
.mfs-stories,
.mfs-stories *,
.mfs-modal,
.mfs-modal * {
	box-sizing: border-box;
}

.mfs-stories {
	position: relative;
	isolation: isolate;
	width: 100%;
	padding: var(--mfs-pad-top, 72px) 0 var(--mfs-pad-bottom, 72px);
	margin: 0;
	background: var(--mfs-bg, #f7f4ef);
	color: var(--mfs-text, #201e1a);
	font-family: var(--mfs-font, inherit);
	line-height: 1.5;
	overflow: hidden;
}

.mfs-stories::before {
	content: "";
	position: absolute;
	inset: -220px auto auto -160px;
	width: 440px;
	height: 440px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(184,146,93,.16), transparent 69%);
	background: radial-gradient(circle, color-mix(in srgb, var(--mfs-accent, #b8925d) 16%, transparent), transparent 69%);
	pointer-events: none;
	z-index: -1;
}

.mfs-stories__inner {
	width: min(calc(100% - 40px), var(--mfs-max-width, 1280px));
	margin-inline: auto;
}

.mfs-stories__header {
	max-width: 840px;
	margin: 0 auto 42px;
	text-align: center;
}

.mfs-stories__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	margin-bottom: 15px;
	color: var(--mfs-accent, #b8925d);
	font-size: 12px;
	font-weight: 750;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.mfs-stories__eyebrow span {
	display: block;
	width: 30px;
	height: 1px;
	background: currentColor;
	opacity: .6;
}

.mfs-stories__header h2 {
	margin: 0;
	color: var(--mfs-text, #201e1a);
	font: inherit;
	font-size: clamp(var(--mfs-heading-mobile, 34px), 4.2vw, var(--mfs-heading-size, 48px));
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -.035em;
}

.mfs-stories__header p {
	max-width: 680px;
	margin: 18px auto 0;
	color: var(--mfs-muted, #6e685f);
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.75;
}

.mfs-carousel-shell {
	position: relative;
}

.mfs-swiper {
	width: 100%;
	overflow: hidden;
	padding: 8px 2px 24px;
}

.mfs-slide {
	height: auto;
}

.mfs-card {
	position: relative;
	height: 100%;
	min-width: 0;
	border-radius: var(--mfs-radius, 26px);
	background: var(--mfs-card-bg, #171613);
	box-shadow: 0 20px 52px rgba(25, 21, 15, .12), 0 3px 10px rgba(25, 21, 15, .08);
	transform: translateZ(0);
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease;
	overflow: hidden;
}

.mfs-card__trigger {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: pointer;
	appearance: none;
}

.mfs-card__trigger:focus-visible {
	outline: 3px solid var(--mfs-accent, #b8925d);
	outline-offset: 4px;
}

.mfs-card__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--mfs-aspect, 4 / 5);
	min-height: 360px;
	background: var(--mfs-card-bg, #171613);
	overflow: hidden;
}

.mfs-card__image,
.mfs-card__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: cover;
	transform: scale(1.001);
	transition: transform .75s cubic-bezier(.2, .75, .2, 1), filter .45s ease, opacity .35s ease;
}

.mfs-card__video {
	pointer-events: none;
}

.mfs-card__skeleton {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(105deg, #1d1b17 8%, #2b2822 18%, #1d1b17 33%);
	background-size: 220% 100%;
	animation: mfs-shimmer 1.5s linear infinite;
}

.mfs-card__media.is-loaded .mfs-card__skeleton {
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s ease;
}

@keyframes mfs-shimmer {
	to { background-position-x: -220%; }
}

.mfs-card__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	background:
		linear-gradient(to top, var(--mfs-overlay, #090806) 0%, var(--mfs-overlay, #090806) 28%, transparent 76%),
		linear-gradient(to bottom, rgba(0,0,0,.38), transparent 28%);
	opacity: var(--mfs-overlay-opacity, .68);
	pointer-events: none;
	transition: opacity .35s ease;
}

.mfs-card__topline {
	position: absolute;
	z-index: 3;
	inset: 18px 18px auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	pointer-events: none;
}

.mfs-card__badge,
.mfs-card__pinned {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 30px;
	padding: 6px 11px;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 999px;
	background: rgba(19, 17, 14, .38);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: #fff;
	font-size: 11px;
	font-weight: 720;
	line-height: 1;
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.mfs-card__pinned {
	margin-inline-start: auto;
	background: rgba(184,146,93,.78);
	background: color-mix(in srgb, var(--mfs-accent, #b8925d) 78%, transparent);
	border-color: rgba(213,184,143,.88);
	border-color: color-mix(in srgb, var(--mfs-accent, #b8925d) 88%, white 12%);
}

.mfs-card__pinned svg {
	width: 13px;
	height: 13px;
	fill: currentColor;
}

.mfs-card__play,
.mfs-card__zoom {
	position: absolute;
	inset: 50% auto auto 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	border: 1px solid rgba(255,255,255,.44);
	border-radius: 50%;
	background: rgba(255,255,255,.16);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 12px 38px rgba(0,0,0,.22);
	transform: translate(-50%, -50%);
	transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s ease;
	pointer-events: none;
}

.mfs-card__play svg,
.mfs-card__zoom svg {
	width: 28px;
	height: 28px;
	fill: #fff;
	stroke: #fff;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mfs-card__play svg {
	margin-inline-start: 3px;
	stroke: none;
}

.mfs-card__content {
	position: absolute;
	z-index: 3;
	inset: auto 0 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 30px 28px 27px;
	color: var(--mfs-card-text, #fff);
	pointer-events: none;
}

.mfs-card__family {
	display: block;
	margin-bottom: 7px;
	color: #d9b783;
	color: color-mix(in srgb, var(--mfs-accent, #b8925d) 82%, white 18%);
	font-size: 12px;
	font-weight: 760;
	letter-spacing: .055em;
}

.mfs-card__title {
	display: -webkit-box;
	margin: 0;
	font-size: var(--mfs-card-title-size, 26px);
	font-weight: 670;
	line-height: 1.22;
	letter-spacing: -.025em;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mfs-card__description {
	display: -webkit-box;
	margin-top: 9px;
	color: rgba(255,255,255,.82);
	font-size: 14px;
	line-height: 1.55;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mfs-card__meta {
	display: block;
	margin-top: 10px;
	color: rgba(255,255,255,.66);
	font-size: 11px;
	line-height: 1.4;
}

.mfs-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--mfs-accent, #b8925d);
	border-bottom: 1px solid color-mix(in srgb, var(--mfs-accent, #b8925d) 78%, transparent);
	color: #fff;
	font-size: 13px;
	font-weight: 720;
}

.mfs-card__cta svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .3s ease;
}

.mfs-stories[dir="rtl"] .mfs-card__cta svg {
	transform: scaleX(-1);
}

@media (hover: hover) {
	.mfs-card:hover {
		transform: translateY(-7px);
		box-shadow: 0 28px 65px rgba(25, 21, 15, .18), 0 5px 14px rgba(25, 21, 15, .09);
	}
	.mfs-card:hover .mfs-card__image,
	.mfs-card:hover .mfs-card__video {
		transform: scale(1.055);
		filter: saturate(1.03);
	}
	.mfs-card:hover .mfs-card__play,
	.mfs-card:hover .mfs-card__zoom {
		transform: translate(-50%, -50%) scale(1.1);
		background: rgba(184,146,93,.72);
		background: color-mix(in srgb, var(--mfs-accent, #b8925d) 72%, transparent);
	}
	.mfs-card:hover .mfs-card__cta svg {
		transform: translateX(3px);
	}
	.mfs-stories[dir="rtl"] .mfs-card:hover .mfs-card__cta svg {
		transform: scaleX(-1) translateX(3px);
	}
}

.mfs-nav {
	position: absolute;
	top: 50%;
	z-index: 8;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	margin: 0;
	border: 1px solid rgba(32,30,26,.13);
	border: 1px solid color-mix(in srgb, var(--mfs-text, #201e1a) 13%, transparent);
	border-radius: 50%;
	background: #fbf8f3;
	background: color-mix(in srgb, var(--mfs-bg, #f7f4ef) 88%, white 12%);
	color: var(--mfs-text, #201e1a);
	box-shadow: 0 10px 30px rgba(24,21,17,.11);
	transform: translateY(-50%);
	cursor: pointer;
	transition: transform .25s ease, background .25s ease, color .25s ease, opacity .25s ease;
	appearance: none;
}

.mfs-nav--prev { inset-inline-start: -24px; }
.mfs-nav--next { inset-inline-end: -24px; }

.mfs-nav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mfs-stories[dir="rtl"] .mfs-nav svg {
	transform: scaleX(-1);
}

.mfs-nav:hover,
.mfs-nav:focus-visible {
	background: var(--mfs-accent, #b8925d);
	color: #fff;
	transform: translateY(-50%) scale(1.05);
	outline: none;
}

.mfs-nav.swiper-button-disabled,
.mfs-nav:disabled {
	opacity: .32;
	pointer-events: none;
}

.mfs-pagination {
	position: relative !important;
	inset: auto !important;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 7px;
	min-height: 18px;
	margin-top: 7px;
}

.mfs-pagination .swiper-pagination-bullet {
	width: 7px;
	height: 7px;
	margin: 0 !important;
	border: 0;
	border-radius: 999px;
	background: var(--mfs-text, #201e1a);
	opacity: .25;
	transition: width .28s ease, opacity .28s ease, background .28s ease;
}

.mfs-pagination .swiper-pagination-bullet-active {
	width: 28px;
	background: var(--mfs-accent, #b8925d);
	opacity: 1;
}

.mfs-empty-front {
	padding: 16px 20px;
	border: 1px dashed #c8bda9;
	border-radius: 12px;
	background: #fffaf3;
	color: #5c5144;
	font-size: 14px;
	text-align: center;
}

/* Fallback when Swiper cannot initialize. */
.mfs-swiper--fallback {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.mfs-swiper--fallback::-webkit-scrollbar { display: none; }
.mfs-swiper--fallback .swiper-wrapper { display: flex; gap: 24px; }
.mfs-swiper--fallback .mfs-slide { flex: 0 0 min(84%, 390px); scroll-snap-align: start; }

/* Front-end lightbox. */
body.mfs-modal-open {
	overflow: hidden !important;
}

.mfs-modal[hidden] {
	display: none !important;
}

.mfs-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	font-family: var(--mfs-font, inherit);
	direction: inherit;
	opacity: 0;
	visibility: hidden;
	transition: opacity .22s ease, visibility .22s ease;
}

.mfs-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.mfs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 7, 6, .82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.mfs-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(1180px, calc(100vw - 48px));
	max-height: min(860px, calc(100vh - 48px));
	border: 1px solid rgba(255,255,255,.13);
	border-radius: 26px;
	background: #161410;
	color: #fff;
	box-shadow: 0 35px 100px rgba(0,0,0,.5);
	outline: none;
	overflow: visible;
	transform: translateY(18px) scale(.98);
	transition: transform .3s cubic-bezier(.2,.75,.2,1);
}

.mfs-modal.is-open .mfs-modal__dialog {
	transform: translateY(0) scale(1);
}

.mfs-modal__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(300px, .8fr);
	min-height: min(680px, calc(100vh - 70px));
	max-height: min(820px, calc(100vh - 48px));
	border-radius: inherit;
	overflow: hidden;
}

.mfs-modal__media {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: 420px;
	background: #080706;
	overflow: hidden;
}

.mfs-modal__image,
.mfs-modal__video {
	display: block;
	width: 100%;
	height: 100%;
	max-height: min(820px, calc(100vh - 48px));
	margin: 0;
	border: 0;
	background: #080706;
	object-fit: contain;
}

.mfs-modal__loader {
	position: absolute;
	inset: 50% auto auto 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 3px solid rgba(255,255,255,.16);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mfs-spin .8s linear infinite;
}

.mfs-modal__media:not(.is-loading) .mfs-modal__loader {
	display: none;
}

@keyframes mfs-spin { to { transform: rotate(360deg); } }

.mfs-modal__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: clamp(34px, 5vw, 68px);
	background: linear-gradient(145deg, #1d1a15, #12110e);
	overflow-y: auto;
}

.mfs-modal__badge {
	margin-bottom: 22px;
	padding: 7px 11px;
	border: 1px solid rgba(184,146,93,.48);
	border-radius: 999px;
	background: rgba(184,146,93,.12);
	color: #d9b783;
	font-size: 11px;
	font-weight: 760;
}

.mfs-modal__family {
	margin-bottom: 9px;
	color: #d9b783;
	font-size: 13px;
	font-weight: 760;
	letter-spacing: .04em;
}

.mfs-modal__content h2 {
	margin: 0;
	color: #fff;
	font: inherit;
	font-size: clamp(30px, 3.8vw, 48px);
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -.035em;
}

.mfs-modal__meta {
	margin-top: 18px;
	color: rgba(255,255,255,.55);
	font-size: 12px;
}

.mfs-modal__description {
	margin: 23px 0 0;
	color: rgba(255,255,255,.78);
	font-size: 16px;
	line-height: 1.8;
	white-space: pre-line;
}

.mfs-modal__close {
	position: absolute;
	z-index: 5;
	inset: 18px 18px auto auto;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid rgba(255,255,255,.25);
	border-radius: 50%;
	background: rgba(16,14,11,.55);
	backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
}

[dir="rtl"] .mfs-modal__close,
html[dir="rtl"] .mfs-modal__close {
	inset: 18px auto auto 18px;
}

.mfs-modal__close svg,
.mfs-modal__nav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.mfs-modal__close:hover,
.mfs-modal__close:focus-visible {
	background: #fff;
	color: #15130f;
	outline: none;
}

.mfs-modal__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255,255,255,.26);
	border-radius: 50%;
	background: rgba(14,12,10,.62);
	backdrop-filter: blur(8px);
	color: #fff;
	transform: translateY(-50%);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.mfs-modal__nav--prev { inset-inline-start: -68px; }
.mfs-modal__nav--next { inset-inline-end: -68px; }

.mfs-modal__nav:hover,
.mfs-modal__nav:focus-visible {
	background: #b8925d;
	transform: translateY(-50%) scale(1.06);
	outline: none;
}

html[dir="rtl"] .mfs-modal__nav svg {
	transform: scaleX(-1);
}

@media (max-width: 1360px) {
	.mfs-nav--prev { inset-inline-start: 7px; }
	.mfs-nav--next { inset-inline-end: 7px; }
	.mfs-modal__nav--prev { inset-inline-start: 14px; }
	.mfs-modal__nav--next { inset-inline-end: 14px; }
}

@media (max-width: 900px) {
	.mfs-stories__inner { width: min(calc(100% - 28px), var(--mfs-max-width, 1280px)); }
	.mfs-stories__header { margin-bottom: 30px; }
	.mfs-card__media { min-height: 330px; }
	.mfs-card__content { padding: 25px 22px 22px; }
	.mfs-modal { padding: 12px; }
	.mfs-modal__dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); border-radius: 20px; }
	.mfs-modal__layout { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 58vh) auto; min-height: 0; max-height: calc(100vh - 24px); overflow-y: auto; }
	.mfs-modal__media { min-height: 300px; }
	.mfs-modal__image,
	.mfs-modal__video { max-height: 58vh; }
	.mfs-modal__content { padding: 28px 25px 32px; overflow: visible; }
	.mfs-modal__content h2 { font-size: clamp(27px, 8vw, 38px); }
	.mfs-modal__nav { top: 29vh; width: 42px; height: 42px; }
	.mfs-modal__nav--prev { inset-inline-start: 10px; }
	.mfs-modal__nav--next { inset-inline-end: 10px; }
}

@media (max-width: 600px) {
	.mfs-stories { padding-top: min(var(--mfs-pad-top, 72px), 54px); padding-bottom: min(var(--mfs-pad-bottom, 72px), 54px); }
	.mfs-stories__inner { width: calc(100% - 24px); }
	.mfs-stories__eyebrow { gap: 9px; font-size: 10px; letter-spacing: .08em; }
	.mfs-stories__eyebrow span { width: 20px; }
	.mfs-stories__header h2 { font-size: var(--mfs-heading-mobile, 34px); }
	.mfs-stories__header p { margin-top: 13px; font-size: 15px; line-height: 1.65; }
	.mfs-swiper { padding-top: 4px; }
	.mfs-card__media { min-height: 0; }
	.mfs-card__topline { inset: 14px 14px auto; }
	.mfs-card__badge,
	.mfs-card__pinned { min-height: 27px; padding: 5px 9px; font-size: 10px; }
	.mfs-card__play,
	.mfs-card__zoom { width: 58px; height: 58px; }
	.mfs-card__content { padding: 24px 20px 21px; }
	.mfs-card__title { font-size: min(var(--mfs-card-title-size, 26px), 24px); }
	.mfs-card__description { font-size: 13px; }
	.mfs-nav { display: none !important; }
	.mfs-pagination { margin-top: 2px; }
	.mfs-modal__close { inset: 12px 12px auto auto; width: 38px; height: 38px; }
	html[dir="rtl"] .mfs-modal__close { inset: 12px auto auto 12px; }
	.mfs-modal__content { padding: 25px 20px 28px; }
	.mfs-modal__description { margin-top: 17px; font-size: 15px; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
	.mfs-stories *,
	.mfs-modal * {
		scroll-behavior: auto !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* Play-button presets selected in the plugin settings. */
.mfs-stories.mfs-play-style-solid .mfs-card__play,
.mfs-stories.mfs-play-style-solid .mfs-card__zoom {
	border-color: transparent;
	background: var(--mfs-accent, #b8925d);
}

.mfs-stories.mfs-play-style-outline .mfs-card__play,
.mfs-stories.mfs-play-style-outline .mfs-card__zoom {
	border-width: 2px;
	background: rgba(0,0,0,.08);
	box-shadow: none;
}

@media (hover: hover) {
	.mfs-stories.mfs-play-style-solid .mfs-card:hover .mfs-card__play,
	.mfs-stories.mfs-play-style-solid .mfs-card:hover .mfs-card__zoom {
		background: var(--mfs-accent, #b8925d);
	}
	.mfs-stories.mfs-play-style-outline .mfs-card:hover .mfs-card__play,
	.mfs-stories.mfs-play-style-outline .mfs-card:hover .mfs-card__zoom {
		background: rgba(255,255,255,.18);
	}
}
