/* Страница «Сертификаты» (sertifikaty.html, классы sfc-*): разметка - в тексте
   дополнительной страницы (образец - tools/pages/sertifikaty.html), этот
   файл подключает show_aux_page.tpl.html, если в тексте есть class="sfc"
   (includes/show_aux_page.php -> $dz_sfc). Раньше стили шли блоком <style>
   в самом тексте - при вставке в редактор он пропадал. Окно просмотра
   (.sfc-ov) строит js/sertif.js в body. */

.sfc, .sfc * { box-sizing: border-box; }
.sfc { --sfc-blue: #1f6f9c; --sfc-blue-d: #185a80; --sfc-navy: #12305e; --sfc-soft: #eef6fc; --sfc-line: #cfe3f2; color: #1f2a37; font-size: 14px; line-height: 1.45; margin: 4px 0 26px; text-align: left; container-type: inline-size; }
.sfc p { margin: 0; padding: 0; }
.sfc-info { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border: 1px solid var(--sfc-line); border-radius: 12px; background: var(--sfc-soft); }
.sfc-info svg { flex: 0 0 auto; width: 38px; height: 38px; color: var(--sfc-navy); }
.sfc .sfc-info p { font-size: 16px; font-weight: 600; color: var(--sfc-navy); }

.sfc-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 700px) { .sfc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 960px) { .sfc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 300px) { .sfc-grid { grid-template-columns: 1fr; } }
.sfc-card { display: flex; flex-direction: column; padding: 14px 14px 16px; border: 1px solid var(--sfc-line); border-radius: 12px; background: var(--sfc-soft); transition: box-shadow .2s, transform .2s; }
.sfc-card:hover { box-shadow: 0 10px 26px rgba(18,48,94,.1); transform: translateY(-2px); }
.sfc-card__pic { position: relative; display: block; width: 100%; aspect-ratio: 250 / 359; margin: 0; padding: 0; border: 0; border-radius: 6px; background: #fff; overflow: hidden; cursor: zoom-in; box-shadow: 0 2px 10px rgba(18,48,94,.08); }
.sfc .sfc-card__pic img { display: block; width: 100%; height: 100%; object-fit: contain; margin: 0; padding: 0; border: 0; transition: transform .35s; }
.sfc-card__pic:hover img { transform: scale(1.03); }
.sfc-card__pv { position: absolute; left: 50%; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 20px; background: rgba(255,255,255,.93); color: var(--sfc-navy); font-size: 13px; white-space: nowrap; transform: translateX(-50%); box-shadow: 0 2px 10px rgba(18,48,94,.15); pointer-events: none; }
.sfc-card__pv svg { width: 16px; height: 16px; }
.sfc .sfc-card__t { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 3.2em; margin: 14px 0 12px; padding: 0; font-size: 17px; line-height: 1.25; font-weight: 700; color: var(--sfc-navy); text-align: center; }
.sfc-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 42px; margin: 0; padding: 0 14px; border: 1px solid var(--sfc-blue); border-radius: 8px; background: var(--sfc-blue); color: #fff !important; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer; transition: background .15s; }
.sfc-btn:hover { background: var(--sfc-blue-d); border-color: var(--sfc-blue-d); }
.sfc-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sfc-btn--line { margin-top: 8px; background: #fff; color: var(--sfc-blue) !important; }
.sfc-btn--line:hover { background: #f3f9fe; }

.sfc-ask { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; padding: 18px 24px; border: 1px solid var(--sfc-line); border-radius: 12px; background: var(--sfc-soft); }
.sfc-ask > svg { flex: 0 0 auto; width: 38px; height: 38px; color: var(--sfc-navy); }
.sfc-ask__txt { flex: 1; min-width: 200px; }
.sfc .sfc-ask__txt b { display: block; font-size: 19px; color: var(--sfc-navy); }
.sfc .sfc-ask__txt p { margin-top: 2px; color: #4a5a6e; }
.sfc-ask .sfc-btn { width: auto; min-width: 250px; min-height: 46px; padding: 0 26px; }
@container (max-width: 560px) { .sfc-ask .sfc-btn { width: 100%; } }

.sfc-faq { margin-top: 12px; border: 1px solid #e1eaf3; border-radius: 12px; background: #fff; }
.sfc-faq + .sfc-faq { margin-top: 8px; }
.sfc-faq summary { display: flex; align-items: center; gap: 14px; padding: 15px 20px; font-size: 15px; font-weight: 600; color: var(--sfc-navy); cursor: pointer; list-style: none; }
.sfc-faq summary::-webkit-details-marker { display: none; }
.sfc-faq summary .q { flex: 0 0 auto; width: 26px; height: 26px; color: var(--sfc-navy); }
.sfc-faq summary .ch { flex: 0 0 auto; width: 18px; height: 18px; margin-left: auto; color: #6b7a8d; transition: transform .2s; }
.sfc-faq[open] summary .ch { transform: rotate(180deg); }
.sfc .sfc-faq p { padding: 0 20px 16px 60px; color: #3b4756; }

.sfc-svc { display: none !important; }

/* телефон: две карточки в ряд */
@container (max-width: 520px) {
	.sfc-grid { gap: 10px; }
	.sfc-card { padding: 8px 8px 10px; }
	.sfc .sfc-card__t { font-size: 14px; min-height: 2.6em; margin: 10px 0 8px; }
	.sfc-btn { min-height: 38px; font-size: 12.5px; gap: 5px; padding: 0 4px; white-space: nowrap; }
	.sfc-btn svg { width: 15px; height: 15px; }
	.sfc-card__pv { display: none; }
	.sfc-info, .sfc-ask { padding: 14px 16px; }
	.sfc .sfc-info p { font-size: 14.5px; }
	.sfc-ask .sfc-btn { font-size: 14px; }
}

/* окно просмотра (добавляется в body) */
.sfc-ov { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: rgba(10,22,44,.86); opacity: 0; transition: opacity .2s; font-family: inherit; color: #fff; }
.sfc-ov.is-open { opacity: 1; }
.sfc-ov__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0b1730; }
.sfc-ov__t { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfc-ov__n { color: rgba(255,255,255,.65); font-size: 13px; white-space: nowrap; }
.sfc-ov__b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; min-width: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff !important; font: inherit; font-size: 14px; text-decoration: none !important; cursor: pointer; }
.sfc-ov__b:hover { background: rgba(255,255,255,.26); }
.sfc-ov__b svg { width: 18px; height: 18px; }
.sfc-ov__stage { position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 0 60px 16px; }
.sfc-ov__stage img { max-width: 100%; max-height: 100%; background: #fff; cursor: zoom-in; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.sfc-ov.is-zoom .sfc-ov__stage { display: block; text-align: center; }
.sfc-ov.is-zoom .sfc-ov__stage img { max-width: none; max-height: none; width: min(1400px, 100%); cursor: zoom-out; }
.sfc-ov__nav { position: fixed; top: 50%; width: 44px; height: 44px; margin-top: -22px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: #12305e; cursor: pointer; }
.sfc-ov__nav svg { width: 22px; height: 22px; }
.sfc-ov__nav--p { left: 10px; }
.sfc-ov__nav--n { right: 10px; }
@media (max-width: 600px) { .sfc-ov__stage { padding: 0 8px 70px; } .sfc-ov__nav { top: auto; bottom: 12px; margin: 0; } .sfc-ov__dl span { display: none; } }
