/* ===== CSS Variables - Matching Main Bultra Site ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-hero: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(37, 99, 235, 0.12);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ===== Navigation ===== */
.docs-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo .logo-img {
    height: 42px;
    width: auto;
}

.nav-logo .logo-text {
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-logo .logo-subtitle {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 14px;
    padding-left: 12px;
    border-left: 1px solid var(--gray-300);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 10px 16px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
    font-size: 15px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--gray-50);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.nav-link.back-home {
    color: var(--primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.nav-link.back-home:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===== Hero ===== */
.docs-hero {
    padding: 140px 24px 80px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.docs-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.docs-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.docs-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.docs-hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Main Content ===== */
.docs-main {
    padding: 80px 24px;
}

.content-container {
    max-width: 1240px;
    margin: 0 auto;
}

/* ===== Sections ===== */
.intro-section,
.cards-section,
.features-section {
    margin-bottom: 80px;
}

.intro-section h2,
.cards-section h2,
.features-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.intro-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    line-height: 1.8;
}

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.doc-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
}

.doc-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    transition: var(--transition);
}

.doc-card:hover .card-icon {
    background: var(--gradient-primary);
    color: #fff;
    transform: scale(1.05);
}

.doc-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.doc-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Features Grid ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.feature-item {
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-item:hover {
    background: var(--white);
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

.feature-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Documentation Page Layout ===== */
.docs-layout {
    display: flex;
    gap: 48px;
    padding: 100px 24px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.sidebar-section ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-section a {
    display: block;
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-section a:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.sidebar-section a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    font-weight: 500;
}

.docs-content {
    flex: 1;
    min-width: 0;
    max-width: 900px;
}

/* ===== Content Typography ===== */
.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.docs-content .lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 48px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
    letter-spacing: -0.3px;
}

.docs-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 12px;
}

.docs-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 8px;
}

.docs-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.docs-content ul {
    list-style: disc;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content ol.step-list {
    list-style: none;
}

.docs-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.docs-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.docs-content code {
    background: rgba(37, 99, 235, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
    font-size: 0.875em;
    color: var(--primary-dark);
}

.docs-content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid var(--gray-800);
}

.docs-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* ===== Tables ===== */
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 0.9rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.docs-content th,
.docs-content td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.docs-content th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-primary);
}

.docs-content td {
    color: var(--text-secondary);
}

.docs-content tr:hover td {
    background: var(--gray-50);
}

/* ===== Info Boxes ===== */
.info-box {
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border-left: 4px solid;
}

.info-box.note {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary);
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: #f59e0b;
}

.info-box.important {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
}

.info-box p {
    margin: 0;
    font-size: 0.95rem;
}

.info-box strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
}

/* ===== Step Lists ===== */
.step-list {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    position: relative;
    padding-left: 52px;
    margin-bottom: 24px;
    counter-increment: step;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.frozen {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-badge.closed {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

/* ===== Page Navigation ===== */
.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.page-nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
    max-width: 280px;
    border: 1px solid transparent;
}

.page-nav-link:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.page-nav-link.prev {
    align-items: flex-start;
}

.page-nav-link.next {
    align-items: flex-end;
    margin-left: auto;
}

.page-nav-link span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 500;
}

.page-nav-link strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Footer ===== */
.docs-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 60px 24px 30px;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    display: block;
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1240px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--gray-200);
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .sidebar-section {
        margin-bottom: 16px;
    }

    .sidebar-section ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 640px) {
    .docs-hero {
        padding: 120px 20px 60px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .page-nav {
        flex-direction: column;
    }

    .page-nav-link {
        max-width: none;
    }

    .page-nav-link.next {
        margin-left: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-card,
.feature-item {
    animation: fadeInUp 0.5s ease forwards;
}

.doc-card:nth-child(1) { animation-delay: 0.1s; }
.doc-card:nth-child(2) { animation-delay: 0.15s; }
.doc-card:nth-child(3) { animation-delay: 0.2s; }
.doc-card:nth-child(4) { animation-delay: 0.25s; }
.doc-card:nth-child(5) { animation-delay: 0.3s; }
