.team-member {
  margin-bottom: 120px;
  transition: all 0.3s ease;
  height: 350px;
  display: flex;
  flex-direction: column;
}

.team-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.team-member img {
  width: 220px !important;
  height: 220px !important;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-110px);
  max-width: none;
  border: 4px solid #fff;
}

.image-wrapper .badge {
  position: absolute;
  background-color: #8865E1;
  color: #fff;
  top: 45px;
  right: 95px;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 25px rgba(99, 74, 186, 0.4);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  animation: floatBadge 3s ease-in-out infinite;


   /* موضع الشارة يتكيف مع حجم الصورة */
  top: clamp(20px, 8%, 45px);
  right: clamp(15px, 12%, 95px);
  
  /* تأكد من عدم تجاوز الشارة حدود الكارد */
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* تحسينات للشاشات الكبيرة */
@media (min-width: 1200px) {
  .image-wrapper .badge {
    top: 45px;
    right: 95px;
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 25px;
  }
}

/* تحسينات للشاشات المتوسطة */
@media (max-width: 1199px) and (min-width: 992px) {
  .image-wrapper .badge {
    top: clamp(35px, 6%, 40px);
    right: clamp(70px, 15%, 85px);
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 20px;
  }
}

/* تحسينات للتابلت */
@media (max-width: 991px) and (min-width: 768px) {
  .image-wrapper .badge {
    top: clamp(25px, 5%, 35px);
    right: clamp(50px, 12%, 70px);
    padding: 7px 12px;
    font-size: 11px;
    border-radius: 18px;
    max-width: 45%;
  }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 767px) and (min-width: 577px) {
  .image-wrapper .badge {
    top: clamp(20px, 4%, 30px);
    right: clamp(35px, 10%, 55px);
    font-size: 11px;
    border-radius: 15px;
    max-width: 50%;
    letter-spacing: 0.3px;
  }
}

/* تحسينات للموبايل */
@media (max-width: 576px) {
  .image-wrapper .badge {
    top: clamp(15px, 3%, 25px);
    right: clamp(25px, 8%, 45px);
    padding: 5px 8px;
    font-size: 9px;
    border-radius: 12px;
    max-width: 55%;
    letter-spacing: 0.2px;
    gap: 2px;
  }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .image-wrapper .badge {
    top: clamp(12px, 2.5%, 20px);
    right: clamp(20px, 6%, 35px);
    padding: 4px 6px;
    font-size: 8px;
    border-radius: 10px;
    max-width: 60%;
    letter-spacing: 0.1px;
  }
}

/* تحسينات للشاشات الصغيرة جداً جداً */
@media (max-width: 360px) {
  .image-wrapper .badge {
    top: clamp(10px, 2%, 18px);
    right: clamp(15px, 5%, 30px);
    padding: 3px 5px;
    font-size: 7px;
    border-radius: 8px;
    max-width: 65%;
  }
}

/* تأثير الطفو للشارة - يتكيف مع حجم الشاشة */
@keyframes floatBadge {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(clamp(-3px, -0.8vw, -5px));
  }
}

/* تأثير الهوفر المتجاوب */
.image-wrapper .badge:hover {
  transform: translateY(clamp(-2px, -0.5vw, -3px)) scale(clamp(1.02, 1.05, 1.1));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(136, 101, 225, 0.6);
}

/* تحسين للشاشات عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .image-wrapper .badge {
    border-width: 1px;
    box-shadow: 0 2px 8px rgba(136, 101, 225, 0.3);
  }
}

/* تحسين للشاشات الطويلة (موبايل أفقي) */
@media (max-height: 500px) and (orientation: landscape) {
  .image-wrapper .badge {
    top: clamp(8px, 2%, 15px);
    right: clamp(20px, 8%, 40px);
    padding: 3px 6px;
    font-size: 8px;
    border-radius: 8px;
  }
}



/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
  .speaker-badge {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .speaker-badge.circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .search-sort-wrapper{
    margin-bottom: 100px !important;
  }
      
}

@media (max-width: 480px) {
  .speaker-badge {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .speaker-badge.circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}


.team-member .main-content {
  padding: 90px 25px 25px 25px;
  background: linear-gradient(145deg, #E9E1FE, #f0ebff);
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.team-member .main-content span.category {
  color: #8865E1;
  font-size: 13px;
  font-weight: 600;
  background: rgba(136, 101, 225, 0.1);
  padding: 8px 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  white-space: nowrap; /* سطر واحد فقط */
}

.team-member .main-content h4 {
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    position: relative;
    margin-bottom: 20px;
    margin-top: 10px;
   }

.speaker-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0px -4px ;
  padding: 10px 10px ;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(136, 101, 225, 0.1);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #8865E1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 10px;
  color: #7f8c8d;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}


.star-rating i {
  color: #f39c12;
  font-size: 14px;
  margin: 0; /* إزالة المسافة بين النجوم */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.clickable-card {
  cursor: pointer;
}

.team-member .main-content ul {
  margin-top: auto;
  padding-top: 10px;
}

.team-member .main-content ul li {
  display: inline-block;
  margin: 0px 2px;
}

.team-member .main-content ul li a {
  background-color: #fff;
  color: #8865E1;
  display: inline-block;
  text-align: center;
  line-height: 40px;
  font-size: 18px;
  width: 40px;
  height: 40px;
  transition: all .3s;
}

.team-member .main-content ul li a:hover {
  background-color: #8865E1;
  color: #fff;
}

/* 
---------------------------------------------
Events & Cards Styles
--------------------------------------------- 
*/
.events_item .thumb img {
  height: 200px;
  object-fit: cover;
  margin-bottom: -5px;
}

.title-with-like {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.like-btn {
  width: 35px;
  height: 35px;
  background: rgba(136, 101, 225, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.like-btn i {
  font-size: 16px;
  color: #8865E1;
  transition: all 0.3s ease;
}

.like-btn:hover {
  background: #8865E1;
  transform: scale(1.1);
  border-color: #8865E1;
}

.like-btn:hover i {
  color: white;
}

.like-btn.liked {
  background: #e74c3c;
  border-color: #e74c3c;
}

.like-btn.liked i {
  color: white;
}

.like-btn.liked:hover {
  background: #c0392b;
  border-color: #c0392b;
}

.seats-warning {
  position: absolute;
  bottom: 15px;
  left: 20px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: pulse 2s infinite;
  z-index: 5;
}

.seats-warning i {
  font-size: 14px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
}

.course-meta {
  margin-bottom: 15px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(136, 101, 225, 0.2);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.meta-item i {
  font-size: 16px;
  color: #8865E1;
}

.events_item .down-content {
  padding: 15px 25px 20px 25px;
}

.events_item .down-content span.author {
  color: #8865E1;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 8px;
}

.events_item .down-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;
  flex: 1;
}

.events_item .thumb span.price {
  position: absolute;
  right: -30px;
  top: -50px;
  background-color: rgba(122, 106, 216, 0.95);
  width: 130px;
  height: 130px;
  display: inline-block;
  transition: all .3s;
  z-index: 3;
}

.events_item .thumb span.price h6 {
  margin-top: 72px;
  margin-left: 22px;
  font-size: 28px;
  text-transform: uppercase;
  color: #fff;
  font-weight: 700;
}

.events_item .thumb span.price em {
  font-size: 18px;
  font-weight: 500;
  font-style: normal;
  vertical-align: top;
}

.events_item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(136, 101, 225, 0.2);
}

.events_item:hover .thumb span.price {
  transform: scale(1.2);
}


/* 
---------------------------------------------
Responsive Design
--------------------------------------------- 
*/


@media (max-width: 768px) {
  
  /* Team Member Cards - Mobile */
  .team-member {
    height: 380px;
    margin-bottom: 100px;
  }
  
  .team-member img {
    width: 120px !important;
    height: 120px !important;
    top: -60px;
    transform: translateX(-60px);
  }
  
  .team-member:hover img {
    top: -70px;
    transform: translateX(-60px) scale(1.05);
  }
  
  .team-member .main-content {
    padding: 80px 20px 20px 20px;
  }
  
  .speaker-stats {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
  
  .stat-item {
    border: none !important;
    padding: 0 !important;
  }
  
  .rating-stat {
    border: none !important;
  }

  /* Events & Cards - Mobile */
  .events_item .thumb img {
    height: 180px;
  }
  
  .meta-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .meta-item {
    font-size: 12px;
  }
  
  .like-btn {
    width: 32px;
    height: 32px;
  }
  
  .like-btn i {
    font-size: 14px;
  }
  
  .title-with-like {
    gap: 8px;
  }
  
  .events_item .down-content h4 {
    font-size: 18px;
  }
  
  .seats-warning {
    font-size: 11px;
    padding: 5px 10px;
    bottom: 10px;
    left: 15px;
  }
  
  .events_item .thumb span.price {
    width: 110px;
    height: 110px;
    right: -25px;
    top: -45px;
  }
  
  .events_item .thumb span.price h6 {
    margin-top: 62px;
    margin-left: 18px;
    font-size: 24px;
  }
}

@media (max-width: 576px) {
  .team-member {
    height: 360px;
  }
  
  .team-member .main-content h4 {
    font-size: 16px;
  }
  
  .team-member .main-content span.category {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .stat-number {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .main-nav {
    padding: 10px 15px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section-content h2 {
    font-size: 1.75rem;
  }

  .section-content p {
    font-size: 1rem;
  }

  .events_item .thumb img {
    height: 160px;
  }
  
  .events_item .down-content {
    padding: 12px 20px 15px 20px;
  }
  
  .course-meta {
    padding: 10px 0;
  }
  
  .meta-item {
    font-size: 11px;
  }
  
  .meta-item i {
    font-size: 14px;
  }
  
  .like-btn {
    width: 30px;
    height: 30px;
  }
  
  .like-btn i {
    font-size: 13px;
  }
  
  .events_item .down-content h4 {
    font-size: 16px;
  }
  
  .title-with-like {
    gap: 6px;
  }

 
}





/* إصلاح مشكلة اختفاء النصوص في الشاشات المتوسطة */
@media (max-width: 769px)  {
  .team-member {
    height: 450px; /* زيادة الارتفاع */
    margin-bottom: 90px;
  }
  
  .team-member img {
    width: 160px !important;
    height: 160px !important;
    top: -80px;
    transform: translateX(-80px);
  }
  
  .team-member .main-content {
    padding: 100px 20px 25px 20px; /* زيادة الـ padding العلوي */
  }
  
  .team-member .main-content span.category {
    font-size: 12px;
    padding: 6px 12px;
    margin-bottom: 10px;
    display: block; /* تأكد من الظهور */
    visibility: visible; /* تأكد من الرؤية */
  }
  
  .team-member .main-content h4 {
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 5px;
    display: block; /* تأكد من الظهور */
    visibility: visible; /* تأكد من الرؤية */
  }
  
  .speaker-stats {
    margin: 10px 0;
    padding: 12px 8px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .stat-label {
    font-size: 9px;
  }
}

/* تحسين إضافي للشاشات حول 769px */
@media (max-width: 800px) and (min-width: 769px) {
  .team-member {
    height: 380px;
  }
  
  .team-member .main-content {
    padding: 95px 22px 25px 22px;
  }
  
  .team-member .main-content span.category,
  .team-member .main-content h4 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}




.team-member .main-content {
  position: relative; /* Add this if not already present */
}

.rating-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(136, 101, 225, 0.2);
  z-index: 5;
}

.rating-badge .star-rating {
  display: flex;
  gap: 1px;
}

.rating-badge .star-rating i {
  color: #f39c12;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-badge .rating-text {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-left: 2px;
}

/* Remove the old rating-stat styles */
.stat-item.rating-stat {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .rating-badge {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    border-radius: 15px;
  }
  
  .rating-badge .star-rating i {
    font-size: 11px;
  }
  
  .rating-badge .rating-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .rating-badge {
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    border-radius: 12px;
  }
  
  .rating-badge .star-rating i {
    font-size: 10px;
  }
  
  .rating-badge .rating-text {
    font-size: 10px;
  }
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}


.pagination-wrapper {

    margin-top: -70px !important;
   
}
