/* modal.css - Modal elegante integrado ao design do site */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s cubic-bezier(.4, 0, .2, 1), 
              visibility .4s cubic-bezier(.4, 0, .2, 1);
}

.modal.is-active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 12, .85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background: 
    linear-gradient(145deg, 
      rgba(248, 243, 237, 0.15), 
      rgba(240, 230, 220, 0.25)),
    url('imagens/luh-modal.jpeg') center/cover no-repeat;
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(107, 67, 41, .25),
    0 8px 24px rgba(107, 67, 41, .15);
  overflow: hidden;
  transform: scale(.9) translateY(20px);
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

/* Background e overlay removidos - agora usando background múltiplo direto no container */

.modal.is-active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(107, 67, 41, .15);
  border-radius: 50%;
  color: #6b4329;
  cursor: pointer;
  transition: all .3s ease;
}

.modal-close:hover {
  background: #c65d3d;
  color: #fff;
  transform: rotate(90deg);
  border-color: #c65d3d;
}

.modal-close:focus-visible {
  outline: 3px solid #c65d3d;
  outline-offset: 2px;
}

.modal-content {
  position: relative;
  z-index: 15;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4rem);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Custom scrollbar */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(107, 67, 41, .08);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c65d3d;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #9d6b4d;
}

.modal-header {
  text-align: center;
  margin-bottom: 8rem;
  margin-top: -1rem;
}

.modal-index {
  display: none; /* Removido conforme solicitado */
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: #FFFFFF;
  margin-bottom: .5rem;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.35rem, 3.2vw, 1.8rem);
  font-weight: 300;
  letter-spacing: .14em;
  color: #FFFFFF;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.55);
  margin-top: -0.35rem;
}

.modal-underline {
  width: 80px;
  height: 3px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, #b49a88, transparent);
  border-radius: 2px;
}

.modal-body {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(.95rem, 2vw, 1.05rem);
  line-height: 1.8;
  color: #FFFFFF;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  font-weight: 500;
}

.modal-body p {
  margin: 0 0 1.5rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body strong {
  color: #FFFFFF;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.modal-body em {
  color: #FFFFFF;
  font-style: normal;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Animação de entrada */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsividade */
@media (max-width: 640px) {
  .modal-content {
    padding: 2rem 1.5rem;
  }
  
  .modal-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  
  .modal-title {
    font-size: 1.6rem;
  }
  
  .modal-body {
    font-size: .95rem;
  }
}

/* Previne scroll do body quando modal está aberto */
body.modal-open {
  overflow: hidden;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-container,
  .modal-close {
    transition: none;
  }
  
  .modal.is-active .modal-container {
    animation: none;
  }
}
