@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2');
    font-display: optional;
    font-weight: 400 800;
    size-adjust: 100%;
    ascent-override: 95%;
    descent-override: 25%;
    line-gap-override: 0%;
}

.saleh-form-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 30px auto;
    direction: rtl;
    font-family: 'yekanbakh', 'Vazir', Tahoma, sans-serif;
    box-sizing: border-box;
    min-height: 420px;
}

.saleh-form-wrapper * {
    box-sizing: border-box;
}

/* Video flush with card — no separate frame/label */
.saleh-form-video {
    display: none;
    margin: -36px -30px 24px;
    background: #0f172a;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}

@media (max-width: 768px) {
    .saleh-form-video {
        display: block;
    }
}

.saleh-video-container {
    position: relative;
    width: 100%;
    /* Fixed height reserves space before video/poster load — primary CLS fix */
    height: 360px;
    background: #0f172a url('https://drehsansaleh.com/wp-content/uploads/2025/12/back-2-min.png') center / cover no-repeat;
    overflow: hidden;
}

.saleh-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Form Card - Ultra-Clean Glassmorphic Aesthetic with Gradient Border */
.saleh-form-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 40px 32px;
    box-shadow: 0 25px 60px -15px rgba(2, 132, 199, 0.15), 0 0 35px rgba(6, 182, 212, 0.08);
    border: 1.5px solid transparent;
    background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, rgba(6, 182, 212, 0.5) 0%, rgba(2, 132, 199, 0.2) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    position: relative;
    overflow: hidden;
}

/* 4-Step Process Timeline Infographic Component */
.saleh-timeline-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1.5px dashed #e0f2fe;
}

.saleh-timeline-header {
    text-align: center;
    margin-bottom: 18px;
}

.saleh-timeline-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1 !important;
    border: 1px solid #bae6fd;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.saleh-timeline-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #031e3d !important;
    margin: 0;
}

.saleh-timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.saleh-timeline-step {
    background: #f8fafc;
    border: 1.5px solid #e0f2fe;
    border-radius: 16px;
    padding: 14px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.saleh-timeline-step:hover {
    background: #ffffff;
    border-color: #38bdf8;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.16);
}

.saleh-step-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    flex-shrink: 0;
}

.saleh-step-content h4 {
    font-size: 12.5px;
    font-weight: 800;
    color: #06182e !important;
    margin: 0 0 3px 0;
    line-height: 1.35;
}

.saleh-step-content p {
    font-size: 11px;
    color: #506784 !important;
    margin: 0;
    line-height: 1.45;
    font-weight: 600;
}

@media (max-width: 768px) {
    .saleh-timeline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .saleh-timeline-grid {
        grid-template-columns: 1fr;
    }
    .saleh-timeline-header h3 {
        font-size: 17px;
    }
}

.saleh-form-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.saleh-header-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.35);
    color: #ffffff;
}

.saleh-header-icon-badge svg {
    width: 32px;
    height: 32px;
    stroke: #ffffff;
}

.saleh-form-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #031e3d !important;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #031e3d 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
    color: #06182e !important;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #031e3d 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.saleh-form-header p {
    font-size: 15px;
    color: #475569 !important;
    margin: 0;
    line-height: 1.6;
}

/* Progress Track */
.saleh-progress-bar-container {
    margin-bottom: 32px;
}

.saleh-progress-track {
    width: 100%;
    height: 8px;
    background: #e0f2fe;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.saleh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, #06b6d4 50%, #38bdf8 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.saleh-steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saleh-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s;
}

.saleh-step-item.active {
    opacity: 1;
}

.saleh-step-item .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.saleh-step-item.active .step-num {
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25);
}

.saleh-step-item .step-text {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b !important;
}

/* Wizard Steps */
.saleh-wizard-step {
    display: none;
    animation: fadeInStep 0.4s ease forwards;
}

.saleh-wizard-step.step-active {
    display: block;
}

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

.saleh-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a !important;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px stroke #f1f5f9;
}

.saleh-step-title svg {
    width: 24px;
    height: 24px;
    color: #06b6d4;
}

.saleh-step-desc {
    font-size: 14px;
    color: #64748b !important;
    margin-bottom: 18px;
}

/* Input Fields with Inline Icons */
.saleh-input-group {
    margin-bottom: 22px;
}

.saleh-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a !important;
    margin-bottom: 8px;
}

.saleh-input-group label .required {
    color: #ef4444 !important;
}

.saleh-input-with-icon {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.saleh-input-with-icon .field-icon {
    position: absolute;
    right: 14px;
    width: 22px;
    height: 22px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saleh-input-with-icon .field-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.saleh-input-with-icon input {
    padding-right: 46px !important;
}

.saleh-input-with-icon:focus-within .field-icon {
    color: #0ea5e9;
}

.saleh-input-group input[type="text"],
.saleh-input-group input[type="tel"],
.saleh-input-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0f2fe;
    border-radius: 14px;
    font-size: 16px;
    color: #0f172a !important;
    background: #f8fafc;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.saleh-input-group input:focus,
.saleh-input-group textarea:focus {
    background: #ffffff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18);
}

.saleh-field-hint {
    display: block;
    font-size: 12px;
    color: #94a3b8 !important;
    margin-top: 6px;
}

/* Category Filter Tabs */
.saleh-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.saleh-category-tabs::-webkit-scrollbar {
    height: 4px;
}

.saleh-category-tabs::-webkit-scrollbar-thumb {
    background: #bae6fd;
    border-radius: 4px;
}

.saleh-cat-tab {
    white-space: nowrap;
    background: #f0f9ff !important;
    border: 1px solid #e0f2fe !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0369a1 !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit !important;
}

.saleh-cat-tab:hover {
    background: #e0f2fe !important;
    color: #0284c7 !important;
}

.saleh-cat-tab.active {
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35) !important;
}

/* Selection Counter Badge */
.saleh-selection-counter-badge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    color: #0369a1 !important;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saleh-selection-counter-badge strong {
    font-weight: 800;
    font-size: 15px;
    color: #0284c7 !important;
}

/* Interactive Service Chips Grid */
.saleh-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    max-height: 380px;
    overflow-y: auto;
    padding-left: 4px;
    scrollbar-width: thin;
}

.saleh-service-chip {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.saleh-service-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.saleh-service-chip .chip-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 2px solid #e0f2fe;
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 54px;
}

.saleh-service-chip:hover .chip-content {
    border-color: #38bdf8;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.saleh-service-chip input[type="checkbox"]:checked + .chip-content {
    background: #f0f9ff !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.25);
}

.chip-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s;
}

.chip-icon svg {
    width: 14px;
    height: 14px;
}

.chip-icon .icon-check { display: none; }
.chip-icon .icon-plus { display: block; }

.saleh-service-chip input[type="checkbox"]:checked + .chip-content .chip-icon {
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
}

.saleh-service-chip input[type="checkbox"]:checked + .chip-content .chip-icon .icon-check { display: block; }
.saleh-service-chip input[type="checkbox"]:checked + .chip-content .chip-icon .icon-plus { display: none; }

.chip-text {
    font-size: 13px;
    font-weight: 700;
    color: #334155 !important;
    line-height: 1.4;
}

.saleh-service-chip input[type="checkbox"]:checked + .chip-content .chip-text {
    color: #0369a1 !important;
}

/* Summary Box */
.saleh-summary-box {
    background: #f0f9ff;
    border: 1.5px dashed #bae6fd;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.saleh-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #e0f2fe;
}

.saleh-summary-row:last-child {
    border-bottom: none;
}

.saleh-summary-row span { color: #64748b !important; }
.saleh-summary-row strong { color: #0f172a !important; font-weight: 700; text-align: left; }

/* Actions & Buttons */
.saleh-form-wrapper .saleh-step-actions {
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
}

.saleh-form-wrapper button.saleh-btn,
.saleh-form-wrapper .saleh-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 24px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.3s !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.saleh-form-wrapper button.saleh-btn-next,
.saleh-form-wrapper .saleh-btn-next,
.saleh-form-wrapper button.saleh-btn-submit,
.saleh-form-wrapper .saleh-btn-submit {
    position: relative !important;
    overflow: hidden !important;
}

.saleh-form-wrapper button.saleh-btn-next::before,
.saleh-form-wrapper .saleh-btn-next::before,
.saleh-form-wrapper button.saleh-btn-submit::before,
.saleh-form-wrapper .saleh-btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shineEffect 4s infinite ease-in-out;
}

@keyframes shineEffect {
    0% { left: -100%; }
    30% { left: 140%; }
    100% { left: 140%; }
}

.saleh-form-wrapper button.saleh-btn-next,
.saleh-form-wrapper .saleh-btn-next {
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    flex: 1 !important;
    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.35) !important;
}

.saleh-form-wrapper button.saleh-btn-next *,
.saleh-form-wrapper .saleh-btn-next * {
    color: #ffffff !important;
}

.saleh-form-wrapper button.saleh-btn-next:hover,
.saleh-form-wrapper .saleh-btn-next:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(6, 182, 212, 0.45) !important;
    color: #ffffff !important;
}

.saleh-form-wrapper button.saleh-btn-prev,
.saleh-form-wrapper .saleh-btn-prev {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.saleh-form-wrapper button.saleh-btn-prev:hover,
.saleh-form-wrapper .saleh-btn-prev:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.saleh-form-wrapper button.saleh-btn-submit,
.saleh-form-wrapper .saleh-btn-submit {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: #ffffff !important;
    flex: 1 !important;
    font-size: 16px !important;
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.35) !important;
}

.saleh-form-wrapper button.saleh-btn-submit *,
.saleh-form-wrapper .saleh-btn-submit * {
    color: #ffffff !important;
}

.saleh-form-wrapper button.saleh-btn-submit:hover,
.saleh-form-wrapper .saleh-btn-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45) !important;
    color: #ffffff !important;
}

.saleh-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
}

.saleh-error-message {
    background: #fef2f2;
    color: #dc2626 !important;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    border: 1px solid #fecaca;
}

/* Success Celebration Screen */
.saleh-success-celebration {
    text-align: center;
    padding: 20px 10px;
    position: relative;
}

.success-icon-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
    animation: popSuccess 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popSuccess {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon-badge svg {
    width: 42px;
    height: 42px;
    stroke: #ffffff !important;
}

.saleh-success-celebration h3 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a !important;
    margin-bottom: 12px;
}

.saleh-success-celebration p {
    font-size: 15px;
    color: #475569 !important;
    line-height: 1.6;
    margin-bottom: 24px;
}

.saleh-tracking-badge {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    padding: 14px 20px;
    border-radius: 16px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
}

.saleh-tracking-badge span {
    font-size: 13px;
    color: #0369a1 !important;
}

.saleh-tracking-badge strong {
    font-size: 24px;
    font-weight: 900;
    color: #0284c7 !important;
    letter-spacing: 2px;
    font-family: monospace;
}

.saleh-note-text {
    font-size: 13px !important;
    color: #94a3b8 !important;
    margin-bottom: 20px !important;
}

.saleh-form-wrapper button.saleh-btn-reload,
.saleh-form-wrapper .saleh-btn-reload {
    background: #f1f5f9 !important;
    color: #334155 !important;
    padding: 12px 28px !important;
}

.saleh-form-wrapper button.saleh-btn-reload:hover,
.saleh-form-wrapper .saleh-btn-reload:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

@media (max-width: 768px) {
    .saleh-form-video {
        display: block;
        margin: -40px -32px 24px;
    }
    .saleh-video-container {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .saleh-form-wrapper {
        margin: 10px auto;
    }
    .saleh-form-card {
        padding: 24px 16px;
        border-radius: 22px;
    }
    .saleh-form-video {
        margin: -24px -16px 20px;
        border-radius: 22px 22px 0 0;
    }
    .saleh-video-container {
        height: 220px;
    }
    .saleh-timeline-section {
        margin-bottom: 22px;
        padding-bottom: 18px;
    }
    .saleh-timeline-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .saleh-timeline-step {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 10px;
        gap: 6px;
        border-radius: 14px;
    }
    .saleh-step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-radius: 6px;
    }
    .saleh-step-content h4 {
        font-size: 11.5px;
        margin-bottom: 2px;
    }
    .saleh-step-content p {
        font-size: 10px;
        line-height: 1.35;
    }
    .saleh-timeline-header {
        margin-bottom: 12px;
    }
    .saleh-timeline-header h3 {
        font-size: 16px;
    }
    .saleh-form-header h2 { font-size: 21px; }
    .saleh-form-header p { font-size: 14px; }
    .saleh-header-icon-badge {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        margin-bottom: 12px;
    }
    .saleh-header-icon-badge svg {
        width: 26px;
        height: 26px;
    }
    .saleh-services-grid {
        grid-template-columns: 1fr;
        max-height: 320px;
    }
    .saleh-step-item .step-text { display: none; }
    .saleh-input-group input[type="text"],
    .saleh-input-group input[type="tel"],
    .saleh-input-group textarea {
        font-size: 16px !important; /* جلوگیری از زوم خودکار iOS Safari */
        padding: 12px 14px;
    }
    .saleh-form-wrapper button.saleh-btn,
    .saleh-form-wrapper .saleh-btn {
        padding: 14px 18px !important;
        font-size: 15px !important;
    }
}
