.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1000;
  }
  .overlay.show {
    visibility: visible;
    opacity: 1;
  }
  .overlay.hide {
    opacity: 0;
    transition: opacity 0.5s ease;
  }
  .overlay img {
    max-width: 90vw;
    max-height: 90vh;
  }
  .overlay-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem;
  }
  .overlay-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
  }