﻿:root {
  --primary: #1976d2;
  --primary-dark: #0d47a1;
  --secondary: #e3f2fd;
  --text-dark: #2c3e50;
  --text-light: #607d8b;
  --bg-color: #f5f7fa;
  --white: #ffffff;
  --border-color: #e0e6ed;
  --success: #4caf50;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

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

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

.hero {
  text-align: center;
  padding: 4rem 2rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

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

.hero p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

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

.calculator-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  position: relative;
}

.tooltip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  background-color: var(--secondary);
  color: var(--primary);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 0.5rem;
  cursor: help;
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--text-dark);
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: normal;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-weight: 500;
  pointer-events: none;
}

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

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s, transform 0.1s;
  margin-top: 1rem;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(2px);
}

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

.results-section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

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

.result-card {
  background-color: var(--secondary);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.result-card h3 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.result-table th, .result-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.result-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: var(--text-light);
}

.result-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  color: var(--primary-dark);
}

.result-table td.amount {
  text-align: right;
  font-family: monospace;
  font-size: 1.1rem;
}

.text-danger { color: #e53935; }
.text-success { color: #4caf50; }

.content-section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.content-section h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.faq-section {
  margin-top: 3rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  padding: 1.5rem;
  background-color: var(--white);
}

.faq-item h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

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

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
}

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

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: #b0bec5;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: #b0bec5;
  font-size: 0.9rem;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .hamburger {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .calculator-card {
    padding: 1.5rem;
  }
}
