/* ──────────────────────────────────────────────
   KX Service Descriptions — Expandable Rows
   Injected by js/kx-service-desc.js
────────────────────────────────────────────── */

/* Toggle button inside service name cell */
.kx-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.4);
  background: rgba(201, 168, 76, 0.08);
  color: #C9A84C;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  margin-left: 10px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.kx-expand-btn:hover {
  background: rgba(201, 168, 76, 0.2);
  border-color: #C9A84C;
}
.kx-expand-btn[aria-expanded="true"] {
  background: rgba(201, 168, 76, 0.2);
  border-color: #C9A84C;
  transform: rotate(45deg);
}

/* Make service rows look clickable */
tr.kx-svc-clickable {
  cursor: pointer;
}
tr.kx-svc-clickable:hover td {
  background: rgba(201, 168, 76, 0.04) !important;
}
tr.kx-svc-open {
  background: rgba(201, 168, 76, 0.05) !important;
}
tr.kx-svc-open td {
  border-bottom: none !important;
}

/* Description row */
tr.kx-desc-row td {
  padding: 0 !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(201, 168, 76, 0.15) !important;
  background: rgba(10, 14, 26, 0.6) !important;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Inner description container */
.kx-desc-body {
  padding: 18px 24px 22px 80px;
  animation: kxDescFadeIn 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

@keyframes kxDescFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kx-desc-text {
  font-size: 0.9375rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #D1D5DB;
  line-height: 1.75;
  margin: 0 0 14px;
  max-width: 720px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.kx-desc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kx-desc-tag {
  display: inline-flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  background: #111827;
  border: 1px solid #1F2937;
  border-radius: 8px;
  padding: 5px 12px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: #9CA3AF;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}
.kx-desc-tag strong {
  color: #C9A84C;
  font-weight: 700;
  margin-right: 2px;
}

/* ──────────────────────────────────────────────
   Service Catalogue — Table + Price Gate
────────────────────────────────────────────── */

.kx-svc-catalogue {
  background: #0A0A0A;
  padding: 5rem 0;
  border-top: 1px solid rgba(201,168,76,0.08);
}

/* Gate banner — hidden by default, shown when html.kx-prices-locked */
.kx-svc-gate-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 10px;
  padding: 20px 26px;
  margin-bottom: 2rem;
}
.kx-prices-locked .kx-svc-gate-banner { display: flex; }
.kx-svc-gate-banner p { margin: 0; color: #D1D5DB; font-size: 0.9375rem; line-height: 1.5; }
.kx-svc-gate-banner p strong { color: #F5F0E8; }
.kx-svc-gate-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Table wrapper */
.kx-svc-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,0.12);
}

/* Table */
table.kx-svc-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.kx-svc-table thead th {
  background: #111;
  color: #C9A84C;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  white-space: nowrap;
  overflow: hidden;
}
/* Column widths: code | name | model | price | enquire */
.kx-svc-table thead th:first-child  { width: 110px; }
.kx-svc-table thead th:nth-child(2) { width: auto; }
.kx-svc-table thead th:nth-child(3) { width: 130px; white-space: nowrap; }
.kx-svc-table thead th:nth-child(4) { width: 250px; white-space: normal; }
.kx-svc-table thead th.kx-th-enquire { width: 120px; text-align: center; }
.kx-svc-table tbody td.kx-td-enquire { text-align: center; vertical-align: middle; padding: 13px 12px; }

.kx-svc-table tbody td {
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #D1D5DB;
  vertical-align: middle;
  font-size: 0.9rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.kx-svc-table tbody td:first-child {
  font-family: 'DM Mono', monospace;
  font-size: 0.775rem;
  color: #6B7280;
  white-space: nowrap;
}
.kx-svc-table tbody td:nth-child(2) {
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}
.kx-svc-table tbody td:nth-child(3) {
  font-size: 0.8rem;
  color: #9CA3AF;
}
.kx-svc-table tbody td:nth-child(4) {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  color: #F5F0E8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.kx-svc-table tbody tr:last-child td { border-bottom: none; }

/* Model badge chip */
.kx-model-badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  color: #C9A84C;
  white-space: nowrap;
}
.kx-model-badge--retainer {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.25);
  color: #60A5FA;
}
.kx-model-badge--bespoke {
  background: rgba(156,163,175,0.08);
  border-color: rgba(156,163,175,0.2);
  color: #9CA3AF;
}
.kx-model-badge--session {
  background: rgba(52,211,153,0.08);
  border-color: rgba(52,211,153,0.2);
  color: #34D399;
}

/* ── Bundle Packages ── */
.kx-bundle-card {
  background: #111827;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}
.kx-bundle-card:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-3px);
}
.kx-bundle-card--featured {
  border-color: rgba(201,168,76,0.5);
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
}
.kx-bundle-card__badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C9A84C;
  margin-bottom: 0.75rem;
}
.kx-bundle-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #F5F0E8;
  margin: 0 0 0.5rem;
}
.kx-bundle-card__desc {
  color: #9CA3AF;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
}
.kx-bundle-card__includes {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.kx-bundle-card__includes li {
  font-size: 0.875rem;
  color: #D1D5DB;
  padding-left: 1.25rem;
  position: relative;
}
.kx-bundle-card__includes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #C9A84C;
  font-size: 0.8rem;
}
.kx-bundle-card__price {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  color: #C9A84C;
  margin-bottom: 0.25rem;
}
.kx-bundle-card__saving {
  font-size: 0.8125rem;
  color: #9CA3AF;
  margin-bottom: 1.25rem;
}
.kx-bundle-card__saving span {
  color: #34D399;
  font-weight: 600;
}

/* ── Testimonials ── */
.kx-testimonial {
  background: #111827;
  border: 1px solid rgba(201,168,76,0.1);
  border-radius: 10px;
  padding: 2rem;
}
.kx-testimonial__quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: #F5F0E8;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.kx-testimonial__quote::before { content: '\201C'; color: #C9A84C; font-size: 1.4rem; }
.kx-testimonial__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kx-testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: #C9A84C;
  flex-shrink: 0;
}
.kx-testimonial__name {
  font-weight: 600;
  color: #F5F0E8;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.kx-testimonial__title {
  font-size: 0.8125rem;
  color: #6B7280;
  margin-top: 0.15rem;
}

/* ── FAQ Accordion ── */
.kx-faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.kx-faq-item:first-child { border-top: 1px solid rgba(255,255,255,0.07); }
.kx-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #F5F0E8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: color 0.2s;
}
.kx-faq-item summary::-webkit-details-marker { display: none; }
.kx-faq-item summary::after {
  content: '+';
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  color: #C9A84C;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.kx-faq-item[open] summary::after { transform: rotate(45deg); }
.kx-faq-item summary:hover { color: #C9A84C; }
.kx-faq-item__body {
  padding: 0 0 1.25rem;
  color: #9CA3AF;
  font-size: 0.9375rem;
  line-height: 1.75;
  max-width: 700px;
}

/* ── Ecosystem Division Cards ── */
.kx-ecosystem-card {
  display: flex;
  flex-direction: column;
  background: #111827;
  border: 1px solid rgba(201,168,76,0.1);
  border-radius: 10px;
  padding: 1.75rem;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s;
}
.kx-ecosystem-card:hover {
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-3px);
}
.kx-ecosystem-card__eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C9A84C;
  margin-bottom: 0.65rem;
}
.kx-ecosystem-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #F5F0E8;
  margin: 0 0 0.5rem;
  transition: color 0.2s;
}
.kx-ecosystem-card:hover .kx-ecosystem-card__name { color: #C9A84C; }
.kx-ecosystem-card__sub {
  color: #6B7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex: 1;
}
.kx-ecosystem-card__link {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  color: #C9A84C;
  letter-spacing: 0.08em;
}

@media (max-width: 700px) {
  .kx-bundle-card { padding: 1.5rem; }
  .kx-testimonial { padding: 1.5rem; }
}


/* Blur prices when not logged in */
.kx-prices-locked .kx-price-locked {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  opacity: 0.6;
  transition: filter 0.3s;
}
/* Hide Pay Now until logged in — enquire stays visible always */
.kx-prices-locked .kx-svc-btn-wrap { display: none !important; }

/* Pay/Quote buttons — stack vertically inside the price cell */
.kx-svc-btn-wrap,
.kx-svc-enquire-wrap {
  display: block;
  margin-left: 0;
  margin-top: 6px;
}
.kx-svc-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px 7px 12px;
  background: #C9A84C;
  color: #0A0E1A;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(201,168,76,0.25);
  text-decoration: none;
}
.kx-svc-pay-btn:hover {
  background: #e4c97e;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.kx-svc-pay-btn__icon { font-size: 0.95rem; }
.kx-svc-quote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #C9A84C;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.18s;
}
.kx-svc-quote-btn:hover { background: rgba(201,168,76,0.16); }

/* ──────────────────────────────────────────────
   MOBILE — Full card layout below 700px
   Replaces the 3-column table with stacked cards
   so nothing is ever truncated or off-screen.
────────────────────────────────────────────── */
@media (max-width: 700px) {

  /* ── Gate banner ── */
  .kx-svc-gate-banner { flex-direction: column; }
  .kx-svc-gate-banner__actions { width: 100%; flex-direction: column; }
  .kx-svc-gate-banner__actions a { text-align: center; justify-content: center; }

  /* ── Table wrapper: no side scroll ── */
  .kx-svc-table-wrap { overflow-x: hidden; }

  /* ── Collapse table structure into block ── */
  table.kx-svc-table,
  .kx-svc-table tbody { display: block; }

  /* ── Hide the desktop column headers ── */
  .kx-svc-table thead { display: none; }

  /* ── Each service row = card ── */
  .kx-svc-table tbody tr {
    display: block;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
  }
  .kx-svc-table tbody tr:last-child { border-bottom: none; }

  /* Open row — remove bottom border (desc row provides separator) */
  .kx-svc-table tbody tr.kx-svc-open { border-bottom: none; }

  /* ── All cells reset to block ── */
  .kx-svc-table tbody td {
    display: block;
    padding: 0;
    border: none;
    white-space: normal;
    font-size: inherit;
  }

  /* ── Service code — small muted label ── */
  .kx-svc-table tbody td:first-child {
    font-family: 'DM Mono', monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    color: #6B7280;
    margin-bottom: 5px;
    white-space: nowrap;
  }

  /* ── Service name — prominent headline ── */
  .kx-svc-table tbody td:nth-child(2) {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #F5F0E8;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-right: 44px; /* space for abs-positioned expand btn */
    margin-bottom: 10px;
  }

  /* ── Expand button — top-right of card ── */
  .kx-svc-table tbody td:nth-child(2) .kx-expand-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    margin-left: 0;
  }

  /* ── Model column — hide on mobile ── */
  .kx-svc-table tbody td:nth-child(3) {
    display: none;
  }

  /* ── Price + action buttons ── */
  .kx-svc-table tbody td:nth-child(4) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: 'DM Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #C9A84C;
  }

  /* Button groups: reset left margin */
  .kx-svc-btn-wrap,
  .kx-svc-enquire-wrap {
    display: block;
    margin-left: 0;
    margin-top: 6px;
  }

  /* Enquire td — show below price on mobile */
  .kx-svc-table tbody td.kx-td-enquire {
    display: block;
    text-align: left;
    padding: 8px 0 0;
  }

  /* ── Description row stays as block ── */
  .kx-svc-table tbody tr.kx-desc-row {
    display: block;
    padding: 0;
    background: rgba(10, 14, 26, 0.6) !important;
  }
  .kx-svc-table tbody tr.kx-desc-row td {
    display: block;
    padding: 0 !important;
  }

  /* ── Description inner body padding ── */
  .kx-desc-body {
    padding: 16px 18px 20px 18px;
  }
  .kx-desc-text {
    font-size: 0.875rem;
  }
  .kx-desc-tag {
    font-size: 0.75rem;
  }
}
