/* ===== لخّصتهالك — الهيدر والفوتر المشتركين لكل الصفحات =====
   الماركب في js/header.js و js/footer.js — اربط الملف ده بعد CSS الصفحة */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=Readex+Pro:wght@400;600;700&display=swap');
@font-face { font-family: 'KhLama'; src: url('../fonts/LamaSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'KhLama'; src: url('../fonts/LamaSans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'KhRuqaa'; src: url('../fonts/THARWATEMARARUQAALIGHT.woff2') format('woff2'); font-display: swap; }

.nav-home, .kh-footer {
  --paper: #F3EDE2; --card: #FBF8F2; --ink: #16120F; --muted: #5E554C; --line: rgba(22,18,15,.16); --or: #FF7A00;
}
.nav-home.dark, body.dark .nav-home { --paper: #121010; --card: #1C1917; --ink: #F3EDE2; --muted: #A99E92; --line: rgba(243,237,226,.16); }
.nav-home a, .kh-footer a { color: inherit; text-decoration: none !important; }

/* ===== Navbar (يحافظ على كل الـ IDs اللي main.js بيستخدمها) ===== */
body .nav-home { position: sticky !important; top: 0; z-index: 900; direction: rtl; }
body .nav-home #shape { inset: 0; }
body .nav-home .nav-content {
  position: relative; top: 0; left: 0; width: 100%; display: block; padding: 0; overflow-x: clip;
  background: var(--paper) !important; border-radius: 0; border-bottom: 1px solid var(--line);
  box-shadow: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .4s;
}
body .nav-home .nav-content .content { max-width: 1280px; margin: 0 auto; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
body .nav-home .nav-content .content-2 { flex: none; justify-content: flex-start; gap: 18px; }
body .nav-home .scroll-line { left: 0; bottom: -2px; height: 3px; border-radius: 0; background: var(--or) !important; }
body .nav-home .logo img { width: auto; height: 46px; display: block; }
body .nav-home .kh-logo-dark { display: none !important; }
body.dark .nav-home .kh-logo-light, .nav-home.dark .kh-logo-light { display: none !important; }
body.dark .nav-home .kh-logo-dark, .nav-home.dark .kh-logo-dark { display: block !important; }
body .nav-home .links { gap: 8px; padding: 0; margin: 0; }
body .nav-home .create-account, body .nav-home .login-button {
  display: inline-flex; align-items: center;
  font-family: 'KhLama', 'Readex Pro', sans-serif; font-weight: 700; font-size: 15px; border-radius: 0;
  padding: 6px 18px 6px 12px; gap: 6px; width: auto; flex: none; box-shadow: none !important; transition: background .25s, color .25s, border-color .25s;
}
body .nav-home .create-account { background: var(--or) !important; color: #16120F !important; border: 1.5px solid var(--or); }
body .nav-home .create-account:hover { background: transparent !important; color: var(--or) !important; }
body .nav-home .login-button { background: transparent !important; color: var(--ink) !important; border: 1.5px solid var(--ink); }
body .nav-home .login-button:hover { background: var(--ink) !important; color: var(--paper) !important; }
body .nav-home .links lord-icon { width: 28px !important; height: 28px !important; }
body .nav-home .bars { color: var(--ink); }

/* ===== الطالب داخل بحسابه (main.js بيبني .user-menu) ===== */
body .nav-home .user-menu {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 8px; margin: 0;
  background: var(--or) !important; border: 1.5px solid var(--or); border-radius: 0; box-shadow: none; transition: background .25s, border-color .25s;
}
body .nav-home .user-menu:hover, body .nav-home .user-menu.open { background: #16120F !important; border-color: #16120F; }
body.dark .nav-home .user-menu:hover, body.dark .nav-home .user-menu.open { border-color: var(--or); }
body .nav-home .user-menu .user-icon { width: 32px !important; height: 32px !important; padding: 0; }
body .nav-home .user-menu::before { content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: static; transform: none; font-size: 18px; line-height: 1; color: #16120F; transition: transform .3s, color .25s; }
body .nav-home .user-menu.open::before { transform: rotate(180deg); }
body .nav-home .user-menu:hover::before, body .nav-home .user-menu.open::before { color: #FF7A00; }
body .nav-home .dropdown-content {
  top: calc(100% + 13px); right: auto; left: 0; min-width: 230px; max-width: calc(100vw - 32px);
  background: #16120F !important; border-radius: 0; border-top: 0 solid var(--or); box-shadow: none;
}
body .nav-home .dropdown-content.open { border-top-width: 3px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
body .nav-home .dropdown-content a { color: #F3EDE2 !important; font-family: 'KhLama', sans-serif; font-size: 15px; padding: 10px 16px; white-space: nowrap; }
body .nav-home .dropdown-content a + a { border-top: 1px solid rgba(243,237,226,.08); }
body .nav-home .dropdown-content a:hover { background: rgba(255,122,0,.18); color: #FF7A00 !important; }
body .nav-home .dropdown-content lord-icon { width: 26px !important; height: 26px !important; flex: none; }

@media (max-width: 767px) {
  body .nav-home .nav-content .content { padding: 10px 16px; gap: 10px; }
  body .nav-home .nav-content .content-2 { gap: 10px; }
  body .nav-home .logo img { height: 36px; }
  body .nav-home .links.active { background: var(--paper); border: 1px solid var(--line); padding: 14px; }
  body .nav-home .links.active li { width: 100%; }
  body .nav-home .links.active a { width: 100%; justify-content: center; }
  body .nav-home .user-menu { height: 40px; padding: 0 10px 0 6px; }
  body .nav-home .user-menu::before { font-size: 16px; }
  /* المنيو تاخد عرض الشاشة تحت الناف */
  body .nav-home .user-menu { position: static; }
  body .nav-home .dropdown-content { position: absolute; top: 100%; left: 0; right: 0; width: 100%; min-width: 0; max-width: none; }
  body .nav-home .dropdown-content a { padding: 14px 20px; font-size: 16px; }
}

/* ===== خط كريتيف تحت العنوان (موجة بلون الحبر + نقطة برتقالي) ===== */
.kh-uline { display: inline-block; position: relative; padding-bottom: 16px; }
.kh-uline::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 100%; height: 12px; background: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 6 Q6 0 12 6 T24 6' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E") repeat-x left center / 24px 12px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 6 Q6 0 12 6 T24 6' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E") repeat-x left center / 24px 12px;
  transform-origin: right; transition: transform .9s cubic-bezier(.7,0,.2,1) .3s;
}
.kh-uline::before { content: ""; position: absolute; inset-inline-end: -16px; bottom: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--or); transition: transform .4s ease 1.1s; }
.kh-js [data-reveal] .kh-uline::after, .kh-js .kh-uline[data-reveal]::after { transform: scaleX(0); }
.kh-js [data-reveal] .kh-uline::before, .kh-js .kh-uline[data-reveal]::before { transform: scale(0); }
.kh-js [data-reveal].in .kh-uline::after, .kh-js .kh-uline[data-reveal].in::after,
.kh-js [data-reveal].in .kh-uline::before, .kh-js .kh-uline[data-reveal].in::before { transform: none; }

/* ===== Footer ===== */
.kh-footer { background: #16120F; color: #F3EDE2; direction: rtl; text-align: right; font-family: 'KhLama', 'Readex Pro', sans-serif; }
.kh-footer .kh-wrap { max-width: 1280px; margin: 0 auto; position: relative; }
.kh-footer-in { padding: 80px 24px 50px; display: flex; flex-direction: column; gap: 40px; }
.kh-quote { margin: 0; font-family: 'Aref Ruqaa', 'KhRuqaa', serif; font-weight: 700; font-size: clamp(34px, 5vw, 68px); line-height: 1.5; max-width: 1000px; text-wrap: balance; color: #F3EDE2; }
.kh-quote em { font-style: normal; color: #FF7A00; }
.kh-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-top: 1px solid rgba(243,237,226,.18); padding-top: 30px; }
.kh-footer-row > img { height: 64px; width: auto; display: block; }
.kh-social { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kh-social p { margin: 0; font-size: 14px; color: #A99E92; }
.kh-social a { width: 48px; height: 48px; border: 1px solid rgba(243,237,226,.2); display: grid; place-items: center; transition: background .25s, border-color .25s; }
.kh-social a:hover { background: #FF7A00; border-color: #FF7A00; }
.kh-social img { width: 26px; }
.kh-copy { margin: 0; text-align: center; padding: 16px; font-family: 'Readex Pro', sans-serif; font-size: 12px; color: #8A8077; border-top: 1px solid rgba(243,237,226,.08); }
.kh-copy a { color: #FF7A00 !important; }
@media (max-width: 767px) {
  .kh-footer-in { padding: 56px 16px 36px; gap: 28px; }
  .kh-footer-row > img { height: 52px; }
}
