/* ═══════════════════════════════════════════════
   COMPONENTE: Modal Frente e Verso (cr-fv-modal)
   Usado em: Galeria, Produções, Eventos
   ═══════════════════════════════════════════════ */

.cr-fv-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cr-fv-modal.ativo {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.cr-fv-modal-aberto {
  overflow: hidden;
}

.cr-fv-modal-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  height: 90vh;
  gap: 20px;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cr-fv-modal.ativo .cr-fv-modal-container {
  transform: scale(1);
}

.cr-fv-modal-fechar {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--cr-dourado);
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cr-fv-modal-fechar:hover {
  background: var(--cr-preto);
  transform: scale(1.05);
}

.cr-fv-conteudo {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Card 3D */
.cr-fv-card-3d {
  perspective: 1500px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.cr-fv-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.cr-fv-card-inner.arrastando {
  cursor: grabbing;
}

.cr-fv-card-inner.rotacionado {
  transform: rotateY(180deg);
}

/* Faces */
.cr-fv-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cr-fv-face img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.cr-fv-face-verso {
  transform: rotateY(180deg);
}

/* Controles */
.cr-fv-controles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  z-index: 5;
}

.cr-fv-indicador {
  color: #fff;
  font-family: "Special Elite", "Courier Prime", monospace;
  font-size: 0.9rem;
  background: rgba(20, 20, 20, 0.7);
  padding: 6px 20px;
  border-radius: 20px;
  border: 1px solid var(--cr-borda);
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.cr-fv-btn-girar {
  position: relative;
  font-family: "Special Elite", "Courier Prime", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--cr-dourado);
  border: 1px solid var(--cr-borda);
  padding: 10px 32px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cr-fv-btn-girar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.2));
  border-radius: inherit;
  z-index: -1;
  transform: translateY(4px);
  transition: transform 0.2s ease;
}

.cr-fv-btn-girar:hover {
  background: var(--cr-preto);
  color: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.cr-fv-btn-girar:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .cr-fv-modal-fechar {
    top: 5px;
    right: 5px;
    width: 38px;
    height: 38px;
    font-size: 2.2rem;
  }

  .cr-fv-modal-container {
    height: 85vh;
    gap: 15px;
  }
}