/* ========================= 
Modal - apresentação empresarial (atualizado)
========================= */

/* Overlay / container */
.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(2,6,12,0.82);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* overlay clicável por baixo do conteúdo (separado para detectar clique) */
.img-modal .img-modal-overlay {
  position: absolute;
  inset: 0;
}

/* Box interno que centraliza e limita largura */
.img-modal .modal-inner {
  position: relative;
  width: 100%;
  max-width: 980px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(212,175,55,0.06);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.7);
  display: flex;
  gap: 24px;
  padding: 22px;
  align-items: stretch;
  overflow: hidden;
  animation: modalEnter 240ms ease forwards;
  min-height: 220px;
}

/* Coluna da imagem (esquerda) */
.img-modal .modal-left {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  max-height: 76vh;
  overflow: hidden;
}

/* Imagem: ocupa todo o espaço disponível na coluna */
.img-modal-content {
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform .28s cubic-bezier(.2,.9,.2,1);
  cursor: zoom-in;
}

/* quando usuário clica para o "zoom" (classe toggled via JS se quiser) */
.img-modal-content.zoomed {
  transform: scale(1.02);
  cursor: zoom-out;
}

/* Coluna do conteúdo (direita) */
.img-modal .modal-right {
  flex: 1;
  color: #e9e8e6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 240px;
  max-height: 72vh;
  overflow: auto;
  padding-right: 6px;
}

@media (min-width: 640px){
    .modal-right{
        justify-content: center;
    }
}

/* Nome em destaque */
.img-modal .modal-right h4 {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: var(--principalColor, #d4af37);
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

/* Parágrafos da bio */
.img-modal .modal-right p,
.img-modal .modal-right #imgCaption {
  margin: 0;
  color: #d1d1d1;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* actions */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.btn.subtle {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* Close button: discreto, circular, alto contraste */
.img-modal .close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  transition: background .18s, transform .12s;
  z-index: 2;
}
.img-modal .close:hover {
  background: rgba(212,175,55,0.12);
  transform: translateY(-2px);
  color: #080808;
}

/* animação de entrada (zoom + fade) */
@keyframes modalEnter {
  from { transform: translateY(8px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* --- Responsividade --- */

/* Tablet / small desktop */
@media (max-width: 900px) {
  .img-modal .modal-inner { gap: 18px; padding: 18px; max-width: 820px; }
  .img-modal .modal-left { flex-basis: 48%; min-width: 180px; }
  .img-modal .modal-right h4 { font-size: 1.15rem; }
}

/* Mobile: empilha imagem primeiro, conteúdo abaixo */
@media (max-width: 640px) {
  .img-modal { padding: 12px; }
  .img-modal .modal-inner {
    flex-direction: column;
    align-items: stretch;
    max-width: 640px;
    padding: 14px;
    gap: 12px;
    border-radius: 10px;
  }
  .img-modal .modal-left { width: 100%; flex-basis: auto; min-width: auto; max-height: 56vh; }
  .img-modal-content { max-height: 56vh; border-radius: 8px; }
  .img-modal .modal-right { max-height: 34vh; overflow: auto; padding: 6px 4px 8px; }
  .img-modal .close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 22px; color: black;}
  .modal-actions { justify-content: flex-start; }
}

/* Very small screens */
@media (max-width: 420px) {
  .img-modal .modal-inner { padding: 10px; border-radius: 8px; }
  .img-modal .modal-right h4 { font-size: 1.05rem; }
  .img-modal .modal-right p, .img-modal #imgCaption { font-size: 0.95rem; }
  .btn.subtle { padding: 8px 10px; font-size: 0.92rem; }
}
