/* Баракат — финансовые модули. Цвета берутся из темы (--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-bg, #f3f7fc);
	--bmf-line: var(--bm-line, #dfe6ef);
	--bmf-text: var(--bm-text, #0f1b2d);
	--bmf-muted: var(--bm-muted, #5b6878);
	--bmf-r: var(--bm-r, 24px);
	--bmf-r-md: var(--bm-r-md, 16px);
	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: 12px; text-transform: uppercase; letter-spacing: .04em; 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: 800; 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); }
.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 { align-self: start; padding: 28px; border-radius: var(--bmf-r-md); background: #fff; box-shadow: 0 10px 30px rgba(0, 40, 90, .08); min-width: 0; }
.bmf-calc__label { margin: 0; color: var(--bmf-muted); font-weight: 500; }
.bmf-calc__main { margin: 4px 0 18px; font-size: clamp(28px, 3vw, 36px); font-weight: 800; color: var(--bmf-primary); line-height: 1.15; font-variant-numeric: tabular-nums; }
.bmf-calc__rows { margin: 0 0 22px; }
.bmf-calc__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bmf-line); }
.bmf-calc__rows dt { color: var(--bmf-muted); margin: 0; font-weight: 400; }
.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: 12px 0 0; font-size: 12px; color: var(--bmf-muted); }
.bmf-calc__sched { grid-column: 1 / -1; max-height: 420px; overflow: auto; background: #fff; border-radius: var(--bmf-r-md); }
.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: 420px; 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(26px, 3.6vw, 46px); line-height: 1.1; margin: 0 0 16px; }
.bmf-slide__text { font-size: 18px; color: rgba(255, 255, 255, .85); max-width: 480px; margin: 0 0 28px; }
.bmf-slide__btn {
	display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: 12px;
	background: #fff; color: var(--bmf-slide-bg) !important; font-weight: 600; text-decoration: none !important; transition: transform .15s;
}
.bmf-slide__btn:hover { transform: translateY(-2px); }
.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 i { position: absolute; border-radius: 50%; }
.bmf-slide__deco i:first-child { width: 420px; height: 420px; right: -60px; top: -40px; background: rgba(255, 255, 255, .08); }
.bmf-slide__deco i:last-child { width: 260px; height: 260px; right: 120px; bottom: -110px; background: var(--bmf-accent); opacity: .9; }
.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-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; }
	.bmf-slider::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -60px; bottom: -70px; background: var(--bmf-accent); opacity: .85; pointer-events: none; }
}
@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; }
}
