/* ==========================================================================
   Deftware - Day & Night Mode (الوضع الليلي والنهاري)
   High-contrast, professional dark theme designed to preserve original light mode 100%
   ========================================================================== */

[data-theme="dark"] {
    --bs-body-bg: #0c0918;
    --bs-body-color: #d1cbe5;
    --bs-heading-color: #ffffff;
    --bs-paragraph-color: #d1cbe5;
    --primary-border-color: rgba(168, 85, 247, 0.25);
    --bs-light-purple: #231838;
    --bs-modules-card-1: #231c12;
    --bs-modules-card-2: #141b2c;
    --bs-modules-card-3: #22142d;
    --bs-modules-card-4: #0f2324;
    --bs-modules-card-5: #211524;
}

[data-theme="dark"] body {
    background-color: #0c0918 !important;
    color: #d1cbe5 !important;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
[data-theme="dark"] .header {
    background-color: rgba(12, 9, 24, 0.95) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] .navbar {
    background-color: transparent !important;
}

[data-theme="dark"] .nav-link,
[data-theme="dark"] .header .navbar-nav a {
    color: #ded9ed !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .header .navbar-nav a:hover,
[data-theme="dark"] .header .navbar-nav .current-menu-item > a,
[data-theme="dark"] .header .navbar-nav .current_page_item > a {
    color: #c084fc !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #18132c !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #e2def0 !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #2b1f4c !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
[data-theme="dark"] section.hero {
    background-image: radial-gradient(circle at 50% 30%, #2b1343 0%, #160d29 60%, #0c0918 100%) !important;
    background-color: #0c0918 !important;
    border: 1px solid rgba(168, 85, 247, 0.2) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7) !important;
}

[data-theme="dark"] .our-system-container {
    background-color: #1e1738 !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .our-system-container a {
    color: #ffffff !important;
}

[data-theme="dark"] .display-1,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffffff !important;
}

[data-theme="dark"] .paragraph-hero {
    color: #d1cbe5 !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero-shadow {
    background: linear-gradient(180deg, rgba(12, 9, 24, 0) 0%, rgba(12, 9, 24, 0.95) 70%, #0c0918 100%) !important;
}

[data-theme="dark"] section.hero .btn-light,
[data-theme="dark"] section.hero .btn-outline-light {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

[data-theme="dark"] section.hero .btn-light:hover,
[data-theme="dark"] section.hero .btn-outline-light:hover {
    background-color: #ffffff !important;
    color: #0c0918 !important;
}

/* --------------------------------------------------------------------------
   Sections Headers & General Typography
   -------------------------------------------------------------------------- */
[data-theme="dark"] .our-services,
[data-theme="dark"] .our-modules,
[data-theme="dark"] .our-fqa,
[data-theme="dark"] .pricing,
[data-theme="dark"] .contact,
[data-theme="dark"] main,
[data-theme="dark"] #main-content {
    background-color: transparent !important;
}

[data-theme="dark"] .our-services .our-services-heading,
[data-theme="dark"] .our-modules .our-modules-heading,
[data-theme="dark"] .our-fqa .our-fqa-heading,
[data-theme="dark"] .pricing .pricing-heading,
[data-theme="dark"] .contact .contact-heading {
    color: #ffffff !important;
}

[data-theme="dark"] .our-services .our-services-info,
[data-theme="dark"] .our-modules .our-modules-info,
[data-theme="dark"] .our-fqa .our-fqa-info,
[data-theme="dark"] .pricing .pricing-info,
[data-theme="dark"] .description {
    color: #c5bedd !important;
}

[data-theme="dark"] .badge {
    background-color: #271a42 !important;
    border: 1px solid rgba(168, 85, 247, 0.35) !important;
    color: #e9d5ff !important;
}

/* --------------------------------------------------------------------------
   Services Cards & Text Box Contrast (إصلاح تباين المربعات)
   -------------------------------------------------------------------------- */
[data-theme="dark"] .our-services .card,
[data-theme="dark"] .card {
    background-color: #17122b !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* Hide light-mode gradient overlays and blurred background images */
[data-theme="dark"] .our-services .card::before,
[data-theme="dark"] .our-modules .card::before,
[data-theme="dark"] .bg-card {
    display: none !important;
}

[data-theme="dark"] .our-services .card .card-body,
[data-theme="dark"] .our-modules .card .card-body {
    background: transparent !important;
    position: relative !important;
    z-index: 2 !important;
    padding: 2rem !important;
}

/* Card Hover Elevation & Glow */
[data-theme="dark"] .our-services .card:hover,
[data-theme="dark"] .card:hover {
    background-color: #1d1637 !important;
    border-color: rgba(192, 132, 252, 0.6) !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.25) !important;
}

[data-theme="dark"] .our-services .card:hover .card-body {
    background: transparent !important;
}

/* Card Title & Text High Contrast */
[data-theme="dark"] .card-title,
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h5 {
    color: #ffffff !important;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
}

[data-theme="dark"] .card-text,
[data-theme="dark"] .card p,
[data-theme="dark"] .card .description {
    color: #d1cbe5 !important; /* High contrast, crisp readable lavender-white */
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

/* --------------------------------------------------------------------------
   Icon Styling in Dark Mode (إصلاح هالة وشكل الأيقونات)
   - Completely removes the blurry whitish halo (svg background filter)
   - Replaces with a sleek, vibrant purple glass badge with high contrast
   -------------------------------------------------------------------------- */
[data-theme="dark"] .bg-icon-card::before {
    display: none !important;
    content: none !important;
}

[data-theme="dark"] .bg-icon-card,
[data-theme="dark"] .icon-container {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.16) 0%, rgba(126, 34, 206, 0.28) 100%) !important;
    border: 1px solid rgba(192, 132, 252, 0.35) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 3.75rem !important;
    height: 3.75rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .bg-icon-card i,
[data-theme="dark"] .bg-icon-card i[class^="ri-"],
[data-theme="dark"] .bg-icon-card i[class*=" ri-"],
[data-theme="dark"] .icon-container i {
    color: #d8b4fe !important; /* Bright radiant lilac/violet */
    font-size: 1.85rem !important;
    filter: drop-shadow(0 2px 8px rgba(192, 132, 252, 0.5)) !important;
    transition: all 0.3s ease !important;
}

/* Icon Hover State */
[data-theme="dark"] .our-services .card:hover .bg-icon-card,
[data-theme="dark"] .card:hover .bg-icon-card,
[data-theme="dark"] .card:hover .icon-container {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%) !important;
    border-color: #c084fc !important;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5) !important;
    transform: translateY(-2px) scale(1.05) !important;
}

[data-theme="dark"] .our-services .card:hover .bg-icon-card i,
[data-theme="dark"] .card:hover .bg-icon-card i,
[data-theme="dark"] .card:hover .icon-container i {
    color: #ffffff !important;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.85)) !important;
}

/* --------------------------------------------------------------------------
   Section Features (Saudi map banner)
   -------------------------------------------------------------------------- */
[data-theme="dark"] .section-features {
    background: linear-gradient(135deg, #360742 0%, #1a0222 100%) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .section-features h2,
[data-theme="dark"] .section-features .our-features-heading {
    color: #ffffff !important;
}

[data-theme="dark"] .section-features p,
[data-theme="dark"] .section-features .paragraph-features {
    color: #e2def0 !important;
}

[data-theme="dark"] .section-features .btn-primary,
[data-theme="dark"] .section-features .btn-light {
    background-color: #ffffff !important;
    color: #2d0537 !important;
    border: none !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .section-features .btn-primary:hover,
[data-theme="dark"] .section-features .btn-light:hover {
    background-color: #f3e8ff !important;
    color: #2d0537 !important;
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Our Modules Section
   -------------------------------------------------------------------------- */
[data-theme="dark"] .our-modules .card {
    background-color: #17122b !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .our-modules .card-body.bg-modules-card-1 {
    background: #231c12 !important;
    border: 1px solid rgba(255, 221, 51, 0.25) !important;
}

[data-theme="dark"] .our-modules .card-body.bg-modules-card-2 {
    background: #141b2c !important;
    border: 1px solid rgba(118, 153, 212, 0.25) !important;
}

[data-theme="dark"] .our-modules .card-body.bg-modules-card-3 {
    background: #22142d !important;
    border: 1px solid rgba(169, 109, 201, 0.25) !important;
}

[data-theme="dark"] .our-modules .card-body.bg-modules-card-4 {
    background: #0f2324 !important;
    border: 1px solid rgba(130, 195, 218, 0.25) !important;
}

[data-theme="dark"] .our-modules .card-body.bg-modules-card-5 {
    background: #211524 !important;
    border: 1px solid rgba(169, 109, 201, 0.25) !important;
}

/* --------------------------------------------------------------------------
   Pricing Section
   -------------------------------------------------------------------------- */
[data-theme="dark"] section.pricing {
    background-image: none !important;
    background-color: #0c0918 !important;
}

[data-theme="dark"] .pricing .card {
    background-color: #17122b !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .pricing .card:hover,
[data-theme="dark"] .pricing .card.active {
    border-color: #a855f7 !important;
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.3) !important;
    transform: translateY(-4px);
}

[data-theme="dark"] .price-text {
    color: #ffffff !important;
}

[data-theme="dark"] .price-range {
    color: #d1cbe5 !important;
}

[data-theme="dark"] .pricing .card ul li {
    color: #d8d3e8 !important;
}

[data-theme="dark"] .pricing .card ul li.disabled {
    color: #6d6682 !important;
}

/* --------------------------------------------------------------------------
   FAQ Accordion
   -------------------------------------------------------------------------- */
[data-theme="dark"] .our-fqa .accordion-item {
    background-color: #17122b !important;
    border: 1px solid rgba(168, 85, 247, 0.25) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    overflow: hidden;
}

[data-theme="dark"] .our-fqa .accordion-button {
    background-color: #17122b !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

[data-theme="dark"] .our-fqa .accordion-button:not(.collapsed) {
    background-color: #24193c !important;
    color: #d8b4fe !important;
}

[data-theme="dark"] .our-fqa .accordion-button::after {
    filter: invert(1) brightness(0.9);
}

[data-theme="dark"] .our-fqa .accordion-body {
    background-color: #17122b !important;
    color: #d1cbe5 !important;
    border-top: 1px solid rgba(168, 85, 247, 0.15) !important;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
[data-theme="dark"] .contact .card {
    background-color: #17122b !important;
    border: 1px solid rgba(168, 85, 247, 0.28) !important;
}

[data-theme="dark"] .contact .form-control {
    background-color: #130e22 !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .contact .form-control:focus {
    border-color: #c084fc !important;
    box-shadow: 0 0 0 0.25rem rgba(168, 85, 247, 0.25) !important;
    background-color: #17122b !important;
}

[data-theme="dark"] .contact .form-control::placeholder {
    color: #7b7496 !important;
}

[data-theme="dark"] .contact .form-label {
    color: #d1cbe5 !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
[data-theme="dark"] .btn-outline-primary {
    color: #e4dcf7 !important;
    border-color: rgba(168, 85, 247, 0.5) !important;
    background-color: rgba(168, 85, 247, 0.08) !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: #9333ea !important;
    border-color: #9333ea !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4) !important;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
[data-theme="dark"] footer.footer {
    background-color: #07050e !important;
    border-top: 1px solid rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] footer.footer a {
    color: #b5adc9 !important;
}

[data-theme="dark"] footer.footer a:hover {
    color: #c084fc !important;
}

/* --------------------------------------------------------------------------
   Theme Toggle Button
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(72, 3, 85, 0.06);
    border: 1px solid rgba(72, 3, 85, 0.15);
    color: #480355;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 1.2rem;
    padding: 0;
}

.theme-toggle-btn:hover {
    background-color: #480355;
    color: #ffffff;
    transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle-btn {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.35);
    color: #facc15;
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: #facc15;
    color: #0c0918;
    border-color: #facc15;
}
