/*
Aepto Documentation - Main Stylesheet
Built with Aepto's official brand guidelines
*/

/* Using system fonts for complete independence */

/* ===========================
   CSS Custom Properties (Variables)
   =========================== */

/* Aepto Brand Colors */
:root {
    /* Primary Brand Colors */
    --aepto-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --aepto-primary-start: #667eea;
    --aepto-primary-end: #764ba2;

    /* Success Gradient */
    --aepto-success-gradient: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);

    /* Info Gradient */
    --aepto-info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Warning Gradient */
    --aepto-warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    /* Neutral Colors */
    --aepto-bg-light: #f8fafc;
    --aepto-bg-light-alt: #f8f9fa;
    --aepto-bg-card: #ffffff;
    --aepto-text-primary: #2d3748;
    --aepto-text-secondary: #718096;
    --aepto-border-color: #e2e8f0;

    /* Clean URLs - hide .html extensions */
    --url-suffix: '';

    /* Layout */
    --sidebar-width: 280px;
    --max-content-width: 1200px;
    --border-radius-card: 12px;
    --border-radius-hero: 16px;
    --border-radius-button: 8px;
    --shadow-card: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hero: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* ===========================
   Global Styles
   =========================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--aepto-text-primary);
    background-color: var(--aepto-bg-light);
    margin: 0;
    padding: 0;
}

/* ===========================
   Typography
   =========================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--aepto-text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--aepto-text-secondary);
}

a {
    color: var(--aepto-primary-start);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--aepto-primary-end);
}

/* ===========================
   Layout Structure
   =========================== */

.docs-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
    width: var(--sidebar-width);
    background-color: var(--aepto-bg-card);
    border-right: 1px solid var(--aepto-border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.docs-sidebar.collapsed {
    transform: translateX(-100%);
}

/* Main Content */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.docs-main.sidebar-collapsed {
    margin-left: 0;
}

/* Content Area */
.docs-content {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 80px);
}

/* ===========================
   Sidebar Navigation
   =========================== */

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid var(--aepto-border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--aepto-text-primary);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.75rem 1.5rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--aepto-text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--aepto-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
    margin: 0 0.5rem 0 0;
}

.nav-link:hover {
    background-color: rgba(102, 126, 234, 0.05);
    color: var(--aepto-primary-start);
}

.nav-link.active:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--aepto-primary-start);
    font-weight: 600;
    border-left: 3px solid var(--aepto-primary-start);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.nav-link i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.nav-link.active i {
    color: var(--aepto-primary-start);
}

/* Submenu */
.nav-submenu {
    list-style: none;
    padding-left: 2.5rem;
    margin: 0;
}

.nav-submenu .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin: 0;
    border-radius: 0 6px 6px 0;
}

/* ===========================
   Search Bar
   =========================== */

.docs-search {
    position: relative;
    margin: 1rem 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--aepto-border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: var(--aepto-bg-card);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--aepto-primary-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--aepto-text-secondary);
    font-size: 1rem;
}

/* ===========================
   Hero Sections
   =========================== */

.docs-hero {
    background: var(--aepto-primary-gradient);
    color: white;
    padding: 3rem 2rem;
    border-radius: var(--border-radius-hero);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-hero);
}

.docs-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

.docs-hero-content {
    position: relative;
    z-index: 1;
}

.docs-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.docs-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===========================
   Content Styles
   =========================== */

.docs-page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--aepto-text-primary);
}

.docs-breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.docs-breadcrumb a {
    color: var(--aepto-text-secondary);
}

.docs-breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--aepto-text-secondary);
}

.docs-breadcrumb .current {
    color: var(--aepto-text-primary);
    font-weight: 500;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
    .docs-sidebar {
        transform: translateX(-100%);
    }

    .docs-sidebar.mobile-open {
        transform: translateX(0);
    }

    .docs-main {
        margin-left: 0;
    }

    .docs-content {
        padding: 1rem;
        padding-top: 5rem; /* Balanced space for mobile menu button */
    }

    .docs-hero {
        margin-top: 2rem; /* Add extra space on homepage */
    }
}

@media (max-width: 768px) {
    .docs-hero {
        padding: 2rem 1rem;
    }

    .docs-hero h1 {
        font-size: 2rem;
    }

    .docs-content {
        padding: 1rem;
    }

    .docs-page-title {
        font-size: 1.75rem;
    }
}

/* ===========================
   Mobile Header
   =========================== */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dark mode support for mobile header */
[data-bs-theme="dark"] .mobile-header {
    background: rgba(18, 18, 18, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="brand"] .mobile-header {
    background: rgba(102, 126, 234, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 100%;
}

.mobile-header-left {
    display: flex;
    align-items: center;
}

.mobile-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.mobile-header-right {
    display: flex;
    align-items: center;
}

.mobile-header-logo {
    margin-top: 17px;
}

.mobile-header-logo img {
    height: 32px;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

/* Dark mode support for mobile menu toggle */
[data-bs-theme="dark"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="brand"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

[data-bs-theme="brand"] .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
    .mobile-header {
        display: block;
    }

    .docs-main {
        padding-top: 70px; /* Account for sticky header */
    }

    .docs-content {
        padding: 1rem;
        padding-top: 1rem; /* Reset since main has padding */
    }
}


/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(6px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .docs-sidebar,
    .mobile-menu-toggle,
    .sidebar-overlay {
        display: none !important;
    }

    .docs-main {
        margin-left: 0 !important;
    }

    .docs-content {
        padding: 0 !important;
    }
}
