/* ============================================================================
   eCars.bg public site theme — Metronic-style layer ON TOP of Bootstrap 5.
   Approach (see Karamel OCPP): retheme Bootstrap's own components via CSS-var
   overrides + soft shadows / gentle radii. Keep .card/.btn/.badge/grid as-is.
   ============================================================================ */

:root {
  /* Brand + Metronic-style palette (override Bootstrap tokens) */
  --bs-primary:        #16a34a;   /* eCars green */
  --bs-primary-rgb:    22, 163, 74;
  --ec-primary-d:      #128a3e;
  --bs-success:        #50cd89;
  --bs-danger:         #f1416c;
  --bs-warning:        #ffc700;
  --bs-info:           #7239ea;

  --bs-gray-100: #f9f9f9;
  --bs-gray-200: #f4f4f4;
  --bs-gray-300: #e4e6ef;
  --bs-gray-400: #b5b5c3;
  --bs-gray-600: #7e8299;
  --bs-gray-900: #181c32;

  --bs-body-color: #181c32;
  --bs-body-bg:    #f9f9f9;

  --bs-border-color: #e4e6ef;
  --bs-border-radius:    .625rem;  /* 10px — Metronic card radius */
  --bs-border-radius-sm: .425rem;
  --bs-border-radius-lg: .85rem;

  --bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                         Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Local helpers */
  --ec-shadow:    0 .5rem 1.5rem .5rem rgba(0, 0, 0, .075);
  --ec-shadow-sm: 0 .15rem .5rem rgba(0, 0, 0, .06);
  --ec-section-y: clamp(3rem, 6vw, 6.5rem);
}

body {
  background-color: var(--ec-page-bg, var(--bs-gray-100));   /* editable in the theme builder (pageBg) */
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body-family, var(--bs-body-font-family));
  font-weight: var(--font-body-weight, 400);
  font-size: var(--font-body-size, 1rem);
  line-height: var(--font-body-lh, 1.6);
  letter-spacing: var(--font-body-ls, normal);
  color: var(--font-body-color, var(--bs-gray-900));
}

/* Global typography (TASK-01 Part 2/2.2): base element rules consume the --font-{target}-*
   vars TypographyService emits into :root (see TypographyModelAdvice, inlined per-page).
   A per-block override (StylePanel `headingStyles`, etc.) sets the property directly on the
   block's own scope, which always beats these element-level rules on specificity — no need
   for !important or var-overriding gymnastics on the block side. */
p {
  font-family: var(--font-p-family, var(--font-body-family));
  font-weight: var(--font-p-weight, 400);
  font-size: var(--font-p-size, 1rem);
  line-height: var(--font-p-lh, 1.7);
  letter-spacing: var(--font-p-ls, normal);
}
h1, .h1 {
  font-family: var(--font-h1-family, var(--font-body-family));
  font-weight: var(--font-h1-weight, 800);
  font-style: var(--font-h1-style, normal);
  font-size: var(--font-h1-size, 3rem);
  line-height: var(--font-h1-lh, 1.1);
  letter-spacing: var(--font-h1-ls, -.02em);
  text-transform: var(--font-h1-transform, none);
}
h2, .h2 {
  font-family: var(--font-h2-family, var(--font-body-family));
  font-weight: var(--font-h2-weight, 700);
  font-style: var(--font-h2-style, normal);
  font-size: var(--font-h2-size, 2.25rem);
  line-height: var(--font-h2-lh, 1.15);
  letter-spacing: var(--font-h2-ls, -.02em);
  text-transform: var(--font-h2-transform, none);
}
h3, .h3 {
  font-family: var(--font-h3-family, var(--font-body-family));
  font-weight: var(--font-h3-weight, 700);
  font-style: var(--font-h3-style, normal);
  font-size: var(--font-h3-size, 1.75rem);
  line-height: var(--font-h3-lh, 1.2);
  letter-spacing: var(--font-h3-ls, -.02em);
  text-transform: var(--font-h3-transform, none);
}
h4, .h4 {
  font-family: var(--font-h4-family, var(--font-body-family));
  font-weight: var(--font-h4-weight, 700);
  font-style: var(--font-h4-style, normal);
  font-size: var(--font-h4-size, 1.375rem);
  line-height: var(--font-h4-lh, 1.25);
  text-transform: var(--font-h4-transform, none);
}
h5, .h5 {
  font-family: var(--font-h5-family, var(--font-body-family));
  font-weight: var(--font-h5-weight, 700);
  font-size: var(--font-h5-size, 1.125rem);
  line-height: var(--font-h5-lh, 1.3);
  text-transform: var(--font-h5-transform, none);
}
h6, .h6 {
  font-family: var(--font-h6-family, var(--font-body-family));
  font-weight: var(--font-h6-weight, 700);
  font-size: var(--font-h6-size, 1rem);
  line-height: var(--font-h6-lh, 1.3);
  text-transform: var(--font-h6-transform, none);
}
.display-3, .display-4, .display-5 { font-weight: 800; letter-spacing: -.03em; }
.text-gray-600 { color: var(--bs-gray-600) !important; }
.fw-semibold { font-weight: 600 !important; }
.custom-font-1 { font-family: var(--font-custom-font-1-family, inherit); font-weight: var(--font-custom-font-1-weight, inherit); font-style: var(--font-custom-font-1-style, inherit); }
.custom-font-2 { font-family: var(--font-custom-font-2-family, inherit); font-weight: var(--font-custom-font-2-weight, inherit); font-style: var(--font-custom-font-2-style, inherit); }
.custom-font-3 { font-family: var(--font-custom-font-3-family, inherit); font-weight: var(--font-custom-font-3-weight, inherit); font-style: var(--font-custom-font-3-style, inherit); }

/* Section rhythm ------------------------------------------------------------ */
.ec-section { padding-block: var(--ec-section-y); }
.ec-eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  font-weight: 700; color: var(--bs-primary);
}

/* Buttons (Metronic: soft radius, weight 600, colored hover shadow) --------- */
.btn {
  font-family: var(--font-button-family, var(--font-body-family));
  font-weight: var(--font-button-weight, 600);
  font-size: var(--font-button-size, 1rem);
  border-radius: .5rem; padding: .65rem 1.25rem; transition: all .15s ease;
}
.btn-sm { padding: .4rem .85rem; }
.btn-lg { padding: .85rem 1.6rem; }
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
               --bs-btn-hover-bg: var(--ec-primary-d); --bs-btn-hover-border-color: var(--ec-primary-d);
               --bs-btn-active-bg: var(--ec-primary-d); }
.btn-primary:hover { box-shadow: 0 .25rem .75rem rgba(var(--bs-primary-rgb), .35); transform: translateY(-1px); }
.btn-outline-secondary { --bs-btn-color: var(--bs-gray-600); --bs-btn-border-color: var(--bs-gray-300);
                         --bs-btn-hover-bg: var(--bs-gray-900); --bs-btn-hover-border-color: var(--bs-gray-900); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--bs-gray-300); }

/* Cards (Metronic: white, borderless, soft diffuse shadow) ------------------ */
.card { border: 0; border-radius: var(--bs-border-radius); box-shadow: var(--ec-shadow); }
.ec-card-hover { transition: transform .15s ease, box-shadow .15s ease; }
.ec-card-hover:hover { transform: translateY(-4px); box-shadow: 0 .75rem 2rem .25rem rgba(0,0,0,.1); }
.card-img-top { aspect-ratio: 4/3; object-fit: cover; background: var(--bs-gray-200); }
.ec-img-ph {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: var(--bs-gray-200); color: var(--bs-gray-400); font-size: .85rem;
  border-top-left-radius: var(--bs-border-radius); border-top-right-radius: var(--bs-border-radius);
}
.ec-price { color: var(--bs-primary); font-weight: 700; font-size: 1.05rem; }

/* Broken-image fallback (src removed by the head handler) — match the placeholder box */
img.ec-img-fallback { background: var(--bs-gray-200); min-height: 140px; aspect-ratio: 4/3; }

/* Badges -------------------------------------------------------------------- */
.badge { font-weight: 700; padding: .4em .7em; border-radius: .425rem; }
.ec-badge-soft { background: rgba(var(--bs-primary-rgb), .1); color: var(--ec-primary-d); }

/* Navbar (Metronic: clean white, sticky, soft shadow) ----------------------- */
.ec-nav {
  position: sticky; top: 0; z-index: 1030; background: #fff;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); border-bottom: 1px solid var(--bs-gray-200);
}
.ec-nav .navbar-brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--bs-gray-900); }
.ec-nav .navbar-brand .dot { color: var(--bs-primary); }
/* Editable header logo (header block, logoSrc prop). Height comes from the inline style. */
.ec-nav .navbar-brand .ecb-header-logo { display: block; width: auto; object-fit: contain; }
/* Editable footer logo (footer block, logoSrc prop). Height comes from the inline style. */
.ec-footer__brand .ecb-footer-logo { display: block; width: auto; object-fit: contain; }
.ec-nav .nav-link {
  color: var(--bs-gray-900);
  font-family: var(--font-nav-family, var(--font-body-family));
  font-weight: var(--font-nav-weight, 600);
  font-size: var(--font-nav-size, .95rem);
  padding-inline: .9rem !important; border-radius: .5rem; transition: all .15s;
}
.ec-nav .nav-link:hover { color: var(--bs-primary); }
.ec-nav .nav-link.active { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .08); }
/* Split nav item: a clickable parent link that navigates, plus a small caret that opens
   the children dropdown (data-driven menu, see fragments.html headerMenu). */
.ec-nav .ec-nav-split { display: flex; align-items: center; }
.ec-nav .ec-nav-split > .nav-link:first-child { padding-right: .25rem !important; }
.ec-nav .ec-nav-caret { padding-inline: .1rem .55rem !important; }
.ec-nav .ec-nav-caret::after { margin-left: 0; }

/* Hero (light, brand gradient wash — Metronic landing style) ---------------- */
.ec-hero {
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(var(--bs-primary-rgb), .12) 0%, transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--bs-gray-100) 100%);
  border-bottom: 1px solid var(--bs-gray-200);
}
.ec-hero h1 { font-weight: 800; }

/* Footer (Metronic dark panel) ---------------------------------------------- */
.ec-footer {
  background: var(--bs-gray-900); padding-block: 3.5rem 1.75rem; margin-top: 4rem;
  font-family: var(--font-footer-text-family, var(--font-body-family));
  font-weight: var(--font-footer-text-weight, 400);
  font-size: var(--font-footer-text-size, .95rem);
  line-height: var(--font-footer-text-lh, 1.6);
  color: var(--font-footer-text-color, var(--bs-gray-400));
}
.ec-footer a { color: #cbd2e0; text-decoration: none; }
.ec-footer a:hover { color: #fff; }
.ec-footer h6 {
  font-family: var(--font-footer-heading-family, var(--font-body-family));
  font-weight: var(--font-footer-heading-weight, 700);
  text-transform: var(--font-footer-heading-transform, uppercase);
  letter-spacing: var(--font-footer-heading-ls, .1em);
  font-size: var(--font-footer-heading-size, .78rem);
  color: var(--font-footer-heading-color, #fff);
  margin-bottom: 1rem;
}
.ec-footer__brand { font-weight: 800; font-size: 1.3rem; color: #fff; }
.ec-footer__bar { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.25rem; padding-top: 1.15rem; font-size: .85rem; }

/* Breadcrumb bar ------------------------------------------------------------ */
.ec-breadcrumb-wrap { border-bottom: 1px solid var(--bs-gray-200); background: #fff; }
.ec-breadcrumb-wrap .breadcrumb { padding-block: .6rem; font-size: .85rem; }
.ec-breadcrumb-wrap .breadcrumb-item, .ec-breadcrumb-wrap .breadcrumb-item a { color: var(--bs-gray-600); text-decoration: none; }
.ec-breadcrumb-wrap .breadcrumb-item a:hover { color: var(--bs-primary); }
.ec-breadcrumb-wrap .breadcrumb-item.active { color: var(--bs-gray-900); }

/* Configurator -------------------------------------------------------------- */
.ec-cfg-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.ec-cfg-swatch {
  width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid var(--bs-gray-300); background: var(--bs-gray-200) center/cover no-repeat;
  transition: transform .12s ease, border-color .12s ease;
}
.ec-cfg-swatch:hover { transform: scale(1.08); }
.ec-cfg-swatch.is-active { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .2); }
.ec-cfg-chip {
  padding: .4rem .8rem; border-radius: 999px; cursor: pointer; font-size: .85rem; font-weight: 600;
  border: 1px solid var(--bs-gray-300); background: #fff; color: var(--bs-gray-900); transition: all .12s;
}
.ec-cfg-chip:hover { border-color: var(--bs-gray-400); }
.ec-cfg-chip.is-active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.ec-cfg-extra {
  display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; cursor: pointer;
  border: 1px solid var(--bs-gray-300); border-radius: var(--bs-border-radius-sm); transition: border-color .12s, background .12s;
}
.ec-cfg-extra:hover { border-color: var(--bs-gray-400); }
.ec-cfg-extra.is-active { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .05); }
.ec-cfg-extra-name { line-height: 1.25; }
.ec-cfg-summary { background: var(--bs-gray-100); border-radius: var(--bs-border-radius-sm); padding: 1rem 1.1rem; }
.ec-thumb { transition: border-color .12s; }
.ec-thumb:hover { border-color: var(--bs-primary) !important; }

/* Product specifications table (datasheet-style, full width) */
.ec-spec-table { margin-bottom: 0; }
.ec-spec-table th { width: 35%; color: var(--bs-gray-600); font-weight: 600; }
.ec-spec-table th, .ec-spec-table td { padding: .8rem 1.25rem; }
.ec-spec-table tr:last-child > * { border-bottom: 0; }   /* no trailing rule inside the card */
@media (max-width: 576px) { .ec-spec-table th { width: 45%; } }

/* Wider long-form body (product description spans the full content column).
   Compound selector so it beats the later `.ec-prose { max-width: 72ch }` rule. */
.ec-prose.ec-prose-wide { max-width: none; }

/* Product layout — structural rules. Per-device values (flex-basis, order, display,
   spacing, description width) come from the generated <style> in produkt.html. */
#ec-prod .ec-prod-header { margin-bottom: 2.5rem; }
#ec-prod .ec-prod-row { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
#ec-prod .ec-prod-gallery, #ec-prod .ec-prod-config { flex-grow: 0; flex-shrink: 1; min-width: 0; }
#ec-prod .ec-prod-sections { display: flex; flex-direction: column; }
/* Lead image: show the FULL image (no crop) by default — admin can set object-fit/aspect-ratio/
   object-position per device via the „Основна снимка" element in the layout editor. */
#ec-main-image { display: block; height: auto; }

/* Page-builder blocks (ecb-*) — base theme so builder pages look good by default.
   Per-node inline styles (id-scoped, from the block tree) layer on top of these. ------ */
/* Sections are full-width bands; their content is centered by an inner Bootstrap
   .container (classic section > .container > .row > .col nesting). The container's gutter
   padding cancels .row's negative margins, so builder rows can't overflow the page. */
.ecb-section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.ecb-container { max-width: var(--ec-container, 1200px); }  /* keep the 1200px content width (plain .container caps lower) */
/* No page-level .container, so a loose top-level row/grid (not inside a section) has
   nothing to cancel Bootstrap's negative gutter margins — zero them so it aligns to the
   page edge instead of bleeding. overflow-x:clip is a belt-and-suspenders guarantee that
   no block config can ever produce a horizontal scrollbar. */
.ecb-page { overflow-x: clip; }
/* Top-level blocks now sit inside a .ec-view wrapper (desktop/mobile), not directly under
   .ecb-page — keep the loose-row gutter hardening working at that depth. */
.ec-view > .ecb-row,
.ec-view > .ecb-product-grid,
.ec-view > .ecb-featured-articles { margin-inline: 0; }

/* Per-device views: the desktop tree is the default; an independent mobile tree (when the
   page has one → .ec-has-mobile) takes over at ≤768px. Without a mobile tree the desktop
   view stays visible and simply responds via its own tablet/mobile style overrides. */
.ec-view-mobile { display: none; }
@media (max-width: 768px) {
  .ec-has-mobile .ec-view-desktop { display: none; }
  .ec-has-mobile .ec-view-mobile  { display: block; }
}
.ecb-hero { padding-block: clamp(2.5rem, 8vw, 4rem);
  padding-inline: max(1.25rem, calc((100% - var(--ec-container, 1200px)) / 2));
  /* Flex column so text can be positioned vertically (justify-content) as well as horizontally
     (text-align) — see the "Позиция на текста" grid in the admin. Defaults (flex-start) keep
     content at the top exactly as before; only visible when the hero has a height/min-height. */
  display: flex; flex-direction: column; }
.ecb-hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.8rem); font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
/* Subtitle now lives inside the <h1> (after a <br>); reset the inherited heading weight/tracking
   and use inline-block so the top gap applies, keeping the previous subtitle look. */
.ecb-hero .ecb-hero-sub { display: inline-block; font-size: clamp(1.05rem, .9rem + .7vw, 1.45rem); font-weight: 400; letter-spacing: normal; line-height: 1.2; margin-top: .5rem; opacity: .92; }
.ecb-text > :last-child { margin-bottom: 0; }
.ecb-image { border-radius: var(--bs-border-radius); }
/* Image block inside a builder column/card: the image IS the media slot. Set its height (px, per
   breakpoint) from the editor (Разположение → Височина) and it fills that slot with object-fit:cover
   — keeps aspect ratio, crops edges as needed, no distortion, no grey bars. Optional object-position
   (Разположение → Позиция на образа) nudges which part shows (default center). Give each card's image
   the same height so a row lines up. Scoped to .ecb-image only — product cards (.ecb-card-img) and
   the product-page hero (#ec-main-image) keep their own behavior. */
.ecb-column .ecb-image,
.ecb-card-block .ecb-image {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}
.ecb-column .ecb-image-link,
.ecb-card-block .ecb-image-link { display: block; }
.ecb-cta { margin: .25rem .5rem .25rem 0; }

/* Dynamic card grids: clean flex-wrap (≈4 desktop / 2 mobile), not raw Bootstrap cols. */
.ecb-product-grid, .ecb-featured-articles { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.ecb-product-grid > .ecb-card { flex: 0 0 auto; width: calc(25% - 1.125rem); }
.ecb-featured-articles > .ecb-card { flex: 0 0 auto; width: calc(33.333% - 1rem); }
.ecb-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #fff; border-radius: var(--bs-border-radius); box-shadow: var(--ec-shadow);
  overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.ecb-card:hover { transform: translateY(-4px); }
.ecb-card-img { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: var(--bs-gray-200); }
/* Inner text area of a card — the editable padding target. Overridable per featured_articles
   block via builder props.cardStyles → #b-<id> .ecb-card-body{...}. Flex column so the title
   and subtitle stay stacked (spans would otherwise sit inline). */
.ecb-card-body { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; }
.ecb-card-title { font-weight: 700; }
.ecb-card-sub { color: var(--bs-primary); font-weight: 700; }
@media (max-width: 768px) {
  .ecb-product-grid > .ecb-card,
  .ecb-featured-articles > .ecb-card { width: calc(50% - .75rem); }
  .ecb-row > .ecb-column { flex: 0 0 100%; }   /* builder columns stack on mobile */
}

/* Client-logo strip — infinite CSS marquee. Renderer emits the logo set twice inside one
   track; translateX(-50%) scrolls exactly one copy so the loop is seamless. No JS. */
.ecb-logo-strip { overflow: hidden; width: 100%; }
.ecb-logo-track {
  display: flex; align-items: center; gap: clamp(2rem, 5vw, 4rem); width: max-content;
  animation: ecb-logo-scroll 30s linear infinite;
}
.ecb-logo-group { display: contents; }   /* flatten so the track's flex+gap spans both copies evenly */
.ecb-logo { height: var(--ecb-logo-h, 80px); width: auto; max-width: 200px; object-fit: contain; flex: 0 0 auto; }
.ecb-logo-link { display: inline-flex; align-items: center; }
.ecb-logo-strip:hover .ecb-logo-track { animation-play-state: paused; }
@keyframes ecb-logo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ecb-logo-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* Icon feature grid (ИДА-style) — title + description, two feature columns with a product
   image between them. Renderer DOM order is always left → media → right; layout variants and
   mobile stacking are pure CSS here (no effect on the parity golden). */
.ecb-ifg { width: 100%; }
.ecb-ifg__title { text-align: center; font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 .75rem; }
.ecb-ifg__desc { text-align: center; max-width: 70ch; margin: 0 auto 2.5rem; color: var(--bs-gray-600); }
.ecb-ifg__body { display: flex; align-items: center; justify-content: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.ecb-ifg__col { flex: 1 1 0; min-width: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.ecb-ifg__media { flex: 0 0 auto; max-width: 34%; }
.ecb-ifg__media img { width: 100%; height: auto; display: block; }
/* Desktop positioning via order (DOM is left, media, right). */
.ecb-ifg--media-center .ecb-ifg__col--left { order: 1; }
.ecb-ifg--media-center .ecb-ifg__media { order: 2; }
.ecb-ifg--media-center .ecb-ifg__col--right { order: 3; }
.ecb-ifg--media-left .ecb-ifg__media { order: 1; }
.ecb-ifg--media-left .ecb-ifg__col--left { order: 2; }
.ecb-ifg--media-left .ecb-ifg__col--right { order: 3; }
.ecb-ifg--media-right .ecb-ifg__col--left { order: 1; }
.ecb-ifg--media-right .ecb-ifg__col--right { order: 2; }
.ecb-ifg--media-right .ecb-ifg__media { order: 3; }
/* No-media variant: collapse an empty column and flow the populated one into a responsive
   card grid, so an icon_feature_grid works as a clean N-up card row (e.g. info-center links). */
.ecb-ifg__col:empty { display: none; }
.ecb-ifg--no-media .ecb-ifg__body { align-items: stretch; }
.ecb-ifg--no-media .ecb-ifg__col { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-content: start; }
/* Feature item: icon stacked above a bold heading + centered text (matches the old ИДА block). */
.ecb-ifg-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
.ecb-ifg-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ecb-ifg-icon svg { width: 100%; height: 100%; display: block; }   /* overrides any svg width/height attrs */
.ecb-ifg-item__heading { font-weight: 700; font-size: 1.15rem; margin: 0; }
.ecb-ifg-item__text { margin: 0; color: var(--bs-gray-600); }
/* FAQ block: category filter pills + accordion of Q&A (elektromobili-style). */
.ecb-faq-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 1rem; }
.ecb-faq-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 2rem;
  border: 1px solid var(--bs-gray-300); background: #fff; color: var(--bs-gray-800); font-weight: 600;
  font-size: .9rem; line-height: 1.2; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.ecb-faq-pill:hover { border-color: var(--bs-primary); }
.ecb-faq-pill.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.ecb-faq-pill.active .ecb-faq-pill-ic { color: #fff !important; }  /* beats the per-category inline color */
.ecb-faq-pill-ic { display: inline-flex; align-items: center; justify-content: center; }
.ecb-faq-pill-ic svg { width: 1.05em; height: 1.05em; display: block; }
.ecb-faq-count { opacity: .7; font-weight: 500; }
.ecb-faq-resultline { text-align: center; color: var(--bs-gray-600); font-size: .9rem; margin-bottom: 1.25rem; }
.ecb-faq-acc { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.ecb-faq-acc .accordion-item { border: 1px solid var(--bs-gray-200); border-radius: var(--bs-border-radius-lg) !important;
  overflow: hidden; box-shadow: var(--ec-shadow-sm); }
.ecb-faq-acc .accordion-button { display: flex; align-items: center; gap: 1rem; }
.ecb-faq-q[hidden] { display: none; }
.ecb-faq-q-ic { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: .6rem; background: var(--bs-gray-100); }
.ecb-faq-q-ic svg { width: 1.3rem; height: 1.3rem; display: block; }
.ecb-faq-q-main { display: flex; flex-direction: column; gap: .3rem; text-align: left; }
.ecb-faq-badge { align-self: flex-start; font-size: .72rem; font-weight: 600; padding: .1rem .55rem;
  border: 1px solid var(--bs-gray-300); border-radius: 1rem; color: var(--bs-gray-700); }
.ecb-faq-q-title { font-weight: 700; }

/* Safe iframe embed (embed block): map/video, responsive width, height from the block. */
.ecb-embed { width: 100%; }
.ecb-embed iframe { width: 100%; height: var(--ecb-embed-h, 360px); border: 0; display: block; border-radius: var(--bs-border-radius); }

/* Contact form block (contact_form): posts to /kontakt; success/error toggled by fragments.html JS. */
.ecb-contact { width: 100%; }
.ecb-cf-heading { font-weight: 700; font-size: 1.25rem; margin: 0 0 .25rem; }
.ecb-cf-intro { color: var(--bs-gray-600); margin: 0 0 1rem; }
.ecb-cf-field { margin-bottom: 1rem; }
.ecb-cf-field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.ecb-cf-alert { margin-bottom: 1rem; }

/* Law/regulation filterable list (law_list block): heading + source pills, then always-visible cards.
   Pills reuse .ecb-faq-* styling; cards (.ecb-filter-item) are hidden/shown by the shared filter JS. */
.ecb-law-list { max-width: 980px; margin: 0 auto; }
.ecb-law-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ecb-law-h2 { font-weight: 800; letter-spacing: -.02em; margin: 0; }
.ecb-law-sub { color: var(--bs-gray-600); margin: .25rem 0 0; }
.ecb-law-filters { margin-bottom: 0; justify-content: flex-end; }
.ecb-law-cards { display: flex; flex-direction: column; gap: .75rem; }
.ecb-filter-item[hidden] { display: none; }
.ecb-law-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem; background: #fff;
  border: 1px solid var(--bs-gray-200); border-radius: var(--bs-border-radius-lg); box-shadow: var(--ec-shadow-sm); }
.ecb-law-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: .6rem; background: var(--bs-gray-100); }
.ecb-law-icon svg { width: 1.3rem; height: 1.3rem; display: block; }
.ecb-law-body { flex: 1 1 auto; min-width: 0; }
.ecb-law-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.ecb-law-badge { font-size: .72rem; font-weight: 600; padding: .1rem .55rem; border: 1px solid var(--bs-gray-300);
  border-radius: 1rem; color: var(--bs-gray-700); }
.ecb-law-year { font-size: .8rem; color: var(--bs-gray-600); }
.ecb-law-title { font-size: 1.05rem; font-weight: 700; margin: .1rem 0; }
.ecb-law-desc { color: var(--bs-gray-600); margin: .25rem 0 0; line-height: 1.55; }
.ecb-law-link { flex: 0 0 auto; color: var(--bs-primary); text-decoration: none; font-size: 1.15rem; line-height: 1; padding: .15rem .3rem; border-radius: .4rem; }
.ecb-law-link:hover { background: var(--bs-gray-100); }
@media (max-width: 768px) {
  .ecb-law-head { flex-direction: column; }
  .ecb-law-filters { justify-content: flex-start; }
}

/* Link variant: the whole feature item becomes a clickable card with a soft-shadow hover lift. */
.ecb-ifg-item--link { padding: 1.5rem; border-radius: var(--bs-border-radius-lg); background: #fff; box-shadow: var(--ec-shadow-sm); color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.ecb-ifg-item--link:hover { transform: translateY(-4px); box-shadow: var(--ec-shadow); color: inherit; }
.ecb-ifg-item--link .ecb-ifg-item__heading { color: var(--bs-primary); }
@media (max-width: 768px) {
  .ecb-ifg__body { flex-direction: column; align-items: stretch; }
  /* reset order so children stack in DOM order: left → media → right */
  .ecb-ifg__col, .ecb-ifg__media { order: 0; max-width: 100%; width: 100%; }
}

/* Long-form article body ---------------------------------------------------- */
.ec-prose { font-size: 1.075rem; line-height: 1.75; color: #20262f; max-width: 72ch; }
.ec-prose h2 { font-size: 1.6rem; margin-top: 2em; font-weight: 700; }
.ec-prose h3 { font-size: 1.3rem; margin-top: 1.6em; font-weight: 700; }
.ec-prose img { border-radius: var(--bs-border-radius-sm); margin-block: 1.2rem; }
.ec-prose blockquote { border-left: 3px solid var(--bs-primary); padding-left: 1rem; color: var(--bs-gray-600); margin-inline: 0; }
.ec-prose a { color: var(--bs-primary); text-decoration: underline; }
.ec-prose p { margin-bottom: 1.1rem; }

/* Figure (Phase 3 — media-picker images). data-align/data-size are the article editor's
   node attrs, stored verbatim in bodyHtml — these selectors are the public-side twin of
   ArticleBodyEditor.module.css's .figureAlign*/.figure* classes, driven by the same attrs
   so editor and public page agree without a second class-name convention. */
.ec-prose figure { margin-block: 1.6rem; max-width: 100%; }
.ec-prose figure img { display: block; margin-block: 0; border-radius: var(--bs-border-radius-sm); }
.ec-prose figure figcaption { margin-top: .6rem; font-size: .9rem; color: var(--bs-gray-600); text-align: center; }

.ec-prose figure[data-size="small"] img { max-width: 320px; }
.ec-prose figure[data-size="medium"] img { max-width: 640px; }
.ec-prose figure[data-size="large"] img { max-width: 100%; }

.ec-prose figure[data-align="left"] { margin-inline: 0 auto; }
.ec-prose figure[data-align="center"] { margin-inline: auto; }
.ec-prose figure[data-align="center"] img { margin-inline: auto; }
.ec-prose figure[data-align="right"] { margin-inline: auto 0; }
.ec-prose figure[data-align="full"] { width: 100%; }
.ec-prose figure[data-align="full"] img { max-width: 100%; width: 100%; }

/* Article code blocks — theme matches the admin editor's (ArticleBodyEditor.module.css)
   so authoring and publishing look the same. Highlighting itself runs client-side via
   code-copy.js; these rules just style the <pre>/<code>/.hljs-* markup it produces. */
.ec-code-wrap { position: relative; margin-block: 1.2rem; }
.ec-prose pre {
  margin: 0; padding: 1rem 1.25rem; overflow-x: auto; border-radius: var(--bs-border-radius);
  background: #0f172a; color: #f1f1f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.6;
}
.ec-prose pre code { background: none; padding: 0; }
.ec-code-copy {
  position: absolute; top: .5rem; right: .5rem;
  padding: .25rem .6rem; border: 1px solid rgba(255,255,255,.15); border-radius: var(--bs-border-radius-sm);
  background: rgba(255,255,255,.06); color: #f1f1f4; font-size: .8rem; cursor: pointer;
}
.ec-code-copy:hover { background: rgba(255,255,255,.14); }
.hljs-comment, .hljs-quote { color: #94a3b8; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal { color: #c792ea; }
.hljs-string, .hljs-attr { color: #a6e3a1; }
.hljs-number, .hljs-built_in { color: #f9e2af; }
.hljs-title, .hljs-name, .hljs-section { color: #89b4fa; }

/* Bootstrap component library (2026-07-08) — Metronic-flavored touches over Bootstrap.
   These blocks lean on Bootstrap's own CSS; the .ecb-* hooks only refine spacing/shadow so
   editable styles (padding/opacity/etc. from the builder) still fully override them. */
.ecb-card-block { box-shadow: var(--ec-shadow); border: 0; }        /* card container; padding comes from builder styles */
.ecb-alert { margin: 0; }
.ecb-badge { font-weight: 600; }
.ecb-progress { height: .75rem; border-radius: 999px; background: var(--bs-gray-200); }
.ecb-progress .progress-bar { border-radius: inherit; }
.ecb-accordion .accordion-button:not(.collapsed) { color: var(--bs-primary); box-shadow: none; }
.ecb-accordion .accordion-button:focus { box-shadow: none; }
.ecb-carousel { border-radius: var(--bs-border-radius); overflow: hidden; }
.ecb-carousel .carousel-item img { object-fit: cover; max-height: 460px; }
.ecb-btn-group { flex-wrap: wrap; gap: .1rem; }
.ecb-dropdown .dropdown-menu { --bs-dropdown-border-color: var(--bs-gray-200); box-shadow: var(--ec-shadow); }
.ecb-tabs .nav-tabs { border-bottom-color: var(--bs-gray-200); }
.ecb-tabs .tab-content { padding-top: 1rem; }
