/* =====================================================
   Calculator Pro — styles.css
   Modern SaaS-style Equipment Lease Calculator
   ===================================================== */

/* ── CSS Variables (Light Theme) ── */
:root {
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-input: #F1F5F9;
  --bg-hover: #E2E8F0;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --primary: #2563EB;
  --primary-light: #DBEAFE;
  --primary-dark: #1D4ED8;
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --amber: #F59E0B;
  --amber-light: #FEF3C7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --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);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-input: #334155;
  --bg-hover: #475569;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #334155;
  --border-light: #1E293B;
  --primary-light: #1E3A5F;
  --green-light: #1A3A2A;
  --red-light: #3A1A1A;
  --amber-light: #3A2A1A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

img { max-width: 100%; display: block; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 8px 18px;
}
.btn-outline:hover {
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-input);
  color: var(--text);
}

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-full { width: 100%; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(15,23,42,0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  transition: transform var(--transition), filter var(--transition);
}

.logo:hover img {
  transform: scale(1.08) rotate(-3deg);
  filter: brightness(1.1);
}

.brand-highlight { color: var(--primary); }

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}

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

.lang-flag { font-size: 16px; line-height: 1; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 100;
}

.lang-dropdown.open { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
  text-align: left;
}

.lang-option:hover { background: var(--bg-input); }
.lang-option.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ── Currency Switcher (Inline in Input Fields) ── */
.currency-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 8px 0 12px;
  border: none;
  border-right: 1px solid var(--border);
  background: var(--bg-input);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius) 0 0 var(--radius);
  transition: all 0.2s;
  min-width: 42px;
  justify-content: center;
}

.currency-btn-inline:hover {
  background: #e2e8f0;
  color: var(--primary);
}

.currency-btn-inline svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.currency-btn-inline:hover svg {
  opacity: 1;
}

.currency-symbol {
  font-variant-numeric: tabular-nums;
}

/* Shared dropdown: JS positions with position:fixed */
.currency-dropdown-inline {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 9999;
}

.currency-dropdown-inline.open { display: block; }

.currency-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
  text-align: left;
}

.currency-option:hover { background: var(--bg-input); }
.currency-option.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.curr-symbol { font-weight: 700; min-width: 28px; text-align: center; font-size: 15px; }
.currency-option small { color: var(--text-secondary); font-size: 12px; margin-left: auto; }

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── Mobile Menu ── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ── */
.hero-section {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.title-highlight {
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.hero-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.hero-stat span {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Hero Visual ── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card-preview {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
}

.preview-chart {
  margin-bottom: 20px;
}

.preview-chart svg {
  width: 100%;
  height: auto;
}

.preview-kpi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.preview-kpi span {
  font-size: 13px;
  color: var(--text-secondary);
}

.preview-kpi strong {
  font-size: 18px;
  font-weight: 700;
}

.text-green { color: var(--green); }

/* ── Intro Section (SEO Content) ── */
.intro-section {
  padding: 80px 0;
  background: var(--bg-card);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
}

.intro-text h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.intro-text p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.intro-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.feature-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Calculator Section ── */
.calculator-section {
  padding: 80px 0;
}

.calc-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Form Card ── */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 20px 24px;
}

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

.form-group-full { grid-column: 1 / -1; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.required { color: var(--red); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 12px; }

.input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
  background: var(--bg-card);
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-prefix, .input-suffix {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  height: 42px;
  display: flex;
  align-items: center;
}

.input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  height: 42px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.input-wrap input::placeholder { color: var(--text-muted); }

.form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
}

/* ── Results Area ── */
.calc-results-wrap {
  min-height: 400px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  min-height: 400px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  margin-bottom: 24px;
  color: var(--primary);
}

.empty-state h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 360px;
  margin-bottom: 24px;
}

.empty-hints {
  display: flex;
  gap: 20px;
}

.empty-hints span {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

/* ── Dashboard Prompt (shown before first calculation) ── */
.dash-prompt {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}
.dash-prompt p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Disabled Action Buttons ── */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ── Dashboard ── */
.dashboard {
  animation: fadeIn 0.4s ease;
}

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

/* ── Recommendation Banner ── */
.recommendation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--green-light), var(--primary-light));
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 1px solid var(--green);
}

.rec-badge {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
}

.rec-savings {
  font-size: 14px;
  color: var(--text-secondary);
}

.rec-savings strong { color: var(--green); font-weight: 700; }

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--text-muted);
  opacity: 0.3;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.kpi-lease { border-left: 4px solid var(--primary); }
.kpi-buy { border-left: 4px solid var(--green); }
.kpi-interest { border-left: 4px solid var(--amber); }
.kpi-savings { border-left: 4px solid #8B5CF6; }

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Comparison Table ── */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.table-scroll { overflow-x: auto; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.comparison-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.th-lease { color: var(--primary) !important; }
.th-buy { color: var(--green) !important; }

.comparison-table tr:last-child td { border-bottom: none; }

/* ── Analysis Cards ── */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.analysis-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.analysis-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.analysis-list {
  list-style: none;
  padding: 0;
}

.analysis-list li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.analysis-list li:last-child { border-bottom: none; }
.analysis-list li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Result Actions ── */
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Saved Records ── */
.saved-section {
  padding: 40px 0;
  background: var(--bg);
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.saved-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.saved-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.saved-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.saved-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Industries Section (SEO Content) ── */
.industries-section {
  padding: 80px 0;
  background: var(--bg);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.industry-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

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

.industry-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.industry-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.industry-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.industry-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

.industry-link:hover {
  color: var(--primary-dark);
}

/* ── Benefits Section ── */
.benefits-section {
  padding: 80px 0;
  background: var(--bg-card);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
  background: var(--bg);
}

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

.benefit-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.benefit-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── FAQ Section ── */
.faq-section {
  padding: 80px 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.faq-q:hover { background: var(--bg-input); }

.faq-arrow {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
  max-height: 400px;
}

.faq-a p {
  padding: 0 24px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-a code {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--primary);
}

/* ── Lead Section ── */
.lead-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  color: #fff;
}

.lead-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  align-items: center;
}

.lead-text h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.lead-text p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.lead-features {
  list-style: none;
  padding: 0;
}

.lead-features li {
  padding: 8px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
}

.lead-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text);
}

.lead-form-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.lead-form-card .form-group {
  margin-bottom: 16px;
}

.lead-form-card .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}

.lead-form-card .form-group input {
  width: 100%;
  padding: 0 12px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.lead-form-card .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.lead-form-card .form-group input::placeholder {
  color: var(--text-muted);
}

.form-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ── Footer ── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 360px;
}

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

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .form-card {
    position: static;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lead-inner {
    grid-template-columns: 1fr;
  }
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-title { font-size: 32px; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }

  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .result-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 26px; }
  .section-header h2 { font-size: 24px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── Print Styles ── */
@media print {
  .site-header, .hero-section, .benefits-section,
  .faq-section, .lead-section, .site-footer,
  .form-actions, .result-actions, .theme-toggle,
  .lang-switcher, .currency-switcher, .currency-dropdown-inline, .mobile-menu-btn, .dash-prompt { display: none !important; }
  .currency-btn-inline svg { display: none !important; }

  .dashboard { display: block !important; }
  .calc-results-wrap { width: 100% !important; }
}

/* ── Calculator Section (for individual calculator pages) ── */
.calc-section {
  padding: 60px 0 80px;
  background: var(--bg);
}

/* ── Calculator Grid (single column: form + results) ── */
.calc-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 60px;
}

/* ── Calculator Grid 2 (two-column: form left, results right) ── */
.calc-grid-2 {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Calculator Form Card ── */
.calc-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.calc-form-card .form-card {
  box-shadow: none;
  border: none;
}

/* ── Input Row (input + select side by side) ── */
.input-row {
  display: flex;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
  background: var(--bg-card);
}

.input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 12px;
  height: 42px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.input-row select {
  border: none;
  border-left: 2px solid var(--border);
  outline: none;
  padding: 0 12px;
  height: 42px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg-input);
  cursor: pointer;
  min-width: 100px;
}

/* ── Country Bar & Selector ── */
.country-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
}

.country-bar label {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.country-select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.country-select:focus {
  border-color: var(--primary);
}

/* ── Country-Specific Fields ── */
.country-fields {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-input);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.country-fields h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.country-fields .form-group {
  margin-bottom: 0;
}

.country-fields label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.country-fields input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ── Hidden Until Calc ── */
.hidden-until-calc {
  display: none !important;
}

.tax-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
}

/* ── Chart Section ── */
.chart-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.chart-canvas {
  width: 100% !important;
  height: 300px !important;
}

.show-after-calc {
  display: block !important;
}

/* ── All Calculators Section ── */
.all-calc-section {
  padding: 60px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

.all-calc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.all-calc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}

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

.all-calc-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.all-calc-icon {
  font-size: 28px;
}

/* ── Skip Link (Accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

/* ── Back to Top ── */
.back-to-top {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.back-to-top:hover {
  color: var(--primary);
}

/* ── Simple Hero (for individual calculator pages) ── */
.hero-section[role="main"] {
  padding: 100px 0 40px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
}

.hero-section[role="main"] .hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ── Responsive for new classes ── */
@media (max-width: 1024px) {
  .calc-grid-2 {
    grid-template-columns: 1fr;
  }
  .all-calc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .all-calc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .all-calc-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Amortization Table ── */
.amort-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.amort-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.amort-table th {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 10px 16px;
  text-align: right;
  white-space: nowrap;
}

.amort-table th:first-child {
  text-align: center;
}

.amort-table td {
  padding: 8px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.amort-table td:first-child {
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
}

.amort-table tbody tr:hover {
  background: var(--bg-card);
}

.amort-table .skip-row td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Print Styles ── */
@media print {
  .site-header, .hero-section,
  .benefits-section,
  .faq-section, .lead-section, .site-footer,
  .form-actions, .result-actions, .theme-toggle,
  .lang-switcher, .currency-switcher, .currency-dropdown-inline, .mobile-menu-btn, .dash-prompt { display: none !important; }
  .currency-btn-inline svg { display: none !important; }

  .dashboard { display: block !important; }
  .calc-results-wrap { width: 100% !important; }
}
