/* ===== UNIFIED ICON MENU SLIDER - SMOOTH SCROLLING ===== */

/* Container for icon menu */
.ktos-hero-icon-menu-container {
  width: var(--ktos-icon-menu-container-width, 100%);
  max-width: var(--ktos-icon-menu-container-max-width, 1200px);
  margin: var(--ktos-icon-menu-margin-top, 16px) auto var(--ktos-icon-menu-margin-bottom, 16px);
  padding: 0 16px;
  box-sizing: border-box;
  position: relative;
  z-index: var(--ktos-icon-menu-z-index, 10);
}

.ktos-hero-icon-menu-inner {
  width: 100%;
  background: var(--ktos-icon-menu-bg, #ffffff);
  border-radius: var(--ktos-icon-menu-radius, 16px);
  padding: var(--ktos-icon-menu-padding, 16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--ktos-icon-menu-border, #e8ecf1);
  overflow: hidden;
}

/* Unified Icon Menu - Single slider for all devices */
.ktos-hero-menu--unified {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Viewport - the scrollable area */
.ktos-hero-menu--unified .ktos-hero-menu__viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  cursor: grab;
  padding: 4px 0;
}

.ktos-hero-menu--unified .ktos-hero-menu__viewport::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.ktos-hero-menu--unified .ktos-hero-menu__viewport:active {
  cursor: grabbing;
}

/* Track - holds all items */
.ktos-hero-menu--unified .ktos-hero-menu__track {
  display: flex;
  gap: var(--ktos-hero-menu-gap, 12px);
  padding: var(--ktos-hero-menu-pad, 8px);
  width: max-content;
}

/* Individual items */
.ktos-hero-menu--unified .ktos-hero-menu__item {
  flex: 0 0 auto;
  width: var(--ktos-hero-menu-card-w, 110px);
  height: var(--ktos-hero-menu-card-h, 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  background: #ffffff;
  border-radius: var(--ktos-hero-menu-radius, 12px);
  border: 1px solid #e8ecf1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, calc(var(--ktos-hero-menu-shadow, 0.5) * 0.1));
  text-decoration: none;
  color: #1a1a2e;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  scroll-snap-align: start;
  user-select: none;
  -webkit-user-drag: none;
}

.ktos-hero-menu--unified .ktos-hero-menu__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #6366f1;
}

.ktos-hero-menu--unified .ktos-hero-menu__item:active {
  transform: translateY(-1px) scale(0.98);
}

/* Icon styling */
.ktos-hero-menu--unified .ktos-hero-menu__icon {
  width: var(--ktos-hero-menu-icon, 40px);
  height: var(--ktos-hero-menu-icon, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ktos-hero-menu-icon, 40px);
  color: #4f46e5;
  transition: transform 0.2s ease;
}

.ktos-hero-menu--unified .ktos-hero-menu__item:hover .ktos-hero-menu__icon {
  transform: scale(1.1);
}

.ktos-hero-menu--unified .ktos-hero-menu__icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Label styling */
.ktos-hero-menu--unified .ktos-hero-menu__label {
  font-size: var(--ktos-hero-menu-text, 13px);
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  color: #374151;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badge styling */
.ktos-hero-menu--unified .ktos-hero-menu__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Navigation arrows */
.ktos-hero-menu--unified .ktos-hero-menu__nav {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  color: #4b5563;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.ktos-hero-menu--unified .ktos-hero-menu__nav:hover {
  background: #4f46e5;
  color: white;
  border-color: #4f46e5;
  transform: scale(1.05);
}

.ktos-hero-menu--unified .ktos-hero-menu__nav:active {
  transform: scale(0.95);
}

.ktos-hero-menu--unified .ktos-hero-menu__nav.is-prev {
  margin-right: 4px;
}

.ktos-hero-menu--unified .ktos-hero-menu__nav.is-next {
  margin-left: 4px;
}

/* Dots indicator */
.ktos-hero-menu--unified .ktos-hero-menu__dots {
  display: none;
}

/* Hide old desktop/mobile specific menus */
.ktos-hero-menu--desktop,
.ktos-hero-menu--mobile {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ktos-hero-icon-menu-container {
    padding: 0 12px;
    margin-top: 12px;
    margin-bottom: 12px;
  }
  
  .ktos-hero-icon-menu-inner {
    padding: 12px;
    border-radius: 12px;
  }
  
  .ktos-hero-menu--unified .ktos-hero-menu__nav {
    display: none;
  }
  
  .ktos-hero-menu--unified .ktos-hero-menu__item {
    width: calc(var(--ktos-hero-menu-card-w, 110px) * 0.9);
    height: calc(var(--ktos-hero-menu-card-h, 90px) * 0.95);
  }
}

@media (min-width: 769px) {
  .ktos-hero-icon-menu-container {
    padding: 0 24px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  
  .ktos-hero-icon-menu-inner {
    padding: 20px;
    border-radius: 20px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .ktos-hero-menu--unified .ktos-hero-menu__viewport {
    scroll-snap-type: x proximity;
  }
  
  .ktos-hero-menu--unified .ktos-hero-menu__item:hover {
    transform: none;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .ktos-hero-menu--unified .ktos-hero-menu__viewport {
    scroll-behavior: auto;
  }
  
  .ktos-hero-menu--unified .ktos-hero-menu__item {
    transition: none;
  }
}
