.boxes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px;
  justify-content: center;
}

.box-link {
    text-decoration: none;
    width: calc(100% / 3 - 48px); /* 3 boxes with gap */
    max-width: 300px;
    flex-grow: 1;
}

.box-link:focus, .box-link:active {
    outline: none;
}

.box {
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    transition: background-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.box-h3d {
    border: 1px solid #f44336;
}
.box-ep {
    border: 1px solid #0FA450;
}
.box-np {
    border: 1px solid #2076BA;
}

.box img {
  width: 60%;
  margin: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.box p {
  font-size: 16.4px; /*1.28vw;*/
  font-weight: 700;
  color: #fff;
  margin: 8px 0 0;
  flex-grow: 1;
  word-wrap: break-word;
}

.box:hover {
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive for smaller screens */
/*@media (max-width: 767px) {
  .box-link {
    width: calc(100% / 2 - 24px); * 2 boxes with gap *
 /* }
}

@media (max-width: 576px) {
  .box-link {
    width: 100%; /* Single box per row *
  }
}*/

@media (min-width: 992px) and (max-width: 1199px) {
    .box-link {
        width: 100%; /* Stack boxes */
    }
    .box {
        flex-direction: row; /* Text inline with image */
        justify-content: flex-start;
        align-items: center;
    }
    .box img {
        max-width: 30%;
        height: auto;
    }
    .box p {
        flex-grow: unset;
        margin: 0;
        padding: 0 16px;
        text-align: left;
    }
}

@media (max-width: 767px) {
    .box-link {
        width: 100%; /* Stack boxes */
    }
    .box {
        flex-direction: row; /* Text inline with image */
        justify-content: flex-start;
        align-items: center;
    }
    .box img {
        max-width: 30%;
        height: auto;
    }
    .box p {
        flex-grow: unset;
        margin: 0;
        padding: 0 16px;
        text-align: left;
    }
}