body {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.7;
    color: #334155;
    background: #f8fafc;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 968px) {
    .footer-content {
        gap: 24px;
        grid-template-columns: 1fr;
    }
}

.doc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
}

.doc-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
}

.doc-sidebar nav {
    display: block;
}

.doc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.doc-nav-section {
    margin-bottom: 16px;
}

.doc-nav-title {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0010c3;
    margin-bottom: 4px;
}

.doc-nav-link {
    display: block;
    padding: 2px 12px;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.doc-nav-link:hover {
    background: #e2e8f0;
    color: #2563eb;
}

.doc-nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.doc-content {
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.doc-content h1 {
    font-family: 'Clash Display', sans-serif;
    font-size: 42px;
    margin-bottom: 16px;
    color: #0f172a;
}

.doc-content h2 {
    font-family: 'Clash Display', sans-serif;
    font-size: 32px;
    margin: 48px 0 24px;
    color: #1e293b;
}

.doc-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: #334155;
}

.doc-content p {
    margin-bottom: 20px;
}

.doc-content ul,
.doc-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.doc-content li {
    margin-bottom: 12px;
}

.doc-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.note {
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.note-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}

.wp-note {
    background: #f0f9ff;
    border-left: 4px solid #00A0D2;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.wp-note-title {
    font-weight: 700;
    color: #0073AA;
    margin-bottom: 8px;
}

.doc-search {
    position: sticky;
    top: 0;
    padding-bottom: 12px;
    margin-bottom: 16px;
    background: #f8fafc;
}

.doc-search input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.doc-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}


@media (max-width: 800px) {
    .doc-container {
        grid-template-columns: 1fr;
    }

    .doc-sidebar {
        position: relative;
        top: 0;
    }
}

.tag {
    display: inline-block;
    padding: 1px 1px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.tag-pro {
    background: #166534;
    color: #ffffff;
}

.tag-proplus {
    background: #1e40af;
    color: #ffffff;
}

/* Documentation-specific styles */

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.search-hint {
    font-weight: 400;
    opacity: 0.7;
}

.search-results-list {
    max-height: 440px;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: #f1f5f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    font-size: 15px;
    color: #2563eb;
    margin-bottom: 4px;
}

.search-result-breadcrumb {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.search-result-content {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-result-content mark {
    background-color: #fef08a;
    color: #854d0e;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-no-results {
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5);
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

.table-responsive table {
    min-width: 600px;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
}

/* Keyboard navigation indicator */
*:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* Print Styles for Documentation */
@media print {
    .doc-sidebar,
    header,
    footer,
    .back-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .doc-container {
        display: block;
    }
    
    .doc-content {
        max-width: 100%;
        padding: 0;
    }
    
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

@media (max-width: 768px) {
    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 24px;
        right: 24px;
        font-size: 20px;
    }
    
    .search-results {
        max-height: 400px;
    }
    
    .search-results-list {
        max-height: 340px;
    }
}
