/* הנצחות (mlm-hantzacha) */

.mlm-hz {
	--hz-bg: #fbf7ef;
	--hz-color: #3b3024;
	--hz-accent: #9a7b3f;
	--hz-border-color: #e6dcc6;
	--hz-border-width: 1px;
	--hz-radius: 10px;
	--hz-max-width: 100%;
	--hz-name-size: 1.5em;
	--hz-img-size: 120px;
	--hz-wax: #f6efdd;
	--hz-align: center;

	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: var(--hz-align);
	gap: 14px;
	width: 100%;
	max-width: var(--hz-max-width);
	margin: 0 auto 1.5em;
	padding: 24px 28px;
	background-color: var(--hz-bg);
	color: var(--hz-color);
	border: var(--hz-border-width) solid var(--hz-border-color);
	border-radius: var(--hz-radius);
	line-height: 1.5;
	text-align: center;
}
.mlm-hz[hidden] { display: none !important; }
.mlm-hz *, .mlm-hz *::before, .mlm-hz *::after { box-sizing: border-box; }

/* ערכות */
.mlm-hz--preset-frame {
	--hz-bg: #ffffff; --hz-color: #1f2a37; --hz-accent: #1f3b5c; --hz-border-color: #1f3b5c; --hz-wax: #eef2f7;
	box-shadow: inset 0 0 0 5px var(--hz-bg), inset 0 0 0 6px var(--hz-accent);
	padding: 30px 32px;
}
.mlm-hz--preset-dark { --hz-bg: #1f2430; --hz-color: #f3efe6; --hz-accent: #d9b56a; --hz-border-color: #1f2430; --hz-wax: #3a4150; }
.mlm-hz--preset-soft { --hz-bg: #f4f5f7; --hz-color: #2b2f36; --hz-accent: #5b6472; --hz-border-color: #e3e6ea; --hz-wax: #ffffff; }
.mlm-hz--preset-minimal { --hz-bg: transparent; --hz-color: inherit; --hz-accent: #8a8f98; --hz-border-color: transparent; --hz-wax: #f1efe9; padding: 8px 0; }

/* יישור */
.mlm-hz--align-start { --hz-align: flex-start; text-align: start; }
.mlm-hz--align-end   { --hz-align: flex-end;   text-align: end; }

/* פריסה */
.mlm-hz--layout-side         { flex-direction: row; align-items: center; gap: 22px; }
.mlm-hz--layout-side-reverse { flex-direction: row-reverse; align-items: center; gap: 22px; }
/* בקופסה צרה (סרגל צד) הטקסט יורד מתחת לנר/לתמונה במקום להידחס */
.mlm-hz--layout-side, .mlm-hz--layout-side-reverse { flex-wrap: wrap; }
.mlm-hz--layout-side .mlm-hz__body,
.mlm-hz--layout-side-reverse .mlm-hz__body { flex: 1 1 220px; min-width: 0; width: auto; }
@media (max-width: 600px) {
	.mlm-hz { padding: 20px 18px; }
	.mlm-hz--layout-side, .mlm-hz--layout-side-reverse { flex-direction: column; align-items: var(--hz-align); }
}

.mlm-hz__visual { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; position: relative; }
.mlm-hz__body { display: flex; flex-direction: column; align-items: var(--hz-align); gap: 6px; width: 100%; }

/* רצועה לרוחב: כל הפרטים בשורה אחת, נשברת במסך צר */
.mlm-hz--layout-strip {
	--hz-img-size: 56px;
	--hz-name-size: 1.15em;
	--hz-sep: "·";
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 14px;
	padding: 12px 20px;
}
.mlm-hz--layout-strip .mlm-hz__visual { gap: 10px; }
.mlm-hz--layout-strip .mlm-hz__candle { width: 22px; }
.mlm-hz--layout-strip .mlm-hz__body {
	flex: 1 1 auto;
	min-width: 0;
	flex-direction: row;
	flex-wrap: var(--hz-strip-wrap, wrap);
	align-items: baseline;
	justify-content: var(--hz-align);
	overflow: hidden;
}
.mlm-hz--layout-strip .mlm-hz__body > :not(.mlm-hz__links) {
	white-space: var(--hz-strip-ws, normal);
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	column-gap: 12px;
	row-gap: 4px;
}
.mlm-hz--layout-strip.mlm-hz--align-center .mlm-hz__body { justify-content: center; }
.mlm-hz--layout-strip .mlm-hz__divider { display: none; }
.mlm-hz--layout-strip .mlm-hz__heading { font-size: .9em; }
.mlm-hz--layout-strip .mlm-hz__text { width: auto; }
.mlm-hz--layout-strip .mlm-hz__text p { display: inline; margin: 0; }
.mlm-hz--layout-strip .mlm-hz__text p + p::before { content: " "; }
.mlm-hz--layout-strip .mlm-hz__links { margin: 0; align-self: center; }
.mlm-hz--layout-strip .mlm-hz__link--button { padding: 5px 14px; font-size: .9em; }
/* מפריד לפני כל פרט, חוץ מהראשון ומהכותרת/השם (שמתחברים זה לזה) */
.mlm-hz--layout-strip .mlm-hz__body > :is(.mlm-hz__parent, .mlm-hz__dates, .mlm-hz__text, .mlm-hz__donor, .mlm-hz__footer)::before {
	content: var(--hz-sep);
	color: var(--hz-accent);
	margin-inline-end: 12px;
	opacity: .8;
}
.mlm-hz--layout-strip .mlm-hz__body > :first-child::before { content: none !important; }
@media (max-width: 600px) {
	.mlm-hz--layout-strip { flex-wrap: wrap; justify-content: center; text-align: center; --hz-align: center; }
	.mlm-hz--layout-strip .mlm-hz__body { justify-content: center; flex-wrap: wrap; }
	.mlm-hz--layout-strip .mlm-hz__body > :not(.mlm-hz__links) { white-space: normal; }
	.mlm-hz--layout-strip .mlm-hz__body > *::before { content: none !important; }
}

/* נר */
.mlm-hz__icon { line-height: 0; }
.mlm-hz__candle { width: 34px; height: auto; display: block; overflow: visible; }
.mlm-hz__candle .mlm-hz__flame { fill: #f0a431; transform-origin: 20px 24px; animation: mlm-hz-flicker 3.2s ease-in-out infinite; }
.mlm-hz__candle .mlm-hz__flame-core { fill: #ffe28a; }
.mlm-hz__candle .mlm-hz__wick { fill: #4a3b2a; }
.mlm-hz__candle .mlm-hz__wax { fill: var(--hz-wax); stroke: var(--hz-accent); stroke-width: 1.2; }
.mlm-hz__candle .mlm-hz__base { fill: var(--hz-accent); }
@keyframes mlm-hz-flicker {
	0%, 100% { transform: scale(1, 1) rotate(0deg); }
	30% { transform: scale(.96, 1.04) rotate(-2deg); }
	60% { transform: scale(1.03, .97) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) { .mlm-hz__candle .mlm-hz__flame { animation: none; } }
.mlm-hz--still .mlm-hz__candle .mlm-hz__flame { animation: none; }

/* תמונה */
.mlm-hz__media { line-height: 0; min-width: 0; }
.mlm-hz__media img, .mlm-hz__img {
	display: block;
	width: var(--hz-img-size);
	max-width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
}
.mlm-hz--img-circle .mlm-hz__img { border-radius: 50%; }
.mlm-hz--img-square .mlm-hz__img { border-radius: 0; }

/* טקסטים */
.mlm-hz__heading { color: var(--hz-accent); font-size: .95em; font-weight: 600; letter-spacing: .04em; }
.mlm-hz__divider { display: block; width: 64px; height: 1px; background: var(--hz-accent); opacity: .7; margin: 2px 0; }
.mlm-hz__name { font-size: var(--hz-name-size); font-weight: 700; line-height: 1.25; margin: 0; color: inherit; }
.mlm-hz__parent, .mlm-hz__dates { font-size: .95em; opacity: .85; }
.mlm-hz__text { font-size: .95em; width: 100%; }
.mlm-hz__text p { margin: .3em 0; }
.mlm-hz__donor { font-size: .9em; opacity: .85; }
.mlm-hz__footer { color: var(--hz-accent); font-size: .9em; font-weight: 600; letter-spacing: .15em; }

/* קישורים */
.mlm-hz__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: var(--hz-align); margin-top: 6px; position: relative; z-index: 2; }
.mlm-hz__link { transition: color .2s, background-color .2s, border-color .2s, opacity .2s; }
.mlm-hz__link--text { color: var(--hz-accent); text-decoration: underline; text-underline-offset: 3px; }
.mlm-hz__link--text:hover { opacity: .8; }
.mlm-hz__link--button {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 999px;
	background-color: var(--hz-accent);
	color: #ffffff;
	text-decoration: none;
	font-size: .95em;
	border: 1px solid transparent;
}
.mlm-hz__link--button:hover { opacity: .88; color: #ffffff; }
.mlm-hz--preset-dark .mlm-hz__link--button, .mlm-hz--preset-dark .mlm-hz__link--button:hover { color: #1f2430; }

/* קישור לכל התיבה */
.mlm-hz__cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mlm-hz--linked { cursor: pointer; }
.mlm-hz--linked .mlm-hz__cover:focus-visible { outline: 2px solid var(--hz-accent); outline-offset: 2px; }

/* כמה הנצחות ברצף */
.mlm-hz-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 1.5em; }
.mlm-hz-list > .mlm-hz { margin-bottom: 0; }

/* הערה בעורך אלמנטור */
.mlm-hz-editor-note { font: 12px/1.4 sans-serif; color: #b32d2e; background: #fcf0f1; border: 1px dashed #d63638; padding: 6px 10px; margin-bottom: 6px; border-radius: 4px; text-align: center; }
