/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   High Contrast & Better Readability
   WCAG 2.1 AA Compliant
   ======================================== */

/* ========================================
   TEXT CONTRAST IMPROVEMENTS
   ======================================== */

/* Primary text - Ensure 7:1 contrast ratio */
body {
    color: #232F25;
}

h1, h2, h3, h4, h5, h6 {
    color: #232F25;
}

/* Secondary text - Minimum 4.5:1 contrast */
p,
.section-subtitle,
.hero-subtitle,
.lead-text,
.comparison-lead,
.hero-lead {
    color: #273E47 !important;
}

.text-secondary,
.stat-label,
.tier-subtitle,
.testimonial-text,
.faq-answer p,
.form-group label {
    color: #273E47 !important;
}

/* Tertiary text - Still readable */
.text-tertiary,
.tier-subtitle-full,
.cta-note,
.form-privacy {
    color: #5a6a6f !important;
}

/* ========================================
   LINK CONTRAST
   ======================================== */

/* Regular links */
a {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

a:focus {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* Navigation links */
.nav-links a {
    color: #273E47 !important;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary) !important;
}

/* Footer links */
.footer a {
    color: #273E47 !important;
}

.footer a:hover {
    color: var(--primary) !important;
}

/* Card links */
.card-link {
    color: white !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.card-link:hover {
    text-decoration-color: white;
}

/* ========================================
   BUTTON CONTRAST
   ======================================== */

/* Primary buttons - Strong contrast */
.btn-primary {
    background: var(--primary);
    color: white !important;
    border: 2px solid var(--primary);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white !important;
}

/* Secondary buttons - Clear borders */
.btn-secondary {
    background: transparent;
    color: #232F25 !important;
    border: 3px solid var(--primary);
    font-weight: 700;
}

.btn-secondary:hover {
    background: var(--primary);
    color: #FAF9F8 !important;
}

/* Nav CTA button - FORCE WHITE TEXT - MAXIMUM SPECIFICITY */
.navbar .nav-links .btn-cta-premium,
.nav-links a.btn-cta-premium,
a.btn-nav.btn-cta-premium,
.btn-cta-premium,
.btn-nav.btn-cta-premium,
.nav-links .btn-cta-premium {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: var(--primary) !important;
}

.navbar .nav-links .btn-cta-premium:hover,
.nav-links a.btn-cta-premium:hover,
a.btn-nav.btn-cta-premium:hover,
.btn-cta-premium:hover,
.btn-nav.btn-cta-premium:hover,
.nav-links .btn-cta-premium:hover {
    background: var(--primary-dark) !important;
    color: #ffffff !important;
    border-color: var(--primary-dark) !important;
}

.navbar .nav-links .btn-cta-premium i,
.nav-links a.btn-cta-premium i,
a.btn-nav.btn-cta-premium i,
.btn-cta-premium i,
.btn-nav.btn-cta-premium i,
.nav-links .btn-cta-premium i {
    color: #ffffff !important;
}

/* Also apply to visited state */
.navbar .nav-links .btn-cta-premium:visited,
.nav-links a.btn-cta-premium:visited,
a.btn-nav.btn-cta-premium:visited {
    color: #ffffff !important;
}

/* Decision buttons */
.decision-btn {
    color: #232F25 !important;
    font-weight: 600;
    border: 2px solid var(--secondary);
}

.decision-btn:hover,
.decision-btn.active {
    color: #FAF9F8 !important;
    font-weight: 700;
}

/* ========================================
   FORM ELEMENT CONTRAST
   ======================================== */

/* Form labels - Very dark */
.form-group label,
.form-group-full label {
    color: #1a1a1a !important;
    font-weight: 700;
}

/* Input fields - Dark text, clear borders */
input,
select,
textarea,
.form-group input,
.form-group select,
.form-group textarea,
.form-group-full input,
.form-group-full select,
.form-group-full textarea {
    color: #1a1a1a !important;
    border: 2px solid #999999;
    background: white;
}

input::placeholder,
textarea::placeholder {
    color: #666666 !important;
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    outline: 3px solid rgba(209, 115, 85, 0.3);
    outline-offset: 2px;
}

/* ========================================
   CARD & COMPONENT CONTRAST
   ======================================== */

/* Credibility cards */
.credibility-card {
    border: 2px solid #cccccc;
}

.credibility-card p,
.credibility-card h3 {
    color: #1a1a1a !important;
}

.credibility-card.featured {
    background: var(--primary);
}

.credibility-card.featured *:not(.card-icon) {
    color: white !important;
}

/* Problem cards */
.problem-card {
    border: 2px solid #cccccc;
}

.problem-card p {
    color: #2d2d2d !important;
}

/* Testimonial cards */
.testimonial-card {
    border: 2px solid #cccccc;
}

.testimonial-text {
    color: #2d2d2d !important;
}

.testimonial-author strong {
    color: #1a1a1a !important;
}

.testimonial-author span {
    color: #4a4a4a !important;
}

/* Tier cards */
.tier-card,
.tier-card-full,
.quick-tier {
    border: 2px solid #cccccc;
}

.tier-best-for,
.tier-best-for-full {
    background: #f5f5f5;
    color: #2d2d2d !important;
}

.tier-features li,
.tier-features-full li {
    color: #2d2d2d !important;
}

.tier-features li strong,
.tier-features-full li strong {
    color: #1a1a1a !important;
}

/* ========================================
   BADGE & STATUS CONTRAST
   ======================================== */

/* Success badges */
.hero-badge,
.featured-badge,
.popular-badge,
.tier-badge-full,
.phase-badge {
    font-weight: 800;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

/* Urgency indicators */
.tier-capacity.urgent,
.quick-tier-spots.urgent,
.tier-capacity-full.urgent {
    background: #fff3cd;
    color: #856404 !important;
    border: 2px solid #ffc107;
    font-weight: 700;
}

.tier-capacity.critical,
.quick-tier-spots.critical,
.tier-capacity-full.critical {
    background: #f8d7da;
    color: #721c24 !important;
    border: 2px solid #dc3545;
    font-weight: 700;
}

/* ========================================
   STATS & NUMBERS CONTRAST
   ======================================== */

.stat-number {
    color: var(--primary) !important;
    font-weight: 900;
}

.stat-label {
    color: #333333 !important;
    font-weight: 700;
}

.comparison-value {
    color: var(--primary) !important;
    font-weight: 900;
}

/* ========================================
   FAQ CONTRAST
   ======================================== */

.faq-question h4 {
    color: #1a1a1a !important;
    font-weight: 700;
}

.faq-answer p {
    color: #2d2d2d !important;
    line-height: 1.8;
}

/* ========================================
   TABLE CONTRAST
   ======================================== */

.comparison-table th {
    color: #1a1a1a !important;
    font-weight: 800;
}

.comparison-table td {
    color: #2d2d2d !important;
}

.comparison-table-full th {
    color: #1a1a1a !important;
    font-weight: 800;
}

.comparison-table-full td {
    color: #2d2d2d !important;
}

/* ========================================
   ICON CONTRAST
   ======================================== */

/* Icons should stand out */
.card-icon i,
.problem-icon i,
.solution-icon i,
.visual-icon,
.comparison-icon {
    color: var(--primary) !important;
}

.fas, .far, .fab {
    /* Ensure icons are readable */
}

/* ========================================
   FOCUS INDICATORS
   ======================================== */

/* All interactive elements need visible focus */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary) !important;
    outline-offset: 3px;
}

/* ========================================
   GRADIENT OVERLAY TEXT
   ======================================== */

/* Ensure text on gradients is readable */
.solution-spotlight h3,
.solution-spotlight p,
.solution-cta-text {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.result-banner p,
.final-result-banner p {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   MOBILE ACCESSIBILITY
   ======================================== */

@media (max-width: 768px) {
    /* Larger tap targets */
    .btn {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .nav-links a {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Larger text on mobile */
    body {
        font-size: 17px;
    }
    
    .btn {
        font-size: 1.05rem;
    }
}

/* ========================================
   HOVER STATE IMPROVEMENTS
   ======================================== */

/* Make hover states more obvious */
.credibility-card:hover,
.problem-card:hover,
.testimonial-card:hover,
.tier-card:hover,
.tier-card-full:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ========================================
   ERROR STATES
   ======================================== */

/* Form validation */
input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545 !important;
}

input:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #28a745 !important;
}

/* ========================================
   SKIP TO CONTENT LINK
   ======================================== */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        color: #000;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .navbar,
    .top-banner,
    .mobile-menu,
    .scroll-progress-bar,
    .btn,
    footer {
        display: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE SUPPORT
   ======================================== */

@media (prefers-contrast: high) {
    body {
        color: #000;
    }
    
    .btn-primary {
        border: 3px solid #000;
    }
    
    .btn-secondary {
        border: 3px solid #000;
        color: #000 !important;
    }
    
    input,
    select,
    textarea {
        border: 2px solid #000;
    }
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
