/*
 * @kanway-css-index
 * 文件: css/service/service-developer-api.css
 * 引用: service-developer-api.html
 * 依赖: header.css, page-banner.css
 */

.svc-api-page {
  padding: 0 0 72px;
  clear: both;
}

.svc-api-intro {
  margin: 40px 0 36px;
  max-width: 820px;
}

.svc-api-intro__lead {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.85;
  color: #495057;
}

.svc-api-intro__links {
  margin: 0;
  font-size: 14px;
}

.svc-api-intro__links a {
  font-weight: 600;
  color: #1d5198;
}

.svc-api-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  padding-left: 14px;
  border-left: 4px solid #1d5198;
}

.svc-api-section-desc {
  margin: -8px 0 20px;
  font-size: 15px;
  line-height: 1.75;
  color: #6c757d;
  max-width: 720px;
}

/* 亮点 */
.svc-api-highlights {
  margin-bottom: 48px;
}

.svc-api-highlights__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-api-card {
  padding: 24px 18px;
  background: #f8f9fb;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  text-align: center;
}

.svc-api-card .bx {
  font-size: 36px;
  color: #1d5198;
  line-height: 1;
}

.svc-api-card h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}

.svc-api-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #6c757d;
}

/* 能力模块 */
.svc-api-modules {
  margin-bottom: 48px;
}

.svc-api-modules__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-api-module {
  padding: 20px 18px;
  background: #fff;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
  border-left: 4px solid #1d5198;
}

.svc-api-module h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.svc-api-module p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.65;
  color: #6c757d;
}

.svc-api-module__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-api-module__tags li {
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1d5198;
  background: #e8f0fa;
  border-radius: 4px;
}

/* 快速开始 + 代码 */
.svc-api-start {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
}

.svc-api-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: api-step;
}

.svc-api-step {
  position: relative;
  padding: 0 0 20px 36px;
}

.svc-api-step:last-child {
  padding-bottom: 0;
}

.svc-api-step::before {
  counter-increment: api-step;
  content: counter(api-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #1d5198;
  border-radius: 50%;
}

.svc-api-step h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.svc-api-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6c757d;
}

.svc-api-code-wrap {
  background: #1a2332;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2d3a4f;
}

.svc-api-code-wrap__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #141b26;
  border-bottom: 1px solid #2d3a4f;
}

.svc-api-code-wrap__label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.svc-api-code-wrap__dots {
  display: flex;
  gap: 6px;
}

.svc-api-code-wrap__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.svc-api-code-wrap__dots span:nth-child(1) {
  background: #ef4444;
}

.svc-api-code-wrap__dots span:nth-child(2) {
  background: #eab308;
}

.svc-api-code-wrap__dots span:nth-child(3) {
  background: #22c55e;
}

.svc-api-code {
  margin: 0;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  font-family: Consolas, "Courier New", monospace;
  overflow-x: auto;
  white-space: pre;
}

.svc-api-code .cmt {
  color: #64748b;
}

.svc-api-code .key {
  color: #7dd3fc;
}

.svc-api-code .str {
  color: #86efac;
}

.svc-api-code .meth {
  color: #fcd34d;
}

/* 接口表 */
.svc-api-endpoints {
  margin-bottom: 48px;
}

.svc-api-table-wrap {
  overflow-x: auto;
  border: 1px solid #e1e5ea;
  border-radius: 12px;
}

.svc-api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.svc-api-table th,
.svc-api-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e8ecef;
  vertical-align: top;
}

.svc-api-table thead th {
  background: #f4f7fb;
  font-weight: 600;
  color: #333;
}

.svc-api-table tbody tr:last-child td {
  border-bottom: 0;
}

.svc-api-method {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  font-family: Consolas, monospace;
}

.svc-api-method--get {
  background: #dbeafe;
  color: #1d4ed8;
}

.svc-api-method--post {
  background: #dcfce7;
  color: #15803d;
}

.svc-api-method--put {
  background: #fef3c7;
  color: #b45309;
}

.svc-api-method--del {
  background: #fee2e2;
  color: #b91c1c;
}

.svc-api-path {
  font-family: Consolas, monospace;
  font-size: 13px;
  color: #333;
}

/* 协议对接 */
.svc-api-protocols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

.svc-api-protocol {
  padding: 18px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #e1e5ea;
  border-radius: 10px;
}

.svc-api-protocol .bx {
  font-size: 28px;
  color: #1d5198;
}

.svc-api-protocol h3 {
  margin: 10px 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.svc-api-protocol p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6c757d;
}

/* 接入流程 */
.svc-api-access {
  margin-bottom: 48px;
}

.svc-api-access__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.svc-api-access__item {
  padding: 18px 14px;
  background: linear-gradient(180deg, #f4f7fb 0%, #fff 100%);
  border: 1px solid #dce4ee;
  border-radius: 10px;
  text-align: center;
}

.svc-api-access__item .bx {
  font-size: 26px;
  color: #1d5198;
}

.svc-api-access__item h3 {
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 700;
}

.svc-api-access__item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #6c757d;
}

/* 联系条 */
.svc-api-contact-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #e8f0fa 0%, #f4f7fb 100%);
  border: 1px solid #c5d5eb;
  border-radius: 12px;
}

.svc-api-contact-bar__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #495057;
}

.svc-api-contact-bar__text strong {
  color: #1d5198;
}

.svc-api-contact-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.svc-api-btn {
  display: inline-block;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.svc-api-btn--primary {
  background: #1d5198;
  color: #fff;
}

.svc-api-btn--primary:hover {
  background: #153a6b;
  color: #fff;
}

.svc-api-btn--outline {
  border: 2px solid #1d5198;
  color: #1d5198;
  background: #fff;
}

.svc-api-btn--outline:hover {
  background: #1d5198;
  color: #fff;
}

/* FAQ */
.svc-api-faq {
  margin-bottom: 40px;
}

.svc-api-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.svc-api-faq__item {
  border: 1px solid #e1e5ea;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.svc-api-faq__item summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.svc-api-faq__item summary::-webkit-details-marker {
  display: none;
}

.svc-api-faq__item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: #1d5198;
}

.svc-api-faq__item[open] summary::after {
  content: '−';
}

.svc-api-faq__item summary:hover {
  background: #f8f9fb;
  color: #1d5198;
}

.svc-api-faq__body {
  padding: 0 20px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: #555;
}

.svc-api-faq__body p {
  margin: 0;
}

/* CTA */
.svc-api-cta {
  padding: 36px 24px;
  text-align: center;
  background: linear-gradient(135deg, #1d5198 0%, #2a6bb5 100%);
  border-radius: 12px;
  color: #fff;
}

.svc-api-cta h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.svc-api-cta p {
  margin: 0 0 20px;
  font-size: 15px;
  opacity: 0.92;
}

.svc-api-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.svc-api-cta .svc-api-btn--primary {
  background: #fff;
  color: #1d5198;
}

.svc-api-cta .svc-api-btn--primary:hover {
  background: #f0f4fa;
}

.svc-api-cta .svc-api-btn--outline {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  background: transparent;
}

.svc-api-cta .svc-api-btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 991px) {
  .svc-api-highlights__grid,
  .svc-api-protocols,
  .svc-api-access__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .svc-api-modules__grid {
    grid-template-columns: 1fr;
  }

  .svc-api-start {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .svc-api-highlights__grid,
  .svc-api-protocols,
  .svc-api-access__grid {
    grid-template-columns: 1fr;
  }

  .svc-api-contact-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .svc-api-contact-bar__actions {
    justify-content: center;
  }
}
