
/* Cleaned and updated Tiles CSS */
/* Corrected typo 'postiion' to 'position' and cleaned transitions */

.tiles {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  margin: -2.5em 0 0 -2.5em;
}

.tiles article {
  transition: transform 0.5s ease, opacity 0.5s ease;
  position: relative;
  width: calc(50% - 2.5em);
  margin: 2.5em 0 0 2.5em;
}

.tiles article > .image {
  transition: transform 0.5s ease;
  position: relative;
  display: block;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.tiles article > .image img {
  display: block;
  width: 100%;
}

.tiles article > .image:before,
.tiles article > .image:after {
  pointer-events: none;
  transition: opacity 0.5s ease;
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.tiles article > .image:before {
  background-color: #000;
  opacity: 0.8;
  z-index: 1;
}

.tiles article > .image:after {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cstyle%3Eline %7B stroke-width: 0.25px%3B stroke: %23ffffff%3B %7D%3C/style%3E%3Cline x1='0' y1='0' x2='100' y2='100' /%3E%3Cline x1='100' y1='0' x2='0' y2='100' /%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.25;
  z-index: 2;
}

.tiles article > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.5s ease, transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1em;
  border-radius: 4px;
  color: #fff;
  text-align: center;
  z-index: 3;
}

.tiles article > a:hover {
  color: #fff !important;
}

.tiles article > a .content {
  transition: max-height 0.5s ease, opacity 0.5s ease;
  width: 100%;
  max-height: 0;
  opacity: 0;
}

.tiles article:hover > .image {
  transform: scale(1.1);
}

.tiles article:hover > .image:before {
  background-color: #333;
  opacity: 0.35;
}

.tiles article:hover > .image:after {
  opacity: 0;
}

.tiles article:hover .content {
  max-height: 15em;
  opacity: 1;
}

/* Responsive Styles */
@media screen and (max-width: 1280px) {
  .tiles {
    margin: -1.25em 0 0 -1.25em;
  }
  .tiles article {
    width: calc(33.333% - 1.25em);
    margin: 1.25em 0 0 1.25em;
  }
}

@media screen and (max-width: 980px) {
  .tiles {
    margin: -2.5em 0 0 -2.5em;
  }
  .tiles article {
    width: calc(50% - 2.5em);
    margin: 2.5em 0 0 2.5em;
  }
}

@media screen and (max-width: 736px) {
  .tiles {
    margin: -1.25em 0 0 -1.25em;
  }
  .tiles article {
    width: calc(50% - 1.25em);
    margin: 1.25em 0 0 1.25em;
  }
}

@media screen and (max-width: 480px) {
  .tiles {
    margin: 0;
  }
  .tiles article {
    width: 100%;
    margin: 1.25em 0 0 0;
  }
}

/* Card Hover Zoom */
.card img {
  transition: transform 0.2s ease;
}

.card img:hover {
  transform: scale(1.03);
}