/* Dark Mode Core Variable Overrides */
body.dark-mode {
    --white: #1e293b;
    --light-gray: #0f172a;
    --secondary-color: #e2e8f0;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #e2e8f0;
    --text-light: #e2e8f0;
    --box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
}

/* Force dark background for ALL sections when dark mode is active */
body.dark-mode section,
body.dark-mode div.section,
body.dark-mode footer,
body.dark-mode .top-bar,
body.dark-mode .main-header,
body.dark-mode .hero,
body.dark-mode .why-choose-us,
body.dark-mode .offers,
body.dark-mode .newsletter-section,
body.dark-mode .partners-section,
body.dark-mode .faq-section,
body.dark-mode .cities-section,
body.dark-mode .testimonials,
body.dark-mode .blog {
    background-color: var(--bg-color) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Card and Element backgrounds */
body.dark-mode .card,
body.dark-mode .tour-card,
body.dark-mode .offer-card,
body.dark-mode .blog-card,
body.dark-mode .about-content,
body.dark-mode .feature-card,
body.dark-mode .itinerary-item,
body.dark-mode .booking-card,
body.dark-mode .stat-item,
body.dark-mode .testimonial-card,
body.dark-mode .user-dropdown-menu,
body.dark-mode .nav-links,
body.dark-mode .help-notification,
body.dark-mode .timer-box,
body.dark-mode .faq-item {
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: var(--box-shadow) !important;
}

/* Text elements */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode p, body.dark-mode span, body.dark-mode a:not(.btn),
body.dark-mode li, body.dark-mode label, body.dark-mode .offer-title,
body.dark-mode .city-name, body.dark-mode .stat-label, 
body.dark-mode .feature-content h3, body.dark-mode .faq-question h4,
body.dark-mode .newsletter-header h2, body.dark-mode .newsletter-header p,
body.dark-mode .top-bar-item span, body.dark-mode .site-title {
    color: var(--text-main) !important;
}

/* Specific Gradient Backgrounds - Override with dark versions */
body.dark-mode .top-bar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

body.dark-mode .offers {
    background: linear-gradient(135deg, #0a464c 0%, #07343a 100%) !important;
}

body.dark-mode .newsletter-section {
    background: linear-gradient(135deg, #062c22 0%, #041d17 100%) !important;
}

body.dark-mode .faq-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

body.dark-mode .why-choose-us {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

/* Input styles */
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Icon colors */
body.dark-mode i {
    color: var(--text-main);
}

body.dark-mode .feature-icon i,
body.dark-mode .faq-toggle i,
body.dark-mode .stat-item i {
    color: var(--primary-color) !important;
}

/* Partner Logo - Make readable */
body.dark-mode .partner-logo {
    filter: invert(0.8) grayscale(1) !important;
    opacity: 0.7;
}

body.dark-mode .partner-logo:hover {
    filter: invert(0) grayscale(0) !important;
    opacity: 1;
}

/* Footer Fixes */
body.dark-mode footer {
    background-color: #020617 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .footer-col ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .footer-col ul li a:hover {
    color: var(--primary-color) !important;
}

body.dark-mode .copyright {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Navbar Fix */
body.dark-mode .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Hero Section Overlay Fix */
body.dark-mode .hero::before {
    background-color: rgba(0, 0, 0, 0.6) !important;
}


/* Absolute Global Dark Background and Light Text for Body when dark-mode is active */
body.dark-mode {
    background: #0f172a !important;
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

/* Specific Section Fixes for those showing in the screenshot */
body.dark-mode .section, 
body.dark-mode .why-choose-us,
body.dark-mode .offers,
body.dark-mode .newsletter-section,
body.dark-mode .faq-section,
body.dark-mode .cities-section,
body.dark-mode .testimonials,
body.dark-mode .testimonials-container,
body.dark-mode .blog,
body.dark-mode .footer-container,
body.dark-mode .main-header,
body.dark-mode .top-bar,
body.dark-mode .copyright {
    background-color: #0f172a !important;
    background-image: none !important;
}

/* Text color for headings in all sections */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .section-title h2 {
    color: #f8fafc !important;
}

/* Fix for the white/light boxes in the screenshot */
body.dark-mode .testimonial-card,
body.dark-mode .feature-card,
body.dark-mode .card,
body.dark-mode .blog-card,
body.dark-mode .offer-card {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}

/* Text inside cards */
body.dark-mode .testimonial-content p,
body.dark-mode .feature-content p,
body.dark-mode .offer-description,
body.dark-mode .blog-excerpt {
    color: #cbd5e1 !important;
}

/* Testimonial author section */
body.dark-mode .author-info h4 {
    color: #f8fafc !important;
}

/* Newsletter Fix */
body.dark-mode .newsletter-section {
    background: #064e3b !important; /* Slightly distinct green for newsletter but dark */
}

body.dark-mode .newsletter-header h2,
body.dark-mode .newsletter-header p {
    color: #fff !important;
}

/* FAQ Fix */
body.dark-mode .faq-item.active {
    background-color: #1e293b !important;
}

body.dark-mode .faq-answer-content {
    color: #cbd5e1 !important;
}


/* ==========================================
   Tours Archive Page - Dark Mode Fixes
   ========================================== */

/* صندوق الفلاتر */
body.dark-mode .tours-filters {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* عنوان الفلاتر */
body.dark-mode .filters-title {
    color: #f8fafc !important;
}

body.dark-mode .filters-title i {
    color: #f97316 !important;
}

/* زر إعادة الضبط */
body.dark-mode .reset-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .reset-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* عناصر التصفية بالبادج */
body.dark-mode .badge-filter {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .badge-filter:hover {
    background: rgba(26, 115, 232, 0.3) !important;
    border-color: rgba(26, 115, 232, 0.5) !important;
}

body.dark-mode .badge-filter.active {
    background: rgba(26, 115, 232, 0.4) !important;
    color: #fff !important;
    border-color: #1a73e8 !important;
}

/* عناوين الفلاتر */
body.dark-mode .filter-group label {
    color: #f8fafc !important;
}

/* حقول الإدخال والقوائم المنسدلة */
body.dark-mode .filter-group input,
body.dark-mode .filter-group select {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .filter-group input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-mode .filter-group input:focus,
body.dark-mode .filter-group select:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2) !important;
}

/* قيمة السعر */
body.dark-mode .price-value {
    color: #60a5fa !important;
}

/* بطاقات الرحلات */
body.dark-mode .tour-card {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .tour-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .tour-content h3,
body.dark-mode .tour-content h3 a {
    color: #f8fafc !important;
}

body.dark-mode .tour-content h3 a:hover {
    color: #f97316 !important;
}

body.dark-mode .tour-description {
    color: #94a3b8 !important;
}

body.dark-mode .tour-info {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

body.dark-mode .tour-info i {
    color: #60a5fa !important;
}

body.dark-mode .tour-price .price {
    color: #60a5fa !important;
}

/* زر المفضلة */
body.dark-mode .tour-favorite-btn {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .tour-favorite-btn:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* رسالة لا توجد رحلات */
body.dark-mode .no-tours {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

body.dark-mode .no-tours h3 {
    color: #f8fafc !important;
}

body.dark-mode .no-tours p {
    color: #94a3b8 !important;
}

/* الترقيم */
body.dark-mode .pagination a {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .pagination a:hover,
body.dark-mode .pagination .current {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
}
