/* ------------------ CARD ------------------ */
.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

/* ------------------ IMAGE ------------------ */
.card-image {
  position: absolute;
  inset: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

/* ------------------ BOTTOM INFO ------------------ */
.bottom-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  color: #fff;
  z-index: 5;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.85),
      rgba(0, 0, 0, 0.4),
      transparent);
}

.bottom-info h3 {
  font-size: 15px;
  margin: 0;
}

.bottom-info p {
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.9;
}

/* Hide bottom info on hover */
.gallery-card:hover .bottom-info {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ------------------ DIAMOND HOVER ------------------ */
.diamond-group {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: 0.4s ease;
  z-index: 6;
}

.diamond {
  position: absolute;
  transform: rotate(45deg);
  border-radius: 6px;
}

.diamond-back {
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.12);
}

.diamond-mid {
  width: 160px;
  height: 160px;
  background: rgba(0, 0, 0, 0.18);
}

.diamond-front {
  width: 140px;
  height: 140px;
  background: #0d4b80;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.diamond-front h3,
.diamond-front p {
  transform: rotate(-45deg);
  margin: 0;
}

.diamond-front h3 {
  font-size: 14px;
}

.diamond-front p {
  font-size: 12px;
  margin-top: 6px;
}

/* Show diamond on hover */
.gallery-card:hover .diamond-group {
  opacity: 1;
  transform: scale(1);
}

/* Image hover */
.gallery-card:hover img {
  filter: brightness(60%);
  transform: scale(1.08);
}

/* ------------------ MOBILE ------------------ */
@media (max-width: 576px) {
  .diamond-back {
    width: 140px;
    height: 140px;
  }

  .diamond-mid {
    width: 125px;
    height: 125px;
  }

  .diamond-front {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 576px) {
  .gallery-card-mobile {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .gallery-card-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .bottom-info-mobile {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    color: #fff;
  }

  .bottom-info-mobile h3 {
    font-size: 14px;
    margin: 0;
  }

  .bottom-info-mobile p {
    font-size: 12px;
    margin: 2px 0 0;
  }

  /* Optional: adjust font size on very small screens */
  @media (max-width: 400px) {
    .bottom-info-mobile h3 {
      font-size: 12px;
    }

    .bottom-info-mobile p {
      font-size: 10px;
    }
  }
}