/**
 * File: style.css
 * Location: CHEF/
 * Version: 3.0
 * Created: 2025-01-01
 * Last Revised: 2025-05-22
 * Designer: oxinvira
 * Description: استایل‌های جامع پروژه با پشتیبانی از ریسپانسیو، فونت ایرانیان سانس، رفع فاصله رادیو باتن‌ها و بهینه‌سازی موبایل
 */

/* ===== تعریف فونت Iranian Sans ===== */
@font-face {
    font-family: 'IranianSans';
    src: url('fonts/IranianSansRegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IranianSans';
    src: url('fonts/IranianSansBold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ===== تنظیمات پایه ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IranianSans', 'Tahoma', 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: #f9f5ff;
    background-size: cover;
    background-attachment: fixed;
    color: #2d1b4e;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Header & Footer ===== */
header {
    text-align: center;
    margin-bottom: 40px;
}
.logo {
    max-width: 150px;
    margin-bottom: 15px;
}
h1 {
    font-size: 2rem;
    color: #6b21a5;
}
footer {
    text-align: center;
    margin-top: 50px;
    padding: 15px;
    border-top: 1px solid #e0d4f2;
    font-size: 0.9rem;
    color: #5b3e7c;
}

/* ===== نظرسنجی‌ها (شبکه ۳ ستونه) ===== */
.survey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.survey-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(107, 33, 165, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(107, 33, 165, 0.25);
}
.survey-image {
    height: 180px;
    background-color: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.survey-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.no-image {
    color: #9f7aea;
    font-size: 1rem;
}
.survey-title {
    padding: 15px 15px 10px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #5b21b6;
    text-align: center;
}
.survey-desc {
    padding: 0 15px 20px;
    font-size: 0.9rem;
    color: #4a3b6e;
    text-align: center;
}

/* ===== نوار پیشرفت ===== */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #e9d5ff;
    z-index: 1000;
    height: 8px;
}
.progress-bar {
    height: 8px;
    background: #7c3aed;
    width: 0%;
    transition: width 0.2s;
}
.progress-percent {
    position: fixed;
    top: 10px;
    left: 15px;
    right: auto;
    background: rgba(124, 58, 237, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1001;
}

/* ===== فرم‌ها (عمومی) ===== */
.survey-form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.form-section {
    background: #fef9ff;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #f0e6ff;
}
.form-section h3 {
    border-right: 5px solid #a855f7;
    padding-right: 15px;
    margin-bottom: 20px;
    color: #5b21b6;
}
.form-row {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.form-row label {
    width: 180px;
    font-weight: 600;
    color: #3b2b5c;
    flex-shrink: 0;
}
.required {
    color: #dc2626;
    margin-right: 3px;
}

/* فیلدهای ورودی عمومی (متن، سلکت، تکست اریا) */
input, select, textarea {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 10px 15px;
    border: 1px solid #d8c5f2;
    border-radius: 16px;
    font-size: 1rem;
    background: white;
    transition: 0.2s;
    text-align: right;
}
input::placeholder,
textarea::placeholder {
    color: #aaa;
    font-size: 0.85rem;
    opacity: 1;
}
select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%237c3aed" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-right: 30px;
    cursor: pointer;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}

/* گروه‌های گزینه (رادیو، چک‌باکس) */
.options-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 15px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}
.option-label, .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: #f3e8ff;
    padding: 6px 14px;
    border-radius: 40px;
    transition: 0.1s;
    font-size: 0.9rem;
    white-space: nowrap;
    direction: rtl;
}
.option-label input, .radio-label input {
    width: auto;
    margin: 0;
    min-width: auto;
    max-width: none;
}
.question-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2d5f5;
}
.question-text {
    font-weight: 600;
    margin-bottom: 12px;
}
.captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}
.captcha-box {
    background: #2d1b4e;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 20px;
    letter-spacing: 8px;
    font-family: monospace;
}
.submit-btn {
    background-color: #7c3aed;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 1.2rem;
    border-radius: 40px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
    font-weight: bold;
}
.submit-btn:hover {
    background-color: #6d28d9;
    transform: scale(0.98);
}
.alert-warning {
    background: #fee2e2;
    color: #b91c1c;
    padding: 20px;
    border-radius: 24px;
    text-align: center;
}

/* ===== دکمه‌های شکایات و پیشنهادات در صفحات اصلی ===== */
.complaint-section {
    margin: 50px 0 30px;
    border-top: 2px solid #e0d4f2;
    padding-top: 30px;
}
.complaint-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}
.complaint-btn, .tracking-btn {
    background: white;
    color: #5b21b6;
    border: 2px solid #a855f7;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.complaint-btn:hover, .tracking-btn:hover {
    background: #f3e8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107,33,165,0.15);
}
.tracking-btn {
    border-color: #0284c7;
    color: #0284c7;
}
.tracking-btn:hover {
    background: #e0f2fe;
}

/* ===== استایل صفحات شکایات و پیشنهادات (تم آبی) ===== */
.complaint-page {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
}
.complaint-container, .tracking-container, .success-box {
    background: rgba(255,255,255,0.95);
    border-radius: 32px;
    padding: 30px;
    margin: 30px auto;
    max-width: 900px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.complaint-container h2, .tracking-container h2 {
    color: #0284c7;
    border-right: 5px solid #0284c7;
    padding-right: 15px;
}
.success-box {
    text-align: center;
    max-width: 600px;
    margin: 80px auto;
    padding: 40px;
}
.success-box h2 {
    color: #0284c7;
    margin-bottom: 20px;
}
.success-box p {
    margin-bottom: 15px;
}
.track-code {
    font-size: 2rem;
    font-weight: bold;
    color: #0284c7;
    margin: 20px 0;
}
.success-box .submit-btn {
    display: inline-block;
    width: auto;
    margin-top: 25px;
    background-color: #0284c7;
}
.success-box .submit-btn:hover {
    background-color: #0369a1;
}

/* ===== وضعیت شکایت (بدج) ===== */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
}
.status-0 { background: #fef9c3; color: #854d0e; }
.status-1 { background: #fed7aa; color: #9a3412; }
.status-2 { background: #bbf7d0; color: #166534; }
.status-3 { background: #fed7aa; color: #9a3412; }
.status-4 { background: #cbd5e1; color: #1e293b; }

/* جداول اطلاعات */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.info-table th, .info-table td {
    text-align: right;
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.info-table th {
    width: 30%;
    color: #0284c7;
}
.extra-info {
    margin-top: 30px;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 24px;
}
.appeal-btn {
    background-color: #dc2626 !important;
    border-color: #b91c1c !important;
    color: white !important;
}
.appeal-btn:hover {
    background-color: #b91c1c !important;
    transform: scale(1.02);
}
.section-divider {
    margin: 40px 0 20px;
    border-top: 2px solid #e0d4f2;
}

/* ===== اصلاح رادیو باتن‌ها و گروه‌های رادیویی ===== */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    margin: 0;
    padding: 0;
    background: none;
    white-space: nowrap;
}
.radio-group input[type="radio"] {
    width: auto;
    margin: 0 !important;
    cursor: pointer;
    flex: none !important;
    min-width: auto !important;
    max-width: none !important;
}
/* برای اطمینان از عدم اعمال استایل‌های عمومی input روی رادیوها */
.radio-group input[type="radio"],
.radio-group label input[type="radio"] {
    flex: none !important;
    min-width: auto !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.radio-group label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* ===== ریسپانسیو برای تبلت و موبایل ===== */
@media (max-width: 992px) {
    .survey-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .radio-group {
        gap: 15px;
    }
}

/* ========== ریسپانسیو قوی برای صفحات نظرسنجی ========== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .container, .survey-form-container {
        padding: 10px;
        margin: 0;
        width: 100%;
    }
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .form-row label {
        width: auto;
        margin-bottom: 5px;
    }
    select, input[type="text"], input[type="tel"], input[type="number"], textarea {
        max-width: 100% !important;
        width: 100% !important;
        font-size: 16px; /* جلوگیری از زوم خودکار iOS */
        padding: 10px;
    }
    .options-group {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .option-label, .radio-label {
        white-space: normal;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        gap: 10px;
    }
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .question-text {
        font-size: 1rem;
        font-weight: bold;
    }
    .captcha {
        flex-direction: column;
        align-items: stretch;
    }
    .captcha-box {
        text-align: center;
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
    .submit-btn {
        font-size: 1.1rem;
        padding: 12px;
    }
    .survey-image-head img {
        width: 100%;
        height: auto;
        border-radius: 16px;
    }
}
/* موبایل‌های خیلی کوچک (عرض کمتر از 480px) */
@media (max-width: 480px) {
    .complaint-container, .tracking-container, .success-box {
        padding: 15px;
    }
    .info-table th, .info-table td {
        padding: 5px;
        font-size: 0.85rem;
    }
    .track-code {
        font-size: 1.5rem;
    }
}