/* CRITICAL READABILITY FIXES - GLOBAL PLATFORM CONTRAST */

/* DEFAULT: Black text for light backgrounds */
body, .container, .row, .col, .card-body, .content {
    color: #212529 !important;
}

/* WHITE TEXT for ALL dark backgrounds - PLATFORM WIDE */
.bg-primary, .bg-primary *, 
.bg-dark, .bg-dark *,
.bg-secondary, .bg-secondary *,
.bg-success, .bg-success *,
.bg-info, .bg-info *,
.bg-danger, .bg-danger *,
.bg-gray, .bg-gray *,
.bg-grey, .bg-grey *,
.card-header, .card-header *,
.module-header, .module-header *,
.navbar-dark, .navbar-dark *,
.hero-section, .hero-section *,
.jumbotron, .jumbotron *,
.cultural-education, .cultural-education *,
.video-placeholder, .video-placeholder *,
.pricing-section, .pricing-section *,
.intensives-section, .intensives-section *,
.footer, .footer *,
.alert-primary, .alert-primary *,
.alert-secondary, .alert-secondary *,
.alert-dark, .alert-dark *,
.alert-info, .alert-info *,
.alert-success, .alert-success *,
.alert-danger, .alert-danger * {
    color: white !important;
}

/* FORCE white text on ANY dark/grey background */
[style*="background: #"], [style*="background-color: #"] {
    color: white !important;
}

[style*="background: #"] *, [style*="background-color: #"] * {
    color: white !important;
}

/* All dark backgrounds get white text */
.bg-dark, .bg-dark *,
.bg-secondary, .bg-secondary *,
.bg-primary, .bg-primary *,
.bg-success, .bg-success *,
.bg-info, .bg-info *,
.bg-danger, .bg-danger * {
    color: white !important;
}

/* Any element with grey/gray in the class */
[class*="grey"], [class*="gray"], 
[class*="grey"] *, [class*="gray"] * {
    color: white !important;
}

/* FORCE TEXT COLOR BASED ON BACKGROUND - UNIVERSAL RULES */

/* Any element with dark background gets white text */
[class*="bg-primary"], [class*="bg-primary"] *,
[class*="bg-dark"], [class*="bg-dark"] *,
[class*="bg-secondary"], [class*="bg-secondary"] *,
[class*="bg-success"], [class*="bg-success"] *,
[class*="bg-info"], [class*="bg-info"] *,
[class*="bg-danger"], [class*="bg-danger"] * {
    color: white !important;
}

/* Any element with light background gets black text */
[class*="bg-light"], [class*="bg-light"] *,
[class*="bg-white"], [class*="bg-white"] *,
[class*="bg-warning"], [class*="bg-warning"] * {
    color: #212529 !important;
}

/* CRITICAL: Fix cultural education cards - make text WHITE on dark backgrounds */
.cultural-education .card.bg-warning.bg-opacity-10 {
    background: #343a40 !important; /* Force dark background */
}

.cultural-education .card-body,
.cultural-education .card-body h6,
.cultural-education .card-body small,
.cultural-education .card-body .fw-bold,
.cultural-education .card-body .text-muted,
.cultural-education h6,
.cultural-education small {
    color: white !important;
}

.cultural-education .btn-outline-warning {
    color: white !important;
    border-color: #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.2) !important;
    font-weight: bold !important;
}

.cultural-education .btn-outline-warning:hover {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* Override any Bootstrap text color classes in cultural education */
.cultural-education .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* POPUP AND MODAL TEXT VISIBILITY FIXES */
.modal, .modal *,
.modal-content, .modal-content *,
.modal-header, .modal-header *,
.modal-body, .modal-body *,
.modal-footer, .modal-footer * {
    color: #212529 !important;
    background-color: white !important;
}

.modal-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.modal-title {
    color: #212529 !important;
    font-weight: bold !important;
}

/* Alert popups */
.alert, .alert * {
    color: #212529 !important;
}

.alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.alert-info * {
    color: #0c5460 !important;
}

/* Flash messages */
.flash-message, .flash-message * {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border: 2px solid #dee2e6 !important;
    font-weight: 500 !important;
}

/* Tooltip text */
.tooltip, .tooltip * {
    color: white !important;
    background-color: #212529 !important;
}

/* PRICING PAGE CRITICAL VISIBILITY FIXES */

/* SUPER SPECIFIC TARGETING - Target exact HTML structure */
.pricing-section .card-header.bg-info.text-white.text-center.py-4 .h2.mt-3.mb-1,
.pricing-section .card-header.bg-success.text-white.text-center.py-4 .h2.mt-3.mb-1,
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 .h2.mt-3.mb-1,
.pricing-section .card-header.bg-info.text-white.text-center.py-4 p.small.mb-0,
.pricing-section .card-header.bg-success.text-white.text-center.py-4 p.small.mb-0,
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 p.small.mb-0,
.pricing-section .card-header.bg-info.text-white.text-center.py-4 small,
.pricing-section .card-header.bg-success.text-white.text-center.py-4 small,
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 small {
    color: white !important;
    text-shadow: none !important;
}

/* Yellow card gets dark text */
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 .h2.mt-3.mb-1,
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 p.small.mb-0,
.pricing-section .card-header.bg-warning.text-dark.text-center.py-4 small {
    color: #212529 !important;
}

/* ULTIMATE FIX - Override Bootstrap and any other styling */
.pricing-section .card-header.bg-info .h2,
.pricing-section .card-header.bg-success .h2, 
.pricing-section .card-header.bg-warning .h2,
.pricing-section .card-header.bg-info p,
.pricing-section .card-header.bg-success p,
.pricing-section .card-header.bg-warning p,
.pricing-section .card-header.bg-info small,
.pricing-section .card-header.bg-success small,
.pricing-section .card-header.bg-warning small {
    color: white !important;
    text-shadow: none !important;
}

/* Special case for yellow/warning background */
.pricing-section .card-header.bg-warning .h2,
.pricing-section .card-header.bg-warning p,
.pricing-section .card-header.bg-warning small {
    color: #212529 !important;
}

/* ULTIMATE OVERRIDE - Specificity War Winner */
section.pricing-section .card-header.bg-info .h2.mt-3.mb-1,
section.pricing-section .card-header.bg-success .h2.mt-3.mb-1,
section.pricing-section .card-header.bg-info p.small.mb-0,
section.pricing-section .card-header.bg-success p.small.mb-0,
section.pricing-section .card-header.bg-info small,
section.pricing-section .card-header.bg-success small {
    color: white !important;
}

section.pricing-section .card-header.bg-warning .h2.mt-3.mb-1,
section.pricing-section .card-header.bg-warning p.small.mb-0,
section.pricing-section .card-header.bg-warning small {
    color: white !important;
}

/* FINAL NUCLEAR OPTION - Override EVERYTHING */
.pricing-section * {
    color: white !important;
}

/* Fix value statement section visibility */
.bg-light .text-muted {
    color: #d0d0d0 !important;
}

.bg-light .lead {
    color: #e0e0e0 !important;
}

.bg-light h2, .bg-light h3, .bg-light h4, .bg-light h5, .bg-light h6 {
    color: #f5f5f5 !important;
}

.pricing-section .h2 {
    color: white !important;
}

.pricing-section p {
    color: white !important;
}

.pricing-section small {
    color: white !important;
}

.pricing-section div {
    color: white !important;
}

/* Override ANY Bootstrap text utility classes */
.pricing-section .text-dark,
.pricing-section .text-muted,
.pricing-section .text-black {
    color: white !important;
}

/* Exception ONLY for yellow background */
.pricing-section .bg-warning,
.pricing-section .bg-warning * {
    color: #212529 !important;
}

/* NUCLEAR OPTION - Force EVERYTHING to be white */
.pricing-section,
.pricing-section *,
.pricing-section .card,
.pricing-section .card *,
.pricing-section .card-header,
.pricing-section .card-header *,
.pricing-section .card-body,
.pricing-section .card-body *,
.pricing-section h1,
.pricing-section h2,
.pricing-section h3,
.pricing-section h4,
.pricing-section h5,
.pricing-section h6,
.pricing-section p,
.pricing-section div,
.pricing-section span,
.pricing-section small,
.pricing-section li,
.pricing-section a {
    color: white !important;
}

/* Force all pricing cards to have dark backgrounds and white text */
.pricing-section .card {
    background-color: #343a40 !important;
    color: white !important;
}

/* Card headers - keep original colors but ensure white text */
.pricing-section .card-header {
    color: white !important;
}

.pricing-section .card-header * {
    color: white !important;
}

/* Exception: yellow headers get dark text */
.pricing-section .card-header.bg-warning,
.pricing-section .card-header.bg-warning * {
    color: #212529 !important;
}

/* Force white text in card bodies regardless of background */
.pricing-section .card-body,
.pricing-section .card-body *,
.pricing-section .card-body h3,
.pricing-section .card-body h4,
.pricing-section .card-body h5,
.pricing-section .card-body p,
.pricing-section .card-body li,
.pricing-section .card-body small,
.pricing-section .card-body div {
    color: white !important;
    background-color: transparent !important;
}

/* Pricing amounts - make them pop */
.pricing-section .h3 {
    color: #ffc107 !important;
    font-weight: bold !important;
}

/* Glowing yellow titles for pricing tiers */
.pricing-section .card-header h4 {
    color: #ffd700 !important;
    text-shadow: 
        0 0 5px #ffd700,
        0 0 10px #ffd700,
        0 0 15px #ffd700,
        0 0 20px #ffd700 !important;
    font-weight: bold !important;
}

/* Consistent white pricing for all tiers */
.pricing-section .card-header .h2,
.pricing-section .card-header h2 {
    color: white !important;
    text-shadow: none !important;
}

/* Force ALL card header text to be white and readable */
.pricing-section .card-header,
.pricing-section .card-header *,
.pricing-section .card-header p,
.pricing-section .card-header small,
.pricing-section .card-header div {
    color: white !important;
    text-shadow: none !important;
}

/* Exception: yellow headers get dark text */
.pricing-section .card-header.bg-warning,
.pricing-section .card-header.bg-warning *,
.pricing-section .card-header.bg-warning p,
.pricing-section .card-header.bg-warning small,
.pricing-section .card-header.bg-warning div {
    color: #212529 !important;
}

/* Feature list items */
.pricing-section ul li {
    color: white !important;
}

/* Override any Bootstrap text utility classes */
.pricing-section .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.pricing-section .text-info {
    color: #17a2b8 !important;
}

.pricing-section .text-success {
    color: #28a745 !important;
}

.pricing-section .text-warning {
    color: #ffc107 !important;
}

.pricing-section .text-primary {
    color: #007bff !important;
}

/* Platform-wide sections */
.pricing-section, .pricing-section *,
.intensives-section, .intensives-section *,
.cultural-education, .cultural-education *,
.features-section, .features-section * {
    /* Text color will be determined by their background class */
}

/* BLACK TEXT for ALL light backgrounds - PLATFORM WIDE */
.bg-light, .bg-light *,
.bg-white, .bg-white *,
.bg-warning, .bg-warning *,
.card-body, .card-body *,
.education-content, .education-content *,
.lesson-content, .lesson-content *,
.alert-light, .alert-light *,
.alert-warning, .alert-warning *,
.alert-white, .alert-white *,
.pricing-card, .pricing-card *,
.feature-card, .feature-card *,
.content-section, .content-section * {
    color: #212529 !important;
}

/* Special styling for "Why Choose OriginStep" */
.why-choose-title {
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.8) !important;
    font-weight: bold !important;
}

/* Better font choices for readability */
.education-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #212529 !important;
}

.education-content * {
    color: #212529 !important;
}

/* Enhanced lesson cards */
.lesson-card {
    transition: all 0.3s ease;
    border-radius: 12px !important;
}

.lesson-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Improved video example presentation - READABLE */
.video-example-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #007bff;
}

.video-placeholder {
    background: #f8f9fa !important;
    color: #212529 !important;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
    border: 2px solid #dee2e6;
}

.video-placeholder h6, .video-placeholder small {
    color: #212529 !important;
}

/* Enhanced quiz styling - READABLE */
.quiz-question {
    background: #f8f9fa !important;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 5px solid #28a745;
}

.quiz-question p, .quiz-question .form-check-label {
    color: #212529 !important;
    font-size: 1rem !important;
}

/* Improved form controls */
.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.form-check-label {
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
}

/* Better button styling */
.btn-quiz {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-quiz:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced feedback styling - READABLE */
.quiz-feedback .alert {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-size: 1rem !important;
    line-height: 1.6;
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

/* All alert text readable */
.alert {
    color: #212529 !important;
}

.alert strong {
    color: #212529 !important;
}

/* Module header improvements */
.module-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 12px 12px 0 0;
}

/* Progress indicators */
.progress-indicator {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Typography improvements - READABLE */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #212529 !important;
}

p {
    color: #212529 !important;
    line-height: 1.7;
    font-size: 1rem !important;
}

/* Ensure all text elements are readable */
.card-text, .card-title, .lesson-content {
    color: #212529 !important;
}

.lesson-content p, .lesson-content div, .lesson-content span {
    color: #212529 !important;
    font-size: 1rem !important;
}

/* Enhanced card titles */
.card-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #007bff !important;
    margin-bottom: 1rem !important;
}

/* Better spacing for educational content */
.education-lesson {
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .education-lesson {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .quiz-question {
        padding: 1rem;
    }
    
    .video-example-section {
        padding: 1rem;
    }
}