/* Calculator Page Styles */

.calculator-tabs {
  background: var(--text-light);
  border-bottom: 2px solid var(--bg-secondary);
  padding: 20px 0;
  position: sticky;
  top: 70px;
  z-index: 100;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 5px;
  max-width: 800px;
  margin: 0 auto;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tab-btn:hover {
  background: rgba(231, 76, 60, 0.1);
  color: var(--accent-color);
}

.tab-btn.active {
  background: var(--accent-color);
  color: var(--text-light);
}

.tab-btn i {
  font-size: 1.1rem;
}

.calculator-section {
  display: none;
  padding: 60px 0;
}

.calculator-section.active {
  display: block;
}

.calculator-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.calculator-form {
  background: var(--text-light);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.calculator-form h2 {
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.calculator-form h2 i {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.calculator-form p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.calculator-result {
  background: var(--bg-secondary);
  border-radius: 15px;
  position: sticky;
  top: 150px;
  min-height: 400px;
}

.calculator-result h3 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
}

.result-content {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.result-placeholder {
  text-align: center;
  color: var(--text-secondary);
}

.result-placeholder i {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.cost-breakdown {
  background: var(--text-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cost-item:last-child {
  border-bottom: none;
}

.cost-item.total {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-color);
  border-top: 2px solid var(--accent-color);
  margin-top: 10px;
  padding-top: 15px;
}

.cost-label {
  color: var(--primary-color);
}

.cost-value {
  font-weight: 600;
  color: var(--primary-color);
}

.cost-item.total .cost-value {
  color: var(--accent-color);
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-small {
  padding: 8px 15px;
  font-size: 0.9rem;
  border-radius: 5px;
}

.calculator-notes {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.notes-content h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 50px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.note-card {
  background: var(--text-light);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.note-card:hover {
  transform: translateY(-5px);
}

.note-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.note-icon i {
  font-size: 1.5rem;
  color: var(--text-light);
}

.note-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.note-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.calculator-cta {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-color) 100%
  );
  color: var(--text-light);
  padding: 80px 0;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ecf0f1;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Estimation Results */
.estimation-summary {
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--primary-hover)
  );
  color: var(--text-light);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.estimation-summary h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.estimation-summary .total-amount {
  font-size: 2.5rem;
  font-weight: 700;
}

.estimation-summary .total-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.cost-details {
  background: var(--text-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.cost-details h5 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.detail-value {
  font-weight: 600;
  color: var(--primary-color);
}

.savings-highlight {
  background: #27ae60;
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.savings-highlight i {
  margin-right: 8px;
}

/* Fix page header positioning */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--accent-color) 100%
  ) !important;
  color: var(--text-light) !important;
  padding: 120px 0 80px 0 !important;
  text-align: center !important;
  margin-top: 80px !important;
  position: relative !important;
}

.page-header h1 {
  font-size: 3rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  color: var(--text-light) !important;
}

.page-header p {
  font-size: 1.2rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 !important;
}

/* Ensure proper navbar positioning */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
}

/* Fix calculator tabs positioning */
.calculator-tabs {
  position: sticky !important;
  top: 80px !important;
  z-index: 100 !important;
  margin-top: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .page-header {
    padding: 100px 0 60px 0 !important;
    margin-top: 70px !important;
  }

  .page-header h1 {
    font-size: 2.5rem !important;
  }

  .calculator-tabs {
    top: 70px !important;
  }
}

@media (max-width: 480px) {
  .calculator-section {
    padding: 40px 0;
  }

  .calculator-notes {
    padding: 60px 0;
  }

  .calculator-cta {
    padding: 60px 0;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .tab-btn i {
    font-size: 1rem;
  }

  .calculator-form h2 {
    font-size: 1.5rem;
  }

  .estimation-summary .total-amount {
    font-size: 2rem;
  }
}

/* Animation for tab switching */
.calculator-section {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error state */
.error-message {
  background: var(--accent-color);
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.error-message i {
  margin-right: 8px;
}

/* Success state */
.success-message {
  background: #27ae60;
  color: var(--text-light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  margin-top: 15px;
}

.success-message i {
  margin-right: 8px;
}
