/* =============================================
   APPLY PAGE — Multi-step form
   ============================================= */

.apply-body {
  min-height: 100vh;
  overflow: hidden;
}

/* PROGRESS BAR */
.apply-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 200;
}

.apply-progress__bar {
  height: 100%;
  background: var(--teal);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* STEP COUNTER (top-right) */
.apply-step-counter {
  position: fixed;
  top: 20px;
  right: 32px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--white-30);
  letter-spacing: 0.06em;
  z-index: 50;
}

/* MAIN APPLY AREA */
.apply-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 80px;
}

/* FORM WRAPPER */
.apply-form {
  width: 100%;
  max-width: 680px;
  position: relative;
}

/* INDIVIDUAL STEP */
.apply-step {
  display: none;
  flex-direction: column;
  gap: 32px;
  animation: stepIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.apply-step.active {
  display: flex;
}

.apply-step.exit {
  animation: stepOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes stepOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-24px);
  }
}

/* STEP LABEL */
.apply-step__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.1em;
}

.apply-step__label span {
  color: var(--white-30);
}

/* QUESTION */
.apply-step__q {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--white);
  margin: 0;
}

/* TEXT INPUT */
.apply-input-wrap {
  position: relative;
}

.apply-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding: 14px 0;
  color: var(--white);
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.25s;
  caret-color: var(--teal);
}

.apply-input:focus {
  border-bottom-color: var(--teal);
}

.apply-input::placeholder {
  color: rgba(255,255,255,0.2);
}

.apply-textarea {
  resize: none;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 18px;
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 140px;
}

.apply-textarea:focus {
  border-color: var(--teal);
}

/* OPTION BUTTONS (multiple choice) */
.apply-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apply-option {
  padding: 16px 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--white-60);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.apply-option::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.apply-option:hover {
  border-color: rgba(0,170,177,0.4);
  background: rgba(0,170,177,0.05);
  color: var(--white);
}

.apply-option.selected {
  border-color: var(--teal);
  background: rgba(0,170,177,0.1);
  color: var(--white);
}

.apply-option.selected::before {
  background: var(--teal);
  border-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%23010b19' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* NEXT / SUBMIT BUTTON */
.apply-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 24px;
  background: var(--teal);
  color: var(--dark-blue);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  align-self: flex-start;
  letter-spacing: 0.01em;
}

.apply-next-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.apply-next-btn.hidden {
  display: none;
}

/* HINT TEXT */
.apply-hint {
  font-size: 0.8rem;
  color: var(--white-30);
  margin-top: -16px;
}

.apply-hint strong {
  color: var(--white-60);
  font-weight: 500;
}

/* BACK BUTTON */
.apply-back-btn {
  position: fixed;
  bottom: 32px;
  left: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white-60);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  z-index: 50;
}

.apply-back-btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

/* ERROR */
.apply-error {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: rgba(255, 150, 150, 0.9);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 100;
  animation: errorIn 0.3s ease;
}

@keyframes errorIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* SUCCESS STATE */
.apply-success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: stepIn 0.5s ease forwards;
  max-width: 480px;
  margin: 0 auto;
}

.apply-success__icon {
  width: 64px;
  height: 64px;
  background: var(--teal);
  color: var(--dark-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.apply-success h2 { font-size: 2rem; }
.apply-success p { font-size: 1rem; line-height: 1.7; }

/* RESPONSIVE */
@media (max-width: 600px) {
  .apply-main { padding: calc(var(--nav-h) + 24px) 20px 80px; }
  .apply-step__q { font-size: 1.6rem; }
  .apply-input { font-size: 1.1rem; }
  .apply-step-counter { right: 20px; }
  .apply-back-btn { bottom: 20px; left: 20px; }
}
