/* =========================
   Al-Mashreq Unified Theme
   (Load AFTER styles.css)
========================= */

/* تعريف خط Cairo-Regular وتطبيقه */
@font-face {
  font-family: "CairoWeb";
  src: url("../fonts/Cairo-Regular.woff2") format("woff2"),
       url("../fonts/Cairo-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --brand-blue: #0b1b33;
  --brand-orange: #f28a1b;
  --bg: #f6f8fc;
  --card: #ffffff;
  --ink: #122038;
  --muted: #5b6b86;
  --line: rgba(2, 10, 25, .10);
  --shadow: 0 14px 34px rgba(2, 10, 25, .10);
  --radius: 18px;
}

html, body {
  height: 100%;
}

body {
  font-family: "CairoWeb", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  background: var(--bg) !important;
  color: var(--ink) !important;
  line-height: 1.9;
}

/* حاويات العرض */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* الروابط */
a {
  color: var(--brand-blue);
}
a:hover {
  opacity: .9;
}

/* شريط التنقل العلوي */
.topbar {
  background: linear-gradient(90deg, var(--brand-blue), #132a52) !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
}
.topbar .navlink {
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .10) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
}
.topbar .navlink:hover {
  background: rgba(242, 138, 27, .22) !important;
  border-color: rgba(242, 138, 27, .35) !important;
}

/* شريط الفلترة الثابت */
.filter-bar {
  position: sticky;
  top: 56px;
  z-index: 49;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.filter-bar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.filter-bar h1#siteTitle {
  margin: 0;
  font-size: 20px;
  letter-spacing: .3px;
  color: var(--brand-orange);
}
.filter-bar p#siteSubtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.controls {
  display: grid;
  grid-template-columns: 1.2fr .6fr .6fr auto;
  gap: 10px;
  margin: 14px 0;
}
.input, select {
  width: 100%;
  padding: 10px !important;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  border-radius: 10px !important;
  outline: none;
  font-size: 14px;
}
.input:focus, select:focus {
  border-color: rgba(242, 138, 27, .55) !important;
  box-shadow: 0 0 0 3px rgba(242, 138, 27, .20) !important;
}
.btn {
  border: 0;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-orange) 100%);
  box-shadow: 0 10px 22px rgba(11, 27, 51, .20);
  font-weight: 700;
}
.btn:active {
  transform: translateY(1px);
}

/* البطاقات */
.card {
  background: var(--card) !important;
  border-radius: var(--radius) !important;
  border: 1px solid rgba(2, 10, 25, .06) !important;
  box-shadow: var(--shadow) !important;
}
.card-lite {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(2, 10, 25, .06);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(2, 10, 25, .08);
}

/* الحقول */
input, textarea, select {
  font-family: "CairoWeb", inherit !important;
  border-radius: 14px !important;
  border: 1px solid var(--line) !important;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(242, 138, 27, .55) !important;
  box-shadow: 0 0 0 3px rgba(242, 138, 27, .20) !important;
  outline: none !important;
}

/* شبكة الكتب والبطاقات */
.grid {
  display: grid !important;
  gap: 14px !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  margin-top: 12px !important;
}
.book-card {
  background: #fff !important;
  border: 1px solid rgba(2, 10, 25, .08) !important;
  border-radius: var(--radius) !important;
  padding: 12px !important;
  box-shadow: 0 10px 22px rgba(2, 10, 25, .07) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.book-card:hover {
  /* تم تعطيل التحريك (بدون تحويلات) */
  border-color: rgba(242, 138, 27, .60) !important;
  box-shadow: 0 18px 40px rgba(2, 10, 25, .12) !important;
}

.book-cover-wrapper {
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid rgba(2, 10, 25, .08) !important;
  background: linear-gradient(180deg, rgba(11, 27, 51, .06), rgba(242, 138, 27, .06)) !important;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.book-cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.cover-fallback {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted) !important;
  font-weight: 800 !important;
}

/* عناوين مجموعات الكتب */
.group-head h2 {
  font-size: 16px !important;
  margin: 0;
}
.group-count {
  font-weight: 900 !important;
  color: var(--brand-blue) !important;
  background: rgba(11, 27, 51, .08) !important;
  border: 1px solid rgba(11, 27, 51, .10) !important;
  padding: 6px 10px;
  border-radius: 999px;
}

/* شريط الروابط في بطاقات الكتب */
.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  border: 1px solid rgba(2, 10, 25, .10) !important;
  background: #fff !important;
}
.link-chip:hover {
  border-color: rgba(242, 138, 27, .35) !important;
  box-shadow: 0 10px 22px rgba(2, 10, 25, .10) !important;
}

/* نص شارة عنوان الموقع */
#siteTitle {
  color: var(--brand-orange);
}

/* التذييل */
footer {
  background: linear-gradient(90deg, var(--brand-blue), #132a52) !important;
  color: #fff !important;
}
footer a {
  color: #fff !important;
  opacity: .92;
  text-decoration: none;
}
footer a:hover {
  opacity: 1;
}
.site-logo, .brand img{
  display:inline-block !important;
  visibility:visible !important;
  opacity:1 !important;
  height:42px !important;
  width:auto !important;
}
