/* ==========================================================================
   Texvian IT — INNER PAGES (Company, Case Studies, Pricing, Blog, Search,
   Contact, Utility). Builds on tokens + shared components; only adds the
   handful of patterns those pages need. Light/dark handled via tokens.
   ========================================================================== */

/* ---- Avatar (initials — no stock portraits, no fake people photos) ---- */
.nx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--nx-radius-circle);
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  font-family: var(--nx-font-display);
  font-weight: var(--nx-fw-bold);
  font-size: var(--nx-fs-sm);
  flex-shrink: 0
}

.nx-avatar--lg {
  width: 120px;
  height: 120px;
  font-size: var(--nx-fs-h2)
}

.nx-avatar--xl {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: var(--nx-radius-lg);
  font-size: 4rem
}

.nx-avatar img {
  border-radius: var(--nx-radius-circle);
}

/* ---- Team ---- */
.nx-team-card {
  display: block;
  height: auto !important;
  max-height: none !important;
  background: var(--nx-surface);
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  color: inherit;
  transition: var(--nx-transition-base), transform var(--nx-duration-base) var(--nx-ease-emphasized)
}

.nx-team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--nx-shadow-md);
  border-color: var(--nx-border-color-strong)
}

.nx-team-card .nx-avatar--xl {
  border-radius: 0;
  background: linear-gradient(135deg, var(--nx-primary-soft), var(--nx-secondary-soft))
}

.nx-team-card__body {
  padding: var(--nx-space-5)
}

.nx-team-card__name {
  font-size: var(--nx-fs-h5);
  margin-bottom: var(--nx-space-1)
}

.nx-team-card__role {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
  margin: 0
}

.nx-skill {
  margin-bottom: var(--nx-space-4)
}

.nx-skill__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--nx-fs-sm);
  margin-bottom: var(--nx-space-1)
}

.nx-skill__bar {
  height: 6px;
  border-radius: var(--nx-radius-pill);
  background: var(--nx-surface-alt);
  overflow: hidden;
  border: 1px solid var(--nx-border-color)
}

.nx-skill__fill {
  display: block;
  height: 100%;
  background: var(--nx-primary);
  border-radius: inherit
}

.nx-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--nx-space-5) !important;
  border-left: 2px solid var(--nx-border-color)
}

.nx-timeline__item {
  position: relative;
  padding-bottom: var(--nx-space-6)
}

.nx-timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--nx-space-5) - 7px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--nx-primary);
  box-shadow: 0 0 0 4px var(--nx-primary-soft)
}

.nx-timeline__when {
  font-family: var(--nx-font-mono);
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--nx-ls-wide)
}

.nx-timeline__title {
  font-size: var(--nx-fs-md);
  margin: var(--nx-space-1) 0
}

.nx-profile-meta {
  list-style: none;
  margin: 0;
  padding: 0
}

.nx-profile-meta li {
  display: flex;
  gap: var(--nx-space-3);
  padding: var(--nx-space-3) 0;
  border-bottom: 1px solid var(--nx-divider);
  font-size: var(--nx-fs-sm)
}

.nx-profile-meta i {
  color: var(--nx-primary)
}

/* ---- Careers ---- */
.nx-job-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nx-space-4);
  padding: var(--nx-space-5);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  margin-bottom: var(--nx-space-4);
  color: inherit;
  transition: var(--nx-transition-base)
}

.nx-job-row:hover {
  border-color: var(--nx-primary);
  box-shadow: var(--nx-shadow-md)
}

.nx-job-row__title {
  font-size: var(--nx-fs-lg);
  margin: 0 0 var(--nx-space-2)
}

.nx-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nx-space-2) var(--nx-space-4);
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary)
}

.nx-job-meta i {
  color: var(--nx-primary);
  margin-right: var(--nx-space-1)
}

[data-nx-job-item].is-hidden {
  display: none
}

/* ---- Case studies ---- */
.nx-case-metric {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary);
  margin: 0 0 var(--nx-space-4)
}

.nx-case-metric strong {
  color: var(--nx-primary);
  font-size: var(--nx-fs-lg);
  font-family: var(--nx-font-display)
}

.nx-case-hero-img {
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  border: 1px solid var(--nx-border-color)
}

.nx-case-hero-img img {
  width: 100%;
  height: auto;
  display: block
}

.nx-fact-list {
  list-style: none;
  margin: 0;
  padding: 0
}

.nx-fact-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--nx-space-4);
  padding: var(--nx-space-3) 0;
  border-bottom: 1px solid var(--nx-divider);
  font-size: var(--nx-fs-sm)
}

.nx-fact-list span:first-child {
  color: var(--nx-text-muted)
}

.nx-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--nx-radius-md);
  border: 1px solid var(--nx-border-color)
}

.nx-quote {
  padding: var(--nx-space-6);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-left: 4px solid var(--nx-primary);
  border-radius: var(--nx-radius-lg);
  height: 100%
}

.nx-quote blockquote {
  font-size: var(--nx-fs-md);
  margin: 0 0 var(--nx-space-4)
}

.nx-quote__by {
  display: flex;
  align-items: center;
  gap: var(--nx-space-3);
  font-size: var(--nx-fs-sm)
}

.nx-quote__by strong {
  display: block
}

.nx-stars {
  color: var(--nx-warning);
  letter-spacing: 2px
}

/* ---- Pricing comparison ---- */
.nx-compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  font-size: var(--nx-fs-sm)
}

.nx-compare th,
.nx-compare td {
  padding: var(--nx-space-4);
  border-bottom: 1px solid var(--nx-divider);
  text-align: center
}

.nx-compare th:first-child,
.nx-compare td:first-child {
  text-align: left;
  font-weight: var(--nx-fw-medium)
}

.nx-compare thead th {
  background: var(--nx-surface-alt);
  font-family: var(--nx-font-display)
}

.nx-compare tbody tr:last-child td {
  border-bottom: 0
}

.nx-compare .bi-check-lg {
  color: var(--nx-success)
}

.nx-compare .bi-dash {
  color: var(--nx-text-muted)
}

/* ---- Project estimator (pricing/estimator.html) ---- */
.nx-est {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--nx-space-6);
  align-items: start
}

.nx-est__panel {
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  padding: var(--nx-space-6)
}

.nx-est__group {
  margin-bottom: var(--nx-space-6)
}

.nx-est__group legend {
  font-size: var(--nx-fs-md);
  font-family: var(--nx-font-display);
  font-weight: var(--nx-fw-semibold);
  margin-bottom: var(--nx-space-3)
}

.nx-est__choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--nx-space-3)
}

.nx-est__choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.nx-est__choice label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: var(--nx-space-3) var(--nx-space-4);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-md);
  cursor: pointer;
  background: var(--nx-surface);
  transition: var(--nx-transition-base)
}

.nx-est__choice label small {
  color: var(--nx-text-muted)
}

.nx-est__choice label:hover {
  border-color: var(--nx-primary)
}

.nx-est__choice input:checked+label {
  border-color: var(--nx-primary);
  background: var(--nx-primary-soft);
  box-shadow: 0 0 0 1px var(--nx-primary)
}

.nx-est__choice input:focus-visible+label {
  outline: 2px solid var(--nx-primary);
  outline-offset: 2px
}

.nx-est__summary {
  position: sticky;
  top: calc(var(--nx-header-height) + var(--nx-space-5));
  background: var(--nx-ink-900);
  color: var(--nx-white);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  padding: var(--nx-space-6)
}

.nx-est__total {
  font-family: var(--nx-font-display);
  font-size: var(--nx-fs-h2);
  font-weight: var(--nx-fw-bold);
  line-height: 1.1;
  margin: var(--nx-space-2) 0
}

.nx-est__lines {
  list-style: none;
  margin: var(--nx-space-4) 0;
  padding: 0;
  font-size: var(--nx-fs-sm)
}

.nx-est__lines li {
  display: flex;
  justify-content: space-between;
  gap: var(--nx-space-3);
  padding: var(--nx-space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12)
}

.nx-est__note {
  font-size: var(--nx-fs-xs);
  color: rgba(255, 255, 255, .7)
}

@media (max-width:991.98px) {
  .nx-est {
    grid-template-columns: minmax(0, 1fr)
  }

  .nx-est__summary {
    position: static
  }
}

/* ---- Blog ---- */
.nx-widget {
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  padding: var(--nx-space-5);
  margin-bottom: var(--nx-space-5)
}

.nx-widget__title {
  font-size: var(--nx-fs-md);
  margin-bottom: var(--nx-space-4)
}

.nx-widget__list {
  list-style: none;
  margin: 0;
  padding: 0
}

.nx-widget__list li {
  display: flex;
  justify-content: space-between;
  padding: var(--nx-space-2) 0;
  border-bottom: 1px solid var(--nx-divider);
  font-size: var(--nx-fs-sm)
}

.nx-widget__list li:last-child {
  border-bottom: 0
}

.nx-recent {
  display: flex;
  gap: var(--nx-space-3);
  margin-bottom: var(--nx-space-4);
  color: inherit
}

.nx-recent img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--nx-radius-md);
  flex-shrink: 0
}

.nx-recent__title {
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-semibold);
  margin: 0 0 2px;
  line-height: 1.35
}

.nx-recent__date {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted)
}

.nx-post-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--nx-space-5);
  margin-bottom: var(--nx-space-6);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  overflow: hidden
}

.nx-post-row .nx-blog-card {
  border: 0;
  border-radius: 0;
  height: auto
}

.nx-post-row__media {
  position: relative;
  min-height: 200px
}

.nx-post-row__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.nx-post-row__body {
  padding: var(--nx-space-5) var(--nx-space-5) var(--nx-space-5) 0
}

@media (max-width:767.98px) {
  .nx-post-row {
    grid-template-columns: 1fr
  }

  .nx-post-row__body {
    padding: var(--nx-space-5)
  }

  .nx-post-row__media {
    min-height: 180px
  }
}

.nx-prose {
  font-size: var(--nx-fs-md);
  line-height: var(--nx-lh-loose);
  color: var(--nx-text-secondary);
  max-width: 75ch
}

.nx-prose h2 {
  font-size: var(--nx-fs-h3);
  margin: var(--nx-space-7) 0 var(--nx-space-3);
  color: var(--nx-text-primary)
}

.nx-prose h3 {
  font-size: var(--nx-fs-h4);
  margin: var(--nx-space-6) 0 var(--nx-space-3);
  color: var(--nx-text-primary)
}

.nx-prose blockquote {
  margin: var(--nx-space-6) 0;
  padding: var(--nx-space-4) var(--nx-space-5);
  border-left: 4px solid var(--nx-primary);
  background: var(--nx-surface-alt);
  border-radius: 0 var(--nx-radius-md) var(--nx-radius-md) 0;
  font-size: var(--nx-fs-lg);
  color: var(--nx-text-primary)
}

.nx-prose pre {
  background: var(--nx-ink-900);
  color: var(--nx-slate-200);
  padding: var(--nx-space-4);
  border-radius: var(--nx-radius-md);
  overflow-x: auto;
  font-size: var(--nx-fs-sm)
}

.nx-prose ul,
.nx-prose ol {
  padding-left: 1.25rem
}

.nx-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nx-space-2) var(--nx-space-5);
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-muted);
  margin-bottom: var(--nx-space-5)
}

.nx-post-meta i {
  margin-right: var(--nx-space-1);
  color: var(--nx-primary)
}

.nx-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--nx-space-2)
}

.nx-share a,
.nx-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nx-radius-circle);
  border: 1px solid var(--nx-border-color);
  background: var(--nx-surface);
  color: var(--nx-text-secondary);
  transition: var(--nx-transition-base)
}

.nx-share a:hover,
.nx-share button:hover {
  background: var(--nx-primary);
  border-color: var(--nx-primary);
  color: var(--nx-primary-contrast)
}

.nx-author-box {
  display: flex;
  gap: var(--nx-space-5);
  padding: var(--nx-space-6);
  background: var(--nx-surface-alt);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg)
}

.nx-comment {
  display: flex;
  gap: var(--nx-space-4);
  padding: var(--nx-space-5) 0;
  border-bottom: 1px solid var(--nx-divider)
}

.nx-comment--reply {
  margin-left: var(--nx-space-8)
}

.nx-comment__head {
  display: flex;
  gap: var(--nx-space-3);
  align-items: baseline;
  flex-wrap: wrap
}

.nx-comment__name {
  font-weight: var(--nx-fw-semibold)
}

.nx-comment__date {
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-muted)
}

@media (max-width:575.98px) {
  .nx-comment--reply {
    margin-left: var(--nx-space-4)
  }

  .nx-author-box {
    flex-direction: column
  }
}

/* ---- Search results ---- */
.nx-result {
  display: block;
  padding: var(--nx-space-5);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  margin-bottom: var(--nx-space-4);
  color: inherit;
  transition: var(--nx-transition-base)
}

.nx-result:hover {
  border-color: var(--nx-primary);
  box-shadow: var(--nx-shadow-md)
}

.nx-result__cat {
  font-family: var(--nx-font-mono);
  font-size: var(--nx-fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--nx-ls-wide);
  color: var(--nx-primary)
}

.nx-result__title {
  font-size: var(--nx-fs-lg);
  margin: var(--nx-space-1) 0
}

.nx-result__text {
  margin: 0;
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary)
}

.nx-result mark {
  background: var(--nx-warning-soft);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px
}

.nx-empty {
  text-align: center;
  padding: var(--nx-space-9) var(--nx-space-4);
  color: var(--nx-text-secondary)
}

.nx-empty i {
  font-size: 3rem;
  color: var(--nx-text-muted)
}

[data-nx-result].is-hidden {
  display: none
}

/* ---- Contact / map ---- */
.nx-map {
  position: relative;
  min-height: 380px;
  border-radius: var(--nx-radius-lg);
  border: 1px solid var(--nx-border-color);
  overflow: hidden;
  background:
    linear-gradient(var(--nx-divider) 1px, transparent 1px) 0 0/40px 40px,
    linear-gradient(90deg, var(--nx-divider) 1px, transparent 1px) 0 0/40px 40px, var(--nx-surface-alt)
}

.nx-map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  text-align: center
}

.nx-map__pin i {
  font-size: 3rem;
  color: var(--nx-primary)
}

.nx-map__label {
  position: absolute;
  left: var(--nx-space-4);
  bottom: var(--nx-space-4);
  right: var(--nx-space-4);
  padding: var(--nx-space-3) var(--nx-space-4);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-md);
  font-size: var(--nx-fs-sm)
}

.nx-contact-item {
  display: flex;
  gap: var(--nx-space-4);
  padding: var(--nx-space-4) 0;
  border-bottom: 1px solid var(--nx-divider)
}

.nx-contact-item i {
  font-size: 1.4rem;
  color: var(--nx-primary)
}

.nx-contact-item strong {
  display: block
}

.nx-state-demo .form-control {
  margin-bottom: var(--nx-space-2)
}

.nx-form-status {
  display: none;
  padding: var(--nx-space-4);
  border-radius: var(--nx-radius-md);
  font-size: var(--nx-fs-sm);
  margin-bottom: var(--nx-space-4)
}

.nx-form-status.is-visible {
  display: block
}

.nx-form-status--success {
  background: var(--nx-success-soft);
  color: var(--nx-success)
}

.nx-form-status--error {
  background: var(--nx-danger-soft);
  color: var(--nx-danger)
}

.btn.is-loading {
  pointer-events: none;
  opacity: .8
}

.btn.is-loading::after {
  content: "";
  width: 1em;
  height: 1em;
  margin-left: .5em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nx-spin .7s linear infinite;
  display: inline-block
}

@keyframes nx-spin {
  to {
    transform: rotate(360deg)
  }
}

@media (prefers-reduced-motion:reduce) {
  .btn.is-loading::after {
    animation-duration: 2s
  }
}

/* ---- Auth / error / coming soon ---- */
.nx-auth {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: var(--nx-space-10)
}

.nx-auth__card {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  padding: var(--nx-space-7);
  box-shadow: var(--nx-shadow-md)
}

.nx-auth__card h1 {
  font-size: var(--nx-fs-h3)
}

.nx-divider-text {
  display: flex;
  align-items: center;
  gap: var(--nx-space-3);
  color: var(--nx-text-muted);
  font-size: var(--nx-fs-sm);
  margin: var(--nx-space-5) 0
}

.nx-divider-text::before,
.nx-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--nx-divider)
}

.nx-error {
  text-align: center;
  padding-block: var(--nx-space-11)
}

.nx-error__code {
  font-family: var(--nx-font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: var(--nx-fw-bold);
  line-height: 1;
  color: var(--nx-primary);
  letter-spacing: -.04em
}

.nx-countdown {
  display: flex;
  justify-content: center;
  gap: var(--nx-space-4);
  margin: var(--nx-space-7) 0;
  flex-wrap: wrap
}

.nx-countdown__cell {
  min-width: 90px;
  padding: var(--nx-space-4);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg)
}

.nx-countdown__num {
  display: block;
  font-family: var(--nx-font-display);
  font-size: var(--nx-fs-h2);
  font-weight: var(--nx-fw-bold);
  color: var(--nx-primary)
}

.nx-countdown__lab {
  font-size: var(--nx-fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--nx-ls-wide);
  color: var(--nx-text-muted)
}

.nx-legal {
  max-width: 78ch
}

.nx-legal h2 {
  font-size: var(--nx-fs-h4);
  margin: var(--nx-space-7) 0 var(--nx-space-3)
}

.nx-legal p,
.nx-legal li {
  color: var(--nx-text-secondary)
}

.nx-swatch {
  height: 72px;
  border-radius: var(--nx-radius-md);
  border: 1px solid var(--nx-border-color)
}

.nx-pagination {
  display: flex;
  justify-content: center;
  gap: var(--nx-space-2);
  list-style: none;
  padding: 0;
  margin: var(--nx-space-7) 0 0;
  flex-wrap: wrap
}

.nx-pagination a,
.nx-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 var(--nx-space-3);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  color: var(--nx-text-secondary);
  font-size: var(--nx-fs-sm)
}

.nx-pagination a:hover {
  border-color: var(--nx-primary);
  color: var(--nx-primary)
}

.nx-pagination .is-active {
  background: var(--nx-primary);
  border-color: var(--nx-primary);
  color: var(--nx-primary-contrast)
}

.nx-pagination .is-disabled {
  opacity: .5;
  pointer-events: none
}

.nx-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--nx-space-2);
  margin-bottom: var(--nx-space-7)
}

.nx-filter-bar .nx-tag {
  cursor: pointer;
  font-size: var(--nx-fs-sm);
  padding: var(--nx-space-2) var(--nx-space-4)
}

.nx-filter-bar .nx-tag:not(.is-active) {
  background: var(--nx-surface)
}

a.nx-card,
a.nx-team-card,
a.nx-result,
a.nx-job-row {
  text-decoration: none
}

.nx-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 var(--nx-space-3);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-md);
  background: var(--nx-surface);
  color: var(--nx-text-secondary);
  font-size: var(--nx-fs-sm)
}

.nx-pagination button:hover {
  border-color: var(--nx-primary);
  color: var(--nx-primary)
}