/* ==========================================
   COMPREHENSIVE DARK MODE FIXES
   Fixes white-on-white text issues across all pages
   ========================================== */

/* Contact Form Dark Mode Fixes */
@media (prefers-color-scheme: dark) {
    
    /* Fix contact form section background */
    .contact-form-section {
        background: linear-gradient(135deg, 
            rgba(17, 24, 39, 0.95) 0%, 
            rgba(31, 41, 55, 0.98) 100%) !important;
    }
    
    /* Fix contact form container text */
    .contact-form-wrapper h2,
    .contact-form-wrapper p,
    .contact-form label {
        color: #f9fafb !important;
    }
    
    /* Fix form inputs and textareas */
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        background: #374151 !important;
        border-color: #6b7280 !important;
        color: #f9fafb !important;
    }
    
    .contact-form input::placeholder,
    .contact-form textarea::placeholder {
        color: #9ca3af !important;
    }
    
    /* Fix form itself */
    .contact-form {
        background: linear-gradient(145deg, 
            rgba(31, 41, 55, 0.98) 0%, 
            rgba(17, 24, 39, 0.95) 100%) !important;
        border-color: #4b5563 !important;
    }
    
    /* Fix contact info sidebar */
    .contact-info {
        background: rgba(31, 41, 55, 0.95) !important;
        border-color: #4b5563 !important;
    }
    
    .contact-info h3,
    .contact-info p,
    .contact-info span,
    .contact-info-item {
        color: #f9fafb !important;
    }
    
    .contact-info-item svg {
        color: #60a5fa !important;
    }
    
    /* Fix all page hero sections */
    .page-hero,
    .hero-section,
    .section-hero {
        background: linear-gradient(135deg, 
            rgba(17, 24, 39, 0.95) 0%, 
            rgba(31, 41, 55, 0.98) 100%) !important;
    }
    
    .page-hero h1,
    .page-hero p,
    .hero-section h1,
    .hero-section p {
        color: #f9fafb !important;
    }
    
    /* Fix all section backgrounds */
    section {
        background: #111827 !important;
    }
    
    section h2,
    section h3,
    section p:not(.card p):not(.service-card p):not(.product-card p) {
        color: #f9fafb !important;
    }
    
    /* Fix specific sections with light backgrounds */
    .about-section,
    .services-section,
    .products-section,
    .media-section,
    .privacy-section,
    .terms-section {
        background: #111827 !important;
    }
    
    /* Fix stat cards in dark mode */
    .stat-card,
    .stats-item {
        background: rgba(31, 41, 55, 0.9) !important;
        border-color: #4b5563 !important;
    }
    
    .stat-card h3,
    .stat-card p,
    .stats-item h3,
    .stats-item p {
        color: #f9fafb !important;
    }
    
    /* Fix feature cards */
    .feature-item,
    .feature-box {
        background: rgba(31, 41, 55, 0.9) !important;
        border-color: #4b5563 !important;
    }
    
    .feature-item h3,
    .feature-item p,
    .feature-box h3,
    .feature-box p {
        color: #f9fafb !important;
    }
    
    /* Fix career/job cards */
    .job-card,
    .position-card {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .job-card h3,
    .job-card p,
    .position-card h3,
    .position-card p {
        color: #000000 !important;
    }
    
    /* Fix benefits section */
    .benefits-grid,
    .benefit-item {
        background: transparent !important;
    }
    
    .benefit-item h4,
    .benefit-item p {
        color: #f9fafb !important;
    }
    
    /* Fix process/steps section */
    .process-grid,
    .steps-container {
        background: transparent !important;
    }
    
    .process-item,
    .step-item {
        background: rgba(31, 41, 55, 0.9) !important;
        border-color: #4b5563 !important;
    }
    
    .process-item h4,
    .process-item p,
    .step-item h4,
    .step-item p {
        color: #f9fafb !important;
    }
    
    /* Fix header/navigation in dark mode */
    header {
        background: rgba(17, 24, 39, 0.95) !important;
        border-bottom: 1px solid #374151 !important;
        backdrop-filter: blur(10px);
    }
    
    nav a {
        color: #e5e7eb !important;
    }
    
    nav a:hover,
    nav a.active {
        color: #60a5fa !important;
        background: rgba(96, 165, 250, 0.1) !important;
    }
    
    /* Fix weird tab background in dark mode */
    nav a::before {
        background: transparent !important;
    }
    
    /* Fix dropdown menus */
    .dropdown-menu,
    .submenu {
        background: rgba(31, 41, 55, 0.98) !important;
        border-color: #4b5563 !important;
    }
    
    .dropdown-menu a,
    .submenu a {
        color: #e5e7eb !important;
    }
    
    .dropdown-menu a:hover,
    .submenu a:hover {
        background: rgba(96, 165, 250, 0.1) !important;
        color: #60a5fa !important;
    }
    
    /* Fix table styles */
    table {
        background: rgba(31, 41, 55, 0.9) !important;
        border-color: #4b5563 !important;
    }
    
    th {
        background: rgba(17, 24, 39, 0.95) !important;
        color: #f9fafb !important;
        border-color: #4b5563 !important;
    }
    
    td {
        color: #e5e7eb !important;
        border-color: #4b5563 !important;
    }
    
    /* Fix blockquotes */
    blockquote {
        background: rgba(31, 41, 55, 0.9) !important;
        border-left-color: #60a5fa !important;
        color: #e5e7eb !important;
    }
    
    /* Fix code blocks */
    code, pre {
        background: rgba(17, 24, 39, 0.95) !important;
        color: #e5e7eb !important;
        border-color: #4b5563 !important;
    }
    
    /* Fix privacy/terms content */
    .policy-content,
    .terms-content {
        color: #e5e7eb !important;
    }
    
    .policy-content h2,
    .policy-content h3,
    .terms-content h2,
    .terms-content h3 {
        color: #f9fafb !important;
    }
    
    /* Fix all list items */
    li {
        color: #e5e7eb !important;
    }
    
    ul, ol {
        color: #e5e7eb !important;
    }
    
    /* Fix any remaining white text on white background issues */
    .white-bg {
        background: #111827 !important;
    }
    
    .light-bg {
        background: rgba(31, 41, 55, 0.9) !important;
    }
    
    /* Fix accordion/toggle content */
    .accordion-content,
    .toggle-content {
        background: rgba(31, 41, 55, 0.9) !important;
        color: #e5e7eb !important;
    }
    
    /* Fix modal content */
    .modal-content {
        background: rgba(31, 41, 55, 0.98) !important;
        color: #f9fafb !important;
        border-color: #4b5563 !important;
    }
    
    .modal-header {
        border-bottom-color: #4b5563 !important;
    }
    
    .modal-footer {
        border-top-color: #4b5563 !important;
    }
    
    /* ==========================================
       LEGAL PAGES (Privacy Policy, Terms of Use)
       Fix white text on white background issues
       ========================================== */
    
    /* Legal content container */
    .legal-content {
        background: linear-gradient(135deg, 
            rgba(17, 24, 39, 0.95) 0%, 
            rgba(31, 41, 55, 0.98) 100%) !important;
    }
    
    .legal-content .container {
        background: transparent !important;
    }
    
    /* Legal document styling */
    .legal-document {
        background: rgba(31, 41, 55, 0.98) !important;
        color: #f9fafb !important;
        border-color: #4b5563 !important;
    }
    
    /* Headings in legal pages */
    .legal-document h1,
    .legal-document h2,
    .legal-document h3,
    .legal-document h4,
    .legal-document h5,
    .legal-document h6 {
        color: #f9fafb !important;
    }
    
    /* Paragraphs and text */
    .legal-document p,
    .legal-document li,
    .legal-document span,
    .legal-document div {
        color: #e5e7eb !important;
    }
    
    /* Strong/bold text */
    .legal-document strong {
        color: #f9fafb !important;
        font-weight: 600 !important;
    }
    
    /* Lists in legal pages */
    .legal-document ul,
    .legal-document ol {
        color: #e5e7eb !important;
    }
    
    .legal-document ul li,
    .legal-document ol li {
        color: #e5e7eb !important;
    }
    
    /* Links in legal content */
    .legal-document a {
        color: #60a5fa !important;
    }
    
    .legal-document a:hover {
        color: #93c5fd !important;
    }
    
    /* Page hero for legal pages */
    .page-hero {
        background: linear-gradient(135deg, 
            rgba(102, 126, 234, 0.1) 0%, 
            rgba(118, 75, 162, 0.1) 100%) !important;
    }
    
    .page-hero h1,
    .page-hero h2,
    .page-hero p {
        color: #f9fafb !important;
    }
    
    /* Code blocks in legal pages */
    .legal-document code,
    .legal-document pre {
        background: rgba(17, 24, 39, 0.9) !important;
        color: #f9fafb !important;
        border-color: #4b5563 !important;
    }
    
    /* Tables in legal pages */
    .legal-document table {
        background: rgba(31, 41, 55, 0.95) !important;
        border-color: #4b5563 !important;
    }
    
    .legal-document th {
        background: rgba(55, 65, 81, 0.95) !important;
        color: #f9fafb !important;
        border-color: #6b7280 !important;
    }
    
    .legal-document td {
        color: #e5e7eb !important;
        border-color: #4b5563 !important;
    }
    
    /* Blockquotes in legal pages */
    .legal-document blockquote {
        background: rgba(55, 65, 81, 0.5) !important;
        border-left-color: #667eea !important;
        color: #e5e7eb !important;
    }
    
    /* HR dividers */
    .legal-document hr {
        border-color: #4b5563 !important;
    }
    
    /* Nested divs and sections */
    .legal-document section,
    .legal-document article,
    .legal-document aside {
        color: #e5e7eb !important;
    }
    
    /* ==========================================
       FIX LIGHT TEXT ON DARK MODE CARDS
       Cards showing unreadable light text
       ========================================== */
    
    /* Product & Service Cards - Main text */
    .card p,
    .product-card p,
    .service-card p,
    .card-content p {
        color: #f3f4f6 !important;
        opacity: 1 !important;
    }
    
    /* Card headings */
    .card h3,
    .product-card h3,
    .service-card h3,
    .card-content h3 {
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    /* Feature lists in cards */
    .feature-list,
    .feature-list li,
    .card ul li,
    .product-card ul li,
    .service-card ul li {
        color: #f3f4f6 !important;
        opacity: 1 !important;
    }
    
    /* All service card text elements */
    .service-card *:not(.btn):not(.button) {
        color: #f3f4f6 !important;
    }
    
    .service-card .description,
    .service-card span,
    .service-card li {
        color: #f3f4f6 !important;
        opacity: 1 !important;
    }
    
    /* Card pricing */
    .card-pricing,
    .card-pricing .price,
    .card-pricing small {
        color: #f9fafb !important;
        opacity: 1 !important;
    }
    
    /* Card badges */
    .card-badge {
        color: #ffffff !important;
        background: rgba(99, 102, 241, 0.9) !important;
    }
    
    /* Card backgrounds */
    .card,
    .product-card,
    .service-card {
        background: rgba(31, 41, 55, 0.9) !important;
        border-color: #4b5563 !important;
    }
    
    /* Card footer buttons */
    .card-footer .btn {
        opacity: 1 !important;
    }
}

/* Pricing Card Dark Mode Fix */
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .pricing-card * {
    color: #e5e7eb !important;
}
[data-theme="dark"] .pricing-card h4 {
    color: #f9fafb !important;
}
[data-theme="dark"] .pricing-card {
    background: rgba(31, 41, 55, 0.9) !important;
    border-color: #4b5563 !important;
}
[data-theme="dark"] .pricing-card.featured {
    background: rgba(79, 70, 229, 0.15) !important;
    border-color: #6366f1 !important;
}
[data-theme="dark"] .pricing-card ul li {
    color: #d1d5db !important;
}
[data-theme="dark"] .pricing-card, [data-theme="dark"] .pricing-card * {color: #e5e7eb !important;} [data-theme="dark"] .pricing-card h4 {color: #f9fafb !important;} [data-theme="dark"] .pricing-card {background: rgba(31, 41, 55, 0.9) !important; border-color: #4b5563 !important;} [data-theme="dark"] .pricing-card.featured {background: rgba(79, 70, 229, 0.15) !important; border-color: #6366f1 !important;} [data-theme="dark"] .pricing-card ul li {color: #d1d5db !important;}
[data-theme="dark"] .gallery-overlay {background: rgba(17, 24, 39, 0.95) !important;} [data-theme="dark"] .gallery-overlay h3, [data-theme="dark"] .gallery-overlay p, [data-theme="dark"] .gallery-hint, [data-theme="dark"] .gallery-metrics small {color: #e5e7eb !important;} [data-theme="dark"] .page-hero::before {opacity: 0.7 !important;} [data-theme="dark"] .about-hero::before, [data-theme="dark"] .media-hero::before {background: linear-gradient(135deg, rgba(79, 70, 229, 0.5) 0%, rgba(147, 51, 234, 0.5) 100%) !important; opacity: 0.9 !important;} [data-theme="dark"] .media-hero {background-size: cover !important; background-position: center !important;} [data-theme="dark"] .explore-case-study {font-size: 0.85rem !important;}
.gallery-item h3, .gallery-item p, .gallery-item .gallery-caption {color: #1f2937 !important;} [data-theme="dark"] .gallery-item {background: rgba(31, 41, 55, 0.9) !important;} [data-theme="dark"] .gallery-item h3, [data-theme="dark"] .gallery-item p, [data-theme="dark"] .gallery-item .gallery-caption {color: #e5e7eb !important;}
