/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

:root {
    --primary-color: #008000; /* اللون الأساسي: الأخضر السوري */
    --secondary-color: #4CAF50; /* درجة أفتح من الأخضر */
    --accent-green: #008000; /* الأخضر السوري الأساسي */
    --accent-white: #FFFFFF; /* الأبيض السوري */
    --accent-black: #000000; /* الأسود السوري */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif; /* خط عربي جميل */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    direction: rtl; /* اتجاه الكتابة من اليمين لليسار للعربية */
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: var(--accent-black); /* لون أسود لرأس الموقع */
    color: var(--accent-white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* للسماح بالعناصر بالتجاوب */
}

header h1 {
    margin: 0;
    color: var(--accent-white);
    font-size: 1.8rem;
}

header nav ul {
    display: flex;
    gap: 20px;
}

header nav a {
    color: var(--accent-white);
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--accent-green); /* أخضر عند التحويم */
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    margin: 5px;
}

.button.primary {
    background-color: var(--accent-green); /* زر أخضر للتسجيل */
    color: var(--accent-white);
    border: 1px solid var(--accent-green);
}

.button.primary:hover {
    background-color: #006400; /* أخضر أغمق عند التحويم */
    border-color: #006400;
}

.button.secondary {
    background-color: transparent;
    color: var(--accent-white);
    border: 1px solid var(--accent-white);
}

.button.secondary:hover {
    background-color: var(--accent-white);
    color: var(--accent-black);
}

.button.call-to-action {
    background-color: var(--primary-color); /* لون أخضر لزر "ابدأ الآن" */
    color: var(--accent-white);
    font-size: 1.2rem;
    padding: 12px 25px;
    border: none;
}

.button.call-to-action:hover {
    background-color: #006400; /* أخضر أغمق عند التحويم */
}

.button.small {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}

.button.full-width {
    width: 100%;
    margin-top: 15px;
}


/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x600?text=Syrian+Landscape') no-repeat center center/cover; /* صورة خلفية للمناظر السورية لاحقاً */
    color: var(--accent-white);
    text-align: center;
    padding: 80px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* How It Works Section */
.how-it-works {
    background-color: var(--accent-white);
    padding: 60px 0;
    text-align: center;
}

.how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--accent-black);
}

.how-it-works .steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.how-it-works .step {
    flex: 1;
    min-width: 250px;
    max-width: 280px;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--light-bg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.how-it-works .step:hover {
    transform: translateY(-5px);
}

.how-it-works .step img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    background-color: var(--accent-green);
    object-fit: cover;
}

.how-it-works .step h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent-black);
}

.how-it-works .step p {
    color: var(--text-color);
}

/* Featured Surveys Section */
.featured-surveys {
    padding: 60px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.featured-surveys h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--accent-black);
}

.featured-surveys .survey-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.featured-surveys .card {
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 30px;
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-align: right; /* محاذاة النص لليمين */
    transition: transform 0.3s ease;
}

.featured-surveys .card:hover {
    transform: translateY(-5px);
}

.featured-surveys .card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--accent-black);
}

.featured-surveys .card p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.featured-surveys .card .points {
    display: inline-block;
    background-color: var(--accent-green); /* نقاط بلون أخضر */
    color: var(--accent-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--accent-white);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

footer .footer-links a {
    color: var(--accent-white);
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .footer-links a:hover {
    color: var(--accent-green);
}

/* Rewards Page Styles */
.rewards-section {
    padding: 60px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.rewards-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-black);
}

.rewards-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 50px;
}

.reward-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.reward-card {
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 30px;
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    text-align: right; /* محاذاة النص لليمين */
    transition: transform 0.3s ease;
}

.reward-card:hover {
    transform: translateY(-5px);
}

.reward-card img {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 5px;
    display: block; /* لجعل الصورة تأخذ عرض كامل وتتمركز */
    margin-right: auto; /* لتوسيط الصورة في الاتجاه الأفقي */
    margin-left: auto; /* لتوسيط الصورة في الاتجاه الأفقي */
}

.reward-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent-black);
}

.reward-card p {
    color: var(--text-color);
    margin-bottom: 20px;
}

.reward-card ul {
    margin-bottom: 25px;
    padding-right: 20px; /* مسافة قائمة لليسار للعربية */
}

.reward-card li {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
    position: relative;
}

.reward-card li::before {
    content: '•'; /* نقطة القائمة */
    color: var(--accent-green);
    position: absolute;
    right: -20px; /* تحديد موقع النقطة */
    top: 0;
}

.reward-card .points-cost {
    background-color: var(--accent-black); /* لون أسود للنقاط المطلوبة */
    color: var(--accent-white);
    padding: 3px 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-left: 10px; /* مسافة عن النص */
}

.redeem-button {
    width: 100%;
    padding: 12px 0;
    font-size: 1.1rem;
}

.user-points-info {
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.user-points-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-black);
}

.user-points-info #current-points {
    color: var(--primary-color); /* أصبح أخضر الآن */
    font-weight: bold;
}

/* --- Auth Page Styles --- */
.auth-page-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px); /* يضمن أن الصفحة تأخذ ارتفاع الشاشة مع الأخذ بالاعتبار الهيدر والفوتر */
    padding: 40px 0;
    background-color: var(--light-bg);
}

.auth-form-section .container {
    max-width: 500px;
    background-color: var(--accent-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: right; /* محاذاة لليمين */
}

.auth-switcher {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.auth-switcher button {
    flex: 1;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.auth-switcher button.active {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.auth-switcher button:hover:not(.active) {
    color: var(--primary-color);
}

.auth-form h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--accent-black);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    direction: rtl; /* للغات من اليمين لليسار */
    text-align: right;
}

.form-group input:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.2); /* ظل أخضر خفيف */
}

.forgot-password-link,
.terms-text {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.forgot-password-link:hover,
.terms-text a:hover {
    color: var(--accent-green);
}

.auth-form.hidden {
    display: none;
}

.auth-form {
  max-width: 100%;
  width: 100%;
  padding: 30px;
  background-color: var(--accent-white);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* --- Surveys List Page Styles --- */
.surveys-list-section {
    padding: 60px 0;
    background-color: var(--light-bg);
    text-align: center;
}

.surveys-list-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-black);
}

.surveys-list-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
}

.filter-sort-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap; /* لتجاوب أفضل */
}

.filter-sort-bar select,
.filter-sort-bar .search-input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--accent-white);
    color: var(--text-color);
    direction: rtl; /* لليمين لليسار */
    text-align: right; /* محاذاة لليمين */
}

.filter-sort-bar select:focus,
.filter-sort-bar .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 128, 0, 0.2);
}

.search-input {
    flex-grow: 1;
    max-width: 300px; /* لتحديد حجم حقل البحث */
}

.survey-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* تخطيط شبكي متجاوب */
    gap: 30px;
    margin-bottom: 40px;
}

.survey-card-item { /* استخدام نفس تنسيق card مع تعديلات بسيطة */
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: right;
    transition: transform 0.3s ease;
}

.survey-card-item:hover {
    transform: translateY(-5px);
}

.survey-card-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--accent-black);
}

.survey-card-item p {
    color: var(--text-color);
    margin-bottom: 15px;
}

.survey-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: flex-end; /* محاذاة لليمين */
    flex-wrap: wrap;
}

.survey-meta span {
    background-color: var(--secondary-color); /* لون أخضر فاتح للمعلومات الإضافية */
    color: var(--accent-white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.load-more-button {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* --- Single Survey Page Styles --- */
.single-survey-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.survey-header-details {
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 40px;
    text-align: right;
    border-right: 5px solid var(--accent-green); /* شريط أخضر على اليمين */
}

.survey-header-details h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-black);
}

.survey-header-details .survey-meta {
    justify-content: flex-end; /* محاذاة لليمين */
}

.survey-form {
    background-color: var(--accent-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    padding: 40px;
    text-align: right;
}

.form-question {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color); /* خط منقط بين الأسئلة */
}

.form-question:last-child {
    border-bottom: none; /* لا يوجد خط بعد آخر سؤال */
}

.question-text {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--accent-black);
}

.options-group label {
    display: block;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
    cursor: pointer;
    position: relative; /* لتحديد مكان checkbox/radio */
    padding-right: 30px; /* مسافة لـ checkbox/radio */
}

.options-group input[type="radio"],
.options-group input[type="checkbox"] {
    margin-left: 10px; /* مسافة بين النص والزر */
    /* إخفاء الافتراضي وتخصيص المظهر */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%; /* لجعل الراديو دائري */
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    right: 0;
    top: 2px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.options-group input[type="checkbox"] {
    border-radius: 4px; /* لجعل التشيك بوكس مربع */
}

.options-group input[type="radio"]:checked,
.options-group input[type="checkbox"]:checked {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

.options-group input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-white);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.options-group input[type="checkbox"]:checked::after {
    content: '✔'; /* علامة صح */
    color: var(--accent-white);
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.options-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical; /* للسماح بتغيير ارتفاع النص فقط */
    direction: rtl;
    text-align: right;
}

.options-group textarea.hidden {
    display: none;
}

.survey-navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.survey-navigation-buttons .button {
    flex: 1;
    min-width: 150px;
}

/* --- Contact Page Styles --- */
.contact-page-main {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.contact-section .container {
    max-width: 900px;
    background-color: var(--accent-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-black);
}

.contact-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
}

.contact-content {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap; /* للتجاوب */
}

.contact-form {
    flex: 2;
    min-width: 300px;
    max-width: 500px;
    text-align: right; /* محاذاة النموذج لليمين */
}

.contact-info {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    text-align: right; /* محاذاة معلومات الاتصال لليمين */
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent-black);
    text-align: center; /* عنوان معلومات الاتصال في المنتصف */
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
    display: flex; /* لترتيب الأيقونة والنص */
    align-items: center;
    gap: 10px; /* مسافة بين الأيقونة والنص */
}

.contact-info p i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center; /* توسيط أيقونات السوشيال ميديا */
    gap: 20px;
}

.social-links a {
    color: var(--accent-black);
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-green);
}
/* --- Terms Page Styles --- */
.terms-page-main {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.terms-section .container {
    max-width: 900px;
    background-color: var(--accent-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: right; /* محاذاة النص لليمين */
}

.terms-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--accent-black);
    text-align: center; /* عنوان الصفحة في المنتصف */
}

.terms-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
    text-align: center; /* العنوان الفرعي في المنتصف */
}

.terms-content h3 {
    font-size: 1.6rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color); /* عناوين الأقسام بلون أخضر */
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.terms-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.terms-content ul {
    list-style: disc; /* نقاط القائمة */
    padding-right: 25px; /* مسافة لليمين للقائمة */
    margin-bottom: 20px;
}

.terms-content ul li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-color);
}

.terms-content .highlight-text {
    background-color: #e6ffe6; /* خلفية خضراء فاتحة جداً */
    border-right: 5px solid var(--accent-green); /* شريط أخضر على اليمين */
    padding: 15px 20px;
    margin: 20px 0;
    font-weight: bold;
    color: var(--accent-black);
}

.terms-content .date-updated {
    text-align: left; /* تاريخ التحديث على اليسار */
    font-size: 0.9rem;
    color: #666;
    margin-top: 40px;
}
/* --- Progress Bar Styles for Survey --- */
.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 20px;
    margin-bottom: 30px;
    height: 30px; /* ارتفاع شريط التقدم */
    position: relative;
    overflow: hidden; /* لإخفاء أي جزء زائد من الشريط */
}



.progress-text {
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 30px;
    text-align: center;
    color: var(--accent-black); /* لون النص فوق الشريط */
    font-weight: bold;
    z-index: 1; /* للتأكد من أن النص يظهر فوق الشريط */
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* خلفية معتمة */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* لضمان ظهورها فوق كل شيء */
}

.modal-content {
    background-color: var(--accent-white);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9); /* تأثير صغير عند الظهور */
    transition: transform 0.3s ease-out;
}

.modal-overlay.visible .modal-content {
    transform: scale(1); /* ارجع للحجم الطبيعي عند الظهور */
}


.modal-content .close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-color);
}

.modal-content .close-button:hover {
    color: var(--primary-color);
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border-radius: 50%;
    background-color: var(--accent-green);
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain; /* للتأكد من أن الأيقونة تظهر بشكل جيد */
}

.modal-content h3 {
    font-size: 2rem;
    color: var(--accent-black);
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-content p span {
    font-weight: bold;
    color: var(--primary-color); /* لجعل النقاط بارزة */
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px; /* المسافة بين الأزرار */
}

.modal-buttons .button {
    padding: 12px 25px;
    font-size: 1rem;
    min-width: 150px;
}

/* Utility class to hide/show */
.hidden {
    display: none !important;
}
.visible {
    display: flex !important; /* لضمان ظهور ال overlay كـ flexbox */
}


/* 
================================================
  Dashboard Page Styles
  (تم نقلها هنا وإصلاح التعارضات)
================================================
*/
.dashboard-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  direction: rtl;
  text-align: right;
}

.dashboard-header {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lead {
  font-size: 1.25rem;
  margin-top: 1rem;
}

.highlight {
  color: var(--primary-color);
  font-weight: bold;
}

.dashboard-section {
  margin-top: 2rem;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-card {
  background: var(--accent-white);
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashboard-card.empty {
  text-align: center;
  font-style: italic;
  background: #f1f1f1;
}

.auth-warning {
  background: #fff3cd;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #ffeeba;
  color: #856404;
}

.badge-status {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

.status-accepted {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

/*
================================================
  NEW - Modern Dashboard Design
================================================
*/

.dashboard-page-main {
    padding: 40px 0;
    background-color: var(--light-bg);
}

/* استخدمنا هذا الكلاس في HTML بدلاً من .dashboard-container لتجنب التعارض */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-welcome {
    margin-bottom: 30px;
    padding: 25px;
    background-color: var(--accent-white);
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.dashboard-welcome h1 {
    font-size: 2rem;
    color: var(--accent-black);
    margin-bottom: 5px;
}

.dashboard-welcome p {
    font-size: 1.1rem;
    color: #555;
}

.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: flex-start;
}


/* تنسيقات العمود الجانبي */
.dashboard-sidebar .dashboard-card {
    padding: 25px;
}

.user-profile-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.user-profile-card ul {
    list-style: none;
    padding: 0;
}

.user-profile-card li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 18px;
}

.user-profile-card li i {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-style: normal; /* لإزالة الميلان إذا كنت تستخدم وسوم i */
}

.user-profile-card li strong {
    color: var(--accent-black);
}

/* تنسيقات المحتوى الرئيسي */
.dashboard-main h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent-black);
}

.survey-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.survey-item {
    padding: 20px;
    transition: all 0.3s ease;
}

.survey-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.survey-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.survey-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--accent-black);
}

.survey-meta-info {
    font-size: 0.9rem;
    color: #666;
}

/* 
================================================
  NEW - Responsive Styles for Dashboard
================================================
*/
/* أضف هذا الكود داخل الـ media query الموجودة لديك */

/* @media (max-width: 992px) { ... }  <-- يفضل استخدام هذا القياس للداشبورد */
/* إذا كانت لديك فقط 768px، يمكنك إضافته بداخلها */

@media (max-width: 992px) {
    .dashboard-grid-layout {
        /* تحويل التخطيط إلى عمود واحد في الشاشات الأصغر */
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        /* تغيير ترتيب العناصر لتظهر البطاقة الشخصية أولاً */
        order: -1;
    }
}

@media (max-width: 768px) {
    .dashboard-welcome h1 {
        font-size: 1.6rem;
    }
    .survey-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .survey-item .button {
        width: 100%;
        text-align: center;
    }
}


/* 
================================================
  Responsive Design 
  (للتجاوب مع شاشات الجوال والتابلت)
================================================
*/
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .auth-buttons {
        margin-top: 15px;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .how-it-works .steps,
    .featured-surveys .survey-cards {
        flex-direction: column;
        align-items: center;
    }

    .how-it-works .step,
    .featured-surveys .card {
        width: 90%;
        max-width: 400px;
    }

    footer .container {
        flex-direction: column;
    }

    /* Responsive for new pages */
    .auth-form-section .container {
        padding: 25px;
        margin: 0 15px;
    }

    .auth-switcher button {
        font-size: 1rem;
        padding: 10px 0;
    }

    .filter-sort-bar {
        flex-direction: column;
        gap: 15px;
    }

    .filter-sort-bar select,
    .filter-sort-bar .search-input {
        width: 100%;
        max-width: 100%;
    }

    .survey-cards-grid {
        grid-template-columns: 1fr; /* عمود واحد على الجوال */
    }

    .survey-header-details h2 {
        font-size: 1.8rem;
    }

    .survey-form {
        padding: 25px;
    }

    .question-text {
        font-size: 1.15rem;
    }

    .options-group label {
        font-size: 1rem;
        padding-right: 25px; /* مسافة أقل لـ checkbox/radio */
    }

    .options-group input[type="radio"],
    .options-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
        top: 0px;
    }

    .survey-navigation-buttons {
        flex-direction: column;
    }

    /* Contact Page Responsive */
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }

    .contact-form,
    .contact-info {
        width: 100%;
        max-width: 100%;
        padding: 25px;
    }
}

/* Fix for hidden form inputs */
.form-check-input {
  position: static !important;
}

/* Fix for mobile */
.form-check-input[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.progress {
    position: static !important;
}


/* إصلاح مشكلة الجدول - أضف هذا في نهاية ملف الـ CSS */
.matrix-table table {
    width: 100% !important;
    min-width: 100% !important;
}

.matrix-table .table-bordered th,
.matrix-table .table-bordered td {
    padding: 0.75rem !important;
    border: 1px solid #dee2e6 !important;
}

.matrix-table th,
.matrix-table td {
    padding: 0.75rem !important;
    white-space: nowrap;
}

/* إصلاح المسافات الداخلية للجدول */
.table-bordered th, 
.table-bordered td {
    padding: 0.75rem !important;
    border: 1px solid #dee2e6 !important;
}

/* تم حذف كتلة القواعد القديمة المتعلقة بـ .options-group input[type="radio"], .options-group input[type="checkbox"] */

/* قواعد جديدة مبسطة ومصححة لأزرار الراديو داخل الجداول المصفوفية */
.matrix-table .form-check-input {
    position: relative !important;
    margin: 0 !important;
    width: 1.2em !important;
    height: 1.2em !important;
}

.matrix-table .form-check-input:checked {
    background-color: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
}

/* تأكد من ظهور أزرار الراديو العامة بشكل صحيح */
.form-check-input[type="radio"] {
    position: static !important;
    margin-top: 0 !important;
}

/* ==================================================== */
/* أنماط التكديس التلقائي لنظام المطابقة (Matching System) */
/* ==================================================== */

/* 1. الحاوية العامة التي ستستخدم التكديس التلقائي (الشبكة/Grid) */
.auto-grid-container {
    display: grid;
    /* 🔑 المفتاح: تكرار تلقائي للأعمدة (auto-fit) */
    /* كل عمود يجب أن يكون عرضه 200px كحد أدنى و 1fr كحد أقصى (للتوزيع المتساوي) */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 15px; /* المسافة التلقائية بين العناصر (الخيارات/الأهداف) */
    padding: 10px 0;
}

/* ---------------------------------------------------- */
/* 2. الأنماط الخاصة بالخيارات (SOURCE) - الترتيب الأفقي */
/* ---------------------------------------------------- */
.matching-source.auto-grid-container {
    /* تطبيق التكديس التلقائي للخيارات */
    border: 2px dashed #007bff;
    min-height: 120px;
    border-radius: 8px;
    /* جعل العناصر متراصة من الأعلى */
    align-items: flex-start; 
}

/* العنصر القابل للسحب (Choice Item) داخل الشبكة */
.matching-source.auto-grid-container .matching-item {
    /* العناصر تحتاج لأن تشغل مساحة Grid بالكامل */
    width: 100%; 
    height: auto;
    margin: 0; /* إلغاء الهامش الداخلي الذي يتعارض مع Grid Gap */
    text-align: center;
}

/* ---------------------------------------------------- */
/* 3. الأنماط الخاصة بالأهداف (TARGETS) - الترتيب الأفقي والتكديس */
/* ---------------------------------------------------- */
.targets-wrapper.auto-grid-container {
    /* تطبيق التكديس التلقائي للأهداف */
    min-height: 150px;
}

/* العنصر الهدف (البطاقة الكاملة) داخل الشبكة */
.targets-wrapper .matching-target {
    /* ضمان أن الهدف يملأ مساحة الشبكة بالكامل */
    width: 100%;
    height: 100%;
    /* استخدام Flex داخلياً لضمان تناسق ارتفاع محتوى البطاقة */
    display: flex;
    flex-direction: column;
}

/* لجعل محتوى البطاقة يمتد بشكل متساوٍ */
.targets-wrapper .matching-target .card-body {
    flex-grow: 1; 
}

/* ---------------------------------------------------- */
/* 4. الأنماط الأساسية للحاويات والمحتوى */
/* ---------------------------------------------------- */

.matching-item {
    padding: 8px 10px; 
    background: #ffffff; 
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: grab; 
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    /* margin: 0; يجب أن يكون صفراً بسبب استخدام Grid Gap */
}

.matching-target-dropzone {
    border: 1px dashed #adb5bd;
    background: #f8f9fa;
    min-height: 50px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.empty-dropzone-hint {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}



/*
 * حاوية الاستجابة الرئيسية - تم التعديل
 */
.hotspot-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

/*
 * حاوية الصورة الأساسية - تم التعديل
 */
.hotspot-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    width: fit-content;
    margin: 0 auto;
}

/*
 * غلاف الصورة المتجاوب - تم التعديل
 */
.hotspot-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/*
 * الصورة المتجاوبة - تم التعديل
 */
.hotspot-responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    
    /* للحفاظ على نسبة العرض إلى الارتفاع */
    object-fit: contain;
    
    /* حدود قصوى اختيارية حسب احتياجاتك */
    max-height: 70vh; /* لا تتعدى 70% من ارتفاع الشاشة */
    
    /* إضافة لضمان التوسيط */
    width: auto;
    max-width: 100%;
}

/*
 * تنسيق المؤشر الأساسي (Hotspot Marker) - بدون تغيير
 */
.hotspot-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 0, 0.75);
    border-radius: 50%;
    border: 3px solid #ffffff;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    
    /* تأكد من أن المؤشر يتناسب مع حجم الصورة */
    pointer-events: auto;
}

/*
 * تنسيق زر الإزالة (Hotspot Remove Button) - بدون تغيير
 */
.hotspot-remove-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #000;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
    border: 2px solid white;
}

/* وسائط استجابة إضافية للأجهزة المختلفة - تم التعديل */

/* للأجهزة اللوحية */
@media (max-width: 768px) {
    .hotspot-responsive-image {
        max-height: 60vh;
    }
    
    .hotspot-container {
        width: 95%;
    }
    
    .hotspot-marker {
        width: 18px;
        height: 18px;
    }
    
    .hotspot-remove-btn {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 12px;
    }
}

/* للهواتف المحمولة */
@media (max-width: 480px) {
    .hotspot-responsive-image {
        max-height: 50vh;
    }
    
    .hotspot-container {
        width: 98%;
    }
    
    .hotspot-marker {
        width: 16px;
        height: 16px;
        border: 2px solid #ffffff;
    }
    
    .hotspot-remove-btn {
        width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 11px;
        top: -8px;
        right: -8px;
    }
    
    [id^="hotspot-counter-"] {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* للشاشات الكبيرة جداً */
@media (min-width: 1200px) {
    .hotspot-responsive-wrapper {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .hotspot-container {
        max-width: 80%;
    }
}

/* تأكد من أن الصورة لا تتمدد بشكل مفرط على الشاشات الكبيرة */
.hotspot-responsive-image {
    width: auto;
    max-width: 100%;
}

/* إضافة فصول مساعدة إضافية */
.text-center {
    text-align: center !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ============================================= */
/* 🔑 أنماط خاصة بعرض الفيديو مع آلية التحقق */
/* ============================================= */

.video-status {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    border-right: 4px solid #007bff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-status.completed {
    background: linear-gradient(135deg, #e7f5ee 0%, #d4edda 100%);
    border-right-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.video-status.watching {
    background: linear-gradient(135deg, #e7f3ff 0%, #d6e9ff 100%);
    border-right-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
}

.video-progress {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.video-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.video-progress-bar.completed {
    background: linear-gradient(90deg, #28a745, #1e7e34);
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.video-controls button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
}

.video-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-controls .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

.video-controls .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* تحسينات للفيديو نفسه */
.video-container video,
.video-container iframe {
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
    transition: all 0.3s ease;
}

.video-container video:hover,
.video-container iframe:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .video-status {
        padding: 15px;
        margin-top: 15px;
    }
    
    .video-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .video-controls button {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .video-container video {
        max-height: 300px;
    }
}

/* تحسينات للرسائل والإشعارات */
#videoWarning {
    border-radius: 10px;
    border-right: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

/* تحسينات للبادجات */
.video-status .badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 20px;
}

/* تأثيرات تفاعلية */
.video-container {
    transition: all 0.3s ease;
}

.video-container:focus-within {
    transform: translateY(-5px);
}

/* تحسينات للعناوين */
.video-status h5 {
    font-weight: 700;
    color: #2c3e50;
}

/* تحسينات للألوان */
.video-status .text-dark {
    color: #2c3e50 !important;
}

.video-status .text-primary {
    color: #3498db !important;
}

/* تحسينات للظلال */
.video-status,
.video-container video,
.video-container iframe {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
  transform: rotate(90deg);
  transform-origin: 50% 50%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
}

.progress-container {
  position: relative;
  display: inline-block;
}

.redeem-info {
  font-size: 0.85rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}