/* ==========================================================================
   Aara Tech Software Documentation System CSS - Lightweight Light Theme
   Brand Palette: Official Aara Coral Orange (#F15A24), Slate Navy (#0F172A)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --bg-body: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    
    /* Official Logo Palette */
    --primary: #F15A24;
    --primary-hover: #D94614;
    --secondary: #1E293B;
    --success: #00A651;
    --danger: #E11D48;
    
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-dim: #64748B;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.75;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header Navbar */
.docs-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.docs-brand img {
    height: 36px;
}

.docs-search-container {
    position: relative;
    width: 380px;
}

.docs-search-input {
    width: 100%;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 1rem 0.55rem 2.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.docs-search-input:focus {
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 12px rgba(241, 90, 36, 0.2);
}

/* Layout Grid */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr 240px;
    min-height: calc(100vh - 65px);
}

/* Left Sidebar */
.docs-sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1.2rem;
    overflow-y: auto;
}

.sidebar-category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    margin: 1.5rem 0 0.6rem 0.5rem;
}

.sidebar-category:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: block;
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary);
    background: rgba(241, 90, 36, 0.08);
}

.sidebar-link.active {
    color: var(--primary);
    font-weight: 700;
    border-left: 3px solid var(--primary);
}

/* Main Content Area */
.docs-content {
    padding: 2.5rem 3rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.docs-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.docs-body h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-main);
    margin: 2rem 0 1rem 0;
}

.docs-body p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* Code Snippets (Crisp Dark Container for high contrast code reading) */
pre.code-block {
    background: #0F172A;
    border: 1px solid #1E293B;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: #38BDF8;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #F8FAFC;
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.copy-btn:hover {
    background: var(--primary);
    color: #FFF;
}

/* Right TOC */
.docs-toc {
    background: #FFFFFF;
    border-left: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
}

.toc-title {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.toc-link {
    display: block;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    transition: var(--transition);
}

.toc-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE DESIGN (Docs Portal)
   ========================================================================== */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 240px 1fr;
    }
    .docs-toc {
        display: none;
    }
    .docs-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .docs-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .docs-brand {
        justify-content: space-between;
    }

    .docs-search-container {
        width: 100%;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 220px;
        overflow-y: auto;
        padding: 1rem;
    }

    .docs-content {
        padding: 1.5rem 1rem;
    }

    .docs-title {
        font-size: 1.6rem;
    }

    .docs-body h2 {
        font-size: 1.25rem;
    }

    pre.code-block {
        font-size: 0.8rem;
        padding: 1rem;
    }
}
