/* Общий блок программ и портрет автора на страницах программ. */
#programmy {
  width: 100%;
  background: #702d41;
  color: #f7f4f2;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

#programmy .programmy__header {
  max-width: 860px;
  margin: 0 auto 32px;
  text-align: center;
}

#programmy h2 {
  color: #f7f4f2;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.15;
}

#programmy .programmy__intro {
  margin: 0 0 16px;
  font-size: .95rem;
  line-height: 1.6;
}

#programmy .programmy__subtitle {
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

#programmy .programmy__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

#programmy .programmy__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 32px;
  border-radius: var(--radius-md);
  background: #f7f4f2;
  color: #1c2430;
  box-shadow: var(--shadow-sm);
}

#programmy .programmy__age {
  margin: 0 0 12px;
  color: #702d41;
  font-size: .95rem;
  font-weight: 600;
}

#programmy h3 {
  margin: 0 0 16px;
  color: #1c2430;
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#programmy .programmy__description {
  margin: 0 0 24px;
  line-height: 1.7;
}

#programmy .programmy__button {
  max-width: 100%;
  margin-top: auto;
  background: #f7f4f2;
  color: #702d41;
  border-color: #702d41;
  white-space: normal;
  box-shadow: var(--shadow-sm);
}

#programmy .programmy__button:hover {
  background: #fff;
  color: #702d41;
  transform: translateY(-2px);
}

#programmy .programmy__button:focus-visible {
  outline: 3px solid #702d41;
  outline-offset: 4px;
}

#programmy .programmy__materials {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

#programmy .programmy__collage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

#programmy .programmy__image {
  display: flex;
  align-items: center;
  min-width: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #f7f4f2;
}

#programmy .programmy__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Верхняя служебная полоса урока остаётся за пределами коллажа. */
#programmy .programmy__math {
  width: 100%;
  aspect-ratio: 64 / 31;
  overflow: hidden;
}

#programmy .programmy__math img {
  height: auto;
  transform: translateY(-13.889%);
}

#programmy .programmy__author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  text-align: center;
}

#programmy .programmy__portrait {
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  border: 1px solid #f7f4f2;
  border-radius: 50%;
  object-fit: cover;
}

#programmy .programmy__author figcaption {
  color: #f7f4f2;
  font-size: .9rem;
  line-height: 1.6;
}

#programmy .programmy__author strong,
#programmy .programmy__author span {
  display: block;
}

#programmy .programmy__author span {
  font-size: .8rem;
}

#author .programmy-author-copy {
  display: flow-root;
  max-width: 820px;
  margin: 0 auto;
}

#author .programmy-author-copy p {
  line-height: 1.8;
}

#author .programmy-author-portrait {
  float: left;
  width: 120px;
  height: 120px;
  margin: 0 24px 12px 0;
  border: 1px solid #f7f4f2;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 960px) {
  #programmy .programmy__materials {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #programmy {
    border-radius: var(--radius-md);
  }

  #programmy .programmy__cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #programmy .programmy__card {
    padding: 24px;
  }

  #programmy .programmy__button {
    width: 100%;
  }

  #programmy .programmy__collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #author .programmy-author-portrait {
    margin-right: 18px;
  }
}

/* Static texture and watermark for the programs block. */
#programmy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #702d41;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.028) 0 1px, transparent 1px 7px),
    radial-gradient(120% 90% at 18% 12%, #80364c 0%, #702d41 45%, #5e2335 100%);
}

#programmy::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -75px;
  width: 490px;
  aspect-ratio: 1;
  background: url("./favicon/favicon.svg") center / contain no-repeat;
  opacity: .07;
  pointer-events: none;
}

@media (max-width: 760px) {
  #programmy::after {
    display: none;
  }
}
section#programmy{width:calc(100% - 55px);max-width:1320px;margin-inline:auto;box-sizing:border-box;background:radial-gradient(ellipse at 2% 0%,#6c3048a6 0,transparent 52%),radial-gradient(ellipse at 100% 90%,#30486690 0,transparent 55%),#17283d!important}section#programmy>.container{width:100%;max-width:1200px;padding-inline:28px;box-sizing:border-box}@media(max-width:760px){section#programmy{width:calc(100% - 24px)}section#programmy>.container{padding-inline:18px}}

@media(min-width:851px){#programmy .programmy__cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
