/* Technology tabs (services/open-source-customization.html).
   Plain CSS on the site's design tokens, so no Tailwind rebuild is needed.
   Without JavaScript every category and technology is shown in order. */

.tech-tabs { --tt-radius: var(--radius-card, 12px); }

/* Category tabs */
.tech-cats {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: .25rem .25rem .75rem;
  margin: 0 -.25rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}
.tech-cat-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.1rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  color: var(--color-navy);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.tech-cat-tab i { color: var(--color-accent-text); }
.tech-cat-tab .count {
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  padding: .25rem .45rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-muted);
}
.tech-cat-tab:hover { border-color: var(--color-navy); }
.tech-cat-tab[aria-selected="true"] {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.tech-cat-tab[aria-selected="true"] i { color: var(--color-primary); }
.tech-cat-tab[aria-selected="true"] .count { background: rgba(255,255,255,.15); color: #fff; }
.tech-cat-tab:focus-visible,
.tech-item:focus-visible { outline: 3px solid var(--color-sky); outline-offset: 2px; }

/* Category panel */
.tech-cat-panel + .tech-cat-panel { margin-top: 3rem; }
.tech-cat-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.tech-cat-head .icon-tile { flex: none; }
.tech-cat-head h3 { margin: 0 0 .35rem; font-size: 1.35rem; color: var(--color-navy); }
.tech-cat-head p { margin: 0; color: var(--color-muted); max-width: 60rem; }

.tech-layout { display: grid; gap: 1.25rem; }
@media (min-width: 992px) {
  .tech-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
}

/* Technology list (inner tabs) */
.tech-list {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .25rem;
  margin: -.25rem;
  scrollbar-width: thin;
}
@media (min-width: 992px) {
  .tech-list {
    flex-direction: column;
    overflow: visible;
    position: sticky;
    top: 100px;
    padding: .5rem;
    margin: 0;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--tt-radius);
  }
}
.tech-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: .7rem;
  width: auto;
  padding: .55rem .8rem;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: #fff;
  color: var(--color-ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
@media (min-width: 992px) {
  .tech-item { width: 100%; border-color: transparent; white-space: normal; }
}
.tech-item i { width: 1.25rem; text-align: center; font-size: 1.1rem; color: var(--color-navy); }
.tech-item:hover { background: var(--color-surface); }
.tech-item[aria-selected="true"] {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
}
.tech-item[aria-selected="true"] i { color: var(--color-primary); }

/* Technology detail card */
.tech-detail {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--tt-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lift);
}
@media (min-width: 768px) { .tech-detail { padding: 2rem 2.25rem; } }
.tech-detail + .tech-detail { margin-top: 1.25rem; }
.tech-detail-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.tech-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--color-navy);
  color: var(--color-primary);
  font-size: 2rem;
}
.tech-detail h4 { margin: 0; font-size: 1.5rem; color: var(--color-navy); }
.tech-tag { margin: .2rem 0 0; color: var(--color-accent-text); font-weight: 600; }
.tech-overview { color: var(--color-muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; }
.tech-cols { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .tech-cols { grid-template-columns: 1.3fr 1fr; gap: 2rem; } }
.tech-detail h5 {
  margin: 0 0 .75rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-navy);
}
.tech-best {
  margin: 0 0 1.25rem;
  padding: .85rem 1rem;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  background: var(--color-surface);
  color: var(--color-ink);
}
.tech-detail .chips { margin: 0; }
.tech-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-line);
}
.tech-actions .tech-link { font-weight: 600; color: var(--color-navy); text-decoration: underline; text-underline-offset: 3px; }
.tech-actions .tech-link:hover { color: var(--color-accent-text); }

/* JavaScript on: show only the selected panels */
.tech-tabs:not(.is-ready) [role="tablist"] { display: none; }
.tech-tabs.is-ready [role="tabpanel"][hidden] { display: none; }
.tech-tabs.is-ready .tech-detail + .tech-detail { margin-top: 0; }
.tech-tabs.is-ready .tech-cat-panel + .tech-cat-panel { margin-top: 0; }
.tech-tabs.is-ready .tech-detail { animation: tech-in .25s ease-out; }
@keyframes tech-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tech-tabs.is-ready .tech-detail { animation: none; } }
.tech-tabs { scroll-margin-top: 100px; }
@media (min-width: 992px) {
  .tech-cats { flex-wrap: wrap; justify-content: center; overflow: visible; }
}
