/* Popup styles */
.popup {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.popup-img {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

/* Close button */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  background-color: var(--text-color-blue);
  border-radius: 10px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 0.5rem 0.5rem 0.5rem;
  line-height: 1;
}

.close:hover {
  color: #bbb;
}

/* Navigation buttons */
.popup-prev,
.popup-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-color-white);
  font-size: 2rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 10%;
  transition: background 0.3s, color 0.3s;
  user-select: none;
}

.popup-prev:hover,
.popup-next:hover {
  background: var(--text-color-blue);
  color: var(--text-color-white);
}

.popup-prev { left: 100px; }
.popup-next { right: 100px; }

/* Blur background when popup active */
body.blur-background main,
body.blur-background section,
body.blur-background header,
body.blur-background footer {
  filter: blur(5px);
  pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Mobile overrides */
@media (max-width: 1240px) {
  .popup-prev { left: 10px; }   /* outside img */
  .popup-next { right: 10px; }  /* outside img */

  .popup-prev
  .popup-next {
    background: transparent;
    color: var(--text-color-white);
  }

  .popup-prev:hover,
  .popup-next:hover {
    background: transparent;
    color: var(--text-color-blue);
  }

  .popup-img {
  max-width: 98%;
  max-height: 98%;
  margin: auto;
}
  
}