/* ==========================================================================
   LUXE — Dedicated Gallery CSS
   ========================================================================== */

/* ---------- Gallery Hero ---------- */
.gallery-hero {
  position: relative;
  overflow: hidden;
  background: #0B1220;
  padding: 100px 0 80px;
  text-align: center;
  color: #fff;
}
.gallery-hero .hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.4), transparent 50%),
    radial-gradient(circle at 15% 85%, rgba(16, 185, 129, 0.2), transparent 45%);
  filter: blur(10px);
  animation: meshDrift 14s ease-in-out infinite alternate;
}

/* ---------- Filters ---------- */
.gallery-filters-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.gallery-filter-btn {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  transition: var(--transition-base);
  cursor: pointer;
}
.gallery-filter-btn:hover {
  background: #F1F5F9;
  border-color: var(--color-text-light);
}
.gallery-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/* ---------- Masonry Grid ---------- */
.gallery-masonry {
  column-count: 3;
  column-gap: 24px;
}
@media (max-width: 992px) {
  .gallery-masonry {
    column-count: 2;
  }
}
@media (max-width: 576px) {
  .gallery-masonry {
    column-count: 1;
  }
}

.masonry-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  background: var(--color-card);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.gallery-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.masonry-item:hover .gallery-link img {
  transform: scale(1.05);
}

/* ---------- Hover Overlay ---------- */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.gallery-link:hover .gallery-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: #fff;
  padding: 20px;
  transform: translateY(15px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-link:hover .overlay-content {
  transform: translateY(0);
}

.zoom-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 12px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.view-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  display: block;
  margin-bottom: 8px;
}

.overlay-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.overlay-category {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ---------- Featured Collections ---------- */
.collection-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-base);
  height: 100%;
}
.collection-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(37, 99, 235, 0.2);
}
.collection-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F1F5F9;
}
.collection-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.collection-card:hover .collection-cover img {
  transform: scale(1.05);
}
.collection-badge-count {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(11, 18, 32, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.collection-info {
  padding: 24px;
}

/* ---------- Instagram Feed Grid ---------- */
.insta-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 992px) {
  .insta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 576px) {
  .insta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.insta-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.insta-item:hover img {
  transform: scale(1.08);
}
.insta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.insta-item:hover .insta-overlay {
  opacity: 1;
}

/* ---------- Video Gallery ---------- */
.video-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-base);
  height: 100%;
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(37, 99, 235, 0.2);
}
.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.5s ease;
}
.video-card:hover .video-thumb-wrap img {
  transform: scale(1.04);
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5);
  transition: var(--transition-base);
  z-index: 3;
}
.video-card:hover .video-play-btn {
  background: #fff;
  color: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
}
.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  z-index: 3;
}
.video-info {
  padding: 20px;
}

/* ---------- Newsletter ---------- */
.newsletter-section {
  background: var(--color-text-dark);
  border-radius: var(--radius-lg);
  padding: 56px;
  color: #fff;
  text-align: center;
}
.newsletter-form { max-width: 460px; margin: 24px auto 0; display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: none;
  padding: 13px 22px;
}

/* ---------- 7. Custom Lightbox Modal ---------- */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.95);
  z-index: 1100;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-modal.show {
  display: flex;
  opacity: 1;
}
.gallery-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1110;
}
.gallery-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}
.gallery-modal-viewport {
  width: 90%;
  height: 75%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
}
.gallery-modal-viewport:active {
  cursor: grabbing;
}
.gallery-modal-img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.25, 1);
  transform-origin: center center;
}
.gallery-modal-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.gallery-modal-controls {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  z-index: 1110;
}
.gallery-ctrl-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gallery-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}
.gallery-ctrl-btn:active {
  transform: scale(0.95);
}
