/* /// filter btn  */
.filter_btn {
  border: 1px solid rgba(0, 0, 0, 0.23);
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter_btn i {
  transition: transform 0.3s ease;
}

.filter_btn.active {
  background-color: rgba(0, 0, 0, 0.1);
}

.filter_btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.clear-filter {
  display: none;
}

.clear-filter.active {
  display: block;
}

.course_ai_integrated {
  border-radius: 50px;
  padding: 10px 12px;
}

/* ======= FILTER GRID SECTION ======  */
.filter-section__contents--option_form {
  position: relative;
  width: 100%;
}

.filter-section__contents--option_form input {
  width: 100%;
}

.filter-section__contents--option_form .search-icon,
.filter-section__contents--option_form .clear-icon {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  color: #6c757d;
  display: block;
}

.filter-section__contents--option_form .search-icon {
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Hide the icon on form hover or when input is focused */
.filter-section__contents--option_form:hover .search-icon,
.filter-section__contents--option_form:focus-within .search-icon {
  opacity: 0;
}

.filter-section__contents--option_form input.has-value ~ .search-icon {
  opacity: 0 !important;
}

.filter-section__contents--option_form .clear-icon {
  display: none;
  cursor: pointer;
}

.filter-section__contents--option_form input.has-value ~ .clear-icon {
  display: block;
}

/* Hide default search cancel button */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.topic-search--wrapper.active {
  display: block;
}

.topic-search--wrapper {
  display: none;
}

.categories_search_toggle_search-icon {
  display: block;
}

.categories_search_toggle_clear-icon {
  display: none;
}

.categories_search_toggle_search-icon.hidden {
  display: none;
}

.categories_search_toggle_clear-icon.active {
  display: block;
}

.filter-section__contents--option_form .search-input::placeholder {
  color: rgb(181, 181, 181);
}

@media (max-width: 991px) {
  .filter-section__contents--option_form .search-input {
    font-size: 16px !important;
  }
}

/* ====category lists ====  */
.filter-section_cat-lists {
  max-height: 200px;
  overflow-y: scroll;
}

/* Calendar Styles */
.custom-calendar {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calendar-header h6 {
  font-weight: 700;
  color: #333;
  font-size: 1.1rem;
}

.calendar-header button {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-weight: bold;
}

.calendar-header button:hover {
  background: #3d5ee1;
  /* Main blue color */
  color: #fff;
  border-color: #3d5ee1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  text-align: center;
  margin-top: 15px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  padding: 2px;
  transition: all 0.2s ease;
  color: #444;
}

/* Today highlight */
.calendar-day.today {
  background-color: #3d5ee1;
  /* Mystic Academy Main Blue */
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(61, 94, 225, 0.3);
}

/* Selected date highlight */
.calendar-day.selected-date {
  background-color: #eef2ff;
  color: #3d5ee1 !important;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px #3d5ee1;
}

/* Past days style */
.calendar-day.past-day {
  background-color: #f2f2f2;
  color: #aaa;
  cursor: default;
}

.calendar-day:not(.past-day):not(.today):hover {
  background-color: #eef2ff;
  color: #3d5ee1;
}

/* Column Headers (Days of week) - Optional enhancement */
.calendar-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 5px;
}

.calendar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
}

/* Hidden elements */
#prevMonth[style*="display: none"] {
  visibility: hidden;
  /* Keep spacing if needed, but display: none is usually fine */
}

/* ======= course duration =====  */
.form-check input[type="radio"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px !important;
  background-color: #fff;
  outline: 2px solid #000;
  outline-offset: 1px;
}

/* Checked state */
.form-check input[type="radio"]:checked {
  background-color: #3d5ee1;
  outline: 2px solid #000;
  outline-offset: 1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.3 4.3L6 11.6 2.7 8.3l1.4-1.4L6 8.8l5.9-5.9z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Focus ring */
.form-check input[type="radio"]:focus {
  outline: 2px solid #000;
  outline-offset: 1px;
}

/* ======= filter button toggle =====  */
#sidebar.active {
  max-width: 25%;
  max-height: none;
  opacity: 1;
  visibility: visible;
  padding-left: 12px;
  padding-right: 12px;
}

#sidebar {
  width: 25%;
  max-width: 0;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 0;
  padding-right: 0;
  flex-shrink: 0;
  position: relative;
  /* Added for close button positioning */
}

.sidebar-close-btn {
  display: none;
}

#content {
  height: 100%;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

#sidebar.active+#content {
  width: 75%;
}

@media (max-width: 991px) {
  #sidebar.active+#content {
    width: 60% !important;
  }

  #sidebar.active {
    max-width: 40%;
  }

  #sidebar {
    width: 40%;
  }
}

.mainContainer_course {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  min-height: 80vh;
}

/* Handle column transitions inside content */
.content_row>div {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay_mobile {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  cursor: pointer;
}

.overlay_mobile.active {
  display: block;
}

@media (max-width: 576px) {
  .mainContainer_course {
    flex-wrap: wrap;
  }

  .sidebar-close-btn {
    display: flex !important;
    position: absolute;
    top: 16px;
    left: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    z-index: 1060;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.15);
  }

  #sidebar {
    position: fixed;
    top: 0;
    right: -100% !important;
    bottom: 0;
    width: 100% !important;
    height: 100dvh !important;
    background: #fff;
    z-index: 1050;
    max-width: 70% !important;
    max-height: 100dvh !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 60px 20px 20px !important;
    overflow-y: auto;
    opacity: 1 !important;
    visibility: visible !important;
    margin: 0 !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  #sidebar.active {
    right: 0 !important;
  }

  #sidebar.active+#content {
    width: 100% !important;
  }

  .side-overlay.active {
    display: block;
    z-index: 1002;
    background-color: rgba(0, 0, 0, 0.5);
  }
}

/* ==== calendar highlights ==== */
.calendar-day.has-event {
  position: relative;
  font-weight: 700;
  color: #3d5ee1;
}

.calendar-day.has-event::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: #ff4d4d;
  border-radius: 50%;
  box-shadow: 0 0 2px rgba(255, 77, 77, 0.5);
}

.calendar-day.today.has-event::after {
  background-color: white;
}

/* ==== filter count badge ==== */
.filter-count-badge {
  background-color: #3d5ee1;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
  display: none;
  vertical-align: middle;
  line-height: normal;
}

.filter-count-badge.active {
  display: inline-block;
}

@media (max-width: 768px) {
  .couresContainer {
    max-width: 700px !important;
  }

  .form-check {
    padding-left: 10px;
  }
}

@media (max-width: 700px) {
  .custom-calendar {
    padding: 1px;
  }

  .calendar-grid {
    gap: 1.5px;
  }
}

@media (max-width: 577px) {
  .mobile-12 {
    width: 100% !important;
    -webkit-box-flex: 0 !important;
    -webkit-flex: 0 0 auto !important;
    -ms-flex: 0 0 auto !important;
    flex: 0 0 auto !important;
  }
}

/* ======= Pagination Styles ======= */
.course_title {
  height: 3em;
  /* exactly 1 line height */
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.page-btn--active {
  background-color: #3d5ee1 !important;
  color: #fff !important;
  border-color: #3d5ee1 !important;
  box-shadow: 0 4px 12px rgba(61, 94, 225, 0.35);
  font-weight: 700;
  transform: scale(1.08);
  pointer-events: none;
}

.page-btn--default {
  background-color: #fff;
  color: #333;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.page-btn--default:hover {
  background-color: #eef2ff;
  color: #3d5ee1;
  border-color: #3d5ee1;
}

.page-btn--disabled {
  background-color: #f8f9fa;
  color: #adb5bd;
  border: 1px solid #dee2e6;
  cursor: not-allowed;
  opacity: 0.55;
}

.page-btn--ellipsis {
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: default;
  font-weight: 700;
  pointer-events: none;
}

.pagination--disabled {
  pointer-events: none;
}

.course_image_ratio {
  aspect-ratio: 16/10;
}

.course-img-fallback {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #5264ad 0%, #25459d 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: capitalize;
  border-radius: 12px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.1);
}

.course-img-fallback img {
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

/* No Results State Styles */
.no-results-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
}

.no-results-img {
  max-width: 250px;
  height: auto;
  opacity: 0.8;
}

.no-results-state__title {
  color: #1f2937;
  font-weight: 700;
}

.no-results-state__desc {
  font-size: 15px;
  line-height: 1.6;
}

#resetFiltersBtn {
  background-color: #3d5ee1;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

#resetFiltersBtn:hover {
  background-color: #1e3a8a;
  box-shadow: 0 4px 15px rgba(61, 94, 225, 0.4);
  transform: translateY(-2px);
}

/* ======= new batch =====  */
.card-days {
  color: #fff;
  clip-path: polygon(100% 0, 90% 54%, 100% 100%, 0 100%, 0 0);
  background-color: #ff6a40;
  padding: 5px;
}

/* ===== index page courses list =====  */
@media (min-width:576px) and (max-width:768px) {
  .course_banner_dur_bg {
    margin: 10px 0 0 10px !important;
    padding: 7px 10px !important;

  }

  .course_banner_dur_bg span {
    font-size: 16px !important
  }

  .course_banner_ai_bg {
    margin: 10px 10px 0 0 !important;

  }

  .course-item__content h4 {
    margin-bottom: 15px !important;
  }

  .course-item_content_type {
    margin-bottom: 15px !important;
    gap: 0 !important
  }

  .course-item_price {
    margin-top: 25px !important;
    padding-top: 0 !important;
    flex-direction: column !important;
    align-items: flex-start !important;

  }

  .course-item__content {
    padding: 20px !important;
  }

  .course-item {
    height: auto !important;
  }

  .course-item_price h4 {
    margin-bottom: 0 !important;
  }
}