/* ===================================
   COURSE CARDS STYLING
   =================================== */

.courses {
  margin-top: 160px;
}

/* Event Filter Section */
.event_filter {
  text-align: center;
  background-color: #e9e1fe;
  padding: 15px 40px;
  list-style: none;
  margin: 0 auto 70px;
  max-width: max-content;
}

.event_filter li {
  display: inline-block;
  margin: 0px 20px;
}

.event_filter li a {
  font-size: 14px;
  font-weight: 500;
  color: #1e1e1e;
  transition: all .3s;
}

.event_filter li .event_filter li a.is_active,
.event_filter li a:hover {
  color: #8865e1;
}

/* ===================================
   COURSE CARD STRUCTURE
   =================================== */

.events_item {
  background-color: #e9e1fe;
  margin-bottom: 30px;
  position: relative;
  justify-content: center;
  align-items: center;
  background: rgba(249, 249, 249, 0.9);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

/* Course Image/Thumbnail */
.events_item .thumb {
  position: relative;
  overflow: hidden;
}

.events_item .thumb img {
  height: 200px;
  object-fit: cover;
  margin-bottom: -5px;
}

/* Category Badge */
.events_item .thumb span.category {
  position: absolute;
  left: 30px;
  top: 30px;
  font-size: 14px;
  text-transform: uppercase;
  color: #8865e1;
  background-color: rgba(250, 250, 250, 0.95);
  padding: 8px 20px;
  font-weight: 500;
  display: inline-block;
}

/* Price Badge */
.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 .thumb span.price {
  transform: scale(1.2);
}

/* ===================================
   COURSE CONTENT SECTION
   =================================== */

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

/* Course Title */
.events_item .down-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: all .3s;
}

.events_item:hover .down-content h4 {
  color: #8865e1;
}

/* Course Description */
.course-description {
  height: 60px;
  margin-bottom: 15px;
}

.course-description p {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin: 0;
  height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ===================================
   SPEAKER INFO & LIKE BUTTON
   =================================== */

.speaker-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speaker-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #8865e1;
  flex-shrink: 0;
}

.speaker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.events_item .down-content span.author {
  color: #8865e1;
  font-size: 14px;
  margin-bottom: 0;
  font-weight: 600;
  flex: 1;
}

/* Like Button */
.like-btn {
  width: 35px;
  height: 35px;
  background: rgba(136, 101, 225, 0.1);
  border-radius: 50%;
  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;
}

/* ===================================
   COURSE META INFORMATION
   =================================== */

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

.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;
}

.meta-item.voxels {
  color: #f39c12;
}

.meta-item.voxels i {
  color: #f39c12;
}

.meta-item.likes-count {
  color: #e74c3c;
}

.meta-item.likes-count i {
  color: #e74c3c;
  font-size: 16px;
}

/* ===================================
   SEATS WARNING NOTIFICATION
   =================================== */

.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);
  }
}

/* ===================================
   RESPONSIVE PAGINATION STYLES
   =================================== */

.pagination-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px;
  gap: 20px;
}

.course-pagination {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 12px;
  background: rgba(233, 225, 254, 0.3);
  box-shadow: 0 4px 15px rgba(136, 101, 225, 0.1);
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.page-item {
  margin: 0;
  display: flex;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  color: #8865e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  gap: 8px;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.page-link:hover {
  background: rgba(136, 101, 225, 0.1);
  color: #6b46c1;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(136, 101, 225, 0.2);
}

/* Active Page Styling */
.page-item.active .page-link {
  background: linear-gradient(135deg, #8865e1, #6b46c1);
  color: white;
  border-color: #8865e1;
  box-shadow: 0 6px 20px rgba(136, 101, 225, 0.4);
  font-weight: 700;
}

.page-item.active .page-link:hover {
  background: linear-gradient(135deg, #6b46c1, #553c9a);
  transform: translateY(-2px);
  color: white;
}

/* Disabled Page Styling */
.page-item.disabled .page-link {
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.page-item.disabled .page-link:hover {
  background: transparent;
  color: #ccc;
  transform: none;
  box-shadow: none;
}

/* Dots Styling */
.page-item.dots .page-link {
  cursor: default;
  color: #8865e1;
  font-weight: bold;
  font-size: 18px;
}

.page-item.dots .page-link:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* Previous/Next Button Icons */
.page-link i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.page-link:hover i {
  transform: scale(1.1);
}

.page-link span {
  font-size: 15px;
  font-weight: 600;
}

/* Pagination Info */
.pagination-info {
  text-align: center;
}

.pagination-info p {
  color: #666;
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}

.pagination-info strong {
  color: #8865e1;
  font-weight: 700;
}

/* Shimmer Effect */
.page-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.page-link:hover::before {
  left: 100%;
}

/* Loading State */
.page-link.loading {
  pointer-events: none;
  opacity: 0.7;
}

.page-link.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Accessibility */
.page-link:focus {
  outline: 3px solid #8865e1;
  outline-offset: 2px;
}

.page-item.active .page-link:focus {
  outline-color: white;
}

/* ===================================
   RESPONSIVE DESIGN - TABLETS
   =================================== */

@media (max-width: 768px) {
  /* Course Cards Responsive */
  .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;
  }

  .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;
  }

  /* Pagination Responsive */
  .pagination-wrapper {
    margin-top: 40px;
    gap: 15px;
  }

  .course-pagination {
    padding: 10px;
    gap: 6px;
  }

  .page-link {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  .page-link span {
    font-size: 13px;
  }

  .page-link i {
    font-size: 16px;
  }

  .pagination-info p {
    font-size: 14px;
  }
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */

@media (max-width: 480px) {
  /* Course Cards Mobile */
  .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;
  }

  .speaker-info {
    gap: 8px;
  }

  .speaker-avatar {
    width: 28px;
    height: 28px;
  }

  .events_item .down-content span.author {
    font-size: 12px;
  }

  /* Mobile Pagination */
  .course-pagination {
    padding: 8px;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .course-pagination::-webkit-scrollbar {
    display: none;
  }

  .page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  /* Hide text on mobile, keep only icons for prev/next */
  .page-link span {
    display: none;
  }

  .page-link i {
    font-size: 16px;
  }

  /* Show fewer page numbers on mobile */
  .page-item:not(.active):not(:first-child):not(:last-child):not(.dots) {
    display: none;
  }

  /* Show only active page and 1-2 pages around it */
  .page-item.active + .page-item,
  .page-item.active ~ .page-item {
    display: flex !important;
  }

  .pagination-info p {
    font-size: 13px;
  }
}

/* ===================================
   EXTRA SMALL SCREENS
   =================================== */

@media (max-width: 360px) {
  .course-pagination {
    padding: 6px;
    gap: 2px;
  }

  .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  .page-link i {
    font-size: 14px;
  }

  .pagination-info p {
    font-size: 12px;
  }

  /* Show even fewer elements */
  .page-item:not(.active):not(:first-child):not(:last-child) {
    display: none;
  }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
  .pagination-wrapper {
    display: none;
  }

  .like-btn {
    display: none;
  }

  .seats-warning {
    display: none;
  }
}
