/* =============================================
   التمكين الاجتماعي - النمط البصري الرئيسي
   الهوية البصرية لوزارة الموارد البشرية
   ============================================= */

:root {
    --clr-orange:   #F59620;   /* Pantone 1375 C */
    --clr-yellow:   #FAB414;   /* Pantone 1235 C */
    --clr-green:    #2DB473;   /* Pantone 3385 C */
    --clr-teal:     #148287;   /* Pantone 2237 C */
    --clr-navy:     #144159;   /* Pantone 3025 C */
    --clr-light:    #f8f9fa;
    --clr-dark:     #1a1a2e;
    --gradient-main: linear-gradient(135deg, var(--clr-teal) 0%, var(--clr-navy) 100%);
    --gradient-warm: linear-gradient(135deg, var(--clr-orange) 0%, var(--clr-yellow) 100%);
    --gradient-green: linear-gradient(135deg, var(--clr-green) 0%, var(--clr-teal) 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font-ar: 'Cairo', 'Tajawal', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-ar);
    direction: rtl;
    background: #f0f4f8;
    color: #2d3748;
    min-height: 100vh;
}

/* =============================================
   شريط الوزارة العلوي
   ============================================= */
.ministry-bar {
    background: var(--clr-navy);
    border-bottom: 2px solid var(--clr-teal);
    font-family: var(--font-ar);
}
.ministry-logo-img {
    height: 38px;
    object-fit: contain;
}
.ministry-emblem {
    flex-shrink: 0;
}
.ministry-name-wrap {
    line-height: 1.3;
}
.ministry-name-ar {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.ministry-name-en {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.55);
    white-space: nowrap;
}
.ministry-initiative {
    font-size: 0.8rem;
    color: var(--clr-yellow);
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .ministry-name-en,
    .ministry-initiative { display: none; }
    .ministry-name-ar    { font-size: 0.72rem; }
}

/* =============================================
   الروابط والأزرار
   ============================================= */
a { color: var(--clr-teal); text-decoration: none; }
a:hover { color: var(--clr-navy); }

.btn-primary   { background: var(--clr-teal);   border-color: var(--clr-teal);   color: #fff; }
.btn-primary:hover { background: var(--clr-navy); border-color: var(--clr-navy); }
.btn-success   { background: var(--clr-green);  border-color: var(--clr-green);  color: #fff; }
.btn-warning   { background: var(--clr-orange); border-color: var(--clr-orange); color: #fff; }
.btn-info      { background: var(--clr-yellow); border-color: var(--clr-yellow); color: #fff; }
.btn-gradient  { background: var(--gradient-main); border: none; color: #fff; }
.btn-gradient:hover { opacity: 0.9; color: #fff; }

/* =============================================
   البطاقات
   ============================================= */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-header {
    border-radius: var(--radius) var(--radius) 0 0 !important;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

/* =============================================
   بطاقات الإحصاءات KPI
   ============================================= */
.kpi-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.kpi-card::after {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.kpi-card .kpi-value { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.kpi-card .kpi-label { font-size: 0.9rem; opacity: 0.9; margin-top: 0.3rem; }
.kpi-card .kpi-icon  { font-size: 2.5rem; opacity: 0.3; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); }
.kpi-card .kpi-sub   { font-size: 0.8rem; opacity: 0.8; margin-top: 0.5rem; }

.kpi-teal   { background: var(--gradient-main); }
.kpi-green  { background: var(--gradient-green); }
.kpi-orange { background: var(--gradient-warm); }
.kpi-navy   { background: linear-gradient(135deg, var(--clr-navy) 0%, #0d2d45 100%); }

/* =============================================
   الرأس العام للصفحات العامة
   ============================================= */
.public-header {
    background: var(--gradient-main);
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.public-header .navbar-brand img { height: 55px; }
.public-header .nav-link { color: rgba(255,255,255,0.9) !important; font-weight: 500; padding: 1rem 0.8rem !important; }
.public-header .nav-link:hover,
.public-header .nav-link.active { color: #fff !important; border-bottom: 3px solid var(--clr-orange); }

/* =============================================
   قسم الترحيب (Hero)
   ============================================= */
.hero-section {
    background: var(--gradient-main);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../images/pattern.svg') repeat;
    opacity: 0.05;
}
.hero-title   { font-size: 3rem; font-weight: 700; line-height: 1.3; }
.hero-subtitle{ font-size: 1.15rem; opacity: 0.9; line-height: 1.8; }

/* =============================================
   بطاقات البرامج التدريبية
   ============================================= */
.program-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.program-card .program-badge {
    position: absolute;
    top: 1rem; right: 1rem;
}
.program-card .card-header {
    background: var(--gradient-main);
    color: #fff;
    padding: 1.5rem;
}
.program-card .trainer-badge {
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.program-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1.5px solid;
    justify-content: center;
}
.program-links a:hover { transform: scale(1.02); }
.link-register   { color: var(--clr-green);  border-color: var(--clr-green);  }
.link-attend     { color: var(--clr-teal);   border-color: var(--clr-teal);   }
.link-pre        { color: var(--clr-orange); border-color: var(--clr-orange); }
.link-post       { color: var(--clr-navy);   border-color: var(--clr-navy);   }
.link-satisfy    { color: var(--clr-yellow); border-color: var(--clr-yellow); }
.link-register:hover  { background: var(--clr-green);  color: #fff; }
.link-attend:hover    { background: var(--clr-teal);   color: #fff; }
.link-pre:hover       { background: var(--clr-orange); color: #fff; }
.link-post:hover      { background: var(--clr-navy);   color: #fff; }
.link-satisfy:hover   { background: var(--clr-yellow); color: #fff; }

/* =============================================
   الفوتر
   ============================================= */
.site-footer {
    background: var(--clr-navy);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
}
.site-footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a  { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* =============================================
   قسم التميز / الإحصاءات
   ============================================= */
.stats-bar {
    background: var(--gradient-warm);
    color: #fff;
    padding: 2rem 0;
}
.stats-bar .stat-item { text-align: center; padding: 0 1rem; }
.stats-bar .stat-value { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.stats-bar .stat-label { font-size: 0.9rem; opacity: 0.9; }
.stats-bar .divider {
    width: 1px;
    background: rgba(255,255,255,0.3);
    margin: 0 1rem;
}

/* =============================================
   الخطوط التوضيحية والعناوين
   ============================================= */
.section-title {
    position: relative;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--clr-navy);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: var(--gradient-warm);
}
.section-title.center::after { right: 50%; transform: translateX(50%); }

/* =============================================
   النماذج
   ============================================= */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #e2e8f0;
    padding: 0.6rem 1rem;
    font-family: var(--font-ar);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--clr-teal);
    box-shadow: 0 0 0 3px rgba(20,130,135,0.15);
    outline: none;
}
.form-label { font-weight: 600; color: var(--clr-navy); font-size: 0.9rem; margin-bottom: 0.4rem; }
.input-group-text { background: #f8f9fa; border-radius: var(--radius-sm); }

/* =============================================
   شريط التقدم
   ============================================= */
.progress { border-radius: 50px; background: #e9ecef; }
.progress-bar { border-radius: 50px; transition: width 1s ease; }

/* =============================================
   الجداول
   ============================================= */
.table-custom thead {
    background: var(--gradient-main);
    color: #fff;
}
.table-custom thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    white-space: nowrap;
}
.table-custom tbody tr:hover { background: rgba(20,130,135,0.05); }
.table-custom tbody td { padding: 0.9rem 1rem; vertical-align: middle; }

/* =============================================
   الرسائل والتنبيهات
   ============================================= */
.alert { border-radius: var(--radius); border: none; }
.alert-success { background: rgba(45,180,115,0.1); color: #1a5c3a; }
.alert-danger  { background: rgba(220,53,69,0.1);  color: #842029;  }
.alert-info    { background: rgba(20,130,135,0.1); color: #0c5460;  }
.alert-warning { background: rgba(245,150,30,0.1); color: #856404;  }

/* =============================================
   الشارات
   ============================================= */
.badge { border-radius: 50px; padding: 0.4em 0.9em; font-weight: 600; font-size: 0.78rem; }
.badge.bg-primary { background: var(--clr-teal) !important; }
.badge.bg-success { background: var(--clr-green) !important; }
.badge.bg-warning { background: var(--clr-orange) !important; }
.badge.bg-info    { background: var(--clr-yellow) !important; color: var(--clr-navy) !important; }

/* =============================================
   أيقونات وعناصر بصرية
   ============================================= */
.icon-circle {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.icon-teal   { background: rgba(20,130,135,0.15); color: var(--clr-teal); }
.icon-green  { background: rgba(45,180,115,0.15); color: var(--clr-green); }
.icon-orange { background: rgba(245,150,30,0.15); color: var(--clr-orange); }
.icon-navy   { background: rgba(20,65,89,0.15);   color: var(--clr-navy); }

/* =============================================
   المخططات البيانية
   ============================================= */
.chart-container {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* =============================================
   الاستجابة للشاشات الصغيرة
   ============================================= */
@media (max-width: 768px) {
    .hero-title    { font-size: 2rem; }
    .kpi-card .kpi-value { font-size: 1.6rem; }
    .stats-bar .stat-value { font-size: 1.8rem; }
    .section-title { font-size: 1.4rem; }
    .program-links a { font-size: 0.78rem; padding: 0.4rem 0.5rem; }
}

/* =============================================
   تأثيرات الظهور
   ============================================= */
.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* =============================================
   شريط التنقل للاستبيانات العامة
   ============================================= */
.survey-container {
    max-width: 720px;
    margin: 2rem auto;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.survey-header {
    background: var(--gradient-main);
    color: #fff;
    padding: 2rem;
    text-align: center;
}
.survey-body { padding: 2rem; }
.survey-section-title {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--clr-navy) 0%, var(--clr-teal) 100%);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: .85rem 1.2rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}
.survey-section-title:first-child { margin-top: 0; }
.survey-section-title h5 { color: #fff !important; font-size: .95rem; }
.question-card {
    background: #f8fafc;
    border-right: 4px solid var(--clr-teal);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
}
.question-num {
    background: var(--clr-teal);
    color: #fff;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 0.5rem;
}
.rating-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.3rem; }
.rating-stars input { display: none; }
.rating-stars label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label { color: var(--clr-orange); }

/* =============================================
   صفحة الشكر
   ============================================= */
.thank-you-box {
    text-align: center;
    padding: 3rem;
}
.thank-you-box .check-icon {
    width: 80px; height: 80px;
    background: var(--gradient-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    margin: 0 auto 1.5rem;
    animation: pulse 2s infinite;
}
