/* ============================================
   MODAL / LIGHTBOX STYLES
   ============================================ */

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 1.5rem;
}

.modal-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* Lock body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal Container */
.modal {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.modal-overlay--visible .modal {
  transform: translateY(0) scale(1);
}

.modal__header {
  padding: 2rem 2rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  color: #1A1A1A;
  line-height: 1.2;
}

.modal__title span {
  color: #C5A566;
}

.modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #F7F7F8;
  color: #6B6B6B;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.modal__close:hover {
  background: #1A1A1A;
  color: #FFFFFF;
}

.modal__body {
  padding: 1.5rem 2rem 2rem;
}

.modal__subtitle {
  font-size: 0.9375rem;
  color: #6B6B6B;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ============================================
   LIGHTBOX (Gallery fullscreen viewer)
   ============================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.lightbox-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.lightbox__image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox__image-wrapper img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
}

.lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 3001;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 3001;
}

.lightbox__nav:hover {
  background: rgba(197, 165, 102, 0.35);
  border-color: #C5A566;
}

.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }

.lightbox__counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 3001;
}

/* ============================================
   RESPONSIVE MODAL / LIGHTBOX
   ============================================ */
@media (max-width: 575px) {
  .modal {
    max-width: 100%;
    border-radius: 12px;
  }

  .modal__header {
    padding: 1.5rem 1.25rem 0;
  }

  .modal__body {
    padding: 1.25rem;
  }

  .modal__title {
    font-size: 1.25rem;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lightbox__nav--prev { left: 0.75rem; }
  .lightbox__nav--next { right: 0.75rem; }
}
