/* ====================== */
/* Modal padrão do site   */
/* (Padrão idêntico ao Portfolio) */
/* ====================== */

@keyframes slideFade {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInSlide {
  0% { opacity: 0; translate: -20%; }
  100% { opacity: 1; }
}

/* Modal invisível por padrão */
.site-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* Estado escondido */
.site-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Blindagem: quando escondido, nada dentro pode capturar clique */
.site-modal.hidden,
.site-modal.hidden * {
  pointer-events: none !important;
}

/* Estado visível */
.site-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* Backdrop */
.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,0.6), rgba(0,0,0,0.9));
  backdrop-filter: blur(5px);
}

/* Conteúdo */
.site-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: clamp(50vh, 80vh, 85vh);
  border-radius: 2em;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

/* Animação de entrada */
.site-modal-content.slide-fade {
  animation: slideFade 0.28s ease-out;
}

/* Botão fechar */
.site-modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: clamp(2.6rem, 5.2vh, 6.2rem);
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  z-index: 3;
}

.site-modal-close:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

/* Área de navegação (setas) */
.site-modal-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  z-index: 2;
  pointer-events: none; /* setas habilitam clique individualmente */
}

/* Botões de navegação */
.site-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: clamp(2.6rem, 5.2vh, 6.2rem);  
  line-height: 1;
  color: #ffffff;
  z-index: 3;
  pointer-events: auto;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-prev { left: 2vw; }
.site-next { right: 2vw; }

.site-nav:hover {
  transform: translateY(-50%) scale(1.1);
  opacity: 0.9;
}

#siteModalSlide {
  width: 100%;
  height: 100%;
  border-radius: 2em;
  overflow: hidden;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  touch-action: manipulation;
  pointer-events: auto;
}

#siteModalSlide.slide-fade {
  animation: slideFade 0.28s ease-out;
}

#siteModalSlide video,
#siteModalSlide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2em;
  display: block;
  touch-action: manipulation;
  pointer-events: auto;
}

.site-modal-filename {
  border: 0px solid red;
  display: flex;
  text-align: center;
  font-family: 'gothan';
  color: white;
  font-size: clamp(1.5rem, 2.2vh , 3rem);
  padding: 2%;
  border-radius: 1em;
  position: absolute;
  bottom: 2%;
  backdrop-filter: blur(13px) brightness(90%);
  animation: 0.5s fadeInSlide 0.5s ease-in-out backwards;
  z-index: 5;
  max-width: 80%;
}

/* Mobile */
@media (orientation: portrait) {
  .site-modal-content {
    max-width: 90vw;
    max-height: 80vh;
    height: auto;
    border-radius: 2em;
  }

  #siteModalSlide,
  #siteModalSlide video,
  #siteModalSlide img {
    border-radius: 1.4em;
  }

  .site-modal-filename{
    max-width: 80%;
    bottom: -5%;
  }
}
