/* ===================================================
   بوابة منح جامعة ميريت - التصميم المخصص والهوية البصرية
   Merit University Scholarship Portal - Comprehensive CSS
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --merit-navy: #0a2540;
    --merit-navy-dark: #06182a;
    --merit-navy-light: #153a63;
    --merit-gold: #d97706;
    --merit-gold-light: #f59e0b;
    --merit-gold-hover: #b45309;
    --merit-accent: #2563eb;
    --merit-success: #10b981;
    --merit-warning: #f59e0b;
    --merit-danger: #ef4444;
    --merit-bg-light: #f8fafc;
    --merit-card-border: #e2e8f0;
    --merit-text-main: #1e293b;
    --merit-text-muted: #64748b;
    --merit-shadow: 0 10px 25px -5px rgba(10, 37, 64, 0.08), 0 8px 10px -6px rgba(10, 37, 64, 0.04);
    --merit-shadow-lg: 0 20px 35px -5px rgba(10, 37, 64, 0.15), 0 10px 15px -5px rgba(10, 37, 64, 0.07);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
}

html, body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--merit-bg-light);
    color: var(--merit-text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==================== Top Bar & Header ==================== */
.merit-topbar {
    background-color: var(--merit-navy-dark);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.merit-navbar {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 3px solid var(--merit-gold);
}

.merit-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--merit-navy);
}

.merit-brand:hover {
    color: var(--merit-navy-light);
}

.merit-brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--merit-navy), var(--merit-navy-light));
    border: 2px solid var(--merit-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--merit-gold-light);
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
    flex-shrink: 0;
}

.merit-brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--merit-navy);
    line-height: 1.2;
}

.merit-brand-text span {
    font-size: 0.78rem;
    color: var(--merit-gold-hover);
    font-weight: 600;
    letter-spacing: 0.3px;
    display: block;
}

.nav-link {
    color: var(--merit-navy) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover, .nav-link.active {
    color: var(--merit-gold-hover) !important;
    background-color: rgba(217, 119, 6, 0.08);
}

/* ==================== Buttons ==================== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 600;
    padding: 8px 20px;
    transition: all 0.25s ease;
}

.btn-merit-gold {
    background: linear-gradient(135deg, var(--merit-gold), var(--merit-gold-hover));
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.btn-merit-gold:hover {
    background: linear-gradient(135deg, var(--merit-gold-hover), #92400e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
    color: #ffffff !important;
}

.btn-merit-navy {
    background: linear-gradient(135deg, var(--merit-navy), var(--merit-navy-light));
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.3);
}

.btn-merit-navy:hover {
    background: linear-gradient(135deg, var(--merit-navy-dark), var(--merit-navy));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 37, 64, 0.4);
    color: #ffffff !important;
}

.btn-merit-outline {
    background: transparent;
    color: var(--merit-navy) !important;
    font-weight: 700;
    border: 2px solid var(--merit-navy);
}

.btn-merit-outline:hover {
    background: var(--merit-navy);
    color: #ffffff !important;
}

/* ==================== Hero Section ==================== */
.merit-hero {
    background: linear-gradient(135deg, var(--merit-navy-dark) 0%, var(--merit-navy) 60%, #173d6b 100%);
    color: #ffffff;
    padding: 70px 0 80px;
    position: relative;
    overflow: hidden;
}

.merit-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.18) 0%, rgba(217, 119, 6, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(217, 119, 6, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--merit-gold-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--merit-gold-light);
    position: relative;
}

.hero-lead {
    font-size: 1.12rem;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 35px;
    max-width: 650px;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    color: #ffffff;
    transition: transform 0.3s ease;
}

.hero-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.hero-stat-icon {
    font-size: 2.2rem;
    color: var(--merit-gold-light);
    margin-bottom: 12px;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ==================== Cards & Panels ==================== */
.merit-card {
    background: #ffffff;
    border: 1px solid var(--merit-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--merit-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.merit-card:hover {
    box-shadow: var(--merit-shadow-lg);
    border-color: rgba(217, 119, 6, 0.3);
}

.merit-card-header {
    background: #ffffff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--merit-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merit-card-header-navy {
    background: linear-gradient(135deg, var(--merit-navy), var(--merit-navy-light));
    color: #ffffff;
    padding: 20px 24px;
    border-bottom: 3px solid var(--merit-gold);
}

.merit-card-body {
    padding: 24px;
}

/* ==================== Application Form Wizard ==================== */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 35px;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    right: 40px;
    left: 40px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.wizard-step-item {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.wizard-step-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
}

.wizard-step-item.active .wizard-step-circle {
    background: var(--merit-gold);
    border-color: var(--merit-gold-hover);
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.2);
}

.wizard-step-item.completed .wizard-step-circle {
    background: var(--merit-success);
    border-color: var(--merit-success);
    color: #ffffff;
}

.wizard-step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
}

.wizard-step-item.active .wizard-step-title {
    color: var(--merit-navy);
    font-weight: 700;
}

.form-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--merit-navy);
    border-right: 4px solid var(--merit-gold);
    padding-right: 12px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.form-control, .form-select {
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--merit-gold);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
}

.file-upload-box {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.25s ease;
    cursor: pointer;
}

.file-upload-box:hover {
    border-color: var(--merit-gold);
    background: #fffdfa;
}

.file-upload-icon {
    font-size: 1.8rem;
    color: var(--merit-gold);
    margin-bottom: 6px;
}

/* ==================== Status Badges ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-new { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-under-review { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-docs-required { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-preliminary { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-approved { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-rejected { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

.timeline-tracker {
    position: relative;
    padding: 20px 0;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
    position: relative;
}

.timeline-step::before {
    content: '';
    position: absolute;
    top: 36px;
    right: 18px;
    bottom: -28px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-step-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    z-index: 2;
}

.timeline-step.completed .timeline-step-icon {
    background: var(--merit-success);
    color: #ffffff;
}

.timeline-step.current .timeline-step-icon {
    background: var(--merit-gold);
    color: #ffffff;
    box-shadow: 0 0 0 5px rgba(217, 119, 6, 0.2);
}

.timeline-step-content h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--merit-navy);
}

.timeline-step-content p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

/* ==================== Footer ==================== */
.merit-footer {
    background: var(--merit-navy-dark);
    color: #cbd5e1;
    padding: 60px 0 25px;
    margin-top: auto;
    border-top: 4px solid var(--merit-gold);
}

.footer-brand h4 {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--merit-gold-light);
    padding-right: 5px;
}

.footer-bottom {
    margin-top: 45px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ==================== Utility Fixes ==================== */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-extrabold { font-weight: 800 !important; }
.letter-spacing-1 { letter-spacing: 1px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .wizard-steps::before { display: none; }
    .wizard-steps { flex-wrap: wrap; gap: 10px; }
    .wizard-step-circle { width: 38px; height: 38px; font-size: 0.9rem; }
    .wizard-step-title { font-size: 0.75rem; }
}

/* ==================== Print Stylesheet ==================== */
@media print {
    .no-print, .merit-navbar, .merit-topbar, .merit-footer, .btn, .breadcrumb {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
}
