/**
 * CMS section media — exact admin upload dimensions (see config/section_image_dimensions.php).
 * Per-field sizes are applied via layouts/partials/cms-section-image-dimensions.blade.php
 * on [data-cms-field="…"]. This file enforces contain (no crop) on legacy class names.
 */

/* ══ Image overlays — standard black scrim (all templates / sections) ══ */
body[class*="cms-active-template"] .hero-overlay,
body[class*="cms-active-template"] .offer-overlay,
body[class*="cms-active-template"] .ta-hero-scrim,
body[class*="cms-active-template"] .ta-offer-scrim,
body[class*="cms-active-template"] .tc-hero-scrim,
body[class*="cms-active-template"] .tc-offer-scrim,
body[class*="cms-active-template"] .tc-video-v2-scrim,
body[class*="cms-active-template"] .ve-offer-scrim,
body[class*="cms-active-template"] .ve-cta-overlay,
body[class*="cms-active-template"] .ve-page-hero-overlay,
body[class*="cms-active-template"] .ve-explore-overlay,
body[class*="cms-active-template"] .section-overlay,
body[class*="cms-active-template"] .td-offer-scrim,
body[class*="cms-active-template"] .td-facts-scrim,
body[class*="cms-active-template"] .vf-hero-media-backdrop-overlay,
body[class*="cms-active-template"] .vf-video-overlay,
body[class*="cms-active-template"] .tg-hero-media-backdrop-overlay,
body[class*="cms-active-template"] .hotel-hero .video-background .video-overlay,
body[class*="cms-active-template"] .offer-cards .special-promotion .promotion-background .promotion-overlay,
body[class*="cms-active-template"] .ve-te-hero-track .ve-te-hero-item::before,
body[class*="cms-active-template"] .ve-te-hero-track .ve-te-hero-item.active::before {
  background: var(--cms-image-overlay) !important;
}

body[class*="cms-active-template"] .hero-overlay.hero-overlay--home,
body[class*="cms-active-template"] #app .hero-header.cms-detail-hero .hero-overlay {
  background: var(--cms-image-overlay-home) !important;
}

/* ══ Image-background sections — center overlay content (vertical + horizontal) ══ */
body[class*="cms-active-template"] .def-offer-cms-frame--has-bg,
body[class*="cms-active-template"] .ve-offer-cms-frame--has-bg,
body[class*="cms-active-template"] .ve-cta-banner--has-bg,
body[class*="cms-active-template"] .ta-offer-cms-frame--has-bg,
body[class*="cms-active-template"] .ta-facts-section--has-bg,
body[class*="cms-active-template"] .tc-offer-cms-frame--has-bg,
body[class*="cms-active-template"] .td-offer-section--has-bg .td-offer-cms-frame,
body[class*="cms-active-template"] .td-facts-section--has-bg .td-facts-cms-frame,
body[class*="cms-active-template"] .facts-section--has-bg,
body[class*="cms-active-template"] .offer-section--has-bg,
body[class*="cms-active-template"] .ta-offer-section--has-bg,
body[class*="cms-active-template"] .offer-cards .tg-offer-primary--has-bg {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[class*="cms-active-template"] .def-offer-cms-frame--has-bg .offer-section__content,
body[class*="cms-active-template"] .facts-section--has-bg > .facts-section__content,
body[class*="cms-active-template"] .ve-cta-banner--has-bg > .ve-cta-banner__content,
body[class*="cms-active-template"] .ta-offer-cms-frame--has-bg .ta-offer-section__content,
body[class*="cms-active-template"] .tc-offer-cms-frame--has-bg .tc-offer-card__content,
body[class*="cms-active-template"] .td-offer-section--has-bg .td-offer-section__content,
body[class*="cms-active-template"] .td-facts-section--has-bg .td-facts-section__content,
body[class*="cms-active-template"] .td-offer-section--has-bg .td-offer-copy,
body[class*="cms-active-template"] .td-offer-section--has-bg .td-offer-action,
body[class*="cms-active-template"] .vf-video-media:not(.vf-video-media--empty) .vf-video-content,
body[class*="cms-active-template"] .tc-video-v2-screen,
body[class*="cms-active-template"] .hero-header--has-bg .position-relative {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

body[class*="cms-active-template"] .hero-header--has-bg,
body[class*="cms-active-template"] .ta-hero-shell--has-bg .ta-hero-stage,
body[class*="cms-active-template"] .tc-hero-shell--has-bg .tc-hero-stage,
body[class*="cms-active-template"] .cms-template-d .hero-section.td-hero-home,
body[class*="cms-active-template"] .ve-te-hero > .ve-te-hero-caption {
  align-items: center !important;
  justify-content: center !important;
}

body[class*="cms-active-template"] .ve-te-hero .ve-te-hero-caption .container,
body[class*="cms-active-template"] .ve-te-hero .ve-te-hero-caption .row,
body[class*="cms-active-template"] .ve-te-hero .ve-te-hero-caption .col-lg-7 {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

body[class*="cms-active-template"] .ve-te-hero-nav--inline {
  justify-content: center !important;
}

body[class*="cms-active-template"] .tg-offer-primary--has-bg .promotion-content {
  align-items: center !important;
  justify-content: center !important;
}

body[class*="cms-active-template"] .tg-offer-primary--has-bg .promo-text,
body[class*="cms-active-template"] .tg-offer-primary--has-bg .promo-action {
  text-align: center !important;
}

body[class*="cms-active-template"] .tg-offer-primary--has-bg .promo-action {
  justify-content: center !important;
}

body[class*="cms-active-template"] .ta-offer-cms-frame--has-bg .ta-offer-row {
  justify-content: center !important;
  text-align: center !important;
}

body[class*="cms-active-template"] .ta-offer-cms-frame--has-bg .border-start {
  border-left: 0 !important;
  padding-left: 0 !important;
}

body[class*="cms-active-template"] .vf-hero-root:has(.vf-hero-media-backdrop) .vf-hero-container,
body[class*="cms-active-template"] .hotel-hero:has(.tg-hero-media-backdrop) .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  min-height: inherit;
}

body[class*="cms-active-template"] img[data-cms-field]:not(.tg-blog-card-image):not(.td-about-main-img):not(.td-menu-card-image):not(.td-team-card-img):not(.td-video-cover-img):not(.tc-about-main-img):not(.tc-menu-thumb):not(.tc-team-v2-photo):not(.tc-testimonial-photo):not(.tc-video-v2-thumb):not(.tc-blog-thumb-img):not(.ta-about-media-img):not(.ta-menu-item-img):not(.ta-team-photo-img):not(.ta-testimonial-avatar-img):not(.ta-video-thumb-img):not(.ta-blog-card-img):not(.ta-svc-icon-img):not(.ve-hero-img-fit):not(.ve-whyus-main-img):not(.ve-insight-card-img):not(.ve-blog-thumb-img):not(.ve-team-member-img):not(.ve-testi-avatar-img):not(.ve-video-thumb-img):not(.def-about-media-img):not(.def-menu-item-img):not(.def-team-photo-img):not(.def-testimonial-avatar-img):not(.def-video-thumb-img):not(.def-blog-card-img):not(.def-svc-icon-img):not(.def-fact-icon-img):not(.vf-hero-image-cover):not(.vf-about-main-img) {
  object-fit: contain !important;
  object-position: center center !important;
}

/* ── <img> in dynamic sections (fallback when data-cms-field not yet on element) ── */
body[class*="cms-active-template"] .dynamic-section-gap img,
body[class*="cms-active-template"] .about-image,
body[class*="cms-active-template"] .about-feature-icon,
body[class*="cms-active-template"] .ve-about-feature-icon-img,
body[class*="cms-active-template"] .menu-item-image,
body[class*="cms-active-template"] .testimonial-client-img,
body[class*="cms-active-template"] .video-thumbnail,
body[class*="cms-active-template"] .ta-about-media-img,
body[class*="cms-active-template"] .service-icon,
body[class*="cms-active-template"] .facts-icon,
body[class*="cms-active-template"] .team-item img,
body[class*="cms-active-template"] .team-item-img-wrap img,
body[class*="cms-active-template"] .team-overlay-social-img,
body[class*="cms-active-template"] .slide-card-img,
body[class*="cms-active-template"] .blog-card-img-wrap img,
body[class*="cms-active-template"] .service-item img:not(.service-icon),
body[class*="cms-active-template"] .ve-hero-img-fit,
body[class*="cms-active-template"] .ve-team-member-img,
body[class*="cms-active-template"] .vf-hero-image-cover,
body[class*="cms-active-template"] .vf-cms-card-img-cover,
body[class*="cms-active-template"] .td-about-side-image,
body[class*="cms-active-template"] .td-menu-card-media .custom-block-image,
body[class*="cms-active-template"] .td-team-card-media .member-block-image,
body[class*="cms-active-template"] .td-testimonial-avatar,
body[class*="cms-active-template"] .tg-team-member-photo,
body[class*="cms-active-template"] .main-image,
body[class*="cms-active-template"] .secondary-image img,
body[class*="cms-active-template"] .template-c .tc-video-v2-thumb,
body[class*="cms-active-template"] .template-c .tc-team-v2-photo,
body[class*="cms-active-template"] .template-c .tc-menu-thumb,
body[class*="cms-active-template"] .template-c .tc-testimonial-photo {
  object-fit: contain !important;
  object-position: center center !important;
}

/* Legacy class → dimension hints (match admin spec) */
body[class*="cms-active-template"] .about-image,
body[class*="cms-active-template"] .ta-about-media-img:not([data-cms-field="about.image"]) {
  width: min(100%, 800px);
  height: 400px;
  max-height: 400px;
}

body[class*="cms-active-template"] .about-feature-icon,
body[class*="cms-active-template"] .ve-about-feature-icon-img {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  flex-shrink: 0;
}

body[class*="cms-active-template"] .menu-item-image {
  width: 100%;
  max-width: 840px;
  height: auto;
  aspect-ratio: 840 / 280;
  max-height: none;
}

body.cms-active-template-templateA .ta-menu-item-media .menu-item-image,
body.cms-active-template-templateA .ta-menu-item-media img[data-cms-field="menu.tabs.items.image"] {
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .service-icon {
  width: 60px;
  height: 60px;
}

body[class*="cms-active-template"] .team-item img,
body[class*="cms-active-template"] .team-item-img-wrap img,
body[class*="cms-active-template"] .slide-card-img.cms-team-photo,
body[class*="cms-active-template"] .team-item img.slide-card-img {
  width: 100%;
  max-width: 400px;
  height: 400px;
  max-height: 400px;
}

body[class*="cms-active-template"] .testimonial-client-img,
body[class*="cms-active-template"] .template-c .tc-testimonial-photo {
  width: 60px;
  height: 60px;
  max-width: 60px;
  max-height: 60px;
}

body[class*="cms-active-template"] .video-thumbnail,
body[class*="cms-active-template"] .template-c .tc-video-v2-thumb {
  width: 100%;
  max-width: 960px;
  height: 480px;
  max-height: 480px;
}

body[class*="cms-active-template"] .blog-card-img-wrap {
  height: 280px;
  max-height: 280px;
  overflow: visible !important;
}

body[class*="cms-active-template"] .blog-card-img-wrap img {
  width: 100%;
  max-width: 840px;
  height: 280px;
}

body[class*="cms-active-template"] .ve-hero-img-card {
  width: min(100%, 840px);
  max-width: 840px;
  aspect-ratio: 840 / 420;
}

body[class*="cms-active-template"] .ve-hero-img-card .ve-hero-img-fit {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain !important;
}

/* Template B — hero image centered on mobile/tablet stack */
@media (max-width: 991.98px) {
  body[class*="cms-active-template-templateB"] .ve-hero-right {
    justify-content: center !important;
    align-items: center !important;
  }

  body[class*="cms-active-template-templateB"] .ve-hero-visual-stage,
  body[class*="cms-active-template-templateB"] .ve-hero-img-card-wrap,
  body[class*="cms-active-template-templateB"] .ve-hero-img-card {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body[class*="cms-active-template-templateB"] .ve-hero-img-card .ve-hero-img-fit {
    object-position: center center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 991.98px) {
  body[class*="cms-active-template-templateB"] .cms-template-b .ve-hero.ve-hero--images-synced .ve-hero-img-card .ve-hero-img-fit[data-cms-field="hero.items.image"] {
    max-height: none !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }
}

@media (max-width: 767.98px) {
  body[class*="cms-active-template-templateB"] .ve-hero-img-card {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
  }

  body[class*="cms-active-template-templateB"] .ve-hero-img-card-wrap {
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

body[class*="cms-active-template"] .blog-card-img-wrap,
body[class*="cms-active-template"] .ta-about-media,
body[class*="cms-active-template"] .ta-about-media-col .overflow-hidden,
body[class*="cms-active-template"] .ve-team-card .ve-team-member-media,
body[class*="cms-active-template"] .team-item-img-wrap {
  overflow: visible !important;
}

/* ── background-image section media ── */
body[class*="cms-active-template"] .bg-img,
body[class*="cms-active-template"] .ve-insight-img,
body[class*="cms-active-template"] .ve-testi-avatar,
body[class*="cms-active-template"] .ve-whyus-img-main,
body[class*="cms-active-template"] .ve-cta-banner,
body[class*="cms-active-template"] .ve-video-thumb,
body[class*="cms-active-template"] .ve-about-img-1,
body[class*="cms-active-template"] .ve-about-img-2,
body[class*="cms-active-template"] .ve-team-img,
body[class*="cms-active-template"] .hero-header,
body[class*="cms-active-template"] .bg-offer,
body[class*="cms-active-template"] .td-facts-section .td-facts-bg,
body[class*="cms-active-template"] .facts-section,
body[class*="cms-active-template"] .hero-image-bg,
body[class*="cms-active-template"] .vf-hero-image-fixed:not(.vf-hero-image-empty),
body[class*="cms-active-template"] .template-c .tc-offer-card--has-bg::before,
body[class*="cms-active-template"] [data-cms-bg="1"] {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body[class*="cms-active-template"] .ve-insight-img,
body[class*="cms-active-template"] .ve-whyus-img-main,
body[class*="cms-active-template"] .ve-testi-avatar,
body[class*="cms-active-template"] .ve-team-member-media,
body[class*="cms-active-template"] .vf-leader-image-fixed,
body[class*="cms-active-template"] .portfolio .vf-blog-image-fixed,
body[class*="cms-active-template"] .td-menu-card-media,
body[class*="cms-active-template"] .td-team-card-media {
  background-color: #f4f6f8;
}

/* Template C — hero fullbleed contain; offer compact frame */
body.cms-active-template-templateC .template-c .tc-hero-shell--has-bg,
body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-fullbleed,
body.cms-active-template-templateC .template-c .tc-hero-shell--has-bg[data-cms-bg="1"] {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: var(--dark) !important;
  aspect-ratio: unset !important;
}

body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-fullbleed {
  width: 100% !important;
  max-width: none !important;
}

body.cms-active-template-templateC .template-c .tc-offer-bg,
body.cms-active-template-templateC .template-c .tc-cms-bg-layer {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateC #app .template-c .tc-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;
}

body.cms-active-template-templateC #app .template-c .tc-svc-v2-icon-wrap.tc-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;
}

body.cms-active-template-templateC #app .template-c .tc-svc-v2-icon-wrap .tc-svc-v2-icon-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;
  background-color: transparent !important;
}

body.cms-active-template-templateC #app .template-c .tc-about-main-media .tc-about-main-img[data-cms-field="about.image"],
body.cms-active-template-templateC #app .template-c .tc-team-v2-avatar-ring .tc-team-v2-photo[data-cms-field="team.items.image"],
body.cms-active-template-templateC #app .template-c .tc-testimonial-photo-wrap .tc-testimonial-photo[data-cms-field="testimonials.items.image"],
body.cms-active-template-templateC #app .template-c .tc-video-v2-screen .tc-video-v2-thumb[data-cms-field="video.thumbnail"],
body.cms-active-template-templateC #app .template-c .tc-blog-thumb-link .tc-blog-thumb-img[data-cms-field="blog.items.image"] {
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateC #app .template-c .tc-blog-thumb-link .tc-blog-thumb-img[data-cms-field="blog.items.image"] {
  height: 100% !important;
}

body.cms-active-template-templateC #app .template-c .tc-menu-thumb-wrap .tc-menu-thumb[data-cms-field="menu.tabs.items.image"] {
  object-fit: contain !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateC #app .template-c .tc-fact-figure img[data-cms-field="facts.items.icon_image"] {
  object-fit: contain !important;
  background-color: transparent !important;
}

/* Template B — offer compact frame + CMS media cover */
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.ve-offer-cms-frame {
  position: relative !important;
  width: min(100%, 1200px) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
  border-radius: 8px;
  background-color: var(--ve-dark, var(--dark));
}

body.cms-active-template-templateB .cms-template-b .ve-offer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body.cms-active-template-templateB .cms-template-b .ve-offer-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--cms-image-overlay) !important;
}

body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame .ve-cta-overlay {
  background: var(--cms-image-overlay) !important;
}

body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame .ve-cta-banner__content {
  position: relative;
  z-index: 2;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding-left: 48px !important;
  padding-right: 48px !important;
  box-sizing: border-box !important;
}

@media (min-width: 992px) {
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame .ve-cta-banner__content {
    padding-left: 64px !important;
    padding-right: 64px !important;
  }
}

body.cms-active-template-templateB #app .cms-template-b .ve-blog-card .ve-insight-img.ve-cms-media,
body.cms-active-template-templateB #app .cms-template-b .ve-menu-card .ve-insight-img.ve-cms-media {
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
}

@media (min-width: 992px) {
  body.cms-active-template-templateB .cms-template-b .ve-hero-right {
    padding-right: 72px !important;
    padding-left: 32px !important;
  }
}

body.cms-active-template-templateB #app .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;
}

body.cms-active-template-templateB #app .cms-template-b .ve-svc-icon-wrap .ve-svc-icon-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;
  background-color: transparent !important;
}

body.cms-active-template-templateB #app .cms-template-b .ve-hero-img-card .ve-hero-img-fit[data-cms-field="hero.items.image"],
body.cms-active-template-templateB #app .cms-template-b .ve-whyus-main-img[data-cms-field="about.image"],
body.cms-active-template-templateB #app .cms-template-b .ve-team-member-media .ve-team-member-img[data-cms-field="team.items.image"],
body.cms-active-template-templateB #app .cms-template-b .ve-testi-avatar .ve-testi-avatar-img[data-cms-field="testimonials.items.image"],
body.cms-active-template-templateB #app .cms-template-b .ve-video-thumb .ve-video-thumb-img[data-cms-field="video.thumbnail"],
body.cms-active-template-templateB #app .cms-template-b .ve-blog-card .ve-insight-img .ve-blog-thumb-img[data-cms-field="blog.items.image"] {
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateB #app .cms-template-b .ve-menu-card .ve-insight-img .ve-insight-card-img[data-cms-field="menu.tabs.items.image"] {
  object-fit: contain !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateB #app .cms-template-b .ve-counter-icon-wrap img[data-cms-field="facts.items.icon_image"] {
  object-fit: contain !important;
  background-color: transparent !important;
}

/* Template B — offer CTA: legacy section bg removed; frame uses cover layer */
body[class*="cms-active-template-templateB"] .ve-offer-cms-frame--has-bg.ve-cta-banner--has-bg {
  background-image: none !important;
  background-size: unset !important;
}

@media (max-width: 767.98px) {
  body.cms-active-template-templateB .cms-template-b .ve-offer-section {
    overflow-x: clip !important;
    max-width: 100% !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame {
    overflow-x: clip !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame .ve-cta-banner__content {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-top: 48px !important;
    padding-bottom: 48px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Template B — hero card cover in CMS frame */
body.cms-active-template-templateB #app .cms-template-b .ve-hero-img-card.ve-cms-media .ve-hero-img-fit[data-cms-field="hero.items.image"] {
  object-fit: cover !important;
  max-height: none !important;
  height: 100% !important;
}

@media (max-width: 991.98px) {
  body.cms-active-template-templateB .cms-template-b .ve-hero.ve-hero--images-synced .ve-hero-img-card .ve-hero-img-fit[data-cms-field="hero.items.image"] {
    object-fit: cover !important;
  }
}

/* Template B — override theme cover on CMS section blocks */
body[class*="cms-active-template-templateB"] .ve-rp-img,
body[class*="cms-active-template-templateB"] .ve-article-featured,
body[class*="cms-active-template-templateB"] .ve-comment-avatar,
body[class*="cms-active-template-templateB"] #app .ve-mobile-menu ~ * .ve-insight-img {
  background-size: contain !important;
}

body[class*="cms-active-template-templateE"] .blog .blog-img .ve-te-blog-card-image {
  object-fit: unset !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
}

/* Template E — gap-free CMS images (frames in cms-fitness-bridge.css) */
body.cms-active-template-templateE #app .main .ve-te-cms-media img[data-cms-field] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .blog .ve-te-blog-card-media .ve-te-blog-card-image {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: unset !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .about .ve-te-about-main-media .ve-te-about-main-img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .ve-te-offer-media.ve-te-cms-media[data-cms-aspect="offer.background"] {
  aspect-ratio: 16 / 9 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateE #app .main .ve-te-video-media.ve-te-video-media--hero-size,
body.cms-active-template-templateE #app .main .ve-te-video-media.ve-te-cms-media[data-cms-aspect="video.thumbnail"] {
  aspect-ratio: 840 / 420 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* Template E — hero background contain (no crop) */
body.cms-active-template-templateE .ve-te-hero-track .ve-te-hero-item,
body.cms-active-template-templateE .ve-te-hero-track .ve-te-hero-item.active {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: var(--dark) !important;
}

body.cms-active-template-templateE .ve-te-hero.ve-te-hero--cms-synced {
  display: flex;
  flex-direction: column;
}

@media (max-width: 991.98px) {
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--cms-synced .ve-te-hero-track .ve-te-hero-item,
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--cms-synced .ve-te-hero-track .ve-te-hero-item.active {
    background-size: cover !important;
    background-position: center center !important;
  }
}

body.cms-active-template-templateE #app .main .team .ve-te-team-photo .ve-te-team-card-img[data-cms-field="team.items.image"] {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .team .ve-te-team-photo.ve-te-cms-media[data-cms-aspect="team.items.image"] {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  background: transparent !important;
}

body.cms-active-template-templateE #app .main .team .ve-te-team-photo .ve-te-team-card-img,
body.cms-active-template-templateE #app .main .ve-te-testi-media.ve-te-cms-media[data-cms-aspect="testimonials.items.image"] {
  background-color: transparent !important;
}

/* Template E menu thumb — 840 × 280 landscape, fit without crop */
body.cms-active-template-templateE img[data-cms-field="menu.tabs.items.image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .courses .courses-icon-img.ve-te-cms-media[data-cms-aspect="menu.tabs.items.image"] {
  width: 168px !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 840 / 280 !important;
  display: block !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: transparent !important;
}

body.cms-active-template-templateE #app .main .courses .courses-icon-img .ve-te-menu-item-img[data-cms-field="menu.tabs.items.image"] {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  filter: none !important;
  transform: none !important;
  background-color: transparent !important;
}

body.cms-active-template-templateE #app .main .ve-fact-icon-img[data-cms-field],
body.cms-active-template-templateE #app .main .feature .ve-te-service-media img[data-cms-field],
body.cms-active-template-templateE #app .main .about .ve-about-feature-icon-wrap img[data-cms-field] {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* ── Video section: centered layout (all CMS templates) ── */
body[class*="cms-active-template"] .cms-video-section {
  text-align: center;
}

body[class*="cms-active-template"] .cms-video-section .video-thumbnail,
body[class*="cms-active-template"] .cms-video-section .ve-video-thumb,
body[class*="cms-active-template"] .cms-video-section .tc-video-v2-frame,
body[class*="cms-active-template"] .cms-video-section .featured-gallery,
body[class*="cms-active-template"] .cms-video-section .vf-video-content,
body[class*="cms-active-template"] .cms-video-section .ve-explore-content,
body[class*="cms-active-template"] .cms-video-section .ratio,
body[class*="cms-active-template"] .cms-video-section .td-section-heading {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .cms-video-section .video-thumbnail {
  width: 100%;
}

body[class*="cms-active-template"] .cms-video-section .text-center.position-relative {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .cms-video-section .ta-section-heading {
  text-align: center;
  border-inline-start: none !important;
  padding-inline-start: 0 !important;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .cms-video-section .tc-video-v2-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

body[class*="cms-active-template"] .cms-video-section .ve-section-header,
body[class*="cms-active-template"] .cms-video-section .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .cms-video-section.gallery-showcase.tg-video-showcase--solo .row {
  justify-content: center;
}

body[class*="cms-active-template"] .cms-video-section.gallery-showcase.tg-video-showcase--solo .col-lg-8 {
  margin-left: auto;
  margin-right: auto;
}

body[class*="cms-active-template"] .cms-video-section.gallery-showcase.tg-video-showcase--solo .main-gallery-item img {
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Default template — hero contain; facts/offer bg layers */
body.cms-active-template-default .hero-header.hero-header--has-bg,
body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--cms-synced,
body.cms-active-template-default .hero-header[data-cms-bg="1"] {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: var(--dark) !important;
}

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

body.cms-active-template-default .facts-section--has-bg {
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .facts-section--has-bg.facts-section--cms-synced[data-cms-field="facts.background"][data-cms-bg="1"] {
    aspect-ratio: auto !important;
    min-height: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body[class*="cms-active-template"] .facts-section--has-bg.facts-section--cms-synced > .facts-section__content {
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: inherit !important;
  }

}

body.cms-active-template-default .def-offer-cms-frame--has-bg,
body.cms-active-template-default .def-offer-cms-frame--has-bg.offer-section--cms-synced {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark);
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .def-offer-cms-frame--has-bg,
  body.cms-active-template-default .def-offer-cms-frame--has-bg.offer-section--cms-synced {
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Default template — page header & footer: full-width background on all viewports */
body.cms-active-template-default .page-header-band,
body.cms-active-template-default .container-fluid.bg-dark.bg-img,
body.cms-active-template-default .footer-wrapper.footer-wrapper--has-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* Template A — offer/facts bg layers + CMS media cover */
body.cms-active-template-templateA .ta-template-a-page .ta-offer-bg,
body.cms-active-template-templateA .ta-template-a-page .ta-facts-bg,
body.cms-active-template-templateA .ta-template-a-page .ta-cms-bg-layer {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-cms-bg-frame.ta-offer-cms-frame {
  position: relative !important;
  width: min(100%, 1200px) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
  border-radius: 8px;
  background-color: var(--dark);
}

body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame .ta-offer-section__content {
  position: relative;
  z-index: 2;
  padding-left: 48px !important;
  padding-right: 48px !important;
  box-sizing: border-box !important;
}

@media (min-width: 992px) {
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame .ta-offer-section__content {
    padding-left: 64px !important;
    padding-right: 64px !important;
  }
}

body.cms-active-template-templateA .ta-template-a-page .ta-facts-section--has-bg.ta-facts-section--cms-synced {
  background-image: none !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap.ta-cms-media[data-cms-aspect="services.items.icon_image"] {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  aspect-ratio: 1 / 1 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  flex-shrink: 0;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-about-media.ta-cms-media .ta-about-media-img[data-cms-field="about.image"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-about-media.ta-cms-media {
  padding: 0 !important;
  min-height: 0 !important;
}

body.cms-active-template-templateA .ta-template-a-page .ta-offer-section {
  background: transparent !important;
  background-image: none !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-about-media-img[data-cms-field="about.image"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-team-photo-media .ta-team-photo-img[data-cms-field="team.items.image"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-testimonial-avatar .ta-testimonial-avatar-img[data-cms-field="testimonials.items.image"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-video-media .ta-video-thumb-img[data-cms-field="video.thumbnail"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-blog-card-media .ta-blog-card-img[data-cms-field="blog.items.image"] {
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-menu-item-media .ta-menu-item-img[data-cms-field="menu.tabs.items.image"] {
  object-fit: contain !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap .ta-svc-icon-img[data-cms-field="services.items.icon_image"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap img[data-cms-field="services.items.icon_image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: contain !important;
  background-color: transparent !important;
}

@media (max-width: 991.98px) {
  body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap.ta-cms-media[data-cms-aspect="services.items.icon_image"] {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
  }

  body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap .ta-svc-icon-img[data-cms-field="services.items.icon_image"],
  body.cms-active-template-templateA #app .ta-template-a-page .ta-svc-icon-wrap img[data-cms-field="services.items.icon_image"] {
    max-width: 50px !important;
    max-height: 50px !important;
  }
}
body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap.ta-cms-media[data-cms-aspect="facts.items.icon_image"] {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  flex-shrink: 0;
}

body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap img[data-cms-field="facts.items.icon_image"],
body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap .ta-fact-icon-img[data-cms-field="facts.items.icon_image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: contain !important;
  background-color: transparent !important;
}

@media (max-width: 991.98px) {
  body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap.ta-cms-media[data-cms-aspect="facts.items.icon_image"] {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
  }

  body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap img[data-cms-field="facts.items.icon_image"],
  body.cms-active-template-templateA #app .ta-template-a-page .ta-fact-icon-wrap .ta-fact-icon-img[data-cms-field="facts.items.icon_image"] {
    max-width: 50px !important;
    max-height: 50px !important;
  }
}

/* Template A — hero background contain (desktop/tablet overlay only) */
@media (min-width: 768px) {
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-fullbleed.ta-hero-shell--has-bg,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg.ta-hero-shell--cms-synced,
  body.cms-active-template-templateA .ta-hero-shell[data-cms-bg="1"].ta-hero-shell--cms-synced {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: var(--dark) !important;
  }
}

/* Template D — facts / offer: compact centered frames (not full-bleed) */
body.cms-active-template-templateD .td-facts-section .td-facts-bg,
body.cms-active-template-templateD .td-facts-section .td-facts-bg[data-cms-bg="1"] {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateD .td-offer-section--has-bg,
body.cms-active-template-templateD .td-offer-section--has-bg[data-cms-bg="1"] {
  background: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-cms-bg-frame,
body.cms-active-template-templateD #app .cms-template-d .td-cms-bg-frame {
  width: min(100%, 1200px) !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-cms-bg-layer,
body.cms-active-template-templateD #app .cms-template-d .td-offer-bg,
body.cms-active-template-templateD #app .cms-template-d .td-facts-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateD #app .cms-template-d .td-offer-bg,
body.cms-active-template-templateD #app .cms-template-d .td-facts-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

body.cms-active-template-templateD #app .cms-template-d .td-cms-bg-frame {
  position: relative !important;
}

/* Template D — gap-free CMS images (frames in cms-tiya-bridge.css) */
body.cms-active-template-templateD #app .main .cms-template-d .td-cms-media img[data-cms-field] {
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-about-main-media .td-about-main-img[data-cms-field="about.image"] {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-about-main-media.td-cms-media[data-cms-aspect="about.image"] {
  position: relative !important;
  aspect-ratio: 800 / 400 !important;
  overflow: hidden !important;
  background: transparent !important;
  line-height: 0 !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-menu-card-media .td-menu-card-image[data-cms-field="menu.tabs.items.image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-team-photo .td-team-card-img[data-cms-field="team.items.image"] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .events-section .td-blog-card-image {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: unset !important;
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-video-media.td-video-media--hero-size,
body.cms-active-template-templateD #app .main .cms-template-d .td-video-media.td-cms-media[data-cms-aspect="video.thumbnail"] {
  aspect-ratio: 960 / 480 !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-video-media .td-video-cover-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .hero-section.td-hero-fullbleed,
body.cms-active-template-templateD #app .main .cms-template-d .hero-section[data-cms-bg="1"] {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: unset !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-testimonial-avatar[data-cms-field="testimonials.items.image"] {
  object-fit: cover !important;
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-menu-card-media,
body.cms-active-template-templateD #app .main .cms-template-d .td-team-card-media {
  background-color: transparent !important;
}

body.cms-active-template-templateD #app .main .cms-template-d .td-service-card-icon img[data-cms-field],
body.cms-active-template-templateD #app .main .cms-template-d .td-about-feature-icon img[data-cms-field],
body.cms-active-template-templateD #app .main .cms-template-d .td-facts-icon-img[data-cms-field] {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* Template F/G — mobile hero backgrounds fill section height (crop allowed) */
@media (max-width: 991.98px) {
  body.cms-active-template-templateG #app .main .hotel-hero .hero-image-bg,
  body.cms-active-template-templateG #app .main .hotel-hero .tg-hero-media-backdrop-slide,
  body.cms-active-template-templateF #app .main .vf-hero-media-backdrop-slide {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateG #app .main .hotel-hero {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
  }

  body.cms-active-template-templateG #app .main .hotel-hero .hero-content {
    min-height: auto !important;
  }
}

@media (max-width: 767.98px) {
  body.cms-active-template-templateG #app .main .hotel-hero:has(.tg-hero-media-backdrop) .container {
    min-height: 0 !important;
    justify-content: flex-start !important;
  }
}

/* =================================================================
   Mobile stacked hero — full-width image on top, content below
   Templates: Default, A, C, D, E
================================================================= */
@media (max-width: 767.98px) {
  /* Default */
  body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--cms-synced,
  body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--mobile-content-synced {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 0 2rem !important;
    min-height: 0 !important;
    height: auto !important;
    background-image: none !important;
    background-color: var(--light) !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--cms-synced::before,
  body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--mobile-content-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-hero-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg .hero-overlay {
    display: none !important;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg .position-relative {
    position: relative !important;
    width: 100%;
    padding-top: 1.25rem;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg .text-white,
  body.cms-active-template-default .hero-header.hero-header--has-bg h1.text-white {
    color: var(--dark) !important;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg .font-secondary.text-primary {
    color: var(--primary) !important;
  }

  body.cms-active-template-default .hero-header.hero-header--has-bg .btn-outline-light {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
  }

  /* Template A */
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg.ta-hero-shell--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 2rem !important;
    background-image: none !important;
    background-color: var(--light) !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg.ta-hero-shell--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-hero-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-hero-scrim {
    display: none !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-hero-stage {
    position: relative !important;
    width: 100%;
    min-height: 0 !important;
    padding: 1.25rem 0 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark h1,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark h5,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark .display-2,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark .ta-section-kicker {
    color: var(--dark) !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark p,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-on-dark .fs-5 {
    color: var(--text) !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--secondary) !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .btn-outline-light,
  body.cms-active-template-templateA .ta-template-a-page .ta-hero-shell.ta-hero-shell--has-bg .ta-hero-nav.btn-outline-light {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background-color: transparent !important;
  }

  /* Template C */
  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg.tc-hero-shell--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 2rem !important;
    background-image: none !important;
    background-color: var(--light) !important;
  }

  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg.tc-hero-shell--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-hero-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-scrim {
    display: none !important;
  }

  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-stage {
    position: relative !important;
    width: 100%;
    min-height: 0 !important;
    padding: 1.25rem 0 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-slide .display-2,
  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-slide h5,
  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-slide p,
  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .tc-hero-slide .text-light {
    color: var(--dark) !important;
  }

  body.cms-active-template-templateC .template-c .tc-hero-shell.tc-hero-shell--has-bg .btn-outline-light {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
  }

  body.cms-active-template-templateC .template-c .tc-hero-wrap {
    margin-bottom: 0 !important;
  }

  /* Template D */
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0 !important;
    padding: 0 0 0.75rem !important;
    background-image: none !important;
    background-color: var(--light) !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-hero-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .section-overlay,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-wave-top {
    display: none !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-container {
    position: relative !important;
    width: 100%;
    padding-top: 1.25rem;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.td-hero-home .td-hero-subheading,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.td-hero-home h2.td-hero-text {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.td-hero-home h1.td-hero-text,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.td-hero-home p.td-hero-text,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.td-hero-home .td-hero-heading {
    color: var(--dark) !important;
    -webkit-text-fill-color: var(--dark) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.hero-inner-page .td-hero-content-panel .td-hero-subheading,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.hero-inner-page .td-hero-content-panel h2.td-hero-text {
    color: color-mix(in srgb, var(--light) 88%, var(--text)) !important;
    -webkit-text-fill-color: color-mix(in srgb, var(--light) 88%, var(--text)) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.hero-inner-page .td-hero-content-panel .td-hero-heading,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.hero-inner-page .td-hero-content-panel h1.td-hero-text,
  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg.hero-inner-page .td-hero-content-panel p.td-hero-text {
    color: var(--light) !important;
    -webkit-text-fill-color: var(--light) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-cta-group .link {
    color: var(--primary) !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-wave-bottom {
    display: none !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-container .mb-5 {
    margin-bottom: 0.75rem !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-content-stage {
    min-height: 0 !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home.td-hero-has-bg {
    margin-bottom: 0 !important;
    padding-bottom: 0.75rem !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-container {
    padding-bottom: 0.25rem !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-cta-group {
    margin-bottom: 0.5rem;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-cta-anchor {
    margin-top: 0 !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-has-bg .td-hero-cta-group {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.75rem;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0.75rem !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home .td-hero-container {
    padding-bottom: 0.25rem !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home .td-hero-cta-group {
    margin-bottom: 0.5rem;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home .td-hero-cta-anchor {
    margin-top: 0 !important;
  }

  body.cms-active-template-templateD .cms-template-d .hero-section.td-hero-home .td-hero-cta-group {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.75rem;
  }

  body.cms-active-template-templateD .cms-template-d .td-dynamic-section:has(.hero-section) {
    overflow: visible !important;
    margin-bottom: 1rem;
    padding-bottom: 0;
    position: relative;
    z-index: auto;
  }

  body.cms-active-template-templateD .cms-template-d .td-dynamic-section:has(.events-section) {
    position: relative;
    z-index: auto;
    overflow: visible !important;
    margin-top: 0;
  }

  body.cms-active-template-templateD .cms-template-d .events-section.section-padding {
    position: relative;
    z-index: auto;
    overflow: visible !important;
    padding-top: 1.25rem !important;
    padding-bottom: 2.5rem !important;
  }

  body.cms-active-template-templateD .cms-template-d .events-section .td-section-heading {
    overflow: visible;
    margin-bottom: 1.25rem !important;
    padding-top: 0.15rem;
  }

  body.cms-active-template-templateD .cms-template-d .events-section .td-section-eyebrow {
    display: block;
    margin-top: 0;
    padding: 0.65rem 0.85rem;
    line-height: 1.6;
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    box-decoration-break: slice;
    -webkit-box-decoration-break: initial;
  }

  /* Template E */
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding: 0 0 2rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-track {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-track .ve-te-hero-item,
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-track .ve-te-hero-item.active {
    background-size: cover !important;
    background-position: center center !important;
  }

  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-track .ve-te-hero-item::before {
    display: none !important;
  }

  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced > .ve-te-hero-caption {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    background: var(--light) !important;
    padding: 1.25rem 0 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-title,
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-eyebrow,
  body.cms-active-template-templateE .ve-te-hero.ve-te-hero--mobile-content-synced .ve-te-hero-tagline {
    color: var(--dark) !important;
    text-shadow: none !important;
  }
}

/* =================================================================
   Mobile stacked offer — full-width image on top, content below
   Templates: Default, A, B, C, D, G (E/F use column order in Vue)
================================================================= */
@media (max-width: 767.98px) {
  /* Default */
  body.cms-active-template-default .def-offer-cms-frame--has-bg.offer-section--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 1.5rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-default .def-offer-cms-frame--has-bg.offer-section--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-default .def-offer-cms-frame--has-bg .def-offer-bg,
  body.cms-active-template-default .def-offer-cms-frame--has-bg .offer-overlay {
    display: none !important;
  }

  body.cms-active-template-default .def-offer-cms-frame--has-bg .offer-section__content {
    position: relative !important;
    width: 100% !important;
    padding-top: 1.25rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  body.cms-active-template-default .def-offer-cms-frame--has-bg .text-white,
  body.cms-active-template-default .def-offer-cms-frame--has-bg h1.text-white {
    color: var(--dark) !important;
  }

  body.cms-active-template-default .def-offer-cms-frame--has-bg .font-secondary.text-primary {
    color: var(--primary) !important;
  }

  /* Template A */
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg.ta-offer-cms-frame--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 1.5rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg.ta-offer-cms-frame--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-offer-bg,
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-offer-scrim {
    display: none !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-offer-section__content {
    position: relative !important;
    width: 100% !important;
    padding-top: 1.25rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-on-dark,
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-on-dark h1,
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-on-dark h6,
  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-on-dark p {
    color: var(--dark) !important;
  }

  body.cms-active-template-templateA .ta-template-a-page .ta-offer-cms-frame--has-bg .ta-section-kicker {
    color: var(--primary) !important;
  }

  /* Template B */
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg.ve-offer-cms-frame--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 1.5rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg.ve-offer-cms-frame--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-offer-bg,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-offer-scrim,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-cta-overlay {
    display: none !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-cta-banner__content {
    position: relative !important;
    width: 100% !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-cta-banner__content h2,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-cta-banner__content p {
    color: var(--dark) !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:hover,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:focus,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:active,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:visited {
    text-decoration: none !important;
  }

  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:hover,
  body.cms-active-template-templateB .cms-template-b .ve-offer-cms-frame--has-bg .ve-btn-white:focus {
    background-color: color-mix(in srgb, var(--primary), var(--dark) 15%) !important;
    border-color: color-mix(in srgb, var(--primary), var(--dark) 15%) !important;
    color: var(--secondary) !important;
  }

  /* Template C */
  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg.tc-offer-cms-frame--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 0.75rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg.tc-offer-cms-frame--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-bg,
  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-scrim {
    display: none !important;
  }

  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-card__content {
    position: relative !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 1.25rem 1rem 0.75rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-kicker,
  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-title,
  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-desc {
    color: var(--dark) !important;
  }

  body.cms-active-template-templateC .template-c .tc-offer-cms-frame--has-bg .tc-offer-kicker {
    color: var(--primary) !important;
  }

  /* Template D */
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg.td-offer-section--cms-synced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 1.5rem !important;
    background-color: var(--light) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg.td-offer-section--cms-synced::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-bg,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-scrim {
    display: none !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-cms-frame {
    display: contents !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-section__content {
    position: relative !important;
    width: 100% !important;
    padding-top: 1.25rem !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: center !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-ink-on-dark,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-title,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-desc-line {
    color: var(--p-color) !important;
    -webkit-text-fill-color: var(--p-color) !important;
    background-color: transparent !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-title::selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-desc-line::selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-title *::selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-desc-line *::selection {
    background-color: var(--p-color) !important;
    color: var(--light) !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-title::-moz-selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-desc-line::-moz-selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-title *::-moz-selection,
  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-offer-desc-line *::-moz-selection {
    background-color: var(--p-color) !important;
    color: var(--light) !important;
  }

  body.cms-active-template-templateD .cms-template-d .td-offer-section--has-bg .td-section-eyebrow--light {
    color: var(--td-ink-on-dark) !important;
    -webkit-text-fill-color: var(--td-ink-on-dark) !important;
  }

  /* Template G — primary offer banner */
  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 0.75rem !important;
    background-color: var(--background-color, #fff) !important;
    overflow: visible !important;
  }

  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-image: var(--cms-offer-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    order: -1;
  }

  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .promotion-background {
    display: none !important;
  }

  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .promotion-content {
    position: relative !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    padding: 1.25rem 1rem 0.75rem !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .promo-text h2,
  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .promo-text p,
  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .tg-offer-kicker {
    color: var(--heading-color, var(--default-color)) !important;
  }

  body.cms-active-template-templateG #app .main .offer-cards .tg-offer-primary--has-bg .tg-offer-kicker {
    color: var(--accent-color) !important;
  }
}

/* Template G — gap-free CMS images (containers in cms-template-g-bridge.css) */
body.cms-active-template-templateG #app .main .cms-template-g .tg-cms-media img[data-cms-field] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  background-color: transparent !important;
}

body.cms-active-template-templateG #app .main .cms-template-g img[data-cms-field].main-image,
body.cms-active-template-templateG #app .main .cms-template-g img[data-cms-field].tg-team-member-photo {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}

body.cms-active-template-templateG #app .main .cms-template-g .tg-cms-media:hover img {
  transform: none !important;
}

body.cms-active-template-templateG #app .main .rooms-showcase .suite-image-wrapper:hover img,
body.cms-active-template-templateG #app .main .rooms-showcase .selection-item .item-image:hover img,
body.cms-active-template-templateG #app .main .location-cards .location-card:hover .location-visual img,
body.cms-active-template-templateG #app .main .gallery-showcase .main-gallery-item:hover img,
body.cms-active-template-templateG #app .main .offer-cards .offer-card:hover .offer-image img,
body.cms-active-template-templateG #app .main .events-cards .event-card:hover .card-image img {
  transform: none !important;
}

/* Template F — gap-free CMS images (frames in cms-clarity-bridge.css) */
body.cms-active-template-templateF #app .main .cms-template-f .vf-cms-media img[data-cms-field] {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  background-color: transparent !important;
}

body.cms-active-template-templateF #app .main .portfolio .vf-blog-card-media img.vf-blog-card-image,
body.cms-active-template-templateF #app .main .portfolio .vf-blog-image-fixed img.vf-blog-card-image {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: unset !important;
  background-color: transparent !important;
}

body.cms-active-template-templateF #app .main .vf-hero-image-cover,
body.cms-active-template-templateF #app .main .vf-hero-image-fixed img[data-cms-field="hero.items.image"] {
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}

body.cms-active-template-templateF #app .main .vf-hero-image-fixed:not(.vf-hero-image-empty) {
  background-color: transparent !important;
}

body.cms-active-template-templateF #app .main .vf-hero-image-cover,
body.cms-active-template-templateF #app .main .vf-cms-card-img-cover,
body.cms-active-template-templateF #app .main .vf-testimonial-avatar img,
body.cms-active-template-templateF #app .main .vf-leader-image-fixed img {
  background-color: transparent !important;
}

@media (max-width: 767.98px) {
  body.cms-active-template-templateF #app .main .team .vf-leader-image-fixed img[data-cms-field="team.items.image"],
  body.cms-active-template-templateF #app .main .team .vf-leader-image-fixed .vf-cms-card-img-cover {
    object-fit: cover !important;
    object-position: center center !important;
  }
}

body.cms-active-template-templateF #app .main .vf-video-media.vf-video-media--hero-size,
body.cms-active-template-templateF #app .main .vf-video-media.vf-cms-media[data-cms-aspect="video.thumbnail"] {
  aspect-ratio: 840 / 420 !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-templateF #app .main .portfolio .portfolio-wrapper:hover .vf-blog-card-media img {
  transform: none !important;
}

body.cms-active-template-templateF #app .main .about .image-main.vf-about-main-media .vf-about-main-img,
body.cms-active-template-templateF #app .main .about .image-composition .image-main img.vf-about-main-img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  background-color: transparent !important;
}
