/**
 * Academy — «راهنماها و آموزش‌های پرطرفدار» (attachment lock).
 * Scoped ONLY to guides widget/section. Loaded last on academy pages.
 */

html body .icm-section--guides,
html body .elementor-widget-icm_academy_guides {
  --icm-guide-gap: 8px;
}

html body .icm-section--guides {
  background: #fff;
  padding-top: 8px;
  padding-bottom: 14px;
}

html body .icm-section--guides .icm-section-title,
html body .elementor-widget-icm_academy_guides .icm-section-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  margin-bottom: 10px !important;
}

html body .icm-section--guides .icm-section-title__text,
html body .icm-section--guides .icm-section-title h2,
html body .elementor-widget-icm_academy_guides .icm-section-title__text,
html body .elementor-widget-icm_academy_guides .icm-section-title h2 {
  margin: 0 !important;
  color: #0d2f4d !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
  font-weight: 700 !important;
}

html body .icm-section--guides .icm-section-title a,
html body .elementor-widget-icm_academy_guides .icm-section-title a {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  color: #8a97a3 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

html body .icm-section--guides .icm-guide-slider,
html body .elementor-widget-icm_academy_guides .icm-guide-slider {
  position: relative !important;
  overflow: visible !important;
  min-width: 0 !important;
}

/* Desktop: 8 equal cards in one row (attachment). */
@media (min-width: 1025px) {
  html body .icm-section--guides .icm-guide-row,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"],
  html body .elementor-widget-icm_academy_guides .icm-guide-row,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] {
    --icm-guide-columns: 8 !important;
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: var(--icm-guide-gap, 8px) !important;
    width: 100% !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    padding: 0 !important;
  }

  html body .icm-section--guides .icm-guide-row > .icm-guide-card,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card {
    flex: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

html body .icm-section--guides .icm-guide-card,
html body .elementor-widget-icm_academy_guides .icm-guide-card {
  height: 105px !important;
  min-height: 105px !important;
  max-height: 105px !important;
  padding: 8px 5px !important;
  border: 1px solid #e1e7ec !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  color: #173a58 !important;
  text-decoration: none !important;
}

html body .icm-section--guides .icm-guide-card:hover,
html body .elementor-widget-icm_academy_guides .icm-guide-card:hover {
  transform: none !important;
  border-color: #e1e7ec !important;
  box-shadow: none !important;
}

html body .icm-section--guides .icm-guide-card__icon,
html body .elementor-widget-icm_academy_guides .icm-guide-card__icon {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 auto 5px !important;
  overflow: visible !important;
}

html body .icm-section--guides .icm-guide-card__icon img,
html body .icm-section--guides .icm-guide-card__icon svg,
html body .elementor-widget-icm_academy_guides .icm-guide-card__icon img,
html body .elementor-widget-icm_academy_guides .icm-guide-card__icon svg {
  display: block !important;
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  object-fit: contain !important;
  mix-blend-mode: normal !important;
  margin: 0 !important;
}

html body .icm-section--guides .icm-guide-card__title,
html body .icm-section--guides .icm-guide-card strong,
html body .elementor-widget-icm_academy_guides .icm-guide-card__title,
html body .elementor-widget-icm_academy_guides .icm-guide-card strong {
  display: block !important;
  margin: 0 !important;
  color: #173a58 !important;
  font-size: 8.4px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
  white-space: normal !important;
}

html body .icm-section--guides .icm-guide-card__subtitle,
html body .icm-section--guides .icm-guide-card small,
html body .elementor-widget-icm_academy_guides .icm-guide-card__subtitle,
html body .elementor-widget-icm_academy_guides .icm-guide-card small {
  display: none !important;
}

html body .icm-section--guides .icm-guide-nav,
html body .elementor-widget-icm_academy_guides .icm-guide-nav {
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  border: 1px solid #d9e1e7 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #0b3153 !important;
  box-shadow: 0 4px 12px rgba(13, 71, 120, 0.08) !important;
}

html body .icm-section--guides .icm-guide-slider--nav-outside .icm-guide-nav--right,
html body .elementor-widget-icm_academy_guides .icm-guide-slider--nav-outside .icm-guide-nav--right {
  right: 12px !important;
  left: auto !important;
}

html body .icm-section--guides .icm-guide-slider--nav-outside .icm-guide-nav--left,
html body .elementor-widget-icm_academy_guides .icm-guide-slider--nav-outside .icm-guide-nav--left {
  left: 12px !important;
  right: auto !important;
}

@media (max-width: 1024px) {
  html body .icm-section--guides .icm-guide-row,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"],
  html body .elementor-widget-icm_academy_guides .icm-guide-row,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] {
    --icm-guide-columns: 4 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: var(--icm-guide-gap, 8px) !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
  }

  html body .icm-section--guides .icm-guide-row > .icm-guide-card,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card {
    flex: 0 0 calc((100% - (var(--icm-guide-columns, 4) - 1) * var(--icm-guide-gap, 8px)) / var(--icm-guide-columns, 4)) !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (max-width: 767px) {
  html body .icm-section--guides .icm-guide-row,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"],
  html body .elementor-widget-icm_academy_guides .icm-guide-row,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] {
    --icm-guide-columns: 2 !important;
  }

  html body .icm-section--guides .icm-guide-row > .icm-guide-card,
  html body .icm-section--guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row > .icm-guide-card,
  html body .elementor-widget-icm_academy_guides .icm-guide-row[id^="icm-guide-rail-"] > .icm-guide-card {
    flex: 0 0 calc((100% - (var(--icm-guide-columns, 2) - 1) * var(--icm-guide-gap, 8px)) / var(--icm-guide-columns, 2)) !important;
  }
}
