@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&display=swap');

body {
    font-family: "Kantumruy Pro", sans-serif;
    background-color: #f4f7f6;
    font-optical-sizing: auto;
    font-weight: 500;
}

.form-container {
    max-width: 800px;
    margin: 2rem auto;
}

.form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

/* --- Stepper Styles --- */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    position: relative;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Draws the gray connecting line AFTER each item */
.stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.25rem; /* Vertically center with the circle */
    left: 50%;
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    z-index: 1; /* Below the circle */
}

/* Draws the blue progress line, initially hidden */
.stepper-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: 50%;
    width: 0; /* Initially hidden */
    height: 4px;
    background-color: #0c2852;
    z-index: 2; /* Above the gray line */
    /* THIS IS THE UPDATED ANIMATION */
    transition: width 0.6s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.step-counter {
    height: 2.5rem;
    width: 2.5rem;
    display: grid;
    place-items: center;
    background: #e0e0e0;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    font-weight: 600;
    color: #888;
    transition: all 0.4s ease;
    z-index: 3; /* Above all lines */
    position: relative; /* Ensure z-index works */
}

.step-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
    color: #888;
    transition: color 0.4s ease;
}

/* Active State */
.stepper-item.active .step-counter {
    background-color: #fff;
    border-color: #0c2852;
    color: #0c2852;
    animation: pulse 1.8s infinite cubic-bezier(0.36, 0.11, 0.89, 0.32);
}

.stepper-item.active .step-name {
    color: #091e3c;
    font-weight: 600;
}

/* Completed State */
.stepper-item.completed .step-counter {
    background-color: #0c2852;
    border-color: #0c2852;
    color: white;
}

/* This fills the blue line for a completed step */
.stepper-item.completed:not(:last-child)::before {
    width: 100%;
}

.stepper-item.completed .step-name {
    color: #333;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(12, 40, 82, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(12, 40, 82, 0);
  }
}

/* --- End Stepper Styles --- */

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.header-logo {
    max-height: 50px;
    width: auto;
}

/* Button Styles */
.button {
    text-decoration: none;
    line-height: 1;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, .05);
    background-color: #fff;
    color: #121212;
    border: 1px solid #eee;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
}

.button-decor {
    position: absolute;
    inset: 0;
    background-color: var(--clr);
    transform: translateX(-100%);
    transition: transform .3s;
    z-index: 0;
}

.button-content {
    display: flex;
    align-items: center;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.button__icon {
    width: 48px;
    height: 40px;
    display: grid;
    place-items: center;
}

.button__text {
    display: inline-block;
    transition: color .2s .05s;
    padding: 0 1.5rem 0 .75rem;
    white-space: nowrap;
}

.button:hover .button__text {
    color: #fff;
}

.button:hover .button-decor {
    transform: translate(0);
}

#submitBtn .spinner-border {
    color: #ffffff;
    margin: 0 1rem;
}