:root {
  --main-color: #0056b3;
  --accent-color: #ff6b00;
  --dark-color: #0d1b2a;
  --light-bg: #f4f7f6;
  --white: #ffffff;
  --text-muted: #666666;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
body {
  background-color: var(--light-bg);
}
.container1 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
/* تصميم عنوان المدونة */
.blog-header {
  text-align: right;
  margin-bottom: 40px;
}
.blog-header h1 {
  color: var(--main-color);
  font-weight: 800;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}
.blog-header h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background-color: var(--accent-color);
}

/* أزرار الفئات */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.filter-btn {
  background: #eee;
  border: none;
  padding: 8px 20px;
  border-radius: 5px;
  font-weight: 600;
  color: var(--dark-color);
  transition: var(--transition);
  cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--main-color);
  color: white;
}

/* تصميم الكارت */
.blog-card {
  border: none;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.blog-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-img-container {
  width: 100%;
  height: 210px;
  overflow: hidden;
  position: relative;
}
.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 86, 179, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  /* إضافة التحريك من الأعلى */
  transform: translateY(-100%);
  transition: var(--transition);
}

/* التعديل في حالة الهوفر */
.blog-card:hover .image-overlay {
  opacity: 1;
  /* يرجع لمكانه الأصلي عند تمرير الماوس */
  transform: translateY(0);
}
.blog-card:hover .image-overlay {
  opacity: 1;
}

.search-btn {
  width: 50px;
  height: 50px;
  background: var(--white);
  color: var(--main-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
  transform: scale(0);
}
.blog-card:hover .search-btn {
  transform: scale(1);
}
.search-btn:hover {
  background: var(--accent-color);
  color: white;
}

.card-body {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-title {
  color: var(--dark-color);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 15px;
}

/* زر عرض التفاصيل تحت العنوان */
.details-btn {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  display: block;
  width: fit-content;
  margin: 0 auto;
}
.details-btn:hover {
  background: var(--accent-color);
  color: white;
  transform: scale(1.05);
}

/* الترقيم */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  padding-bottom: 50px;
}
.page-item {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  background: white;
  font-weight: bold;
  color: var(--main-color);
}
.page-item.active {
  background: var(--main-color);
  color: white;
}
.page-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--main-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 50px auto;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
