/* ============================================================
   REDONIX TECHNOLOGIES - THEME SYSTEM
   Light (default) | Dark [data-theme="dark"]
   ============================================================ */

/* ── LIGHT THEME (default) ── */
:root {
  --page-bg:       #ffffff;
  --page-bg-alt:   #f8fafc;
  --page-bg-card:  #ffffff;
  --page-bg-hover: #f1f5f9;
  --page-text:     #1a1a2e;
  --page-text-muted:#6b7280;
  --page-border:   #e2e8f0;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
  --primary:       #3b82f6;
  --primary-dark:  #1d4ed8;
  --primary-light: #60a5fa;
  --accent:        #f43f5e;
  --accent-dark:   #be123c;
  --bg-light:      #0f1623;
  --bg-grey:       #141b2d;
  --white:         #111827;
  --text:          #e2e8f4;
  --text-muted:    #8fa3bf;
  --text-light:    #546a85;
  --border:        #1e2d42;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow:        0 4px 16px rgba(0,0,0,.55);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.65);
  --shadow-xl:     0 20px 60px rgba(0,0,0,.7);
  --page-bg:       #080c14;
  --page-bg-alt:   #0f1623;
  --page-bg-card:  #111827;
  --page-bg-hover: #192236;
  --page-text:     #e2e8f4;
  --page-text-muted:#8fa3bf;
  --page-border:   #1e2d42;
}

[data-theme="dark"] body {
  background: #080c14;
  color: #e2e8f4;
}

/* ── DARK HEADER ── */
[data-theme="dark"] #header {
  background: #060a12;
  border-bottom: 1px solid #1a2436;
}
[data-theme="dark"] #header.scrolled {
  background: rgba(6,10,18,.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 24px rgba(0,0,0,.5);
}

/* ── DARK DROPDOWN ── */
[data-theme="dark"] .dropdown {
  background: #111827;
  border-color: #1e2d42;
  box-shadow: 0 20px 60px rgba(0,0,0,.7);
}
[data-theme="dark"] .dropdown a { color: #b8c8dc; }
[data-theme="dark"] .dropdown a:hover { background: #192236; color: #e2e8f4; }
[data-theme="dark"] .dropdown-group-title { color: #60a5fa; border-bottom-color: #1e2d42; }
[data-theme="dark"] .drop-icon { background: #1a2640; border-color: #1e2d42; }
[data-theme="dark"] .dropdown a:hover .drop-icon { background: rgba(59,130,246,.12); }

/* ── DARK MOBILE NAV ── */
[data-theme="dark"] .mobile-nav { background: #060a12; }
[data-theme="dark"] .mobile-nav-item { border-color: #1a2436; }
[data-theme="dark"] .mobile-dropdown { background: rgba(0,0,0,.3); }
[data-theme="dark"] .mobile-dropdown a { border-color: rgba(255,255,255,.04); }

/* ── DARK TYPOGRAPHY ── */
[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: #e8edf6;
}
[data-theme="dark"] p { color: #8fa3bf; }
[data-theme="dark"] strong { color: #c8d8ec; }

/* ── DARK SECTION BACKGROUNDS ── */
[data-theme="dark"] .section,
[data-theme="dark"] .section-sm { background: #080c14; }

/* Override inline bg-light backgrounds */
[data-theme="dark"] [style*="background:var(--bg-light)"],
[data-theme="dark"] [style*="background: var(--bg-light)"],
[data-theme="dark"] [style*="background:var(--white)"],
[data-theme="dark"] [style*="background: var(--white)"] {
  background: #0f1623 !important;
}

/* ── DARK CARDS ── */
[data-theme="dark"] .service-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .case-study-card {
  background: #111827;
  border-color: #1e2d42;
}
[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .testimonial-card:hover,
[data-theme="dark"] .blog-card:hover {
  border-color: #253650;
  box-shadow: 0 12px 48px rgba(0,0,0,.6);
}

/* ── DARK WHY SECTION ── */
[data-theme="dark"] .why-section {
  background: #040710 !important;
}
[data-theme="dark"] .why-item { background: rgba(255,255,255,.02); }
[data-theme="dark"] .why-item:hover { background: rgba(255,255,255,.05); }
[data-theme="dark"] .why-item h4 { color: #e8edf6; }
[data-theme="dark"] .why-item p { color: rgba(255,255,255,.55); }

/* ── DARK TECH SECTION ── */
[data-theme="dark"] .tech-badge { background: #111827; border-color: #1e2d42; color: #b8c8dc; }
[data-theme="dark"] .tech-badge:hover { border-color: #2a4a70; color: #93c5fd; }
[data-theme="dark"] .tech-tabs { border-bottom-color: #1e2d42; }
[data-theme="dark"] .tech-tab { color: #546a85; }
[data-theme="dark"] .tech-tab:hover { color: #93c5fd; }
[data-theme="dark"] .tech-tab.active { color: #60a5fa; border-bottom-color: #3b82f6; background: rgba(59,130,246,.07); }

/* ── DARK TESTIMONIALS ── */
[data-theme="dark"] .testimonials-section { background: #0a1020 !important; }
[data-theme="dark"] .testimonial-card { background: #111827; border-color: #1e2d42; }
[data-theme="dark"] .testimonial-card::before { color: rgba(96,165,250,.2); }
[data-theme="dark"] .testimonial-text { color: #8fa3bf; }
[data-theme="dark"] .testimonial-name { color: #e2e8f4; }

/* ── DARK CERTIFICATIONS ── */
[data-theme="dark"] .award-badge { background: #111827; border-color: #1e2d42; }
[data-theme="dark"] .award-item:hover .award-badge { background: rgba(59,130,246,.07); border-color: #2a4a70; }
[data-theme="dark"] .award-name { color: #8fa3bf; }

/* ── DARK STATS ── */
[data-theme="dark"] .stats-section {
  background: linear-gradient(135deg, #0c0018, #160022) !important;
}

/* ── DARK CTA BANNER ── */
[data-theme="dark"] .cta-banner {
  background: linear-gradient(135deg, #040916, #0a1530) !important;
}

/* ── DARK PAGE HERO ── */
[data-theme="dark"] .page-hero {
  background: linear-gradient(135deg, #030508 0%, #060d18 60%, #0a1428 100%) !important;
}

/* ── DARK PROCESS ── */
[data-theme="dark"] .process-num {
  background: #111827;
  border-color: #1e2d42;
  color: #60a5fa;
}
[data-theme="dark"] .process-grid::before {
  background: linear-gradient(90deg, #1a2d50, #253a60);
}
[data-theme="dark"] .process-step h4 { color: #e8edf6; }
[data-theme="dark"] .process-step p  { color: #8fa3bf; }

/* ── DARK FORMS ── */
[data-theme="dark"] .form-control {
  background: #0f1623;
  border-color: #1e2d42;
  color: #e2e8f4;
}
[data-theme="dark"] .form-control:focus {
  border-color: #3b82f6;
  background: #111827;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
[data-theme="dark"] .form-control::placeholder { color: #2e4060; }
[data-theme="dark"] .form-label { color: #b8c8dc; }

/* ── DARK FAQ ── */
[data-theme="dark"] .faq-item { border-color: #1e2d42; }
[data-theme="dark"] .faq-question { color: #e2e8f4; }
[data-theme="dark"] .faq-item:hover .faq-question { color: #93c5fd; }
[data-theme="dark"] .faq-icon { background: #111827; color: #60a5fa; }
[data-theme="dark"] .faq-answer { color: #8fa3bf; }

/* ── DARK FOOTER ── */
[data-theme="dark"] footer {
  background: #030508;
  border-top-color: #1a2436;
}
[data-theme="dark"] .footer-brand { border-right-color: #1a2436; }
[data-theme="dark"] .footer-col h5 { color: #e2e8f4; }
[data-theme="dark"] .footer-links a { color: #8fa3bf; }
[data-theme="dark"] .footer-links a:hover { color: #60a5fa; }
[data-theme="dark"] .footer-contact-item span { color: #8fa3bf; }
[data-theme="dark"] .footer-tagline { color: #546a85; }
[data-theme="dark"] .footer-bottom {
  background: #020306;
  border-top-color: #1a2436;
  color: #546a85;
}
[data-theme="dark"] .footer-bottom-links a { color: #546a85; }
[data-theme="dark"] .footer-bottom-links a:hover { color: #93c5fd; }
[data-theme="dark"] .footer-badge {
  background: #1a2640;
  border-color: #1e2d42;
  color: #8fa3bf;
}
[data-theme="dark"] .footer-social { background: #1a2640; }

/* ── DARK LOADER ── */
[data-theme="dark"] #loader { background: #040710; }

/* ── DARK SCROLLBAR ── */
[data-theme="dark"] ::-webkit-scrollbar-track { background: #060a12; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #1e2d42; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #2a4060; }
[data-theme="dark"] ::selection { background: #1e4080; color: #e2e8f4; }

/* ── DARK BACK TO TOP ── */
[data-theme="dark"] #back-to-top { background: #192236; border: 1px solid #1e2d42; }
[data-theme="dark"] #back-to-top:hover { background: #253a60; }

/* ── DARK SVG ICONS ── */
[data-theme="dark"] .service-icon svg,
[data-theme="dark"] .drop-icon svg,
[data-theme="dark"] .why-icon svg {
  stroke: #60a5fa !important;
}
[data-theme="dark"] .service-card:hover .service-icon svg,
[data-theme="dark"] .dropdown a:hover .drop-icon svg {
  stroke: #fff !important;
}

/* ── DARK SECTION TAG ── */
[data-theme="dark"] .section-tag {
  background: rgba(59,130,246,.1);
  color: #60a5fa;
}
[data-theme="dark"] .section-tag.blue {
  background: rgba(59,130,246,.1);
  color: #60a5fa;
}

/* ── DARK BREADCRUMB ── */
[data-theme="dark"] .breadcrumb a { color: rgba(255,255,255,.55); }
[data-theme="dark"] .breadcrumb span { color: rgba(255,255,255,.85); }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .3s;
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.2);
  transform: scale(1.05);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .t-moon { display: block; }
.theme-toggle .t-sun  { display: none; }
[data-theme="dark"] .theme-toggle .t-moon { display: none; }
[data-theme="dark"] .theme-toggle .t-sun  { display: block; }

/* ── STICKY REQUEST DEMO BUTTON ── */
.sticky-demo-btn {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #105581 0%, #0a3352 100%);
  color: #fff;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 24px 12px;
  border-radius: 0 10px 10px 0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  z-index: 994;
  box-shadow: 3px 0 24px rgba(16,85,129,.4);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  border: none;
  outline: none;
}
.sticky-demo-btn:hover {
  background: linear-gradient(180deg, #1a6fa3 0%, #105581 100%);
  padding-right: 18px;
  box-shadow: 4px 0 32px rgba(16,85,129,.6);
}
.sticky-demo-btn svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255,255,255,.85);
  fill: none;
  transform: rotate(90deg);
  flex-shrink: 0;
}
[data-theme="dark"] .sticky-demo-btn {
  background: linear-gradient(180deg, #1a2840 0%, #0d1520 100%);
  border: 1px solid #253a60;
  border-left: none;
  box-shadow: 3px 0 24px rgba(0,0,0,.5);
}
[data-theme="dark"] .sticky-demo-btn:hover {
  background: linear-gradient(180deg, #2a4a78 0%, #1a2840 100%);
}
@media (max-width: 768px) {
  .sticky-demo-btn { display: none; }
}

/* ── PARALLAX HERO ── */
.parallax-hero {
  position: relative;
  overflow: hidden;
}
.parallax-hero-img {
  position: absolute;
  inset: -30% 0;
  background-size: cover;
  background-position: center top;
  will-change: transform;
  pointer-events: none;
}
.parallax-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.parallax-hero > * { position: relative; z-index: 2; }

/* ── ENHANCED SCROLL ANIMATIONS ── */
.st-up   { opacity:0; transform:translateY(50px);  transition: opacity .7s ease, transform .7s ease; }
.st-left { opacity:0; transform:translateX(-50px); transition: opacity .7s ease, transform .7s ease; }
.st-right{ opacity:0; transform:translateX(50px);  transition: opacity .7s ease, transform .7s ease; }
.st-scale{ opacity:0; transform:scale(.9);          transition: opacity .7s ease, transform .7s ease; }
.st-up.visible,.st-left.visible,.st-right.visible,.st-scale.visible {
  opacity: 1;
  transform: none;
}

/* ── HERO IMAGE OVERLAY ── */
.hero-img-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .12;
  mix-blend-mode: luminosity;
  pointer-events: none;
}
[data-theme="dark"] .hero-img-overlay { opacity: .06; }

/* ── SERVICES PAGE IMAGE HERO ── */
.service-hero-img {
  position: absolute;
  right: -40px;
  bottom: 0;
  width: 50%;
  max-width: 580px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  z-index: 2;
}
.service-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  opacity: .85;
}

/* ── INDUSTRY CARDS WITH IMAGE ── */
.industry-card-img {
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}
.industry-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.industry-card:hover .industry-card-img img {
  transform: scale(1.06);
}

/* ── LOTTIE PLAYER ── */
.lottie-container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

/* ── DARK INLINE ELEMENTS ── */
[data-theme="dark"] .timeline-item { border-left-color: #1e2d42; }
[data-theme="dark"] .timeline-dot  { border-color: #1e2d42; background: #1a2d50; }
[data-theme="dark"] .blog-meta     { color: #546a85; }
[data-theme="dark"] .blog-title    { color: #e2e8f4; }
[data-theme="dark"] .blog-excerpt  { color: #8fa3bf; }
[data-theme="dark"] .blog-cat      { background: rgba(59,130,246,.1); color: #60a5fa; }
[data-theme="dark"] .stat-item     { border-color: rgba(255,255,255,.1); }

/* ── MOBILE NAV FIX ── */
@media (max-width: 992px) {
  .nav-cta .btn-primary { display: none !important; }
  .nav-cta { gap: 8px; }
}

/* ═══════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════ */
* { cursor: none !important; }
@media (hover: none) and (pointer: coarse) {
  * { cursor: auto !important; }
  #rdx-cursor, #rdx-cursor-dot { display: none !important; }
}

#rdx-cursor {
  position: fixed;
  width: 36px; height: 36px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease, opacity .25s ease;
  mix-blend-mode: normal;
  opacity: 0;
  will-change: transform;
}
#rdx-cursor-dot {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  transition: width .12s ease, height .12s ease, background .2s ease, opacity .25s ease;
  opacity: 0;
  will-change: transform;
}
body.cursor-ready #rdx-cursor,
body.cursor-ready #rdx-cursor-dot { opacity: 1; }

/* Hover state — grow ring */
body.cursor-hovering #rdx-cursor {
  width: 52px; height: 52px;
  border-color: var(--accent);
  background: rgba(187,32,47,.06);
}
body.cursor-hovering #rdx-cursor-dot {
  width: 5px; height: 5px;
  background: var(--primary);
}
/* Click state — compress */
body.cursor-clicking #rdx-cursor {
  width: 24px; height: 24px;
  background: rgba(16,85,129,.15);
}
[data-theme="dark"] #rdx-cursor { border-color: #60a5fa; }
[data-theme="dark"] #rdx-cursor-dot { background: #f43f5e; }
[data-theme="dark"] body.cursor-hovering #rdx-cursor {
  border-color: #f43f5e;
  background: rgba(244,63,94,.06);
}

/* ═══════════════════════════════════════════
   DEMO REQUEST MODAL
═══════════════════════════════════════════ */
#demo-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,9,22,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9990;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
#demo-modal-overlay.open {
  opacity: 1; visibility: visible;
}
#demo-modal {
  background: #fff;
  border-radius: 24px;
  padding: 48px;
  max-width: 600px; width: 100%;
  position: relative;
  box-shadow: 0 32px 100px rgba(0,0,0,.25);
  transform: scale(.94) translateY(20px);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh;
  overflow-y: auto;
}
#demo-modal-overlay.open #demo-modal {
  transform: scale(1) translateY(0);
}
[data-theme="dark"] #demo-modal {
  background: #111827;
  border: 1px solid #1e2d42;
}
#demo-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-grey);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: none;
  transition: all .2s;
}
#demo-modal-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
#demo-modal-close svg { width: 16px; height: 16px; stroke: currentColor; }
[data-theme="dark"] #demo-modal-close { background: #1a2640; border-color: #253a60; color: #8fa3bf; }

.demo-modal-head { text-align: center; margin-bottom: 32px; }
.demo-modal-head .demo-icon {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #1a7bc4);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.demo-modal-head .demo-icon svg { width: 30px; height: 30px; stroke: #fff; fill: none; }
.demo-modal-head h3 { margin-bottom: 8px; }
.demo-modal-head p { font-size: .9rem; color: var(--text-muted); }
[data-theme="dark"] .demo-modal-head h3 { color: #e2e8f4; }

/* Keep modal form-control consistent with page form */
#demo-modal .form-control { margin-bottom: 0; }
#demo-modal .form-group { margin-bottom: 18px; }

/* Trust badge row */
.modal-trust {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-top: 16px;
  flex-wrap: wrap;
}
.modal-trust span {
  display: flex; align-items: center; gap: 5px;
  font-size: .75rem; color: var(--text-light); font-weight: 500;
}
.modal-trust svg { width: 13px; height: 13px; }

@media (max-width: 576px) {
  #demo-modal { padding: 32px 24px; border-radius: 16px; }
  #demo-modal-overlay { padding: 12px; }
}
[data-theme="dark"] #demo-modal .form-control {
  background: #0f1623; border-color: #1e2d42; color: #e2e8f4;
}

/* ═══════════════════════════════════════════
   BLOG CARD IMAGE SUPPORT (dark overlay)
═══════════════════════════════════════════ */
[data-theme="dark"] .blog-cat {
  background: rgba(244,63,94,.85);
}
[data-theme="dark"] .blog-card {
  background: #111827; border-color: #1e2d42;
}
[data-theme="dark"] .blog-footer {
  border-top-color: #1e2d42;
}
