/* --- Reset Geral --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fdfaf6;
  color: #3b3530;
  line-height: 1.6;
}

/* --- Header configurado com o fundo --- */
header {
  background: url('../img/fundo.png') center center no-repeat;
  background-size: cover;
  width: 100%;
  height: 65vh;
  display: block;
}

.header-spacer {
  height: 100%;
  width: 100%;
}

section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: auto;
}

h2 {
  font-family: 'Playfair Display', serif;
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  color: #4a0012;
}

h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: #800020;
  margin: 10px auto 0 auto;
}

/* --- Cards de Eventos (Com transições fluidas) --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border: 1px solid #f5efeb;
  font-weight: 600;
  color: #4a0012;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(128, 0, 32, 0.12);
  border-color: #800020;
}

.card:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(128, 0, 32, 0.2);
}

/* --- Sobre o Espaço --- */
.about p {
  text-align: center;
  max-width: 800px;
  margin: auto;
  font-size: 16px;
  color: #5c534c;
}

/* --- Galeria de Fotos Organizada --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  height: 250px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Formulário de Orçamento --- */
.form-section {
  background: #f3e9e3;
  max-width: 100%;
}

.form-container {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  max-width: 700px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #7a6e67;
  text-transform: uppercase;
}

.form-container input, .form-container select, .form-container textarea {
  padding: 11px 14px;
  border: 1px solid #dcd1c9;
  border-radius: 6px;
  font-size: 14px;
  background-color: #faf8f6;
}

.form-container input:focus, .form-container select:focus, .form-container textarea:focus {
  outline: none;
  border-color: #800020;
}

.full-width {
  grid-column: span 2;
}

.form-container textarea {
  height: 100px;
  resize: vertical;
}

.whatsapp-btn {
  grid-column: span 2;
  background: #25D366;
  color: white;
  padding: 14px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

/* --- Seção Contato e Localização --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}

.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 20px;
  color: #4a0012;
}

.contact-item {
  margin-bottom: 15px;
}

.contact-info a {
  color: #800020;
  text-decoration: none;
  font-weight: 600;
}

.social-buttons-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-circle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  border: 1px solid #ebdcd1;
  cursor: pointer;
}

.social-circle-btn svg {
  fill: #800020;
}

.social-circle-btn:hover {
  background: #800020;
}

.social-circle-btn:hover svg {
  fill: white;
}

.map-container {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebdcd1;
}

/* --- Estrutura dos Modais --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(40, 30, 32, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 480px;
  padding: 35px 25px;
  border-radius: 12px;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 26px;
  color: #8c827a;
  cursor: pointer;
}

.modal-body {
  text-align: center;
}

.modal-icon {
  font-size: 38px;
  display: block;
  margin-bottom: 8px;
}

.modal-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #4a0012;
  margin-bottom: 12px;
}

.modal-body p {
  font-size: 14px;
  color: #5c534c;
  margin-bottom: 25px;
}

.modal-btn {
  display: inline-block;
  background: #800020;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

/* --- Rodapé e Flutuante --- */
footer {
  text-align: center;
  padding: 20px;
  background: #231b1c;
  color: #a89e9f;
  font-size: 14px;
}

.floating-whatsapp {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
  z-index: 999;
}

/* --- Responsividade Geral --- */
@media (max-width: 768px) {
  /* Força o container a empilhar em telas pequenas */
  .contact-grid { 
    display: flex !important;
    flex-direction: column !important; 
    gap: 30px; 
  }
  
  /* Faz o texto e o mapa ocuparem a largura total no celular */
  .contact-info, .map-container {
    width: 100% !important;
  }

  .form-container { grid-template-columns: 1fr; padding: 25px 20px; }
  .full-width, .whatsapp-btn { grid-column: span 1; }
  
  header {
    height: 45vh; /* Ajusta a proporção da altura para telas pequenas */
    background-position: center center; /* Mantém o foco central da imagem */
  }
}

/* --- Configuração para Computadores (Telas Maiores) --- */
@media (min-width: 769px) {
  .contact-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 60px;
  }

  .contact-info {
    width: 45%;
  }

  .map-container {
    width: 55%;
  }
}

.map-container iframe{
    width:100%;
    height:400px;
    border:none;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

/* ================= ESTILO DO POPUP SAZONAL - ATUALIZADO ================= */

/* Fundo escuro com desfoque ultra moderno */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 15, 16, 0.6); /* Tom escuro suave */
  backdrop-filter: blur(8px); /* ✨ O efeito de desfoque elegante no fundo */
  -webkit-backdrop-filter: blur(8px); /* Compatibilidade para Safari */
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Ativa o popup quando a classe 'active' estiver presente */
.popup-overlay.active {
  display: flex;
}

/* Caixa centralizada do Cartaz */
.popup-box {
  background: transparent; /* Permite que o design do panfleto mande no visual */
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: abrirPopup 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Efeito de surgimento suave com leve subida */
@keyframes abrirPopup {
  from { transform: scale(0.95) translateY(15px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Botão de Fechar (X) - reposicionado para melhor leitura */
.popup-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 36px;
  color: #800020; /* Cor bordô para combinar com o panfleto */
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s, color 0.2s;
  line-height: 1;
}

.popup-close-btn:hover {
  transform: scale(1.15);
  color: #4a0012;
}

/* Imagem do Cartaz */
.popup-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ✨ Botão Fale Conosco Premium e Flutuante */
.popup-action-btn {
  position: absolute;
  bottom: 25px; /* Posicionado cirurgicamente sobre a faixa bordô */
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  background: #25D366; /* Mantém o verde oficial do WhatsApp */
  color: white;
  text-decoration: none;
  padding: 12px 35px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 50px; /* Botão totalmente arredondado e moderno */
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.popup-action-btn:hover {
  background: #1ebd58;
  transform: translateX(-50%) translateY(-2px); /* Efeito de flutuar ao passar o mouse */
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.popup-action-btn:active {
  transform: translateX(-50%) translateY(0);
}