/* Stili per la pagina Documentazione */
.docs-page {
    background: #000;
    color: #fff;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Pro Notice Box */
.pro-notice {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,170,0,0.05));
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.pro-notice h4 {
    color: #ffd700;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.pro-notice p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.docs-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 80px;
    padding-left: 32px;
    padding-right: 32px;
    /* padding-top handled in styles.css */
    position: relative;
    z-index: 1;
}

/* Header */
.docs-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-top: 0;
}

.docs-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    margin: 10px 0;
    letter-spacing: -0.5px;
}

.docs-header .subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Product Pills */
.docs-product-pills {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.product-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-pill i {
    font-size: 1.2rem;
}

.product-pill:hover {
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.product-pill.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

/* Docs Content Layout */
.docs-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar */
.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px;
    box-shadow: none;
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    align-self: flex-start;
}

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

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

.sidebar-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.sidebar-link {
    display: block;
    padding: 8px 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
}

/* Main Content */
.docs-main {
    flex: 1;
    min-width: 0;
}

.docs-section {
    margin-bottom: 40px;
    scroll-margin-top: 100px;
}

.docs-section h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-section h2 i {
    color: #fff;
}

/* Docs Card */
.docs-card {
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 25px;
    box-shadow: none;
}

.docs-card h4 {
    font-size: 1.1rem;
    color: #fff;
    margin: 20px 0 12px;
}

.docs-card h4:first-child {
    margin-top: 0;
}

.docs-card p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 15px;
}

.docs-card ul, .docs-card ol {
    color: #cbd5e1;
    line-height: 1.7;
    padding-left: 20px;
    margin-bottom: 15px;
}

.docs-card li {
    margin-bottom: 8px;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.feature-list i {
    color: #10b981;
    font-size: 1rem;
}

/* Architecture Diagram */
.architecture-diagram {
    text-align: center;
    padding: 20px 0;
}

.arch-layer {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
}

.arch-layer h5 {
    color: #8b5cf6;
    font-weight: 600;
    margin-bottom: 15px;
}

.arch-components {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.arch-component {
    background: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.arch-component.support {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #7dd3fc;
}

.arch-agents {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.arch-agent {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.arch-arrow {
    padding: 10px 0;
    color: #8b5cf6;
    font-size: 1.5rem;
}

.arch-support {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Flow List */
.flow-list {
    padding-left: 25px;
}

.flow-list li {
    position: relative;
    padding-left: 10px;
}

.flow-list li::marker {
    color: #8b5cf6;
    font-weight: 600;
}

/* Agent Card */
.agent-card {
    position: relative;
}

.agent-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.agent-badge.av1 { background: linear-gradient(135deg, #ef4444, #f97316); }
.agent-badge.av2 { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.agent-badge.av3 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.agent-badge.av4 { background: linear-gradient(135deg, #10b981, #34d399); }
.agent-badge.av5 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.agent-badge.av6 { background: linear-gradient(135deg, #ec4899, #f472b6); }

/* Use Cases */
.use-cases {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.use-case {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Config Table */
.config-table {
    margin: 15px 0;
}

.config-row {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.config-row:last-child {
    border-bottom: none;
}

.config-label {
    font-weight: 700;
    color: #8b5cf6;
    min-width: 100px;
    font-size: 0.9rem;
}

.config-desc {
    color: #555;
    font-size: 0.95rem;
}

/* Sources Grid */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.source-category {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.source-category h5 {
    font-size: 0.9rem;
    color: #8b5cf6;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-category li {
    font-size: 0.85rem;
    color: #555;
    padding: 4px 0;
}

/* Comparison Table */
.comparison-table {
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.08));
    padding: 12px 15px;
    font-weight: 600;
    color: #2c3e50;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row:nth-child(even) {
    background: #fafafa;
}

.comparison-label {
    font-weight: 500;
    color: #2c3e50;
}

/* Panels List */
.panels-list {
    margin-top: 15px;
}

.panel-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.panel-item i {
    font-size: 1.3rem;
    color: #8b5cf6;
    min-width: 30px;
    text-align: center;
}

.panel-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 4px;
}

.panel-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    padding: 18px;
}

.info-card h5 {
    font-size: 1rem;
    color: #8b5cf6;
    margin-bottom: 8px;
}

.info-card p {
    margin: 0;
    font-size: 0.9rem;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.template-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.template-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.15);
}

.template-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.template-card strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

.template-card p {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

/* API List */
.api-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.api-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 8px;
}

.api-name {
    font-weight: 500;
    color: #2c3e50;
}

.api-license {
    font-size: 0.8rem;
    background: #e0f2fe;
    color: #0284c7;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Plans Comparison */
.plans-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.plan-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 25px;
    position: relative;
}

.plan-card.premium {
    border-color: #8b5cf6;
    box-shadow: 0 5px 25px rgba(139, 92, 246, 0.2);
}

.premium-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 6px 16px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-card h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #555;
}

.plan-features li i {
    width: 18px;
    text-align: center;
}

.plan-features li i.fa-check {
    color: #10b981;
}

.plan-features li i.fa-times {
    color: #ef4444;
}

.plan-features li.disabled {
    color: #999;
}

/* Troubleshoot */
.troubleshoot-item {
    padding: 20px;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
}

.troubleshoot-item:last-child {
    margin-bottom: 0;
}

.troubleshoot-item h4 {
    font-size: 1rem;
    color: #ef4444;
    margin: 0 0 10px 0;
}

.troubleshoot-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Empty State */
.docs-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    width: 100%;
}

.docs-empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.docs-empty-state h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.docs-empty-state p {
    color: #666;
    margin-bottom: 10px;
}

.docs-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.docs-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.35);
    color: white;
}

/* Footer */
.docs-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 992px) {
    .docs-content {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 30px;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .docs-sidebar .sidebar-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }
    
    .docs-sidebar .sidebar-section h4 {
        font-size: 0.8rem;
    }
    
    .sidebar-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .docs-header h1 {
        font-size: 1.8rem;
    }
    
    .docs-header .subtitle {
        font-size: 1rem;
    }
    
    .docs-product-pills {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .product-pill {
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .docs-container {
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 40px;
    }
    
    .docs-sidebar {
        flex-direction: column;
        gap: 10px;
    }
    
    .docs-sidebar .sidebar-section {
        min-width: 100%;
    }
    
    .docs-section h2 {
        font-size: 1.3rem;
        flex-wrap: wrap;
    }
    
    .docs-card {
        padding: 18px 15px;
    }
    
    .docs-card h4 {
        font-size: 1rem;
    }
    
    .docs-card p {
        font-size: 0.9rem;
    }
    
    .comparison-header,
    .comparison-row {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
    
    .comparison-header span:first-child,
    .comparison-row .comparison-label {
        font-weight: 700;
        color: #8b5cf6;
    }
    
    .arch-components,
    .arch-agents,
    .arch-support {
        flex-direction: column;
        align-items: center;
    }
    
    .agent-badge {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
    
    .config-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .config-label {
        min-width: auto;
    }
    
    .panel-item {
        flex-direction: column;
        text-align: center;
    }
    
    .panel-item i {
        margin-bottom: 8px;
    }
    
    .use-cases {
        justify-content: center;
    }
    
    .use-case {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    
    /* Plans comparison on mobile */
    .plans-comparison {
        grid-template-columns: 1fr;
    }
    
    .plan-card {
        padding: 20px 15px;
    }
    
    .plan-features li {
        font-size: 0.9rem;
    }
    
    /* Pro notice box */
    .pro-notice {
        padding: 15px !important;
    }
    
    .pro-notice h4 {
        font-size: 0.95rem !important;
    }
    
    .pro-notice p {
        font-size: 0.85rem !important;
    }
    
    /* Info cards */
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .info-card h5 {
        font-size: 0.95rem;
    }
    
    /* Sources grid */
    .sources-grid {
        grid-template-columns: 1fr;
    }
    
    /* API list */
    .api-list {
        grid-template-columns: 1fr;
    }
    
    .api-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Templates */
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .template-card {
        padding: 12px;
    }
    
    .template-icon {
        font-size: 1.5rem;
    }
    
    /* Troubleshoot */
    .troubleshoot-item {
        padding: 15px;
    }
    
    .troubleshoot-item h4 {
        font-size: 0.95rem;
    }
    
    /* Empty state */
    .docs-empty-state {
        padding: 40px 20px;
    }
    
    .docs-empty-state i {
        font-size: 3rem;
    }
    
    .docs-empty-state h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .docs-header h1 {
        font-size: 1.5rem;
    }
    
    .docs-header .subtitle {
        font-size: 0.9rem;
    }
    
    .docs-container {
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 30px;
    }
    
    .product-pill {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .product-pill i {
        font-size: 1rem;
    }
    
    .docs-section h2 {
        font-size: 1.15rem;
    }
    
    .docs-card {
        padding: 15px 12px;
        border-radius: 10px;
    }
    
    .docs-card h4 {
        font-size: 0.95rem;
    }
    
    .docs-card p, 
    .docs-card li {
        font-size: 0.85rem;
    }
    
    .sidebar-link {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .arch-component,
    .arch-agent {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .flow-list {
        padding-left: 18px;
    }
    
    .feature-list li {
        font-size: 0.85rem;
    }
}

/* Scrollbar for sidebar */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #8b5cf6;
}

/* Model badge responsive */
.model-badge {
    flex-wrap: wrap;
}

/* MOBILE FIXES - Override inline styles for AIVEK 4 docs */
@media (max-width: 768px) {
    /* Force all grid containers to single column */
    .docs-card [style*="display:grid"],
    .docs-card [style*="display: grid"],
    .docs-card .cards-grid,
    #aivek4-docs .docs-card div[style*="grid"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Fix info cards inside grids */
    .docs-card [style*="display:grid"] > div,
    .docs-card [style*="display: grid"] > div,
    #aivek4-docs .info-card {
        margin-bottom: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix tables overflow */
    .docs-card table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
    }
    
    .docs-card table th,
    .docs-card table td {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .model-badge {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        text-align: center;
        justify-content: center;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    /* Force single column on all grid elements */
    .docs-card [style*="display:grid"],
    .docs-card [style*="display: grid"],
    .docs-card .cards-grid,
    #aivek4-docs .docs-card div[style],
    .docs-main div[style*="grid"] {
        display: block !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Cards grid override for inline styles */
    .cards-grid,
    .docs-card > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
    
    .docs-card .info-card,
    #aivek4-docs .info-card {
        padding: 14px !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .docs-card .info-card h4,
    .docs-card .info-card h5,
    #aivek4-docs .info-card h4,
    #aivek4-docs .info-card h5 {
        font-size: 0.9rem !important;
    }
    
    .docs-card .info-card p,
    #aivek4-docs .info-card p {
        font-size: 0.82rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Fix examples boxes */
    .docs-card .examples > div,
    #aivek4-docs .examples > div {
        padding: 12px !important;
    }
    
    /* Prevent horizontal overflow */
    .docs-main,
    .docs-card,
    #aivek4-docs {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Fix table on mobile */
    .docs-card table {
        font-size: 0.75rem !important;
    }
    
    .docs-card table th,
    .docs-card table td {
        padding: 4px 6px !important;
        white-space: normal !important;
    }
}

@media (max-width: 380px) {
    .docs-header h1 {
        font-size: 1.3rem;
    }
    
    .product-pill {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .docs-section h2 {
        font-size: 1rem;
    }
    
    .model-badge span {
        font-size: 0.75rem !important;
    }
}

/* Forza scroll pagina docs */
body.docs-page {
    overflow-y: auto !important;
    overflow-x: clip !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* Prevent horizontal overflow globally */
html {
    overflow-x: clip;
}
body.docs-page {
    max-width: 100vw;
}

.docs-container {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box;
}

/* Ensure all content respects container */
.docs-content,
.docs-main,
.docs-section,
.docs-card {
    max-width: 100%;
    box-sizing: border-box;
}

/* Code blocks responsive */
.docs-card pre,
.docs-card code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .docs-card pre {
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .docs-card pre code {
        white-space: pre-wrap;
        word-break: break-word;
    }
}

/* AIVEK 4 Cards Grid - Responsive */
.a4-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.a4-cards-grid-sm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.a4-examples-grid {
    display: grid;
    gap: 12px;
}

.a4-faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .a4-cards-grid,
    .a4-cards-grid-sm,
    .a4-faq-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .a4-cards-grid,
    .a4-cards-grid-sm,
    .a4-faq-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .a4-cards-grid > div,
    .a4-cards-grid-sm > div,
    .a4-faq-grid > div {
        width: 100% !important;
    }
}

/* Background animato */
.animated-background {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none !important;
    overflow: hidden;
}

/* Minimal black/white overrides */
body.landing-page.docs-page {
    background: #000 !important;
    color: #fff !important;
}
body.landing-page.docs-page .animated-background {
    display: none !important;
}
body.landing-page.docs-page .docs-header h1,
body.landing-page.docs-page .docs-section h2,
body.landing-page.docs-page .docs-card h4,
body.landing-page.docs-page .sidebar-section h4 {
    color: #fff !important;
}
body.landing-page.docs-page .docs-header .subtitle,
body.landing-page.docs-page .docs-card p,
body.landing-page.docs-page .docs-card ul,
body.landing-page.docs-page .docs-card li,
body.landing-page.docs-page .sidebar-link,
body.landing-page.docs-page .pro-notice p {
    color: #cbd5e1 !important;
}
body.landing-page.docs-page .docs-section h2 i {
    color: #fff !important;
    opacity: 0.8;
}
body.landing-page.docs-page .docs-sidebar,
body.landing-page.docs-page .docs-card {
    background: #0b0b0b !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
}
body.landing-page.docs-page .product-pill {
    background: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: none !important;
}
body.landing-page.docs-page .product-pill.active {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}
body.landing-page.docs-page .sidebar-link:hover,
body.landing-page.docs-page .sidebar-link.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}
body.landing-page.docs-page .pro-notice {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
body.landing-page.docs-page .pro-notice h4 {
    color: #fff !important;
}

/* AIVEK 4 Section Styling - Clean Dark Theme */
.info-card {
    padding: 24px;
    border-radius: 16px;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.info-card h4, .info-card h5 {
    color: #fff !important; /* Force white for minimal theme */
    margin-bottom: 12px !important;
    font-size: 1.15rem;
    font-weight: 700;
}

.info-card p {
    color: #cbd5e1 !important;
    line-height: 1.6;
    margin: 0 !important;
    font-size: 0.95rem;
}

/* Example cards */
.a4-examples-grid > div {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.a4-examples-grid strong {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.a4-examples-grid p {
    color: #94a3b8 !important; 
    font-size: 0.9rem;
    margin: 0 !important;
}

/* FAQ Grid */
.a4-faq-grid > div {
    padding: 20px;
    border-radius: 16px;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.a4-faq-grid strong {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1rem;
}

.a4-faq-grid p {
    color: #cbd5e1 !important;
    font-size: 0.95rem;
    margin: 0 !important;
}

/* ============================================
   DOCS NAV BUBBLE + OVERLAY (mobile)
   ============================================ */

/* Bubble — hidden by default, shown via JS on mobile when sidebar scrolls out */
.docs-nav-bubble {
    display: none; /* JS adds .visible class */
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 9000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: #111;
    color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0,0,0,0.45), 0 0 0 0 rgba(255,255,255,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    align-items: center;
    justify-content: center;
}

.docs-nav-bubble.visible {
    display: flex;
    animation: bubbleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.docs-nav-bubble.hiding {
    animation: bubbleOut 0.3s ease forwards;
}

.docs-nav-bubble:active {
    transform: scale(0.92);
}

@keyframes bubbleIn {
    0%   { opacity: 0; transform: scale(0.3) translateY(20px); }
    60%  { opacity: 1; transform: scale(1.12) translateY(-4px); }
    80%  { transform: scale(0.95) translateY(1px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bubbleOut {
    0%   { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.4) translateY(16px); }
}

/* Overlay container */
.docs-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
}

.docs-nav-overlay.open {
    pointer-events: auto;
    visibility: visible;
}

/* Backdrop */
.docs-nav-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.docs-nav-overlay.open .docs-nav-overlay-backdrop {
    opacity: 1;
}

/* Panel — slides up from bottom-right */
.docs-nav-overlay-panel {
    position: absolute;
    bottom: 90px;
    right: 20px;
    width: 280px;
    max-height: 60vh;
    background: #111;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(24px) scale(0.92);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.docs-nav-overlay.open .docs-nav-overlay-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.docs-nav-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.docs-nav-overlay-header span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.docs-nav-overlay-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.docs-nav-overlay-close:hover {
    color: #fff;
}

/* Links container */
.docs-nav-overlay-links {
    padding: 12px 16px 16px;
    overflow-y: auto;
    flex: 1;
}

.docs-nav-overlay-links .overlay-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin: 14px 0 6px;
    padding-left: 4px;
}

.docs-nav-overlay-links .overlay-section-title:first-child {
    margin-top: 0;
}

.docs-nav-overlay-links a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s, color 0.15s;
}

.docs-nav-overlay-links a:hover,
.docs-nav-overlay-links a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* Only show on mobile breakpoint where sidebar is static */
@media (min-width: 993px) {
    .docs-nav-bubble,
    .docs-nav-overlay {
        display: none !important;
        visibility: hidden !important;
    }
}

