/* ================================
   MODAL BASE
================================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 999;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================================
   CONTEÚDO DO MODAL
================================ */
.modal-content {
  background: #d5cabb;
  border-radius: 22px;
  padding: 32px 28px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;

  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(.2,.8,.2,1),
    opacity 0.35s ease;

  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.modal.show .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ================================
   BOTÃO FECHAR
================================ */
.modal .close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 30px;
  line-height: 1;
  color: #5e5e5e;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal .close:hover {
  transform: scale(1.15);
  opacity: 0.7;
}

/* ================================
   TÍTULO E DESCRIÇÃO
================================ */
#modalTitle {
  font-size: 22px;
  color: #464646;
  margin-bottom: 8px;
  text-align: center;
}

.modal-description {
  color: #6b6b6b;
  font-size: 15px;
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* ================================
   GALERIA (DESKTOP FIRST)
================================ */
.modal-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

/* ================================
   IMAGENS – DESKTOP
================================ */
.modal-gallery img {
  width: 520px;
  height: 520px;
  object-fit: cover;
  border-radius: 22px;
  cursor: zoom-in;

  box-shadow:
    inset 0 0 0 rgba(0,0,0,0),
    0 25px 55px rgba(0, 0, 0, 0.35);

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.modal-gallery img:hover {
  transform: scale(1.035);
  box-shadow:
    inset 0 0 0 rgba(0,0,0,0),
    0 35px 70px rgba(0, 0, 0, 0.45);
}

/* ================================
   IMAGE VIEWER (ZOOM)
================================ */
.image-viewer {
  background: transparent;
  box-shadow: none;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
}

.image-viewer img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 20px;
  display: block;
  margin: auto;
  cursor: zoom-out;

  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* Nome do profissional */
#viewerProfessional {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  color: #d5cabb;
  letter-spacing: 0.4px;
}

/* ================================
   MOBILE (ATÉ 430px)
================================ */
@media (max-width: 430px) {

  .modal-content {
    padding: 24px 18px;
    border-radius: 18px;
  }

  #modalTitle {
    font-size: 18px;
  }

  .modal-description {
    font-size: 14px;
  }

  .modal-gallery {
    gap: 24px;
  }

  .modal-gallery img {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }
}
/* ================================
   SCROLLBAR CUSTOM – WEBKIT
   (Chrome, Edge, Safari)
================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(126, 105, 96, 0.45);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 105, 96, 0.75);
}

/* ================================
   SCROLLBAR NO MODAL (MAIS SOFT)
================================ */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(213, 202, 187, 0.7);
}

/* ================================
   FIREFOX
================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(126, 105, 96, 0.6) transparent;
}
