/* --- Estilos Globais e Reset Básico --- */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  color: #333;
  line-height: 1.6;
}
/* Impede scroll da página quando o modal está aberto */
body.modal-open {
    overflow: hidden;
}


/* --- Container Principal e Cabeçalho da Galeria --- */

.gallery-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 25px;
  box-sizing: border-box;
}

.gallery-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem 1rem;
  margin-bottom: 1.5rem;
}

.gallery-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.gallery-header p {
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Layout do Grid da Galeria --- */

.gallery {
  display: grid;
  /* Mantendo a proporção anterior ou ajuste conforme necessário */
  grid-template-columns: 2.75fr 4.5fr 2.75fr;
  gap: 25px;
  align-items: start;
}

/* --- Estilos Base dos Itens da Galeria --- */

.gallery-item {
  position: relative;
  /* cursor: pointer; Mantido se quiser indicar clicável */
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

/* Hover sutil no card inteiro */
.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

/* --- Estilos das Imagens Dentro dos Itens --- */

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  cursor: pointer; 
}


/* --- Estilos do Texto Abaixo da Imagem (Título e Técnica) --- */

.gallery-item h3,
.gallery-item p {
  margin: 0;
  padding: 8px 15px;
  text-align: center;
  color: #333;
}

.gallery-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  padding-top: 12px;
}

.gallery-item p {
  font-size: 0.9rem;
  color: #666;
  padding-bottom: 12px;
}


/* --- Estilos do Modal (Popup) --- */

.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.85); 
  justify-content: center; 
  align-items: center; 
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%; 
  max-height: 85%; 
}

.close-button {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}


/* --- Responsividade --- */

/* Telas Médias (Tablets) - 2 Colunas */
@media (max-width: 1100px) {
  .gallery-container {
      padding: 20px;
  }
  .gallery {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
  }
  
}

/* Telas Pequenas (Celulares) - 1 Coluna */
@media (max-width: 768px) {
  .gallery-container {
      padding: 15px;
  }
  .gallery {
      grid-template-columns: 1fr;
      gap: 25px;
  }

  .gallery-header {
      padding: 1.5rem 1rem;
  }
  .gallery-header h1 {
      font-size: 2rem;
  }
  .gallery-header p {
      font-size: 1rem;
  }
   
   .gallery-item img {
       cursor: default;
   }
   
   .close-button {
        font-size: 30px;
        top: 10px;
        right: 20px;
   }
   .modal-content {
       max-width: 95%;
       max-height: 80%;
   }
}