/* ============================================================
   ARQUIVO CSS ATUALIZADO - PACTO DIGITAL
   Objetivo: Implementar Layout Estilo Pinterest (Masonry)
   Instruções: Substitua todo o conteúdo do seu style.css por este.
   ============================================================ */

/* ================== RESET PADRÃO ================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================== ESTILO GERAL DO CORPO DA PÁGINA ================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  line-height: 1.6;
}

/* ================== HEADER PRINCIPAL (CABEÇALHO) ================== */
.site-header {
  position: relative;
  padding: 15px 30px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 60px;
  z-index: 1000;
}

/* ================== LOGOTIPO À ESQUERDA ================== */
.logo-left {
  flex: 0 0 auto;
  max-width: 120px;
  margin-right: 15px;
}

@media (max-width: 767px) {
  .logo-left {
    max-width: 80px;
  }
}

/* ================== AJUSTES PARA TELAS PEQUENAS (HEADER) ================== */
@media (max-width: 479px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    min-height: 120px;
  }
  .logo-left {
    max-width: 60px;
    margin-right: 0;
    margin-bottom: 10px;
    order: 1;
  }
  .logo-center {
    position: static;
    transform: none;
    width: 100%;
    max-width: 300px;
    margin-bottom: 15px;
    order: 2;
  }
  .navbar {
    width: 100%;
    order: 3;
  }
  .navbar ul {
    justify-content: center;
    gap: 15px;
  }
}

/* ================== ESTILO DAS IMAGENS DOS LOGOTIPOS ================== */
.logo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ================== LOGOTIPO CENTRALIZADO ================== */
.logo-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 15px;
  width: 70%;
  max-width: 800px;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .logo-center {
    width: 90%;
    max-width: 400px;
    top: 10px;
  }
}

/* ================== MENU DE NAVEGAÇÃO ================== */
.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.navbar ul li a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar ul li a:hover {
  color: #007BFF;
}

/* ================== GALERIA DE IMAGENS (PRINCIPAL) ================== */
.gallery-container {
  padding: 20px;
  width: 100%;
}

/* 
   ================== NOVO LAYOUT MASONRY (ESTILO PINTEREST) ================== 
   Esta seção foi totalmente reescrita para eliminar os espaços em branco.
   Usamos 'column-count' em vez de 'grid' para permitir que as imagens de 
   alturas diferentes se encaixem perfeitamente.
*/
.gallery {
  display: block; /* Desativa o grid antigo */
  column-count: 4; /* Define 4 colunas para telas grandes */
  column-gap: 20px; /* Espaço entre as colunas */
  width: 100%;
}

/* Responsividade das colunas: Ajusta o número de colunas conforme a tela diminui */
@media (max-width: 1440px) { .gallery { column-count: 4; } }
@media (max-width: 1024px) { .gallery { column-count: 3; } }
@media (max-width: 768px)  { .gallery { column-count: 2; } }
@media (max-width: 480px)  { .gallery { column-count: 1; } }

/* ================== ITEM INDIVIDUAL DA GALERIA ================== */
.gallery-item {
  display: inline-block; /* Importante para o layout de colunas */
  width: 100%;
  margin-bottom: 20px; /* Espaço vertical entre as imagens */
  break-inside: avoid; /* Impede que a imagem seja cortada entre duas colunas */
}

/* ================== ESTILO DAS IMAGENS NA GALERIA ================== */
.gallery-item img {
  width: 100%;
  height: auto; /* Mantém a proporção original */
  display: block;
  border-radius: 8px; /* Cantos arredondados estilo Pinterest */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.03); /* Zoom leve ao passar o mouse */
  box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Sombra suave no hover */
}

/* ================== MODAL PARA EXIBIR IMAGEM AMPLIADA ================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  margin: 5% auto;
  display: block;
  max-width: 80%;
  border-radius: 10px;
}

.modal .close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* ================== RODAPÉ DO SITE ================== */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #222;
  color: #fff;
  padding: 20px 30px;
  flex-wrap: wrap;
}

.footer-left, .footer-center, .footer-right {
  flex: 1 1 30%;
  text-align: center;
}

.footer-right ul {
  list-style: none;
}

.footer-right ul li {
  display: inline;
  margin: 0 10px;
}

.footer-right ul li a {
  color: #ccc;
  text-decoration: none;
}

/* ================== ESTILOS COMUNS PARA TODAS AS PÁGINAS ================== */
.content {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
}

.container {
  max-width: 800px;
  margin: auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.contact-form, .auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input, .auth-form input, .contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}

.contact-form button, .auth-form button {
  padding: 10px 20px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: fit-content;
}

/* ================== AJUSTES MOBILE FINAIS ================== */
@media (max-width: 767px) {
  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .footer-left, .footer-center, .footer-right {
    flex: 1 1 100%;
  }
  .footer-right ul li {
    display: block;
    margin: 5px 0;
  }
}

@media (max-width: 479px) {
  .container {
    padding: 20px 15px;
    margin: 10px;
  }
  .contact-form button, .auth-form button {
    width: 100%;
  }
}
