/* FinanceHub Styles */
:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --accent: #f59e0b;
  --dark: #1f2937;
  --gray: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 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);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--light);
}

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

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 25px;
}

.nav a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}

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

.btn-secondary {
  background: var(--light);
  color: var(--dark);
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-full {
  width: 100%;
}

/* Tools Section */
.tools-section {
  padding: 60px 0;
}

.tools-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--dark);
}

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

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  text-decoration: none;
  color: var(--dark);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.tool-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 15px;
}

.tool-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.tool-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

.tool-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.tool-tag:empty {
  display: none;
}

/* Features */
.features-section {
  background: var(--white);
  padding: 60px 0;
}

.features-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

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

.feature {
  text-align: center;
  padding: 20px;
}

.feature h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.feature p {
  color: var(--gray);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-section p {
  margin-bottom: 25px;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 40px 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-disclaimer {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-top: 10px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  color: var(--white);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.cookie-banner p {
  font-size: 0.9rem;
}

.cookie-banner a {
  color: var(--primary-light);
}

.cookie-banner button {
  padding: 8px 20px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* Tool Page */
.tool-page {
  padding: 40px 0 60px;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

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

.tool-header {
  text-align: center;
  margin-bottom: 40px;
}

.tool-header h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.tool-description {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.calculator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.calculator-inputs h2,
.calculator-results h2 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: var(--dark);
}

.input-group {
  margin-bottom: 25px;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 5px;
}

.quick-select {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.quick-select button {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.quick-select button:hover,
.quick-select button.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Results */
.calculator-results {
  background: var(--light);
  padding: 25px;
  border-radius: var(--radius);
}

.result-highlight {
  background: var(--primary);
  color: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 25px;
}

.result-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 5px;
}

.result-value {
  font-size: 2rem;
  font-weight: 700;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.result-item {
  background: var(--white);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.result-item .result-value {
  font-size: 1.2rem;
  color: var(--primary);
  display: block;
}

.result-summary {
  background: var(--white);
  padding: 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.amortization-toggle {
  text-align: center;
  margin-top: 20px;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

#amortization-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#amortization-table th,
#amortization-table td {
  padding: 10px;
  text-align: right;
  border-bottom: 1px solid #e5e7eb;
}

#amortization-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

#amortization-table th:first-child,
#amortization-table td:first-child {
  text-align: left;
}

/* Tool Guide */
.tool-guide {
  margin-top: 50px;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
}

.tool-guide h2 {
  font-size: 1.5rem;
  color: var(--dark);
  margin: 30px 0 15px;
}

.tool-guide h2:first-child {
  margin-top: 0;
}

.tool-guide p,
.tool-guide li {
  color: var(--gray);
  margin-bottom: 15px;
}

.tool-guide ul {
  padding-left: 25px;
  margin-bottom: 20px;
}

.guide-step {
  background: var(--light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.guide-step h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.tip-box {
  background: #fef3c7;
  border-left: 4px solid var(--accent);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin: 25px 0;
}

.tip-box h4 {
  color: var(--accent);
  margin-bottom: 10px;
}

.disclaimer-box {
  background: #fee2e2;
  border-left: 4px solid #ef4444;
  padding: 20px;
  border-radius: 0 8px 8px 0;
  margin-top: 30px;
}

.disclaimer-box p {
  color: #991b1b;
  font-size: 0.9rem;
}

/* Legal Pages */
.legal-page {
  padding: 60px 0;
}

.legal-page h1 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 30px;
}

.legal-page h2 {
  font-size: 1.3rem;
  color: var(--dark);
  margin: 30px 0 15px;
}

.legal-page p {
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.8;
}

.legal-page ul {
  padding-left: 25px;
  color: var(--gray);
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .calculator-wrapper {
    grid-template-columns: 1fr;
    padding: 25px;
  }
  
  .nav {
    gap: 15px;
  }
  
  .nav a {
    font-size: 0.9rem;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .cookie-banner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
