/* ===== HIG Branded Survey Theme ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1e3a5f;
    --primary-dark: #0f2440;
    --primary-light: #e8eef5;
    --accent: #c8a84e;
    --accent-dark: #a68a3e;
    --accent-light: #fdf6e3;
    --success: #059669;
    --success-light: #d1fae5;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    background: linear-gradient(180deg, #f0f4f8 0%, var(--gray-50) 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

.survey-container { max-width: 800px; margin: 0 auto; padding: 20px; }
.landing-page { max-width: 600px; margin: 40px auto; padding: 20px; text-align: center; }

/* HIG Header */
.survey-header.hig-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #1a3050 100%);
    color: white; padding: 40px 30px; border-radius: var(--radius);
    text-align: center; margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border-bottom: 4px solid var(--accent);
}
.survey-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.5px; }
.survey-header .subtitle { font-size: 1.4rem; font-weight: 600; opacity: 0.95; direction: rtl; }
.survey-header .description { margin-top: 15px; font-size: 0.95rem; opacity: 0.85; line-height: 1.7; }
.badge { display: inline-block; background: var(--accent); color: var(--primary-dark); padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; margin-top: 12px; font-weight: 600; }

/* Progress */
.progress-bar-container { position: sticky; top: 0; z-index: 100; background: white; padding: 10px 20px; box-shadow: var(--shadow); margin-bottom: 20px; border-radius: 0 0 var(--radius) var(--radius); }
.progress-bar { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; transition: width 0.3s; width: 0%; }
.progress-text { text-align: center; font-size: 0.8rem; color: var(--gray-500); margin-top: 5px; }

/* Scale Legend */
.scale-legend { background: white; border-radius: var(--radius); padding: 20px; margin-bottom: 25px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.scale-item { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--gray-600); }
.scale-number { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.8rem; }

/* Section */
.section { background: white; border-radius: var(--radius); padding: 30px; margin-bottom: 25px; box-shadow: var(--shadow); border-left: 4px solid var(--accent); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid var(--gray-100); }
.section-header h2 { font-size: 1.2rem; color: var(--primary); font-weight: 600; }
.section-header .section-title-ar { font-size: 1.15rem; color: var(--primary-dark); font-weight: 600; direction: rtl; }

/* Question */
.question { padding: 20px 0; border-bottom: 1px solid var(--gray-100); transition: background 0.3s; }
.question:last-child { border-bottom: none; padding-bottom: 0; }
.question-number { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--primary); color: white; border-radius: 50%; font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }
.question-text { font-size: 1rem; color: var(--gray-800); margin-bottom: 4px; font-weight: 500; }
.question-text-ar { font-size: 0.95rem; color: var(--gray-600); direction: rtl; text-align: right; margin-bottom: 15px; }

/* Likert — HIG themed */
.likert-options { display: flex; gap: 8px; flex-wrap: wrap; }
.likert-option { flex: 1; min-width: 100px; }
.likert-option input[type="radio"] { display: none; }
.likert-option label { display: block; text-align: center; padding: 12px 8px; border: 2px solid var(--gray-200); border-radius: 10px; cursor: pointer; transition: all 0.2s; font-size: 0.8rem; color: var(--gray-600); background: white; }
.likert-option label:hover { border-color: var(--accent); background: var(--accent-light); }
.likert-option input[type="radio"]:checked + label { border-color: var(--primary); background: var(--primary); color: white; font-weight: 600; box-shadow: var(--shadow-md); }
.likert-option .label-number { display: block; font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.likert-option .label-text-ar { display: block; font-size: 0.75rem; direction: rtl; }

/* Open-ended */
.open-textarea { width: 100%; min-height: 100px; padding: 15px; border: 2px solid var(--gray-200); border-radius: 10px; font-family: inherit; font-size: 0.95rem; resize: vertical; }
.open-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Submit */
.submit-section { text-align: center; padding: 30px; }
.btn-submit { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: var(--primary-dark); border: none; padding: 16px 60px; font-size: 1.1rem; font-weight: 700; border-radius: 10px; cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-md); }
.btn-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.submit-note { margin-top: 12px; font-size: 0.85rem; color: var(--gray-500); }

/* Messages */
.message-page { max-width: 600px; margin: 80px auto; padding: 20px; text-align: center; }
.message-card { background: white; border-radius: var(--radius); padding: 50px 40px; box-shadow: var(--shadow-lg); }
.message-icon { font-size: 4rem; margin-bottom: 20px; }
.message-card h2 { font-size: 1.5rem; color: var(--gray-800); margin-bottom: 10px; }
.message-card .text-ar { font-size: 1.2rem; color: var(--gray-600); direction: rtl; margin-top: 8px; }
.message-card.success { border-top: 4px solid var(--success); }
.message-card.error { border-top: 4px solid var(--danger); }

/* Footer */
.footer { text-align: center; padding: 30px 20px; color: var(--gray-400); font-size: 0.85rem; }
.footer strong { color: var(--gray-500); }
.footer-ar { direction: rtl; margin-top: 4px; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
    .survey-header h1 { font-size: 1.4rem; }
    .survey-header .subtitle { font-size: 1.1rem; }
    .section { padding: 20px; }
    .likert-option { min-width: 60px; }
    .likert-option label { padding: 10px 4px; font-size: 0.75rem; }
    .likert-option .label-text-ar { display: none; }
    .section-header { flex-direction: column; gap: 5px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .likert-options { flex-direction: column; }
    .likert-option { min-width: unset; }
    .likert-option label { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 15px; }
    .likert-option .label-number { margin-bottom: 0; }
    .likert-option .label-text-ar { display: inline; }
}
