:root {
  /* Dynamic Variables (Fallback) */
  --primary-color: #F4B400; 
  --secondary-color: #1E3A5F; 
  --dark-color: #1E3A5F; 
  --light-color: #f8fafc; 
  --accent-color: #FF8C00; 
  --font-family-base: 'Jost', sans-serif;
  
  --text-color: #334155;
  --text-muted: #64748b;
  
  /* Premium Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 16px;
  
  /* Shadows */
  --soft-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 10px 30px -4px rgba(14, 165, 233, 0.2);
  
  /* Border Radius */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --border-radius-xl: 32px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-family-base);
  color: var(--text-color);
  background-color: var(--light-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--dark-color);
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-dark-custom { background-color: var(--dark-color) !important; }
.bg-light-custom { background-color: var(--light-color) !important; }

/* Buttons */
.btn-custom {
  padding: 12px 30px;
  border-radius: var(--border-radius-xl);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-custom {
  background-color: var(--primary-color);
  color: var(--dark-color);
}

.btn-primary-custom:hover {
  background-color: var(--dark-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.btn-secondary-custom {
  background-color: var(--secondary-color);
  color: #fff;
}

.btn-secondary-custom:hover {
  background-color: var(--dark-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--soft-shadow);
  border-radius: var(--border-radius-md);
}

.glass-panel-dark {
  background: rgba(27, 27, 27, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius-md);
  color: #fff;
}

/* Header & Navbar */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  transition: var(--transition);
  background: transparent;
  padding: 15px 0;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--soft-shadow);
  padding: 10px 0;
}

.navbar-brand img {
  height: 45px;
  transition: var(--transition);
}

.site-header.scrolled .nav-link {
  color: var(--dark-color) !important;
}
.site-header .nav-link {
  color: var(--dark-color);
  font-weight: 500;
  padding: 10px 15px !important;
  position: relative;
}

/* Custom underline animation - use ::before to not conflict with Bootstrap's ::after caret */
.site-header .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.site-header .nav-link:hover::before,
.site-header .nav-link.active::before {
  width: 80%;
}

/* Ensure the dropdown caret has some spacing */
.site-header .dropdown-toggle::after {
  margin-left: 0.3em;
  vertical-align: 0.1em;
}

/* Dropdown / Mega Menu */
.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  padding: 15px;
  background: #ffffff;
  margin-top: 0; /* Removed margin to prevent hover gap issue */
  display: none; 
}

/* Open dropdown on hover for desktop */
@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
  }
  
  /* Add an invisible bridge so hover doesn't break */
  .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  border-radius: var(--border-radius-sm);
  padding: 10px 20px;
  font-weight: 600;
  color: var(--text-color);
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.02);
}
.dropdown-item:last-child {
  border-bottom: none;
}
.dropdown-item:hover {
  background-color: var(--primary-color);
  color: var(--dark-color) !important;
  transform: translateX(5px);
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--light-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.loader-sun {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(244, 180, 0, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(244, 180, 0, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(244, 180, 0, 0); }
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: var(--dark-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--soft-shadow);
}
.back-to-top.active {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--dark-color);
  color: var(--primary-color);
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #25D366;
  color: #FFF;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  font-size: 24px;
  box-shadow: var(--soft-shadow);
  transition: var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: #FFF;
}

/* Footer */
.site-footer {
  background-color: var(--dark-color);
  color: #fff;
  padding: 80px 0 20px;
  position: relative;
}
.site-footer h5 {
  color: var(--primary-color);
  margin-bottom: 25px;
}
.footer-links {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 15px;
}
.footer-links a {
  color: #adb5bd;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 50px;
}
.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  margin-right: 10px;
  transition: var(--transition);
}
.social-links a:hover {
  background: var(--primary-color);
  color: var(--dark-color);
  transform: translateY(-3px);
}

/* Sections */
.section-padding {
  padding: 60px 0;
}
.section-title {
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
}
/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(11,110,79,0.9) 0%, rgba(27,27,27,0.8) 100%), url('https://images.unsplash.com/photo-1509391366360-120015570020?q=80&w=2072&auto=format&fit=crop') center/cover no-repeat;
  color: #fff;
  overflow: hidden;
  padding-top: 150px;
  padding-bottom: 120px;
}
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(244,180,0,0.15) 2px, transparent 2px);
  background-size: 50px 50px;
  animation: floating 20s linear infinite;
}

/* Hero Video & Media elements */
.hero-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-yt-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  pointer-events: none;
}

.hero-yt-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%) scale(1.1);
  min-width: 177.77vh;
  min-height: 56.25vw;
  pointer-events: none;
}
@keyframes floating {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(-50px) translateX(-50px); }
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}
.text-gradient {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
}

/* Stats Section */
.stats-box {
  text-align: center;
  padding: 30px;
  transition: var(--transition);
}
.stats-box:hover {
  transform: translateY(-10px);
}
.stats-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Services / Solutions */
.service-card {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  margin-bottom: 30px;
}
.service-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-img {
  transform: scale(1.1);
}
.service-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: #fff;
  z-index: 2;
}
.service-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--dark-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: absolute;
  top: -30px;
  right: 20px;
  box-shadow: var(--soft-shadow);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
  color: #fff;
  border-radius: var(--border-radius-xl);
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.cta-shape {
  position: absolute;
  right: -10%;
  top: -20%;
  width: 50%;
  height: 150%;
  background: rgba(255,255,255,0.05);
  transform: rotate(25deg);
}

/* SolarDekho UI Specific Styles */

/* Top Bar Dark */
.top-bar-dark {
  background: linear-gradient(90deg, #0b192c 0%, #1e293b 100%);
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}
.top-bar-dark a {
  color: #e2e8f0;
  transition: all 0.25s ease;
  font-weight: 500;
}
.top-bar-dark a:hover {
  color: #f4b400 !important;
  transform: translateY(-1px);
}

.top-bar-info {
  font-size: 0.85rem;
  color: #cbd5e1;
}
.top-bar-info i {
  color: var(--primary-color);
  margin-right: 5px;
}

/* Main Navbar Wrapper */
.main-navbar-wrapper {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Floating Sidebar (Glass Capsule) */
.floating-sidebar {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.15), 0 0 15px rgba(244, 180, 0, 0.15);
  padding: 16px 12px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.floating-sidebar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 6px;
  transition: all 0.25s ease;
  padding: 4px;
}
.floating-sidebar a:hover {
  transform: scale(1.12);
  color: #f4b400;
}

/* Hero Calculator Card (Pro Glassmorphism) */
.hero-calc-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 35px;
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  color: var(--text-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(244, 180, 0, 0.25);
}
}
.savings-result-box {
  background: #F0FDF4;
  border-radius: var(--border-radius-sm);
  padding: 15px;
  text-align: center;
  border: 1px dashed #22C55E;
}
.savings-result-box h3 {
  color: #16A34A;
  font-weight: 800;
  margin: 5px 0 0;
}

/* Badges */
.badge-custom {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(5px);
  border-radius: 50px;
  padding: 8px 15px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}
.badge-custom i {
  color: var(--primary-color);
}

/* Overlapping Solutions Grid */
.solutions-overlap-wrapper {
  margin-top: -80px;
  position: relative;
  z-index: 10;
  padding: 0 15px;
}
.solution-box {
  background: #fff;
  border-radius: var(--border-radius-md);
  padding: 25px;
  text-align: center;
  box-shadow: var(--soft-shadow);
  height: 100%;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.03);
}
.solution-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}
.solution-icon-wrap {
  width: 50px;
  height: 50px;
  background: var(--light-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}
.solution-box img.solution-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  margin-top: 15px;
}

/* Stats Ribbon */
.stats-ribbon {
  background: var(--secondary-color);
  color: #fff;
  border-radius: var(--border-radius-md);
  padding: 30px;
  margin-top: 30px;
}
.trusted-brand-badge {
  background: rgba(255,255,255,0.1);
  border-radius: var(--border-radius-sm);
  padding: 15px;
}

/* Features Grid */
.feature-box {
  background: #fff;
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  box-shadow: var(--soft-shadow);
  height: 100%;
}
.feature-box .icon {
  color: var(--primary-color);
  font-size: 24px;
  background: rgba(14,165,233,0.1); /* Uses primary color opacity roughly */
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

/* How It Works Timeline */
.how-it-works-timeline {
  position: relative;
  padding-left: 30px;
}
.how-it-works-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0,0,0,0.1);
  border-style: dashed;
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-icon {
  position: absolute;
  left: -41px;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: 10px;
}

/* Partners Logo Strip */
.partner-logo-box {
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--border-radius-sm);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background: #fff;
}
.partner-logo-box img {
  max-width: 100%;
  max-height: 100%;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
}
.partner-logo-box:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Client Marquee */
.client-marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #fff;
  padding: 10px 0;
  display: flex;
}
.client-marquee-track {
  display: flex;
  width: max-content;
  animation: scroll-marquee 25s linear infinite;
}
.client-marquee-track:hover {
  animation-play-state: paused;
}
.client-marquee-group {
  display: flex;
  align-items: center;
  width: max-content;
}
.client-logo-item {
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.client-logo-item img {
  height: 50px;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.6);
  transition: var(--transition);
}
.client-logo-item img:hover {
  filter: grayscale(0%) opacity(1);
}

@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .hero-section {
    padding-top: 100px;
    padding-bottom: 60px;
    text-align: center;
  }
  .hero-title {
    font-size: 2.3rem;
  }
  .hero-subtitle {
    margin: 0 auto 30px auto;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-content .d-flex {
    justify-content: center;
  }
  .hero-calc-card {
    margin-top: 30px;
  }
  .solutions-overlap-wrapper {
    margin-top: -30px;
  }
  .stats-ribbon {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem !important;
  }
  .stats-ribbon .border-end-lg {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 20px;
  }
  .hero-video-element {
    object-fit: cover;
    object-position: center center;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding-top: 85px;
    padding-bottom: 40px;
    min-height: auto !important;
  }
  .hero-title {
    font-size: 1.85rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 25px;
  }
  .hero-video-element {
    object-fit: cover;
    object-position: center top;
  }
  .hero-yt-iframe {
    width: 250vw;
    height: 100%;
    min-width: 250vw;
  }
}

/* Footer & CTA High-Contrast Visibility */
.site-footer {
  background: linear-gradient(135deg, #0b192c 0%, #0f172a 100%) !important;
  color: #f8fafc !important;
  padding: 70px 0 35px !important;
  border-top: 1px solid rgba(244, 180, 0, 0.25) !important;
}

.site-footer h5 {
  color: #F4B400 !important;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.5px;
}

.site-footer p {
  color: #cbd5e1 !important;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #e2e8f0 !important; /* High contrast bright white-gray */
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.footer-links a:hover {
  color: #F4B400 !important; /* Bright Gold hover */
  padding-left: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 25px;
  margin-top: 45px;
  color: #cbd5e1 !important;
}

.footer-bottom a {
  color: #F4B400 !important;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #F4B400 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #F4B400;
  color: #0b192c !important;
  transform: translateY(-3px);
}

/* Global Page Header Title High-Contrast Visibility */
.page-header {
  position: relative;
  background: linear-gradient(135deg, #0b192c 0%, #1e293b 100%) !important;
  color: #ffffff !important;
  padding: 160px 0 75px !important;
  text-align: center;
  border-bottom: 3px solid #F4B400 !important;
}

.page-header h1, 
.page-header .h1, 
.page-header h2 {
  color: #F4B400 !important; /* Bright Golden Yellow */
  font-weight: 800 !important;
  font-size: 3rem !important;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.9), 0 2px 5px rgba(0, 0, 0, 0.9) !important;
  margin-bottom: 15px !important;
  letter-spacing: 0.5px;
}

.page-header p,
.page-header .lead {
  color: #f8fafc !important;
  opacity: 0.95 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9) !important;
  font-size: 1.15rem !important;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  color: #cbd5e1 !important;
  font-weight: 500;
}

.page-header .breadcrumb-item.active {
  color: #F4B400 !important;
  font-weight: 700;
}
