/* API Documentation Styles */

/* Hero Section */
.api-hero {
    background: linear-gradient(135deg, #051F3D 0%, #0F2A4A 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.api-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.api-hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.api-hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}


/* Header override for API page - same as blog */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 20px rgba(5, 31, 61, 0.1) !important;
    border-bottom: 1px solid rgba(5, 31, 61, 0.1) !important;
}

/* API Navigation */
.api-nav {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 85px;
    z-index: 100;
}

.api-nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    padding: 20px 0;
    margin: 0;
}

.api-nav-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.api-nav-links a:hover,
.api-nav-links a.active {
    color: #051F3D;
    border-bottom-color: #051F3D;
}

/* Main Layout */
.api-content {
    padding: 60px 0;
    background: #f8fafc;
}

.api-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: start;
}

/* Sidebar */
.api-sidebar {
    position: sticky;
    top: 150px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

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

.sidebar-section ul li {
    margin-bottom: 8px;
}

.sidebar-section ul li a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
    display: block;
    transition: color 0.3s ease;
}

.sidebar-section ul li a:hover {
    color: #051F3D;
}

/* Documentation Content */
.api-docs {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.doc-section {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

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

.doc-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    scroll-margin-top: 200px;
}

.doc-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
    margin: 30px 0 15px;
}

.doc-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #475569;
    margin: 25px 0 15px;
}

.doc-section p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
}

.subsection {
    margin-top: 40px;
}

/* Info Box */
.info-box {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.info-box i {
    color: #0ea5e9;
    font-size: 1.2rem;
    margin-top: 2px;
}

.info-box h4 {
    color: #0c4a6e;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.info-box p {
    color: #0c4a6e;
    margin: 0;
}

/* Endpoints */
.endpoint {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 30px 0;
    overflow: hidden;
}

.endpoint-header {
    background: #1e293b;
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.method {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

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

.url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.endpoint-content {
    padding: 25px;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    contain: layout;
}

.code-header {
    background: #334155;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

.copy-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

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

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
}

/* Inline Code */
code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

/* Parameters Table */
.params-table {
    margin: 20px 0;
    overflow-x: auto;
}

.params-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.params-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.params-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

.params-table tr:last-child td {
    border-bottom: none;
}

.params-table code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Error Codes */
.error-codes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.error-code {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.error-code .code {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

.error-code .code.success {
    background: #dcfce7;
    color: #166534;
}

.error-code .code.error {
    background: #fef2f2;
    color: #dc2626;
}

.error-code .description h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.error-code .description p {
    margin: 0;
    color: #64748b;
}

/* Support Options */
.support-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.support-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.support-option:hover {
    border-color: #051F3D;
    box-shadow: 0 4px 12px rgba(5, 31, 61, 0.1);
}

.support-option i {
    color: #051F3D;
    font-size: 1.3rem;
    margin-top: 2px;
}

.support-option h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.support-option p {
    margin: 0;
    color: #64748b;
}

/* Example Sections */
.example-section {
    margin: 40px 0;
}

.example-section h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .api-sidebar {
        position: static;
        order: -1;
    }
    
    .api-nav-links {
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .api-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .api-hero-content p {
        font-size: 1.1rem;
    }
    
    .api-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .api-nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .api-docs {
        padding: 25px;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .support-options {
        grid-template-columns: 1fr;
    }
    
    .params-table {
        font-size: 0.85rem;
    }
    
    .params-table th,
    .params-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .api-hero {
        padding: 80px 0 60px;
    }
    
    .api-hero-content h1 {
        font-size: 2rem;
    }
    
    .doc-section h2 {
        font-size: 1.8rem;
    }
    
    .api-docs {
        padding: 20px;
    }
    
    .code-block pre {
        padding: 15px;
        font-size: 0.8rem;
    }
}
