{% scope_css %}
.omega-grid-container {
  display: grid;
}

.grid-item-wrapper {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.omega-icon-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.icon-container {
  margin-bottom: 16px;
}

.icon-container svg,
.icon-container i {
  width: 40px;
  height: 40px;
  font-size: 40px;
}

.icon-container img:not([width]) {
  max-width: 80px;
  height: auto;
}

.icon-container img[width] {
  max-width: 100%;
}

/* Horizontal — icon left, text right */
.mod__horizontal {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.mod__horizontal .icon-container {
  flex-shrink: 0;
  margin-bottom: 0;
}

.mod__horizontal .text-container {
  flex: 1;
}

/* Image Fill — card retains all styling; icon-container fills padded area */
.mod__image_fill .icon-container {
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
}

.text-container > *:last-child {
  margin-bottom: 0;
}

/* Rich Text Table Formatting */
.text-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.text-container th {
  background: #F8ECEC;
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #e1e1e1;
}

.text-container td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

/* Responsive Stacking */
@media (max-width: 767px) {
  .omega-grid-container {
    grid-template-columns: 1fr !important;
  }
  .grid-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .mod__image_fill .icon-container {
    min-height: var(--img-min-h, 250px);
  }
}
{% end_scope_css %}
