/* Loan Calculator Tool Styles */

.calculator-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.calculator-container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.calculator-header {
  padding: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  text-align: center;
}

.calculator-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.calculator-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.calculator-content {
  padding: 40px;
}

.input-section {
  margin-bottom: 40px;
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  font-weight: 600;
  color: #374151;
  font-size: 1.1rem;
}

.input-group input {
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 18px;
  transition: border-color 0.3s ease;
  background: #f8fafc;
}

.input-group input:focus {
  outline: none;
  border-color: #10b981;
  background: white;
}

.input-group small {
  color: #6b7280;
  font-size: 0.9rem;
}

.loan-type-selector {
  margin-bottom: 40px;
}

.loan-type-selector h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  text-align: center;
}

.loan-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.loan-type-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.loan-type-btn:hover {
  background: #f0fdf4;
  border-color: #10b981;
  transform: translateY(-2px);
}

.loan-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.loan-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.loan-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 5px;
}

.loan-info p {
  font-size: 0.9rem;
  color: #6b7280;
}

.calculate-btn {
  width: 100%;
  padding: 18px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.results-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 16px;
  padding: 40px;
  margin-top: 30px;
}

.results-section h3 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 30px;
}

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

.result-card {
  background: white;
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.result-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.result-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #10b981;
  margin-bottom: 10px;
}

.result-content h4 {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 500;
}

.payment-breakdown {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.payment-breakdown h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  text-align: center;
}

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

.chart-container {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.chart-bar {
  height: 40px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.principal-bar {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  transition: width 0.5s ease;
}

.interest-bar {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  transition: width 0.5s ease;
}

.breakdown-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.principal-color {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.interest-color {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.amortization-schedule {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
}

.amortization-schedule h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
  text-align: center;
}

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

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table th,
.schedule-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.schedule-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #1f2937;
}

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

.action-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  padding: 12px 24px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #4b5563;
}

/* Features Section */
.features {
  padding: 80px 0;
  background: white;
}

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

.feature-card {
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon {
  width: 28px;
  height: 28px;
  color: white;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
}

.feature-description {
  color: #64748b;
  line-height: 1.6;
}

/* Related Tools Section */
.related-tools {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

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

.tool-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 15px;
  padding: 30px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: #10b981;
}

.tool-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.tool-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.tool-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 15px;
  text-align: center;
}

.tool-description {
  color: #64748b;
  line-height: 1.6;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .calculator-container {
    margin: 0 20px;
    border-radius: 15px;
  }
  
  .calculator-header {
    padding: 30px 20px;
  }
  
  .calculator-header h2 {
    font-size: 2rem;
  }
  
  .calculator-content {
    padding: 20px;
  }
  
  .input-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .loan-types {
    grid-template-columns: 1fr;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .result-value {
    font-size: 2rem;
  }
  
  .results-section {
    padding: 30px 20px;
  }
  
  .features-grid,
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .calculator-header h2 {
    font-size: 1.8rem;
  }
  
  .result-value {
    font-size: 1.5rem;
  }
  
  .breakdown-legend {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .schedule-table {
    font-size: 14px;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 8px 12px;
  }
}
