/* =====================================================
   Legal Academy - Design System
   غيّر الألوان من هنا فقط
   ===================================================== */
:root {
  --burgundy: #ab041b;
  --burgundy-dark: #ac0b26;
  --burgundy-light: #ba051d;
  --gold: #C9A24B;
  --gold-dark: #A8832F;
  --gold-light: #E8D5A3;
  --ink: #2B2B2B;
  --gray: #6B6B6B;
  --light: #F8F5F0;
  --border: #E8E2D8;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .10);
  --shadow-lg: 0 18px 44px rgba(122, 31, 43, .18);
  --transition: .3s ease;
}
html[dir="rtl"] { --font-body: 'Cairo', Tahoma, sans-serif; --font-head: 'Cairo', Tahoma, sans-serif; }
html[dir="ltr"] { --font-body: 'Inter', system-ui, -apple-system, sans-serif; --font-head: 'Playfair Display', Georgia, serif; }

/* ===== الأساسيات ===== */
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); background: #fff; line-height: 1.75; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--burgundy-dark); font-weight: 700; line-height: 1.35; }
a { color: var(--burgundy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; height: auto; }
::selection { background: var(--gold); color: #fff; }

.skip-link { position: absolute; top: -50px; inset-inline-start: 10px; background: var(--burgundy); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 3000; }
.skip-link:focus { top: 10px; color: #fff; }

/* ===== الأزرار ===== */
.btn { font-family: var(--font-body); font-weight: 600; border-radius: 50px; padding: .6rem 1.6rem; transition: all var(--transition); }
.btn-burgundy { background: var(--burgundy); border: 2px solid var(--burgundy); color: #fff; }
.btn-burgundy:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-gold { background: var(--gold); border: 2px solid var(--gold); color: #2B2B2B; }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201, 162, 75, .35); }
.btn-outline-burgundy { background: transparent; border: 2px solid var(--burgundy); color: var(--burgundy); }
.btn-outline-burgundy:hover { background: var(--burgundy); color: #fff; transform: translateY(-2px); }
.btn-outline-light-gold { background: transparent; border: 2px solid var(--gold); color: var(--gold-light); }
.btn-outline-light-gold:hover { background: var(--gold); color: #2B2B2B; }

/* ===== الشريط العلوي ===== */
.topbar { background: var(--burgundy-dark); color: rgba(255, 255, 255, .85); font-size: .85rem; padding: .4rem 0; }
.topbar a { color: var(--gold-light); }
.topbar a:hover { color: #fff; }
.topbar-info { gap: 1.5rem; }
.topbar i { color: var(--gold); margin-inline-end: .35rem; }

/* ===== القائمة الرئيسية ===== */
.site-navbar { background: #fff; z-index: 1030; transition: box-shadow var(--transition); }
.site-navbar.scrolled { box-shadow: var(--shadow-md); }
.site-navbar .navbar { padding: .75rem 0; transition: padding var(--transition); }
.site-navbar.scrolled .navbar { padding: .35rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--burgundy-dark); }
.navbar-brand i { color: var(--gold); font-size: 1.6rem; }
.navbar-brand:hover { color: var(--burgundy); }
.site-navbar .nav-link { position: relative; color: var(--ink); font-weight: 600; padding: .6rem .9rem; }
.site-navbar .nav-link::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px; background: var(--gold); transform: translateX(-50%); transition: width var(--transition); }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: var(--burgundy); }
.site-navbar .nav-link:hover::after, .site-navbar .nav-link.active::after { width: 60%; }
.navbar-toggler { border-color: var(--border); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(201, 162, 75, .35); }
@media (max-width: 991.98px) {
  .site-navbar .navbar-collapse { padding: 1rem 0; border-top: 1px solid var(--border); margin-top: .5rem; }
  .site-navbar .nav-link::after { display: none; }
}
/* ===== الأقسام ===== */
.section { padding: 5rem 0; }
.section-alt { background: var(--light); }
.home-featured-courses,
.home-accreditations { background: #fff; border-top: 1px solid #f0f0f0; }
.section-dark { background: var(--burgundy-dark); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { position: relative; display: inline-block; padding-bottom: .9rem; margin-bottom: .8rem; }
.section-title h2::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 64px; height: 3px; background: var(--gold); transform: translateX(-50%); border-radius: 3px; }
.section-title p { color: var(--gray); max-width: 640px; margin: 0 auto; }
@media (max-width: 767.98px) { .section { padding: 3.5rem 0; } }

/* ===== ترويسة الصفحات الداخلية ===== */
.page-header { background: linear-gradient(135deg, var(--burgundy-dark), var(--burgundy)); color: #fff; padding: 3.5rem 0; border-bottom: 4px solid var(--gold); }
.page-header h1 { color: #fff; margin-bottom: .5rem; }
.page-header .breadcrumb { margin: 0; --bs-breadcrumb-divider-color: var(--gold-light); }
.page-header .breadcrumb a { color: var(--gold-light); }
.page-header .breadcrumb-item.active { color: #fff; }

/* ===== البطاقات ===== */
.card-academy { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; height: 100%; transition: transform var(--transition), box-shadow var(--transition); }
.card-academy:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-academy .card-img { overflow: hidden; aspect-ratio: 16 / 10; background: var(--light); }
.card-academy .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-academy:hover .card-img img { transform: scale(1.06); }
.card-academy .card-body { padding: 1.4rem; }
.badge-status { background: var(--gold-light); color: var(--burgundy-dark); font-weight: 600; border-radius: 50px; padding: .35rem .8rem; font-size: .8rem; }

.icon-box { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--light); color: var(--burgundy); font-size: 1.6rem; transition: all var(--transition); }
.card-academy:hover .icon-box { background: var(--burgundy); color: var(--gold); }

/* ===== النماذج ===== */
.form-label { font-weight: 600; }
.form-control, .form-select { border-radius: 10px; border: 1px solid var(--border); padding: .7rem 1rem; font-family: var(--font-body); }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(201, 162, 75, .25); }

/* ===== الفوتر ===== */
.site-footer { background: #1F1F1F; color: #c9c9c9; padding-top: 4rem; font-size: .95rem; }
.site-footer a { color: #c9c9c9; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { color: #fff; font-size: 1.4rem; margin-bottom: 1rem; }
.footer-brand i { color: var(--gold); margin-inline-end: .4rem; }
.footer-title { color: #fff; position: relative; padding-bottom: .7rem; margin-bottom: 1.2rem; }
.footer-title::after { content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 36px; height: 2px; background: var(--gold); }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { display: inline-block; transition: transform var(--transition), color var(--transition); }
.footer-links a:hover { transform: translateX(4px); }
html[dir="rtl"] .footer-links a:hover { transform: translateX(-4px); }
.footer-contact li { display: flex; gap: .7rem; margin-bottom: .8rem; align-items: flex-start; }
.footer-contact i { color: var(--gold); margin-top: .35rem; width: 18px; text-align: center; }
.social-links { display: flex; gap: .6rem; flex-wrap: wrap; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); color: #fff; transition: all var(--transition); }
.social-links a:hover { background: var(--gold); color: #1F1F1F; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 3rem; padding: 1.2rem 0; text-align: center; font-size: .85rem; color: #9a9a9a; }

/* ===== زر العودة للأعلى ===== */
.back-to-top { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--burgundy); color: var(--gold); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: all var(--transition); z-index: 1040; }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--gold); color: var(--burgundy-dark); }

/* ===== حركة الظهور ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}



/* =====================================================
   المرحلة 3: الرئيسية + About
   ===================================================== */

/* ===== Hero ===== */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 6.5rem 0 5.5rem;
  background: linear-gradient(135deg, var(--burgundy-dark) 0%, var(--burgundy) 60%, var(--burgundy-light) 100%); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at 15% 20%, rgba(201,162,75,.20), transparent 40%), radial-gradient(circle at 88% 82%, rgba(255,255,255,.08), transparent 35%); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-image::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, rgba(44, 33, 34, 0.4), rgba(54, 47, 48, 0.3)); }
.hero-eyebrow { display: inline-block; color: var(--gold-light); border: 1px solid rgba(201,162,75,.5); border-radius: 50px; padding: .3rem 1rem; font-size: .9rem; margin-bottom: 1.2rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.2rem; }
.hero .lead { color: rgba(255,255,255,.88); max-width: 600px; margin-bottom: 2rem; }
.hero-emblem { width: 280px; height: 280px; margin-inline: auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(201,162,75,.45); background: rgba(255,255,255,.05); color: var(--gold); font-size: 7rem; box-shadow: 0 0 0 18px rgba(201,162,75,.08); }
@media (max-width: 767.98px) { .hero { padding: 4rem 0 3.5rem; } }

/* ===== الإحصائيات ===== */
.stats-band { background: var(--burgundy-dark); color: #fff; padding: 3.5rem 0; border-block: 4px solid var(--gold); }
.stat-item { text-align: center; }
.stat-item i { color: var(--gold); font-size: 1.8rem; margin-bottom: .6rem; }
.stat-number { font-family: var(--font-head); font-size: 2.8rem; font-weight: 700; color: var(--gold); line-height: 1.2; }
.stat-label { color: rgba(255,255,255,.85); }

/* ===== بطاقة الكورس ===== */
.course-card { display: flex; flex-direction: column; }
.course-card .card-body { display: flex; flex-direction: column; flex: 1; }
.course-card .course-actions { margin-top: auto; }
.course-card h5 a { color: var(--burgundy-dark); }
.course-card h5 a:hover { color: var(--gold-dark); }
.card-media { position: relative; }
.card-media .badge-status { position: absolute; top: 12px; inset-inline-start: 12px; box-shadow: var(--shadow-sm); }
.img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--gold);
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark)); }
.course-meta { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: var(--gray); }
.course-meta i { color: var(--gold-dark); margin-inline-end: .3rem; }
.status-open { background: #e1f3e6; color: #1b6b36; }
.status-upcoming { background: var(--gold-light); color: var(--burgundy-dark); }
.status-full { background: #f8d7da; color: #842029; }
.status-completed { background: #e2e3e5; color: #41464b; }

/* ===== المميزات ===== */
.feature-card .card-body { text-align: center; padding: 2rem 1.4rem; }
.feature-card h5 { margin: 1rem 0 .6rem; }
.feature-card p { color: var(--gray); margin: 0; }

/* ===== الاعتمادات ===== */
.accred-card .card-body { padding: 1.8rem 1.4rem; }
.accred-img { max-height: 100px; width: auto; object-fit: contain; margin-bottom: 1rem; }
.accred-issuer { color: var(--gray); font-size: .9rem; margin-bottom: .4rem; }

/* ===== About ===== */
.about-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.about-img-placeholder { border-radius: var(--radius); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; color: var(--gold); background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark)); box-shadow: var(--shadow-lg); }
.vm-card .card-body { padding: 2rem; border-top: 4px solid var(--gold); }
.vm-card .icon-box { margin-bottom: 1rem; }
.goal-list { list-style: none; padding: 0; margin: 0; }
.goal-list li { display: flex; gap: .8rem; padding: .8rem 0; border-bottom: 1px dashed var(--border); }
.goal-list li:last-child { border-bottom: 0; }
.goal-list i { color: var(--gold-dark); margin-top: .4rem; }
.gallery-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.gallery-img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }

/* ===== Call To Action ===== */
.cta-band { background: linear-gradient(135deg, var(--burgundy-dark), var(--burgundy)); color: #fff; text-align: center; padding: 4.5rem 0; border-top: 4px solid var(--gold); }
.cta-band h2 { color: #fff; margin-bottom: .8rem; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 600px; margin: 0 auto 1.8rem; }



/* =====================================================
   المرحلة 4: الكورسات + التفاصيل
   ===================================================== */

/* ===== البحث والفلترة ===== */
.filter-bar { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

/* ===== حالة فارغة ===== */
.empty-state { padding: 3rem 1rem; color: var(--gray); }
.empty-state > i { font-size: 3.5rem; color: var(--gold); margin-bottom: 1rem; display: block; }

/* ===== صفحة الكورس ===== */
.course-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16 / 10; background: var(--light); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover .img-placeholder { font-size: 5rem; }
.course-content { color: #444; font-size: 1.05rem; line-height: 1.95; }

.topic-list { list-style: none; counter-reset: topic; padding: 0; margin: 0; }
.topic-list li { counter-increment: topic; display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; margin-bottom: .6rem;
  background: var(--light); border-radius: 10px; border-inline-start: 4px solid var(--gold); transition: transform var(--transition), box-shadow var(--transition); }
.topic-list li:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
html[dir="rtl"] .topic-list li:hover { transform: translateX(-4px); }
.topic-list li::before { content: counter(topic); flex: 0 0 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--burgundy); color: var(--gold); font-weight: 700; }

/* ===== البطاقة الجانبية ===== */
.info-card { position: sticky; top: 100px; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden; }
.info-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 1.1rem 1.3rem; background: var(--light); }
.info-card-head .badge-status { position: static; }
.info-list { list-style: none; margin: 0; padding: .6rem 1.3rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px dashed var(--border); }
.info-list li:last-child { border-bottom: 0; }
.info-list > li > i { color: var(--gold-dark); width: 22px; text-align: center; margin-top: .35rem; }
.info-list small { display: block; color: var(--gray); font-size: .78rem; }
.price-tag { color: var(--burgundy); font-size: 1.15rem; }
.info-card-actions { padding: 0 1.3rem 1.3rem; }
.booking-closed { background: #fff3cd; color: #664d03; border-radius: 10px; padding: .8rem 1rem; font-size: .9rem; margin-bottom: .8rem; }
@media (max-width: 991.98px) { .info-card { position: static; } }




/* =====================================================
   المرحلة 5: الحجز
   ===================================================== */
.booking-card { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 2rem; }
@media (max-width: 575.98px) { .booking-card { padding: 1.3rem; } }

/* حقل الفخ (Honeypot): مخفي عن المستخدم */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.steps-list { counter-reset: step; list-style: none; margin: 0; padding: 1.2rem 1.3rem; }
.steps-list li { counter-increment: step; display: flex; gap: .9rem; align-items: flex-start; padding: .7rem 0; }
.steps-list li::before { content: counter(step); flex: 0 0 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--burgundy); color: var(--gold); font-weight: 700; }

.success-card { max-width: 560px; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 2.5rem 2rem; }
.success-icon { font-size: 4rem; color: #1b8a4b; display: block; margin-bottom: .5rem; }
.success-ref { background: var(--light); border: 1px dashed var(--gold); border-radius: 10px; padding: .8rem 1rem; margin: 1.2rem 0; }
.success-ref span { display: block; color: var(--gray); font-size: .85rem; }
.success-ref strong { font-size: 1.5rem; color: var(--burgundy); letter-spacing: 1px; }
.text-gold { color: var(--gold-dark); }


/* =====================================================
   المرحلة 7: الخريجون والتحقق
   ===================================================== */
.verify-box { max-width: 640px; }
.verify-form .form-control { direction: ltr; text-align: center; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.cert-result { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 1.8rem; }
.cert-status { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem 1.1rem; border-radius: 50px; font-weight: 700; }
.cert-valid { background: #d1e7dd; color: #0f5132; }
.cert-revoked { background: #f8d7da; color: #842029; }
.cert-expired { background: #fff3cd; color: #664d03; }
.cert-details { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.cert-details li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--border); }
.cert-details li:last-child { border-bottom: 0; }
.cert-details span { color: var(--gray); }
.cert-details strong { text-align: end; word-break: break-word; }
.mono { font-family: Consolas, monospace; letter-spacing: .5px; }
.cert-image { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.grad-photo { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: inline-block; }
.grad-photo-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--burgundy); color: var(--gold); font-size: 2.2rem; }
.pagination .page-link { color: var(--burgundy); }
.pagination .active .page-link { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }

@media print {
  .topbar, .site-navbar, .site-footer, .back-to-top, .no-print { display: none !important; }
  .cert-result { box-shadow: none; }
}


/* =====================================================
   المرحلة 8
   ===================================================== */
.feature-card .card-img { aspect-ratio: 16 / 9; }
.info-list a { color: var(--ink); }
.info-list a:hover { color: var(--burgundy); }


.cert-extra { margin-top: 1.2rem; padding: 1rem 1.2rem; background: var(--light); border-radius: 10px; border-inline-start: 4px solid var(--gold); }
.cert-extra h3 { color: var(--burgundy-dark); }