/* =========================================================
   CGPEY API SUITE — SHARED STYLESHEET
   Used by all individual API pages
========================================================= */

/* ---------- HERO ---------- */
.api-hero {
  position: relative;
  padding: 140px 0 80px;
  background: #f4f8fb;
  overflow: hidden;
}
.api-hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  pointer-events: none;
}
.api-hero__shape--1 { width: 380px; height: 380px; background: #2dd4a8; top: -140px; left: -120px; }
.api-hero__shape--2 { width: 320px; height: 320px; background: #7dd3c0; top: 40px; right: -110px; opacity: 0.35; }
.api-hero__shape--3 { width: 260px; height: 260px; background: #1a9b8e; bottom: -130px; left: 45%; opacity: 0.15; }

.api-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.api-hero__breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.api-hero__breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.25s ease;
}
.api-hero__breadcrumb a:hover { color: #1a9b8e; }
.api-hero__breadcrumb i { font-size: 10px; color: #94a3b8; }

.api-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid #d7e3ec;
  color: #0f172a;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.api-hero__eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1a9b8e;
  box-shadow: 0 0 0 4px rgba(26, 155, 142, 0.15);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.25); }
}

.api-hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: #0f172a;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.api-hero__title span { color: #1a9b8e; }

.api-hero__subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: #4a5568;
  max-width: 560px;
  margin-bottom: 32px;
}

.api-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.api-hero__stats {
  display: flex;
  gap: 40px;
  padding-top: 26px;
  border-top: 1px solid #d7e3ec;
}
.api-hero__stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  line-height: 1;
}
.api-hero__stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-top: 6px;
  display: block;
}

.api-hero__visual-card {
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}
.api-hero__visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f6;
}
.api-hero__visual-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.api-hero__visual-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(26, 155, 142, 0.1);
  color: #1a9b8e;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.api-hero__visual-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1a9b8e;
  animation: pulse-dot 1.5s infinite;
}

.api-hero__visual-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed #eef2f6;
}
.api-hero__visual-row:last-child { border-bottom: none; }
.api-hero__visual-name {
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
}
.api-hero__visual-value {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.api-hero__visual-value--ok { background: rgba(26, 155, 142, 0.12); color: #1a9b8e; }
.api-hero__visual-value--warn { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.api-hero__visual-value--err { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

/* ---------- TRUST STRIP ---------- */
.api-trust {
  background: #ffffff;
  border-top: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
  padding: 26px 0;
}
.api-trust__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.api-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.api-trust__item i { color: #1a9b8e; font-size: 15px; }

/* ---------- SECTIONS ---------- */
.api-section {
  padding: 90px 0;
  background: #f4f8fb;
}
.api-section--alt { background: #ffffff; }

.api-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.api-section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.api-section__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(26, 155, 142, 0.1);
  color: #1a9b8e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border-radius: 50px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.api-section__title {
  font-size: 40px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.api-section__title span { color: #1a9b8e; }
.api-section__desc {
  font-size: 16.5px;
  color: #64748b;
  line-height: 1.65;
}

/* ---------- FEATURES ---------- */
.api-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.api-feature {
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 20px;
  padding: 30px 26px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.api-feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a9b8e, #2dd4a8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.api-feature:hover {
  border-color: #b8d4d0;
  box-shadow: 0 18px 40px rgba(26, 155, 142, 0.1);
  transform: translateY(-4px);
}
.api-feature:hover::before { transform: scaleX(1); }
.api-feature__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(26, 155, 142, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #1a9b8e;
  font-size: 22px;
  transition: all 0.3s ease;
}
.api-feature:hover .api-feature__icon {
  background: #1a9b8e;
  color: #ffffff;
  transform: scale(1.05);
}
.api-feature__title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.35;
}
.api-feature__text {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.65;
}

/* ---------- STEPS ---------- */
.api-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.api-step {
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.3s ease;
}
.api-step:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  transform: translateY(-4px);
}
.api-step__num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #1a9b8e;
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(26, 155, 142, 0.25);
}
.api-step__title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}
.api-step__text {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.65;
}

/* ---------- CODE BLOCK ---------- */
.api-code-wrap {
  background: #0f172a;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
}
.api-code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.api-code-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.api-code-dot--r { background: #ff5f57; }
.api-code-dot--y { background: #febc2e; }
.api-code-dot--g { background: #28c840; }
.api-code-title {
  margin-left: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  font-family: 'Monaco', 'Menlo', monospace;
}
.api-code-body {
  padding: 26px 28px;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: #cbd5e1;
  overflow-x: auto;
  white-space: pre;
}
.api-code-body .c-key { color: #7dd3c0; }
.api-code-body .c-str { color: #fbbf24; }
.api-code-body .c-num { color: #f472b6; }
.api-code-body .c-cmt { color: #64748b; font-style: italic; }
.api-code-body .c-fn { color: #93c5fd; }

/* ---------- BENEFITS ---------- */
.api-benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.api-benefit {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 18px;
  transition: all 0.3s ease;
}
.api-benefit:hover {
  border-color: #b8d4d0;
  box-shadow: 0 12px 28px rgba(26, 155, 142, 0.08);
}
.api-benefit__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(26, 155, 142, 0.1);
  color: #1a9b8e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.api-benefit__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.api-benefit__text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* ---------- USE CASES ---------- */
.api-usecases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.api-usecase {
  padding: 24px 22px;
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
}
.api-usecase:hover {
  border-color: #b8d4d0;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 155, 142, 0.08);
}
.api-usecase__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(26, 155, 142, 0.1);
  color: #1a9b8e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 18px;
}
.api-usecase__title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

/* ---------- FAQ ---------- */
.api-faq {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}
.api-faq__item {
  background: #ffffff;
  border: 1px solid #e2ebf1;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.api-faq__item:hover { border-color: #b8d4d0; }
.api-faq__item.api-faq--open {
  border-color: #1a9b8e;
  box-shadow: 0 12px 32px rgba(26, 155, 142, 0.1);
}
.api-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}
.api-faq__item.api-faq--open .api-faq__q { color: #1a9b8e; }
.api-faq__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e6f4f2;
  color: #1a9b8e;
  font-size: 12px;
  transition: all 0.3s ease;
}
.api-faq__item.api-faq--open .api-faq__icon {
  background: #1a9b8e;
  color: #ffffff;
  transform: rotate(45deg);
}
.api-faq__a-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.api-faq__item.api-faq--open .api-faq__a-wrap { max-height: 500px; }
.api-faq__a {
  padding: 0 24px 22px;
  font-size: 15px;
  color: #475569;
  line-height: 1.75;
}

/* ---------- CTA ---------- */
.api-cta-section {
  padding: 20px 0 100px;
  background: #ffffff;
}
.api-cta-box {
  position: relative;
  padding: 70px 40px;
  border-radius: 24px;
  background: #0f172a;
  overflow: hidden;
  text-align: center;
}
.api-cta-box__glow {
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26, 155, 142, 0.35), transparent 70%);
  top: -220px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.api-cta-box__inner { position: relative; z-index: 2; }
.api-cta-box__title {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.api-cta-box__text {
  font-size: 17px;
  color: #cbd5e1;
  margin-bottom: 32px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.api-cta-box__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  .api-hero { padding: 110px 0 60px; }
  .api-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .api-hero__title { font-size: 38px; }
  .api-hero__subtitle { font-size: 16px; }
  .api-hero__stats { gap: 30px; }
  .api-section { padding: 70px 0; }
  .api-section__title { font-size: 32px; }
  .api-features { grid-template-columns: repeat(2, 1fr); }
  .api-steps { grid-template-columns: 1fr; }
  .api-benefits { grid-template-columns: 1fr; }
  .api-usecases { grid-template-columns: repeat(2, 1fr); }
  .api-trust__inner { gap: 30px; }
}

@media (max-width: 575px) {
  .api-hero { padding: 100px 0 50px; }
  .api-hero__title { font-size: 28px; }
  .api-hero__subtitle { font-size: 15px; }
  .api-hero__stats { flex-wrap: wrap; gap: 20px; }
  .api-hero__stat-value { font-size: 22px; }
  .api-hero__actions .btn { width: 100%; justify-content: center; }
  .api-hero__visual-card { padding: 20px; }

  .api-section { padding: 55px 0; }
  .api-section__title { font-size: 24px; }
  .api-section__desc { font-size: 14.5px; }
  .api-features { grid-template-columns: 1fr; gap: 18px; }
  .api-feature { padding: 24px 22px; }
  .api-usecases { grid-template-columns: 1fr; }
  .api-cta-box { padding: 45px 24px; }
  .api-cta-box__title { font-size: 24px; }
  .api-cta-box__text { font-size: 15px; }
  .api-cta-box__actions { flex-direction: column; }
  .api-cta-box__actions .btn { width: 100%; justify-content: center; }
  .api-trust__inner { gap: 20px; }
  .api-trust__item { font-size: 12px; }
  .api-code-body { padding: 20px; font-size: 12px; }
  .api-faq__q { font-size: 15px; padding: 18px 20px; }
  .api-faq__a { padding: 0 20px 20px; font-size: 14.5px; }
}