/* ========================================
   SECTION NAVIGATION ARROWS
   Cyber-precision industrial design
   ======================================== */

/* ========== MAIN CONTAINER ========== */
.section-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 20, 0.85) 0%,
    rgba(15, 15, 15, 0.92) 50%,
    rgba(20, 20, 20, 0.85) 100%
  );
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 40px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 40px rgba(255, 107, 53, 0.08);
  opacity: 0;
  animation: navSlideIn 0.8s ease-out 1.5s forwards;
}

@keyframes navSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* ========== NAVIGATION ARROWS ========== */
.section-nav__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.section-nav__arrow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 107, 53, 0.15) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.section-nav__arrow:hover::before {
  opacity: 1;
}

.section-nav__arrow svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 2.5;
  fill: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.section-nav__arrow:hover svg {
  stroke: #ff6b35;
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
  transform: scale(1.1);
}

.section-nav__arrow:active svg {
  transform: scale(0.95);
}

/* Arrow bounce animation on hover */
.section-nav__arrow--up:hover svg {
  animation: bounceUp 0.6s ease infinite;
}

.section-nav__arrow--down:hover svg {
  animation: bounceDown 0.6s ease infinite;
}

@keyframes bounceUp {
  0%, 100% { transform: translateY(0) scale(1.1); }
  50% { transform: translateY(-3px) scale(1.1); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0) scale(1.1); }
  50% { transform: translateY(3px) scale(1.1); }
}

/* Disabled state */
.section-nav__arrow:disabled {
  cursor: default;
  opacity: 0.25;
}

.section-nav__arrow:disabled:hover::before {
  opacity: 0;
}

.section-nav__arrow:disabled:hover svg {
  stroke: rgba(255, 255, 255, 0.4);
  filter: none;
  transform: none;
  animation: none;
}

/* ========== MENU BUTTON ========== */
.section-nav__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.section-nav__menu-btn svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 107, 53, 0.7);
  transition: all 0.3s ease;
}

.section-nav__menu-btn:hover svg {
  color: #ff6b35;
  filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.5));
}

.section-nav__menu-btn[aria-expanded="true"] svg {
  color: #ff6b35;
}

/* ========== SECTION PANEL ========== */
.section-nav__panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: linear-gradient(
    135deg,
    rgba(20, 20, 20, 0.95) 0%,
    rgba(15, 15, 15, 0.98) 100%
  );
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 160px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 30px rgba(255, 107, 53, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-nav__panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* Panel arrow pointer */
.section-nav__panel::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(18, 18, 18, 0.95);
  border-right: 1px solid rgba(255, 107, 53, 0.25);
  border-top: 1px solid rgba(255, 107, 53, 0.25);
}

.section-nav__panel-header {
  font-family: 'Rajdhani', 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 107, 53, 0.8);
  padding: 0 16px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
}

.section-nav__panel-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Custom scrollbar for panel */
.section-nav__panel-list::-webkit-scrollbar {
  width: 4px;
}

.section-nav__panel-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.section-nav__panel-list::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 53, 0.3);
  border-radius: 2px;
}

.section-nav__panel-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 53, 0.5);
}

.section-nav__panel-item {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-family: 'Rajdhani', 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.section-nav__panel-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ff6b35;
  opacity: 0;
  transform: scaleY(0);
  transition: all 0.2s ease;
}

.section-nav__panel-item:hover {
  background: rgba(255, 107, 53, 0.1);
  color: rgba(255, 255, 255, 0.95);
}

.section-nav__panel-item:hover::before {
  opacity: 0.5;
  transform: scaleY(0.6);
}

.section-nav__panel-item--active {
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.08);
}

.section-nav__panel-item--active::before {
  opacity: 1;
  transform: scaleY(1);
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablet */
@media (max-width: 1024px) {
  .section-nav {
    right: 16px;
    padding: 8px 6px;
  }

  .section-nav__arrow {
    width: 32px;
    height: 32px;
  }

  .section-nav__arrow svg {
    width: 16px;
    height: 16px;
  }

  .section-nav__menu-btn {
    width: 32px;
    height: 24px;
  }

  .section-nav__panel {
    right: calc(100% + 8px);
    min-width: 140px;
  }

  .section-nav__panel-item {
    padding: 7px 14px;
    font-size: 13px;
  }
}

/* Mobile - hide navigation */
@media (max-width: 768px) {
  .section-nav {
    display: none;
  }
}

/* ========== ACCESSIBILITY ========== */
.section-nav__arrow:focus-visible,
.section-nav__menu-btn:focus-visible,
.section-nav__panel-item:focus-visible {
  outline: 2px solid #ff6b35;
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .section-nav,
  .section-nav__arrow svg,
  .section-nav__panel {
    animation: none;
    transition-duration: 0.01ms;
  }

  .section-nav {
    opacity: 1;
    transform: translateY(-50%);
  }

  .section-nav__arrow--up:hover svg,
  .section-nav__arrow--down:hover svg {
    animation: none;
  }
}
