/* JetEngine listing styles for the Predefined Templates page.
   v0.2: non-destructive styling only. Do not clip or restyle inner Gutenberg groups. */

.jet-listing-grid,
.jet-listing-grid__slider,
.elementor-widget-jet-listing-grid,
.yc-template--templates .wp-block-post-content > .jet-listing-grid,
.yc-template--templates .wp-block-post-content .jet-listing-grid {
  width: min(100% - (var(--yc-gutter) * 2), var(--yc-container-xl));
  max-width: var(--yc-container-xl);
  margin-inline: auto;
}

/* Force JetEngine items into a stable responsive grid even when JetEngine/Elementor adds inline column widths. */
.jet-listing-grid__items,
.yc-template--templates .jet-listing-grid__items {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
  gap: clamp(1rem, 2.2vw, 2rem) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
}

.jet-listing-grid__item,
.yc-template--templates .jet-listing-grid__item {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  overflow: visible !important;
}

.jet-listing-grid__item > *,
.jet-listing-grid__item > .elementor,
.jet-listing-grid__item > .jet-engine-listing-overlay-wrap,
.jet-listing-grid__item > .jet-listing-grid__item-content,
.jet-listing-grid__item > .jet-listing-dynamic-repeater__items {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
}

/* Card surface: apply only to top-level JetEngine wrappers, not to every group inside the listing template. */
.jet-listing-grid__item > .jet-engine-listing-overlay-wrap,
.jet-listing-grid__item > .jet-listing-grid__item-content,
.jet-listing-grid__item > article,
.jet-listing-grid__item > .elementor {
  border: 1px solid var(--yc-border-soft);
  border-radius: var(--yc-radius-xl);
  background: var(--yc-white);
  box-shadow: var(--yc-shadow-xs);
  transition: transform var(--yc-motion-normal) var(--yc-ease-out), box-shadow var(--yc-motion-normal) var(--yc-ease-out), border-color var(--yc-motion-normal) var(--yc-ease-out);
}

.jet-listing-grid__item > .jet-engine-listing-overlay-wrap:hover,
.jet-listing-grid__item > .jet-listing-grid__item-content:hover,
.jet-listing-grid__item > article:hover,
.jet-listing-grid__item > .elementor:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 93, 188, 0.25);
  box-shadow: var(--yc-shadow-md);
}

/* Neutralize v0.1 clipping on nested groups if browser cache kept old CSS order. */
.jet-listing-grid__item .wp-block-group,
.jet-listing-grid__item .wp-block-columns,
.jet-listing-grid__item .wp-block-column {
  max-width: 100% !important;
  width: 100% !important;
  overflow: visible !important;
}

.jet-listing-grid__item img,
.jet-listing-dynamic-image img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover;
}

.jet-listing-dynamic-field__content,
.jet-listing-dynamic-meta,
.jet-listing-dynamic-terms,
.jet-listing-dynamic-link {
  color: var(--yc-muted);
}

.jet-listing-grid__item h2,
.jet-listing-grid__item h3,
.jet-listing-grid__item .jet-listing-dynamic-field__content:first-child {
  color: var(--yc-deep-navy);
  font-family: var(--yc-font-heading);
  font-style: normal !important;
  font-weight: 800;
  line-height: 1.12;
}

.jet-listing-dynamic-link__link,
.jet-listing-grid__item .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: var(--yc-radius-pill);
  background: linear-gradient(135deg, var(--yc-primary-blue), var(--yc-cyan-blue));
  color: var(--yc-white) !important;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(6, 93, 188, 0.22);
}

.jet-listing-dynamic-link__link:hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(6, 93, 188, 0.28);
}

/* Filters / pagination */
.jet-smart-filters,
.jet-smart-filters-checkboxes,
.jet-filter,
.jet-select,
.jet-search-filter {
  font-family: var(--yc-font-body);
}

.jet-checkboxes-list,
.jet-radio-list,
.jet-color-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--yc-space-2);
}

.jet-checkboxes-list__row,
.jet-radio-list__row,
.jet-color-image-list__row {
  margin: 0 !important;
}

.jet-checkboxes-list__button,
.jet-radio-list__button,
.jet-color-image-list__button,
.jet-pagination__item {
  border: 1px solid var(--yc-border);
  border-radius: var(--yc-radius-pill);
  background: var(--yc-white);
  color: var(--yc-deep-navy);
  font-weight: 700;
  transition: border-color var(--yc-motion-fast) var(--yc-ease-out), color var(--yc-motion-fast) var(--yc-ease-out), background var(--yc-motion-fast) var(--yc-ease-out);
}

.jet-checkboxes-list__button:hover,
.jet-radio-list__button:hover,
.jet-color-image-list__button:hover,
.jet-pagination__item:hover,
.jet-pagination__item--active {
  border-color: transparent;
  background: var(--yc-primary-blue);
  color: var(--yc-white);
}

@media (min-width: 1180px) {
  .yc-template--templates .jet-listing-grid__items {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 720px) and (max-width: 1179px) {
  .yc-template--templates .jet-listing-grid__items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 719px) {
  .jet-listing-grid__items,
  .yc-template--templates .jet-listing-grid__items {
    grid-template-columns: 1fr !important;
  }
}


/* v0.3 JetEngine listing reset for Predefined Templates.
   Purpose: remove the decorative blue oval and unwanted borders from listing items
   without altering JetEngine queries, links, fields or source content. */
.yc-template--templates .jet-listing-grid,
.yc-template--templates .jet-listing-grid__items {
  overflow: visible !important;
}

.yc-template--templates .jet-listing-grid__items {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1.35rem, 2vw, 2.25rem) !important;
}

.yc-template--templates .jet-listing-grid__item {
  position: relative;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.yc-template--templates .jet-listing-grid__item::before,
.yc-template--templates .jet-listing-grid__item::after,
.yc-template--templates .jet-listing-grid__item *::before,
.yc-template--templates .jet-listing-grid__item *::after {
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.yc-template--templates .jet-listing-grid__item :where(
  .elementor,
  .elementor-section,
  .elementor-container,
  .elementor-column,
  .elementor-widget-wrap,
  .elementor-widget-container,
  .jet-engine-listing-overlay-wrap,
  .jet-listing-grid__item-content,
  .wp-block-group,
  .wp-block-columns,
  .wp-block-column,
  .wp-block-cover,
  .wp-block-media-text
) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.yc-template--templates .jet-listing-grid__item :where(
  .elementor-background-overlay,
  .elementor-shape,
  .wp-block-cover__background,
  .wp-block-cover__gradient-background,
  .stk-block-background,
  .uagb-section__overlay,
  .uagb-ifb-separator,
  .decor,
  .decoration,
  .shape
) {
  display: none !important;
}

.yc-template--templates .jet-listing-grid__item img,
.yc-template--templates .jet-listing-dynamic-image img,
.yc-template--templates .wp-block-image img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: clamp(0.8rem, 1vw, 1.15rem) !important;
  box-shadow: var(--yc-shadow-sm) !important;
}

.yc-template--templates .jet-listing-grid__item .jet-listing-dynamic-link,
.yc-template--templates .jet-listing-grid__item .wp-block-buttons,
.yc-template--templates .jet-listing-grid__item p:has(> a) {
  display: flex !important;
  justify-content: center !important;
  margin-top: var(--yc-space-4) !important;
}

.yc-template--templates .jet-listing-dynamic-link__link,
.yc-template--templates .jet-listing-grid__item .wp-block-button__link {
  width: auto !important;
  max-width: calc(100% - 1rem);
  border: 0 !important;
  border-radius: var(--yc-radius-pill) !important;
  background: linear-gradient(135deg, var(--yc-primary-blue), var(--yc-cyan-blue)) !important;
  box-shadow: 0 10px 22px rgba(6, 93, 188, 0.22) !important;
}

@media (min-width: 720px) and (max-width: 1179px) {
  .yc-template--templates .jet-listing-grid__items {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 719px) {
  .yc-template--templates .jet-listing-grid__items {
    grid-template-columns: 1fr !important;
  }
}

/* v0.4: aggressive but safe reset for the Predefined Templates listing.
   Removes the blue oval/backplate and decorative border generated inside the JetEngine listing template.
   Buttons and real screenshots remain visible. */
.yc-template--templates .jet-listing-grid__item :where(div, section, article, figure, span):not(.jet-listing-dynamic-link):not(.wp-block-button):not(.wp-block-button__link) {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.yc-template--templates .jet-listing-grid__item :where(div, section, article, figure):not(.jet-listing-dynamic-link):not(.wp-block-buttons):not(.wp-block-button) {
  border-radius: 0 !important;
}

.yc-template--templates .jet-listing-grid__item :where(.wp-block-cover, .wp-block-cover__inner-container, .wp-block-media-text, .wp-block-group, .wp-block-columns, .wp-block-column, .elementor-element, .elementor-widget, .elementor-widget-container, .e-con, .uagb-container, .stk-block, .stk-container) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

.yc-template--templates .jet-listing-grid__item :where(.wp-block-cover, .wp-block-spacer, .elementor-spacer, .elementor-background-overlay, .elementor-shape, .uagb-section__overlay, .stk-block-background, .stk-block-background__image, .stk-img-wrapper):empty {
  display: none !important;
}

/* Hide likely purely decorative oval/backplate nodes while preserving content-bearing wrappers. */
.yc-template--templates .jet-listing-grid__item :where(.yc-oval, .oval, .ellipse, .circle, .shape, .decorative, .background-shape, .template-shape, .template-bg, .listing-bg, .listing-background) {
  display: none !important;
}

.yc-template--templates .jet-listing-grid__item img {
  position: relative !important;
  z-index: 1 !important;
}

.yc-template--templates .jet-listing-grid__item a,
.yc-template--templates .jet-listing-grid__item button {
  position: relative !important;
  z-index: 2 !important;
}

.yc-template--templates .jet-listing-grid__item .jet-listing-dynamic-link__link,
.yc-template--templates .jet-listing-grid__item .wp-block-button__link {
  background: linear-gradient(135deg, var(--yc-primary-blue), var(--yc-cyan-blue)) !important;
  border-color: transparent !important;
  border-radius: var(--yc-radius-pill) !important;
  box-shadow: 0 10px 22px rgba(6, 93, 188, 0.22) !important;
}


/* v0.5: JetEngine media-link reset.
   Do not use URL-based selectors. The image link and the CTA link can share the same href,
   so the theme must identify media links structurally: anchors containing images.
   If possible, add these optional classes inside the JetEngine listing template:
   - yc-template-card on the listing root
   - yc-template-card-media on the image link
   - yc-template-card-cta on the CTA button/link
*/
.yc-template--templates .jet-listing-grid__item a:has(img),
.yc-template--templates .jet-listing-grid__item a:has(.jet-listing-dynamic-image),
.yc-template--templates .jet-listing-grid__item .yc-template-card-media {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  overflow: visible !important;
}

.yc-template--templates .jet-listing-grid__item a:has(img)::before,
.yc-template--templates .jet-listing-grid__item a:has(img)::after,
.yc-template--templates .jet-listing-grid__item .yc-template-card-media::before,
.yc-template--templates .jet-listing-grid__item .yc-template-card-media::after {
  content: none !important;
  display: none !important;
}

.yc-template--templates .jet-listing-grid__item a:has(img):hover {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.yc-template--templates .jet-listing-grid__item a:has(img) img,
.yc-template--templates .jet-listing-grid__item .yc-template-card-media img,
.yc-template--templates .jet-listing-grid__item .jet-listing-dynamic-image img,
.yc-template--templates .jet-listing-grid__item .wp-block-image img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: var(--yc-radius-lg) !important;
  box-shadow: 0 18px 45px rgba(2, 35, 94, 0.10) !important;
}

.yc-template--templates .jet-listing-grid__item .jet-listing-dynamic-link__link,
.yc-template--templates .jet-listing-grid__item .wp-block-button__link,
.yc-template--templates .jet-listing-grid__item .yc-template-card-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: calc(100% - 1rem) !important;
  min-height: 42px !important;
  padding: 0.72rem 1.05rem !important;
  border: 0 !important;
  border-radius: var(--yc-radius-pill) !important;
  background: linear-gradient(135deg, var(--yc-primary-blue), var(--yc-cyan-blue)) !important;
  color: var(--yc-white) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(6, 93, 188, 0.22) !important;
}

.yc-template--templates .jet-listing-grid__item .jet-listing-dynamic-link__link:hover,
.yc-template--templates .jet-listing-grid__item .wp-block-button__link:hover,
.yc-template--templates .jet-listing-grid__item .yc-template-card-cta:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 16px 34px rgba(6, 93, 188, 0.28) !important;
}
