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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 32px;
  height: 32px;
}

.logo h1 {
  font-size: 1.5rem;
  color: #2c3e50;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #4a90e2;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: #4a90e2;
  color: white;
}

.btn-primary:hover {
  background: #357abd;
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  color: #4a90e2;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: transparent;
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background: white;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #2c3e50;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  background: #f8f9fa;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

/* Calculator Section */
.calculator-section {
  padding: 4rem 0;
  background: #f8f9fa;
}

.calculator-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Adapt existing calculator styles for website */
.calculator-wrapper .tab-container {
  box-shadow: none;
}

.calculator-wrapper .calculator,
.calculator-wrapper .msa-lookup-container {
  padding: 2rem;
}

/* Match lookup button to site button styles */
.calculator-wrapper #lookup-btn.btn {
  width: auto;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .calculator-wrapper #lookup-btn.btn {
    width: 100%;
  }
}

/* Calculator UI styles (scoped) */
.calculator-wrapper h2 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 1.75rem;
}

.calculator-wrapper .calc-mode {
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.calculator-wrapper .calc-mode label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.calculator-wrapper .input-group {
  margin-bottom: 15px;
}

.calculator-wrapper label {
  display: block;
  margin-bottom: 6px;
  color: #555;
  font-size: 0.95em;
}

.calculator-wrapper input[type="text"],
.calculator-wrapper input[type="number"],
.calculator-wrapper select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}

.calculator-wrapper input[type="text"]:focus,
.calculator-wrapper input[type="number"]:focus,
.calculator-wrapper select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15);
}

.calculator-wrapper .payment-term,
.calculator-wrapper .rate-tax-group,
.calculator-wrapper .additional-costs-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {

  .calculator-wrapper .payment-term,
  .calculator-wrapper .rate-tax-group,
  .calculator-wrapper .additional-costs-group {
    grid-template-columns: 1fr;
  }
}

.calculator-wrapper .tooltip-icon {
  display: inline-block;
  margin-left: 4px;
  background-color: #ccc;
  color: white;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
}

.calculator-wrapper .buydown-section {
  margin-top: 20px;
  padding: 16px;
  background-color: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #eee;
}

.calculator-wrapper .buydown-section h3 {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  color: #333;
}

.calculator-wrapper .slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calculator-wrapper .slider-container input[type="range"] {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  outline: none;
  border-radius: 5px;
}

.calculator-wrapper .slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #4a90e2;
  border-radius: 50%;
  cursor: pointer;
}

.calculator-wrapper .slider-container input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #4a90e2;
  border-radius: 50%;
  cursor: pointer;
}

.calculator-wrapper .slider-container span {
  min-width: 48px;
  text-align: right;
  font-weight: 600;
  color: #4a90e2;
}

.calculator-wrapper .buydown-result {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
}

.calculator-wrapper .calculator button#calculate {
  width: 100%;
  padding: 12px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 10px;
}

.calculator-wrapper .calculator button#calculate:hover {
  background-color: #357abd;
}

.calculator-wrapper .results {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.calculator-wrapper .result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1.05rem;
  color: #333;
}

.calculator-wrapper .result-item:last-child {
  margin-bottom: 0;
}

/* Extension Promotion */
.extension-promo {
  padding: 4rem 0;
  background: white;
}

.extension-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.extension-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.extension-benefits {
  list-style: none;
  margin: 2rem 0;
}

.extension-benefits li {
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.screenshot {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.faq {
  padding: 4rem 0;
  background: #f8f9fa;
}

.faq h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #2c3e50;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.faq-item {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: #4a90e2;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid #34495e;
  padding-top: 1rem;
  text-align: center;
  color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .extension-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav {
    display: none;
    /* Implement mobile menu if needed */
  }

  .features h2,
  .faq h2 {
    font-size: 2rem;
  }

  .extension-text h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 2rem 0;
  }

  .features,
  .calculator-section,
  .extension-promo,
  .faq {
    padding: 2rem 0;
  }

  .calculator-wrapper .calculator,
  .calculator-wrapper .msa-lookup-container {
    padding: 1rem;
  }
}

/* Import and adapt existing popup styles */
/* Copy relevant styles from popup.css and adapt for full-screen layout */