/* Баракат — финансовые модули. Цвета берутся из темы (--bm-blue / --bm-red), иначе фирменные по умолчанию. */
.bmf-fx, .bmf-calc, .bmf-slider {
	--bmf-primary: var(--bm-blue, #005099);
	--bmf-accent: var(--bm-red, #DA211A);
	--bmf-primary-dark: color-mix(in srgb, var(--bmf-primary) 55%, #001020);
	--bmf-primary-10: color-mix(in srgb, var(--bmf-primary) 10%, #fff);
	--bmf-bg: var(--bm-soft, #eef4fa);
	--bmf-line: var(--bm-line, #dce5ef);
	--bmf-text: var(--bm-ink, #0d2440);
	--bmf-muted: var(--bm-muted, #56677d);
	--bmf-r: var(--bm-r-lg, 28px);
	--bmf-r-md: var(--bm-r-md, 18px);
	--bmf-orn: var(--bm-orn, none);
	box-sizing: border-box;
	color: var(--bmf-text);
}
.bmf-fx *, .bmf-calc *, .bmf-slider * { box-sizing: border-box; }
.bmf-ico { width: 24px; height: 24px; flex: none; }
.bmf-empty { padding: 12px 16px; border: 1px dashed #c3c4c7; border-radius: 8px; color: #8a6d00; background: #fffbea; }

/* ---------- Курсы ---------- */
.bmf-fx { background: var(--bmf-bg); border-radius: var(--bmf-r); padding: 28px; height: 100%; }
.bmf-fx__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bmf-fx__title { margin: 0; }
.bmf-fx__date { color: var(--bmf-muted); font-size: 14px; font-weight: 500; }
.bmf-fx__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bmf-fx__tabs button {
	margin: 0; border: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 0; line-height: 1.4;
	background: #fff; color: var(--bmf-text); font: inherit; font-weight: 600; font-size: 13px; text-transform: none; letter-spacing: 0;
}
.bmf-fx__tabs button[aria-selected="true"] { background: var(--bmf-primary); color: #fff; }
.bmf-fx__table { width: 100%; border-collapse: collapse; margin: 0; background: transparent; border: 0; }
.bmf-fx__table th { text-align: left; padding: 10px 4px; font-size: 13px; color: var(--bmf-muted); font-weight: 600; border: 0; border-bottom: 1px solid var(--bmf-line); background: none; }
.bmf-fx__table td { padding: 12px 4px; border: 0; border-bottom: 1px solid var(--bmf-line); font-weight: 600; font-variant-numeric: tabular-nums; background: none !important; }
.bmf-fx__table td small { display: block; color: var(--bmf-muted); font-weight: 400; font-size: 12px; }
.bmf-fx__conv { margin-top: 18px; padding: 16px; background: #fff; border-radius: var(--bmf-r-md); }
.bmf-fx__conv-title { font-weight: 700; margin-bottom: 10px; }
.bmf-fx__conv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bmf-fx__conv-row input, .bmf-fx__conv-row select { height: 44px; width: 120px; margin: 0; padding: 0 12px; border: 1px solid var(--bmf-line); border-radius: 10px; background: #fff; font: inherit; }
.bmf-fx__conv-row select { width: 90px; }
.bmf-fx__eq { color: var(--bmf-muted); font-weight: 600; }
.bmf-fx__res { font-size: 22px; font-weight: 700; color: var(--bmf-primary); }
.bmf-fx__hint { margin: 8px 0 0; font-size: 12px; color: var(--bmf-muted); }

/* ---------- Калькулятор ---------- */
.bmf-calc { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; padding: 32px; border-radius: var(--bmf-r); background: var(--bmf-bg); }
.bm-sec--soft .bmf-calc, .bm-sec--soft .bmf-fx { background: #fff; }
.bm-sec--soft .bmf-calc .bmf-seg, .bm-sec--soft .bmf-calc .bmf-range__val, .bm-sec--soft .bmf-fx__tabs button, .bm-sec--soft .bmf-fx__conv { background: var(--bmf-bg); }
.bmf-calc__title { font-size: clamp(22px, 2vw, 28px); }
.bmf-calc__title { display: flex; align-items: center; gap: 12px; margin: 0; }
.bmf-calc__title .bmf-ico { color: var(--bmf-primary); width: 30px; height: 30px; }
.bmf-calc__form { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.bmf-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.bmf-field > span { font-size: 13px; font-weight: 600; color: var(--bmf-muted); }
.bmf-field select {
	width: 100%; min-height: 48px; margin: 0; padding: 10px 40px 10px 14px; border: 1px solid var(--bmf-line); border-radius: 12px; font: inherit; cursor: pointer;
	appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.bmf-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #fff; border-radius: 12px; align-self: flex-start; }
.bmf-seg label { cursor: pointer; margin: 0; }
.bmf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bmf-seg span { display: block; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--bmf-muted); }
.bmf-seg input:checked + span { background: var(--bmf-primary); color: #fff; }
.bmf-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--bmf-primary) 40%, transparent); }
.bmf-range__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; }
.bmf-range__val { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; margin: 0; background: #fff; border-radius: 10px; font-weight: 700; color: var(--bmf-primary); }
.bmf-range__val input { width: 96px; margin: 0; border: 0; background: transparent; text-align: right; font: inherit; font-weight: 700; color: var(--bmf-primary); padding: 6px 0; box-shadow: none; -moz-appearance: textfield; }
.bmf-range__val input::-webkit-inner-spin-button { -webkit-appearance: none; }
.bmf-range__limits { display: flex; justify-content: space-between; font-size: 12px; color: var(--bmf-muted); margin-top: 6px; }
.bmf-range input[type="range"] {
	--fill: 50%;
	-webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 8px 0; padding: 0; border: 0; border-radius: 6px;
	background: linear-gradient(90deg, var(--bmf-primary) var(--fill), #d3dce8 var(--fill)); cursor: pointer;
}
.bmf-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 6px solid var(--bmf-primary); box-shadow: 0 2px 8px rgba(0, 40, 90, .25); }
.bmf-range input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 6px solid var(--bmf-primary); box-shadow: 0 2px 8px rgba(0, 40, 90, .25); }
.bmf-calc__result { position: relative; isolation: isolate; overflow: hidden; align-self: stretch; padding: 32px; border-radius: var(--bmf-r-md); background: var(--bmf-primary); color: rgba(255, 255, 255, .8); min-width: 0; }
.bmf-calc__result::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .07); -webkit-mask: var(--bmf-orn) 0 0 / 56px 56px repeat; mask: var(--bmf-orn) 0 0 / 56px 56px repeat; }
.bmf-calc__label { margin: 0; color: rgba(255, 255, 255, .75); font-weight: 500; }
.bmf-calc__main { margin: 6px 0 22px; font-size: clamp(32px, 3.4vw, 44px); font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bmf-calc__rows { margin: 0 0 24px; }
.bmf-calc__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.bmf-calc__rows dt { color: rgba(255, 255, 255, .72); margin: 0; font-weight: 400; }
.bmf-calc__rows dd { color: #fff; }
.bmf-calc__result .bmf-link { color: #fff; }
.bmf-calc__note { color: rgba(255, 255, 255, .6) !important; }
.bmf-calc__rows dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bmf-btn {
	display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 12px 24px;
	border-radius: 12px; background: var(--bmf-accent); color: #fff !important; font-weight: 600; text-decoration: none !important; transition: filter .15s;
}
.bmf-btn:hover { filter: brightness(.9); }
.bmf-link { display: block; margin: 12px auto 0; padding: 4px; border: 0; background: none; color: var(--bmf-primary); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bmf-calc__note { margin: 14px 0 0; font-size: 12.5px; color: var(--bmf-muted); }
.bmf-calc__sched { grid-column: 1 / -1; max-height: 420px; overflow: auto; background: #fff; border-radius: var(--bmf-r-md); border: 1px solid var(--bmf-line); }
.bmf-calc__sched table { width: 100%; border-collapse: collapse; margin: 0; font-variant-numeric: tabular-nums; font-size: 14px; border: 0; }
.bmf-calc__sched th { position: sticky; top: 0; background: var(--bmf-primary); color: #fff; padding: 10px 12px; text-align: right; font-weight: 600; border: 0; }
.bmf-calc__sched td { padding: 8px 12px; text-align: right; border: 0; border-bottom: 1px solid var(--bmf-line); }
.bmf-calc__sched th:first-child, .bmf-calc__sched td:first-child { text-align: center; width: 50px; }

/* ---------- Слайдер ---------- */
.bmf-slider { --bmf-slide-h: 460px; position: relative; overflow: hidden; border-radius: var(--bmf-r); color: #fff; }
.bmf-slider__track { display: flex; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.bmf-slide {
	--bmf-slide-bg: var(--bmf-primary);
	flex: 0 0 100%; position: relative; display: grid; grid-template-columns: 1.1fr 1fr; min-height: var(--bmf-slide-h);
	background: linear-gradient(120deg, var(--bmf-slide-bg) 0%, color-mix(in srgb, var(--bmf-slide-bg) 55%, #001020) 100%);
	overflow: hidden;
}
.bmf-slide__body { position: relative; z-index: 2; align-self: center; padding: 48px 0 76px 56px; }
.bmf-slide__title { color: #fff; font-size: clamp(28px, 1.6rem + 2.2vw, 52px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 18px; max-width: 620px; }
.bmf-slide__text { font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .85); max-width: 500px; margin: 0 0 30px; }
.bmf-slide__btn {
	display: inline-flex; align-items: center; min-height: 50px; padding: 12px 26px; border-radius: 12px;
	background: var(--bmf-accent); color: #fff !important; font-weight: 600; text-decoration: none !important; transition: background-color .15s;
}
.bmf-slide__btn:hover { background: color-mix(in srgb, var(--bmf-accent) 84%, #000); }
/* Плитки «Быстрые ссылки» наезжают на слайдер — освободить место снизу. */
.bmf-slider:has(+ .bm-tiles.is-overlap) .bmf-slide__body { padding-bottom: 128px; }
.bmf-slider:has(+ .bm-tiles.is-overlap) .bmf-slider__nav { bottom: 68px; }
.bmf-slide__media { position: relative; overflow: hidden; }
.bmf-slide__media picture { display: block; position: absolute; inset: 0; }
.bmf-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bmf-slide--split.has-img .bmf-slide__media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--bmf-slide-bg) 0%, transparent 35%); }
.bmf-slide--cover .bmf-slide__media { position: absolute; inset: 0; z-index: 0; }
.bmf-slide--cover.has-img .bmf-slide__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bmf-slide-bg) 85%, transparent) 0%, transparent 70%); }
.bmf-slide--cover { grid-template-columns: 1.1fr 1fr; }
.bmf-slide__deco { position: absolute; inset: 0; background: rgba(255, 255, 255, .17); -webkit-mask: var(--bmf-orn) 0 0 / 56px 56px repeat, linear-gradient(90deg, transparent, #000 60%); -webkit-mask-composite: source-in; mask: var(--bmf-orn) 0 0 / 56px 56px repeat intersect, linear-gradient(90deg, transparent, #000 60%); }
.bmf-slide__deco i { display: none; }
.bmf-slider__nav { position: absolute; left: 56px; bottom: 24px; z-index: 3; display: flex; align-items: center; gap: 14px; }
.bmf-slider__arrow {
	width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer; min-height: 0;
	display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .15); color: #fff; transition: background .15s;
}
.bmf-slider__arrow:hover { background: rgba(255, 255, 255, .3); }
.bmf-slider__dots { display: flex; gap: 8px; }
.bmf-slider__dots button { width: 28px; height: 4px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; cursor: pointer; background: rgba(255, 255, 255, .35); transition: width .2s, background .2s; }
.bmf-slider__dots button[aria-current="true"] { width: 44px; background: #fff; }

@media (max-width: 1023px) {
	.bmf-calc { grid-template-columns: 1fr; padding: 24px; }
	.bmf-slider:has(+ .bm-tiles.is-overlap) .bmf-slide__body { padding-bottom: 108px; }
	.bmf-slider:has(+ .bm-tiles.is-overlap) .bmf-slider__nav { bottom: 48px; }
	.bmf-slide:not(.has-img) .bmf-slide__media { display: block; position: absolute; inset: 0; z-index: 0; }
	.bmf-slide { grid-template-columns: 1fr; min-height: 0; }
	.bmf-slide__body { padding: 36px 28px 84px; }
	.bmf-slide__media { display: none; }
	.bmf-slide.has-img .bmf-slide__media { display: block; position: absolute; inset: 0; z-index: 0; }
	.bmf-slide.has-img .bmf-slide__media::before,
	.bmf-slide.has-img .bmf-slide__media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--bmf-slide-bg) 20%, color-mix(in srgb, var(--bmf-slide-bg) 55%, transparent)); }
	.bmf-slider__nav { left: 28px; }
}
@media (max-width: 600px) {
	.bmf-fx, .bmf-calc { padding: 20px; }
	.bmf-calc__result { padding: 22px; }
	.bmf-slide__body { padding: 28px 22px 80px; }
	.bmf-slide__text { font-size: 16px; }
	.bmf-slider__nav { left: 22px; bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.bmf-slider__track { transition: none; }
}
