/* ECA Blocks — оформление стандартных блоков WordPress классами eca-* (поле «Дополнительные CSS-классы»).
 * Каталог классов — в README плагина. Размеры, цвета, отступы и ширины — в eca-utilities.css (подключается после этого файла).
 */
:root {
	--eca-accent: #005C94; --eca-dark: #00466F; --eca-ink: #0B1B33; --eca-body: #3C4A61; --eca-muted: #4A5870;
	--eca-soft: #EAF3FA; --eca-bg: #F4F6FA; --eca-border: #E2E7F0; --eca-white: #FFFFFF; --eca-wrap: 1240px;
	--eca-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ---------- сброс отступов внутри секций: расстояния задаёт gap контейнера ---------- */
.eca-section :is(p, h1, h2, h3, h4, h5, h6, ul, ol, figure, .wp-block-buttons, .wp-block-group, .wp-block-image, .wp-block-list) { margin: 0; }
.eca-section, .eca-section * { box-sizing: border-box; }
:where(.eca-section) :is(p, li) { color: var(--eca-body); font-size: 16px; line-height: 1.65; }
:where(.eca-section) a { color: var(--eca-accent); }
:where(.eca-section) b, :where(.eca-section) strong { color: var(--eca-ink); font-weight: 700; }

/* ---------- секция (группа, тег section): полоса во всю ширину, содержимое шириной 1240 px ---------- */
.eca-section { display: flex; flex-direction: column; gap: 28px; width: 100%; max-width: none; margin: 0 !important;
	padding-left: max(24px, calc((100% - var(--eca-wrap)) / 2)); padding-right: max(24px, calc((100% - var(--eca-wrap)) / 2)); }
.eca-section.is-white { background: #fff; }
.eca-section.is-soft { background: var(--eca-soft); }
.eca-section > * { max-width: 100%; }

/* первый экран (обложка) */
.wp-block-cover.eca-hero { min-height: 0; align-items: stretch; color: #fff; }
.wp-block-cover.eca-hero .wp-block-cover__inner-container { width: 100%; max-width: none; color: inherit; }
.wp-block-cover.eca-hero .wp-block-cover__image-background { object-position: center; }

/* ---------- раскладка ---------- */
.eca-col { display: flex; flex-direction: column; min-width: 0; }
.eca-row { display: flex; flex-direction: row; flex-wrap: wrap; min-width: 0; }
.eca-row.is-nowrap { flex-wrap: nowrap; }
.eca-row > * { min-width: 0; }
.eca-grid { display: grid; min-width: 0; }
@media (min-width: 1025px) { .eca-row:has(> [class*="eca-w-"]) { flex-wrap: nowrap; } }
.eca-grid > * { min-width: 0; }

/* ---------- карточка ---------- */
.eca-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--eca-border); }
.eca-card.is-flat { border: 0; }

/* ---------- текст ---------- */
.eca-h { color: var(--eca-ink); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
.eca-eyebrow { color: var(--eca-accent); font-size: 13px !important; font-weight: 700; line-height: 1.4 !important; letter-spacing: 1px; text-transform: uppercase; }
.eca-mono { font-family: var(--eca-mono); font-size: 13px; font-weight: 500; line-height: 1.4 !important; color: var(--eca-accent); }
.eca-crumb a, .eca-crumb { color: #D6E6F3; text-decoration: none; }
.eca-crumb-dark a { color: #55637A; text-decoration: none; }
.eca-crumb a:hover, .eca-crumb-dark a:hover { text-decoration: underline; }
.eca-section .has-text-align-right { text-align: right; }
.eca-section .has-text-align-center { text-align: center; }

/* ---------- кнопки ---------- */
.eca-section .wp-block-buttons, .wp-block-buttons.eca-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.wp-block-button.eca-btn .wp-block-button__link { display: inline-block; background: var(--eca-accent); color: #fff; border: 1px solid var(--eca-accent);
	border-radius: 10px; padding: 15px 24px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: background-color .15s, color .15s; }
.wp-block-button.eca-btn .wp-block-button__link:hover { background: var(--eca-dark); border-color: var(--eca-dark); color: #fff; }
.wp-block-button.eca-btn.is-white .wp-block-button__link { background: #fff; border-color: #fff; color: var(--eca-dark); }
.wp-block-button.eca-btn.is-white .wp-block-button__link:hover { background: var(--eca-soft); border-color: var(--eca-soft); }
.wp-block-button.eca-btn.is-outline .wp-block-button__link { background: #fff; border-color: #C9D2E0; color: var(--eca-accent); }
.wp-block-button.eca-btn.is-outline .wp-block-button__link:hover { background: var(--eca-soft); color: var(--eca-dark); }
.wp-block-button.eca-btn.is-outline-light .wp-block-button__link { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.wp-block-button.eca-btn.is-outline-light .wp-block-button__link:hover { background: rgba(255,255,255,.12); }

/* ---------- изображения ---------- */
.wp-block-image.eca-img { margin: 0; }
.wp-block-image.eca-img img { display: block; width: 100%; height: auto; }
.eca-shadow img { box-shadow: 0 12px 40px rgba(0,70,120,.18); border-radius: 6px; }
.eca-shadow { overflow: visible !important; }

/* ---------- списки ---------- */
:where(.eca-section) .wp-block-list:not(.eca-chips):not(.eca-bullets) { padding-left: 1.2em; }
.wp-block-list.eca-bullets { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wp-block-list.eca-bullets li { position: relative; padding-left: 18px; color: var(--eca-ink); line-height: 1.55; }
.wp-block-list.eca-bullets li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--eca-accent); }
.wp-block-list.eca-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wp-block-list.eca-chips li { display: inline-block; font-weight: 700; font-size: 15px; line-height: 1.2; padding: 10px 16px; border-radius: 999px; color: var(--eca-dark); background: var(--eca-soft); }
.wp-block-list.eca-chips.is-white li { background: #fff; border: 1px solid #D3E3F0; }
.wp-block-list.eca-chips.is-grey li { color: #22314A; background: var(--eca-bg); font-weight: 600; font-size: 14px; border-radius: 8px; padding: 8px 12px; }
.wp-block-list.eca-chips.is-dark li { color: #fff; background: rgba(255,255,255,.16); font-weight: 600; font-size: 13px; border-radius: 8px; padding: 7px 12px; }

/* ---------- значки и плашки (класс на абзаце) ---------- */
p.eca-pill-light { display: inline-block; align-self: flex-start; color: #9FD8FF; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: .08em; text-transform: uppercase; border: 1px solid #2E6A9E; padding: 8px 14px; border-radius: 999px; }
p.eca-num { display: inline-flex; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #E3EBFF; color: var(--eca-accent); align-items: center; justify-content: center; font-weight: 800; font-size: 16px; line-height: 1; }
p.eca-num.eca-num-filled { background: var(--eca-accent); color: #fff; }
p.eca-square { display: inline-flex; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--eca-soft); color: var(--eca-accent); align-items: center; justify-content: center; font-family: var(--eca-mono); font-size: 16px; line-height: 1; }
p.eca-std { display: inline-block; align-self: flex-start; font-family: var(--eca-mono); font-size: 13px; line-height: 1.4; color: var(--eca-dark); background: var(--eca-soft); padding: 4px 10px; border-radius: 6px; }
.eca-shield { display: inline-block; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--eca-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6l8-3z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E") center/26px no-repeat; }
p.eca-note { background: var(--eca-soft); border-radius: 12px; padding: 16px 18px; }
.eca-toc { display: flex; gap: 12px; align-items: baseline; background: #fff; border: 1px solid var(--eca-border); border-radius: 12px; padding: 14px 16px; color: var(--eca-ink) !important; text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.35; }
.eca-toc span { font-family: var(--eca-mono); font-size: 13px; color: var(--eca-accent); font-weight: 500; }
.eca-toc:hover { border-color: var(--eca-accent); }

/* значки отраслей: класс на заголовке «eca-ico eca-ico-rail» (rail, auto, food, esg, avia, med, ohs, infosec, compliance, special) — значок выводится над заголовком */
.eca-ico::before { content: ""; display: block; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; background-color: var(--eca-accent); background-image: linear-gradient(135deg, #00466F, #0A7BC2); background-position: center; background-repeat: no-repeat; background-size: 34px 34px, 100% 100%; box-shadow: 0 8px 20px rgba(0,92,148,.22); }
.eca-card.eca-comm { position: relative; border-top: 4px solid var(--eca-accent); transition: box-shadow .2s, transform .2s; }
.eca-card.eca-comm:hover { box-shadow: 0 14px 34px rgba(0,70,120,.12); transform: translateY(-2px); }
.eca-card.eca-comm > .eca-mono { position: absolute; top: 24px; right: 28px; color: #9AA8BC; }
/* блок «Соответствие международным требованиям»: значок щита перед текстом */
.eca-shield-row::before { content: ""; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--eca-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 4.5-3.4 8.2-8 9-4.6-.8-8-4.5-8-9V6l8-3z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E") center/26px no-repeat; }
.eca-ico-rail::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%275%27 y=%273%27 width=%2714%27 height=%2714%27 rx=%273%27/%3E%3Cpath d=%27M5 10h14M9 21l-2-4M15 21l2-4%27/%3E%3Ccircle cx=%279%27 cy=%2713.5%27 r=%271%27/%3E%3Ccircle cx=%2715%27 cy=%2713.5%27 r=%271%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-auto::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 16v-3l2-5a2 2 0 0 1 2-1h10a2 2 0 0 1 2 1l2 5v3H3z%27/%3E%3Cpath d=%27M3 12h18%27/%3E%3Ccircle cx=%277.5%27 cy=%2716.5%27 r=%271.8%27/%3E%3Ccircle cx=%2716.5%27 cy=%2716.5%27 r=%271.8%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-food::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 22V8%27/%3E%3Cpath d=%27M12 8c-2-1-3-3-3-5 2 0 3 1.5 3 3 0-1.5 1-3 3-3 0 2-1 4-3 5z%27/%3E%3Cpath d=%27M12 13c-2 0-4-1.5-4-4 2 0 4 1.5 4 4zm0 0c2 0 4-1.5 4-4-2 0-4 1.5-4 4z%27/%3E%3Cpath d=%27M12 18c-2 0-4-1.5-4-4 2 0 4 1.5 4 4zm0 0c2 0 4-1.5 4-4-2 0-4 1.5-4 4z%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-esg::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 19c0-8 5-14 15-15-1 10-7 15-15 15z%27/%3E%3Cpath d=%27M5 19l8-8%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-avia::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M2.5 13.5l7.5-1.5 4-7.5h2l-2 7.5 6 1v2l-6 1 2 7.5h-2l-4-7.5-7.5-1.5z%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-med::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%273%27 y=%273%27 width=%2718%27 height=%2718%27 rx=%274%27/%3E%3Cpath d=%27M12 8v8M8 12h8%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-ohs::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M3 17h18%27/%3E%3Cpath d=%27M5 17v-3a7 7 0 0 1 14 0v3%27/%3E%3Cpath d=%27M10 7.5V11M14 7.5V11%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-infosec::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Crect x=%275%27 y=%2711%27 width=%2714%27 height=%2710%27 rx=%272%27/%3E%3Cpath d=%27M8 11V8a4 4 0 0 1 8 0v3%27/%3E%3Cpath d=%27M12 15v2%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-compliance::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 3v18M7 21h10M5 7h14%27/%3E%3Cpath d=%27M5 7l-3 6a3 3 0 0 0 6 0z%27/%3E%3Cpath d=%27M19 7l-3 6a3 3 0 0 0 6 0z%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }
.eca-ico-special::before { background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2728%27 height=%2728%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 22c4 0 7-3 7-7 0-4-3-6-4-10-2 2-3 4-3 6-1-1-2-2-2-4-3 3-5 6-5 8 0 4 3 7 7 7z%27/%3E%3C/svg%3E"), linear-gradient(135deg, #00466F, #0A7BC2); }

/* ---------- новости [eca_news] ---------- */
.wp-block-shortcode, .eca-section > p:has(> .eca-news-list) { width: 100%; }
.eca-news-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); column-gap: 40px; background: #fff; border: 1px solid var(--eca-border); border-radius: 20px; padding: 8px 28px; }
.eca-news-list__item { display: flex; gap: 18px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid #EEF2F8; text-decoration: none; color: var(--eca-ink) !important; }
.eca-news-list__item:hover .eca-news-list__title { color: var(--eca-accent); }
.eca-news-list__date { flex: none; width: 88px; font-family: var(--eca-mono); font-size: 13px; color: var(--eca-accent); }
.eca-news-list__title { font-weight: 700; font-size: 16px; line-height: 1.4; }
.eca-news-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.eca-news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--eca-border); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--eca-ink) !important; transition: box-shadow .2s; }
.eca-news-card:hover { box-shadow: 0 10px 30px rgba(0,70,120,.12); }
.eca-news-card__img, .eca-news-card__cover { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.eca-news-card__cover { background: var(--eca-accent); display: flex; align-items: center; justify-content: center; }
.eca-news-card__cover img { width: 60px; height: auto; }
.eca-news-card.is-text { border-top: 4px solid var(--eca-accent); }
.eca-news-card.is-text .eca-news-card__body { padding-top: 20px; }
.eca-news-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.eca-news-card__date { font-size: 13px; font-weight: 600; color: #55637A; }
.eca-news-card__title { font-weight: 800; font-size: 16px; line-height: 1.35; }
.eca-news-card__text { font-size: 14px; line-height: 1.55; color: var(--eca-muted); }

/* ---------- реестр [eca_registry] ---------- */
.eca-check label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--eca-ink); }
.eca-check__row { display: flex; gap: 8px; flex-wrap: wrap; }
.eca-check input[name="number"] { flex: 1 1 200px; font-family: var(--eca-mono); font-size: 16px; padding: 13px 14px; border: 1px solid #C9D2E0; border-radius: 10px; min-height: 48px; background: #fff; color: var(--eca-ink); }
.eca-check button { font-family: inherit; font-weight: 700; font-size: 15px; background: var(--eca-accent); color: #fff; border: 0; padding: 13px 22px; border-radius: 10px; min-height: 48px; cursor: pointer; }
.eca-check button:hover { background: var(--eca-dark); }
.eca-check__msg { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--eca-dark); }
.eca-check__msg:not(:empty) { background: var(--eca-soft); padding: 14px 16px; border-radius: 10px; }
.eca-registry--plugin input[type="text"], .eca-registry--plugin input[type="search"] { font-size: 16px; padding: 12px 14px; border: 1px solid #C9D2E0; border-radius: 10px; }
.eca-registry--plugin button, .eca-registry--plugin input[type="submit"] { background: var(--eca-accent); color: #fff; border: 0; padding: 12px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.eca-admin-hint { font-size: 13px; color: #8A5A00 !important; background: #FFF6E0; padding: 8px 12px; border-radius: 8px; margin-top: 10px !important; }

/* ---------- редактор блоков: шорткоды показываются как текст ---------- */
.editor-styles-wrapper .wp-block-shortcode { background: #fff; border: 1px dashed #C9D2E0; border-radius: 12px; }

@media (max-width: 1024px) {
	.eca-row:not(.is-nowrap) > [class*="eca-wt-100"] { flex-basis: 100%; }
	.eca-news-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.eca-section { padding-left: 16px; padding-right: 16px; }
	.eca-hero-pad { padding-left: 16px !important; padding-right: 16px !important; }
	.eca-news-cards { grid-template-columns: minmax(0, 1fr); }
	.eca-news-list { grid-template-columns: minmax(0, 1fr); padding: 4px 18px; }
	.eca-news-list__date { width: 78px; }
	.eca-section .has-text-align-right { text-align: left; }
}
