/* Grid wrapper */
.hb-grid {
  width: 95%;
  max-width: 1300px;
  margin: 50px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 15px;
}

/* Grid item */
.hb-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

/* Image styling */
.hb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s ease-in-out;
}

/* Hover zoom */
.hb-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

/* Text inside */
.hb-text {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  z-index: 10;
}

.hb-text.center {
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.hb-text h3 {
  font-size: 1.4rem;
  letter-spacing: 2px;
  font-weight: 600;
}

.hb-text a {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #ffffffcc;
  border-bottom: 1px solid #ffffffcc;
}

/* Height variations */
.tall { grid-row: span 2; }
.wide { grid-column: span 2; }

/* RESPONSIVE */
@media (max-width: 992px) {
  .hb-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 250px;
  }

  .wide { grid-column: span 2; }
  .tall { grid-row: span 1; }
}

@media (max-width: 600px) {
  .hb-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .wide {
    grid-column: span 1;
  }

  .hb-text h3 {
    font-size: 1.2rem;
  }
}
