.modules-section {
  position: relative;
  min-height: 0;
  padding: clamp(64px, 7vw, 84px) 0;
  background-image:
    linear-gradient(
      270deg,
      rgba(7, 17, 13, 0.98) 0%,
      rgba(7, 17, 13, 0.9) 38%,
      rgba(7, 17, 13, 0.45) 70%,
      rgba(7, 17, 13, 0.15) 100%
    ),
    url("../img/music-pavel-danilyuk.jpg");
  background-size: cover;
  background-position: center left;
  background-repeat: no-repeat;
  overflow: hidden;
}

.modules-section .shell {
  display: grid;
  justify-items: end;
}

.modules-intro {
  max-width: 760px;
  margin: 0 0 28px auto;
  text-align: left;
}

.modules-intro .eyebrow {
  margin-inline: 0;
}

.modules-intro h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.modules-intro p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted-strong);
  font-size: 1rem;
}

.module-grid {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.module-card {
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(7, 17, 13, 0.76), rgba(7, 17, 13, 0.5));
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.module-card h3 {
  margin-top: 14px;
  font-size: 1.18rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.module-card p {
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 0.94rem;
  line-height: 1.5;
}

.network-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border-block: 1px solid rgba(255,255,255,0.06);
}

.network-intro {
  max-width: 860px;
  margin: 0 auto 52px;
  text-align: center;
}

.network-intro h2 {
  margin-top: 14px;
  font-size: clamp(2.1rem, 4.5vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.network-intro p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 1.04rem;
}

.network-steps {
  display: grid;
  gap: 56px;
}

.network-step {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.network-step.reverse {
  grid-template-columns: minmax(340px, 1.08fr) minmax(0, 0.92fr);
}

.network-step.reverse .network-copy {
  order: 2;
}

.network-step.reverse .network-image-wrap {
  order: 1;
}

.network-copy {
  max-width: 620px;
}

.network-copy h3 {
  margin-top: 16px;
  font-size: clamp(1.85rem, 3.3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.network-copy p {
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 1.04rem;
}

.network-image-wrap {
  position: relative;
  height: clamp(320px, 34vw, 440px);
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow);
}

.network-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(7,17,13,0.28));
  pointer-events: none;
}

.network-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.network-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(7,17,13,0.72);
  color: var(--muted-strong);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

@media (max-width: 980px) {
  .modules-section {
    background-position: 35% center;
  }

  .modules-section .shell {
    justify-items: stretch;
  }

  .modules-intro {
    max-width: 820px;
    margin-inline: 0;
  }

  .module-grid {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .network-step,
  .network-step.reverse {
    grid-template-columns: 1fr;
  }

  .network-step.reverse .network-copy,
  .network-step.reverse .network-image-wrap {
    order: initial;
  }

  .network-step.reverse .network-image-wrap {
    order: -1;
  }

  .network-image-wrap {
    height: clamp(280px, 72vw, 360px);
  }
}

@media (max-width: 680px) {
  .modules-section {
    background-image:
      linear-gradient(
        180deg,
        rgba(7, 17, 13, 0.96) 0%,
        rgba(7, 17, 13, 0.84) 48%,
        rgba(7, 17, 13, 0.62) 100%
      ),
      url("../img/music-pavel-danilyuk.jpg");
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}
