/* HNG Services Grid styles (v1.7.0) */
/* Grid */
.hng-sg-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 32px;
}

/* Item layout: 2-column grid (icon | content). */
.hng-sg-item{
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-rows: auto;
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
  text-align: left;
}
.hng-sg-icon{
  grid-column: 1;
  grid-row: 1;
  line-height: 0;
}
.hng-sg-icon img{
  width: 48px;
  height: auto;
  display: block;
}

/* Body: allow children to place on parent grid */
.hng-sg-body{ display: contents; }

/* Title row sits in column 2 (to the right of icon) */
.hng-sg-title-row{
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  position: relative;
}

/* Red underline under title + arrow on hover */
.hng-sg-title-row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #e31937;
  transition: width 0.3s ease;
}
.hng-sg-item:hover .hng-sg-title-row::after { width: 100%; }

.hng-sg-title{
  margin: 0;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hng-sg-title a{ text-decoration: none; }

/* Arrow normal/hover swap */
.hng-arrow{
  position: relative;
  display: inline-flex;
  width: 1.25em;
  height: 1.25em;
}
.hng-arrow .arrow-normal,
.hng-arrow .arrow-hover{
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s ease, transform .2s ease;
}
.hng-arrow .arrow-hover{ opacity: 0; transform: translateX(-2px); }
.hng-sg-item:hover .hng-arrow .arrow-normal{ opacity: 0; transform: translateX(2px); }
.hng-sg-item:hover .hng-arrow .arrow-hover{ opacity: 1; transform: translateX(0); }

/* Description: start at icon's left edge and span full width */
.hng-sg-desc{
  grid-column: 1 / -1;
  font-size: 14px;
  text-align: justify !important;
  line-height: 1.6;
  padding-left: 0;
}

/* Responsive defaults: 3/2/1 */
@media (max-width: 1024px){
  .hng-sg-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .hng-sg-grid{ grid-template-columns: repeat(1, minmax(0,1fr)); }
}
