/* ===== نظام التوجيه الذكي للتخصصات الجامعية ===== */
/* ===== الخطوط والألوان الأساسية ===== */

:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --secondary: #2c3e50;
    --accent: #27ae60;
    --accent-light: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    background-color: #fafbfc;
    line-height: 1.8;
}

/* ===== التدرج الأساسي ===== */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.bg-primary-soft {
    background-color: rgba(26, 82, 118, 0.08) !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-purple {
    color: #8e44ad !important;
}

/* ===== شريط التنقل ===== */
.navbar {
    padding: 0.8rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.navbar .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ===== قسم البطل (Hero) ===== */
.hero-section {
    background: linear-gradient(135deg, #0c2340 0%, #1a5276 30%, #2980b9 70%, #3498db 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.min-vh-75 {
    min-height: 70vh;
}

.hero-icon {
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.hero-illustration {
    position: relative;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== الأنيميشن ===== */
.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-delay-3 {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* ===== بطاقات الخطوات ===== */
.step-card {
    background: white;
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

/* ===== بطاقات المميزات ===== */
.feature-card {
    border-radius: 16px;
    transition: var(--transition);
    border: 2px solid transparent !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light) !important;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.1), rgba(41, 128, 185, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    transform: scale(1.1);
}

/* ===== شارات التخصصات ===== */
.spec-badge {
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.spec-badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* ===== الاستبيان ===== */
.quiz-step {
    transition: var(--transition);
}

.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;
    margin-left: 8px;
}

.question-text {
    line-height: 2;
}

.bg-primary-soft {
    background-color: rgba(26, 82, 118, 0.08);
}

/* مقياس 1-5 */
.scale-group {
    gap: 8px;
}

.scale-btn {
    border-radius: 12px !important;
    padding: 12px 8px;
    border: 2px solid #dee2e6 !important;
    transition: var(--transition);
    flex: 1;
}

.scale-btn:hover {
    border-color: var(--primary-light) !important;
    background-color: rgba(41, 128, 185, 0.05);
}

.btn-check:checked + .scale-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    border-color: var(--primary) !important;
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

.scale-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
}

.scale-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* خيارات الاختيار */
.choice-label {
    border: 2px solid #dee2e6;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.choice-label:hover {
    border-color: var(--primary-light);
    background-color: rgba(41, 128, 185, 0.03);
}

.choice-check {
    opacity: 0;
    transition: var(--transition);
    color: var(--accent);
}

.form-check-input:checked ~ .choice-label {
    border-color: var(--primary);
    background-color: rgba(26, 82, 118, 0.05);
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.15);
}

.form-check-input:checked ~ .choice-label .choice-check {
    opacity: 1;
}

.choice-selected {
    border-color: var(--primary) !important;
    background-color: rgba(26, 82, 118, 0.05) !important;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.15);
}

.choice-selected .choice-check {
    opacity: 1 !important;
}

/* خيارات الاستبيان - إخفاء radio الأصلي */
.choice-item .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.step-icon-large {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.1), rgba(41, 128, 185, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* شريط التقدم */
.progress-container {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* ===== صفحة النتائج ===== */
.result-header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.result-card {
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.result-card-top {
    border: 2px solid var(--warning-color);
}

.card-ribbon {
    position: absolute;
    top: 15px;
    left: -30px;
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
    padding: 4px 40px;
    font-size: 0.75rem;
    font-weight: 700;
    transform: rotate(45deg);
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
}

.rank-1 {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4);
}

.rank-3 {
    background: linear-gradient(135deg, #e67e22, #d35400);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

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

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.strength-item {
    transition: var(--transition);
    border: 2px solid transparent;
}

.strength-item:hover {
    border-color: var(--accent-light);
    transform: translateX(-5px);
}

/* ===== لوحة التحكم ===== */
.admin-link-card {
    border-radius: 16px;
    transition: var(--transition);
    color: var(--text-dark);
}

.admin-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--primary);
}

/* ===== صفحة الخطأ ===== */
.error-page {
    padding: 40px 0;
}

/* ===== التذييل ===== */
.footer-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
}

/* ===== الاستجابة ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .scale-btn {
        padding: 8px 4px;
    }

    .scale-value {
        font-size: 1rem;
    }

    .progress-container {
        top: 60px;
    }

    .result-card {
        margin-bottom: 15px;
    }
}

/* ===== تحسينات الجدول ===== */
.table th {
    font-weight: 700;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* ===== تأثيرات إضافية ===== */
.shadow-hover:hover {
    box-shadow: var(--shadow-lg) !important;
}

.card {
    border-radius: 12px;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1.05rem;
}

.badge {
    border-radius: 8px;
    font-weight: 600;
}

/* ===== تأثير التحميل ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-custom {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
