/* ══════════════════════════════════════════════════════════
   hjLabs.in — Theme System (dark · light · system)
   Loaded on every page. Uses html[data-theme] attribute.
   Dark mode is the default; light overrides via higher specificity.
   ══════════════════════════════════════════════════════════ */

/* ── Smooth transitions on theme switch ─────────────────── */
body,
.navbar-main, .site-navbar, .navbar-collapse,
.glass-card, .product-card, .product-hero,
.footer-section, footer, section,
.hero-section, .featured-section, .products-section {
  transition: background-color 0.35s ease, border-color 0.25s ease, color 0.2s ease !important;
}

/* ── Theme Toggle Button ─────────────────────────────────── */
.theme-toggle-btn {
  background: rgba(99, 102, 241, 0.1);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: #818cf8;
  color: #a5b4fc;
}
.theme-toggle-btn .material-icons {
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

/* ── Light Theme Variable Overrides ─────────────────────── */
html[data-theme="light"] {
  --bg-base:        #f8fafc;
  --bg-surface:     #eef2ff;
  --bg-card:        rgba(255, 255, 255, 0.92);
  --bg-glass:       rgba(99, 102, 241, 0.06);
  --border-glass:   rgba(99, 102, 241, 0.16);
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --gradient-hero:  linear-gradient(135deg, #eef2ff 0%, #e0e7ff 45%, #ddd6fe 100%);
  --gradient-card:  linear-gradient(135deg, rgba(99,102,241,0.07) 0%, rgba(6,182,212,0.03) 100%);
  --shadow-glow:    0 0 40px rgba(99, 102, 241, 0.10);
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.07);
}

/* ── Light: Body ─────────────────────────────────────────── */
html[data-theme="light"] body {
  background: var(--gradient-hero) !important;
  background-attachment: fixed !important;
  color: var(--text-primary) !important;
}

/* ── Light: Inline Navbar (index.html / store/index.html) ── */
html[data-theme="light"] .navbar-main {
  background: rgba(248, 250, 252, 0.92) !important;
  border-bottom-color: rgba(99, 102, 241, 0.14) !important;
}
html[data-theme="light"] .navbar-main.scrolled {
  background: rgba(248, 250, 252, 0.99) !important;
  box-shadow: 0 2px 16px rgba(99, 102, 241, 0.08) !important;
}
html[data-theme="light"] .nav-link-custom {
  color: #475569 !important;
}
html[data-theme="light"] .nav-link-custom:hover {
  color: #0f172a !important;
  background: rgba(99, 102, 241, 0.06) !important;
}
html[data-theme="light"] .cart-btn {
  background: rgba(99, 102, 241, 0.07) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  color: #4f46e5 !important;
}

/* ── Light: Component Navbar (nav.html) ───────────────────── */
html[data-theme="light"] .site-navbar {
  background: rgba(248, 250, 252, 0.95) !important;
  border-bottom-color: rgba(99, 102, 241, 0.13) !important;
}
html[data-theme="light"] .site-navbar .nav-link {
  color: #475569 !important;
}
html[data-theme="light"] .site-navbar .nav-link:hover,
html[data-theme="light"] .site-navbar .nav-link.active {
  color: #0f172a !important;
}
html[data-theme="light"] .site-navbar .dropdown-menu {
  background: rgba(255, 255, 255, 0.99) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10) !important;
}
html[data-theme="light"] .site-navbar .dropdown-item {
  color: #475569 !important;
}
html[data-theme="light"] .site-navbar .dropdown-item:hover {
  background: rgba(99, 102, 241, 0.07) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .site-navbar .dropdown-header {
  color: #94a3b8 !important;
}
html[data-theme="light"] .navbar-toggler {
  border-color: rgba(99, 102, 241, 0.2) !important;
}
html[data-theme="light"] .navbar-toggler-icon {
  filter: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815%2C23%2C42%2C0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
html[data-theme="light"] .nav-cart-btn {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.22) !important;
  color: #4f46e5 !important;
}
html[data-theme="light"] .site-navbar .navbar-collapse {
  background: rgba(248, 250, 252, 0.99) !important;
  border-top-color: rgba(99, 102, 241, 0.10) !important;
}

/* ── Light: Hero Sections ────────────────────────────────── */
html[data-theme="light"] .hero-section {
  background: var(--gradient-hero) !important;
}
html[data-theme="light"] .hero-title,
html[data-theme="light"] .hero-heading {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 60%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .hero-desc {
  color: #475569 !important;
}
html[data-theme="light"] .hero-badge {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.22) !important;
  color: #4338ca !important;
}

/* ── Light: Product Hero (product pages) ─────────────────── */
html[data-theme="light"] .product-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ddd6fe 100%) !important;
  border-bottom-color: rgba(99, 102, 241, 0.14) !important;
}
html[data-theme="light"] .breadcrumb-nav {
  color: #94a3b8 !important;
}

/* ── Light: Cards ────────────────────────────────────────── */
html[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}
html[data-theme="light"] .glass-card:hover {
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.14) !important;
  border-color: rgba(99, 102, 241, 0.28) !important;
}
html[data-theme="light"] .product-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
}
html[data-theme="light"] .product-card:hover {
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.14) !important;
  border-color: rgba(99, 102, 241, 0.28) !important;
}

/* ── Light: Featured / Store sections ───────────────────── */
html[data-theme="light"] .featured-section {
  background: linear-gradient(180deg, #eef2ff 0%, #e8ecff 100%) !important;
}
html[data-theme="light"] .products-section {
  background: #f1f5f9 !important;
}

/* ── Light: Sections ─────────────────────────────────────── */
html[data-theme="light"] section {
  background-color: transparent;
}
html[data-theme="light"] .section-title {
  color: #0f172a !important;
}
html[data-theme="light"] .section-subtitle {
  color: #475569 !important;
}

/* ── Light: Stats / Numbers ──────────────────────────────── */
html[data-theme="light"] .stat-number {
  color: #4338ca !important;
}
html[data-theme="light"] .stat-label {
  color: #64748b !important;
}

/* ── Light: Tables ───────────────────────────────────────── */
html[data-theme="light"] table,
html[data-theme="light"] .table {
  color: #0f172a !important;
}
html[data-theme="light"] th,
html[data-theme="light"] thead {
  background: rgba(99, 102, 241, 0.09) !important;
  color: #1e1b4b !important;
}
html[data-theme="light"] td {
  border-color: rgba(99, 102, 241, 0.1) !important;
  color: #334155 !important;
}

/* ── Light: Form inputs ──────────────────────────────────── */
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: #fff !important;
  color: #0f172a !important;
  border-color: rgba(99, 102, 241, 0.22) !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
}

/* ── Light: Footer ───────────────────────────────────────── */
html[data-theme="light"] .footer-section,
html[data-theme="light"] footer {
  background: #e8ecf4 !important;
  border-top-color: rgba(99, 102, 241, 0.12) !important;
}
html[data-theme="light"] .footer-copy {
  color: #64748b !important;
}
html[data-theme="light"] footer a,
html[data-theme="light"] .footer-links a {
  color: #64748b !important;
}
html[data-theme="light"] footer a:hover,
html[data-theme="light"] .footer-links a:hover {
  color: #4338ca !important;
}

/* ── Light: Breadcrumbs ──────────────────────────────────── */
html[data-theme="light"] .breadcrumb-nav a {
  color: #4f46e5 !important;
}
html[data-theme="light"] .breadcrumb-nav a:hover {
  color: #0369a1 !important;
}

/* ── Light: Badges ───────────────────────────────────────── */
html[data-theme="light"] .featured-badge {
  background: rgba(6, 182, 212, 0.08) !important;
  border-color: rgba(6, 182, 212, 0.22) !important;
  color: #0369a1 !important;
}
html[data-theme="light"] .category-badge,
html[data-theme="light"] .hero-badge {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: rgba(99, 102, 241, 0.22) !important;
  color: #4338ca !important;
}

/* ── Light: Quote Cart ───────────────────────────────────── */
html[data-theme="light"] .cart-item {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
}

/* ── Light: Job listings ─────────────────────────────────── */
html[data-theme="light"] .job-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
}

/* ── Light: Policy pages ─────────────────────────────────── */
html[data-theme="light"] .policy-content h2,
html[data-theme="light"] .policy-content h3 {
  color: #1e1b4b !important;
}
html[data-theme="light"] .policy-content p,
html[data-theme="light"] .policy-content li {
  color: #334155 !important;
}

/* ── Particle canvas ─────────────────────────────────────── */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.hero-section > .container,
.hero-section > * {
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   Theme Enhancements v2.0 — added 2026-03-29
   ══════════════════════════════════════════════════════════ */

/* ── Dark: Page Hero consistent gradient ─────────────────── */
.page-hero {
  background: linear-gradient(
    135deg,
    rgba(11, 15, 25, 1) 0%,
    rgba(30, 27, 75, 0.95) 60%,
    rgba(49, 46, 129, 0.85) 100%
  );
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Dark: ensure core CSS vars are set at :root ─────────── */
:root {
  --bg-base:        #0b0f19;
  --bg-surface:     #0f172a;
  --bg-card:        rgba(15, 23, 42, 0.85);
  --bg-glass:       rgba(99, 102, 241, 0.07);
  --border-glass:   rgba(99, 102, 241, 0.2);
  --text-primary:   #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --gradient-hero:  linear-gradient(135deg, #0b0f19 0%, #0f172a 40%, #1e1b4b 70%, #312e81 100%);
  --gradient-card:  linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(6,182,212,0.03) 100%);
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.35);
}

/* ── Dark: Text contrast helpers ─────────────────────────── */
.text-readable {
  color: var(--text-primary);
  line-height: 1.7;
}

.text-readable-muted {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Light: Page Hero override ───────────────────────────── */
html[data-theme="light"] .page-hero {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 60%, #ddd6fe 100%) !important;
  border-bottom-color: rgba(99, 102, 241, 0.14) !important;
}

html[data-theme="light"] .page-hero::before {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
}

/* ── Light: section-title readability ───────────────────── */
html[data-theme="light"] .section-title {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 60%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── Light: gallery images ───────────────────────────────── */
html[data-theme="light"] .gallery img,
html[data-theme="light"] .product-gallery img,
html[data-theme="light"] figure img {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Light: product card border transition ───────────────── */
html[data-theme="light"] .product-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* ── Light: glass-card improved hover ───────────────────── */
html[data-theme="light"] .glass-card:hover {
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* ── Light: WhatsApp button ──────────────────────────────── */
html[data-theme="light"] .btn-whatsapp {
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35) !important;
}

/* ── Scrollbar — light theme override ───────────────────── */
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #e8ecf4;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
}

/* ── Selection — light theme override ───────────────────── */
html[data-theme="light"] ::selection {
  background: rgba(99, 102, 241, 0.25);
  color: #1e1b4b;
}

/* ══════════════════════════════════════════════════════════
   Light Theme — Glassmorphism & Readability Fixes v3.0
   Added 2026-03-29
   ══════════════════════════════════════════════════════════ */

/* ── Light: Fix glassmorphism backgrounds ──────────────── */
html[data-theme="light"] .glass-card,
html[data-theme="light"] .product-card,
html[data-theme="light"] .testimonial-card,
html[data-theme="light"] .solution-card,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .comp-card,
html[data-theme="light"] .brand-tile,
html[data-theme="light"] .value-card,
html[data-theme="light"] .contact-info-card,
html[data-theme="light"] .accordion-item,
html[data-theme="light"] .product-section,
html[data-theme="light"] .specs-table,
html[data-theme="light"] .store-cta {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px) saturate(1.2) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
  border-color: rgba(99, 102, 241, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* ── Light: Fix gradient text ──────────────────────────── */
html[data-theme="light"] .gradient-text,
html[data-theme="light"] .section-title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] .section-heading,
html[data-theme="light"] .cta-heading,
html[data-theme="light"] .faq-heading,
html[data-theme="light"] .yt-section-heading {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #0369a1 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ── Light: Fix CTA sections ───────────────────────────── */
html[data-theme="light"] .cta-section,
html[data-theme="light"] .cta-band,
html[data-theme="light"] [class*="cta"] {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(6,182,212,0.05), rgba(99,102,241,0.06)) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

/* ── Light: Fix hero sections ──────────────────────────── */
html[data-theme="light"] .page-hero,
html[data-theme="light"] .product-hero,
html[data-theme="light"] .hero-section {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ddd6fe 100%) !important;
}

/* ── Light: Fix aurora blobs ───────────────────────────── */
html[data-theme="light"] .aurora-blob,
html[data-theme="light"] .hero-blob-1,
html[data-theme="light"] .hero-blob-2,
html[data-theme="light"] .page-hero::before,
html[data-theme="light"] .page-hero::after {
  opacity: 0.3 !important;
}

/* ── Light: Fix specs table rows ───────────────────────── */
html[data-theme="light"] .specs-table tr:nth-child(odd) td {
  background: rgba(99, 102, 241, 0.04) !important;
}
html[data-theme="light"] .specs-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.6) !important;
}
html[data-theme="light"] .specs-table td:first-child {
  color: #4338ca !important;
}

/* ── Light: Fix FAQ accordion ──────────────────────────── */
html[data-theme="light"] .accordion-button {
  color: #0f172a !important;
}
html[data-theme="light"] .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(6,182,212,0.04)) !important;
  color: #4338ca !important;
}

/* ── Light: Fix footer ─────────────────────────────────── */
html[data-theme="light"] .site-footer,
html[data-theme="light"] footer {
  background: #eef2ff !important;
  color: #475569 !important;
}
html[data-theme="light"] .site-footer h3,
html[data-theme="light"] footer h3 {
  color: #1e1b4b !important;
  -webkit-text-fill-color: #1e1b4b !important;
  background: none !important;
}

/* ── Light: Fix buttons ────────────────────────────────── */
html[data-theme="light"] .btn-quote,
html[data-theme="light"] .btn-primary-glow {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #fff !important;
}

/* ── Light: Fix price box ──────────────────────────────── */
html[data-theme="light"] .price-box {
  background: rgba(74, 222, 128, 0.08) !important;
  border-left-color: #4f46e5 !important;
}

/* ── Light: YouTube embed ──────────────────────────────── */
html[data-theme="light"] .yt-embed {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* ── Light: WhatsApp floating button ───────────────────── */
html[data-theme="light"] .float-wa-btn,
html[data-theme="light"] [class*="float-wa"] {
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3) !important;
}

/* ── Light: Fix text colors for readability ────────────── */
html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] span:not([class*="material-icons"]),
html[data-theme="light"] .card-body {
  color: #334155;
}
html[data-theme="light"] strong {
  color: #0f172a;
}
