/* =========================================================
   GORDON & SMITH — galeria.css
   ========================================================= */

/* ── HERO ─────────────────────────────────────────────── */
.gl-hero {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--black);
  margin-top: 80px;
}

.gl-hero-bg {
  position: absolute;
  inset: 0;
}

.gl-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.gl-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.7) 0%, rgba(10,10,10,0.4) 100%);
}

.gl-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 780px;
}

.gl-hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 14px 0 18px;
}

.gl-hero-content h1 span { color: var(--gold); }

.gl-hero-content p {
  font-size: 1rem;
  color: var(--gray2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── STATS BAR ────────────────────────────────────────── */
.gl-stats {
  background: var(--dark);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.gl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 48px;
  gap: 4px;
  position: relative;
}

.gl-stat + .gl-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 28px; bottom: 28px;
  width: 1px;
  background: rgba(255,255,255,0.07);
}

.gl-stat strong {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.gl-stat span {
  font-size: 0.72rem;
  color: var(--gray);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── GALLERY SECTION ──────────────────────────────────── */
.gl-galeria {
  background: var(--black);
  padding: 100px 0 80px;
}

/* Filters */
.gl-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.gl-filter {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--gray2);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}

.gl-filter:hover { border-color: var(--gold); color: var(--gold); }
.gl-filter.active { background: var(--gold); border-color: var(--gold); color: var(--black); }

/* Masonry grid */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  grid-auto-flow: row dense;
  gap: 10px;
}

.gl-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--gray2);
  font-size: 0.95rem;
  padding: 60px 20px;
}

.gl-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: zoom-in;
  background: var(--dark2);
}

.gl-item.span-2c { grid-column: span 2; }
.gl-item.span-2r { grid-row: span 2; }

.gl-item img,
.gl-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.gl-item:hover img { transform: scale(1.06); }

/* Vídeo toca inline (controles nativos) — não abre o lightbox de imagem. */
.gl-item[data-tipo="video"] { cursor: default; }

.gl-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.gl-item:hover .gl-item-overlay { opacity: 1; }

.gl-item-cat {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.gl-item-caption {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.gl-item-zoom {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: #fff;
  backdrop-filter: blur(4px);
}

.gl-item:hover .gl-item-zoom { opacity: 1; }

/* Hidden (filter) */
.gl-item.gl-hidden { display: none; }

/* ── TIMELINE ─────────────────────────────────────────── */
.gl-timeline {
  background: var(--dark);
  padding: 100px 0;
}

.gl-tl-wrap {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 20px;
}

.gl-tl-line {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.3) 10%, rgba(201,168,76,0.3) 90%, transparent);
  transform: translateX(-50%);
}

.gl-tl-item {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 56px;
  position: relative;
}

.gl-tl-item:nth-child(even) { flex-direction: row-reverse; }

.gl-tl-year {
  width: calc(50% - 24px);
  text-align: right;
  flex-shrink: 0;
}

.gl-tl-item:nth-child(even) .gl-tl-year { text-align: left; }

.gl-tl-year strong {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.gl-tl-dot {
  flex-shrink: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.2);
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.gl-tl-body {
  width: calc(50% - 24px);
  flex-shrink: 0;
}

.gl-tl-body h4 {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}

.gl-tl-body p {
  font-size: 0.82rem;
  color: var(--gray2);
  line-height: 1.6;
}

/* ── BTS SECTION ──────────────────────────────────────── */
.gl-bts {
  background: var(--dark2);
  padding: 100px 0;
}

.gl-bts-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.gl-bts-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gl-bts-img {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gl-bts-img:first-child { grid-column: span 2; aspect-ratio: 16/9; }

.gl-bts-img img { width: 100%; height: 100%; object-fit: cover; }

.gl-bts-text .section-tag { margin-bottom: 16px; }

.gl-bts-text h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.gl-bts-text h2 span { color: var(--gold); }

.gl-bts-text p {
  color: var(--gray2);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.gl-bts-text a { margin-top: 10px; display: inline-block; }

/* ── CTA ──────────────────────────────────────────────── */
.gl-cta {
  background: var(--black);
  padding: 100px 0;
  text-align: center;
}

.gl-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.gl-cta h2 span { color: var(--gold); }

.gl-cta p {
  color: var(--gray2);
  font-size: 1rem;
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto; margin-right: auto;
  line-height: 1.7;
}

.gl-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── LIGHTBOX ─────────────────────────────────────────── */
.gl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
}

.gl-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.gl-lb-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#glLbImg {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.gl-lb-caption {
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--gray2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gl-lb-close {
  position: fixed;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}

.gl-lb-close:hover { background: rgba(255,255,255,0.18); }

.gl-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}

.gl-lb-nav:hover { background: rgba(255,255,255,0.18); }
#glLbPrev { left: 16px; }
#glLbNext { right: 16px; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .gl-bts-inner { grid-template-columns: 1fr; gap: 48px; }
  .gl-bts-imgs { order: -1; }
}

@media (max-width: 900px) {
  .gl-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .gl-item.span-2c { grid-column: span 2; }
  .gl-tl-item, .gl-tl-item:nth-child(even) {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-left: 24px;
  }
  .gl-tl-line { left: 7px; }
  .gl-tl-year, .gl-tl-item:nth-child(even) .gl-tl-year { width: auto; text-align: left; }
  .gl-tl-body { width: auto; }
  .gl-tl-dot { position: absolute; left: 0; margin-top: 4px; }
}

@media (max-width: 640px) {
  .gl-hero { height: 400px; }
  .gl-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .gl-item.span-2c { grid-column: span 2; }
  .gl-stat { padding: 22px 28px; }
  .gl-stat strong { font-size: 1.5rem; }
  .gl-filters { gap: 6px; }
  .gl-filter { padding: 7px 14px; font-size: 0.65rem; }
}

@media (max-width: 420px) {
  .gl-grid { grid-template-columns: 1fr; }
  .gl-item.span-2c, .gl-item.span-2r { grid-column: unset; grid-row: unset; }
}
