/* Text Visibility Fix for Light and Dark Mode */

/* Force visible text in light mode */
h1, h2, h3, h4, h5, h6 {
  color: #1e293b !important;
}

p {
  color: #475569 !important;
}

.card h4, .solution-card h4, .feature-card h4, .service-highlight h4 {
  color: #1e293b !important;
}

.card p, .solution-card p, .feature-card p, .service-highlight p {
  color: #475569 !important;
}

/* Footer headings fix */
.footer-widget h4 {
  color: #ffffff !important;
}

/* Card content visibility */
.card, .solution-card, .feature-card, .service-highlight, .feature-box, .blog-post {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

.card h4, .solution-card h4, .feature-card h4, .service-highlight h4, .feature-box h4, .blog-post h5 {
  color: var(--text-primary) !important;
}

.card p, .solution-card p, .feature-card p, .service-highlight p, .feature-box p, .blog-post p {
  color: var(--text-secondary) !important;
}

/* Dark Mode Variables and Overrides */
[data-theme="dark"] {
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e0;
  --text-muted: #94a3b8;
  --bg-primary: #1e293b;
  --bg-secondary: #334155;
  --bg-tertiary: #475569;
}

[data-theme="dark"] body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] p {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] .card, [data-theme="dark"] .solution-card, [data-theme="dark"] .feature-card, [data-theme="dark"] .service-highlight, [data-theme="dark"] .feature-box, [data-theme="dark"] .blog-post {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .card h4, [data-theme="dark"] .solution-card h4, [data-theme="dark"] .feature-card h4, [data-theme="dark"] .service-highlight h4, [data-theme="dark"] .feature-box h4, [data-theme="dark"] .blog-post h5 {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .card p, [data-theme="dark"] .solution-card p, [data-theme="dark"] .feature-card p, [data-theme="dark"] .service-highlight p, [data-theme="dark"] .feature-box p, [data-theme="dark"] .blog-post p {
  color: var(--text-secondary) !important;
}

/* Section backgrounds */
[data-theme="dark"] .section {
  background: var(--bg-primary) !important;
}

[data-theme="dark"] #Header, [data-theme="dark"] #Top_bar {
  background: var(--bg-secondary) !important;
}

[data-theme="dark"] #Action_bar {
  background: var(--bg-primary) !important;
}

/* Override inline styles */
[data-theme="dark"] [style*="color: #2d3748"], [data-theme="dark"] [style*="color: #4a5568"] {
  color: var(--text-secondary) !important;
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: var(--bg-primary);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: translateY(-50%) scale(1.1);
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--text-primary);
}