/* Страница «О нас» — по макету Figma «Сайт Жемчужина».
   Использует переменные из styles_1.css. */

:root {
  --about-green-soft: #cadfb1;
  --about-green-band: #c7ddad;
  --about-grey: #d6d6d6;
  --about-photo: #d9d9d9;
}

/* Тонкий декоративный разделитель (миссия, «О названии»). */
.about-divider {
  display: block;
  width: min(680px, 100%);
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-accent-gold) 20%,
    var(--color-accent-gold) 80%,
    transparent
  );
}

/* ---------- Hero (полноширинный, текст поверх фото) ----------
   Строится по образцу .method-hero (styles_1.css): фото на всю ширину
   + оверлей .container с текстом. */
.about-hero {
  position: relative;
}

.about-hero__media {
  width: 100%;
  max-height: 460px;
  overflow: hidden;
}

.about-hero__media img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(24, 24, 22, 0.55) 0%,
    rgba(24, 24, 22, 0.22) 45%,
    rgba(24, 24, 22, 0.32) 100%
  );
}

.about-hero__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 64px;
  padding-bottom: 48px;
  color: #fbf9f6;
}

.about-hero__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  margin: 0;
  max-width: 560px;
}

.about-hero__intro {
  margin-left: auto;
  max-width: 440px;
  font-size: 16px;
  line-height: 1.6;
}

.about-hero__intro p {
  margin: 0 0 16px;
}

.about-hero__intro p:last-child {
  margin-bottom: 0;
}

/* ---------- Миссия ---------- */
.about-mission {
  text-align: center;
}

.about-mission__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  margin: 48px 0 32px;
}

.about-mission__text {
  max-width: 680px;
  margin: 0 auto 48px;
}

.about-mission__text p {
  margin: 0 0 16px;
}

/* ---------- Пространство / Подход / Профессионализм ---------- */
.about-space__grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 24px;
  align-items: start;
}

.about-space__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Подход — фото + голубая карточка */
.about-approach {
  position: relative;
}

.about-approach__media {
  position: relative;
  z-index: 2;
  width: 92%;
  margin-left: auto;
}

.about-approach__media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 24px;
}

.about-approach__card {
  position: relative;
  z-index: 3;
  margin-top: -48px;
  background: var(--color-accent-blue);
  border-radius: 28px;
  padding: 72px 36px 40px;
}

.about-approach__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 20px;
}

.about-approach__card p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.about-approach__btn {
  display: inline-block;
  margin-top: 8px;
}

/* Пространство — зелёная карточка */
.about-env {
  background: var(--about-green-soft);
  border-radius: 28px;
  padding: 36px;
}

.about-env__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 20px;
}

.about-env__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.about-env__lead {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.about-env__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-env__thumbs img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
}

.about-env__wide {
  width: 100%;
  height: 168px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

.about-env__caption {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
}

.about-env__caption:last-child {
  margin-bottom: 0;
}

/* Профессионализм — карточка с золотой обводкой */
.about-prof {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-accent-gold);
  border-radius: 28px;
  padding: 32px 36px;
}

.about-prof__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 16px;
}

.about-prof__text p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
}

.about-prof__text p:last-child {
  margin-bottom: 0;
}

.about-prof__text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-prof__text a:hover {
  opacity: 0.75;
}

.about-prof__logo a {
  display: block;
}

.about-prof__logo img {
  width: 150px;
  height: auto;
}

/* ---------- Ценности ---------- */
.about-values__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 64px;
}

.about-values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.about-values__item {
  position: relative;
  padding-top: 56px;
  text-align: center;
}

.about-values__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 130px;
  background: radial-gradient(
    ellipse at center,
    rgba(177, 212, 154, 0.4) 0%,
    rgba(177, 212, 154, 0) 68%
  );
  z-index: 0;
}

.about-values__item + .about-values__item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -36px;
  transform: translateY(-50%);
  width: 40px;
  height: 1px;
  background: var(--color-accent-green);
}

.about-values__item-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.about-values__item-text {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* ---------- История (зелёная полоса на всю ширину) ---------- */
.about-history {
  background: var(--about-green-band);
}

.about-history__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  text-align: center;
  margin: 0 0 48px;
}

.about-history__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.about-history__card {
  background: var(--color-bg-primary);
  border-radius: 55px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.about-history__card img {
  width: 100%;
  height: 158px;
  object-fit: cover;
}

.about-history__card p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  padding: 18px 20px 24px;
}

/* ---------- О названии ---------- */
.about-name {
  padding-bottom: 48px;
}

.about-name__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.about-name__left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-name__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  margin: 0;
}

.about-name__lead {
  font-size: 16px;
  line-height: 1.6;
  max-width: 320px;
  margin: 0;
}

.about-name__meta {
  font-size: 14px;
  line-height: 1.5;
  max-width: 360px;
  margin: 0;
  margin-left: auto;
  text-align: right;
}

.about-name__ornament {
  display: flex;
  align-items: center;
  margin: 56px 0 32px;
}

.about-name__whisker {
  flex: 1 1 0;
  min-width: 0;
}

.about-name__whisker img {
  display: block;
  width: 100%;
  height: 63px;
}

.about-name__pearl {
  flex: 0 0 auto;
  width: 171px;
}

.about-name__pearl img {
  display: block;
  width: 171px;
  height: 106px;
}

.about-name__quote {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Команда: вступление ---------- */
.team-intro {
  padding-top: 0;
  text-align: center;
}

.team-intro__divider {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-accent-green);
}

.team-intro__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0;
}

.team-intro__sub {
  font-size: 16px;
  line-height: 1.6;
  max-width: 460px;
  margin: 32px auto 0;
}

/* ---------- Команда: группы ---------- */
.team-group__head {
  background: var(--about-grey);
}

.team-group__head--photo {
  min-height: 440px;
  background-color: var(--about-grey);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.team-group__head .container {
  padding-top: 48px;
  padding-bottom: 48px;
}

.team-group__head--photo .container {
  display: flex;
  align-items: flex-end; /* чип с названием группы — по нижнему краю фото */
  min-height: 440px;
  padding-top: 48px;
  padding-bottom: 32px;
  box-sizing: border-box;
}

.team-group__pill {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  padding: 10px 30px;
  border-radius: 999px;
  background: var(--color-accent-green);
  margin: 0 0 40px;
}

.team-group__head--photo .team-group__pill {
  margin-bottom: 0;
}

.team-group__pill--blue {
  background: var(--color-accent-blue);
}

.team-group__body {
  padding: 56px 0;
  background: var(--color-bg-primary);
}

.team-group__body--tinted {
  background: var(--color-accent-blue);
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.team-cards:last-child {
  margin-bottom: 0;
}

.team-cards--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.team-cards--one {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
}

/* ---------- Карточка педагога ---------- */
.team-card {
  background: #fdfcfa;
  border: 1px solid var(--color-accent-green);
  border-radius: 28px;
  padding: 32px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.team-group__body--tinted .team-card {
  border-color: transparent;
}

.team-card__name {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  margin: 24px 0 8px;
}

.team-card__role {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  margin: 0 0 4px;
}

.team-card__exp {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.team-card__bio {
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  margin: 0;
}

.team-card__bio p {
  margin: 0 0 10px;
}

.team-card__quote {
  margin: auto 0 0;
  padding-top: 20px;
}

.team-card__quote-mark {
  display: block;
  font-family: var(--font-heading);
  font-size: 56px;
  line-height: 0.6;
  color: var(--color-accent-green);
  text-align: left;
}

.team-card__quote-text {
  font-size: 14px;
  line-height: 1.5;
  font-style: normal;
  margin: 8px 0 0;
}

/* ---------- Flip-фото педагога ----------
   По hover/фокусу/тапу фото «переворачивается» и показывает детское фото. */
.team-card__photo {
  width: 168px;
  height: 168px;
  margin: 0 auto;
  perspective: 700px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Без детского фото — статичный круг, без переворота. */
.team-card__photo--static {
  perspective: none;
  cursor: default;
  border-radius: 50%;
  overflow: hidden;
}

.team-card__photo--static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card__flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

/* Клик/тап (через .is-flipped из team-flip.js) работает на всех устройствах. */
.team-card__photo.is-flipped .team-card__flip {
  transform: rotateY(180deg);
}

/* Наведение — только там, где есть настоящий hover (десктоп с мышью).
   На тач-экранах :hover «залипает» и мешал перевороту по клику. */
@media (hover: hover) {
  .team-card__photo:hover .team-card__flip,
  .team-card__photo:focus-visible .team-card__flip {
    transform: rotateY(180deg);
  }
}

.team-card__side {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
}

.team-card__side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__side--back {
  transform: rotateY(180deg);
}

.team-card__side--back:not(.team-card__side--placeholder) img {
  filter: grayscale(100%);
}

.team-card__side--back.team-card__side--placeholder::after {
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .team-card__flip {
    transition: none;
  }
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .about-space__grid {
    grid-template-columns: 1fr;
  }

  /* min-width:0 не даёт содержимому колонок «распирать» грид шире контейнера. */
  .about-space__col {
    min-width: 0;
  }

  /* «Подход»: фото по центру, голубая карточка выше налезает на фото. */
  .about-approach__media,
  .about-approach__card {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .about-approach__media img {
    max-width: 100%;
  }

  .about-approach__card {
    margin-top: -72px;
  }

  .about-values__grid,
  .about-history__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-values__item + .about-values__item::after {
    display: none;
  }

  .team-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-hero__title {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  .about-hero__media img {
    height: 480px;
  }

  .about-hero__inner {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .about-hero__title,
  .team-intro__title,
  .about-approach__title,
  .about-env__title,
  .about-prof__title {
    font-size: 25px;
  }

  .about-hero__title {
    max-width: 100%;
  }

  .about-hero__intro {
    max-width: 100%;
    margin-left: 0;
    font-size: 14px;
  }

  .about-env__grid,
  .about-prof,
  .about-name__header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .about-name__header {
    gap: 16px;
  }

  .about-name__meta {
    margin-left: 0;
    text-align: left;
    max-width: none;
  }

  .team-intro__title {
    padding: 32px 0;
  }

  .about-prof__logo {
    justify-self: center;
  }

  .about-values__grid,
  .about-history__grid,
  .team-cards,
  .team-cards--two {
    grid-template-columns: 1fr;
  }

  .about-name__ornament {
    justify-content: center;
    margin: 40px 0 24px;
  }

  .about-name__whisker {
    display: none;
  }

  .about-name__pearl {
    width: 120px;
  }

  .about-name__pearl img {
    width: 120px;
    height: auto;
  }
}
