/* Dark mode for Intrasect — Blue Jean theme adjusted for low-light */
/* Activate automatically via media="(prefers-color-scheme: dark)" */

:root {
  --blue-jean-dark: #071022;   /* slightly darker than default */
  --blue-tint-dark: #0f2b42;
  --gold: #ffd500;
  --card-bg: #0b2636;
  --muted-light: #cfd8e3;
}

/* Base page */
body {
  background: var(--blue-jean-dark);
  color: var(--muted-light);
}

/* Header & Footer (partials should adapt but ensure contrast) */
header.navbar, footer {
  background: linear-gradient(90deg, var(--blue-jean-dark), var(--blue-tint-dark));
  color: var(--muted-light);
}
const darkCookieCSS = document.querySelector('link[href*="cookie-consent-dark.css"]');
const lightCookieCSS = document.querySelector('link[href*="cookie-consent.css"]');

function applyCookieTheme(isDark) {
  if (isDark) {
    darkCookieCSS.removeAttribute("disabled");
    lightCookieCSS.setAttribute("disabled", "true");
  } else {
    lightCookieCSS.removeAttribute("disabled");
    darkCookieCSS.setAttribute("disabled", "true");
  }
}

/* Hero */
.hero-section .hero-content { color: #fff; }
.hero-overlay { background: rgba(2,8,20,0.6); }

/* Module Cards */
.module-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--muted-light);
  border: 1px solid rgba(255,255,255,0.03);
}
.module-card h5 { color: var(--gold); }
.module-functions li::before { color: var(--gold); }

/* Packages */
.package-card {
  background: linear-gradient(180deg, var(--card-bg), rgba(5,18,28,0.9));
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--muted-light);
}
.package-card h5 { color: var(--muted-light); }
.package-card .price { color: var(--muted-light); font-weight:800; }
.package-card.package-center { box-shadow: 0 22px 44px rgba(0,0,0,0.5); transform: scale(1.04); }

/* CTA quote */
.cta-quote { background: linear-gradient(90deg, var(--blue-tint-dark), var(--blue-jean-dark)); color:#fff; }

/* FAQ + Video cards */
.faq-card, .video-card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); color:var(--muted-light); border:1px solid rgba(255,255,255,0.03); }

/* Testimonials */
.testimonials-section {
  background: linear-gradient(90deg, #071022, #0b2a3b);
}
.testimonial-card {
  background: #f8fafc;
  color: var(--blue-jean-dark);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Demo frame */
.demo-frame { background: #0f2634; color: var(--muted-light); box-shadow:0 10px 30px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.03); }
.demo-frame .form-control, .demo-frame .form-select, .demo-frame textarea { background: rgba(255,255,255,0.03); color: var(--muted-light); border: 1px solid rgba(255,255,255,0.04); }

/* Buttons */
.btn-primary { background: var(--gold); color: #000; border: none; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,0.12); }

/* Links */
a { color: #cfe3f8; }
a:hover { color: var(--gold); }

/* Ensure iframe/video contrast */
.video-card iframe { background: #000; }

/* small responsive tweak for dark */
@media (prefers-color-scheme: dark) {
  body { background: var(--blue-jean-dark); }
}
/* ==========================================================
   INTRASECT DARK MODE
   ========================================================== */

body {
  background: #0d1f33;
  color: #eaeaea;
}
a { color: #ffd100; }

.module-card { background: rgba(255,255,255,0.05); }
.module-card:hover { background: rgba(255,255,255,0.12); }

.package-card { background: #1b3b5a; color: #fff; }
.package-card h5 { color: #ffd100; }
.package-card .price { color: #fff; }

.cta-section { background: linear-gradient(90deg, #1b3b5a, #0d1f33); }

footer { background: #0d1f33; color: #ddd; }
/* ==========================
   SUPPORT PAGE — DARK MODE
   ========================== */

body.dark-mode {
  background-color: #0b1623;
  color: #e0e6ee;
}

/* Hero Section */
body.dark-mode .hero-support {
  background: url('../images/support-hero.jpg') center/cover no-repeat;
  color: #fff;
}
body.dark-mode .hero-support::after {
  background: rgba(6, 18, 30, 0.75);
}
body.dark-mode .hero-support .lead {
  color: rgba(255, 255, 255, 0.85);
}
body.dark-mode .hero-support .btn-light {
  background-color: #e8eff8;
  color: #0d1f33;
}
body.dark-mode .hero-support .btn-outline-light:hover {
  background-color: #e8eff8;
  color: #0d1f33;
}

/* Category Cards */
body.dark-mode .category-card {
  background: #132236;
  color: #f1f4f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
body.dark-mode .category-card:hover {
  background: #192e48;
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
body.dark-mode .category-card i {
  color: #4ca9ff;
}

/* Locked Sections */
body.dark-mode .locked-section {
  filter: blur(2px) brightness(0.7);
}
body.dark-mode .locked-overlay {
  background: rgba(13, 31, 51, 0.75);
  color: #e8eff8;
}
body.dark-mode .locked-overlay:hover {
  background: rgba(13, 31, 51, 0.85);
}

/* Network Status */
body.dark-mode .card {
  background: #132236;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e0e6ee;
}
body.dark-mode .status-green { background: #6fcf97; }
body.dark-mode .status-orange { background: #f2c94c; }
body.dark-mode .status-red { background: #eb5757; }

/* Ticket Modal */
body.dark-mode .modal-content {
  background: #132236;
  color: #e8eff8;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
body.dark-mode .modal-header.bg-primary {
  background: #1b3b5a !important;
}
body.dark-mode .form-control,
body.dark-mode .form-select {
  background-color: #1b2d46;
  color: #e0e6ee;
  border-color: #2d3c56;
}
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background-color: #23344e;
  border-color: #4ca9ff;
  box-shadow: none;
}

/* Accordion (FAQ) */
body.dark-mode .accordion-button {
  background-color: #16263e;
  color: #e8eff8;
}
body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #1e3a5e;
  color: #fff;
}
body.dark-mode .accordion-item {
  border-color: rgba(255, 255, 255, 0.05);
}
body.dark-mode .accordion-body {
  background-color: #132236;
  color: #dbe3ef;
}

/* CTA Section */
body.dark-mode .cta-section {
  background: linear-gradient(90deg, #132236, #0d1f33);
  color: #e8eff8;
}
body.dark-mode .cta-section .btn-light {
  background-color: #e8eff8;
  color: #0d1f33;
}
body.dark-mode .cta-section .btn-outline-light {
  color: #e8eff8;
  border-color: #e8eff8;
}
body.dark-mode .cta-section .btn-outline-light:hover {
  background-color: #e8eff8;
  color: #0d1f33;
}
