.loading-spinner {
  color: var(--grey-text);
  display: inline-block;
  vertical-align: middle;
  animation: rto-spin 1s linear infinite;
  margin-right: 8px; /* ← spacing before text */
}
@keyframes rto-spin { to { transform: rotate(360deg); } }


.js-hide { display: none !important; }

.enrolment-step-container h2 {
  font-family: var(--gp-font--roboto);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  white-space: pre-wrap;
  text-align: center;
}

#available-courses h3 {
  font-family: var(--gp-font--roboto);
  font-weight: 700;
}

.enrolment-step-container {
  margin-top: 15px;
  border-radius: 7px;
  padding: 20px;
  background-color: var(--black);
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
}

.filter-payment,
.filter-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

body .filter-heading:nth-of-type(2) { margin-top: 16px; }

/* Payment Type buttons — match Course button styles */
.filter-payment .btn {
  border: 1px solid var(--dark-grey-accent);
  background-color: var(--black);
  font-family: var(--gp-font--roboto);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  padding: 20px 20px;
  font-size: 15px;
  box-sizing: border-box;
  border-radius: 7px;
  cursor: pointer;
  flex: 1 1 calc(33.333% - 20px);
}

.filter-payment .btn:hover {
  border: 1px solid var(--red); 
}
.filter-payment .btn.active {
  background-color: var(--dark-grey);
  border: 1px solid var(--red);
}

.filter-courses .btn {
  border: 1px solid var(--dark-grey-accent);
   background-color: var(--black);
  font-family: var(--gp-font--roboto);
  text-transform: uppercase;
  font-weight: 700;
  color: var(--red);
  padding: 50px 20px;
  font-size: 15px;
  flex: 1 1 calc(33.333% - 20px);
  box-sizing: border-box;
  border-radius: 7px;
  cursor: pointer;
  line-height:1.4em;
}

.filter-courses .btn:hover { border: 1px solid var(--red);  }
body .filter-courses .btn:hover .black { color: #FFF; }
.filter-courses .btn.active { 
    color: var(--red);
    background-color: var(--dark-grey);   
    border: 1px solid var(--red); 
}
.filter-courses .black:not(.active .black) { color: #FFF;   line-height: 1.4em;
  font-size: 14px; }
.filter-courses .btn.active .black { color: #fff;   line-height: 1.4em;
  font-size: 14px; }

@media (min-width: 769px) {
  .black { display: block; }
  .filter-courses .btn { max-width: 33.33%; min-height: 204px; }
}

@media (max-width: 768px) {
    #rto-courses {
      margin-left: 23px;
      margin-right: 23px;
    }
  .filter-payment .btn {
    padding: 20px 20px;
    width: 100%;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .filter-courses .btn {
    padding: 20px 20px;
    width: 100%;
    flex: 1 1 100%;
  }

  .filter-courses,
  .filter-payment {
    gap: 10px;
  }

  body .course-heading-button { font-size: 14px; }
  body .filter-heading {     text-align: center;
    font-size: 18px !important;
    padding-bottom: 14px;
   }
}

/* Custom Dropdown */
.custom-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-dropdown .btn {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  font-family: var(--gp-font--roboto);
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
  background-color: var(--black);
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid var(--white);
  border-top: 0;
  border-left: 0;
  border-right: 0;
}

.custom-dropdown .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 16px;
  height: 12px;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat center center / contain;
}

.custom-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.125rem;
  padding: 0;
  background-color: var(--dark-grey);
  border: 1px solid var(--dark-grey-accent);
  border-radius: 0 0 7px 7px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.custom-dropdown .dropdown-menu.show { display: block; }

.custom-dropdown .dropdown-item {
  padding: 0.375rem 0.75rem;
  font-family: var(--gp-font--roboto);
  font-size: 15px;
  font-weight: 400;
  color: var(--grey-text);
  cursor: pointer;
  display: block;  
  background-color: var(--dark-grey);
}

.custom-dropdown .dropdown-item:hover {   background-color: var(--red); color: var(--white); }

/* Course Cards */
.course-heading-button {
color: var(--dark-grey-text);
  display: block;
  font-family: var(--gp-font--roboto);
  text-transform: uppercase;
  line-height: 1.3em;
  font-size: 14px;
  font-weight: 400;
}

.dynamic-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;  
  margin-top: 45px;
}

.course-card {
  flex: 1 1 calc(100% - 20px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--dark-grey-accent);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.course-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 30px 45px;
  background-color: var(--dark-grey);
}

.course-name {
  font-family: var(--gp-font--roboto);
  text-transform: uppercase;
  line-height: 1.3em;
  font-size: 15px;
  font-weight: 700;
  max-width: 200px;
}

.course-card-text { margin-bottom: 20px; flex-grow: 1; }

.course-row:not(#course-pricing) {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.course-row:not(#course-pricing) {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.course-price-container { display: flex; justify-content: center; }

.course-icon { width: 30px; }
.course-location, .course-date { font-size:15px; }
.course-location,
.course-date,
.course-cost {
    color:var(--grey-text);
}
.course-title,
.course-code,
.course-location,
.course-date { flex: 1; }

.course-location,
.course-date,
.course-intake { padding-left: 10px; }

.course-intake {
  font-family: var(--gp-font--roboto);
  font-style: italic;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 400;  
  color: var(--grey-text);
}

.course-code {
  color: var(--red);
  font-family: var(--gp-font--roboto);
  font-weight: 700;
  font-size: 16px;
}

.course-totalcost {
  font-family: var(--gp-font--roboto);
  font-weight: 700;
  color: var(--grey-text);
  text-transform: uppercase;
  font-size: 14px;
}

#course-pricing { margin-top: 5px; margin-bottom: 10px; text-align: center; }

.course-btn-row { text-align: center; justify-content: center; }

.course-btn {
  font-family: var(--gp-font--roboto);
  padding: 10px 20px;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 5px;
  display: inline-block;
}

.course-btn.btn-primary {
background-color: transparent;
  color: var(--white);
  text-decoration: none;
  font-family: var(--gp-font--montserrat);
  border: 1px solid var(--red); 
  margin-top: 10px;
}

.course-btn.btn-primary:hover {
  background-color: var(--light-red);
  color: var(--white);
}

@media (max-width: 989px) {
  .course-btn { width: 100%; }
}

@media (min-width: 576px) {
  .course-card {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (min-width: 992px) {
  .course-card {
    flex: 1 1 calc(33.3333% - 20px);
    max-width: calc(33.3333% - 20px);
    min-width: calc(33.3333% - 20px);
  }
}

/* Location Section */
#location-container {
  display: flex;
  flex-direction: column;
}

#location-container h2 {
  font-family: var(--gp-font--roboto);
  font-weight: 700;
  font-size: 17px;
  text-transform: uppercase;
  white-space: pre-wrap;
  margin-bottom: 15px;
}

#location-container .filter-container { flex: 1; }

@media (min-width: 992px) {
  #location-container { flex-direction: row; align-items: center; }
  #location-container h2 { width: 190px; margin-bottom: 0; margin-right: 20px; }
  #location-container .filter-container { flex: 1; }
}

#available-courses {
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
}

.coursecard-container {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom:60px;
}

/* Search Button */
.search-container {
  margin-top: 15px;
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom:60px;
}

.btn-search {
  font-family: var(--gp-font--roboto);
  background-color: var(--red);
  color: #FFF;
  padding: 15px 30px;
  border: none;
  border-radius: 7px;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 20px;  
  font-family: var(--gp-font--montserrat);
}

.btn-search:hover {
  background-color: var(--light-red);
  color: var(--white);
}

.text-center { text-align: center; }
