.ax-title3 {
  color: var(--primary);
  margin-bottom: 20px;
}

.grey-bg {
  background: #333333;
  color: white;
}
.grey-bg .ax-title3 {
  color: white;
}
.grey-bg .text-content p {
  color: white !important;
}

.blue-bg {
  background: var(--back-cms);
}

@media screen and (max-width: 1120px) {
  .ax-title3 {
    margin-top: 20px;
  }
}

.btn-gradient-second {
  margin: var(--padding-container) auto 0 auto;
}
@media screen and (max-width: 1120px) {
  .btn-gradient-second {
    margin: var(--padding-container) auto 0 auto;
  }
}

.ax-gallery-container {
  height: auto;
  padding: 0;
  display: flex;
  border-radius: 100px 0;
  align-items: stretch;
  flex-direction: row;
}
.ax-gallery-container.content-right, .ax-gallery-container.content-left {
  flex-direction: column;
  gap: 20px;
}
.ax-gallery-container.content-right .ax-gallery-content, .ax-gallery-container.content-left .ax-gallery-content {
  padding: 0 var(--padding-container);
}
@media screen and (min-width: 1120px) {
  .ax-gallery-container.content-right .ax-gallery-content, .ax-gallery-container.content-left .ax-gallery-content {
    width: 70%;
    margin: auto;
  }
  .ax-gallery-container.content-right .ax-gallery-content .ax-title3, .ax-gallery-container.content-left .ax-gallery-content .ax-title3 {
    max-width: 800px;
    margin-bottom: 20px;
    text-wrap: balance;
  }
  .ax-gallery-container.content-right .ax-gallery-content .text-content, .ax-gallery-container.content-left .ax-gallery-content .text-content {
    margin: 0 0 20px 0;
    max-width: 800px;
  }
}
@media screen and (min-width: 1120px) {
  .ax-gallery-container.content-left {
    flex-direction: row-reverse;
  }
  .ax-gallery-container.content-left .ax-gallery-content {
    padding-left: 75px;
  }
  .ax-gallery-container.content-left .ax-title3 {
    padding: 0;
  }
  .ax-gallery-container.content-left .text-content {
    padding: 0 var(--padding-container) 0 0;
  }
}
@media screen and (min-width: 1120px) {
  .ax-gallery-container.content-right {
    flex-direction: row;
  }
  .ax-gallery-container.content-right .ax-title3 {
    padding: 0;
  }
  .ax-gallery-container.content-right .text-content {
    padding: 0 var(--padding-container) 0 0;
  }
}
@media screen and (min-width: 1120px) {
  .ax-gallery-container .ax-gallery-content .text-content {
    column-count: var(--numberColumns);
  }
}
.ax-gallery-container .btn-gradient-second {
  margin: 30px var(--padding-container) 0 0;
}
@media screen and (max-width: 1120px) {
  .ax-gallery-container .btn-gradient-second {
    margin: 20px var(--padding-container) 0 0;
  }
}
.ax-gallery-container .btn-gallery {
  display: flex;
  gap: 0 20px;
  flex-wrap: wrap;
}
.ax-gallery-container .btn-gallery .btn-block-gallery {
  margin: 0;
}
@media screen and (max-width: 1120px) {
  .ax-gallery-container .btn-gallery .btn-block-gallery {
    margin: var(--padding-container) auto 0 auto;
  }
}

.ax-gallery-medias-container {
  min-height: -webkit-fill-available;
  width: 100%;
  display: grid;
  grid-gap: 10px;
  height: 100%;
  max-height: 80vh;
  padding: 0 var(--padding-container);
}
@media screen and (max-width: 1120px) {
  .ax-gallery-medias-container {
    width: fit-content;
    margin: auto;
    display: grid;
  }
  .ax-gallery-medias-container:has(> :nth-child(1):nth-last-child(2)) {
    grid-template-rows: 50% 50%;
    grid-template-areas: "one" "two";
  }
  .ax-gallery-medias-container:has(> :nth-child(1):nth-last-child(2)) > :nth-child(1) {
    grid-area: one;
  }
  .ax-gallery-medias-container:has(> :nth-child(1):nth-last-child(2)) > :nth-child(2) {
    grid-area: two;
  }
  .ax-gallery-medias-container:has(> :nth-child(3):nth-last-child(1)) {
    grid-template-rows: 40% 20% 40%;
    grid-template-areas: "one" "two" "three";
  }
  .ax-gallery-medias-container:has(> :nth-child(3):nth-last-child(1)) > :nth-child(1) {
    grid-area: one;
  }
  .ax-gallery-medias-container:has(> :nth-child(3):nth-last-child(1)) > :nth-child(2) {
    grid-area: two;
  }
  .ax-gallery-medias-container:has(> :nth-child(3):nth-last-child(1)) > :nth-child(3) {
    grid-area: three;
  }
}
.ax-gallery-medias-container > :first-child {
  border-radius: 100px 0 0;
}
.ax-gallery-medias-container > :last-child {
  border-radius: 0 0 100px;
}
@media screen and (min-width: 1120px) {
  .ax-gallery-medias-container {
    justify-content: center;
    display: flex;
    flex-direction: column;
    width: 40%;
    height: auto;
    padding: 0;
  }
  .ax-gallery-medias-container > * {
    flex-grow: 1;
    height: calc(50% - 10px);
  }
  .ax-gallery-medias-container > *:not(:last-child) {
    margin-bottom: 10px;
  }
  .ax-gallery-medias-container > :only-child {
    height: calc(50% - 10px);
  }
  .ax-gallery-medias-container > :nth-child(2):nth-last-child(2) {
    height: calc(20% - 10px);
  }
  .ax-gallery-medias-container > :nth-child(2):nth-last-child(2) img {
    height: auto;
  }
  .ax-gallery-medias-container > :nth-child(1):nth-last-child(3) {
    height: calc(40% - 10px);
  }
  .ax-gallery-medias-container > :nth-child(3) {
    height: calc(40% - 10px);
  }
  .ax-gallery-medias-container > :nth-child(2):nth-last-child(3) {
    height: calc(20% - 10px);
  }
  .ax-gallery-medias-container > :nth-child(2):nth-last-child(3) img {
    height: auto;
  }
}

.ax-gallery-content {
  width: 100%;
}

.gallery-item {
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item img {
  object-position: 50% 50%;
  width: auto;
  max-width: none;
  height: auto;
}
@media screen and (min-width: 1120px) {
  .gallery-item img {
    position: absolute;
  }
}

.ax-gallery {
  padding: calc(var(--section-spacer) / 2) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}