/* Homepage catalogue card — scoped to the catalogue card only.
 * Dimensions and composition follow the supplied Figma reference (500 x 582).
 */

body.page-index .aw-catalog-card-col .elementor-widget-wrap,
body.index .aw-catalog-card-col .elementor-widget-wrap {
  position: relative !important;
  display: block !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 500 / 582 !important;
  container-type: inline-size !important;
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 24px !important;
  background-image:
    linear-gradient(145deg, rgba(78, 36, 255, .88), rgba(108, 57, 255, .90)),
    url('/img/tmp/cms/back2.png') !important;
  background-position: center !important;
  background-size: cover !important;
  background-blend-mode: screen !important;
  box-shadow: none !important;
  color: #fff !important;
}

body.page-index .aw-catalog-card-col,
body.index .aw-catalog-card-col {
  align-self: start !important;
  height: auto !important;
}

/* Desktop: the catalogue card spans the two catalogue rows. Let the grid
 * define its height so its top and bottom edges coincide exactly with the
 * neighbouring cards, regardless of the desktop viewport width. */
@media (min-width: 1200px) {
  body.page-index .aw-catalog-card-col,
  body.index .aw-catalog-card-col {
    align-self: stretch !important;
  }

  body.page-index .aw-catalog-card-col .elementor-widget-wrap,
  body.index .aw-catalog-card-col .elementor-widget-wrap {
    height: 100% !important;
    aspect-ratio: auto !important;
  }
}

body.page-index .aw-catalog-card-col .elementor-widget-wrap::before,
body.index .aw-catalog-card-col .elementor-widget-wrap::before {
  content: '' !important;
  position: absolute !important;
  z-index: 1 !important;
  left: 11cqw !important;
  /* cqw is used for both axes because the card has a fixed 500:582 ratio. */
  top: 42.5cqw !important;
  width: 16cqw !important;
  height: 11.2cqw !important;
  background: url('/img/tmp/cms/codex-home-catalog-card-icon.png') center / contain no-repeat !important;
  pointer-events: none !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-title,
body.index .aw-catalog-card-col .aw-catalog-card-title {
  position: absolute !important;
  z-index: 2 !important;
  left: 34.8cqw !important;
  top: 40.5cqw !important;
  width: 56cqw !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-title .elementor-heading-title,
body.index .aw-catalog-card-col .aw-catalog-card-title .elementor-heading-title {
  margin: 0 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: clamp(17px, 6.4cqw, 32px) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-title strong,
body.index .aw-catalog-card-col .aw-catalog-card-title strong {
  font-weight: 800 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-text,
body.index .aw-catalog-card-col .aw-catalog-card-text {
  position: absolute !important;
  z-index: 2 !important;
  left: 16cqw !important;
  top: 61.1cqw !important;
  width: 86cqw !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-text p,
body.index .aw-catalog-card-col .aw-catalog-card-text p {
  margin: 0 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: clamp(13px, 5cqw, 25px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-text .elementor-widget-container,
body.index .aw-catalog-card-col .aw-catalog-card-text .elementor-widget-container {
  margin: 0 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: clamp(13px, 5cqw, 25px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-text .elementor-widget-container strong,
body.index .aw-catalog-card-col .aw-catalog-card-text .elementor-widget-container strong {
  color: inherit !important;
}

/* The whole card remains the catalogue link; the legacy CTA is kept in the
 * DOM for accessibility and navigation, but its old visible button is not
 * part of the supplied Figma composition. */
body.page-index .aw-catalog-card-col .aw-catalog-card-button,
body.index .aw-catalog-card-col .aw-catalog-card-button {
  position: absolute !important;
  z-index: 4 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-button .elementor-widget-container,
body.page-index .aw-catalog-card-col .aw-catalog-card-button .elementor-button-wrapper,
body.page-index .aw-catalog-card-col .aw-catalog-card-button .elementor-button,
body.index .aw-catalog-card-col .aw-catalog-card-button .elementor-widget-container,
body.index .aw-catalog-card-col .aw-catalog-card-button .elementor-button-wrapper,
body.index .aw-catalog-card-col .aw-catalog-card-button .elementor-button {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-button .elementor-button,
body.index .aw-catalog-card-col .aw-catalog-card-button .elementor-button {
  opacity: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 24px !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

body.page-index .aw-catalog-card-col .aw-catalog-card-button .elementor-button:focus-visible,
body.index .aw-catalog-card-col .aw-catalog-card-button .elementor-button:focus-visible {
  opacity: 1 !important;
  outline: 3px solid rgba(255, 255, 255, .9) !important;
  outline-offset: -5px !important;
}

@media (max-width: 767px) {
  body.page-index .aw-catalog-card-col .elementor-widget-wrap,
  body.index .aw-catalog-card-col .elementor-widget-wrap {
    border-radius: 20px !important;
  }

  body.page-index .aw-catalog-card-col .aw-catalog-card-title .elementor-heading-title,
  body.index .aw-catalog-card-col .aw-catalog-card-title .elementor-heading-title {
    white-space: normal !important;
  }
}
