/* ============================================================
   Solar Fusion Power — style.css
   Premium Design System | Mobile-First | Fully Responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@700;800;900&display=swap');

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --primary:     #FF6B00;
  --primary-dark:#e05e00;
  --secondary:   #1A3C5E;
  --accent:      #FFD700;
  --bg-light:    #F8F9FA;
  --bg-dark:     #0D1B2A;
  --text-dark:   #1A1A1A;
  --text-light:  #FFFFFF;
  --text-muted:  #6B7280;
  --success:     #10B981;
  --nav-h:       72px;
  --radius-xl:   1.25rem;
  --radius-2xl:  1.75rem;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body, html {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
  /* NO fixed padding-bottom — handled per breakpoint */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ─── Typography Utilities ──────────────────────────────── */
.text-primary   { color: var(--primary); }
.bg-primary     { background-color: var(--primary); }
.text-secondary { color: var(--secondary); }
.bg-secondary   { background-color: var(--secondary); }
.bg-dark        { background-color: var(--bg-dark); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary {
  background-color: var(--primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 1.75rem;
  border-radius: 0.6rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.35);
}

.btn-outline {
  border: 2px solid white;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 1.75rem;
  border-radius: 0.6rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.btn-outline:hover {
  background-color: white;
  color: var(--text-dark);
  transform: translateY(-2px);
}

/* ─── Navbar ────────────────────────────────────────────── */
#main-nav {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
  z-index: 9999;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
  padding-bottom: 2px;
  font-size: 0.875rem;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Hamburger animated */
#mobile-menu-btn.menu-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#mobile-menu-btn.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#mobile-menu-btn.menu-open .hamburger-line:nth-child(3) {
  width: 1.5rem;
  transform: translateY(-8px) rotate(-45deg);
}
.hamburger-line { transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6); }

/* Mobile menu slide animation */
.mobile-menu-panel {
  transform-origin: top center;
}
.mobile-menu-panel.opening {
  animation: menuSlideDown 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mobile-menu-panel.closing {
  animation: menuSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes menuSlideUp {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-16px); }
}

/* ─── Hero Overlay ──────────────────────────────────────── */
.hero-overlay {
  background: linear-gradient(to right, rgba(13,27,42,0.92) 0%, rgba(13,27,42,0.45) 60%, rgba(13,27,42,0.15) 100%);
}

/* ─── Glassmorphism ─────────────────────────────────────── */
.glass-effect {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ─── Gradient Text ─────────────────────────────────────── */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* ─── Keyframe Animations ───────────────────────────────── */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
.animate-float { animation: float 7s ease-in-out infinite; }

@keyframes pulse-glow {
  0%   { box-shadow: 0 0 0 0   rgba(255,107,0,0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,107,0,0); }
}
.btn-glow { animation: pulse-glow 2.2s infinite; }

@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

@keyframes solar-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.solar-spin-once:hover { animation: solar-spin 0.7s ease forwards; }

/* Shine sweep on hover */
.img-shine { position: relative; overflow: hidden; }
.img-shine::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.28) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
  z-index: 10; pointer-events: none;
}
.img-shine:hover::before { left: 125%; }

/* Hover underline text */
.hover-underline { position: relative; display: inline-block; }
.hover-underline::after {
  content: '';
  position: absolute;
  width: 100%; transform: scaleX(0);
  height: 2px; bottom: -4px; left: 0;
  background-color: var(--primary);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}
.hover-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ─── Cards ─────────────────────────────────────────────── */
.hover-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.4s ease;
}
.hover-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.15), 0 15px 20px -5px rgba(0,0,0,0.08);
}

/* ─── WhatsApp Float ────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 20px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 30px rgba(37,211,102,0.55);
}

/* ─── Back to Top ───────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 94px; right: 20px;
  background: var(--secondary);
  color: white;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
#back-to-top.show { opacity: 1; visibility: visible; }
#back-to-top:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,107,0,0.35);
}

/* ─── Cookie Banner ─────────────────────────────────────── */
#cookie-notice {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 9998;
  background: rgba(13,27,42,0.97);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--primary);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: white;
  font-size: 0.875rem;
}
#cookie-notice.hidden { display: none; }

/* ─── Step Line (How It Works) ──────────────────────────── */
.step-line { position: relative; }
.step-line::before {
  content: '';
  position: absolute;
  top: 48px; left: 50px; right: -50px;
  height: 2px;
  background: var(--primary);
  z-index: 0;
  opacity: 0.25;
}

/* ─── Range Input Styling ───────────────────────────────── */
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 22px; width: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  margin-top: -9px;
  box-shadow: 0 0 12px rgba(255,107,0,0.45);
  border: 2px solid white;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%; height: 4px;
  cursor: pointer;
  background: #E5E7EB;
  border-radius: 2px;
}
input[type=range]:focus::-webkit-slider-runnable-track { background: #d1d5db; }

/* ─── Section Reveal Animation ──────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Footer — no gap fix ───────────────────────────────── */
footer.sfp-footer {
  background-color: #111827;
  color: white;
  padding-top: 5rem;
  padding-bottom: 2.5rem;
  border-top: 4px solid var(--primary);
  /* Ensure footer is always last & flush */
  position: relative;
  z-index: 1;
}

/* ─── Responsive: Tablet ────────────────────────────────── */
@media (max-width: 1024px) {
  .step-line::before { display: none; }
}

/* ─── Responsive: Mobile ────────────────────────────────── */
@media (max-width: 768px) {

  /* Body: no global padding-bottom here – individual pages with mobile bar will set it */
  body { overflow-x: hidden; }

  /* Nav: always solid on mobile to avoid invisible text on transparent bg */
  #main-nav {
    background-color: rgba(13,27,42,0.98) !important;
    backdrop-filter: blur(16px);
    color: white !important;
  }

  /* WhatsApp & Back-to-top – keep clear of potential bottom bars */
  .whatsapp-float { bottom: 80px; right: 14px; width: 52px; height: 52px; font-size: 24px; }
  #back-to-top    { bottom: 142px; right: 14px; }

  /* Footer responsive column stacking already handled by Tailwind grid */
  footer.sfp-footer { padding-top: 3rem; padding-bottom: 5rem; }
  /* Extra bottom padding so footer content not hidden behind mobile bottom bar */

  /* Hero text size */
  .hero-title { font-size: 2.25rem !important; line-height: 1.15 !important; }

  /* Make section paddings mobile-friendly */
  section { padding-top: 3.5rem; padding-bottom: 3.5rem; }

  /* Cards in 1-col on mobile */
  .grid-cols-2-mobile { grid-template-columns: 1fr !important; }

  /* Stack calculator two-col to single */
  .calc-grid { flex-direction: column !important; }
}

@media (max-width: 480px) {
  .btn-primary, .btn-outline {
    padding: 0.7rem 1.25rem;
    font-size: 0.8rem;
  }
  .whatsapp-float { right: 10px; }
  #back-to-top    { right: 10px; }
}

/* ─── Mobile Bottom Bar (optional – only when added) ───── */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 1000;
  height: 60px;
}
@media (max-width: 768px) {
  .mobile-bottom-bar { display: flex; }
  .has-mobile-bar    { padding-bottom: 60px; }
}

/* ─── Premium Micro-interactions ───────────────────────── */
.feature-icon-wrap {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s ease;
}
.group:hover .feature-icon-wrap {
  transform: scale(1.15) rotate(-5deg);
}

/* Animated border gradient */
.border-gradient {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.border-gradient::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.border-gradient:hover::after { opacity: 1; }

/* ─── Skeleton Loader ───────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* ─── Floating Labels on Inputs ─────────────────────────── */
.input-focus-effect {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-focus-effect:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,107,0,0.15);
  outline: none;
}

/* ─── Scroll Progress Bar ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: 99999;
  transition: width 0.1s linear;
  width: 0%;
}
