/* MISC GALLERY */
.misc-project-gallery {
  max-width: 1400px;
  width:100%;
  margin: 0 auto;
  color: whitesmoke;
  padding: 1rem;
  background-color: #1e1e1e;
  text-align: center;
}

.misc-project-gallery h2 {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  color: whitesmoke;
  padding-bottom: 1.5rem;
}

.misc-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.misc-gallery-grid img {
  width: 200px;
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
}

.misc-gallery-grid img:hover {
  transform: scale(1.05);
}

/* ===========================
   MODAL-STIL
=========================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 30, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

/* Innehållsbox */
.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

/* Bild i modal */
.modal-content img {
  display: block;
  margin: auto;
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Stäng-knapp */
.modal-close {
  position: absolute;
  top: -10px;
  right: -10px;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  background-color: transparent;
  font-size: 1.5rem;
  padding: 0 0.5rem;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  user-select: none;
  transition: color 0.3s ease;
}

/* Fasta pilar (relativt till .modal, alltså alltid samma plats på skärmen) */
.modal-prev,
.modal-next {
  position: fixed;          /* fixed = alltid på skärmen */
  top: 50%;
  transform: translateY(-50%);
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 2rem;          /* gör dem lättare att klicka */
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  z-index: 3000;            /* över modal-content */
  transition: color 0.3s ease;
  background: transparent;
}

.modal-prev {
  left: 20px;               /* alltid 20px från vänster kant av skärmen */
}

.modal-next {
  right: 20px;              /* alltid 20px från höger kant av skärmen */
}

/* Hover-effekter */
.modal-prev:hover,
.modal-next:hover,
.modal-close:hover {
  color: rgba(255, 255, 255, 0.9);
}
