/* ===== Documentation Page Styles ===== */

/* General Styles */
.documentation-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar Styles - Option 4: Professional Blue Gradient */
.doc-sidebar {
    width: 280px;
    background: linear-gradient(135deg, #1a237e 0%, #0288d1 50%, #4fc3f7 100%);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.doc-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-sidebar nav li {
    margin: 0;
}

.doc-sidebar nav a {
    display: block;
    padding: 1rem 2rem;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.doc-sidebar nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ffffff;
    padding-left: 2.5rem;
}

.doc-sidebar nav a:active,
.doc-sidebar nav a.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #4fc3f7;
}

/* Main Content Styles */
.doc-content {
    flex: 1;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Styles */
.doc-content section {
    background: #ffffff;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Headings */
.doc-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #0288d1;
    font-weight: 600;
}

.doc-content h3 {
    color: #34495e;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.doc-content h4 {
    color: #4a5568;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Paragraphs */
.doc-content p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Lists */
.doc-content ul {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.doc-content ul li {
    margin-bottom: 0.75rem;
    position: relative;
}

.doc-content ul li::marker {
    color: #0288d1;
    font-weight: bold;
}

.doc-content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Strong/Bold Text */
.doc-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Code Elements */
.doc-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 0.9em;
}

/* Horizontal Rules */
.doc-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5rem 0;
}

/* Documentation Cards */
.doc-card {
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    border-left: 4px solid #0288d1;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.15);
}

.doc-card h3 {
    color: #0288d1;
    margin-top: 0;
    margin-bottom: 1rem;
}

.doc-card ul {
    margin-bottom: 0;
}

/* ID Anchors for Smooth Scrolling */
section[id] {
    scroll-margin-top: 2rem;
}

h3[id], h4[id] {
    scroll-margin-top: 2rem;
}

/* Mathematical Formulas Styling */
.doc-content p[style*="text-align:center"] {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

/* Special Styling for Scoring Methods */
#overall-scoring,
#scoring-by-company,
#scoring-by-indicator-group,
#why-three-methods,
#logic {
    padding-top: 1rem;
}

/* Link Styles within Content */
.doc-content a {
    color: #0288d1;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.doc-content a:hover {
    color: #4fc3f7;
    border-bottom-color: #4fc3f7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .documentation-container {
        flex-direction: column;
    }

    .doc-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .doc-sidebar nav {
        display: flex;
        overflow-x: auto;
    }

    .doc-sidebar nav ul {
        display: flex;
        flex-direction: row;
        white-space: nowrap;
    }

    .doc-sidebar nav a {
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .doc-sidebar nav a:hover {
        padding-left: 2rem;
        border-bottom-color: #ffffff;
    }

    .doc-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .doc-content {
        padding: 1.5rem 1rem;
    }

    .doc-content section {
        padding: 1.5rem;
    }

    .doc-content h2 {
        font-size: 1.75rem;
    }

    .doc-content h3 {
        font-size: 1.35rem;
    }

    .doc-content h4 {
        font-size: 1.15rem;
    }
}

/* Print Styles */
@media print {
    .doc-sidebar {
        display: none;
    }

    .doc-content {
        padding: 0;
    }

    .doc-content section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: #0288d1;
    color: #ffffff;
}

::-moz-selection {
    background: #0288d1;
    color: #ffffff;
}

/* ===== Floating Back to Top Button ===== */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1a237e 0%, #0288d1 50%, #4fc3f7 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.6);
    background: linear-gradient(135deg, #4fc3f7 0%, #0288d1 50%, #1a237e 100%);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top span {
    display: block;
    line-height: 1;
    font-weight: bold;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
}