/* =====================================================================
   ABEPRO, Galeria (prefixo gl-)
   Linha do tempo de álbuns, grade de fotos e visualizador em tela cheia.
   Carregado DEPOIS de tokens.css + abepro.css + historia.css
   ===================================================================== */

/* ---- Filtros por evento ---- */
.gl-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-filter { display: inline-flex; align-items: center; gap: 9px; background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-pill); padding: 8px 15px; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--neutral-700); cursor: pointer; transition: background var(--duration-base), color var(--duration-base), border-color var(--duration-base); }
.gl-filter i { font-size: 12px; color: var(--brand-400); }
.gl-filter:hover { border-color: var(--brand-300); color: var(--brand-700); background: var(--brand-50); }
.gl-filter.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.gl-filter.is-active i { color: var(--accent-400); }
.gl-filter__n { font-size: 10px; font-weight: 700; background: var(--neutral-100); color: var(--neutral-600); border-radius: var(--radius-pill); padding: 2px 7px; }
.gl-filter.is-active .gl-filter__n { background: rgba(255,255,255,.18); color: #fff; }

/* ---- Linha do tempo por ano ---- */
.gl-timeline { position: relative; }
.gl-year { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: var(--space-5); padding-bottom: var(--space-6); }
.gl-year::before { content: ""; position: absolute; left: 119px; top: 8px; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--brand-300), var(--brand-100)); }
.gl-year:last-child::before { bottom: 40px; }
.gl-year__mark { position: sticky; top: 96px; text-align: right; padding-right: var(--space-3); }
.gl-year__n { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-3xl); color: var(--brand-700); line-height: 1; }
.gl-year__c { display: block; font-size: 12px; color: var(--neutral-500); margin-top: 6px; }
.gl-year__mark::after { content: ""; position: absolute; right: -8px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--brand-500); z-index: 1; }
.gl-year__items { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); padding-left: var(--space-2); }

/* ---- Cartão de álbum ---- */
.gl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-xl); overflow: hidden; color: inherit; transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base); }
.gl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gl-card__cover { position: relative; aspect-ratio: 3 / 2; background: linear-gradient(120deg, var(--brand-800), var(--brand-500)); overflow: hidden; }
.gl-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--duration-xslow) var(--ease-out); }
.gl-card:hover .gl-card__cover img { transform: scale(1.05); }
.gl-card__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,18,40,.25) 0%, rgba(0,18,40,0) 45%); }
.gl-card__badge { position: absolute; top: 12px; left: 12px; z-index: 1; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(0,18,40,.55); backdrop-filter: blur(6px); border-radius: var(--radius-pill); padding: 5px 11px; }
.gl-card__n { position: absolute; top: 12px; right: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--brand-800); background: rgba(255,255,255,.92); border-radius: var(--radius-pill); padding: 5px 11px; }
.gl-card__n i { font-size: 10px; color: var(--brand-500); }
.gl-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.gl-card__date { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; color: var(--brand-500); text-transform: uppercase; }
.gl-card__title { font-family: var(--font-sans); font-weight: 600; font-size: 16px; color: var(--neutral-900); line-height: 1.35; }
.gl-card__text { font-size: 13.5px; color: var(--neutral-600); line-height: 1.6; flex: 1; }
.gl-card__place { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--neutral-500); margin-top: auto; padding-top: 6px; }
.gl-card__place i { color: var(--brand-400); }

/* ---- Cabeçalho de álbum ---- */
.gl-head { position: relative; overflow: hidden; color: #fff; background: linear-gradient(140deg, var(--brand-950) 0%, var(--brand-800) 48%, var(--brand-600) 100%); padding: var(--space-8) 0; }
.gl-head__deco { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.gl-head__in { position: relative; max-width: 860px; }
.gl-head .overline { color: var(--accent-400); }
.gl-head__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.2vw, var(--text-4xl)); line-height: 1.12; color: #fff; margin: 12px 0 18px; }
.gl-head__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: rgba(255,255,255,.78); }
.gl-head__meta span { display: inline-flex; align-items: center; gap: 7px; }
.gl-head__meta i { color: var(--accent-400); }
.gl-head__text { font-size: var(--text-md); color: rgba(255,255,255,.84); line-height: 1.7; margin-top: 18px; max-width: 680px; }

/* ---- Grade de fotos ---- */
.gl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gl-photo { position: relative; margin: 0; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 3 / 2; background: var(--brand-100); cursor: zoom-in; }
.gl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--duration-xslow) var(--ease-out); }
.gl-photo:hover img { transform: scale(1.05); }
.gl-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; font-size: 12.5px; color: #fff; background: linear-gradient(180deg, rgba(0,18,40,0), rgba(0,18,40,.72)); opacity: 0; transition: opacity var(--duration-base); }
.gl-photo:hover figcaption, .gl-photo:focus-visible figcaption { opacity: 1; }
.gl-photo:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }

/* ---- Visualizador em tela cheia ---- */
.gl-lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: none; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-5); background: rgba(0,18,40,.94); }
.gl-lightbox.is-open { display: flex; }
.gl-lightbox__fig { margin: 0; max-width: min(1100px, 82vw); text-align: center; }
.gl-lightbox__fig img { max-width: 100%; max-height: 76vh; border-radius: var(--radius-lg); display: block; margin: 0 auto; }
.gl-lightbox__fig figcaption { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 16px; }
.gl-lightbox__close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 18px; cursor: pointer; }
.gl-lightbox__close:hover { background: rgba(255,255,255,.22); }
.gl-lightbox__nav { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.gl-lightbox__nav:hover { background: rgba(255,255,255,.22); }

/* ---- Navegação entre álbuns ---- */
.gl-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.gl-nav__item { display: flex; flex-direction: column; gap: 6px; background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-xl); padding: 18px 22px; color: inherit; transition: border-color var(--duration-base), box-shadow var(--duration-base); }
.gl-nav__item:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.gl-nav__item--next { text-align: right; }
.gl-nav__dir { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-500); }
.gl-nav__item--next .gl-nav__dir { justify-content: flex-end; }
.gl-nav__t { font-family: var(--font-sans); font-weight: 600; font-size: 15px; color: var(--neutral-900); line-height: 1.35; }

.gl-empty { display: none; text-align: center; padding: var(--space-6); color: var(--neutral-500); font-size: 14.5px; }
.gl-empty.is-visible { display: block; }

/* ---- Responsivo ---- */
@media (max-width: 1023px) {
  .gl-year { grid-template-columns: 78px 1fr; gap: var(--space-3); }
  .gl-year::before { left: 77px; }
  .gl-year__n { font-size: var(--text-2xl); }
  .gl-year__items { grid-template-columns: 1fr; }
  .gl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .gl-year { grid-template-columns: 1fr; gap: var(--space-2); }
  .gl-year::before { display: none; }
  .gl-year__mark { position: static; text-align: left; padding: 0 0 var(--space-2); display: flex; align-items: baseline; gap: 12px; }
  .gl-year__mark::after { display: none; }
  .gl-year__c { margin-top: 0; }
  .gl-year__items { padding-left: 0; }
  .gl-grid { grid-template-columns: 1fr; }
  .gl-nav { grid-template-columns: 1fr; }
  .gl-nav__item--next { text-align: left; }
  .gl-nav__item--next .gl-nav__dir { justify-content: flex-start; }
  .gl-lightbox { padding: var(--space-2); gap: 6px; }
  .gl-lightbox__nav { width: 38px; height: 38px; font-size: 15px; }
}
