/* =========================================
   PRIME SEO — DOCUMENTATION STYLES
   ========================================= */

/* --- Docs Hero (compact, light) --- */
.docs-hero {
    background: var(--bg-light);
    padding: 140px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.docs-hero-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 12px;
}

.docs-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.docs-search {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.docs-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg);
    transition: all 0.2s;
    outline: none;
}

.docs-search-input::placeholder {
    color: var(--text-light);
}

.docs-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.docs-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}


/* --- Docs Hub Grid --- */
.docs-hub {
    padding: 60px 0 80px;
}

.docs-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.docs-hub-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
}

.docs-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(99, 102, 241, 0.15);
}

.docs-hub-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.docs-hub-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.docs-hub-card-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.docs-hub-card-icon.icon-start { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.docs-hub-card-icon.icon-ai { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.docs-hub-card-icon.icon-seo { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.docs-hub-card-icon.icon-tech { background: linear-gradient(135deg, #10b981, #34d399); }
.docs-hub-card-icon.icon-tools { background: linear-gradient(135deg, #f59e0b, #fbbf24); }

.docs-hub-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.docs-hub-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.docs-hub-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.docs-hub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.docs-hub-link:hover {
    background: rgba(99, 102, 241, 0.06);
    color: var(--primary);
}

.docs-hub-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: color 0.2s;
}

.docs-hub-link:hover svg {
    color: var(--primary);
}


/* --- Docs Layout (sidebar + content) --- */
.docs-page {
    padding-top: 80px;
    min-height: 100vh;
    background: var(--bg);
}

.docs-layout {
    display: flex;
    gap: 48px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    align-items: flex-start;
}


/* --- Sidebar --- */
.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    padding: 24px 0;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.docs-sidebar-close {
    display: none;
}

.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.docs-sidebar-group {
    margin-bottom: 24px;
}

.docs-sidebar-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0 12px;
    margin-bottom: 8px;
}

.docs-sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.docs-sidebar-link:hover {
    color: var(--text);
    background: var(--bg-light);
}

.docs-sidebar-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
    border-left-color: var(--primary);
    font-weight: 600;
}

.docs-sidebar-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.5;
}

.docs-sidebar-link.active svg {
    opacity: 1;
}

.docs-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    width: 100%;
    margin-bottom: 16px;
}

.docs-sidebar-toggle svg {
    width: 18px;
    height: 18px;
}


/* --- Breadcrumb --- */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 0 8px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.docs-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.docs-breadcrumb a:hover {
    color: var(--primary);
}

.docs-breadcrumb-sep {
    color: var(--border);
}


/* --- Content Area --- */
.docs-content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
    padding: 0 0 80px;
}

.docs-content-header {
    padding: 16px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.docs-content-title {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 8px;
}

.docs-content-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* --- TOC (Table of Contents) --- */
.docs-toc {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.docs-toc-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 12px;
}

.docs-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.docs-toc-list a {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.docs-toc-list a:hover {
    color: var(--primary);
}

.docs-toc-list .toc-h3 {
    padding-left: 16px;
    font-size: 0.85rem;
}


/* --- Article Body --- */
.docs-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 40px 0 16px;
    padding-top: 24px;
}

.docs-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 28px 0 12px;
}

.docs-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 16px;
}

.docs-body ul,
.docs-body ol {
    margin: 0 0 16px 24px;
    line-height: 1.7;
    color: var(--text);
}

.docs-body li {
    margin-bottom: 6px;
}

.docs-body strong {
    font-weight: 600;
}

.docs-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.docs-body a:hover {
    color: var(--primary-hover);
}

.docs-body img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 16px 0;
}


/* --- Code Blocks --- */
.docs-body code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
    background: var(--bg-light);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
}

.docs-body pre {
    background: #0f0f23;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0 24px;
    overflow-x: auto;
    line-height: 1.6;
}

.docs-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.82rem;
    border-radius: 0;
}


/* --- Tables --- */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.9rem;
}

.docs-table th {
    background: var(--bg-light);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
}

.docs-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text);
}

.docs-table tr:hover td {
    background: var(--bg-light);
}

.docs-table code {
    font-size: 0.8em;
}


/* --- Callout Boxes --- */
.docs-tip,
.docs-warning,
.docs-info {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 16px 0 24px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.docs-tip {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--success);
    color: var(--text);
}

.docs-warning {
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--warning);
    color: var(--text);
}

.docs-info {
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--primary);
    color: var(--text);
}

.docs-callout-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

.docs-tip .docs-callout-title { color: var(--success); }
.docs-warning .docs-callout-title { color: var(--warning); }
.docs-info .docs-callout-title { color: var(--primary); }


/* --- PRO Badge --- */
.docs-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 100px;
    vertical-align: middle;
    margin-left: 8px;
}

.docs-pro-badge svg {
    width: 10px;
    height: 10px;
}

.docs-sidebar-link .docs-pro-badge {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 2px 8px;
}

.docs-hub-card-title .docs-pro-badge {
    font-size: 0.65rem;
    vertical-align: super;
}

.docs-content-title .docs-pro-badge {
    font-size: 0.72rem;
    vertical-align: middle;
}

.docs-hub-link .docs-pro-badge {
    font-size: 0.62rem;
    padding: 2px 8px;
}

/* PRO banner in doc page */
.docs-pro-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(249,115,22,0.08));
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text);
}

.docs-pro-banner strong {
    color: #d97706;
}

.docs-pro-banner a {
    color: #d97706;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-pro-banner a:hover {
    color: #b45309;
}


/* --- Steps --- */
.docs-steps {
    counter-reset: step;
    margin: 16px 0 24px;
}

.docs-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    counter-increment: step;
}

.docs-step::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.docs-step-content {
    flex: 1;
    padding-top: 4px;
}

.docs-step-content strong {
    display: block;
    margin-bottom: 4px;
}


/* --- Prev / Next Navigation --- */
.docs-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.docs-prev-next a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.docs-prev-next a:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.docs-prev-next .docs-nav-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.docs-prev-next .docs-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

.docs-prev-next .docs-next {
    text-align: right;
}

.docs-prev-next .docs-prev-empty,
.docs-prev-next .docs-next-empty {
    pointer-events: none;
}


/* --- CTA Banner --- */
.docs-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin: 48px 0 0;
}

.docs-cta-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.docs-cta-desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.docs-cta .btn {
    display: inline-flex;
}


/* --- Hub CTA (full width) --- */
.docs-hub-cta {
    padding: 0 0 80px;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .docs-hub-grid {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        width: 220px;
    }

    .docs-layout {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .docs-hero {
        padding: 120px 0 40px;
    }

    .docs-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100vh;
        background: var(--bg);
        z-index: 999;
        padding: 80px 24px 24px;
        overflow-y: auto;
    }

    .docs-sidebar.open {
        display: block;
    }

    .docs-sidebar-toggle {
        display: flex;
    }

    .docs-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg-light);
        border: 1px solid var(--border);
        cursor: pointer;
        color: var(--text);
    }

    .docs-layout {
        flex-direction: column;
    }

    .docs-content {
        max-width: 100%;
    }

    .docs-prev-next {
        grid-template-columns: 1fr;
    }

    .docs-cta {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .docs-hero-title {
        font-size: 1.8rem;
    }

    .docs-content-title {
        font-size: 1.5rem;
    }

    .docs-body pre {
        padding: 14px 16px;
        font-size: 0.78rem;
    }

    .docs-table {
        font-size: 0.82rem;
    }

    .docs-table th,
    .docs-table td {
        padding: 8px 10px;
    }
}
