/* ===========================================================
   Halosun — Feature additions: Impact Counter + Language Toggle
   Now pulls colors/type/radius from the shared tokens in styles.css
   (--ink, --ink-soft, --sun, --ember, --line-dark, --font-display,
   --font-mono, --radius) so this section matches the rest of the site.
   =========================================================== */

/* ---------- Language toggle (sits in header) ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  opacity: 0.55;
  transition: all 0.2s ease;
}
.lang-toggle button.active {
  background: var(--ink);
  color: var(--sun);
  opacity: 1;
}
.lang-toggle button:hover:not(.active) {
  opacity: 0.85;
}

/* ---------- Nav highlight (PM Surya Ghar link) ----------
   A small pulsing dot + bolder ember color to draw the eye to the
   PM Surya Ghar link without it looking like a generic "active" state.
   Applied via class="nav-highlight" on the <a> in the header nav. */
.main-nav a.nav-highlight {
  position: relative;
  color: var(--ember);
  font-weight: 700;
}
.main-nav a.nav-highlight:hover {
  color: var(--ember);
}
.main-nav a.nav-highlight::after {
  content: '';
  position: absolute;
  top: -1px;
  right: -9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  animation: navHighlightPulse 1.8s ease-in-out infinite;
}
@keyframes navHighlightPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .main-nav a.nav-highlight::after { animation: none; }
}

/* ---------- Impact counter section ---------- */
/* Section itself: markup carries class="section section-dark impact-section"
   so the eyebrow/h2/p colors come for free from the shared .section-dark rules. */
.impact-section {
  background-image: radial-gradient(circle at 20% 20%, rgba(217, 169, 78, 0.07), transparent 55%);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .impact-grid { grid-template-columns: 1fr; }
}

/* Same recipe as .myth-card elsewhere on the site, for a consistent
   "dark section card" look across pages. */
.impact-stat {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.impact-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 169, 78, 0.4);
}

/* Icon badge: mirrors the circular treatment used on the footer's
   social-link icons, tinted gold instead of neutral. */
.impact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(217, 169, 78, 0.1);
  border: 1px solid rgba(217, 169, 78, 0.3);
  color: var(--sun);
  flex: none;
}
.impact-icon svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
}

.impact-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  background: linear-gradient(90deg, var(--ember), var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.impact-unit {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--sun);
  margin-left: 2px;
}
.impact-label {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}
.impact-note {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- EMI panel (inside calculator results) ---------- */
.emi-panel {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(217, 169, 78, 0.05);
}
.emi-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 14px 0;
}
.emi-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .emi-inputs { grid-template-columns: 1fr; }
}
.emi-field span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 32, 56, 0.65);
}
.emi-output {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.emi-vs-bill strong {
  color: rgba(15, 32, 56, 0.55);
  font-weight: 500;
  text-decoration: line-through;
}

/* ---------- Deadline countdown banner (PM Surya Ghar subsidy window) ----------
   A slim full-width strip with a live day/hour/min/sec countdown.
   Markup: a wrapper with data-countdown="<ISO date>" containing
   .deadline-text and .deadline-timer > four .deadline-unit blocks
   with [data-unit="days|hours|minutes|seconds"] spans — js/countdown.js
   finds these via data-countdown and updates them every second.
   Used on index.html and pm-suryaghar.html, right below the header. */
.deadline-banner {
  background: linear-gradient(90deg, var(--ink), var(--ink-soft));
  border-bottom: 1px solid rgba(217, 169, 78, 0.25);
  padding: 12px 0;
}
.deadline-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.deadline-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}
.deadline-text .deadline-icon {
  color: var(--sun);
}
.deadline-timer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.deadline-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 4px 8px;
  background: rgba(217, 169, 78, 0.1);
  border: 1px solid rgba(217, 169, 78, 0.3);
  border-radius: 8px;
}
.deadline-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sun);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.deadline-unit-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}
.deadline-colon {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 0.95rem;
}
.deadline-banner.deadline-ended .deadline-timer,
.deadline-banner.deadline-ended .deadline-colon {
  display: none;
}
.deadline-closed-msg {
  display: none;
}
.deadline-banner.deadline-ended .deadline-closed-msg {
  display: inline;
  color: var(--ember);
  font-weight: 700;
}
@media (max-width: 640px) {
  .deadline-banner .wrap { flex-direction: column; gap: 8px; }
  .deadline-unit { min-width: 38px; padding: 3px 6px; }
  .deadline-num { font-size: 0.92rem; }
}
