/* ============================================================
   CertBoost Docs Chrome - Premium UX/UI
   Used by: FeaturesDocs, ApiDocs, WebhooksDocs, DeveloperDocs
   ============================================================ */

.cb-docs-root { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: #0f172a; }
.cb-docs-root * { box-sizing: border-box; }

/* ===== HERO ================================================= */
.cb-docs-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 20px 72px;
    color: #fff;
    text-align: center;
    background: linear-gradient(140deg, #020617 0%, #0b1e4a 35%, #12307a 65%, #0b1e4a 90%, #060d24 100%);
    background-size: 200% 200%;
    animation: cbDocsBgShift 22s ease-in-out infinite;
}

@keyframes cbDocsBgShift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

.cb-docs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(56,189,248,.22), transparent 55%),
        radial-gradient(circle at 82% 78%, rgba(99,102,241,.22), transparent 55%);
    pointer-events: none;
    animation: cbDocsAurora 16s ease-in-out infinite alternate;
}

@keyframes cbDocsAurora { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(-2%,2%) scale(1.08)} }

.cb-docs-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    pointer-events: none;
}

.cb-docs-hero-inner { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }

/* Breadcrumb chip */
.cb-docs-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    background: rgba(56,189,248,.12);
    border: 1px solid rgba(56,189,248,.3);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #bae6fd;
    backdrop-filter: blur(8px);
}
.cb-docs-crumb i { width: 12px; height: 12px; color: #7dd3fc; }
.cb-docs-crumb a { color: inherit; text-decoration: none; opacity: .75; transition: opacity .2s; }
.cb-docs-crumb a:hover { opacity: 1; color: #fff; }
.cb-docs-crumb .sep { opacity: .4; }

.cb-docs-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.1;
    margin: 0 0 14px;
    color: #fff;
}
.cb-docs-hero h1 span {
    background: linear-gradient(90deg, #7dd3fc, #ffffff, #a5b4fc, #7dd3fc);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: cbDocsShine 5s linear infinite;
}
@keyframes cbDocsShine { to { background-position: 200% center; } }

.cb-docs-hero p.lead {
    color: #cbd5e1;
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 26px;
    line-height: 1.65;
}

.cb-docs-metrics {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 4px;
    flex-wrap: wrap;
    justify-content: center;
    backdrop-filter: blur(10px);
}
.cb-docs-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #e2e8f0;
    font-size: .85rem;
    font-weight: 600;
}
.cb-docs-metric + .cb-docs-metric { border-left: 1px solid rgba(255,255,255,.1); }
.cb-docs-metric i { width: 14px; height: 14px; color: #7dd3fc; }
.cb-docs-metric strong { color: #fff; font-weight: 700; }

/* ===== SUBNAV (glass, sticky) =============================== */
.cb-docs-subnav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(248, 250, 252, .82);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    padding: 10px 20px;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.cb-docs-subnav-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    color: #64748b;
    flex-wrap: wrap;
}
.cb-docs-crumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.cb-docs-crumb-trail a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.cb-docs-crumb-trail a:hover { color: #1e40af; }
.cb-docs-crumb-trail .cur { color: #1e40af; font-weight: 600; }
.cb-docs-crumb-trail .sep { color: #cbd5e1; }

.cb-docs-tabs {
    margin-left: auto;
    display: flex;
    gap: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 4px;
}
.cb-docs-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all .18s;
}
.cb-docs-tab i { width: 13px; height: 13px; }
.cb-docs-tab:hover { color: #1e40af; background: #f1f5f9; }
.cb-docs-tab.active {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    box-shadow: 0 4px 10px -2px rgba(37, 99, 235, .35);
}
.cb-docs-tab.services {
    color: #0f766e;
    background: linear-gradient(135deg, #ecfeff, #ccfbf1);
    border: 1px solid rgba(20,184,166,.3);
}
.cb-docs-tab.services:hover {
    color: #fff;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    border-color: transparent;
}

/* ===== LAYOUT (aside + main) ================================ */
.cb-docs-layout {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
}

/* ===== TOC RAIL (scroll-spy) ================================ */
.cb-docs-toc {
    position: sticky;
    top: 62px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding-right: 4px;
}
.cb-docs-toc::-webkit-scrollbar { width: 4px; }
.cb-docs-toc::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }
.cb-docs-toc h4 {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #94a3b8;
    margin: 0 0 12px;
    padding-left: 14px;
    font-weight: 700;
}
.cb-docs-toc ul { list-style: none; padding: 0; margin: 0; position: relative; }
.cb-docs-toc ul::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    border-radius: 2px;
}
.cb-docs-toc li { position: relative; }
.cb-docs-toc a {
    display: block;
    padding: 7px 14px;
    margin-left: 0;
    font-size: .82rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0 6px 6px 0;
    transition: all .18s;
    border-left: 2px solid transparent;
    margin-left: -2px;
}
.cb-docs-toc a:hover { color: #1e40af; background: #eff6ff; }
.cb-docs-toc a.active {
    color: #1e40af;
    font-weight: 600;
    background: linear-gradient(90deg, #eff6ff, transparent);
    border-left-color: #2563eb;
}

/* ===== MAIN CONTENT container =============================== */
.cb-docs-main { min-width: 0; }

/* ===== CTA BLOCK (Services link) ============================ */
.cb-docs-cta {
    max-width: 1160px;
    margin: 40px auto 70px;
    padding: 0 20px;
}
.cb-docs-cta-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0d9488 100%);
    color: #fff;
    border-radius: 20px;
    padding: 48px 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 30px;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .4);
}
.cb-docs-cta-card::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 70%;
    height: 220%;
    background: conic-gradient(from 0deg, rgba(56,189,248,.35), rgba(99,102,241,.2), rgba(20,184,166,.25), rgba(56,189,248,.35));
    filter: blur(60px);
    animation: cbDocsSpin 30s linear infinite;
    opacity: .7;
}
@keyframes cbDocsSpin { to { transform: rotate(360deg); } }
.cb-docs-cta-text { position: relative; z-index: 1; }
.cb-docs-cta-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(125, 211, 252, .15);
    border: 1px solid rgba(125, 211, 252, .35);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #bae6fd;
    margin-bottom: 14px;
}
.cb-docs-cta-eyebrow i { width: 12px; height: 12px; }
.cb-docs-cta-card h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.2;
}
.cb-docs-cta-card p {
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 540px;
    margin: 0;
    line-height: 1.6;
}
.cb-docs-cta-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cb-docs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 11px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.cb-docs-btn i { width: 16px; height: 16px; }
.cb-docs-btn-primary {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,.3);
}
.cb-docs-btn-primary:hover {
    color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -5px rgba(0,0,0,.4);
}
.cb-docs-btn-ghost {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
}
.cb-docs-btn-ghost:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.4);
}

/* ===== RESPONSIVE =========================================== */
@media (max-width: 900px) {
    .cb-docs-layout { grid-template-columns: 1fr; gap: 24px; }
    .cb-docs-toc { position: static; height: auto; max-height: none; padding-right: 0; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0; }
    .cb-docs-toc ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; }
    .cb-docs-toc ul::before { display: none; }
    .cb-docs-toc a { border-left: 0; border-radius: 6px; padding: 8px 12px; }
    .cb-docs-toc a.active { border-left: 0; background: #eff6ff; }
    .cb-docs-cta-card { grid-template-columns: 1fr; padding: 32px 26px; }
    .cb-docs-subnav-inner { font-size: .75rem; }
    .cb-docs-tabs { margin-left: 0; width: 100%; overflow-x: auto; }
}
@media (max-width: 520px) {
    .cb-docs-hero { padding: 56px 20px 48px; }
    .cb-docs-metric { padding: 8px 12px; font-size: .78rem; }
    .cb-docs-cta-card { padding: 26px 20px; }
}

/* ===== DEVELOPER HUB CARDS (DeveloperDocs) ================== */
.cb-dev-grid {
    max-width: 1160px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}
.cb-dev-card {
    display: block;
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 32px 28px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.cb-dev-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #14b8a6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
}
.cb-dev-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 20px 40px -15px rgba(37,99,235,.25);
    color: inherit;
}
.cb-dev-card:hover::before { transform: scaleX(1); }
.cb-dev-card-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    border-radius: 14px;
    margin-bottom: 18px;
    transition: all .3s;
}
.cb-dev-card:hover .cb-dev-card-icon {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    transform: scale(1.06) rotate(-3deg);
}
.cb-dev-card-icon i { width: 24px; height: 24px; }
.cb-dev-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -.01em;
}
.cb-dev-card p {
    font-size: .88rem;
    color: #475569;
    margin: 0 0 18px;
    line-height: 1.55;
}
.cb-dev-card-foot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.cb-dev-card-foot i { width: 14px; height: 14px; transition: transform .2s; }
.cb-dev-card:hover .cb-dev-card-foot i { transform: translateX(4px); }
