/* ============ GALERIA — design alinhado com index.html ============ */
:root {
  --gold: #e9b93b;
  --gold-glow: rgba(233, 185, 59, 0.18);
}

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-item, .gallery-item img, .gallery-overlay { transition: none !important; }
}

body {
  background: var(--dark);
  color: #e6ecf9;
}

/* ============ NAVBAR / MENU MOBILE ============ */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  z-index: 260;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #e6ecf9;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ CABEÇALHO DA PÁGINA (HERO) ============ */
.galeria-hero {
  position: relative;
  overflow: hidden;
  padding: 180px 0 90px;
  background: var(--dark);
  text-align: center;
}

.galeria-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 10%, rgba(26, 108, 229, 0.2), transparent),
    radial-gradient(ellipse 60% 80% at 15% 90%, rgba(10, 45, 122, 0.5), transparent),
    radial-gradient(ellipse 40% 40% at 85% 80%, rgba(233, 185, 59, 0.06), transparent);
}

.galeria-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.galeria-hero .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #06122b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 30px;
  margin-bottom: 22px;
  box-shadow: 0 12px 28px rgba(233, 185, 59, 0.25);
}

.galeria-hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.galeria-hero h1 span {
  color: var(--gold);
}

.galeria-hero p {
  color: #8a98b8;
  max-width: 640px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
}

.galeria-count {
  display: inline-block;
  margin-top: 22px;
  color: #aeb9d4;
  font-size: 14px;
  font-weight: 600;
}

.galeria-count strong { color: var(--gold); }

/* ============ FILTROS ============ */
.galeria-section {
  padding: 60px 0 110px;
}

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 46px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #aeb9d4;
  padding: 9px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.25s;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gold);
  color: #06122b;
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(233, 185, 59, 0.3);
}

.filter-btn .n {
  opacity: 0.7;
  font-size: 0.75rem;
  margin-left: 5px;
}

/* ============ GRELHA (MASONRY) ============ */
.gallery-grid {
  column-count: 4;
  column-gap: 20px;
}

@media (max-width: 1000px) {
  .gallery-grid { column-count: 3; }
}
@media (max-width: 700px) {
  .gallery-grid { column-count: 2; }
}
@media (max-width: 480px) {
  .gallery-grid { column-count: 1; }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.gallery-item:hover {
  transform: translateY(-6px);
  border-color: rgba(233, 185, 59, 0.45);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(233, 185, 59, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(6, 18, 43, 0.95), rgba(6, 18, 43, 0));
  color: var(--white);
  padding: 46px 16px 14px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: none;
}

.gallery-overlay small {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

.no-fotos {
  text-align: center;
  color: #8a98b8;
  padding: 60px 20px;
  font-size: 16px;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(4, 10, 25, 0.94);
  backdrop-filter: blur(6px);
  display: none;
  place-items: center;
  padding: 30px;
}

.lightbox.open { display: grid; }

.lightbox figure {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.lightbox figcaption {
  color: #c6d0e6;
  margin-top: 14px;
  font-weight: 600;
}

.lb-close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.25s;
  z-index: 2;
}

.lb-close:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #06122b;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    z-index: 250;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 100px 34px 40px;
    background: rgba(4, 10, 25, 0.96);
    backdrop-filter: blur(18px);
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  nav.open { transform: translateX(0); }

  nav a {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 0;
    font-size: 19px;
    color: #e6ecf9;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  nav.open .nav-social {
    display: flex;
    margin-top: 24px;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
  }

  .galeria-hero { padding: 150px 0 70px; }
  .galeria-section { padding: 40px 0 80px; }
}

@media (max-width: 600px) {
  .logo-text { display: none; }
  .filter-bar { gap: 8px; }
}
