/* DARK MODE TEXT READABILITY FIXES 🌙 */
/* Only fixes specific unreadable text issues without breaking anything */

/* Bootstrap text utilities that need fixing */
body.dark-mode .text-white {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .text-white-50 {
  color: var(--dm-text-muted) !important;
}

body.dark-mode .lead {
  color: var(--dm-text-secondary) !important;
}

body.dark-mode .display-1,
body.dark-mode .display-2,
body.dark-mode .display-3,
body.dark-mode .display-4,
body.dark-mode .display-5,
body.dark-mode .display-6 {
  color: var(--dm-text-primary) !important;
}

/* Carousel text fixes */
body.dark-mode .carousel-item h3 {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .carousel-item p {
  color: var(--dm-text-secondary) !important;
}

/* Any sections that might have white text on white background */
body.dark-mode section {
  color: var(--dm-text-primary);
}

body.dark-mode .container,
body.dark-mode .container-fluid {
  color: inherit;
}

/* Fix any Bootstrap utility classes causing white text */
body.dark-mode .text-dark {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .text-muted {
  color: var(--dm-text-muted) !important;
}

/* Ensure headings are always readable */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--dm-text-primary) !important;
}

/* Ensure paragraph text is readable */
body.dark-mode p {
  color: var(--dm-text-secondary) !important;
}

/* Fix any card text that might be unreadable */
body.dark-mode .card-title {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .card-text {
  color: var(--dm-text-secondary) !important;
}

/* Specific section fixes */

/* Footer logo - Higher specificity */
body.dark-mode .footer-company .footer-logo {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .footer-company .footer-logo span {
  color: #ffd700 !important; /* Keep the golden "Majestic" */
}

/* Contact main title - Higher specificity */
body.dark-mode .display-4.fw-bold.contact-main-title {
  color: var(--dm-text-primary) !important;
}

body.dark-mode h2.display-4.fw-bold.contact-main-title {
  color: var(--dm-text-primary) !important;
}

/* Services main title - Higher specificity */
body.dark-mode .display-4.fw-bold.services-main-title {
  color: var(--dm-text-primary) !important;
}

body.dark-mode h2.display-4.fw-bold.services-main-title {
  color: var(--dm-text-primary) !important;
}

/* Team member cards */
body.dark-mode .team-member {
  background-color: var(--surface-light) !important;
  border: 1px solid var(--dm-border) !important;
  color: var(--dm-text-primary) !important;
}

body.dark-mode .team-member h5 {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .team-member p {
  color: var(--dm-text-secondary) !important;
}

body.dark-mode .team-member .card-title {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .team-member .card-text {
  color: var(--dm-text-secondary) !important;
}

/* Achievement cards - High specificity overrides */
body.dark-mode .achievement-grid .achievement-card {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid var(--dm-border) !important;
  color: var(--dm-text-primary) !important;
}

body.dark-mode .achievement-grid .achievement-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 48px var(--dm-shadow) !important;
}

body.dark-mode .achievement-grid .achievement-card .achievement-number {
  color: var(--accent-light) !important;
}

body.dark-mode .achievement-grid .achievement-card .achievement-label {
  color: var(--dm-text-secondary) !important;
}

body.dark-mode .achievement-grid .achievement-card .achievement-icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%) !important;
  color: white !important;
}

body.dark-mode .achievement-card h5 {
  color: var(--dm-text-primary) !important;
}

body.dark-mode .achievement-card p {
  color: var(--dm-text-secondary) !important;
}

/* Card body under "Our Mission" text */
body.dark-mode .card-body.p-4 {
  background-color: var(--surface-light) !important;
  color: var(--dm-text-primary) !important;
}

body.dark-mode .card-body.p-4 p {
  color: var(--dm-text-secondary) !important;
}

body.dark-mode .card-body.p-4 h5 {
  color: var(--dm-text-primary) !important;
}