/* ==========================================================
   Tabs (global)
   Used by "Our Recent Projects" (home, portfolio) and "Packages" (home, packages).
   Markup stays the same:  <ul class="pricing-sec-list"><li data-targetit="box-x">..</li></ul>
   assets/js/tabs.js adds the sliding pill and keyboard support.
   Change it here once and every tab set follows.
   ========================================================== */

/* ---------- Tab bar ---------- */
ul.pricing-sec-list {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 34px auto 44px !important;
  padding: 6px;
  list-style: none;
  background: #f1f3ff;
  border: 0;
  border-radius: 60px;
  box-shadow: inset 0 0 0 1px rgba(67, 86, 214, .08);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
ul.pricing-sec-list::-webkit-scrollbar {
  display: none;
}

ul.pricing-sec-list li {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: auto;
  padding: 11px 24px;
  border: 0 !important;
  border-radius: 50px;
  color: #070f4d;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color .3s, background-color .3s, box-shadow .3s;
}
ul.pricing-sec-list li:hover {
  background: rgba(67, 86, 214, .1);
}
ul.pricing-sec-list li:focus-visible {
  outline: 3px solid rgba(67, 86, 214, .45);
  outline-offset: -3px;
}

/* active tab (works without JavaScript too) */
ul.pricing-sec-list li.active {
  color: #fff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #4356d6, #2a38a8);
  box-shadow: 0 8px 18px rgba(67, 86, 214, .35);
}

/* with JavaScript a single pill slides between the tabs, so the tab itself stays transparent */
ul.pricing-sec-list.has-pill li.active,
ul.pricing-sec-list.has-pill li.active:hover {
  background: transparent;
  box-shadow: none;
}
ul.pricing-sec-list.has-pill li:hover:not(.active) {
  background: rgba(67, 86, 214, .1);
}
.tab-pill {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 0;
  width: 0;
  height: calc(100% - 12px);
  border-radius: 50px;
  background: linear-gradient(135deg, #4356d6, #2a38a8);
  box-shadow: 0 8px 18px rgba(67, 86, 214, .35);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

/* ---------- Panels: fade and rise when a tab is chosen ---------- */
.tab-switched [class^="box-"] {
  animation: tab-panel-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes tab-panel-in {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Small screens: the bar scrolls sideways ---------- */
@media (max-width: 767px) {
  ul.pricing-sec-list {
    width: 100%;
    margin: 26px 0 32px !important;
    padding: 5px;
    scroll-snap-type: x proximity;
  }
  ul.pricing-sec-list li {
    padding: 10px 18px;
    font-size: 14px;
    scroll-snap-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-pill,
  ul.pricing-sec-list li {
    transition: none;
  }
  .tab-switched [class^="box-"] {
    animation: none;
  }
}

/* many tabs (e.g. the 10 package categories): tighter so the whole bar fits on one row */
ul.pricing-sec-list.tabs--compact li {
  padding: 10px 15px;
  font-size: 14px;
}
@media (max-width: 767px) {
  ul.pricing-sec-list.tabs--compact li {
    padding: 9px 16px;
  }
}
