/* ═══════════════════════════════
   VXGF — Gallery Front
═══════════════════════════════ */

.vxgf-page {
  position: relative;
  width: 100%;
  min-height: 60vh;
}

/* ═══ INTRO CINEMATIC ═══ */
body.vxgf-intro-active { overflow: hidden; }

.vxgf-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050510;
  overflow: hidden;
  transition: opacity .8s ease;
}
.vxgf-intro.vxgf-intro-fading { opacity: 0; }

.vxgf-intro-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(.35);
  opacity: 0;
  transition: opacity 1.8s ease, background-image 1.2s ease;
  transform: scale(1.15);
}
.vxgf-intro-bg.has-image { opacity: 1; }

.vxgf-intro-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(5,5,16,.2) 0%,
              rgba(5,5,16,.85) 60%,
              rgba(5,5,16,.95) 100%);
}

.vxgf-intro-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  z-index: 2;
}

.vxgf-intro-slide {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  max-width: 900px;
  width: 100%;
}
.vxgf-intro-slide.show {
  opacity: 1;
  transform: translateY(0);
}

.vxgf-intro-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.vxgf-intro-text {
  font-size: clamp(28px, 5vw, 68px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1px;
  text-shadow: 0 4px 24px rgba(0,0,0,.6);
}

.vxgf-intro-sub {
  font-size: clamp(14px, 1.6vw, 18px);
  color: rgba(255,255,255,.75);
  margin-top: 14px;
  font-weight: 300;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.vxgf-intro-skip {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3px;
  transition: background .2s, border-color .2s;
}
.vxgf-intro-skip:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
}

/* ═══ MAIN GALLERY ═══ */
.vxgf-main {
  padding: 32px 24px 60px;
  margin: 0 auto;
}

.vxgf-header {
  text-align: center;
  margin-bottom: 36px;
  animation: vxgf-fade-up .7s ease-out both;
}

.vxgf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--vx-text-3);
}
.vxgf-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--vx-primary);
}

.vxgf-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  margin: 12px 0 8px;
  color: var(--vx-text);
  letter-spacing: -.5px;
}

.vxgf-desc {
  font-size: 15px;
  color: var(--vx-text-2);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.55;
}

.vxgf-loading {
  text-align: center;
  padding: 60px 0;
}
.vxgf-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--vx-border);
  border-top-color: var(--vx-primary);
  border-radius: 50%;
  animation: vxgf-spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes vxgf-spin { to { transform: rotate(360deg); } }

.vxgf-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--vx-text-3);
  font-size: 14px;
}

/* ═══ GRIGLIA FOTO ═══ */
.vxgf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  transition: filter .4s ease, transform .4s ease;
}

body.vxgf-expand-active .vxgf-grid {
  filter: blur(8px) brightness(.6);
  transform: scale(.98);
  pointer-events: none;
}

body.vxgf-expand-active .vxgf-header,
body.vxgf-expand-active .vxgf-other {
  filter: blur(6px) brightness(.55);
  transform: scale(.99);
  transition: filter .4s ease, transform .4s ease;
  pointer-events: none;
}

.vxgf-cell {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: zoom-in;
  background: var(--vx-bg-input);
  opacity: 0;
  animation: vxgf-cell-in .5s ease-out forwards;
  transform: translateY(8px);
  transition: transform .25s ease, box-shadow .25s ease;
}
.vxgf-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  z-index: 2;
}
.vxgf-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.vxgf-cell:hover img { transform: scale(1.04); }

@keyframes vxgf-cell-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes vxgf-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ ALTRI ALBUM (carousel) ═══ */
.vxgf-other {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--vx-border);
}
.vxgf-other-header {
  text-align: center;
  margin-bottom: 18px;
}
.vxgf-other-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  -webkit-overflow-scrolling: touch;
}
.vxgf-other-track::-webkit-scrollbar { height: 4px; }
.vxgf-other-track::-webkit-scrollbar-thumb { background: var(--vx-border); border-radius: 2px; }

.vxgf-other-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--vx-bg-card);
  border: 1px solid var(--vx-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.vxgf-other-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
}
.vxgf-other-cover {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--vx-bg-input);
}
.vxgf-other-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.vxgf-other-noimg {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--vx-bg-input), var(--vx-border));
}
.vxgf-other-body { padding: 12px 14px; }
.vxgf-other-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--vx-text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vxgf-other-meta {
  font-size: 11px;
  color: var(--vx-text-3);
}

/* ═══ FOTO ESPANSA (FLIP) ═══ */
.vxgf-expand {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: rgba(5, 5, 20, 0);
  transition: background .4s ease;
}
.vxgf-expand.open {
  pointer-events: auto;
  background: rgba(5, 5, 20, .55);
}
.vxgf-expand.closing {
  background: rgba(5, 5, 20, 0);
}

.vxgf-expand-img {
  position: fixed;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05);
  cursor: zoom-out;
  z-index: 9001;
  background: #111;
}

.vxgf-expand-cap {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.65);
  color: #fff;
  padding: 10px 22px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 500;
  max-width: 80vw;
  text-align: center;
  z-index: 9002;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .4s ease .2s;
}
.vxgf-expand.open .vxgf-expand-cap { opacity: 1; }

.vxgf-expand-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9003;
  opacity: 0;
  transition: opacity .4s ease .25s, background .2s;
  backdrop-filter: blur(10px);
}
.vxgf-expand.open .vxgf-expand-arrow { opacity: 1; }
.vxgf-expand-arrow:hover { background: rgba(255,255,255,.22); }
.vxgf-expand-prev { left: 24px; }
.vxgf-expand-next { right: 24px; }

.vxgf-expand-close {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9003;
  opacity: 0;
  transition: opacity .4s ease .25s, background .2s;
  backdrop-filter: blur(10px);
}
.vxgf-expand.open .vxgf-expand-close { opacity: 1; }
.vxgf-expand-close:hover { background: rgba(255,255,255,.22); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .vxgf-main { padding: 20px 14px 40px; }
  .vxgf-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }
  .vxgf-other-card { flex: 0 0 200px; }
  .vxgf-expand-arrow { width: 40px; height: 40px; }
  .vxgf-expand-prev { left: 10px; }
  .vxgf-expand-next { right: 10px; }
}
