/* ============================================================
   INTEGRATION GUIDES PAGE — ritorica.com/developers/integration-guides/
   ============================================================ */

:root {
  --ig-blue:   #4072D6;
  --ig-text:   #1a2340;
  --ig-muted:  #6b7280;
  --ig-border: #e5e9f5;
  --ig-bg:     #f7f9ff;
  --ig-code:   #0f172a;
}

/* ── Hero ───────────────────────────────────────────────────── */
.ig-hero {
  background: linear-gradient(135deg, #0d1b4b 0%, #1e3a8a 60%, #4072D6 100%);
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ig-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(99,144,234,.35) 0%, transparent 70%);
  pointer-events: none;
}
.ig-hero__inner { max-width: 760px; margin: 0 auto; position: relative; }
.ig-hero__tag {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ig-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}
.ig-hero__title span { color: #93b8ff; }
.ig-hero__sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 36px;
}
.ig-hero__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.ig-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.ig-hero__btn--primary {
  background: #fff;
  color: var(--ig-blue);
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.ig-hero__btn--secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.ig-hero__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.22); }

/* ── Quick stats bar ────────────────────────────────────────── */
.ig-bar {
  background: #fff;
  border-bottom: 1px solid var(--ig-border);
  padding: 28px 24px;
}
.ig-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.ig-bar__item {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 8px 24px;
  border-right: 1px solid var(--ig-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ig-bar__item:last-child { border-right: none; }
.ig-bar__item svg { color: var(--ig-blue); flex-shrink: 0; }
.ig-bar__text { font-size: .875rem; font-weight: 600; color: var(--ig-text); }

/* ── Section ────────────────────────────────────────────────── */
.ig-section { padding: 80px 24px; }
.ig-section--alt { background: var(--ig-bg); }
.ig-section--dark {
  background: var(--ig-code);
  color: #fff;
}
.ig-section__inner { max-width: 1140px; margin: 0 auto; }
.ig-section__hd { text-align: center; margin-bottom: 56px; }
.ig-section__tag {
  display: inline-block;
  background: #eef2ff;
  color: var(--ig-blue);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ig-section--dark .ig-section__tag {
  background: rgba(64,114,214,.25);
  color: #93b8ff;
}
.ig-section__title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--ig-text);
  margin-bottom: 14px;
}
.ig-section--dark .ig-section__title { color: #fff; }
.ig-section__sub {
  font-size: 1.0625rem;
  color: var(--ig-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}
.ig-section--dark .ig-section__sub { color: rgba(255,255,255,.65); }

/* ── Guide cards grid ───────────────────────────────────────── */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.ig-card {
  background: #fff;
  border: 1px solid var(--ig-border);
  border-radius: 16px;
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.ig-card:hover {
  box-shadow: 0 8px 32px rgba(64,114,214,.13);
  transform: translateY(-3px);
}

.ig-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ig-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ig-card__icon--blue    { background: #eef2ff; color: #4072D6; }
.ig-card__icon--green   { background: #ecfdf5; color: #059669; }
.ig-card__icon--purple  { background: #f3f0ff; color: #7c3aed; }
.ig-card__icon--orange  { background: #fff7ed; color: #ea580c; }
.ig-card__icon--teal    { background: #f0fdfa; color: #0d9488; }
.ig-card__icon--pink    { background: #fdf2f8; color: #db2777; }
.ig-card__icon--indigo  { background: #eef2ff; color: #4338ca; }
.ig-card__icon--yellow  { background: #fefce8; color: #ca8a04; }
.ig-card__icon--red     { background: #fef2f2; color: #dc2626; }
.ig-card__icon--sky     { background: #f0f9ff; color: #0369a1; }

/* difficulty badge */
.ig-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.ig-badge--beginner     { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ig-badge--intermediate { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.ig-badge--advanced     { background: #fdf4ff; color: #a21caf; border-color: #f0abfc; }

.ig-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ig-text);
  line-height: 1.3;
}
.ig-card__desc {
  font-size: .9rem;
  color: var(--ig-muted);
  line-height: 1.65;
  flex: 1;
}

.ig-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .8125rem;
  color: var(--ig-muted);
  margin-top: 2px;
}
.ig-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ig-card__meta-item svg { flex-shrink: 0; }

.ig-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--ig-border);
  font-size: .875rem;
  font-weight: 600;
  color: var(--ig-blue);
}
.ig-card__footer svg { transition: transform .2s; }
.ig-card:hover .ig-card__footer svg { transform: translateX(4px); }

/* ── Quick start steps ──────────────────────────────────────── */
.ig-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: step;
}
.ig-step {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
}
.ig-step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ig-blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.ig-step__title { font-size: .9375rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ig-step__desc  { font-size: .875rem; color: rgba(255,255,255,.6); line-height: 1.6; }

/* inline code snippet */
.ig-snippet {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 20px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: .8125rem;
  color: #93b8ff;
  line-height: 1.7;
  overflow-x: auto;
  margin-top: 4px;
  white-space: pre;
}
.ig-snippet .kw  { color: #f472b6; }
.ig-snippet .str { color: #86efac; }
.ig-snippet .key { color: #fbbf24; }
.ig-snippet .val { color: #67e8f9; }

/* ── SDK badges ─────────────────────────────────────────────── */
.ig-sdks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.ig-sdk {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.ig-sdk:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
}
.ig-sdk__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Code tabs ──────────────────────────────────────────────── */
.ig-tabs {
  max-width: 760px;
  margin: 40px auto 0;
}
.ig-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: 0;
}
.ig-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,.5);
  font-size: .8125rem;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
  font-family: inherit;
}
.ig-tab:hover { color: rgba(255,255,255,.85); }
.ig-tab--active {
  color: #93b8ff;
  border-bottom-color: #93b8ff;
}
.ig-tabpanel {
  display: none;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 22px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: .8125rem;
  color: #93b8ff;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.ig-tabpanel--active { display: block; }
.ig-tabpanel .kw  { color: #f472b6; }
.ig-tabpanel .str { color: #86efac; }
.ig-tabpanel .key { color: #fbbf24; }
.ig-tabpanel .val { color: #67e8f9; }
.ig-tabpanel .cm  { color: rgba(255,255,255,.35); }

/* ── CTA ────────────────────────────────────────────────────── */
.ig-cta {
  background: linear-gradient(135deg, #0d1b4b 0%, #4072D6 100%);
  padding: 80px 24px;
  text-align: center;
}
.ig-cta__inner { max-width: 640px; margin: 0 auto; }
.ig-cta__title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; color: #fff; margin-bottom: 16px; }
.ig-cta__sub   { font-size: 1.0625rem; color: rgba(255,255,255,.75); margin-bottom: 36px; line-height: 1.7; }
.ig-cta__btns  { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ig-cta__btn {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.ig-cta__btn--primary   { background: #fff; color: var(--ig-blue); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.ig-cta__btn--secondary { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.ig-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.22); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ig-bar__inner { flex-direction: column; align-items: center; }
  .ig-bar__item { border-right: none; border-bottom: 1px solid var(--ig-border); width: 100%; }
  .ig-bar__item:last-child { border-bottom: none; }
  .ig-steps { grid-template-columns: 1fr; }
  .ig-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ig-hero { padding: 72px 20px 60px; }
  .ig-section { padding: 60px 20px; }
}
