:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar-menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-color) 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.hero .description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Products Preview */
.products-preview {
    padding: 4rem 0;
}

.products-preview h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card h3 {
    margin-bottom: 1rem;
}

.product-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Content Pages */
.content-page {
    padding: 2rem 0 4rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
}

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

.content h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.content p {
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.content pre {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.content pre code {
    background-color: transparent;
    padding: 0;
}

.content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-light);
    font-style: italic;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content table th,
.content table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.content table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background-color: var(--bg-light);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* List/Section Pages */
.section-pages,
.section-subsections {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.section-pages h2,
.section-subsections h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.page-list {
    list-style: none;
    padding: 0;
}

.page-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-list li:last-child {
    border-bottom: none;
}

.page-list a {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.page-list a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-description {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

.subsection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.subsection-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.subsection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subsection-card h3 {
    margin-bottom: 0.75rem;
}

.subsection-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.25rem;
}

.subsection-card h3 a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.subsection-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

/* Documentation Layout */
.docs-container {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    gap: 2rem;
    align-items: flex-start;
}

.docs-sidebar-wrapper {
    flex: 0 0 280px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.docs-sidebar {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.docs-sidebar-content {
    position: relative;
}

.docs-sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.docs-sidebar-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.docs-sidebar-section {
    margin-bottom: 1.5rem;
}

.docs-sidebar-section:last-child {
    margin-bottom: 0;
}

.docs-sidebar-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin: 0 0 0.75rem 0;
    padding: 0;
}

.docs-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-menu-item {
    margin: 0;
    padding: 0;
}

.docs-menu-item a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
}

.docs-menu-item a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.docs-menu-item.active a {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.docs-menu-subsection {
    margin: 0;
    padding: 0;
    list-style: none;
}

.docs-sidebar-submenu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0;
    border-left: 2px solid var(--border-color);
}

.docs-sidebar-submenu .docs-menu-item {
    margin: 0.25rem 0;
}

.docs-sidebar-submenu .docs-menu-item a {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    color: var(--text-light);
}

.docs-sidebar-submenu .docs-menu-item a:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Collapsible menu items */
.docs-menu-item-collapsible {
    position: relative;
}

.docs-menu-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.docs-menu-item-text {
    flex: 1;
}

.docs-menu-item-chevron {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: var(--text-light);
    margin-left: 0.5rem;
    user-select: none;
    flex-shrink: 0;
}

.docs-menu-item-collapsible.expanded .docs-menu-item-chevron {
    transform: rotate(180deg);
}

.docs-menu-subsection-collapsible {
    max-height: 0 !important;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    margin: 0;
    padding: 0;
    opacity: 0;
}

.docs-menu-subsection-collapsible.expanded {
    max-height: 2000px !important;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

.docs-menu-item-collapsible.expanded .docs-menu-item-chevron {
    transform: rotate(180deg);
}

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

.docs-content-inner {
    max-width: 800px;
}

.docs-index {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.docs-index h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.docs-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.docs-index-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.docs-index-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.docs-index-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.docs-index-card h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.docs-index-card h3 a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.docs-index-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

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

    .docs-container {
        flex-direction: column;
        padding: 0 1rem;
    }

    .docs-sidebar-wrapper {
        flex: 1;
        position: relative;
        top: 0;
        max-height: none;
        width: 100%;
        margin-bottom: 2rem;
    }

    .docs-sidebar {
        position: relative;
    }

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