/* ============================================================
   INFRAHARD — Estilos exclusivos da página Galeria
   Para alterar o layout das fotos, edite este arquivo
   ============================================================ */

/* ── Hero da página de galeria (cabeçalho) ─────────────────── */
.gallery-hero {
  background: var(--navy);
  /* grade de linhas no fundo */
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  padding: 140px 0 60px; /* espaço extra no topo por causa do header fixo */
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* brilho azul decorativo */
.gallery-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 70% 50%, rgba(30,111,191,0.2), transparent 70%); pointer-events: none; }
.gallery-hero .wrap   { position: relative; z-index: 1; }
.gallery-hero h1      { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: 12px 0 16px; }
.gallery-hero > .wrap > p { color: var(--silver); font-size: 1.05rem; max-width: 520px; }

/* Linha com contador de fotos e filtros */
.gallery-meta    { display: flex; align-items: center; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.gallery-count   { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); background: rgba(244,122,32,0.12); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(244,122,32,0.3); }

/* Botões de filtro por categoria */
.gallery-filters   { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn        { background: none; border: 1px solid var(--line-strong); color: var(--silver); padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; cursor: pointer; transition: all 0.2s; font-family: 'IBM Plex Sans', sans-serif; }
.filter-btn:hover  { border-color: var(--blue-light); color: var(--blue-light); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; } /* filtro ativo */

/* ── Seção com a grade de fotos ─────────────────────────────── */
.gallery-section { padding: 60px 0 80px; background: var(--paper); }

/* Grade responsiva de fotos — 4 colunas no desktop */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colunas */
  gap: 10px;
}
@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } } /* 3 colunas no tablet */
@media (max-width: 640px)  { .gallery-grid { grid-template-columns: repeat(2, 1fr); } } /* 2 colunas no mobile */
@media (max-width: 400px)  { .gallery-grid { grid-template-columns: 1fr; } }             /* 1 coluna em telas muito pequenas */

/* Card individual de foto */
.gallery-item {
  position: relative;
  border-radius: 8px;       /* bordas arredondadas */
  overflow: hidden;          /* garante que a imagem respeite o border-radius */
  aspect-ratio: 4/3;         /* proporção fixa para uniformidade */
  cursor: pointer;           /* indica que é clicável */
  background: var(--paper-deep); /* cor de fundo enquanto a imagem carrega */
}

/* Imagem dentro do card */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* preenche o card sem distorcer */
  transition: transform 0.35s ease; /* zoom suave no hover */
  display: block;
}

/* Zoom leve na imagem ao passar o mouse */
.gallery-item:hover img { transform: scale(1.06); }

/* Overlay escuro com ícone de expandir (visível no hover) */
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(11, 25, 41, 0.55); /* fundo semitransparente azul escuro */
  display: flex; align-items: center; justify-content: center;
  opacity: 0;                           /* invisível por padrão */
  transition: opacity 0.3s ease;
}
/* Aparece ao passar o mouse */
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── LIGHTBOX — visualizador em tela cheia ──────────────────── */

/* Fundo escuro atrás do lightbox */
.lightbox-overlay {
  display: none;            /* oculto por padrão */
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 200;
}
/* Aparece quando lightbox está aberto */
.lightbox-overlay.active { display: block; }

/* Container principal do lightbox */
.lightbox {
  display: none;            /* oculto por padrão */
  position: fixed; inset: 0;
  z-index: 201;
  align-items: center; justify-content: center;
}
.lightbox.active { display: flex; } /* visível quando ativo */

/* Wrapper da imagem central */
.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;          /* não ultrapassa 90% da largura da tela */
  max-height: 88vh;         /* não ultrapassa 88% da altura da tela */
  display: flex; align-items: center; justify-content: center;
}

/* Imagem ampliada dentro do lightbox */
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;      /* exibe a imagem completa sem corte */
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

/* Contador "X de Y fotos" */
.lightbox-counter {
  position: absolute; bottom: -32px; left: 50%; transform: translateX(-50%);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.6);
}

/* Botões de navegação (anterior/próximo) */
.lightbox-prev,
.lightbox-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 2.2rem; width: 52px; height: 52px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; backdrop-filter: blur(4px); line-height: 1;
  z-index: 202;
}
.lightbox-prev { left: 20px; }   /* botão anterior: lado esquerdo */
.lightbox-next { right: 20px; }  /* botão próximo: lado direito */
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(244,122,32,0.6); border-color: var(--orange); }

/* Botão de fechar (X) */
.lightbox-close {
  position: fixed; top: 20px; right: 20px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.8rem; width: 46px; height: 46px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 202; line-height: 1;
}
.lightbox-close:hover { background: rgba(220,50,50,0.6); }

/* ── CTA final da galeria ───────────────────────────────────── */
.gallery-bottom-cta {
  background: var(--navy);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  color: #fff; padding: 80px 0;
  position: relative; overflow: hidden;
}
.gallery-bottom-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(30,111,191,0.15), transparent 70%); pointer-events: none; }
.gallery-bottom-cta .wrap { position: relative; z-index: 1; }
.gallery-bottom-cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: 12px; }
.gallery-bottom-cta p  { color: var(--silver); font-size: 1.04rem; }

/* ── Acessibilidade: foco visível nos botões do lightbox ────── */
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-close:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
