/* 
  SolarCalculators.in - Premium Design System (Refreshed 2026)
  Theme: Modern SaaS, Financial Trust, Clean
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary-color: #00D084;
  /* Vibrant Green */
  --primary-dark: #00965E;
  --primary-light: rgba(0, 208, 132, 0.1);
  --secondary-color: #0070F3;
  /* Modern Blue */
  --accent-color: #FFB300;

  /* Neutral Colors */
  --bg-body: #F8FAFC;
  /* Slate-50 - Lighter, cleaner background */
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  /* Slate-900 - Sharp dark text */
  --text-muted: #64748B;
  /* Slate-500 - Soft secondary text */
  --border-color: #E2E8F0;
  /* Slate-200 - Subtle borders */

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 16px;

  /* Layout */
  --container-width: 1200px;
  --header-height: 72px;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
.logo,
.metric-value,
.btn {
  font-family: var(--font-heading);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.text-success {
  color: var(--primary-dark);
}

.text-danger {
  color: #E02020;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 208, 132, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 208, 132, 0.35);
  background: #00b074;
}

.btn-secondary,
.btn-outline-primary {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
}


/* Header */
.main-header {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

.lang-switch .lang-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-left: 8px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.lang-switch .lang-btn.active {
  background: var(--text-main);
  color: white;
  border-color: var(--text-main);
}

/* Grid System */
.grid {
  display: grid;
  gap: 32px;
  /* Increased gap for cleaner look */
}

/* Calculator Grid - Homepage */
.calc-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

/* Single column mobile */
.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on tablet */
  }

  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Custom Split for Calculators (Left Form smaller, Right Result larger) */
  .grid-calc {
    grid-template-columns: 350px 1fr;
    align-items: start;
    gap: 32px;
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on desktop */
  }

  .calc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Homepage Hero */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-section h1 {
  font-size: 3.5rem;
  color: var(--text-main);
  margin-bottom: 24px;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.hero-section p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* Base Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Calculator Selection Cards (Homepage) - PREMIUM UPDATE */
.calc-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  /* More padding */
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.calc-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
  /* Better lift */
}

/* Colored accent line on hover */
.calc-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.calc-card:hover::after {
  transform: scaleX(1);
}

.calc-icon {
  font-size: 2rem;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #F1F5F9;
  /* Subtle background */
  border-radius: 16px;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.calc-card:hover .calc-icon {
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: scale(1.1) rotate(3deg);
}

.calc-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.calc-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Calculator Forms */
.calculator-form-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background-color: #fff;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.form-control:hover {
  border-color: #CBD5E1;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* Metrics */
.metric-card {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-card.highlight {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border-color: #BAE6FD;
}

.metric-card.success {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border-color: #BBF7D0;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.metric-value {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-main);
}

/* FAQ */
.faq-section {
  margin-top: 60px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-main);
}

.faq-answer {
  display: none;
  margin-top: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Footer */
footer {
  background: var(--text-main);
  color: white;
  padding: 80px 0 40px;
  margin-top: 120px;
}

.footer-links a {
  color: #94A3B8;
  margin-bottom: 12px;
  display: block;
}

.footer-links a:hover {
  color: white;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* --- Homepage Redesign (Features & FAQ) --- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px
}

@media(min-width:768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(min-width:1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr)
  }
}

.feature-card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-color)
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background: #F0FDF4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem
}

.feature-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-main)
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5
}

.faq-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px
}

.faq-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s
}

.faq-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02)
}

.faq-card[open] {
  background: #FAFAFA
}

.faq-summary {
  padding: 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none
}

.faq-summary::-webkit-details-marker {
  display: none
}

.faq-summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted)
}

.faq-card[open] .faq-summary::after {
  content: '\2212'
}

.faq-content {
  padding: 0 20px 20px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid transparent
}

.faq-card[open] .faq-content {
  border-top-color: #eee;
  padding-top: 16px
}

/* Modern Detail Cards (Centralized) */
.details-card-modern {
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 24px
}

.details-header-modern {
  background: linear-gradient(to right, #f8fafc, #fff);
  padding: 20px 24px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px
}

.detail-row-modern {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.2s
}

.detail-row-modern:hover {
  background: #f8fafc
}

.detail-row-modern:last-child {
  border-bottom: none
}

.detail-label-modern {
  font-weight: 500;
  color: #64748b;
  font-size: 0.95rem
}

.detail-value-modern {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  font-size: 1rem
}