/* ========================================
   STICKY FOOTER - Shared Component
   ======================================== */

/* Footer Container */
.sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  z-index: 9998;
  gap: 8px;
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.sticky-footer.hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* Background only when nav is open */
.sticky-footer.nav-open {
  background: #202020;
}

/* Show footer above modal when modal is open */
.sticky-footer.modal-open,
.sticky-footer.modal-open.nav-open {
  z-index: var(--z-navbar);
  background: transparent;
}

/* Navigation Links */
.footer-nav {
  display: flex;
  align-items: center;
  gap: 50px;
  flex: 1;
  overflow: hidden;
  transition: opacity 0.3s ease, max-width 0.3s ease;
}

.footer-nav.hidden {
  opacity: 0;
  max-width: 0;
  gap: 0;
  pointer-events: none;
}

.footer-nav-item {
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #f6f6f6;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.57;
  transition: opacity 0.2s ease;
}

.footer-nav-item:hover {
  opacity: 1;
}

.footer-nav-item.active {
  opacity: 1;
}

.footer-nav-item.disabled {
  opacity: 0.4;
  cursor: default;
}

.footer-nav-item.disabled:hover {
  opacity: 0.4;
}

/* Toggle Button */
.footer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.toggle-label {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #f6f6f6;
  text-transform: uppercase;
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 25px;
  background: #3a3a3a;
  border-radius: 100px;
  transition: background 0.2s ease;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  background: #1cc94c;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

/* Toggle ON state (nav visible) */
.sticky-footer.nav-open .toggle-knob {
  transform: translateX(15px);
}

/* Toggle OFF state (nav hidden) */
.sticky-footer:not(.nav-open) .toggle-switch {
  background: #3a3a3a;
}

.sticky-footer:not(.nav-open) .toggle-knob {
  background: #666;
  transform: translateX(0);
}

/* ========================================
   MOBILE - Explore Button & Drawer
   ======================================== */

/* Hide mobile elements by default */
.mobile-explore-footer,
.mobile-drawer,
.mobile-drawer-overlay {
  display: none;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 1024px) {
  .footer-nav {
    gap: 30px;
  }

  .footer-nav-item {
    font-size: 14px;
  }
}

/* ========================================
   RESPONSIVE - MOBILE (< 768px)
   ======================================== */
@media (max-width: 768px) {
  /* Hide desktop footer on mobile */
  .sticky-footer.desktop-footer {
    display: none;
  }

  /* Show mobile explore button - full width bar */
  .mobile-explore-footer {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    z-index: var(--z-explore-footer);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Reversed progressive blur behind the explore button — strongest at the
     bottom edge, ramping to clear toward the top. Sits behind the button. */
  .mobile-explore-blur {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48px;
    pointer-events: none;
  }

  .meb-layer {
    position: absolute;
    inset: 0;
  }

  .meb-layer:nth-child(1) {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 80%, transparent 100%);
            mask-image: linear-gradient(to top, #000 0%, #000 80%, transparent 100%);
  }
  .meb-layer:nth-child(2) {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 50%, transparent 78%);
            mask-image: linear-gradient(to top, #000 0%, #000 50%, transparent 78%);
  }
  .meb-layer:nth-child(3) {
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 58%);
            mask-image: linear-gradient(to top, #000 0%, #000 30%, transparent 58%);
  }
  .meb-layer:nth-child(4) {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 38%);
            mask-image: linear-gradient(to top, #000 0%, transparent 38%);
  }

  /* Dark tint (site #1a1a1a) fading up — makes the blur read more evidently. */
  .meb-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(26, 26, 26, 0.9) 0%,
      rgba(26, 26, 26, 0.55) 50%,
      rgba(26, 26, 26, 0) 100%
    );
  }

  .mobile-explore-footer.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
  }

  /* Show mobile footer above modal when modal is open */
  .mobile-explore-footer.modal-open {
    z-index: var(--z-navbar);
  }

  /* Show mobile drawer and overlay above modal when modal is open */
  .mobile-drawer-overlay.modal-open {
    z-index: var(--z-drawer-overlay);
  }

  .mobile-drawer.modal-open {
    z-index: var(--z-drawer);
  }

  .explore-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 1;
  }

  .explore-btn:active {
    opacity: 0.7;
  }

  .explore-text {
    font-family: 'Archivo', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
  }

  .explore-icon {
    font-size: 12px;
    color: #ffffff;
    font-weight: 300;
    opacity: 0.8;
    transition: transform 0.3s ease;
  }

  /* Rotate icon when drawer is open */
  .mobile-explore-footer.drawer-open .explore-icon {
    transform: rotate(180deg);
  }

  /* Mobile Drawer Overlay */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-drawer-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Drawer */
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #252525;
    border-radius: 20px 20px 0 0;
    z-index: var(--z-drawer);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 12px 24px calc(70px + env(safe-area-inset-bottom, 0));
  }

  .mobile-drawer.open {
    transform: translateY(0);
  }

  /* Drawer Handle */
  .drawer-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 24px;
  }

  /* Drawer Navigation */
  .drawer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .drawer-nav-item {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #f6f6f6;
    text-decoration: none;
    padding: 22px 16px;
    letter-spacing: 1.5px;
    transition: opacity 0.2s ease;
  }

  .drawer-nav-item:active {
    opacity: 0.6;
  }

  .drawer-nav-item.active {
    color: #1cc94c;
  }

  .drawer-nav-item.disabled {
    opacity: 0.4;
    cursor: default;
  }

  .drawer-nav-item.disabled:active {
    opacity: 0.4;
  }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (< 480px)
   ======================================== */
@media (max-width: 480px) {
  .mobile-explore-footer {
    bottom: 2px;
  }

  .explore-btn {
    padding: 10px 14px;
    gap: 8px;
  }

  .explore-text {
    font-size: 14px;
    letter-spacing: 1.2px;
  }

  .explore-icon {
    font-size: 11px;
  }

  .mobile-drawer {
    padding: 12px 20px calc(60px + env(safe-area-inset-bottom, 0));
  }

  .drawer-nav-item {
    font-size: 12px;
    padding: 16px 12px;
  }
}
