/**
 * UI/UX Improvements CSS
 * Additional styles for enhanced user experience
 */

/* ============================================
   MEGA MENU CARD ALIGNMENT - FIXED SIZE
============================================ */
#megaMenu .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

#megaMenu .service-tile {
  display: flex;
  flex-direction: column;
  height: 180px;
  /* Fixed height for all cards */
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Prevent size change on hover */
#megaMenu .service-tile:hover {
  transform: translateY(-4px);
  /* Only move up, no scale */
  box-shadow: 0 8px 24px rgba(82, 241, 255, 0.2);
  border-color: #52F1FF !important;
}

#megaMenu .service-tile .flex {
  margin-bottom: 12px;
  flex-shrink: 0;
}

#megaMenu .service-tile h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  flex-shrink: 0;
}

#megaMenu .service-tile p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

#megaMenu .service-tile-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

/* ============================================
   SCROLLABLE FILTERS
============================================ */
.outer-tabs {
  cursor: grab;
  user-select: none;
}

.outer-tabs:active {
  cursor: grabbing;
}

/* Mobile swipe indicator */
@media (max-width: 768px) {
  .outer-tabs-wrapper {
    position: relative;
  }

  .outer-tabs::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(to right, transparent, #041532);
    padding: 10px 20px;
    pointer-events: none;
    color: #52F1FF;
    font-size: 20px;
    opacity: 0.7;
  }
}

/* ============================================
   CLICKABLE SERVICE POINTS - UNDERLINE ONLY
============================================ */
#offer-bullets ul {
  list-style: none;
  padding-left: 0;
}

#offer-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

#offer-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #52F1FF;
  font-weight: bold;
  font-size: 1.2em;
}

.service-point-link {
  display: inline-block;
  width: 100%;
  position: relative;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.service-point-link:hover {
  color: #52F1FF;
  text-decoration-color: #52F1FF;
  /* No border, no arrow, no padding change */
}

/* Remove arrow indicator */
.service-point-link::after {
  display: none;
}

/* ============================================
   ENHANCED SEARCH BAR - MATCHING REFERENCE
============================================ */
#serviceSearchInput {
  position: relative;
  background: rgba(10, 35, 64, 0.8);
  border: 1px solid rgba(127, 200, 255, 0.3);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  width: 100%;
  font-size: 15px;
  transition: all 0.3s ease;
}

#serviceSearchInput:focus {
  outline: none;
  border-color: #7fc8ff;
  box-shadow: 0 0 0 3px rgba(127, 200, 255, 0.1);
  background: rgba(10, 35, 64, 0.9);
}

#serviceSearchInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

#searchResults {
  max-height: 400px;
  overflow-y: auto;
}

#searchResults:empty {
  display: none;
}

#searchResults a {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 12px 20px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #7fc8ff;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid rgba(127, 200, 255, 0.2);
}

#searchResults a:hover {
  background: rgba(127, 200, 255, 0.15);
  transform: translateX(5px);
  border-color: rgba(127, 200, 255, 0.4);
}

#searchResults a::before {
  display: none;
  /* Remove the left border indicator */
}

/* ============================================
   HOVER DROPDOWN ENHANCEMENTS
============================================ */
#servicesDropdownTrigger {
  position: relative;
}

#servicesBtn svg {
  transition: transform 0.3s ease;
}

#megaMenu {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

#megaMenu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */
@media (max-width: 1024px) {
  #megaMenu .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #megaMenu .service-tile {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .outer-tabs {
    justify-content: flex-start;
    padding-right: 40px;
  }

  .outer-tabs button {
    font-size: 14px;
    padding: 8px 14px;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
============================================ */
.service-point-link:focus,
.outer-tabs button:focus,
#servicesBtn:focus {
  outline: 3px solid rgba(82, 241, 255, 0.5);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .outer-tabs {
    scroll-behavior: auto;
  }
}

/* ============================================
   LOADING STATES
============================================ */
.search-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(82, 241, 255, 0.3);
  border-top-color: #52F1FF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   SMOOTH ANIMATIONS
============================================ */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-slide-down {
  animation: slideDown 0.3s ease;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

/* ============================================
   HOW DOES C2OTECH WORK - ACTIVE STATE
============================================ */
/* Active point styling - white text */
.point.active h2 {
  color: #ffffff !important;
}

.point.active p {
  color: #ffffff !important;
}

/* White numbered circle for active state */
.point.active .point-number {
  background: #ffffff !important;
  color: #0a1e3d !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Inactive points - muted colors */
.point:not(.active) h2 {
  color: rgba(255, 255, 255, 0.5);
}

.point:not(.active) p {
  color: rgba(255, 255, 255, 0.4);
}

.point:not(.active) .point-number {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}

/* Smooth transitions */
.point h2,
.point p,
.point-number {
  transition: all 0.4s ease;
}