/* 
 * Oneder Power Solutions LLP - CleanTech Enterprise Light Theme
 * Interactive Animations, Scroll-Driven Micro-Interactions & Kinetic Energy Architecture
 * Inspired by Enphase, Tesla Energy, and Sungrow
 */

:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text-main: #0F172A;
  --color-text-muted: #475569;
  --color-accent: #059669;      /* Clean Energy Emerald */
  --color-accent-hover: #047857;
  --color-solar: #D97706;       /* Solar Amber */
  --color-electric: #0284C7;    /* Electric Blue */
  --color-border: #E2E8F0;
  --color-card-border: #E2E8F0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  overflow-x: hidden;
}

/* -------------------------------------------------------------
 * 1. Background Gradients & Ambient Energy Glows
 * ------------------------------------------------------------- */
.bg-tech-grid-light {
  background-color: #F8FAFC;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-gradient-hero {
  background: radial-gradient(100% 100% at 50% 0%, #ECFDF5 0%, #F8FAFC 60%, #F1F5F9 100%);
}

.ambient-glow-emerald {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: floatAmbient 12s ease-in-out infinite alternate;
}

.ambient-glow-solar {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: floatAmbient 14s ease-in-out infinite alternate-reverse;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.15); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* -------------------------------------------------------------
 * 2. Clean White Tech Card Style & Hover Physics
 * ------------------------------------------------------------- */
.tech-card {
  background: #FFFFFF;
  border: 1px solid var(--color-card-border);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tech-card:hover {
  transform: translateY(-6px);
  border-color: #A7F3D0;
  box-shadow: 0 20px 40px -10px rgba(5, 150, 105, 0.18);
}

.img-zoom {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-card:hover .img-zoom {
  transform: scale(1.08);
}

/* -------------------------------------------------------------
 * 3. Hero Carousel Slider & Ken Burns Animation
 * ------------------------------------------------------------- */
.hero-slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 600px;
}

@media (min-width: 1024px) {
  .hero-slider-container {
    min-height: 680px;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
  z-index: 1;
}

.hero-slide.active {
  position: absolute;
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slide.active .hero-slide-img {
  animation: kenBurnsZoom 8s ease-out forwards;
}

@keyframes kenBurnsZoom {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.08); }
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.6) 45%, rgba(15, 23, 42, 0.2) 75%, transparent 100%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-overlay-gradient {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 60%, rgba(15, 23, 42, 0.35) 100%);
  }
}

.hero-glass-box {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

/* Stagger entrance animations for active hero slide */
.hero-slide.active .hero-anim-1 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.hero-slide.active .hero-anim-2 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.hero-slide.active .hero-anim-3 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}
.hero-slide.active .hero-anim-4 {
  animation: heroFadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

@keyframes heroFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slider Progress Bar */
.hero-progress-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 30;
}

.hero-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10B981, #34D399);
  transition: width 0.1s linear;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 32px;
  background-color: #10B981;
}

/* Animated Mouse Scroll Down Indicator */
.mouse-scroll-indicator {
  width: 22px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  position: relative;
  display: inline-block;
}

.mouse-scroll-wheel {
  width: 4px;
  height: 6px;
  background: #10B981;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseWheel 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes mouseWheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* -------------------------------------------------------------
 * 4. Scroll-Triggered Reveal Animations
 * ------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* -------------------------------------------------------------
 * 5. Interactive Mode & Filter Buttons (High-Contrast Active/Hover)
 * ------------------------------------------------------------- */
.flow-mode-btn {
  background-color: #FFFFFF !important;
  color: #1E293B !important;
  border: 1px solid #CBD5E1 !important;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.flow-mode-btn:hover {
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #94A3B8 !important;
  transform: translateY(-1px);
}

.flow-mode-btn.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4) !important;
  transform: translateY(-1px);
}

.flow-mode-btn.active:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
}

/* Product Catalog Filter Buttons */
.product-filter-btn {
  background-color: #FFFFFF !important;
  color: #1E293B !important;
  border: 1px solid #CBD5E1 !important;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.product-filter-btn:hover {
  background-color: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #94A3B8 !important;
  transform: translateY(-1px);
}

.product-filter-btn.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4) !important;
}

.product-filter-btn.active:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
}

.flow-node {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-node:hover {
  transform: scale(1.05);
}

.flow-node.active-node {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
  border-color: #10B981;
}

/* -------------------------------------------------------------
 * 6. Interactive Scroll-Driven Battery State-of-Charge (SoC) HUD Widget
 * ------------------------------------------------------------- */
.scroll-battery-hud {
  position: fixed;
  bottom: 1.25rem;
  left: 0.85rem;
  z-index: 50;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@media (min-width: 640px) {
  .scroll-battery-hud {
    bottom: 1.75rem;
    left: 1.75rem;
    padding: 0.45rem 0.9rem;
    gap: 0.65rem;
  }
}

.scroll-battery-hud:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: #10B981;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.3);
}

.battery-icon-wrapper {
  width: 26px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  padding: 1.5px;
  position: relative;
  display: flex;
  align-items: center;
}

.battery-icon-wrapper::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 2.5px;
  width: 2.5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0 1.5px 1.5px 0;
}

.battery-level-indicator {
  height: 100%;
  width: 100%;
  background: #10B981;
  border-radius: 1px;
  transition: width 0.25s ease-out, background-color 0.25s ease-out;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

/* -------------------------------------------------------------
 * 7. Interactive Battery Sizing Meter Visual
 * ------------------------------------------------------------- */
.battery-meter-container {
  width: 100%;
  height: 20px;
  background: #E2E8F0;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.battery-meter-bar {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  border-radius: 9999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* -------------------------------------------------------------
 * 8. Gradients & Typography
 * ------------------------------------------------------------- */
.text-gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-solar {
  background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------
 * 9. Buttons
 * ------------------------------------------------------------- */
.btn-primary {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 6px 20px 0 rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
  color: #FFFFFF !important;
}

.btn-secondary {
  background: #FFFFFF;
  color: #1E293B !important;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid #CBD5E1;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A !important;
  transform: translateY(-2px);
}

.btn-secondary-white {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary-white:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: #FFFFFF;
  color: #FFFFFF !important;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: #FFFFFF !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
  box-shadow: 0 6px 20px 0 rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  color: #FFFFFF !important;
}

/* Floating WhatsApp Badge */
.floating-whatsapp {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 50;
  background: #22C55E;
  color: white !important;
  padding: 0.85rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-whatsapp:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.55);
}

/* Back to Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 5.5rem;
  z-index: 49;
  background: #0F172A;
  color: white !important;
  padding: 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: #059669;
  transform: translateY(-3px);
}

/* Tables */
.spec-row:nth-child(even) {
  background-color: #F8FAFC;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #059669;
}
