/* ---------- Solar Calculator page (same background treatment as the contact page) ---------- */
.sc-body {
  background: #0f1946;
}

.sc-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1946 url('../pm-surya-ghar/pm-surya-ghar-bg.jpg') center/cover no-repeat;
  background-attachment: fixed;
  padding: 104px 40px 40px;
  margin-top: -74px;
}

.sc-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,18,55,0.55) 0%, rgba(10,18,55,0.75) 100%);
  z-index: 0;
}

/* ---------- Big glass card ---------- */
.sc-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 34px 30px;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: 'Noto Sans Devanagari', var(--font-ui), sans-serif;
  transition: max-width 0.3s ease;
}

.sc-card.sc-wide {
  max-width: 560px;
}

/* ---------- Back button + step indicator ---------- */
.sc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sc-nav[hidden] { display: none; }

.sc-back {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sc-back:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.5);
}

.sc-stepno {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* ---------- Steps (fade between them) ---------- */
.sc-step {
  text-align: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sc-step[hidden] { display: none; }

.sc-step.sc-fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.sc-title {
  font-size: clamp(21px, 3.4vw, 26px);
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}

.sc-title-lg {
  font-size: clamp(34px, 5vw, 46px);
}

.sc-sub {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
}

/* ---------- Welcome step: video (left) + text ---------- */
.sc-welcome-row {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.sc-video-wrap {
  position: relative;
  flex: 0 0 130px;
  width: 130px;
}

/* The real <video> stays on the page (it plays the sound) but is invisible.
   The canvas on top shows the same frames with the white background removed. */
.sc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.sc-video-canvas {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
}

/* Fallback if the browser blocks canvas: show the plain video */
.sc-video-wrap.no-key .sc-video {
  position: static;
  height: auto;
  opacity: 1;
}

.sc-video-wrap.no-key .sc-video-canvas {
  display: none;
}

.sc-video-unmute {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  background: rgba(10,18,55,0.7);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.sc-video-unmute:hover {
  background: rgba(10,18,55,0.9);
}

.sc-video-wrap.is-muted .sc-video-unmute {
  display: inline-flex;
}

/* Never show the button unless the video is actually muted */
.sc-video-wrap:not(.is-muted) .sc-video-unmute {
  display: none;
}

.sc-welcome-text {
  flex: 1;
  min-width: 0;
}

.sc-welcome-text .sc-title-lg {
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.3;
}

@media (max-width: 520px) {
  .sc-welcome-row {
    flex-direction: column;
    text-align: center;
  }

  .sc-video-wrap {
    flex-basis: auto;
    width: 150px;
  }
}

/* ---------- Step heading with a small video on the left ---------- */
.sc-head-row {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.sc-head-row .sc-title {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.sc-video-wrap-sm {
  flex: 0 0 90px;
  width: 90px;
}

.sc-video-wrap-sm .sc-video-unmute {
  bottom: 4px;
  padding: 5px 7px;
}

.sc-video-wrap-sm .sc-video-unmute span {
  display: none;
}

@media (max-width: 520px) {
  .sc-video-wrap-sm {
    flex-basis: 72px;
    width: 72px;
  }
}

/* ---------- Language picker ---------- */
.sc-lang-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sc-lang-grid .sc-btn {
  margin-top: 0;
}

/* Hide a video box if its file is missing */
.sc-video-wrap.no-video {
  display: none;
}

/* ---------- Buttons ---------- */
.sc-btn {
  margin-top: 26px;
  width: 100%;
  padding: 15px 24px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
}

.sc-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.6);
}

.sc-btn:active:not(:disabled) { transform: translateY(0); }
.sc-btn:disabled { cursor: not-allowed; opacity: 0.45; }

.sc-btn-wa {
  background: #25d366;
  border-color: #25d366;
  color: #08210f;
}

.sc-btn-wa:hover:not(:disabled) {
  background: #3ee37b;
  border-color: #3ee37b;
}

/* ---------- Form + glass field boxes ---------- */
.sc-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.sc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.sc-field:focus-within {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.45);
}

.sc-field.invalid {
  border-color: #ff6b6b;
  background: rgba(255,107,107,0.08);
}

.sc-label {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.sc-req { color: #ff9b9b; }

.sc-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  transition: all 0.2s ease;
}

.sc-input::placeholder { color: rgba(255,255,255,0.4); }

.sc-input:focus {
  outline: none;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
}

.sc-error {
  font-size: 12.5px;
  font-weight: 500;
  color: #ff9b9b;
}

.sc-error:empty { display: none; }

/* Phone with +91 prefix */
.sc-phone {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.sc-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

/* Native selects styled for the dark glass look */
.sc-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.sc-select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.sc-select option {
  background: #121c4c;
  color: #fff;
}

/* ---------- Sliders ---------- */
.sc-slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sc-slider-value {
  font-size: 20px;
  font-weight: 700;
  color: #ffc65a;
  white-space: nowrap;
}

.sc-field.is-untouched .sc-slider-value {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
}

.sc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 12px 0 4px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg,
    #ffb84d 0%, #ffb84d var(--pct, 0%),
    rgba(255,255,255,0.22) var(--pct, 0%), rgba(255,255,255,0.22) 100%);
}

.sc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ffb84d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
}

.sc-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ffb84d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
}

.sc-range::-moz-range-track {
  background: transparent;
}

.sc-field.is-untouched .sc-range::-webkit-slider-thumb { border-color: rgba(255,255,255,0.5); }
.sc-field.is-untouched .sc-range::-moz-range-thumb { border-color: rgba(255,255,255,0.5); }

.sc-range:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,198,90,0.35);
}

.sc-marks {
  position: relative;
  height: 18px;
  margin: 0 11px;
}

.sc-marks span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}

.sc-hint {
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
}

.sc-hint[hidden] { display: none; }

/* ---------- Loading screen ---------- */
.sc-loader {
  display: flex;
  justify-content: center;
  margin: 14px 0 22px;
}

.sc-sun {
  animation: sc-spin 2.4s linear infinite;
  filter: drop-shadow(0 0 14px rgba(255,198,90,0.55));
}

@keyframes sc-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Results ---------- */
.sc-results {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.sc-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
}

.sc-stat-label {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
}

.sc-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: right;
  white-space: nowrap;
}

.sc-stat-text { color: #7dffa9; }

.sc-stat-hero {
  background: rgba(255,198,90,0.12);
  border-color: rgba(255,198,90,0.5);
}

.sc-stat-hero .sc-stat-value {
  font-size: 22px;
  color: #ffc65a;
}

.sc-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sc-section {
    padding: 120px 24px 40px;
    background-attachment: scroll;
  }
}

@media (max-width: 520px) {
  .sc-input { font-size: 16px; }
  .sc-section { padding: 110px 16px 40px; }
  .sc-card { padding: 26px 18px; }
  .sc-stat { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sc-stat-value { text-align: left; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-step,
  .sc-btn,
  .sc-card { transition: none; }
  .sc-sun { animation: none; }
}