.gallery-card { position: relative; display: block; overflow: hidden; aspect-ratio: 4/3; border-radius: var(--radius-md); padding: 3px; background: linear-gradient(135deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.gallery-card::before { content: ""; position: absolute; inset: 3px; z-index: 0; border-radius: calc(var(--radius-md) - 3px); background: #dfe6ef; }
.gallery-card::after { content: ""; position: absolute; inset: 3px; z-index: 1; border-radius: calc(var(--radius-md) - 3px); background: linear-gradient(180deg, transparent 55%, rgba(10,25,50,.6) 100%); opacity: 0; transition: opacity var(--transition); }
.gallery-card:hover { box-shadow: var(--shadow-glow); transform: translateY(-3px); }
.gallery-card:hover::after { opacity: 1; }
.gallery-card img { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-md) - 3px); transition: transform var(--transition); }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card.is-empty { cursor: default; box-shadow: none; }
.gallery-card.is-empty:hover { transform: none; box-shadow: none; }
.gallery-card.is-empty::before { background: var(--color-surface); }
.gallery-empty { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--color-text-muted, #8291a8); }
.gallery-empty i { font-size: 1.6rem; opacity: .5; }
.gallery-empty span { font-size: .78rem; font-weight: 600; opacity: .7; }

.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; flex-wrap: wrap; }
.gallery-page-numbers { display: flex; align-items: center; gap: 4px; }
.gallery-nav-btn, .gallery-page-btn { border: none; background: transparent; font-family: inherit; cursor: pointer; transition: var(--transition); }
.gallery-nav-btn { color: var(--color-primary); font-size: 1.4rem; font-weight: 300; line-height: 1; padding: 4px 6px; display: grid; place-items: center; }
.gallery-nav-btn:hover:not(:disabled) { color: var(--color-primary-dark); transform: scale(1.15); }
.gallery-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.gallery-page-btn { min-width: 32px; padding: 4px 2px; font-size: .95rem; font-weight: 500; letter-spacing: .01em; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.gallery-page-btn:hover { color: var(--color-primary); }
.gallery-page-btn.is-active { color: var(--color-primary); font-weight: 700; border-bottom-color: var(--color-primary); }
.lightbox { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; gap: 18px; padding: 28px; background: rgba(4,13,27,.92); }
.lightbox.is-open { display: flex; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.lightbox img { max-width: 92vw; max-height: 78vh; border-radius: var(--radius-sm); touch-action: pan-y; user-select: none; }
.lightbox-close { position: absolute; top: 18px; right: 22px; border: 0; background: none; color: #fff; font-size: 2rem; z-index: 2; }
.lightbox-counter { color: #fff; font-size: .9rem; font-weight: 600; letter-spacing: .02em; background: rgba(255,255,255,.12); padding: 4px 14px; border-radius: 999px; }
.lightbox-nav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1.1rem; display: grid; place-items: center; cursor: pointer; transition: var(--transition); }
.lightbox-nav:hover:not(:disabled) { background: linear-gradient(135deg, #fa7e1e 0%, #d62976 50%, #4f5bd5 100%); border-color: transparent; }
.lightbox-nav:disabled { opacity: .3; cursor: not-allowed; }
@media (max-width: 576px) {
  .lightbox { padding: 16px; gap: 8px; }
  .lightbox-nav { width: 38px; height: 38px; font-size: .95rem; }
}
