/* Documentation Styles - TechSuivi */

/* Documentation Header */
.doc-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 120px 0 60px;
    margin-top: 80px;
}

.doc-header-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.doc-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.doc-header p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.doc-version {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.version-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.update-date {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Documentation Container */
.doc-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.doc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.sidebar-content {
    padding: 2rem;
}

.sidebar-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.doc-nav > ul > li {
    margin-bottom: 0.5rem;
}

.doc-nav ul ul {
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.doc-nav ul ul li {
    margin-bottom: 0.25rem;
}

.doc-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 0.9rem;
}

.doc-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.doc-nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Main Content */
.doc-main {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.doc-section {
    padding: 3rem;
    border-bottom: 1px solid var(--border-light);
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.doc-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.doc-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.subsection {
    margin: 2rem 0;
}

/* Info Boxes */
.info-box, .warning-box, .tip-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.info-box {
    background: #dbeafe;
    border-left: 4px solid var(--info-color);
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
}

.tip-box {
    background: #d1fae5;
    border-left: 4px solid var(--success-color);
}

.info-icon, .warning-icon, .tip-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-icon i {
    color: var(--info-color);
    font-size: 1.25rem;
}

.warning-icon i {
    color: var(--warning-color);
    font-size: 1.25rem;
}

.tip-icon i {
    color: var(--success-color);
    font-size: 1.25rem;
}

.info-content h4, .warning-content h4, .tip-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.info-content p, .warning-content p, .tip-content p {
    margin: 0;
}

/* Requirements Grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.requirement-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.requirement-card h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

.requirement-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.requirement-card li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.code-header {
    background: #334155;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #475569;
}

.code-title {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.copy-btn {
    background: transparent;
    border: 1px solid #64748b;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: #64748b;
    color: white;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
    background: transparent;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Step List */
.step-list {
    margin: 2rem 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.security-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    text-align: center;
}

.security-card h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.security-card i {
    font-size: 1.5rem;
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.workflow-step {
    text-align: center;
    padding: 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    min-width: 150px;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.step-icon i {
    font-size: 1.25rem;
}

.workflow-step h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.workflow-step p {
    margin: 0;
    font-size: 0.8rem;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.checklist i {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* Script Categories */
.script-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.script-category {
    background: white;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.script-category h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.script-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.script-category li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* API Endpoints */
.api-endpoint {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.method.get {
    background: #10b981;
    color: white;
}

.method.post {
    background: #3b82f6;
    color: white;
}

.method.put {
    background: #f59e0b;
    color: white;
}

.method.delete {
    background: #ef4444;
    color: white;
}

.endpoint {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Troubleshooting */
.troubleshoot-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.troubleshoot-item h3 {
    color: var(--danger-color);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.troubleshoot-item h3 i {
    font-size: 1.25rem;
}

/* FAQ */
.faq-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.5rem;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: #e2e8f0;
}

.faq-question h3 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.faq-question i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.faq-answer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.faq-answer p {
    margin: 0;
}

/* Support Section */
.support-section {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #e2e8f0 100%);
    padding: 3rem;
    border-radius: var(--radius-xl);
    margin: 2rem 0;
}

.support-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.support-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.support-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.support-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

.support-link i {
    font-size: 1.25rem;
}

/* Navigation Active State */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .doc-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .doc-sidebar {
        position: static;
        order: 2;
    }
    
    .doc-main {
        order: 1;
    }
    
    .sidebar-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .doc-header {
        padding: 100px 0 40px;
    }
    
    .doc-header h1 {
        font-size: 2rem;
    }
    
    .doc-header p {
        font-size: 1rem;
    }
    
    .doc-section {
        padding: 2rem 1.5rem;
    }
    
    .doc-section h2 {
        font-size: 2rem;
    }
    
    .requirements-grid,
    .feature-grid,
    .security-grid,
    .script-categories {
        grid-template-columns: 1fr;
    }
    
    .workflow-diagram {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .support-options {
        flex-direction: column;
        align-items: center;
    }
    
    .support-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .doc-container {
        padding: 1rem 0.5rem;
    }
    
    .doc-section {
        padding: 1.5rem 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .info-box,
    .warning-box,
    .tip-box {
        flex-direction: column;
        text-align: center;
    }
    
    .api-endpoint {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .doc-sidebar,
    .navbar,
    .footer {
        display: none;
    }
    
    .doc-container {
        grid-template-columns: 1fr;
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .doc-main {
        box-shadow: none;
        border: none;
    }
    
    .doc-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .code-block {
        break-inside: avoid;
    }
}