:root {
  --accent-color: rgb(91, 41, 147);
  /* --accent-button-background: #404bbf;
    --btn-background: #4d5ae5;
    --hero-font-color: #ffffff; */
  --main-font: "Montserrat", sans-serif;
  --main-font-color: rgb(64, 61, 68);
  --white-text-color: rgb(255, 255, 255);
  --transition: 200ms cubic-bezier(0.12, 0.54, 0.97, 0.43);
}

/* main */

.our-mission-wrapper {
  display: flex;
  gap: 16px;
}
.section-mission-wrapper {
  display: flex;
  gap: 64px;
  margin-bottom: 48px;
}

.mission-title {
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.00098em;
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 8px;
  width: 100%;
}

.mission-title::after {
  display: block;
  content: "";
  border: 1px solid rgba(64, 61, 68, 0.2);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 16px;
}

.organization-text {
  text-align: center;
  margin-bottom: 8px;
}

.narrow-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 96px;
}

.age-groups-title {
  text-align: center;
}

.regular-block-text.organization-text {
  padding: 0 24px;
}

.age-groups-item {
  flex: 1 1 80px;
}

/* projects */

.age-groups-container {
  padding: 0 16px;
  background-color: #f2f2f2;
  border-radius: 10px;
}

.age-groups {
  width: 100%;
  display: flex;
  justify-content: space-around;
  gap: 16px;
}

.additional-text-link {
  color: inherit;
  text-decoration: underline;
}

@media screen and (max-width: 1279px) {
  .narrow-container {
    margin-bottom: 16px;
  }

  .section-mission-wrapper {
    gap: 16px;
    margin-bottom: 16px;
  }

  .visible-category-age-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .visible-category-age-group-img {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
  }

  .visible-category-age-group-img > .visible-category-age-group-picture {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    background-position: center;
  }

  .hidden-category-text {
    display: none;
  }

  .visible-category-text {
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
  }
}

@media screen and (min-width: 1280px) {
  .mission-wrapper {
    display: flex;
    flex-direction: column;
  }

  .mission-title {
    font-size: 40px;
    margin-bottom: 0;
  }

  .mission-title::after {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .our-mission-text .regular-block-text {
    margin-bottom: 16px;
  }

  .our-mission-section .regular-block-img-wrapper {
    aspect-ratio: 1.29;
  }

  .our-mission-section .regular-block-img-wrapper.our-mission-img {
    aspect-ratio: 0.97;
  }

  .our-mission-img > .regular-block-points-img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    background-position: center;
  }

  .narrow-container {
    gap: 40px;
  }

  .age-groups-title {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: 0.000098em;
    color: var(--accent-color);
  }

  .organization-text {
    font-size: 24px;
    line-height: 1.5;
    text-align: center;
  }

  .age-groups {
    width: 1246px;
    height: 460px;
    max-width: none;
    display: flex;
    gap: 40px;
    margin-left: auto;
    margin-right: auto;
  }

  .age-groups-item {
    position: relative;
  }

  .age-group-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 7px;
    transform-origin: top left;
    transition: all var(--transition);
  }

  .age-group-wrapper:hover {
    z-index: 1;
  }

  .visible-category-age-group {
    position: relative;
    display: block;
    width: 272px;
    /* height: 570px; */
    border-radius: 7px;
    transition: all var(--transition);
  }

  .age-group-wrapper:hover .visible-category-age-group {
    width: 340px;
  }

  .visible-category-age-group > .visible-category-age-group-img {
    width: 100%;
  }

  .visible-category-age-group-img {
    /* width: 272px; */
    /* height: 483px; */
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: auto;
  }

  .visible-category-age-group-img > .visible-category-age-group-picture {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    background-position: center;
  }

  .overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    background-color: white;
    opacity: 0.5;
  }

  .visible-category-text {
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2;
    width: 100%;
    position: absolute;
    bottom: 0;
    z-index: 2;
    padding-bottom: 22px;
    height: 70px;
    text-align: center;
    opacity: 1;
    transition: all var(--transition);
  }

  .hidden-category-age-group {
    position: absolute;
    top: 0;

    width: 345px;
    border-radius: 7px;
  }

  .age-group-wrapper:hover .overlay {
    opacity: 0;
    transition: opacity var(--transition);
  }

  .age-group-wrapper:hover .visible-category-text {
    opacity: 0;
  }

  .hidden-category-text {
    position: absolute;
    bottom: 0;
    padding-top: 19px;
    padding-bottom: 36px;
    width: 100%;
    height: 120px;
    background-color: rgba(91, 41, 147, 0.8);
    opacity: 0;
    transition: opacity var(--transition);
  }

  .age-group-wrapper:hover .hidden-category-text {
    opacity: 1;
    transition: opacity var(--transition);
  }

  .hidden-category-age-group-name {
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: rgb(213, 201, 90);
    text-align: center;
  }

  .hidden-category-age-group-age {
    font-size: 20px;
    line-height: 1.2;
    color: rgb(213, 201, 90);
    text-align: center;
  }

  .age-groups-container {
    padding: 0;
    background: none;
  }
}
