/* @font-face {
    font-family: dana;
    src: url(../fonts/Dana-Black.woff);
}
@font-face {
    font-family: pinar;
    src: url(../fonts/Pinar-DS2-SemiBold.woff2);
} */

:root {
    --back-bg: #e7e7e7;
    --main-bg: #eaeced;
    --text-title: #1a3d7c;
    --text-form: #174aa8;
    --btn: #4a90e2;
    --btn-hover: #3c7eca;
    --title-bag: #1a3d7c;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--back-bg);
    direction: rtl;
    font-family: pinar, sans-serif;
    min-height: 100vh;
}
main {
    display: flex;
    justify-content: center; /* فرم رو در عرض وسط قرار می‌ده */
    align-items: flex-start; /* فرم رو از بالا شروع می‌کنه (نه وسط عمودی) */
    padding: 2rem 0; /* فاصله بالا و پایین از هدر و انتهای صفحه */
}

.container-1 {
    background-color: var(--main-bg);
    width: 90%;
    max-width: 800px;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Progress bar */
.progress-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    position: relative;
    background-color: var(--main-bg);
}
.progtess-container-2{
   position: sticky;
   width: 100%;
   top:0;
   z-index:9;
   box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
   margin-bottom: 2rem;
   border-radius: 0.6rem;
   background-color: var(--main-bg);
   padding: 4rem 2rem;
}
.progress-bar-back,
.progress-bar-front {
    position: absolute;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    margin: 0;
}

.progress-bar-back {
    width: 100%;
    background-color: var(--title-bag);
    z-index: 1;
}

.progress-bar-front {
    width: 0%;
    background-color: var(--title-bag);
    transition: width 0.4s linear;
    z-index: 2;
}

.step {
    width: 35px;
    height: 35px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--text-form);
    color: lightgray;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.step.checked {
    color: var(--btn);
    border-color: #198553;
    transition: all 0.3s ease;
}

.num {
    font-size: 0.9rem;
}

.text-num {
    font-size: 0.8rem;
    text-align: center;
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    width: 7rem;
}
.text-num-2 {
    font-size: 0.8rem;
    text-align: center;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 7rem;
}

/* Form */
.form-container {
    min-height: 250px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--text-title);
    font-family: dana;
}

.form-control,
.form-select {
    margin: 0.5rem auto;
    padding: 0.75rem;
    width: 85%;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    color: var(--text-form);
    direction: rtl;
    text-align: right;
}
.label-date{
    right: 1.1rem; 
    left: auto;
    font-size: 0.9rem;
    color: var(--text-form);
}
.form-floating > label {
  right: 2.8rem;        /* به جای left چون راست‌چین هست */
  left: auto;
  text-align: right;
  direction: rtl;
  margin-right: 0.1rem;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  transform: scale(.85) translateY(-1.5rem) translateX(-0.3rem);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%231A3D7C' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
    padding-left: 2rem;
}

.btn1 {
    background-color: var(--btn);
    border: none;
    color: white;
    padding: 10px 20px;
    margin: 30px 10px 0;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-size: 14px;
}

.btn1:hover {
    background-color: var(--btn-hover);
}

.btn1:disabled {
    background-color: lightgray;
    cursor: not-allowed;
}

textarea.form-control {
    resize: none;
    height: 200px;
}
.style-payan{
    width: 75%;
    line-height: 2rem;
    border-radius: 0.9rem;
    font-size:0.8rem;
    font-family:dana;
    box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
}

/* ✅ Responsive breakpoints */
@media (max-width: 768px) {
    .container-1 {
        padding: 2rem 1rem;
    }

    .progress-container {
        gap: 0.5rem;
        /* overflow-x: auto; */
    }

    .step {
        width: 28px;
        height: 28px;
    }

    .text-num {
        bottom: -40px;
        width: 5rem;
        font-size: 0.5rem;
    }

    .form-control,
    .form-select {
        width: 100%;
        font-size: 0.85rem;
    }

    .btn1 {
        padding: 8px 15px;
        font-size: 13px;
    }

}

@media (max-width: 480px) {
    .container-1 {
        padding: 1.5rem 0.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .step {
        width: 25px;
        height: 25px;
    }

    .num {
        font-size: 0.8rem;
    }

    .text-num {
        bottom: -35px;
        padding: 0 1rem !important;
        font-size: 0.4rem;
        font-family: dana;
    }
    .text-num-2 {
        font-size: 0.4rem;
        bottom: 40px;
        font-family: dana;
    }

    .btn1 {
        width: 45%;
        margin: 15px 5px 0;
    }
    .form-floating > label {
        right: 0;        /* به جای left چون راست‌چین هست */
        margin-right: 0.5rem;
    }
}

.preview-container {
    margin-top: 30px;
    display: none;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}
.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 80%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;  /* اجازه رفتن به ردیف بعدی */
    gap: 25px;
}
.upload-area > div {
    width: 150px;     /* هر آیتم یک عرض مشخص */
    text-align: center;
}
.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 20px;
}


