.cardGrid {
  width: 100%;
  margin: 50px auto;
  box-sizing: border-box;
}

.cardGrid_Block {
  width: 95%;
  margin: auto;
  box-sizing: border-box;
  max-width: 1280px;
}

.cardGrid_Column {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Two columns by default */
  gap: 30px; /* Add gap between items */
  position: relative;
}

.grid-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--Hittarp-svart);
  color: var(--Hittarp-vit);
  box-sizing: border-box;
  cursor: default;
  position: relative;
}
.card-image {
  width: 100%px; /* Set a maximum width for the card */
  height: 250px; /* Set a fixed height for the card */
  overflow: hidden; /* Ensures that anything outside the bounds of the card is hidden */
  position: relative; /* For positioning child elements (like image) */
}

.card-image img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover; /* Image covers the container while maintaining its aspect ratio */
  object-position: center; /* Center the image in case it's cropped */
  position: relative;
  z-index: 0;
}
.card-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.grid-card:hover .card-image::after {
  opacity: 1;
}

.text-area {
  display: grid;
  grid-template-areas:
    "a a"
    "b c";
  padding: 15px 15px 20px;
}

.card-header {
  grid-area: a;
}

.card-header h3 {
  margin: 0;
  padding: 0;
  padding-bottom: 8px;
  font-family: Anton;
  text-transform: uppercase;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.48px;
}

.card-text {
  grid-area: b;
}

.card-text p {
  margin: 0;
  padding: 0;
  font-family: "Glacial Indifference";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 15px; /* 107.143% */
}

.read-more {
  grid-area: c;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.read-more > a::after {
  padding-left: 5px;
  content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="11" height="10" viewBox="0 0 11 10" fill="none"><path d="M1 0.5L5 5L1 9.5" stroke="%23FF1500"/><path d="M6 0.5L10 5L6 9.5" stroke="%23FF1500"/></svg>');
}

.read-more a {
  position: relative;
  font-family: "Oswald";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.7px;
  text-decoration: none;
  color: var(--Hittarp-vit);
}

.read-more a:visited {
  color: var(--Hittarp-vit);
}
.read-more a:hover {
  color: var(--Hittarp-red2);
}

.grid-card:hover .read-more-link::after {
  width: 150%; /* Line expands to full width on hover */
}

.team-card {
  background-color: var(--Hittarp-red2);
}

.team-card-text-area {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  min-height: 30px;
}

.team-card-link {
  width: 100%;
  height: 100%;
}
.team-link {
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 75px;
}
.team-card-link a {
  color: var(--Hittarp-vit);
  font-family: Anton;
  font-size: 26px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.52px;
  text-decoration: none;
  text-transform: uppercase;
}
.team-card-link a:visited {
  color: var(--Hittarp-vit);
}
.team-card-link a::after {
  position: relative;
  content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none"><path d="M1 1L6.77778 7.5L1 14" stroke="white"/><path d="M8.22217 1L13.9999 7.5L8.22217 14" stroke="white"/></svg>');
  padding-left: 5px;
  bottom: 3px;
}

/* Adjust for tablets */
@media (max-width: 1024px) {
  .cardGrid_Column {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
  }
  .grid-card {
    width: calc(50% - 15px);
    margin: auto;
  }

  .cardGrid_Block > h2 {
    font-size: 36px; /* Slightly smaller heading font size */
    text-align: center; /* Center align heading */
  }

  .cardGrid {
    margin: 30px auto;
  }
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
  .cardGrid_Column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px; /* Smaller gap for compact layout */
  }
  .grid-card {
    width: 100%;
    margin: auto;
  }

  .text-area {
    grid-template-areas:
      "a"
      "b"
      "c";
  }

  .cardGrid_Block > h2 {
    font-size: 32px; /* Smaller heading font size for mobile */
  }

  .grid-card {
    text-align: center; /* Center align card content for mobile */
  }

  .grid-card h3 {
    font-size: 20px; /* Adjust card title font size for mobile */
  }

  .grid-card p {
    font-size: 14px; /* Adjust card description font size for mobile */
    text-align: left;
  }

  .grid-card a {
    font-size: 14px; /* Adjust link font size for mobile */
  }
  .read-more {
    justify-content: end;
  }
}
