.section-fade {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.section-fade.active {
    opacity: 1;
}

.progress-container {
    padding: 2rem;
    background: #f8fafc;
    border-radius: 1.25rem;
    box-shadow: 0 4px 24px 0 rgba(30, 64, 175, 0.07);
    max-width: 370px;
    margin: 0;
    align-self: flex-start;
    font-family: 'Nunito', sans-serif;
}

.progress-container h3, .progress-container h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.progress-container p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
    width: 0%;
    background: linear-gradient(90deg, #6366f1 0%, #38bdf8 100%);
    border-radius: 4px;
}

.progress-steps {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.progress-step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.progress-step-item:last-child {
    margin-bottom: 0;
}

.step-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #e0e7ef;
    color: #64748b;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background 0.3s, color 0.3s;
    overflow: hidden;
}

.progress-step-item.active .step-indicator {
    background: #4f46e5;
    color: #fff;
}

.progress-step-item.completed .step-indicator {
    background: #10b981;
    color: #fff;
}

.progress-step-item.completed .step-indicator .checkmark {
    display: block;
    animation: checkmark-pop 0.4s cubic-bezier(0.4,0,0.2,1);
}

.progress-step-item .step-indicator .checkmark {
    display: none;
}

.progress-step-item.completed .step-indicator .dot {
    display: none;
}

.progress-step-item .step-indicator .dot {
    display: block;
    width: 0.6rem;
    height: 0.6rem;
    background: #fff;
    border-radius: 50%;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 0.1rem;
}

.step-desc {
    color: #64748b;
    font-size: 0.97rem;
    margin-bottom: 0.1rem;
}

.progress-percentage {
    color: #6366f1;
    font-weight: 800;
    font-size: 1.2rem;
}

/* Remove the next steps box */
.progress-next-steps {
  display: none !important;
}

.header-container {
    text-align: center;
    padding: 2rem 0;
}

.form-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
}

.form-container > .bg-white {
  min-width: 700px;
  max-width: 1000px;
  box-sizing: border-box;
}

.progress-container {
    flex: 0 0 370px;
    margin: 0;
    align-self: flex-start;
    margin-top: 0 !important;
}

/* Remove any top margin from both cards */
.bg-white, .progress-container {
    margin-top: 0 !important;
}

@media (max-width: 1024px) {
    .form-container {
        flex-direction: column;
        gap: 2rem;
    }
    .form-container > .bg-white {
        max-width: 100%;
        min-width: 0;
    }
    .progress-container {
        max-width: 100%;
        width: 100%;
    }
    .bg-white, .progress-container {
        margin-top: 1.5rem !important;
    }
}

@media (max-width: 900px) {
  .form-container > .bg-white {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

.email-section {
    display: none;
    transform: translateY(1rem);
    opacity: 0;
}

.email-section.active {
    transform: translateY(0);
    opacity: 1;
}

.report-section {
    opacity: 0;
    transition: all 0.5s ease-in-out;
    display: none;
    transform: translateY(20px);
}

.report-section.active {
    opacity: 1;
    display: block;
    transform: translateY(0);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.back-button {
    background-color: #4F46E5;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.back-button:hover {
    background-color: #4338CA;
}

#metrics-content {
    margin-top: 16px;
}

#analysis-progress-bar {
    transition: width 100ms linear;
    background-size: 200% 200%;
    animation: gradient 2s linear infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (max-width: 768px) {
    .form-container {
        grid-template-columns: 1fr;
    }
}

/* Training Goals Radio Group */
.goals-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goal-radio-option {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc; /* Match department option background */
  margin-bottom: 1rem;
  transition: box-shadow 0.3s, background 0.3s, border 0.3s, opacity 0.5s, transform 0.5s;
  cursor: pointer;
  box-shadow: none;
  opacity: 0;
  transform: translateY(20px);
}

.goal-radio-option:hover {
  box-shadow: 0 4px 16px 0 rgba(59,130,246,0.07);
  background: #e0e7ef;
}

.goal-radio-option input[type="radio"] {
  accent-color: #2563eb;
  margin-right: 1rem;
}

.goal-radio-option.selected {
  border: 2px solid #6366f1;
  background: #e0e7ef;
  box-shadow: 0 2px 8px 0 rgba(99,102,241,0.08);
}

.goal-radio-option label {
  font-size: 1rem;
  color: #1e293b;
  font-weight: 500;
  cursor: pointer;
}

/* Staggered animation for each option */
.goal-radio-option:nth-child(1) { animation-delay: 0.05s; }
.goal-radio-option:nth-child(2) { animation-delay: 0.12s; }
.goal-radio-option:nth-child(3) { animation-delay: 0.19s; }
.goal-radio-option:nth-child(4) { animation-delay: 0.26s; }
.goal-radio-option:nth-child(5) { animation-delay: 0.33s; }
.goal-radio-option:nth-child(6) { animation-delay: 0.40s; }
.goal-radio-option:nth-child(7) { animation-delay: 0.47s; }
.goal-radio-option:nth-child(8) { animation-delay: 0.54s; }
.goal-radio-option:nth-child(9) { animation-delay: 0.61s; }
.goal-radio-option:nth-child(10) { animation-delay: 0.68s; }
.goal-radio-option:nth-child(11) { animation-delay: 0.75s; }

#nextButton {
  width: 100%;
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: #4f46e5;
  border-radius: 0.5rem;
  outline: none;
  border: none;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0.5;
  cursor: not-allowed;
}

#nextButton:not([disabled]) {
  opacity: 1;
  background: #4338ca;
  cursor: pointer;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes checkmark-pop {
  0% { transform: scale(0.5) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Section 2 modern styles */
#section2 .bg-white {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px 0 rgba(30, 64, 175, 0.07);
  border: 1px solid #f1f5f9;
}
#section2 .text-orange-500 { color: #f97316; }
#section2 .border-orange-200 { border-color: #fed7aa; }
#section2 .bg-orange-50 { background: #fff7ed; }
#section2 .text-orange-700 { color: #c2410c; }
#section2 .focus\:ring-orange-400:focus { box-shadow: 0 0 0 2px #fb923c; }
#section2 .focus\:border-orange-400:focus { border-color: #fb923c; }
#section2 .text-green-600 { color: #16a34a; }
#section2 .border-green-200 { border-color: #bbf7d0; }
#section2 .bg-green-50 { background: #f0fdf4; }
#section2 .text-green-700 { color: #166534; }
#section2 .focus\:ring-green-400:focus { box-shadow: 0 0 0 2px #4ade80; }
#section2 .focus\:border-green-400:focus { border-color: #4ade80; }
#section2 .bg-blue-50 { background: #eff6ff; }
#section2 .border-blue-100 { border-color: #dbeafe; }
#section2 .text-blue-700 { color: #1d4ed8; }
#section2 .bg-gray-100 { background: #f3f4f6; }
#section2 .text-gray-700 { color: #374151; }
#section2 .rounded-2xl { border-radius: 1.25rem; }
#section2 .rounded-xl { border-radius: 0.75rem; }
#section2 .rounded-lg { border-radius: 0.5rem; }
#section2 .shadow-xl { box-shadow: 0 8px 32px 0 rgba(30, 64, 175, 0.10); }
#section2 .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.04); }
#section2 .border { border-width: 1px; }
#section2 .font-bold { font-weight: 700; }
#section2 .font-semibold { font-weight: 600; }
#section2 .text-xs { font-size: 0.8rem; }
#section2 .text-lg { font-size: 1.25rem; }
#section2 .text-2xl { font-size: 1.5rem; }
#section2 .p-8 { padding: 2rem; }
#section2 .p-6 { padding: 1.5rem; }
#section2 .mb-6 { margin-bottom: 1.5rem; }
#section2 .mb-2 { margin-bottom: 0.5rem; }
#section2 .mt-6 { margin-top: 1.5rem; }
#section2 .mt-8 { margin-top: 2rem; }
#section2 .gap-6 { gap: 1.5rem; }
#section2 .gap-4 { gap: 1rem; }
#section2 .flex-1 { flex: 1 1 0%; }
#section2 .flex { display: flex; }
#section2 .flex-col { flex-direction: column; }
#section2 .items-center { align-items: center; }
#section2 .justify-between { justify-content: space-between; }
#section2 .block { display: block; }
#section2 .w-full { width: 100%; }
#section2 .px-4 { padding-left: 1rem; padding-right: 1rem; }
#section2 .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
#section2 .border-gray-300 { border-color: #d1d5db; }
#section2 .focus\:outline-none:focus { outline: none; }
#section2 .focus\:ring-2:focus { box-shadow: 0 0 0 2px #6366f1; }
#section2 .focus\:ring-indigo-500:focus { box-shadow: 0 0 0 2px #6366f1; }
#section2 .focus\:border-indigo-500:focus { border-color: #6366f1; }
#section2 .text-white { color: #fff; }
#section2 .bg-blue-600 { background: #2563eb; }
#section2 .hover\:bg-blue-700:hover { background: #1d4ed8; }
#section2 .focus\:ring-blue-500:focus { box-shadow: 0 0 0 2px #3b82f6; }
#section2 .disabled\:opacity-50:disabled { opacity: 0.5; }

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4F46E5;
    color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: help;
    transition: all 0.2s;
    margin-left: 4px; /* Small space from label */
    font-style: normal;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
    line-height: 1;
    position: relative;
}

.info-icon:hover {
    background: #4338CA;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

.input-unit-suffix {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #c2410c;
  font-size: 1.1rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}
.bg-green-50 .input-unit-suffix {
  color: #16a34a;
}
.bg-orange-50 .input-unit-suffix {
  color: #f97316;
}

/* Wider form container for analysis/report section only */
.form-container.analysis-wide {
    max-width: 1400px !important;
    transition: max-width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Wider main card for analysis section only */
.form-container.analysis-wide > .bg-white.analysis-bg-wide {
    width: 1000px;
    min-width: 900px;
    max-width: 1100px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Responsive: revert to normal on small screens */
@media (max-width: 1024px) {
    .form-container.analysis-wide > .bg-white.analysis-bg-wide {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}