/* Custom styles for better formatting and readability */

/* Improve heading spacing */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    padding-top: 0.5rem !important;
    border-bottom: 1px solid #e1e4e8 !important;
    padding-bottom: 0.3rem !important;
}

/* Add more space after headings */
.rst-content h1 + p,
.rst-content h2 + p,
.rst-content h3 + p,
.rst-content h4 + p,
.rst-content h5 + p,
.rst-content h6 + p {
    margin-top: 1.5rem !important;
}

/* Improve list spacing */
.rst-content ul,
.rst-content ol {
    margin: 1.5rem 0 !important;
    padding-left: 2rem !important;
}

.rst-content li {
    margin: 0.8rem 0 !important;
    line-height: 1.6 !important;
}

/* Better paragraph spacing */
.rst-content p {
    margin: 1.2rem 0 !important;
    line-height: 1.7 !important;
}

/* Improve code blocks */
.rst-content pre {
    margin: 1.5rem 0 !important;
    padding: 1.5rem !important;
    border-radius: 6px !important;
    border: 1px solid #e1e4e8 !important;
    background-color: #f6f8fa !important;
}

.rst-content code {
    background-color: #f6f8fa !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
    font-size: 0.9em !important;
}

/* Better table formatting */
.rst-content table {
    margin: 1.5rem 0 !important;
    border-collapse: collapse !important;
    width: 100% !important;
}

.rst-content th,
.rst-content td {
    padding: 0.8rem 1rem !important;
    border: 1px solid #e1e4e8 !important;
    text-align: left !important;
}

.rst-content th {
    background-color: #f6f8fa !important;
    font-weight: 600 !important;
}

/* Improve blockquotes */
.rst-content blockquote {
    margin: 1.5rem 0 !important;
    padding: 1rem 1.5rem !important;
    border-left: 4px solid #0366d6 !important;
    background-color: #f6f8fa !important;
    border-radius: 0 6px 6px 0 !important;
}

/* Better emphasis styling */
.rst-content strong {
    font-weight: 600 !important;
    color: #24292e !important;
}

.rst-content em {
    font-style: italic !important;
    color: #586069 !important;
}

/* Improve section spacing */
.rst-content .section {
    margin-bottom: 3rem !important;
}

/* Better horizontal rules */
.rst-content hr {
    margin: 2rem 0 !important;
    border: none !important;
    border-top: 2px solid #e1e4e8 !important;
}

/* Improve table of contents */
.rst-content .toctree-wrapper {
    margin: 2rem 0 !important;
    padding: 1.5rem !important;
    background-color: #f6f8fa !important;
    border-radius: 6px !important;
    border: 1px solid #e1e4e8 !important;
}

/* Better link styling */
.rst-content a {
    color: #0366d6 !important;
    text-decoration: none !important;
}

.rst-content a:hover {
    text-decoration: underline !important;
    color: #0256cc !important;
}

/* Improve mobile responsiveness */
@media (max-width: 768px) {
    .rst-content h1,
    .rst-content h2,
    .rst-content h3 {
        font-size: 1.5rem !important;
        margin-top: 1.5rem !important;
    }
    
    .rst-content p,
    .rst-content li {
        font-size: 0.95rem !important;
    }
    
    .rst-content pre {
        font-size: 0.85rem !important;
        padding: 1rem !important;
    }
}
