/* ===========================
   Mateen Academic Program — shared styles
   =========================== */

@import url("https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Amiri:wght@400;700&display=swap");

:root {
  /* Dark brown — nav/footer/basmala only */
  --green-dark:  #5c3d2e;
  /* Dark brown centered — buttons and hover */
  --green-mid:   #8a5e3c;
  /* Light brown — borders and details */
  --green-light: #b8966e;
  /* gold */
  --gold:        #c9a227;
  --gold-light:  #e8c96a;
  /* Beige gradient from light to dark */
  --beige:       #f7efe3;   /* Page background */
  --beige2:      #ede0cc;   /* Cards and sidebar */
  --beige3:      #d6c4a8;   /* Borders, section headers, hover states */
  --white:       #fff;
  /* Text colors */
  --text-dark:   #2c1a0e;
  --text-mid:    #8a6a52;
  --border:      #b8966e44;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Naskh Arabic", serif;
  direction: rtl;
  background: var(--beige);
  color: var(--text-dark);
  font-size: 13px;
  /* overflow-x on the ـ html instead of body So that لا يكسر position:fixed على iOS */
}
html { overflow-x: hidden; }

/* ===== NAVBAR ===== */
nav {
  background: var(--green-dark);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  gap: 12px;
  overflow: visible !important;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,162,39,0.15);
  flex-shrink: 0;
}

.logo-circle span {
  color: var(--gold);
  font-size: 9px;
  font-family: Amiri, serif;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.nav-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ── شعار Khayr Partners في the navbar (نفس Design logo-circle) ── */
.logo-circle-shuraka {
  background: var(--green-dark, #1a4a2e);
  margin-inline-start: 8px;
}
.logo-circle-shuraka .nav-logo-img {
  object-fit: contain;
  padding: 4px;
  mix-blend-mode: screen;
}

/* ── شعار Khayr Partners يظهر تلقائياً في كل شريط but/onlyملة عبر الموقع ──
   حل CSS only بدون الحاجة لEdit كل File HTML على حدة            */
.basmala-bar {
  position: relative;
}
@media (max-width: 480px) {
  
}

.nav-brand {
  font-family: Amiri, serif;
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.nav-tagline {
  color: rgba(255,255,255,0.75);
  font-size: 10px;
}

.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 12.5px;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-btns {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
  align-items: center;
}

.btn-admin {
  background: rgba(201,162,39,0.12);
  color: var(--gold-light);
  border: 1px solid rgba(201,162,39,0.3);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
}

.btn-solid {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 36px 32px;
  text-align: center;
  color: white;
}

.page-hero h1 {
  font-family: Amiri, serif;
  font-size: 28px;
  color: var(--gold-light);
  margin: 8px 0 6px;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.hero-badge {
  display: inline-block;
  background: rgba(201,162,39,0.2);
  border: 1px solid rgba(201,162,39,0.4);
  color: var(--gold-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 6px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--beige2);
  border-bottom: 1px solid var(--border);
  padding: 8px 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mid);
}

.breadcrumb a {
  color: var(--green-mid);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ===== MAIN LAYOUT ===== */
.main-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: 32px;
}

.footer-social { display: flex; gap: 12px; }
.footer-social a { color: rgba(255,255,255,0.75); font-size: 16px; text-decoration: none; }
.footer-social a:hover { color: var(--gold-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav {
    padding: 0 12px;
    height: 54px;
    gap: 6px;
  }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 54px;
    right: 0;
    left: 0;
    background: var(--green-dark);
    padding: 12px 20px;
    gap: 12px;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-btns   { display: none; }
  .nav-shuraka { display: none; }
  .nav-brand  { font-size: 13px; }
  .nav-tagline { display: none; }
  footer { flex-direction: column; text-align: center; gap: 8px; }
}

/* ════════════════════════════════════════════════
   Color balance — light is الغالب
   الIfن الdark only في: nav, footer, basmala
   ════════════════════════════════════════════════ */

/* page-hero — light instead of dark */
.page-hero {
  background: linear-gradient(135deg, var(--beige2) 0%, var(--beige) 100%) !important;
  border-bottom: 3px solid var(--gold) !important;
}
.page-hero h1  { color: var(--green-dark) !important; }
.page-hero p   { color: var(--text-mid) !important; }
.hero-badge {
  background: rgba(92,61,46,0.1) !important;
  border-color: rgba(92,61,46,0.25) !important;
  color: var(--green-dark) !important;
}

/* section-head / card-head / t-section-head — beige gold instead of dark */
.section-head,
.card-head,
.t-section-head,
.ann-head,
.modal-head-dark {
  background: linear-gradient(to left, var(--beige3), var(--beige2)) !important;
  color: var(--green-dark) !important;
  border-bottom: 2px solid var(--gold) !important;
}
.section-head *,
.card-head *,
.t-section-head * { color: var(--green-dark) !important; }

/* teacher-hero — beige gold */
.teacher-hero {
  background: linear-gradient(135deg, var(--beige2) 0%, var(--beige) 100%) !important;
  border-bottom: 3px solid var(--gold) !important;
  color: var(--text-dark) !important;
}
.teacher-name { color: var(--green-dark) !important; }
.teacher-subj { color: var(--text-mid) !important; }
.teacher-badge {
  background: rgba(92,61,46,0.1) !important;
  color: var(--green-dark) !important;
  border-color: rgba(92,61,46,0.25) !important;
}

/* sidebar — override Bootstrap offcanvas dark default */
#mainSidebar,
#mainSidebar.offcanvas,
.sidebar-offcanvas,
.sidebar { 
  --bs-offcanvas-bg: var(--white) !important;
  background: var(--white) !important;
  background-color: var(--white) !important;
  border-left: 2px solid var(--gold) !important;
  color: var(--text-dark) !important;
}
#mainSidebar .offcanvas-header,
.sidebar-header { 
  background: var(--green-dark) !important;
}
#mainSidebar .offcanvas-body {
  background: var(--white) !important;
}
.sidebar-logo-text { color: var(--green-dark) !important; }

.path-btn {
  background: var(--beige2) !important;
  color: var(--green-dark) !important;
  border: 1px solid var(--border) !important;
}
.path-btn:hover {
  background: var(--gold) !important;
  color: var(--white) !important;
  border-color: var(--gold) !important;
}

/* ann-section header */
.section-header {
  background: transparent !important;
  border-bottom: 2px solid var(--gold) !important;
  padding-bottom: 8px !important;
}
.section-header h2 { color: var(--green-dark) !important; }

/* contact submit button  */
.contact-submit {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
}
.contact-submit:hover {
  background: var(--green-dark) !important;
  color: var(--gold-light) !important;
}

/* tabs in teacher / stats pages  */
.page-tab.active,
.tab.active {
  background: var(--beige) !important;
  color: var(--green-dark) !important;
  border-bottom-color: var(--gold) !important;
}
.page-tab:not(.active),
.tab:not(.active) {
  background: transparent !important;
  color: var(--text-mid) !important;
}

/* page-tabs bar (same style) */
.page-tabs {
  background: var(--white) !important;
  border-bottom: 2px solid var(--gold) !important;
}

/* msg-modal-head — beige */
.msg-modal-head {
  background: linear-gradient(to left, var(--beige2), var(--beige)) !important;
  border-bottom: 2px solid var(--gold) !important;
}
.msg-modal-head h3   { color: var(--green-dark) !important; }
.msg-modal-close     { color: var(--text-mid) !important; }
.msg-modal-close:hover { color: var(--green-dark) !important; }

/* export modal head */
.export-modal-head,
.modal-header {
  background: linear-gradient(to left, var(--beige2), var(--beige)) !important;
  border-bottom: 2px solid var(--gold) !important;
  color: var(--green-dark) !important;
}

/* reg-modal header */
.reg-modal-header { background: var(--beige2) !important; }
.reg-modal-header h2 { color: var(--green-dark) !important; }

/* stepper active  */
.step.active .step-num {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
}
.step.done .step-num {
  background: var(--accent-green, #3a7a4a) !important;
}

/* General submit buttons  */
.btn-solid,
.t-submit,
.reg-next,
.reg-submit {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  font-weight: 700 !important;
  border: none !important;
}
.btn-solid:hover,
.t-submit:hover,
.reg-next:hover { opacity: 0.88 !important; }

/* login btn */
.login-btn {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  font-weight: 700 !important;
}

/* login card */
.login-header { background: linear-gradient(135deg, var(--beige2), var(--beige)) !important; }
.login-header h1 { color: var(--green-dark) !important; }

/* mark read btn */
.btn-mark-read {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  font-weight: 700 !important;
}

/* Home hero */
/* hero styles handled in home.css */

/* basmala تبقى darkة — nav + basmala هم only الdarkين */
.basmala-bar { background: linear-gradient(135deg, var(--green-dark), var(--green-mid)) !important; }

/* aya-banner — beige gold instead of dark */
.aya-banner {
  background: linear-gradient(135deg, var(--beige2) 0%, #fff9ee 100%) !important;
  border-top: 2px solid var(--gold) !important;
  border-bottom: 2px solid var(--gold) !important;
}
.aya-text   { color: var(--green-dark) !important; text-shadow: none !important; }
.aya-ref    { color: var(--text-mid) !important; }
.aya-banner::before { opacity: 0.06 !important; }
.aya-banner::after  { color: rgba(92,61,46,0.3) !important; }

/* nav links dropdown Mobile يبقى dark — ok */

/* ════════════════════════════════════════
   MOBILE RESPONSIVE — تحسينات إضافية
   ════════════════════════════════════════ */
@media (max-width: 768px) {
  .stat-box { padding: 14px 12px !important; }
  .stat-number { font-size: 20px !important; }
  .stat-label { font-size: 12px !important; }

  .alert, .notification { padding: 12px 14px !important; font-size: 13px !important; }

  .divider { margin: 12px 0 !important; }

  .badge { padding: 3px 10px !important; font-size: 11px !important; }
}

@media (max-width: 480px) {
  .stat-number { font-size: 18px !important; }
  .stat-label { font-size: 11px !important; }

  .alert, .notification { padding: 10px 12px !important; font-size: 12px !important; }
}
/* يفتح الIfن شوية on the نافبار الداكن */
}

/* ===== Khayr Partners — NAVBAR ===== */
.nav-shuraka {
  display: flex;
  align-items: center;
  margin-inline-start: 10px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid rgba(201,162,39,0.35);  /* فاصل gold خفيف */
}
.nav-shuraka-img {
  height: 46px;       /* أكبر من Ifجو متين (44px) وواضح */
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(1.35);
}
@media (max-width: 991px) {
  .nav-shuraka {
    flex: 0;
    justify-content: center;
    border-inline-start: none;
    margin-inline-start: 0;
    padding-inline-start: 0;
  }
  .nav-shuraka-img {
    height: 28px;
    width: auto;
  }
}

/* ══ Button الخروج في Navbar ══ */
.nav-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #d97070;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s;
}
.nav-logout-btn:hover {
  background: rgba(192,57,43,0.12);
  color: #c0392b;
}

/* ===== BACK BUTTON ===== */
.nav-back-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-inline-end: 4px;
  order: -1;
}
.nav-back-btn:hover { background: rgba(255,255,255,0.15); }
