/* 脚本知识库 — service-script.html */

.svc-script-page {
  padding: 0 0 72px;
}

.page-hero + .svc-script-page .svc-script-intro {
  margin-top: 0.75rem;
}

.svc-script-intro {
  margin: 40px 0 32px;
}

.svc-script-intro__lead {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.85;
  color: #495057;
}

.svc-script-intro__links {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-family: var(--site-ui-font, 'Segoe UI', system-ui, -apple-system, 'Microsoft YaHei', 'PingFang SC', sans-serif);
}

.svc-script-intro__links a {
  font-weight: 500;
  color: var(--menu-sub-brand, #1d5198);
  text-decoration: none;
}

.svc-script-section-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  padding-left: 14px;
  border-left: 4px solid #1d5198;
}

.svc-script-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.svc-script-filter {
  padding: 8px 18px;
  border: 1px solid #c5d4ea;
  border-radius: 5px;
  background: #fff;
  color: #1d5198;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.svc-script-filter:hover {
  background: #ebf3ff;
  border-color: #1d5198;
}

.svc-script-filter.is-active {
  background: #1d5198;
  border-color: #1d5198;
  color: #fff;
}

.svc-script-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-script-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e1e5ea;
  border-radius: 5px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.svc-script-card:hover {
  border-color: #c5d4ea;
  box-shadow: 0 8px 24px rgba(29, 81, 152, 0.08);
}

.svc-script-card.is-hidden {
  display: none;
}

.svc-script-card__head {
  padding: 18px 20px 0;
}

.svc-script-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.svc-script-card__tag {
  padding: 3px 10px;
  border-radius: 5px;
  background: #ebf3ff;
  color: #1d5198;
  font-size: 12px;
  font-weight: 600;
}

.svc-script-card__title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
}

.svc-script-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6c757d;
}

.svc-script-card__preview {
  margin: 16px 20px 0;
  padding: 14px 16px;
  border-radius: 5px;
  background: #1e2430;
  color: #c9d1d9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow: hidden;
  max-height: 96px;
  white-space: pre-wrap;
}

.svc-script-card__foot {
  margin-top: auto;
  padding: 16px 20px 20px;
}

.svc-script-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #1d5198;
  border-radius: 5px;
  background: #fff;
  color: #1d5198;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.svc-script-card__btn:hover {
  background: #1d5198;
  color: #fff;
}

.svc-script-empty {
  display: none;
  margin: 24px 0 0;
  padding: 32px;
  text-align: center;
  border: 1px dashed #c5d4ea;
  border-radius: 5px;
  color: #6c757d;
}

.svc-script-empty.is-visible {
  display: block;
}

.svc-script-highlights {
  margin: 48px 0 0;
}

.svc-script-highlights__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-script-highlight {
  padding: 24px 20px;
  border: 1px solid #e1e5ea;
  border-radius: 5px;
  background: #f8fafc;
}

.svc-script-highlight i {
  display: block;
  margin-bottom: 12px;
  font-size: 28px;
  color: #1d5198;
}

.svc-script-highlight h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.svc-script-highlight p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6c757d;
}

.svc-script-cta {
  margin-top: 48px;
  padding: 32px 36px;
  border-radius: 5px;
  background: linear-gradient(135deg, #1d5198 0%, #2a6bb5 100%);
  color: #fff;
}

.svc-script-cta h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.svc-script-cta p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.92;
}

.svc-script-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.svc-script-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.svc-script-btn--primary {
  background: #fff;
  color: #1d5198;
}

.svc-script-btn--primary:hover {
  background: #ebf3ff;
}

.svc-script-btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

.svc-script-btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.svc-script-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
}

.svc-script-modal.is-open {
  display: flex;
}

.svc-script-modal__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: 85vh;
  overflow: auto;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.svc-script-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.svc-script-modal__header {
  padding: 24px 28px 16px;
  background: #1d5198;
  color: #fff;
}

.svc-script-modal__header h3 {
  margin: 0 0 6px;
  padding-right: 40px;
  font-size: 20px;
  font-weight: 700;
}

.svc-script-modal__header p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
}

.svc-script-modal__code {
  margin: 0;
  padding: 24px 28px 28px;
  background: #1e2430;
  color: #c9d1d9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
}

@media (max-width: 991px) {
  .svc-script-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .svc-script-highlights__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .svc-script-grid,
  .svc-script-highlights__grid {
    grid-template-columns: 1fr;
  }
}
