@charset "UTF-8";

/* START SERVICE CARDS CSS */

article {
  --img-scale: 1.001;
  --title-color: rgb(25, 25, 25);
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 5px;
  box-shadow: none;
  background: #fff;
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
}

article a::after {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  cursor: pointer;
  content: "";
}

/* basic article elements styling */
article h2 {
  margin: 0 0 18px 0;
  font-weight: bold;
  font-size: 2rem;
  color: var(--title-color);
  transition: color 0.3s ease-out;
}

figure {
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

figure picture img {
  width: 100% !important;
}

article img {
  max-width: 100%;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.article-body {
  padding: 24px;
}

article a {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  color: #A36B0D;
}

.article-body a:hover {
  color: #A36B0D;
}

article a:focus {
  outline: 1px dotted #A36B0D;
}

article a .icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

/* using the has() relational pseudo selector to update our custom properties */
article:has(:hover, :focus) {
  --img-scale: 1.1;
  --title-color: #A36B0D;
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.articles {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

@media screen and (max-width: 993px) {
  .articles {
    padding-inline: unset;
  }
  article {
    container: card/inline-size;
  }
  .article-body p {
    display: auto;
    font-size: .85rem;
    line-height: 1rem;
    letter-spacing: 0.01rem;
  }

  figure {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  figure img {
    height: 100% !important;
    aspect-ratio: unset;
    object-fit: cover;
  }
  article h2 {
    font-size: 1.25rem;
    line-height: 1.4rem;
    letter-spacing: 0.01rem;
  }
  article a {
  font-size: 1rem;
  }
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* END SERVICE CARDS CSS */
