/* ========================================== */
/* استایل‌های روشن‌تر و مدرن‌تر برای فرم‌ها   */
/* ========================================== */

/* ---------- تنظیمات پس‌زمینه و کارت‌ها ---------- */
.card {
    background: rgba(18, 20, 28, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* ---------- پس‌زمینه فرم (مرحله ۳ به بعد) ---------- */
#step3 .form-group,
#step4 .form-group,
#step5 .form-group,
#step6 .form-group,
#step7 .form-group {
    background: rgba(22, 25, 34, 0.6) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    transition: all 0.25s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
}

/* هنگام hover یا focus، پس‌زمینه کمی بیشتر دیده شود */
#step3 .form-group:hover,
#step4 .form-group:hover,
#step5 .form-group:hover,
#step6 .form-group:hover,
#step7 .form-group:hover {
    background: rgba(30, 34, 46, 0.7) !important;
    border-color: rgba(212, 175, 55, 0.15) !important;
}

/* ---------- فیلدهای ورودی ---------- */
.form-control {
    background: rgba(10, 12, 16, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #E8EDF5 !important;
    padding: 13px 16px !important;
    border-radius: 10px !important;
    font-weight: 400 !important;
    transition: all 0.3s ease !important;
}

.form-control:hover {
    background: rgba(16, 19, 26, 0.85) !important;
    border-color: rgba(212, 175, 55, 0.25) !important;
}

.form-control:focus {
    background: rgba(16, 19, 26, 0.9) !important;
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
}

/* ---------- لیبل‌ها ---------- */
.form-label {
    color: #CBD5E1 !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    margin-bottom: 6px !important;
}

/* ---------- انتخاب‌گرها (سلکت‌ها) ---------- */
select.form-control {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2.5'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 16px center !important;
    padding-left: 44px !important;
}

select.form-control option {
    background: #12141C !important;
    color: #E8EDF5 !important;
}

/* ---------- دکمه‌ها ---------- */
.btn-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #C89D32 50%, #B8860B 100%) !important;
    color: #0B0C0E !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.2) !important;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35) !important;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #E8EDF5 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.12) !important;
    border-color: #D4AF37 !important;
    color: #D4AF37 !important;
}

/* ---------- پس‌زمینه انتخاب‌های گروهی (چک‌باکس و رادیو) ---------- */
.choice-pill {
    background: rgba(12, 14, 20, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #CBD5E1 !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
}

.choice-pill:hover {
    background: rgba(212, 175, 55, 0.06) !important;
    border-color: rgba(212, 175, 55, 0.2) !important;
}

.choice-pill:has(input:checked) {
    background: rgba(212, 175, 55, 0.12) !important;
    border-color: #D4AF37 !important;
    color: #D4AF37 !important;
}

/* ---------- هدر فرم (منطقه لوگو و عنوان) ---------- */
.form-header-wrapper {
    background: linear-gradient(160deg, rgba(12, 14, 20, 0.92) 0%, rgba(20, 22, 30, 0.96) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.12) !important;
    border-radius: 20px !important;
    padding: 28px 20px 20px 20px !important;
    backdrop-filter: blur(4px) !important;
}

.form-header-wrapper h1 {
    color: #E8C84A !important;
    font-weight: 700 !important;
}

.form-header-wrapper h2 {
    color: #A8B5C9 !important;
}

/* ---------- کارت منشور اخلاقی ---------- */
.rules-card {
    background: rgba(18, 20, 28, 0.6) !important;
    border: 1px solid rgba(212, 175, 55, 0.10) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(4px) !important;
}

.rules-card h4 {
    color: #E8C84A !important;
}

/* ---------- کارت حدیث ---------- */
.hadith-container {
    background: rgba(12, 14, 20, 0.6) !important;
    border: 1px solid rgba(212, 175, 55, 0.08) !important;
    backdrop-filter: blur(4px) !important;
}

.hadith-container .hadith-arabic {
    color: #E8C84A !important;
}

/* ---------- نوار پیشرفت ---------- */
.progress-bar-bg {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #C89D32, #E8C84A, #C89D32) !important;
}

.progress-text {
    color: #D4AF37 !important;
}

/* ---------- باکس آپلود عکس ---------- */
.photo-upload-box {
    background: rgba(10, 12, 16, 0.6) !important;
    border: 2px dashed rgba(212, 175, 55, 0.15) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.photo-upload-box:hover {
    background: rgba(212, 175, 55, 0.04) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

/* ========================================== */
/* اصلاح کامل بخش جستجو - ریسپانسیو و دقیق  */
/* ========================================== */

/* ---------- کانتینر جستجو ---------- */
.search-box {
    position: relative !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

.search-input-wrapper {
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* ---------- آیکون ذره‌بین - ثابت و بدون تداخل ---------- */
.search-icon {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 1.1rem !important;
    color: var(--text-soft, #9AA3B5) !important;
    pointer-events: none !important;
    z-index: 5 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
}

/* ---------- فیلد جستجو - با فضای کافی برای آیکون ---------- */
.search-input {
    padding-right: 48px !important;
    padding-left: 16px !important;
    padding-top: 13px !important;
    padding-bottom: 13px !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-input, rgba(0, 0, 0, 0.08)) !important;
    background: var(--bg-input, rgba(255, 255, 255, 0.9)) !important;
    color: var(--text-dark, #1A1D26) !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow-input, 0 2px 8px rgba(0, 0, 0, 0.04)) !important;
    height: auto !important;
    min-height: 50px !important;
}

.search-input::placeholder {
    color: var(--text-soft, #9AA3B5) !important;
    font-size: 0.9rem !important;
    opacity: 0.8 !important;
}

.search-input:hover {
    border-color: var(--gold-primary, #C9A84C) !important;
    background: var(--bg-hover, rgba(255, 255, 255, 0.98)) !important;
}

.search-input:focus {
    border-color: var(--gold-primary, #C9A84C) !important;
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.08), 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    background: var(--bg-hover, rgba(255, 255, 255, 0.98)) !important;
    outline: none !important;
}

/* ---------- حالت تیره برای پنل مدیریت (اختیاری) ---------- */
/* اگر پنل مدیریت شما تیره است، این استایل‌ها فعال می‌شوند */
body.dark-mode .search-input,
.sidebar ~ .main-content .search-input {
    background: rgba(10, 12, 20, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: #E8EDF5 !important;
}

body.dark-mode .search-input::placeholder,
.sidebar ~ .main-content .search-input::placeholder {
    color: rgba(148, 163, 184, 0.5) !important;
}

body.dark-mode .search-icon,
.sidebar ~ .main-content .search-icon {
    color: rgba(148, 163, 184, 0.5) !important;
}

/* ---------- ریسپانسیو برای موبایل ---------- */
@media (max-width: 768px) {
    .search-box {
        margin-bottom: 16px !important;
    }
    
    .search-input {
        padding-right: 44px !important;
        padding-left: 14px !important;
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
        border-radius: 10px !important;
    }
    
    .search-icon {
        right: 14px !important;
        font-size: 1rem !important;
        width: 18px !important;
        height: 18px !important;
    }
    
    .search-input::placeholder {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .search-box {
        margin-bottom: 12px !important;
    }
    
    .search-input {
        padding-right: 38px !important;
        padding-left: 12px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
        border-radius: 8px !important;
    }
    
    .search-icon {
        right: 12px !important;
        font-size: 0.9rem !important;
        width: 16px !important;
        height: 16px !important;
    }
    
    .search-input::placeholder {
        font-size: 0.8rem !important;
    }
}