/* Early Repayment Penalty Calculator Styles */

/* Hero */
.pen-hero {
  background: linear-gradient(135deg, #1E3A5F 0%, #1E88E5 60%, #8B5CF6 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}

.pen-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.pen-hero .lead {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.pen-hero-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.pen-hero-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Calculator Section */
.pen-calculator-section {
  padding: 48px 0;
  background: #f8faff;
}

.pen-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pen-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pen-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.pen-card-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Form Groups */
.pen-form-group {
  margin-bottom: 1.75rem;
}

.pen-form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

.pen-form-input {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

.pen-form-input:focus {
  outline: none;
  border-color: var(--ai-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

.pen-form-input.pen-invalid {
  border-color: #DC2626;
  background: #fef2f2;
}

.pen-form-hint {
  font-size: 0.82rem;
  color: #9ca3af;
  margin-top: 4px;
}

.pen-form-error {
  font-size: 0.82rem;
  color: #DC2626;
  margin-top: 4px;
  font-weight: 600;
}

.pen-value-display {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-blue);
  text-align: right;
  min-width: 120px;
}

.pen-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pen-slider-row input[type="range"] {
  flex: 1;
}

input[type="range"].pen-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  margin: 8px 0;
}

input[type="range"].pen-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
  transition: transform 0.15s ease;
}

input[type="range"].pen-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"].pen-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
}

.pen-section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 16px;
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* Primary Button */
.btn-pen-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-pen-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

/* Disclaimer */
.pen-disclaimer {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: #5d4037;
  margin-top: 24px;
  line-height: 1.6;
}

/* Result Card */
.pen-result-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  border: 2px solid #e5e7eb;
  margin-top: 24px;
}

/* Decision Indicator (traffic light) */
.pen-decision {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: 12px;
}

.pen-decision-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pen-decision-text {
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
}

.pen-decision-green {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.pen-decision-green .pen-decision-icon { background: #059669; color: white; }
.pen-decision-green .pen-decision-text { color: #065f46; }

.pen-decision-yellow {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.pen-decision-yellow .pen-decision-icon { background: #d97706; color: white; }
.pen-decision-yellow .pen-decision-text { color: #92400e; }

.pen-decision-red {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.pen-decision-red .pen-decision-icon { background: #dc2626; color: white; }
.pen-decision-red .pen-decision-text { color: #991b1b; }

.pen-decision-gray {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
}
.pen-decision-gray .pen-decision-icon { background: #6b7280; color: white; }
.pen-decision-gray .pen-decision-text { color: #374151; }

/* Main Metric */
.pen-main-metric {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 8px 0 4px;
}

.pen-main-metric-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 20px;
}

/* Result Stats */
.pen-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.pen-result-stat {
  padding: 8px;
}

.pen-result-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1E3A5F;
}

.pen-result-stat-value.danger { color: #DC2626; }
.pen-result-stat-value.savings { color: #059669; }

.pen-result-stat-label {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Comparison block */
.pen-comparison {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  text-align: left;
}

.pen-comparison h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 12px;
}

.pen-comparison-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #e5e7eb;
  font-size: 0.92rem;
}

.pen-comparison-row:last-child { border-bottom: none; }

.pen-comparison-label { color: #64748b; }
.pen-comparison-value { font-weight: 700; color: #1E3A5F; }
.pen-comparison-value.danger { color: #DC2626; }
.pen-comparison-value.savings { color: #059669; }

/* Educational Section */
.pen-edu-section {
  padding: 64px 0;
  background: white;
}

.pen-edu-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1E3A5F;
  margin-bottom: 16px;
}

.pen-edu-section p {
  color: #555;
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.pen-edu-definition {
  background: linear-gradient(135deg, #f0f7ff 0%, #f5f3ff 100%);
  border-left: 4px solid var(--primary-blue);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 20px 0 32px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #1E3A5F;
}

.pen-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 32px;
  font-size: 0.92rem;
}

.pen-comparison-table thead th {
  background: #1E3A5F;
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  text-align: left;
}

.pen-comparison-table thead th:first-child { border-radius: 8px 0 0 0; }
.pen-comparison-table thead th:last-child { border-radius: 0 8px 0 0; }

.pen-comparison-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.pen-comparison-table tbody tr:nth-child(even) { background: #f8faff; }

/* Steps */
.pen-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0 0;
}

.pen-step-card {
  background: #f8faff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
}

.pen-step-num {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 12px;
}

.pen-step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 8px;
}

.pen-step-card p {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0;
}

/* FAQ Section */
.pen-faq-section {
  background: #f8faff;
  padding: 64px 0;
}

.pen-faq-section h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #1E3A5F;
  text-align: center;
  margin-bottom: 12px;
}

.pen-faq-lead {
  text-align: center;
  color: #64748b;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.pen-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: white;
}

.pen-faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1E3A5F;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.pen-faq-question:hover { background: #f0f7ff; }

.pen-faq-answer {
  padding: 0 24px 0;
  color: #555;
  font-size: 0.93rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  line-height: 1.7;
}

.pen-faq-answer.open {
  max-height: 1200px;
  padding: 0 24px 18px;
}

.pen-faq-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.pen-faq-question.active .pen-faq-chevron { transform: rotate(180deg); }

/* CTA Section */
.pen-final-cta {
  background: linear-gradient(135deg, #1E3A5F 0%, #1E88E5 60%, #8B5CF6 100%);
  color: white;
  padding: 64px 0;
  text-align: center;
}

.pen-final-cta h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.pen-final-cta p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.pen-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-pen-cta-white {
  background: white;
  color: var(--primary-blue);
  border: none;
  border-radius: 10px;
  padding: 16px 28px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-pen-cta-white:hover {
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--primary-blue);
}

.btn-pen-cta-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-pen-cta-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 991px) {
  .pen-card { padding: 1.5rem; }
  .pen-result-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .pen-hero h1 { font-size: 1.9rem; }
  .pen-hero .lead { font-size: 1rem; }
  .pen-result-stats { grid-template-columns: 1fr; gap: 12px; }
  .pen-steps { grid-template-columns: 1fr; }
  .pen-decision { flex-direction: column; text-align: center; }
  .pen-decision-text { text-align: center; }
  .pen-cta-buttons { flex-direction: column; align-items: center; }
  .pen-main-metric { font-size: 2rem; }
}

@media (max-width: 480px) {
  .pen-hero h1 { font-size: 1.6rem; }
}
