/* Global Styles for Awaken */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #8e44ad;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --heading-color: #1a252f;
    --border-color: #e9ecef;
    --link-color: #3498db;
    --link-hover-color: #2980b9;
}

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

body {
    font-family: "Georgia", serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    display: flex;
    min-height: 100vh;
}

p {
    font-size: 1.2rem;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem;
}

.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo {
    font-size: 0;
    opacity: 0;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}


.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar.collapsed .sidebar-nav {
    padding: 0;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-link {
    padding: 1rem 0.75rem;
    text-align: center;
    font-size: 0;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    font-weight: 600;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 60px;
}

.top-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

/* Main Content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1002;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    .sidebar.show-mobile {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.collapsed.show-mobile {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .main-content.expanded {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 3.5rem;
        left: 1rem;
        z-index: 1003;
        background-color: var(--primary-color);
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    
    /* Add overlay for mobile sidebar */
    .sidebar.show-mobile::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .sidebar-nav {
        padding: 1rem 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .sidebar.collapsed .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        text-align: left;
    }

    .top-header {
        padding: 1rem;
        margin-top: 0;
    }

    main {
        padding: 1rem;
    }

    .sidebar-header {
        padding: 1rem 1.5rem;
    }
}

/* Tablet Responsive Design */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }

    .main-content.expanded {
        margin-left: 60px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1.1rem;
    line-height: 1.8;
}

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

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}


/* Content Specific Styles */
.markdown-content {
    max-width: 800px;
    margin: 0 auto;
}

.markdown-content code {
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 1.2em;
}

.markdown-content pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.1rem;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 1.5rem 0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

.markdown-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 1.3rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
}

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

.markdown-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin: 0.5rem 0;
}

.markdown-content p {
    margin: 1rem 0;
    line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 2rem 0 1rem 0;
    line-height: 1.4;
    color: var(--heading-color);
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child {
    margin-top: 0;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.markdown-content a {
    color: var(--link-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1.1em;
}

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

.markdown-content th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.markdown-content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.markdown-content blockquote {
    border-left: 4px solid var(--secondary-color);
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    font-style: italic;
    color: #555;
}
