/* ===== Home categories section ===== */

.dsi-home-categories {
  margin: 60px 0;
}

.dsi-home-categories h2 {
  margin-bottom: 30px;
  border-bottom: 2px solid #1aa6b7;
  display: inline-block;
  width: 100%;
  color: #1aa6b7;
  padding-bottom: 5px;
  font-size: larger;
}

/* ===== Grid layout ===== */

.dsi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
}

/* ===== Card ===== */

.dsi-item {
  position: relative;
  background: #ebebed;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #000;
  overflow: hidden;

  /* Responsive rectangle */
  aspect-ratio: 3 / 2;

  /* Center content */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 25px 18px;
  max-width: 300px;
  max-height: 200px;
}

/* Inner border */
.dsi-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.dsi-item:hover::before {
  border-color: #fff;
}

.dsi-item:hover {
  background: #13a8bd;
  color: #fff;
}

/* ===== Icon ===== */

.dsi-icon {
  margin-bottom: 18px;
  /* more space */
  transition: all 0.3s ease;
}

.dsi-icon img {
  width: 80px;
  /* larger icon */
  height: auto;
}

/* ===== Text ===== */

.dsi-item span {
  font-size: 16px;
  /* larger text */
  font-weight: 600;
  /* lightly bold */
  line-height: 1.35;
  max-width: 100%;
}

/* ===== Responsive breakpoints ===== */

/* Tablets */
@media (max-width: 1024px) {
  .dsi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dsi-icon img {
    width: 56px;
  }

  .dsi-item span {
    font-size: 15px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .dsi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .dsi-icon img {
    width: 48px;
  }

  .dsi-item span {
    font-size: 14px;
  }
}