/**
 * Template B — CMS image frames (cover / contain, gap-free)
 */

body.cms-active-template-templateB .cms-template-b .ve-hero-img-card.ve-cms-media {
  position: relative;
  width: min(100%, 840px);
  max-width: 840px;
  aspect-ratio: 840 / 420;
  overflow: hidden;
  line-height: 0;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-hero-img-card .ve-hero-img-fit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-whyus-img-main.ve-cms-media {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 400;
  overflow: hidden;
  line-height: 0;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-whyus-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-about-feature-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

body.cms-active-template-templateB .cms-template-b .ve-counter-icon-wrap.ve-cms-media {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  overflow: hidden;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.cms-active-template-templateB .cms-template-b .ve-counter-icon-wrap .ve-counter-icon-img {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-insight-img.ve-cms-media {
  flex-shrink: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
  height: auto !important;
  min-height: 0 !important;
  background: #f4f6f8;
}

/* Menu cards — show full image (contain), no aggressive crop */
body.cms-active-template-templateB .cms-template-b .ve-menu-card .ve-insight-img.ve-cms-media,
body.cms-active-template-templateB .cms-template-b .ve-menu-card .ve-insight-img.ve-cms-media[data-cms-aspect="menu.tabs.items.image"] {
  aspect-ratio: 840 / 280;
}

body.cms-active-template-templateB .cms-template-b .ve-menu-card .ve-insight-img .ve-insight-card-img,
body.cms-active-template-templateB .cms-template-b .ve-menu-card .ve-insight-img img[data-cms-field="menu.tabs.items.image"] {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
  background: transparent;
}

/* Blog cards — flush image to body, no gray gap */
body.cms-active-template-templateB .cms-template-b .ve-blog-card .ve-insight-img.ve-cms-media,
body.cms-active-template-templateB .cms-template-b .ve-blog-card .ve-insight-img.ve-cms-media[data-cms-aspect="blog.items.image"] {
  aspect-ratio: 840 / 280;
}

body.cms-active-template-templateB .cms-template-b .ve-blog-card .ve-insight-img .ve-blog-thumb-img,
body.cms-active-template-templateB .cms-template-b .ve-blog-card .ve-insight-img img[data-cms-field="blog.items.image"] {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-insight-img .ve-insight-card-img,
body.cms-active-template-templateB .cms-template-b .ve-insight-img .ve-blog-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-svc-icon-wrap.ve-cms-media,
body.cms-active-template-templateB .cms-template-b .ve-svc-icon-wrap.ve-cms-media[data-cms-aspect="services.items.icon_image"] {
  width: 60px !important;
  height: 60px !important;
  max-width: 60px !important;
  aspect-ratio: 1 / 1 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  line-height: 0;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-svc-icon-wrap .ve-svc-icon-img,
body.cms-active-template-templateB .cms-template-b .ve-svc-icon-wrap img[data-cms-field="services.items.icon_image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: 60px !important;
  max-height: 60px !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  background: transparent !important;
}

body.cms-active-template-templateB .cms-template-b .ve-team-member-media.ve-cms-media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  line-height: 0;
  background: #f4f6f8;
}

body.cms-active-template-templateB .cms-template-b .ve-team-member-media .ve-team-member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-testi-avatar.ve-cms-media {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 50%;
  line-height: 0;
  background: #f4f6f8;
}

body.cms-active-template-templateB .cms-template-b .ve-testi-avatar .ve-testi-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

body.cms-active-template-templateB .cms-template-b .ve-video-thumb.ve-cms-media {
  aspect-ratio: 960 / 480;
  overflow: hidden;
  line-height: 0;
  background: #111;
}

body.cms-active-template-templateB .cms-template-b .ve-video-thumb .ve-video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  background: transparent;
}

/* Hero — inset image from right viewport edge */
@media (min-width: 992px) {
  body.cms-active-template-templateB .cms-template-b .ve-hero-right {
    padding-right: 72px !important;
    padding-left: 32px !important;
    box-sizing: border-box !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-hero-img-card-wrap {
    max-width: calc(100% - 8px);
    margin-right: auto;
  }
}

body.cms-active-template-templateB .cms-template-b .ve-offer-bg,
body.cms-active-template-templateB .cms-template-b .ve-cms-bg-layer {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateB #app .cms-template-b .ve-cms-bg-frame {
  position: relative !important;
  width: min(100%, 1200px) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
}
