/**
 * FIX75 — Articles archive header: reference layout + breadcrumb home icon.
 * Loads after theme.css and fix12-reference.css so these rules win on the frontend.
 */

html body.elementor-page .e-con:has(> .elementor-widget-icm_articles_header) {
  --padding-inline-start: 0px !important;
  --padding-inline-end: 0px !important;
  padding-inline: 0 !important;
  margin-inline: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

html body .elementor-widget-icm_articles_header,
html body .elementor-widget-icm_articles_header > .elementor-widget-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Same outer gutters as every other .icm-container on the site. */
html body .elementor-widget-icm_articles_header .icm-articles-head .icm-container,
html body .icm-articles-head .icm-container {
  width: min(var(--icm-container), calc(100% - 72px)) !important;
  max-width: var(--icm-container) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 1100px) {
  html body .elementor-widget-icm_articles_header .icm-articles-head .icm-container,
  html body .icm-articles-head .icm-container {
    width: min(var(--icm-container), calc(100% - 40px)) !important;
  }
}

@media (max-width: 767px) {
  html body .elementor-widget-icm_articles_header .icm-articles-head .icm-container,
  html body .icm-articles-head .icm-container {
    width: calc(100% - 28px) !important;
  }
}

html body .elementor-widget-icm_articles_header .icm-articles-head,
html body .icm-articles-head {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

html body .icm-articles-head__row {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Desktop reference: search LEFT, title/copy RIGHT. */
@media (min-width: 769px) {
  html body .icm-articles-head__row {
    direction: ltr !important;
    display: grid !important;
    grid-template-columns: 290px minmax(0, 1fr) !important;
    grid-template-areas: "search copy" !important;
    align-items: end !important;
    gap: 28px !important;
  }

  html body .icm-articles-head__row > * {
    direction: rtl !important;
  }

  html body .icm-articles-head__copy {
    grid-area: copy !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    text-align: right !important;
  }

  html body .icm-articles-head__copy .icm-intro,
  html body .icm-articles-head__copy p {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html body .icm-search.icm-search--archive {
    grid-area: search !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  html body .icm-articles-head__row {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "search" !important;
    gap: 14px !important;
  }

  html body .icm-search.icm-search--archive {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

html body .icm-articles-seo-intro {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  box-sizing: border-box !important;
  text-align: right !important;
}

html body .icm-articles-seo-intro .icm-articles-seo-title,
html body .icm-articles-seo-intro .icm-articles-seo-text,
html body .icm-articles-seo-intro h2,
html body .icm-articles-seo-intro p {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

html body .icm-articles-head .icm-category-tabs {
  width: 100% !important;
  margin-inline: 0 !important;
  justify-content: flex-start !important;
}

html body .icm-articles-head .icm-breadcrumb {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  width: 100% !important;
  margin-inline: 0 !important;
  box-sizing: border-box !important;
}

html body .icm-breadcrumb__home {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: inherit !important;
  text-decoration: none !important;
}

html body .icm-breadcrumb__home-icon {
  display: block !important;
  flex: 0 0 auto !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  background: none !important;
  border-radius: 0 !important;
  color: var(--icm-gold, #8C845E) !important;
}

html body .icm-breadcrumb__sep {
  opacity: 0.72 !important;
}
