/* ==========================================================================
   PARTIAL: MODAL LIGHTBOX GLOBAL (MB CONNECTING)
   Arquivo: static/css/partials/lightbox.css
   ========================================================================== */

.mb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  padding: 24px;
  box-sizing: border-box;
}

.mb-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.lightbox-container {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 32px rgba(223, 171, 54, 0.2);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mb-lightbox.is-open .lightbox-container {
  transform: scale(1);
}

/* Header do Lightbox */
.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(7, 11, 22, 0.9);
  border-bottom: 1px solid var(--border-subtle);
}

.lightbox-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--gold-light);
  background: rgba(223, 171, 54, 0.14);
  border: 1px solid var(--border-gold);
  padding: 4px 12px;
  border-radius: 99px;
}

.lightbox-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-counter {
  font-size: 0.8rem;
  color: var(--silver-accent);
  font-weight: 600;
}

.lightbox-btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.lightbox-btn-close:hover {
  background: var(--gold-primary);
  color: #070B16;
  border-color: var(--gold-light);
  transform: rotate(90deg);
}

/* Mídia Central com Navegação */
.lightbox-media-wrap {
  position: relative;
  width: 100%;
  max-height: 60vh;
  min-height: 300px;
  background: #05070e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: opacity 0.25s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(7, 11, 22, 0.75);
  border: 1px solid rgba(223, 171, 54, 0.4);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 4;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.lightbox-nav-btn:hover {
  background: var(--gold-gradient);
  color: #070B16;
  border-color: var(--gold-light);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev {
  left: 18px;
}

.lightbox-nav-btn.next {
  right: 18px;
}

/* Rodapé Informativo */
.lightbox-footer {
  padding: 18px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.lightbox-info {
  flex: 1;
  min-width: 260px;
}

.lightbox-title {
  font-family: 'Space Grotesk', sans-serif;
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lightbox-caption {
  color: var(--silver-accent);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
}

.lightbox-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--gold-light);
  margin-top: 6px;
}

.lightbox-whatsapp-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.lightbox-whatsapp-share:hover {
  background: #1fa851;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

@media (max-width: 640px) {
  .mb-lightbox {
    padding: 12px;
  }

  .lightbox-container {
    max-height: 96vh;
    border-radius: var(--radius-md);
  }

  .lightbox-media-wrap {
    min-height: 220px;
    max-height: 48vh;
  }

  .lightbox-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  .lightbox-nav-btn.prev { left: 8px; }
  .lightbox-nav-btn.next { right: 8px; }

  .lightbox-footer {
    padding: 14px 16px;
  }

  .lightbox-title {
    font-size: 1.05rem;
  }

  .lightbox-whatsapp-share {
    width: 100%;
    justify-content: center;
  }
}
