/**
 * EZGation — Home (page 18) client polish
 * Aligns module rhythm with blog/catalog: cards, posts, CTAs.
 */

body.home .elementor-section > .elementor-container,
body.page-id-18 .elementor-section > .elementor-container {
  max-width: var(--ez-container, 1440px);
}

/* ---- Product categories (image-box grid) ---- */
body.home .elementor-widget-image-box .elementor-image-box-wrapper,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-wrapper {
  height: 100%;
  border: 1px solid var(--ez-line, #d7e8e4);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.home .elementor-widget-image-box .elementor-image-box-wrapper:hover,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-wrapper:hover {
  border-color: color-mix(in srgb, var(--ez-primary) 35%, var(--ez-line, #d7e8e4));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transform: translateY(-2px);
}

/* White product photos must sit on white — gray #f8fafc showed as a dirty plate */
body.home .elementor-widget-image-box .elementor-image-box-img,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-img {
  background: #fff !important;
}

body.home .elementor-widget-image-box .elementor-image-box-img img,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-img img {
  object-fit: contain;
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  padding: 1rem;
  background: #fff !important;
}

body.home .elementor-widget-image-box .elementor-image-box-content,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-content {
  padding: 0.85rem 1.1rem 1.15rem;
}

body.home .elementor-widget-image-box .elementor-image-box-title,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-title {
  font-family: var(--ez-font-display, inherit);
  font-size: 1.05rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem !important;
}

body.home .elementor-widget-image-box .elementor-image-box-description,
body.page-id-18 .elementor-widget-image-box .elementor-image-box-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ez-muted, #5c6b73);
  margin: 0 !important;
}

/* ---- Application icon boxes ---- */
body.home .elementor-widget-icon-box .elementor-icon-box-wrapper,
body.page-id-18 .elementor-widget-icon-box .elementor-icon-box-wrapper {
  height: 100%;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--ez-line, #d7e8e4);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.home .elementor-widget-icon-box .elementor-icon-box-wrapper:hover,
body.page-id-18 .elementor-widget-icon-box .elementor-icon-box-wrapper:hover {
  border-color: color-mix(in srgb, var(--ez-primary) 35%, var(--ez-line, #d7e8e4));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

/* ---- Latest news posts (same language as Blog archive) ---- */
body.home .elementor-posts-container,
body.page-id-18 .elementor-posts-container {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

body.home .elementor-posts-container .elementor-post,
body.page-id-18 .elementor-posts-container .elementor-post {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ez-line, #d7e8e4);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none !important;
}

body.home .elementor-post__card,
body.page-id-18 .elementor-post__card {
  display: flex;
  flex-direction: column;
  flex: 1;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

body.home .elementor-post__card:not(:has(.elementor-post__thumbnail))::before,
body.page-id-18 .elementor-post__card:not(:has(.elementor-post__thumbnail))::before {
  content: "";
  display: block;
  order: 0;
  aspect-ratio: 16 / 9;
  max-height: 160px;
  background:
    radial-gradient(ellipse 55% 45% at 72% 28%, rgba(46, 125, 50, 0.18), transparent 70%),
    linear-gradient(145deg, #e8f5e9 0%, #f1f5f9 55%, #ecfdf5 100%);
  border-bottom: 1px solid var(--ez-line, #d7e8e4);
}

body.home .elementor-post__meta-data,
body.page-id-18 .elementor-post__meta-data {
  order: 1;
  padding: 0.9rem 1.2rem 0 !important;
  margin: 0 !important;
  font-size: 0.8125rem !important;
  color: var(--ez-muted, #5c6b73) !important;
}

body.home .elementor-post__text,
body.page-id-18 .elementor-post__text {
  order: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.4rem 1.2rem 1.25rem;
  gap: 0.4rem;
}

body.home .elementor-post__title,
body.page-id-18 .elementor-post__title {
  font-family: var(--ez-font-display, inherit) !important;
  font-size: 1.05rem !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
}

body.home .elementor-post__title a,
body.page-id-18 .elementor-post__title a {
  color: var(--ez-ink, #1a1a1a) !important;
  text-decoration: none !important;
}

body.home .elementor-post__excerpt,
body.page-id-18 .elementor-post__excerpt {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ez-muted, #5c6b73);
  margin: 0 !important;
}

body.home .elementor-posts__hover-gradient .elementor-post__card::after,
body.page-id-18 .elementor-posts__hover-gradient .elementor-post__card::after {
  display: none !important;
}

/* ---- Popular products loop: white media (same as catalog) ---- */
body.home .ez-card,
body.page-id-18 .ez-card,
body.home .e-loop-item .ez-card,
body.page-id-18 .e-loop-item .ez-card {
  background: #fff !important;
}

body.home .ez-card .ez-card__media,
body.page-id-18 .ez-card .ez-card__media,
body.home .ez-card .elementor-widget-image,
body.page-id-18 .ez-card .elementor-widget-image {
  background: #fff !important;
}

body.home .ez-card .ez-card__media img,
body.page-id-18 .ez-card .ez-card__media img,
body.home .ez-card .elementor-widget-image img,
body.page-id-18 .ez-card .elementor-widget-image img {
  background: #fff !important;
  object-fit: contain !important;
}

body.home .ez-card .ez-card__body,
body.page-id-18 .ez-card .ez-card__body {
  background: #fff !important;
}

/* Hero product shot (widget 02830a3): transparent PNG cutout — no white plate on gradient */
body.home .elementor-element-02830a3,
body.page-id-18 .elementor-element-02830a3,
body.home .elementor-element-02830a3 .elementor-widget-container,
body.page-id-18 .elementor-element-02830a3 .elementor-widget-container,
body.home .elementor-element-02830a3 .elementor-image,
body.page-id-18 .elementor-element-02830a3 .elementor-image,
body.home .elementor-element-02830a3 a,
body.page-id-18 .elementor-element-02830a3 a {
  background: transparent !important;
  box-shadow: none !important;
}

body.home .elementor-element-02830a3 img,
body.page-id-18 .elementor-element-02830a3 img {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  mix-blend-mode: normal;
}

/* ---- Popular products loop: two buttons one row ---- */
body.home .ez-card .ez-card__actions,
body.page-id-18 .ez-card .ez-card__actions {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.4rem !important;
  margin-top: 0.65rem !important;
  padding-top: 0 !important;
  align-items: stretch !important;
}

body.home .ez-card .ez-card__actions .ez-btn,
body.page-id-18 .ez-card .ez-card__actions .ez-btn {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  justify-content: center !important;
  text-align: center !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  padding: 0.55rem 0.45rem !important;
  border-radius: 8px !important;
  line-height: 1.2 !important;
  min-height: 2.35rem !important;
  white-space: nowrap;
  box-sizing: border-box;
}

body.home .ez-card .ez-card-quote,
body.page-id-18 .ez-card .ez-card-quote {
  background: var(--ez-primary, #009383) !important;
  border-color: var(--ez-primary, #009383) !important;
  color: #fff !important;
}

body.home .ez-card .ez-card-quote:hover,
body.page-id-18 .ez-card .ez-card-quote:hover {
  background: var(--ez-ink, #1a1a1a) !important;
  border-color: var(--ez-ink, #1a1a1a) !important;
  color: #fff !important;
}

body.home .ez-card .ez-card-add,
body.page-id-18 .ez-card .ez-card-add {
  background: #fff !important;
  border: 1.5px solid var(--ez-header-dark, #163f39) !important;
  color: var(--ez-header-dark, #163f39) !important;
}

body.home .ez-card .ez-card-add:hover,
body.page-id-18 .ez-card .ez-card-add:hover {
  background: var(--ez-header-dark, #163f39) !important;
  color: #fff !important;
}


/* Inquiry band styles live in ez-tokens.css (global) */

@media (max-width: 1024px) {
  body.home .elementor-posts-container,
  body.page-id-18 .elementor-posts-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* "Can't find your model?" CTA — button must stay inside card padding */
body.home .ezh-cat--cta .ez-btn,
body.page-id-18 .ezh-cat--cta .ez-btn {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
  justify-content: center !important;
}

@media (max-width: 767px) {
  body.home .e-con-inner,
  body.page-id-18 .e-con-inner {
    padding-left: 1.35rem !important;
    padding-right: 1.35rem !important;
  }
  /* Hero inner already padded by section — don't stack another 24px */
  body.home .ezh-hero .ezh-hero__in,
  body.page-id-18 .ezh-hero .ezh-hero__in,
  body.home .ezh-hero .ezh-hero__in.e-con,
  body.page-id-18 .ezh-hero .ezh-hero__in.e-con,
  body.home .ezh-hero .ezh-hero__in > .e-con-inner,
  body.page-id-18 .ezh-hero .ezh-hero__in > .e-con-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.home h1.elementor-heading-title,
  body.page-id-18 h1.elementor-heading-title {
    font-size: clamp(1.45rem, 6vw, 1.8rem) !important;
    line-height: 1.25 !important;
  }
  body.home .ezh-hero .ezh-hero__copy,
  body.page-id-18 .ezh-hero .ezh-hero__copy,
  body.home .ezh-hero .ezh-hero__copy > .e-con-inner,
  body.page-id-18 .ezh-hero .ezh-hero__copy > .e-con-inner {
    gap: 1.35rem !important;
    row-gap: 1.35rem !important;
    --widgets-spacing: 1.35rem !important;
    --widgets-spacing-row: 1.35rem !important;
  }
  body.home .ezh-hero .ez-lead,
  body.page-id-18 .ezh-hero .ez-lead,
  body.home .ezh-hero .ez-lead p,
  body.page-id-18 .ezh-hero .ez-lead p {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
  }
  body.home .ezh-hero .ez-actions,
  body.page-id-18 .ezh-hero .ez-actions {
    margin-top: 0.75rem !important;
    gap: 0.95rem !important;
  }
  body.home .ez-tpl .ez-grid,
  body.page-id-18 .ez-tpl .ez-grid {
    --ezha-cols: 1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.home .ez-cta-actions,
  body.page-id-18 .ez-cta-actions,
  body.home .ezh-hero .ez-actions,
  body.page-id-18 .ezh-hero .ez-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.95rem !important;
  }
  body.home .ez-cta-actions .ez-btn,
  body.page-id-18 .ez-cta-actions .ez-btn,
  body.home .ezh-hero .ez-actions .ez-btn,
  body.page-id-18 .ezh-hero .ez-actions .ez-btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.9375rem !important;
  }
  body.home .ezh-hero .ez-search,
  body.page-id-18 .ezh-hero .ez-search,
  body.home .ezh-hero form.ez-search,
  body.page-id-18 .ezh-hero form.ez-search {
    display: none !important;
  }
}

@media (max-width: 640px) {
  body.home .elementor-posts-container,
  body.page-id-18 .elementor-posts-container {
    grid-template-columns: 1fr;
  }

  body.home .ez-card .ez-card__actions,
  body.page-id-18 .ez-card .ez-card__actions {
    flex-direction: column !important;
  }

  body.home .ez-card .ez-card__actions .ez-btn,
  body.page-id-18 .ez-card .ez-card__actions .ez-btn {
    width: 100% !important;
  }
}

/* Hero actions + search: one composed block (not orphan Search alone) */
body.home .ezh-hero .ez-cta-actions,
body.page-id-18 .ezh-hero .ez-cta-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.65rem !important;
}
body.home .ezh-hero .ez-search,
body.page-id-18 .ezh-hero .ez-search {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  margin: 0 !important;
  flex: 1 1 14rem;
  max-width: 22rem;
}
body.home .ezh-hero .ez-search input[type="search"],
body.page-id-18 .ezh-hero .ez-search input[type="search"] {
  width: 100% !important;
  min-width: 0 !important;
  opacity: 1 !important;
  padding: 0.55rem 0.75rem !important;
  border: 1px solid var(--ez-border, #d7e8e4) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--ez-ink, #1a1a1a) !important;
}
body.home .ezh-hero .ez-search__btn,
body.page-id-18 .ezh-hero .ez-search__btn {
  background: var(--ez-primary, #009383) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 0.55rem 1rem !important;
  font-weight: 700 !important;
}
