/* SalaryWiseCalc - Clean, minimal, premium */
:root {
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-accent: #0d9488;
  --color-accent-hover: #0f766e;
  --color-border: #e2e8f0;
  --color-results-bg: #f8fafc;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

/* Main content */
main {
  flex: 1;
  padding: 1.5rem 1.25rem 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Hero calculator (homepage) */
.hero-calculator {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem 1.5rem;
}

.hero-calculator h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* Calculator card (other pages) */
.calculator-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.calculator-card h1,
.calculator-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.calculator-card .subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Form elements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* Results */
.results-box {
  margin-top: 1.25rem;
  padding: 1.25rem 1rem;
  background: var(--color-results-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.results-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.results-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.result-item:first-child {
  padding-top: 0;
}

.result-item .label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.result-item .value {
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.result-item.highlight {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.result-item.highlight .value {
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

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

.footer-legal {
  margin-bottom: 0.5rem;
}

.footer-legal a {
  font-size: 0.8rem;
}

.site-footer .copyright {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.legal-content h2 {
  margin-top: 1.25rem;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

/* Page intro (subpages) */
.page-intro {
  margin-bottom: 1.25rem;
}

.page-intro h1 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-intro p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* SEO content section (subpages) */
.page-content {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-text);
}

.page-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.page-content p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.page-content a {
  color: var(--color-accent);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

/* Related Calculations - below results, compact navigation */
.related-calculations {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.related-calculations h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related-calculations ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.related-calculations li {
  margin: 0;
}

.related-calculations a {
  font-size: 0.9rem;
  color: var(--color-accent);
  text-decoration: none;
}

.related-calculations a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .related-calculations ul {
    flex-direction: column;
    gap: 0.35rem;
  }
}

/* Internal links block */
.internal-links {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--color-results-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.internal-links p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.internal-links ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.internal-links li {
  margin-bottom: 0.25rem;
}

.internal-links a {
  color: var(--color-accent);
  text-decoration: none;
}

.internal-links a:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* FAQ section */
.faq-section {
  margin-top: 1.5rem;
}

.faq-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

.faq-item {
  margin-bottom: 1rem;
}

.faq-item h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--color-text);
}

.faq-item p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* Salary highlight (landing pages) */
.salary-highlight {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-results-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.salary-highlight .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Ad slots - reserve space, avoid layout shift, clean & non-intrusive */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.25rem 0;
  min-height: 90px;
  overflow: hidden;
}

.ad-slot ins {
  display: block;
  min-width: 320px;
  max-width: 100%;
}

/* Compact ad between calculator inputs and results */
.ad-slot-in-calculator {
  margin: 1rem 0;
  min-height: 50px;
}

/* Ad at end of page - subtle spacing */
.ad-slot-end {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Mobile: smaller reserve height, prevent overflow */
@media (max-width: 480px) {
  .ad-slot {
    min-height: 50px;
    margin: 1rem 0;
  }

  .ad-slot-in-calculator {
    min-height: 50px;
    margin: 0.75rem 0;
  }

  .ad-slot ins {
    min-width: 280px;
    width: 100%;
  }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
