/* ============================================================
   ESTILO DA GALERIA (MOSAICO PREMIUM)
   ============================================================ */

/* --- HERO DA GALERIA (Minimalista) --- */
.gallery-hero {
  padding: 120px 0 60px; /* Espaço maior no topo por causa do menu fixo */
  text-align: center;
  background-color: var(--color-bg-light);
}

.gallery-hero h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

.gallery-hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #666;
}

/* --- GRID MOSAICO --- */
.gallery-section {
  padding-bottom: 80px;
  background-color: var(--color-bg-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-flow: dense;
  gap: 15px;
}

/* O CARTÃO DA FOTO */
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 300px;
  cursor: pointer;
}

/* Tamanhos variados para o efeito mosaico */
.gallery-item.tall {
  grid-row: span 2;
  height: 615px;
}
.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Overlay de informações ao passar o mouse */
.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 25px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.gallery-item:hover .photo-overlay {
  opacity: 1;
}

.photo-info h3 {
  color: #fff;
  font-size: 1.2rem;
  margin: 0;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.photo-info span {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-top: 5px;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.1s;
}

.gallery-item:hover .photo-info h3,
.gallery-item:hover .photo-info span {
  transform: translateY(0);
}

/* --- RODAPÉ DA GALERIA --- */
.gallery-footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.gallery-footer p {
  font-size: 1.2rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 20px;
}

/* ============================================================
   RESPONSIVIDADE E MENU VERTICAL MOBILE
   ============================================================ */
@media screen and (max-width: 768px) {
  /* --- AJUSTE DO MENU PARA VERTICAL NO CELULAR --- */
  /* Mantendo o padrão que funcionou no Index */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.4s ease;
    padding: 60px 40px;
    z-index: 2000;

    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 30px !important;
  }

  .nav-menu ul {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    width: 100%;
    display: flex !important;
  }

  .nav-menu ul li {
    width: 100%;
    list-style: none;
  }

  .nav-menu ul li a {
    font-size: 1.2rem;
    color: var(--color-primary);
    display: block;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-toggle:checked ~ .nav-menu {
    right: 0;
  }

  /* --- AJUSTES DE RESPONSIVIDADE DA GALERIA --- */
  .gallery-hero h1 {
    font-size: 2.2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr; /* Uma coluna no celular para as fotos não ficarem esmagadas */
    gap: 10px;
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
    height: 250px; /* Altura fixa confortável para mobile */
  }

  .photo-overlay {
    opacity: 1; /* No celular, as informações ficam sempre visíveis ou aparecem no toque */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  }

  .photo-info h3,
  .photo-info span {
    transform: translateY(0);
  }
}
