@import url("../_shared/section.css");

/* Пам'ятка для клієнта (префікс .bpm-). Контейнер і кольори — зі спільного
   section.css. Довгий текст тримаємо у вузькій колонці (~820 px), щоб рядки
   не розтягувались на всю ширину екрана. */

.bpm{--bpm-col:820px;--bpm-soft:#f4f5f7;}
.bpm p{font-size:15.5px;line-height:1.75;color:var(--bsec-text);margin:0 0 14px;}

/* ── Вступ ──────────────────────────────────────────────────────────────── */
.bpm-hero{
	display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
	gap:clamp(24px,4vw,56px);align-items:center;
	margin:0 0 clamp(28px,4vw,44px);
}
.bpm-eyebrow{
	display:inline-flex;align-items:center;gap:10px;margin:0 0 12px;
	font-size:12.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--bsec-accent);
}
.bpm-eyebrow::before{content:"";width:26px;height:3px;border-radius:2px;background:var(--bsec-accent);}
.bpm-title{font-size:clamp(28px,3.6vw,40px);line-height:1.15;font-weight:700;margin:0 0 10px;color:var(--bsec-dark);}
.bpm-sub{font-size:clamp(16px,1.6vw,18px) !important;font-weight:600;color:var(--bsec-dark) !important;margin:0 0 18px !important;}
.bpm .bpm-key{color:var(--bsec-dark);font-weight:600;}
.bpm-hero .bpm-fig{margin:0;}
.bpm-hero .bpm-fig img{border-radius:18px;aspect-ratio:4/3;object-fit:cover;}

/* Кнопки PDF */
.bpm-pdf{display:flex;flex-wrap:wrap;align-items:center;gap:10px 12px;margin-top:22px;}
.bpm-pdf__meta{font-size:13px;color:#7a828d;}
.bpm-btn{
	display:inline-flex;align-items:center;justify-content:center;gap:8px;
	padding:12px 20px;border-radius:30px;border:2px solid transparent;
	font-size:15px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;
	transition:.2s;font-family:inherit;
}
.bpm-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.bpm-btn--primary{background:var(--bsec-accent);color:#fff;}
.bpm-btn--primary:hover{background:#c4161c;color:#fff;}
.bpm-btn--ghost{background:#fff;border-color:#d8dde2;color:var(--bsec-dark);}
.bpm-btn--ghost:hover{border-color:var(--bsec-dark);color:var(--bsec-dark);}
.bpm-btn--light{background:#fff;color:var(--bsec-dark);}
.bpm-btn--light:hover{background:var(--bsec-accent);color:#fff;}
.bpm-btn--light:hover svg{transform:translateX(3px);}
.bpm-btn svg{transition:transform .2s ease;}
.bpm-df{display:none !important;}

/* ── Зміст: плитки з номерами ──────────────────────────────────────────── */
.bpm-toc{margin:0 0 clamp(36px,5vw,64px);}
.bpm-toc ol{
	display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
	margin:0;padding:0;list-style:none;
}
.bpm-toc li{margin:0;}
.bpm-toc li::before{display:none;} /* маркери списків Woodmart */
.bpm-toc a{
	display:flex;align-items:center;gap:12px;height:100%;
	padding:14px 16px;border:1px solid var(--bsec-line);border-radius:14px;background:#fff;
	font-size:14.5px;font-weight:600;line-height:1.3;color:var(--bsec-dark);text-decoration:none;
	transition:border-color .2s,box-shadow .2s,transform .2s;
}
.bpm-toc a:hover{border-color:var(--bsec-accent);box-shadow:0 8px 22px rgba(16,24,40,.08);transform:translateY(-2px);color:var(--bsec-dark);}
.bpm-toc .bpm-num{flex:none;}
.bpm-toc__extra a{background:var(--bsec-dark);border-color:var(--bsec-dark);color:#fff;}
.bpm-toc__extra a:hover{color:#fff;border-color:var(--bsec-accent);}
.bpm-toc__extra .bpm-num{background:var(--bsec-accent);color:#fff;}

.bpm-num{
	display:inline-flex;align-items:center;justify-content:center;
	width:34px;height:34px;border-radius:50%;
	background:#fdeced;color:var(--bsec-accent);font-size:15px;font-weight:700;line-height:1;
}

/* ── Розділи ────────────────────────────────────────────────────────────── */
.bpm-body{max-width:var(--bpm-col);margin:0 auto;}
.bpm-sec{padding:clamp(28px,4vw,44px) 0;border-top:1px solid var(--bsec-line);scroll-margin-top:120px;}
.bpm-sec:first-child{border-top:0;padding-top:0;}
.bpm-h2{
	display:flex;align-items:center;gap:14px;
	font-size:clamp(22px,2.6vw,28px);line-height:1.25;font-weight:600;margin:0 0 16px;color:var(--bsec-dark);
}
.bpm-h2 .bpm-num{width:40px;height:40px;font-size:17px;}
.bpm .bpm-lead{font-size:17px;font-weight:600;color:var(--bsec-dark);}
.bpm .bpm-norm{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#7a828d;margin:4px 0 10px;}
.bpm .bpm-note{font-size:13.5px;color:#7a828d;}

/* Фото */
.bpm-fig{margin:22px 0;}
.bpm-fig img{display:block;width:100%;height:auto;border-radius:14px;background:var(--bpm-soft);}
.bpm-fig figcaption{margin-top:9px;font-size:13px;line-height:1.5;color:#7a828d;}
.bpm-fig--narrow{max-width:560px;}

.bpm-figs{display:grid;gap:14px;margin:22px 0;}
.bpm-figs .bpm-fig{margin:0;}
.bpm-figs--2{grid-template-columns:repeat(2,minmax(0,1fr));}
.bpm-figs--wide{grid-template-columns:minmax(0,1.62fr) minmax(0,1fr);align-items:start;}
.bpm-figs--2 .bpm-fig img{aspect-ratio:3/2;object-fit:cover;}
.bpm-figs--plain .bpm-fig img{aspect-ratio:auto;object-fit:contain;background:none;border-radius:0;}
.bpm-figs--plain .bpm-fig figcaption{text-align:center;}
.bpm .bpm-figs__cap{grid-column:1/-1;margin:-4px 0 0;font-size:13px;line-height:1.5;color:#7a828d;}

/* Таблиці ДСТУ */
.bpm-table{border:1px solid var(--bsec-line);border-radius:12px;overflow:hidden;margin:6px 0 10px;}
.bpm-table__cap{padding:11px 16px;background:var(--bsec-dark);color:#fff;font-size:13.5px;font-weight:600;}
.bpm-table table{width:100%;border-collapse:collapse;margin:0;font-size:14px;}
.bpm-table th,.bpm-table td{padding:11px 16px;border:0;border-bottom:1px solid var(--bsec-line);text-align:left;}
.bpm-table th{font-size:12.5px;font-weight:600;color:#47505c;background:var(--bpm-soft);}
.bpm-table td{color:var(--bsec-dark);}
.bpm-table td:not(:first-child),.bpm-table th:not(:first-child){text-align:center;}
.bpm-table tr:last-child td{border-bottom:0;}
.bpm-table td:not(:first-child){font-weight:700;}

.bpm-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:26px 0 4px;}
.bpm-tables p{font-size:14px !important;line-height:1.6 !important;min-height:4.8em;}

/* «Чому так?» */
.bpm-why{
	margin:22px 0;padding:18px 22px;border-left:4px solid var(--bsec-accent);
	border-radius:0 14px 14px 0;background:var(--bpm-soft);
}
.bpm-why h3{font-size:15px;font-weight:700;margin:0 0 8px;color:var(--bsec-dark);}
.bpm-why p{font-size:14.5px !important;margin-bottom:10px !important;}
.bpm-why p:last-child{margin-bottom:0 !important;}

/* Порада (відтінки) */
.bpm .bpm-tip{
	position:relative;padding:16px 20px 16px 56px;border:1px solid #f4c7c9;border-radius:14px;background:#fff7f7;
	color:var(--bsec-dark);font-weight:600;
}
.bpm-tip::before{
	content:"!";position:absolute;left:18px;top:16px;
	width:24px;height:24px;border-radius:50%;background:var(--bsec-accent);color:#fff;
	display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;
}

/* Списки й правило з двох кроків */
.bpm .bpm-list-title{color:var(--bsec-dark);font-weight:700;margin-bottom:8px;}
.bpm-list{margin:0 0 18px;padding:0;list-style:none;}
.bpm-list li{position:relative;margin:0 0 6px;padding-left:22px;font-size:15.5px;line-height:1.6;color:var(--bsec-text);}
.bpm-list li::before{content:"";position:absolute;left:4px;top:.62em;width:7px;height:7px;border-radius:50%;background:var(--bsec-accent);}

.bpm-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:6px 0 10px;padding:0;list-style:none;}
.bpm-steps li{
	display:flex;align-items:flex-start;gap:14px;margin:0;
	padding:18px 20px;border:1px solid var(--bsec-line);border-radius:14px;background:#fff;
	font-size:15px;font-weight:600;line-height:1.5;color:var(--bsec-dark);
}
.bpm-steps li::before{display:none;}
.bpm-steps__n{flex:none;font-size:28px;font-weight:700;line-height:1;color:var(--bsec-accent);}

/* ── Підсумок ───────────────────────────────────────────────────────────── */
.bpm-final{
	margin:clamp(20px,3vw,32px) 0 0;padding:clamp(24px,4vw,40px);
	border-radius:20px;background:var(--bsec-dark);color:#fff;scroll-margin-top:120px;
}
.bpm-final__title{font-size:clamp(22px,2.6vw,28px);font-weight:600;margin:0 0 14px;color:#fff;}
.bpm-final p{color:#c9ced6;}
.bpm .bpm-final__key{color:#fff;font-weight:600;margin-bottom:22px;}

.bpm-btn:focus-visible,.bpm-toc a:focus-visible{outline:2px solid var(--bsec-accent);outline-offset:3px;}

/* ── Адаптив ────────────────────────────────────────────────────────────── */
@media (max-width:1024px){
	.bpm-toc ol{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:860px){
	.bpm-hero{grid-template-columns:1fr;}
	.bpm-hero .bpm-fig{order:-1;}
	.bpm-hero .bpm-fig img{aspect-ratio:16/9;}
}
@media (max-width:620px){
	.bpm p,.bpm-list li{font-size:15px;}
	.bpm-toc ol{grid-template-columns:1fr;gap:8px;}
	.bpm-toc a{padding:11px 14px;}
	.bpm-toc .bpm-num{width:30px;height:30px;font-size:14px;}
	.bpm-figs--2,.bpm-figs--wide,.bpm-tables,.bpm-steps{grid-template-columns:1fr;}
	.bpm-tables p{min-height:0;}
	/* Таблиця 1 має 4 колонки: на вузькому екрані фіксуємо ширини й дрібнимо
	   заголовки; горизонтальна прокрутка — запасний варіант для найвужчих. */
	.bpm-table{overflow-x:auto;}
	.bpm-table table{font-size:13px;table-layout:fixed;min-width:300px;}
	.bpm-table th,.bpm-table td{padding:9px 6px;}
	.bpm-table th{font-size:11px;line-height:1.3;}
	.bpm-table th:first-child,.bpm-table td:first-child{padding-left:12px;}
	.bpm-pdf .bpm-btn{flex:1 1 auto;}
	.bpm-pdf__meta{flex-basis:100%;}
	.bpm-h2 .bpm-num{width:34px;height:34px;font-size:15px;}
}

@media (prefers-reduced-motion:reduce){
	.bpm-toc a,.bpm-btn,.bpm-btn svg{transition:none;}
	.bpm-toc a:hover{transform:none;}
}
