/* ===============================================================
   JONCE — Galeria de Obras
   =============================================================== */

:root {
  --preto: #111113;
  --vermelho: #e30613;       /* vermelho da marca — estados activos */
  --amarelo: #ffcc00;
  --cinza-texto: #55565a;
  --cinza-claro: #f4f4f5;
  --cinza-linha: #e2e2e4;
  --branco: #fff;

  --header-h: 118px;
  --max: 1600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--preto);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 900; letter-spacing: -.01em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 50;
  background: var(--branco);
  border-bottom: 1px solid var(--cinza-linha);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logótipo — losangos, "JONCE" e assinatura */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

.logo-mark { width: 120px; height: auto; }

.logo-txt {
  font-weight: 900;
  font-size: 34px;
  line-height: .95;
  letter-spacing: .04em;
  text-align: center;
}

.logo-txt small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .015em;
  color: var(--preto);
  margin-top: 3px;
}

/* Menu — centrado */
.nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nav a {
  color: #000000bf;
  padding: 4px 0;
  transition: color .2s;
  white-space: nowrap;
}

.nav a:hover,
.nav a.is-active { color: var(--vermelho); }

/* Selo dos 32 anos */
.anos {
  flex-shrink: 0;
  height: 88px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--preto);
  margin: 6px 0;
}

/* ---------------------------------------------------------------
   Hero (cabeçalho branco com faixa diagonal)
   --------------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 52px;
  background: var(--branco);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -8%;
  width: 62%;
  height: 190%;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f1 100%);
  transform: rotate(14deg);
  z-index: 0;
}

.hero .wrap { position: relative; z-index: 1; }

.breadcrumb {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cinza-texto);
  margin-bottom: 14px;
}

.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--vermelho); }
.breadcrumb .sep { margin: 0 6px; color: var(--cinza-linha); }
.breadcrumb .atual { color: #a0a0a4; }

.hero h1 {
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 400;
}

.hero-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  align-items: start;
}

.hero-intro {
  max-width: 720px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--cinza-texto);
}

/* ---------------------------------------------------------------
   Filtros
   --------------------------------------------------------------- */
.filtros {
  border-left: 2px solid var(--vermelho);
  padding-left: 22px;
  list-style: none;
}

.filtros li + li { margin-top: 5px; }

.filtros button {
  background: none;
  border: 0;
  padding: 2px 0;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--cinza-texto);
  cursor: pointer;
  transition: color .2s;
  text-align: left;
}

.filtros button:hover { color: var(--preto); }

.filtros button.is-active {
  color: var(--vermelho);
  font-weight: 700;
}

.filtros .conta {
  font-size: 12px;
  color: #a0a0a4;
  margin-left: 4px;
}

/* ---------------------------------------------------------------
   Grelha de obras
   --------------------------------------------------------------- */
.grelha {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 4px 4px;
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #1a1a1c;
  opacity: 0;
  animation: entrar .55s cubic-bezier(.2, .7, .3, 1) forwards;
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .3) 42%, rgba(0, 0, 0, .05) 100%);
  transition: background .4s;
}

.card:hover img { transform: scale(1.06); }

.card:hover::after {
  background: linear-gradient(to top, rgba(0, 0, 0, .84) 0%, rgba(0, 0, 0, .44) 55%, rgba(0, 0, 0, .18) 100%);
}

.card-titulo {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  color: var(--branco);
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.card-titulo::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  margin-top: 9px;
  background: var(--vermelho);
  transition: width .45s cubic-bezier(.2, .7, .3, 1);
}

.card:hover .card-titulo::after { width: 46px; }

.sem-resultados {
  grid-column: 1 / -1;
  padding: 90px 20px;
  text-align: center;
  color: var(--cinza-texto);
  font-size: 15px;
}

/* ---------------------------------------------------------------
   Página de detalhe da obra
   --------------------------------------------------------------- */
.obra-meta {
  list-style: none;
  font-size: 14.5px;
  line-height: 1.55;
}

.obra-meta li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 5px 0;
}

.obra-meta .rot {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vermelho);
  padding-top: 3px;
}

.obra-meta .val { color: var(--preto); }

.galeria-obra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 4px 4px;
}

.foto {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #1a1a1c;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}

.foto:hover img { transform: scale(1.04); }

/* Navegação entre obras, no fundo da página de detalhe */
.obra-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 34px 0 70px;
  border-top: 1px solid var(--cinza-linha);
  margin-top: 60px;
}

.obra-nav a {
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cinza-texto);
  transition: color .2s;
}

.obra-nav a:hover { color: var(--vermelho); }
.obra-nav .vazio { visibility: hidden; }

/* ---------------------------------------------------------------
   Lightbox
   --------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 10, 11, .94);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .28s;
}

.lightbox.aberto { display: flex; }
.lightbox.visivel { opacity: 1; }

.lb-img {
  max-width: 82vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  transition: transform .3s cubic-bezier(.2, .7, .3, 1);
  cursor: zoom-in;
}

.lb-img.zoom {
  transform: scale(1.7);
  cursor: zoom-out;
}

.lb-contador {
  position: absolute;
  top: 26px;
  left: 34px;
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
}

.lb-legenda {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 70vw;
  text-align: center;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  letter-spacing: .04em;
}

.lb-btn {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  padding: 12px;
  line-height: 0;
  transition: color .2s, transform .2s;
}

.lb-btn:hover { color: var(--vermelho); }
.lb-btn svg { width: 22px; height: 22px; }

.lb-fechar { top: 18px; right: 26px; }
.lb-zoom   { top: 18px; right: 74px; }
.lb-full   { top: 18px; right: 122px; }

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev { left: 22px; }
.lb-next { right: 22px; }

.lb-prev svg, .lb-next svg { width: 34px; height: 34px; }
.lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-next:hover { transform: translateY(-50%) translateX(4px); }

body.lb-aberto { overflow: hidden; }

/* ---------------------------------------------------------------
   Rodapé
   --------------------------------------------------------------- */
.footer-topo {
  position: relative;
  padding: 72px 0 66px;
  /* fotografia de fundo quase apagada — trocar aqui a obra, se quiser */
  background: #9a9a9c url('../img/obras/campus-benguela/1.jpg') center / cover no-repeat;
  background-blend-mode: luminosity;
}

footer {
  margin-top: 100px;
}

.footer-topo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(234, 234, 235, .955);
}

.footer-topo .wrap { position: relative; z-index: 1; }

.footer-cols {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1fr;
  gap: 40px 56px;
  align-items: start;
}

.footer-col h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #3a3a3c;
  margin-bottom: 22px;
}

.footer-col p {
  font-size: 15px;
  line-height: 1.95;
  color: #55565a;
  max-width: 420px;
}

/* Links rápidos */
.footer-links { list-style: none; }

.footer-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4.5px 0;
  font-size: 15px;
  color: #55565a;
  transition: color .2s;
}

.footer-links a:hover { color: var(--vermelho); }

.ic-seta {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #6a6b6f;
  transition: color .2s, transform .2s;
}

.footer-links a:hover .ic-seta {
  color: var(--vermelho);
  transform: translateX(3px);
}

/* Contactos */
.footer-contactos { list-style: none; }

.footer-contactos li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 9px 0;
}

.footer-contactos .ic {
  color: #6a6b6f;
  line-height: 0;
}

.footer-contactos .ic svg { width: 22px; height: 22px; }

.footer-contactos .val {
  font-size: 15px;
  line-height: 1.95;
  color: #55565a;
}

.footer-contactos .val a {
  display: block;
  transition: color .2s;
}

.footer-contactos .val a:hover { color: var(--vermelho); }

.footer-contactos .val small {
  display: block;
  font-size: 12.5px;
  line-height: 1.5;
  color: #7c7d81;
  margin-top: 2px;
}

/* Barra do copyright */
.footer-baixo {
  background: #efeff0;
  border-top: 1px solid #e0e0e2;
  padding: 21px 0;
  text-align: center;
  font-size: 15px;
  color: #6a6b6f;
}

/* Botão de voltar ao topo */
.ao-topo {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vermelho);
  color: var(--branco);
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}

.ao-topo.visivel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ao-topo:hover { background: #b8050f; }
.ao-topo svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------- */
@media (max-width: 1440px) {
  .nav { gap: 20px; font-size: 15px; }
  .logo-mark { width: 112px; }
  .logo-txt { font-size: 29px; }
  .anos { height: 74px; }
}

@media (max-width: 1280px) {
  .grelha { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1180px) {
  :root { --header-h: 84px; }

  .site-header .wrap { gap: 16px; }

  .logo { flex-direction: row; align-items: center; gap: 12px; }
  .logo-mark { width: 78px; }
  .logo-txt { font-size: 24px; text-align: left; }
  .logo-txt small { font-size: 9px; }
  .anos { height: 52px; order: 3; }

  .nav-toggle { display: block; order: 2; margin-left: auto; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--branco);
    border-bottom: 1px solid var(--cinza-linha);
    padding: 6px 26px 18px;
    display: none;
  }

  .nav.aberto { display: flex; }

  .nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--cinza-linha);
  }
}

@media (max-width: 1024px) {
  .wrap { padding: 0 26px; }

  .hero-cols {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    border-left: 0;
    border-top: 2px solid var(--vermelho);
    padding: 16px 0 0;
  }

  .filtros li + li { margin-top: 0; }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .grelha { grid-template-columns: repeat(2, 1fr); }
  .galeria-obra { grid-template-columns: 1fr; }

  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .lb-img { max-width: 92vw; }
}

@media (max-width: 620px) {
  .footer-topo { padding: 52px 0 46px; }
  .footer-cols { grid-template-columns: 1fr; gap: 36px; }
  .ao-topo { right: 14px; bottom: 14px; }

  .anos { display: none; }
  .logo-txt { font-size: 21px; }
  .logo-mark { width: 66px; }
}

@media (max-width: 560px) {
  .hero { padding-top: calc(var(--header-h) + 34px); }
  .grelha { grid-template-columns: 1fr; }
  .card { aspect-ratio: 3 / 2; }

  .obra-meta li { grid-template-columns: 76px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
