/* Variables */
.tiles-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0 var(--margin-grid);
}
.tiles-group .small-tiles-wrapper,
.tiles-group .image-tiles-wrapper {
  display: grid;
  gap: 15px;
}
@media only screen and (min-width: 600px) {
  .tiles-group .small-tiles-wrapper,
.tiles-group .image-tiles-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (min-width: 900px) {
  .tiles-group .small-tiles-wrapper,
.tiles-group .image-tiles-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
  .tiles-group .small-tiles-wrapper:has(.tile:only-child),
.tiles-group .image-tiles-wrapper:has(.tile:only-child) {
    grid-template-columns: repeat(1, 1fr);
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(2):last-child),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(4):last-child),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) {
    grid-template-columns: repeat(6, 1fr);
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:first-child,
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:first-child {
    grid-column: 1/span 2;
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(2),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(2) {
    grid-column: 3/span 2;
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(3),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(3) {
    grid-column: 5/span 2;
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(4),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(4) {
    grid-column: 1/span 3;
  }
  .tiles-group .small-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(5),
.tiles-group .image-tiles-wrapper:has(.tile:nth-child(5):last-child) .tile:nth-child(5) {
    grid-column: 4/span 3;
  }
}
.tiles-group .small-tile,
.tiles-group .image-tile {
  aspect-ratio: 1.2;
  border-radius: var(--br);
  display: flex;
  overflow: hidden;
  padding: 24px 72px 24px 24px;
  letter-spacing: 0;
  font-weight: 700;
  font-size: clamp(38px, 3vw, 41px);
  line-height: clamp(38px, 3.1vw, 42px);
}
.tiles-group .small-tile:after,
.tiles-group .image-tile:after {
  content: none;
}
.tiles-group .small-tile span,
.tiles-group .image-tile span {
  position: relative;
  z-index: 3;
}
.tiles-group .small-tile .btn-icon,
.tiles-group .image-tile .btn-icon {
  bottom: 24px;
  height: 26px;
  position: absolute;
  right: 24px;
  width: 26px;
}
.tiles-group .small-tile {
  background: #ffffff;
  max-height: 320px;
  width: 100%;
}
.tiles-group .small-tile:hover:before {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.tiles-group .small-tile:hover span {
  color: #ffffff;
}
.tiles-group .small-tile:before {
  background: var(--main-color);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  content: "";
  display: block;
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  scale: 1.1;
  transition: clip-path 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  z-index: 0;
}
.tiles-group .small-tile span {
  transition: color 0.2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
.tiles-group .image-tile {
  color: #ffffff;
  position: relative;
}
.tiles-group .image-tile:before {
  background: rgba(0, 0, 0, 0.3);
  content: "";
  display: block;
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}
.tiles-group .image-tile:hover .media-image {
  scale: 1.05;
}
.tiles-group .image-tile .media-image {
  inset: 0;
  position: absolute;
  transition: scale 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  z-index: -1;
}
.tiles-group .image-tile .btn-icon svg path {
  fill: #ffffff;
}
@media only screen and (min-width: 1024px) {
  .tiles-group {
    gap: 0;
  }
  .tiles-group .small-tiles-wrapper,
.tiles-group .image-tiles-wrapper {
    gap: 30px;
  }
}
