/* Light Theme for BoDuo Website - Enhanced for Clarity and Professionalism */

:root {
    /* Light Theme Specific Colors */
    --lt-bg-primary: var(--white); /* Main background */
    --lt-bg-secondary: var(--light-bg); /* Slightly off-white for sections */
    --lt-bg-accent: rgba(var(--secondary-color-rgb), 0.05); /* Subtle accent background */

    --lt-text-primary: var(--dark-text);
    --lt-text-secondary: var(--medium-text);
    --lt-text-muted: #5a6c7d; /* WCAG AA compliant version of light-text for 4.5:1+ contrast */
    --lt-text-on-dark-bg: var(--white);

    --lt-primary-cta-bg: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    --lt-primary-cta-text: var(--white);
    --lt-primary-cta-hover-bg: linear-gradient(135deg, hsl(from var(--secondary-color) h s calc(l - 5%)) 0%, hsl(from var(--accent-color) h s calc(l - 5%)) 100%);

    --lt-secondary-cta-bg: transparent;
    --lt-secondary-cta-text: var(--secondary-color);
    --lt-secondary-cta-border: var(--secondary-color);
    --lt-secondary-cta-hover-bg: var(--secondary-color);
    --lt-secondary-cta-hover-text: var(--white);

    --lt-card-bg: var(--white);
    --lt-card-border: var(--border-color-light);
    --lt-card-shadow: var(--shadow-md);
    --lt-card-hover-border: var(--secondary-color);
    --lt-card-hover-shadow: var(--shadow-lg);

    --lt-header-bg: rgba(255, 255, 255, 0.95);
    --lt-header-border: var(--border-color-light);

    --lt-footer-bg: var(--dark-text); /* Footer typically stays dark for contrast */
    --lt-footer-text: rgba(255, 255, 255, 0.75);
    --lt-footer-heading-text: var(--white);
    --lt-footer-link-hover: var(--secondary-color);

    --lt-input-bg: var(--white);
    --lt-input-border: var(--border-color);
    --lt-input-focus-border: var(--secondary-color);
    --lt-input-focus-shadow: rgba(var(--secondary-color-rgb), 0.15);

    --lt-lang-switcher-bg: rgba(var(--primary-color-rgb), 0.05);
    --lt-lang-switcher-border: rgba(var(--primary-color-rgb), 0.1);
    --lt-lang-option-text: var(--medium-text);
    --lt-lang-option-active-bg: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    --lt-lang-option-active-text: var(--white);
    --lt-lang-option-hover-bg: rgba(var(--primary-color-rgb), 0.1);
}

body {
    color: var(--lt-text-primary);
    background-color: var(--lt-bg-primary);
    line-height: 1.6;
}

/* === General Light Theme Adjustments === */

/* Sections */
.section-light {
    background-color: var(--lt-bg-secondary);
}
/* .section-dark styles are mostly fine from styles.css but ensure text contrast */
.section-dark p, .section-dark li {
    color: var(--lt-text-on-dark-bg) !important; /* Ensure white text on dark backgrounds */
    opacity: 0.85;
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
    color: var(--lt-text-on-dark-bg) !important;
}

/* Headings and Text */
h1, h2, h3, h4, h5, h6 {
    color: var(--lt-text-primary);
}
p {
    color: var(--lt-text-secondary);
}

/* Links */
a {
    color: var(--secondary-color); /* Already set in styles.css, ensure it is desired for light theme */
}
a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn-primary {
    background: var(--lt-primary-cta-bg);
    color: var(--lt-primary-cta-text);
    border: 2px solid transparent;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border-radius: 8px;
}
.btn-primary:hover {
    background: var(--lt-primary-cta-hover-bg);
    color: var(--lt-primary-cta-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--lt-secondary-cta-bg);
    color: var(--lt-secondary-cta-text);
    border: 2px solid var(--lt-secondary-cta-border);
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border-radius: 8px;
}
.btn-secondary:hover {
    background: var(--lt-secondary-cta-hover-bg);
    color: var(--lt-secondary-cta-hover-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

/* Header */
.site-header {
    background: var(--lt-header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lt-header-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98); /* Slightly less transparent on scroll */
}
.nav-menu a {
    color: var(--lt-text-secondary); /* Subtler nav link color */
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

/* Language Switcher */
.language-switcher {
    background: var(--lt-lang-switcher-bg);
    border: 1px solid var(--lt-lang-switcher-border);
    border-radius: 25px;
    padding: 4px;
    display: flex;
    gap: 2px;
}
.lang-option {
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    border: none;
    color: var(--lt-lang-option-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}
.lang-option:hover:not(.active) {
    background: var(--lt-lang-option-hover-bg);
    color: var(--dark-text); /* Keep dark text for hover on non-active */
}
.lang-option.active {
    background: var(--lt-lang-option-active-bg);
    color: var(--lt-lang-option-active-text);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* Cards */
.service-card, .feature-card, .case-study-card, .blog-card {
    background: var(--lt-card-bg);
    border: 1px solid var(--lt-card-border);
    border-radius: 12px;
    box-shadow: var(--lt-card-shadow);
    transition: all 0.3s ease;
    padding: 2rem;
}
.service-card:hover, .feature-card:hover, .case-study-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--lt-card-hover-shadow);
    border-color: var(--lt-card-hover-border);
}
.service-card h3, .feature-card h3, .case-study-card h3, .blog-card h3 {
    color: var(--lt-text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}
.service-card p, .feature-card p, .case-study-card p, .blog-card p {
    color: var(--lt-text-secondary);
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: var(--lt-footer-bg);
    color: var(--lt-footer-text);
    padding: 3rem 0 1rem;
    border-top: 1px solid #dee2e6;
}
.site-footer h4 {
    color: var(--lt-footer-heading-text);
    font-weight: 700;
    margin-bottom: 1rem;
}
.site-footer a {
    color: var(--lt-footer-text);
    transition: color 0.3s ease;
}
.site-footer a:hover {
    color: var(--lt-footer-link-hover);
}
.footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.15); /* Slightly more visible border */
    color: rgba(255, 255, 255, 0.65);
}
.social-links a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}
.social-links a:hover {
    background-color: var(--secondary-color);
}

/* Forms */
.form-group label {
    color: var(--lt-text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    background-color: var(--lt-input-bg);
    border-color: var(--lt-input-border);
    color: var(--lt-text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--lt-input-focus-border);
    box-shadow: 0 0 0 3px var(--lt-input-focus-shadow);
}

/* Page Header (if different from Hero) */
.page-header {
    background: var(--lt-bg-secondary);
    color: var(--lt-text-primary);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-bottom: 1px solid var(--lt-card-border);
}
.page-header h1 {
    color: var(--lt-text-primary);
    margin-bottom: 1rem;
}
.page-header p {
    color: var(--lt-text-secondary);
    font-size: 1.1rem;
}

/* === Contrast and Specific Component Fixes from mobile-language-switcher-fix.css === */

/* Ensuring dark text on light backgrounds for various elements */
.trust-item h3, .trust-item p,
.contact-info-card h3, /* Assuming this class exists or is mapped */
.info-item-content h4, .info-item-content p,
.testimonial-text, .testimonial-author, .testimonial-company,
.faq-question h3, .faq-answer p,
.service-card h3, .service-card p, /* Already covered by .card */
.industry-card h3, .industry-card p, /* Assuming .card or similar structure */
.process-step h3, .process-step p,
.blog-card h3, .blog-card p, /* Already covered by .card */
.case-study-card h3, .case-study-card p, /* Already covered by .card */
.team-member h3, .team-member p,
.feature-card h3, .feature-card p, /* Already covered by .card */
.checkbox-label span {
    color: var(--lt-text-primary) !important;
}

/* Ensure links in these contexts are the primary interactive color */
.info-item-content a,
.blog-card a, /* Should use standard link color, or btn style */
.case-study-card a { /* Should use standard link color, or btn style */
    color: var(--secondary-color) !important;
}
.info-item-content a:hover,
.blog-card a:hover,
.case-study-card a:hover {
    color: var(--accent-color) !important;
}

/* Section Header specific overrides if not covered by general h2, p in light theme */
.section-header h2 {
    color: var(--lt-text-primary) !important;
}
.section-header p {
    color: var(--lt-text-secondary) !important;
}

/* Fix for section headers in dark sections - more specific selector to override above */
.section-dark .section-header h2 {
    color: var(--lt-text-on-dark-bg) !important; /* White text on dark backgrounds */
}
.section-dark .section-header p {
    color: var(--lt-text-on-dark-bg) !important; /* White text on dark backgrounds */
    opacity: 0.85;
}

/* Text contrast fixes for sections with light backgrounds */
/* Hero section has light background, so use dark text for proper contrast */
.hero-content h1, .hero-content p {
    color: var(--lt-text-primary) !important; /* Dark text on light hero background for proper contrast */
}
/* CTA section also has light background, so use dark text for proper contrast */
.cta-section h2, .cta-section p {
    color: var(--lt-text-primary) !important; /* Dark text on light CTA background for proper contrast */
}

/* REFINED FIX: Ensure cards inside dark sections have proper text contrast while preserving design intent */
.section-dark .scroll-card,
.section-dark .rag-process-card,
.section-dark .process-card,
.section-dark .service-card,
.section-dark .feature-card,
.section-dark .case-study-card,
.section-dark .blog-card {
    background-color: var(--white) !important;
}

/* Preserve design hierarchy while ensuring accessibility */
.section-dark .rag-process-card h3,
.section-dark .process-card h3,
.section-dark .scroll-card h3 {
    color: var(--primary-color) !important; /* Keep primary color for headings */
}

.section-dark .rag-process-card p,
.section-dark .process-card p,
.section-dark .scroll-card p {
    color: var(--lt-text-muted) !important; /* Use muted color for paragraphs */
}

/* Ensure paragraphs in cards use muted color for better hierarchy */
.section-dark .rag-process-card p,
.section-dark .process-card p {
    color: #718096 !important; /* Direct muted color for better text hierarchy */
}

/* Preserve special elements with their intended colors */
.section-dark .rag-process-week,
.section-dark .rag-process-card .rag-process-week {
    color: var(--secondary-color) !important; /* Keep secondary color for week indicators */
}

/* Ensure other card types maintain proper contrast */
.section-dark .service-card h3,
.section-dark .feature-card h3,
.section-dark .case-study-card h3,
.section-dark .blog-card h3 {
    color: var(--primary-color) !important;
}

.section-dark .service-card p,
.section-dark .feature-card p,
.section-dark .case-study-card p,
.section-dark .blog-card p {
    color: var(--lt-text-muted) !important;
}

/* Ensure consistent spacing and styling for service detail pages */
.section-dark .scroll-card,
.section-dark .rag-process-card,
.section-dark .process-card {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-cubic);
    border: 1px solid var(--border-color-light);
}

.section-dark .scroll-card:hover,
.section-dark .rag-process-card:hover,
.section-dark .process-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

/* Ensure consistent button styling in cards */
.section-dark .scroll-card .btn,
.section-dark .rag-process-card .btn,
.section-dark .process-card .btn {
    margin-top: auto;
}

/* Chatbot theming for light mode */
.chatbot-toggle {
    background: var(--lt-primary-cta-bg);
    color: var(--lt-primary-cta-text);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}
.chatbot-toggle:hover {
    background: var(--lt-primary-cta-hover-bg);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}
.chatbot-interface {
    background: var(--lt-card-bg);
    border: 1px solid var(--lt-card-border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}
.chatbot-header {
    background: var(--lt-primary-cta-bg);
    color: var(--lt-primary-cta-text);
    padding: 1rem;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid transparent; /* Match gradient */
}
.chatbot-header .chatbot-title {
    color: var(--lt-primary-cta-text);
}
.chatbot-close {
    color: var(--lt-primary-cta-text);
}
.bot-message {
    background: var(--lt-bg-secondary);
    color: var(--lt-text-primary);
    border: 1px solid var(--lt-card-border);
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
}
.user-message {
    background: var(--lt-primary-cta-bg);
    color: var(--lt-primary-cta-text);
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    margin-left: auto;
    max-width: 80%;
}
.chatbot-message-input {
    background-color: var(--white);
    border-color: var(--lt-input-border);
    color: var(--lt-text-primary);
}
.chatbot-message-input:focus {
    border-color: var(--lt-input-focus-border);
    box-shadow: 0 0 0 3px var(--lt-input-focus-shadow);
}
.chatbot-send-button {
    background-color: var(--secondary-color);
    color: var(--white);
}
.chatbot-send-button:hover {
    background-color: var(--accent-color);
}
.quick-reply {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
.quick-reply:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* High contrast mode considerations (accessibility) */
@media (prefers-contrast: high) {
    body {
        background-color: var(--white);
        color: #000000;
    }

    .btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    .btn-secondary {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }

    .card, .site-header, .chatbot-interface, .form-group input, .form-group textarea, .form-group select {
        border: 2px solid #000000 !important; /* Ensure borders are very visible */
        background-color: var(--white) !important;
    }
    h1,h2,h3,h4,h5,h6,p,a,label,span {
        color: #000000 !important;
    }
    .section-dark {
        background-color: #000000 !important;
    }
    .section-dark * {
        color: #ffffff !important;
    }
    .site-footer {
        background-color: #000000 !important;
    }
     .site-footer * {
        color: #ffffff !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .language-switcher {
        margin-top: 1rem;
    }
}
