/* 
 * UniCoreFW CSS
 * Optimized and consolidated styles for documentation, roadmap and updates pages
 */
:root,
:host {
    --fa-style-family-classic: 'Font Awesome 6 Pro';
    --fa-font-regular: normal 400 1em/1 'Font Awesome 6 Pro';
}

@font-face {
    font-family: 'Font Awesome 6 Pro';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/fa-regular-400.woff2") format("woff2"), url("../fonts/fa-regular-400.woff") format("woff"), url("../fonts/fa-regular-400.ttf") format("truetype");
}

.far,
.fa-regular {
    font-weight: 400;
}

/* Container and Scrollbar Styles */
.container {
    width: 100%;
    max-height: 200px;
    overflow: auto;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(255, 255, 255, 0.3);
}

/* Color Variables */
:root {
    --primary-color: #3b82f6;
    --text-color: #333;
    --text-h3: #333;
    --text-h2: #333;
    --text-h1: #333;
    --text-a: #3b82f6;
    --text-a-hover: #3b82f6;
    --text-a-active: #3b82f6;
    --input-bg-color: #f3f4f6;

    --background-color: #fff;
    --sidebar-bg: #f5f7fa;
    --header-bg: #fff;
    --border-color: #e5e7eb;
    --hover-color: #dbeafe;
    --active-color: #bfdbfe;
    --code-bg: #f3f4f6;
    --code-hover: #dbeafe;
    --code-text: #000;
    --code-keyword: #8b5cf6;
    --code-function: #0284c7;
    --code-string: #059669;
    --code-comment: #6b7280;
    --code-number: #d97706;
    --code-shadow: #3b3b5b3b;
}

[data-theme="dark"] {
    --primary-color: linear-gradient(91deg, #7934DA 0%, #4D52E0 100%);
    --text-color: #cdd6f4;
    --text-h3: #cdd6f4;
    --text-h2: #cdd6f4;
    --text-h1: #cdd6f4;
    --text-a: #89dceb;
    --text-a-hover: #89b4fa;
    --text-a-active: #89b4fa;
    --input-bg-color: #000;

    --background-color: #1e1e2e;
    --sidebar-bg: #161b22;
    --header-bg: #1e1e2e;
    --border-color: #30363d;
    --hover-color: #1e242d;
    --active-color: #1d283a;
    --code-bg: #121325;
    --code-hover: #4daafc;
    --code-text: #e5e7eb;
    --code-keyword: #ff7b72;
    --code-function: #d2a8ff;
    --code-string: #a5d6ff;
    --code-comment: #8b949e;
    --code-number: #f0883e;
    --code-shadow: #3b3b5b;
}



/* Basic Resets and Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, 'Font Awesome 6 Pro';
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    padding: 1rem 2rem;
    /* border-bottom: 1px solid var(--border-color); */
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#header-content {
    margin: auto;
    width: 80%;
    justify-content: space-between;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
}

#body-content {
    margin: auto;
    width: 74%;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo svg {
    fill: var(--primary-color);
}

/* Navigation Styles */
nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-a-hover);
}

a.active {
    color: var(--text-a-active);
}

.right-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 8px;
}

.theme-toggle:hover {
    background-color: var(--hover-color);
}

/* Search Bar Styles */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 12px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 160px;
    background-color: var(--code-bg);
    color: var(--text-color);
    -webkit-box-shadow: 0 0 10px var(--code-shadow);
    -moz-box-shadow: 0 0 10px var(--code-shadow);
    box-shadow: 0 0 10px var(--code-shadow);
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-color);
    opacity: 0.7;
}

/* Download Button */
.download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: #2563eb;
}

/* Main Layout */
main {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    padding: 2rem 1rem;
    transition: width 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    direction: rtl;
    top: 76px;
    /* This matches your header height plus any padding */
    height: calc(100vh - 72px);
    /* This will make it take the full height of the viewport minus the header */
}

.sidebar-collapsed {
    width: 80px;
}

.sidebar-collapsed .sidebar-category {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    position: absolute;
    right: 10px;
    top: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 2;
}

.sidebar-toggle:hover {
    background-color: var(--hover-color);
}

.sidebar-header {
    /* padding: 0 1rem 1rem 1rem; */
    position: relative;
    margin-bottom: 1rem;
}

.sidebar-nav {
    list-style: none;
    direction: ltr;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-item a {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav-item a:hover {
    /* background-color: var(--hover-color); */
    color: var(--text-a-active);
}

.sidebar-nav-item a.active {
    color: var(--text-a-active);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.sidebar-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.3s;
}

.sidebar-collapsed .sidebar-nav-label {
    opacity: 0;
    width: 0;
}

.sidebar-nav-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-collapsed .sidebar-nav-icon {
    margin-right: 0;
    margin-left: 10px;
}

.sidebar-collapsed .sidebar-header {
    padding: 0.5rem;
}

.sidebar-collapsed .sidebar-nav-item a {
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar-category {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.sidebar-collapsed .sidebar-category {
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.7rem;
}

/* Submenu Styles */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.expanded {
    max-height: 500px;
}

.submenu-item a {
    padding-left: 3rem !important;
    font-size: 0.9rem;
}

.toggle-submenu {
    margin-left: auto;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(0deg);
    transition: transform 0.3s;
}

.submenu-active .toggle-submenu {
    transform: rotate(90deg);
}

/* Content Area */
.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: 900px;
    min-height: 900px;
    width: 100%;
}

.content li {
    /* list-style-type: none; */
    margin-left: 30px;
}

.content ul {
    margin-bottom: 10px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Examples and Code Blocks */
.example {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.code-block {
    background-color: var(--code-bg);
    padding: 0.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
    border-radius: 8px;
    -webkit-box-shadow: 0 0 10px var(--code-shadow);
    -moz-box-shadow: 0 0 10px var(--code-shadow);
    box-shadow: 0 0 10px var(--code-shadow);
}

.code-block code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9rem;
    color: var(--code-text);
    display: block;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
}

/* Code and Pre Formatting */
code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9rem;
    background-color: var(--code-bg);
    padding: 2px 12px;
    color: var(--code-text);
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
    line-height: 1.45;
    white-space: pre;
}

/* List item code styling */
li code {
    background-color: var(--code-bg);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 90%;
}

/* Syntax highlighting */
.code-keyword {
    color: var(--code-keyword);
    font-weight: bold;
}

.code-function {
    color: var(--code-function);
}

.code-string {
    color: var(--code-string);
}

.code-comment {
    color: var(--code-comment);
    font-style: italic;
}

.code-number {
    color: var(--code-number);
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.code-block:hover .copy-button {
    opacity: 0.8;
}

.copy-button:hover {
    background-color: var(--background-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    border: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background-color: var(--sidebar-bg);
}

tr:hover {
    background-color: var(--hover-color);
}

/* Warning Box */
.warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    color: #92400e;
}

[data-theme="dark"] .warning {
    background-color: #713f12;
    border-left: 4px solid #f59e0b;
    color: #fbbf24;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner,
.loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
    margin: 40px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

[data-theme="dark"] .spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
}

/* Error Message */
.error-message {
    color: #EF4444;
    text-align: center;
    padding: 20px;
    border: 1px solid #EF4444;
    border-radius: 8px;
    margin: 20px 0;
}

/* Search Results */
.search-results-container {
    position: absolute;
    top: 120%;
    right: -125px;
    width: 350px;
    max-height: 600px;
    overflow-y: auto;
    background: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 15px;
    margin-top: 5px;
    display: none;
    border: 1px solid var(--border-color);
}

.search-section-header {
    font-weight: 600;
    color: var(--text-color);
    margin: 15px 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item {
    display: block;
    padding: 10px 12px;
    margin: 6px 0;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background: var(--hover-color);
    border-color: var(--border-color);
}

.result-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.result-preview {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
}

.no-results {
    padding: 20px;
    color: var(--text-color);
    text-align: center;
    font-style: italic;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.search-results-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.7;
}

.search-close-btn:hover {
    opacity: 1;
}

/* Highlighting */
mark {
    background-color: rgba(77, 170, 252, 0.3);
    padding: 0 2px;
    border-radius: 2px;
    color: inherit;
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#scroll-to-top:hover {
    background-color: #2563eb;
}

#scroll-to-top.visible {
    opacity: 0.9;
    visibility: visible;
}

/* Markdown Content */
.markdown-content {
    line-height: 1.6;
}

.markdown-content h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.markdown-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.markdown-content table {
    width: 100%;
    margin: 1.5rem 0;
}

.markdown-content input[type="checkbox"] {
    margin-right: 8px;
}

/* Task List Styles */
.task-list-item {
    list-style-type: none;
    margin-left: -1.5rem;
}

/* Blockquote Styling */
blockquote {
    border-left: 4px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
    padding-left: 16px;
    margin: 16px 0;
}

/* Horizontal Rule */
hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

/* Indentation */
.indented-item {
    margin-left: 20px;
    margin-bottom: 8px;
}

li.indented {
    margin-left: 20px;
    list-style-type: circle;
}

/* Release Styles */
.release-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.release-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.release-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.release-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.latest-tag {
    background-color: #10B981;
}

.release-date {
    color: var(--text-color);
    opacity: 0.7;
}

.release-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.release-body {
    margin-top: 15px;
    line-height: 1.6;
}

.release-body h1,
.release-body h2 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.release-body h4 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.release-body ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.release-body li {
    margin-bottom: 8px;
}

.release-assets {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.asset-item:hover {
    background-color: var(--hover-color);
}

.asset-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* URL Form */
.url-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    display: none;
}

.url-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
}

#repo-url {
    min-width: 300px;
}

/* Releases Header */
.releases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.release-count {
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Logo and Icons */
#logo {
    width: 360px;
}

.wrapper {
    text-align: center;
}

.icons {
    text-align: center;
}

.icons i {
    color: var(--text-color);
    background: var(--background-color);
    padding: 13px;
    margin: 0 10px;
    font-size: 40px;
    border-radius: 50px;
    border: 3px solid var(--text-color);
    transition: all 200ms ease;
    text-decoration: none;
    position: relative;
}

.icons i:hover,
.icons i:active {
    color: var(--primary-color);
    background: none;
    cursor: pointer !important;
    transform: scale(1.2);
    -webkit-transform: scale(1.2);
    text-decoration: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    nav {
        margin-top: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav a {
        margin: 0.5rem;
    }

    .right-nav {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }

    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
    }

    .content {
        padding: 1.5rem;
    }

    .search-results-container {
        width: 320px;
        /* right: 5%; */
        left: -20%;
    }

    #header-content {
        width: 100%;
    }

    #body-content {
        width: 100%;
    }

    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .url-form {
        flex-direction: column;
    }

    .release-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .release-meta {
        margin-top: 10px;
    }
}

.page-section {
    display: none;
    width: 100%;
}

.page-section.active {
    display: flex;
}

#docs-section.active {
    display: flex;
}

#roadmap-section .content,
#updates-section .content {
    width: 100%;
    max-width: 900px;
    /* margin: 0 auto; */
    /* padding: 2rem; */
}

.url-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.page-section {
    display: none;
    width: 100%;
}

.page-section.active {
    display: flex;
}

#docs-section.active {
    display: flex;
}

#roadmap-section .content,
#updates-section .content {
    width: 100%;
    max-width: 900px;
    /* margin: 0 auto; */
    /* padding: 2rem; */
}

.url-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    #header-content {
        flex-direction: column;
        width: 100%;
        padding: 10px;
    }

    .logo-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        /* margin-bottom: 10px; */
        flex-direction: column;
    }

    nav {
        margin: 10px 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .right-nav {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .search-bar {
        width: 100%;
        margin: 10px 0;
    }

    .search-bar input {
        width: 100%;
    }

    #docs-section.active {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        max-width: none;
        top: 0;
    }

    .sidebar.sidebar-collapsed {
        width: 100%;
    }

    .content {
        padding: 1rem;
    }

    .url-form {
        flex-direction: column;
    }

    #repo-url {
        width: 100%;
    }


    /* Nav menu collapsible on mobile */
    .mobile-nav-collapsed nav {
        display: none;
    }

    .mobile-nav-collapsed .search-bar {
        display: none;
    }

    /* Make theme toggle and download button smaller on mobile */
    .theme-toggle,
    .download-btn {
        padding: 6px;
    }

    /* Fix image sizes on mobile */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .sidebar-nav-item a {
        padding: 0.8rem 0.5rem;
    }


    #download-btn {
        padding: 5px 10px;
        font-size: 0.9rem;
        border-radius: 50%;
    }

    /* Better handling of tables on small screens */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Adjustments for iPhone specifically */
    .logo img {
        width: 35px;
    }

    .logo-container h1 {
        font-size: 1.3rem;
    }

    /* Add space between nav items */
    nav {
        justify-content: space-evenly;
        gap: 5px;
    }

    .nav-link {
        /* padding: 0px 10px; */
        text-align: center;
        border-radius: 4px;
    }

    /* Ensure search bar is usable on iPhone */
    .search-bar input {
        height: 40px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    /* Make buttons more tappable */
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Fix code blocks on small screens */
    .code-block {
        max-width: 100%;
        overflow-x: auto;
    }

    .code-block code {
        white-space: pre;
        word-wrap: normal;
    }
}

@media (max-width: 932px) {
    #body-content {
        margin: auto;
        width: 100%;
    }

    header {
        background-color: var(--header-bg);
        padding: initial;
        /* padding: 1rem 2rem; */
        /* border-bottom: 1px solid var(--border-color); */
        /* display: flex; */
        justify-content: space-evenly;
        align-items: baseline;
        /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */
        position: sticky;
        top: 0;
        z-index: 1000;
        transition: all 0.3s ease;
        flex-wrap: nowrap;
        flex-direction: column-reverse;
    }

    #header-content {
        margin: auto;
        width: 100%;
        justify-content: space-between;
        padding: 10px;
        display: flex;
        flex-wrap: wrap;
    }
}

.icons {
    text-align: center;

}

.icons i {
    color: #00091B;
    background: #fff;
    padding: 13px;
    margin: 0 10px;
    font-size: 40px;
    border-radius: 50px;
    border: 2px solid #fff;
    transition: all 200ms ease;
    text-decoration: none;
    position: relative;
}

.icons i:hover,
.icons i:active {
    color: #fff;
    background: none;
    cursor: pointer !important;
    transform: scale(1.2);
    -webkit-transform: scale(1.2);
    text-decoration: none;

}