/* ===== عام ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Bahij TheSansArabic', sans-serif;
  background: #f5f7fa;
  color: #0d2340;
  text-align: center;
}
a { text-decoration: none; color: inherit; }
.container { width: 90%; max-width: 1200px; margin: auto; }

/* ===== الشريط العلوي ===== */
.topbar {
  background: #fff;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid #e0e0e0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar .actions a {
  margin-left: 20px;
  color: #0d2340;
}
.topbar .actions a:hover {
  color: #4c6eaf;
}

/* ===== شريط التنقل الرئيسي ===== */
header {
  background: #fff;
  border-bottom: 3px solid #4c6eaf;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.logo { display: flex; align-items: center; }
.logo svg { width: 140px; height: auto; }
.logo h2 {
  margin: 0 0 0 10px;
  color: #4c6eaf;
  font-size: 20px;
}
.main-menu {
  list-style: none;
  display: flex;
  gap: 25px;
}
.main-menu li a {
  color: #0d2340;
  font-weight: bold;
}
.main-menu li a:hover {
  color: #4c6eaf;
}

/* ===== بانر البحث ===== */
.hero {
  background: url('https://www.adu.ac.ae/images/adulibrarylibraries/adu-library-images/1300x750-5.jpeg?sfvrsn=fb5a600a_4') center/cover no-repeat;
  position: relative;
  color: #fff;
  padding: 120px 20px;
}
.hero::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
}
.hero .content {
  position: relative;
  z-index: 1;
  max-width: 800px; margin: auto;
}
.hero h1 {
  font-size: 42px;
  margin-bottom: 30px;
  line-height: 1.2;
}
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.tab {
  background: #fff;
  color: #0d2340;
  padding: 12px 20px;
  margin: 5px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  position: relative;
}
.tab.active {
  background: #4c6eaf;
  color: #fff;
}
.tab.active::after {
  content: "";
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #4c6eaf;
}
.search-box {
  display: flex;
  max-width: 700px; margin: auto;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}
.search-box input {
  flex: 1;
  padding: 14px;
  border: none; outline: none;
  font-size: 16px;
  direction: rtl;
}
.search-box button {
  padding: 0 25px;
  border: none;
  background: #4c6eaf;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* ===== النص المدون بآلة الكتابة ===== */
#rotating {
  display: inline-block;
  border-right: 2px solid #4c6eaf;
  white-space: nowrap;
  overflow: hidden;
  font-weight: bold;
}

/* ===== أقسام المحتوى ===== */
section { padding: 60px 0; }
h2.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}
h2.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: #4c6eaf;
}

/* ===== العناوين الجديدة ===== */
#new-titles .cards {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  justify-content: center;
}
#new-titles .card {
  min-width: 140px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#new-titles .card img {
  width: 140px;
  height: auto;
  display: block;
}

/* ===== لنبدأ ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 20px;
  margin-top: 20px;
  justify-items: center;
}
.feature-box {
  background: #fff;
  text-align: center;
  padding: 30px 15px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform .2s;
  width: 100%;
  max-width: 240px;
}
.feature-box:hover { transform: translateY(-5px); }
.feature-box i {
  font-size: 40px;
  color: #4c6eaf;
  margin-bottom: 15px;
}
.feature-box h3 {
  margin: 0;
  font-size: 18px;
  color: #0d2340;
}

/* ===== المحتوى الشائع ===== */
#popular .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 20px;
  margin-top: 20px;
  justify-items: center;
}
#popular .grid a {
  display: block;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform .2s;
  max-width: 200px;
  width: 100%;
}
#popular .grid a:hover { transform: translateY(-5px); }
#popular .grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
#popular .grid p {
  margin: 10px;
  font-weight: bold;
}

/* ===== كيف تعمل ===== */
/* نفس .features و .feature-box */


/* ===== الفوتر ===== */
footer {
  background: #0d2340;
  color: #fff;
  padding: 40px 0;
  font-size: 14px;
}
footer .footer-cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}
footer .footer-col h4 {
  margin-bottom: 15px;
  font-size: 16px;
  color: #4c6eaf;
}
footer .footer-col p, footer .footer-col a {
  margin: 5px 0;
  color: #fff;
}
footer .footer-col a:hover { color: #4c6eaf; }
footer .bottom {
  border-top: 1px solid #4c6eaf;
  padding-top: 15px;
}

/* تجاوب */
@media (max-width: 600px) {
  .search-box { flex-direction: column; }
  .search-box button { padding: 14px 0; }
  .navbar { flex-direction: column; gap: 15px; }
  .main-menu { flex-wrap: wrap; justify-content: center; gap: 15px; }
  .feature-box { max-width: 100%; }
}

#rotating {
    display: contents;
    border-right: 2px solid #4c6eaf;
    white-space: nowrap;
    overflow: hidden;
    font-weight: bold;
}


.hero {
    background: url(https://www.adu.ac.ae/images/adulibrarylibraries/adu-library-images/1300x750-5.jpeg?sfvrsn=fb5a600a_4) center / cover no-repeat;
    position: relative;
    color: #fff;
    padding: 332px 20px;
}


.hero {
    background: url(https://discovery.digitallibrary.ae/themes/bootstrap3/images/dora.jpg?sfvrsn=fb5a600a_4) center / cover no-repeat;
    position: relative;
    color: #fff;
    padding: 332px 20px;
}