/* Image Modal Styles */
.hero-card-image {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hero-card-image:hover {
  transform: scale(1.05);
}

.hero-card-image:focus {
  outline: 2px solid var(--cursor-color-primary);
  transform: scale(1.05);
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: opacity;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.image-modal.visible {
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform, opacity;
  transform: translateZ(0);
}

.image-modal-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.image-modal-close:hover,
.image-modal-close:focus {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  outline: none;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .image-modal-close {
    top: 10px;
    right: 10px;
    font-size: 30px;
  }
}
