/* type `numbered-rows` — include/internet-advertising-sections/numbered-rows.php */

.iad-nrows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iad-nrows__item {
  /* Same columns as .iad-grid--aside: the text starts on the common right-column line of the ad pages */
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 573fr) minmax(0, 1187fr);
  column-gap: 40px;
  padding: 30px 0 60px;
  border-top: 1px solid var(--outher-light-gray);
}

.iad-nrows__item:first-child {
  padding-top: 0;
  border-top: 0;
}

.iad-nrows__item:last-child {
  padding-bottom: 0;
}

.iad-sec--dark .iad-nrows__item {
  border-top-color: var(--outher-dark-gray);
}

.iad-nrows__num {
  position: absolute;
  left: 0;
  color: var(--txt-gray);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.iad-nrows__title {
  margin: 0;
  padding-left: 60px;
}

.iad-nrows__text {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

/* Same right column as .iad-nrows__text */
.iad-nrows__after {
  margin: 80px 0 0 calc((100% - 40px) * 573 / 1760 + 40px);
}

/* .iad-grid--aside switches to 1fr 2fr here (landing.css) */
@media screen and (max-width: 1240px) {
  .iad-nrows__item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .iad-nrows__after {
    margin-left: calc((100% - 40px) / 3 + 40px);
  }
}

@media screen and (max-width: 1024px) {
  .iad-nrows__item {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 16px 0;
  }

  .iad-nrows__num {
    position: static;
  }

  .iad-nrows__title {
    padding-left: 0;
  }

  .iad-nrows__text {
    grid-column: 2;
  }

  .iad-nrows__after {
    width: auto;
    margin-left: 0;
  }
}

@media screen and (max-width: 640px) {
  .iad-nrows__item,
  .iad-nrows__item:first-child {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 40px 0;
    border-top: 1px solid var(--outher-light-gray);
  }

  .iad-sec--dark .iad-nrows__item:first-child {
    border-top-color: var(--outher-dark-gray);
  }

  .iad-nrows__item:last-child {
    padding-bottom: 0;
  }

  .iad-nrows__num {
    display: none;
  }

  .iad-nrows__title {
    padding-right: 0;
  }

  .iad-nrows__text {
    grid-column: auto;
    font-size: 18px;
  }

  .iad-nrows__after {
    margin-top: 40px;
  }
}
