/**
 * Boston — О фабрике (About Factory).
 * По Figma 1:7454.
 *
 * Breakpoint convention (cascading):
 *   base        = 1920+
 *   max-width: 1919px = 1280 overrides
 *   max-width: 1279px = 768 overrides
 *   max-width: 767px  = 420 overrides
 */

.boston-about {
  overflow-x: hidden;
}

/* ===== Shared ===== */
body.boston-child .boston-about__chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: rgba(58, 5, 15, 0.1);
  color: var(--color-text);
  font-size: var(--fs-lg);
  font-weight: 400;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1;
}

body.boston-child .boston-about__link-ul {
  display: inline-block;
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--color-brand);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-brand);
  line-height: 1.2;
  transition: opacity .2s ease;
}
body.boston-child .boston-about__link-ul:hover { opacity: .7; }

/* ===== Page wrapper ===== */
body.boston-child .boston-about {
  max-width: 1920px;
  margin-inline: auto;
  background: #f4f5f0;
}

/* ===== 1. Intro ===== */
body.boston-child .boston-about__intro {
  display: flex;
  align-items: center;
  gap: 55px;
  padding: 80px 80px 0;
}

body.boston-child .boston-about__intro-text {
  display: flex;
  flex-direction: column;
  gap: 55px;
  width: 560px;
  flex-shrink: 0;
}

body.boston-child .boston-about__intro-title {
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1;
  margin: 0;
}
body.boston-child .boston-about__intro-title strong {
  font-weight: 700;
}

body.boston-child .boston-about__intro-desc {
  font-size: var(--fs-lg);
  line-height: 1.2;
}
body.boston-child .boston-about__intro-desc p {
  margin: 0 0 1.2em;
}
body.boston-child .boston-about__intro-desc p:last-child {
  margin-bottom: 0;
}

body.boston-child .boston-about__intro-photo {
  flex: 1;
  min-width: 0;
  align-self: stretch;
}
body.boston-child .boston-about__intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-pill);
}

/* ===== 2. Stats ===== */
body.boston-child .boston-about__stats {
  display: flex;
  gap: 30px;
  padding: 55px 80px 0;
}

body.boston-child .boston-about__stat-card {
  flex: 1;
  min-width: 0;
  background: var(--color-bg-soft);
  border-radius: var(--radius-pill);
  padding: 50px;
  overflow: hidden;
}

body.boston-child .boston-about__stat-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 30px;
}

body.boston-child .boston-about__stat-text {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0;
}

/* ===== 3. Professionals ===== */
body.boston-child .boston-about__pros {
  padding: 55px 80px 0;
}

body.boston-child .boston-about__pros-head {
  text-align: center;
  margin-bottom: 55px;
}

body.boston-child .boston-about__pros-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 55px;
}

body.boston-child .boston-about__pros-lead {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0;
}

body.boston-child .boston-about__gallery {
  display: flex;
  gap: 35px;
}

body.boston-child .boston-about__gallery-item {
  flex: 1;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

body.boston-child .boston-about__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 4. CTA ===== */
body.boston-child .boston-about__cta {
  position: relative;
  margin: 55px 80px 0;
  background: var(--color-bg-soft);
  border-radius: var(--radius-pill);
  padding: 50px;
  overflow: hidden;
  text-align: center;
}

body.boston-child .boston-about__cta-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54%;
  height: auto;
  opacity: 1;
  pointer-events: none;
}

body.boston-child .boston-about__cta-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 55px;
}

body.boston-child .boston-about__cta-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

body.boston-child .boston-about__cta-lead {
  font-size: var(--fs-md);
  line-height: 1.4;
  margin: -25px 0 0;
}

/* ===== 5. Certificates ===== */
body.boston-child .boston-about__certs {
  padding: 55px 80px 0;
  text-align: center;
}

body.boston-child .boston-about__certs-head {
  margin-bottom: 55px;
}

body.boston-child .boston-about__certs-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 55px;
}

body.boston-child .boston-about__certs-lead {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0;
}

body.boston-child .boston-about__certs-grid {
  display: flex;
  gap: 30px;
}

body.boston-child .boston-about__cert-card {
  flex: 1;
  min-width: 0;
  height: 300px;
  position: relative;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

body.boston-child .boston-about__cert-img-wrap {
  width: 100%;
  height: 100%;
}
body.boston-child .boston-about__cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.boston-child .boston-about__cert-label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #f4f5f0;
  border-radius: 38px 38px 0 0;
  padding: 14px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--fs-lg);
  line-height: 1.4;
  white-space: nowrap;
}

/* ===== 6. Video ===== */
body.boston-child .boston-about__video {
  padding: 55px 80px 55px;
}

body.boston-child .boston-about__video-head {
  text-align: center;
  margin-bottom: 55px;
}

body.boston-child .boston-about__video-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 55px;
}

body.boston-child .boston-about__video-lead {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0;
}

body.boston-child .boston-about__video-player {
  position: relative;
  aspect-ratio: 1144 / 644;
  max-width: 1200px;
  margin-inline: auto;
  background: #272727;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.boston-child .boston-about__video-play {
  width: 108px;
  height: 108px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: transform .2s ease;
}
body.boston-child .boston-about__video-play:hover {
  transform: scale(1.1);
}
body.boston-child .boston-about__video-play svg {
  width: 100%;
  height: 100%;
}

/* ===================================================================
   1280
   =================================================================== */
@media (max-width: 1919px) {
  body.boston-child .boston-about__intro {
    gap: 35px;
    padding: 80px 40px 0;
  }
  body.boston-child .boston-about__intro-text {
    width: 389px;
    gap: 35px;
  }
  body.boston-child .boston-about__intro-photo img {
    border-radius: 40px;
  }

  body.boston-child .boston-about__stats {
    gap: 20px;
    padding: 35px 40px 0;
  }
  body.boston-child .boston-about__stat-card {
    border-radius: 40px;
    padding: 40px;
  }
  body.boston-child .boston-about__stat-title { margin-bottom: 20px; }

  body.boston-child .boston-about__pros {
    padding: 35px 40px 0;
  }
  body.boston-child .boston-about__pros-head { margin-bottom: 35px; }
  body.boston-child .boston-about__pros-title { margin-bottom: 35px; }
  body.boston-child .boston-about__gallery {
    gap: 20px;
  }
  body.boston-child .boston-about__gallery-item {
    border-radius: 40px;
  }

  body.boston-child .boston-about__cta {
    margin: 35px 40px 0;
    border-radius: 40px;
  }
  body.boston-child .boston-about__cta-inner { gap: 55px; }

  body.boston-child .boston-about__certs {
    padding: 35px 40px 0;
  }
  body.boston-child .boston-about__certs-head { margin-bottom: 35px; }
  body.boston-child .boston-about__certs-title { margin-bottom: 35px; }
  body.boston-child .boston-about__cert-card {
    border-radius: 40px;
  }

  body.boston-child .boston-about__video {
    padding: 35px 40px 35px;
  }
  body.boston-child .boston-about__video-head { margin-bottom: 35px; }
  body.boston-child .boston-about__video-title { margin-bottom: 35px; }
  body.boston-child .boston-about__video-player {
    border-radius: 40px;
  }
}

/* ===================================================================
   768
   =================================================================== */
@media (max-width: 1279px) {
  body.boston-child .boston-about__chip {
    font-size: var(--fs-sm);
    padding: 8px 18px;
  }

  body.boston-child .boston-about__intro {
    gap: 20px;
    padding: 30px 20px 0;
  }
  body.boston-child .boston-about__intro-text {
    width: 270px;
    gap: 35px;
  }
  body.boston-child .boston-about__intro-photo img {
    border-radius: 30px;
  }

  body.boston-child .boston-about__stats {
    gap: 20px;
    padding: 25px 20px 0;
  }
  body.boston-child .boston-about__stat-card {
    border-radius: 30px;
    padding: 30px;
  }

  body.boston-child .boston-about__pros {
    padding: 25px 20px 0;
  }
  body.boston-child .boston-about__pros-head { margin-bottom: 30px; }
  body.boston-child .boston-about__pros-title { margin-bottom: 35px; }
  body.boston-child .boston-about__gallery {
    gap: 10px;
  }
  body.boston-child .boston-about__gallery-item {
    border-radius: 30px;
  }
  body.boston-child .boston-about__gallery-item:nth-child(5) {
    display: none;
  }

  body.boston-child .boston-about__cta {
    margin: 25px 20px 0;
    padding: 30px;
    border-radius: 30px;
  }

  body.boston-child .boston-about__certs {
    padding: 25px 20px 0;
  }
  body.boston-child .boston-about__certs-head { margin-bottom: 25px; }
  body.boston-child .boston-about__certs-title { margin-bottom: 25px; }
  body.boston-child .boston-about__certs-grid {
    gap: 20px;
  }
  body.boston-child .boston-about__cert-card {
    border-radius: 30px;
  }
  body.boston-child .boston-about__cert-label {
    font-size: var(--fs-sm);
    padding: 10px 30px;
    width: 100%;
    left: 0;
    transform: none;
    border-radius: 0;
  }

  body.boston-child .boston-about__video {
    padding: 25px 20px 25px;
  }
  body.boston-child .boston-about__video-head { margin-bottom: 25px; }
  body.boston-child .boston-about__video-title { margin-bottom: 25px; }
  body.boston-child .boston-about__video-player {
    border-radius: 30px;
  }

  body.boston-child .boston-about__link-ul {
    font-size: var(--fs-base);
  }
}

/* ===================================================================
   420
   =================================================================== */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden;
  }
  body.boston-child .boston-about__chip {
    padding: 6px 14px;
    align-self: center;
  }

  body.boston-child .boston-about__intro {
    flex-direction: column;
    gap: 20px;
    padding: 20px 20px 0;
    text-align: center;
    align-items: center;
  }
  body.boston-child .boston-about__intro-text {
    width: 100%;
    gap: 20px;
    align-items: center;
  }
  body.boston-child .boston-about__intro-photo {
    width: 100%;
    flex: none;
  }
  body.boston-child .boston-about__intro-photo img {
    border-radius: 20px;
    /* height:auto перебивает базовое height:100% — иначе на iOS Safari
       (проценты от indefinite-высоты) фото растягивается вниз. */
    height: auto;
  }

  body.boston-child .boston-about__stats {
    flex-direction: column;
    gap: 15px;
    padding: 20px 20px 0;
  }
  body.boston-child .boston-about__stat-card {
    border-radius: 20px;
    padding: 20px;
  }
  body.boston-child .boston-about__stat-title { margin-bottom: 15px; }

  body.boston-child .boston-about__pros {
    padding: 25px 20px 0;
  }
  body.boston-child .boston-about__pros-head { margin-bottom: 25px; }
  body.boston-child .boston-about__pros-title { margin-bottom: 25px; }
  body.boston-child .boston-about__gallery {
    gap: 10px;
  }
  body.boston-child .boston-about__gallery-item {
    border-radius: 20px;
  }
  body.boston-child .boston-about__gallery-item:nth-child(4),
  body.boston-child .boston-about__gallery-item:nth-child(5) {
    display: none;
  }

  body.boston-child .boston-about__cta {
    margin: 20px 20px 0;
    padding: 20px;
    border-radius: 20px;
  }
  body.boston-child .boston-about__cta-bg {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
  }
  body.boston-child .boston-about__cta-inner { gap: 25px; }
  body.boston-child .boston-about__cta-lead { margin-top: 0; }

  body.boston-child .boston-about__certs {
    padding: 25px 20px 0;
  }
  body.boston-child .boston-about__certs-grid {
    flex-direction: column;
    gap: 10px;
  }
  body.boston-child .boston-about__cert-card {
    flex: none;
    height: 285px;
    border-radius: 20px;
    cursor: pointer;
  }
  body.boston-child .boston-about__cert-img-wrap img {
    object-position: top;
  }
  body.boston-child .boston-about__cert-label {
    padding: 8px 40px;
  }

  body.boston-child .boston-about__video {
    padding: 20px 20px 20px;
  }
  body.boston-child .boston-about__video-head { margin-bottom: 20px; }
  body.boston-child .boston-about__video-title { margin-bottom: 20px; }
  body.boston-child .boston-about__video-player {
    border-radius: 30px;
  }
}

/* ===== Certificate lightbox ===== */
.boston-about__cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.boston-about__cert-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.boston-about__cert-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
