/* ===== ALL NON-CRITICAL STYLES (Loads after initial render) ===== */

/* Card hover effects */
.fd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Card type specific gradients */
.fd-card-value::before { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.fd-card-growth::before { background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%); }
.fd-card-earnings::before { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.fd-card-profit::before { background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); }
.fd-card-sector::before { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }
.fd-card-chart::before { background: linear-gradient(90deg, #06b6d4 0%, #0891b2 100%); }
.fd-summary::before { background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%); }
.fd-educational::before { background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); }
.fd-faqs::before { background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%); }
.fd-takeaways::before { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }

/* Enhanced Educational Notes */
.fd-educational-note {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    padding: 18px;
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid #fbbf24;
    font-size: 0.95rem;
    color: #78350f;
}
.fd-educational-note strong {
    color: #92400e;
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Educational Content */
.fd-educational {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.fd-educational-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.fd-edu-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.fd-edu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}
.fd-edu-icon {
    font-size: 32px;
    margin-bottom: 15px;
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fd-edu-card h4 {
    color: #1e293b;
    margin: 0 0 12px 0;
    font-size: 1.2rem;
}
.fd-edu-card p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.fd-edu-example {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
    font-size: 0.9rem;
    color: #475569;
}
.fd-edu-example strong {
    color: #0c4a6e;
}

/* FAQ Section */
.fd-faqs {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}
.fd-faqs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.fd-faq-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.fd-faq-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}
.fd-faq-item h4 {
    color: #1e293b;
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    padding-left: 10px;
    border-left: 3px solid #3b82f6;
}
.fd-faq-item p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Takeaways */
.fd-takeaways {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}
.fd-takeaways-content {
    margin-top: 20px;
}
.fd-takeaway-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.fd-takeaway-item:hover {
    transform: translateX(5px);
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}
.fd-takeaway-number {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.fd-takeaway-text h4 {
    color: #1e293b;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}
.fd-takeaway-text p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* Commentary Styles */
.fd-commentary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #3b82f6;
    position: relative;
}
.fd-chart-commentary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #1d4ed8;
}
.fd-commentary-badge {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.fd-chart-commentary .fd-commentary-badge {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}
.fd-commentary p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Table Styles */
.fd-table-container {
    overflow-x: auto;
    border-radius: 10px;
    margin-top: 20px;
}
.fd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.fd-table th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 18px 16px;
    font-weight: 600;
    text-align: left;
    font-size: 0.95rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}
.fd-table th:last-child {
    border-right: none;
}
.fd-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}
.fd-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #475569;
    transition: all 0.2s ease;
}
.fd-table tr:hover td {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e293b;
}
.fd-table tr:last-child td {
    border-bottom: none;
}

/* Chart Container */
.fd-chart-container {
    height: 380px;
    margin: 20px 0;
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fd-dynamic-card {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Stagger animations for dynamic cards */
.fd-dynamic-card:nth-child(1) { animation-delay: 0.1s; }
.fd-dynamic-card:nth-child(2) { animation-delay: 0.2s; }
.fd-dynamic-card:nth-child(3) { animation-delay: 0.3s; }
.fd-dynamic-card:nth-child(4) { animation-delay: 0.4s; }
.fd-dynamic-card:nth-child(5) { animation-delay: 0.5s; }
.fd-dynamic-card:nth-child(6) { animation-delay: 0.6s; }
.fd-dynamic-card:nth-child(7) { animation-delay: 0.7s; }
.fd-dynamic-card:nth-child(8) { animation-delay: 0.8s; }
.fd-dynamic-card:nth-child(9) { animation-delay: 0.9s; }
.fd-dynamic-card:nth-child(10) { animation-delay: 1.0s; }
.fd-dynamic-card:nth-child(11) { animation-delay: 1.1s; }
.fd-dynamic-card:nth-child(12) { animation-delay: 1.2s; }

/* Responsive Design */
@media (max-width: 768px) {
    .fd-educational-grid,
    .fd-faqs-grid {
        grid-template-columns: 1fr;
    }
    
    .fd-takeaway-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .fd-takeaway-number {
        margin: 0 auto 15px auto;
    }
    
    .fd-table th,
    .fd-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .fd-chart-container {
        height: 300px;
        padding: 15px;
    }
    
    /* Remove heavy effects on mobile */
    .fd-card:hover {
        transform: none;
    }
    
    .fd-card {
        backdrop-filter: none;
    }
}

/* Print styles for preload trick */
@media print {
    .financial-dashboard * {
        animation: none !important;
        transition: none !important;
    }
}