:root {
  --primary: 247, 148, 29;
  --secondary: 53, 89, 118;
  --border: 162, 172, 180;
  --muted: 237, 240, 242;
  --text: 27, 29, 40;
  --text-muted: 157, 157, 157;
  --white: 255, 255, 255;
}

.main-inner {
  padding: 0 !important;
}

#region-main {
  padding: 0;
  margin: 0;
  background-color: inherit;
  overflow: hidden;
}

.course-catalog {
  overflow: hidden;
  padding: 1rem;
}

/* Navigation */
.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs a,
.breadcrumbs a:hover,
.breadcrumbs span {
  font-size: 0.875rem;
  color: rgb(var(--text));
}


/* Catalog header */
.catalog-header {
  padding: 1.5rem; 
  margin-bottom: 2rem;
  background-color: rgb(var(--secondary));
  border-radius: 0.625rem;
  display: grid;
  justify-content: space-between;
  align-items: center;
  gap: 1rem; 
}

.catalog-header__title {
  font-size: 3.5rem;
  font-weight: 900;
  color: rgb(var(--white));
}

.categories-filter-menu {
  display: flex;
  flex-wrap: wrap;
  /* gap: 0.75rem 1rem; */
  gap: 0.5rem; 
}

.categories-filter-menu__item label {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(var(--white));
  /* padding: 0.625rem 1.5rem; */
  padding: 0.65rem 1.25rem;
  margin: 0;
  background-color: rgb(var(--secondary));
  border-radius: 0.625rem;
  border: 1px solid rgb(var(--white));
  height: auto;
  line-height: normal;
  cursor: pointer;
}

.categories-filter-menu__item input:checked + label{
  background-color: rgb(var(--white));
  color: rgb(var(--secondary));
}

.categories-filter-menu__item label {
  margin: 0;
}


/* Catalog content */
.catalog-content {
  display: grid;
  gap: 1.5rem;
}

.catalog-content__filter-menu-action-buttons {
  display: flex; 
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.catalog-content__visibility-toggle-button {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(var(--white));
  padding: 0.75rem 1.25rem;
  margin: 0;
  background-color: rgb(var(--secondary));
  border-radius: 0.625rem;
  height: auto;
  line-height: normal;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.catalog-content__visibility-toggle-button::before {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  content: "\58";
  margin-right: 0.8rem;
  width: 0.5rem;
  height: 0.5rem;
}

.catalog-content_filter-menu-hidden .catalog-content__visibility-toggle-button::before {
  content: "\f0b0";
}

.catalog-content__reset-filters-button,
.catalog-content__reset-filters-button:hover {
  text-align: center;
  color: rgb(var(--text));
  cursor: pointer;
}

.catalog-content__coursecount {
}

/* Filter menu */
.filter-menu {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 0.625rem;
  padding: 1rem;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
} 

.filter-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-menu__header h2 {
  font-size: 1.25rem;
  font-weight: bold;
  color: rgb(var(--text));
  margin: 0;
}

.filter-menu__header button {
  background-color: transparent;
  padding: 0;
}

.filter-menu__header button::before {
  color: rgb(var(--text));
  font-family: "Font Awesome 6 Free";
  content: "\58";
  cursor: pointer;
}

.catalog-content_filter-menu-hidden .filter-menu {
  display: none;  
}


.filter-menu__filters-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-menu__filters-block h3{
  font-size: 1rem;
  font-weight: bold;
  color: rgb(var(--text));
  margin: 0 0 0.5rem 0;
} 

.filter-menu__filters-block-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-menu__filters-block-item input {
  accent-color: rgb(var(--primary));
  min-width: 1.5rem; 
  min-height: 1.5rem; 
}

.filter-menu__filters-block-item label {
  font-size: 1rem;
  color: rgb(var(--text));
  margin: 0;
  line-height: 1.2;
} 

.filter-menu__show-result-button {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(var(--white));
  padding: 0.75rem 1.5rem;
  margin: 0;
  background-color: rgb(var(--secondary));
  border-radius: 0.625rem;
  height: auto;
  line-height: normal;
  cursor: pointer;
  text-align: center;
}

/* Catalog course  */
#catalog-courses {
  position: relative;
  min-height: 200px;
}

.catalog-courses__course-list {
  display: grid;
  align-items: start;
  gap: 1rem;
}

.catalog-course-card {
  border: 1px solid rgb(var(--border));
  border-radius: 1rem;
  padding: 1rem;
  background-color: rgb(var(--white));
  height: 100%;
}

.catalog-course-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.catalog-course-card__badge-primary {
  font-size: 0.75rem;
  font-weight: bold;
  color: rgb(var(--white));
  white-space: nowrap;
  text-transform: lowercase;
  line-height: normal;
  border-radius: calc(infinity * 1px);
  padding: 0.25rem 0.5rem;
  background-color: rgb(var(--secondary));
}

.catalog-course-card__badge-secondary {
  font-size: 0.75rem;
  color: rgb(var(--text));
  white-space: nowrap;
  text-transform: lowercase;
  line-height: normal;
  border-radius: calc(infinity * 1px);
  padding: 0.25rem 0.5rem;
  background-color: rgb(var(--muted));
}

.catalog-course-card__badge-new {
  justify-self: stretch; 
  font-size: 0.75rem;
  font-weight: bold;
  color: rgb(var(--white));
  white-space: nowrap;
  text-transform: uppercase;
  line-height: normal;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  background-color: rgb(var(--primary));
}

.catalog-course-card__title {
  display: block;
  font-size: 1.25rem;
  color: rgb(var(--text));
  margin-bottom: 0.75rem;
  min-height: 5ex;
}

.catalog-course-card__title:hover {
  text-decoration: underline;
}

.catalog-course-card__image {
  aspect-ratio: 18 / 13;
  border-radius: 0.625rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.catalog-course-card__image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-course-card__footer {
  gap: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.catalog-course-card__price {
  font-size: 1.125rem;
  color: rgb(var(--text));
}

.catalog-courses__courses-fetch-error,
.catalog-courses__courses-not-found {
  background-color: rgb(var(--muted));
  border-radius: 0.625rem;
  padding: 3rem 0;
  text-align: center;
}

.catalog-courses__courses-fetch-error h3,
.catalog-courses__courses-not-found h3 {
  font-size: 1.25rem; 
  color: rgb(var(--text));
  margin-bottom: 0.75em;
}

.catalog-courses__courses-fetch-error button,
.catalog-courses__courses-not-found button {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(var(--white));
  padding: 0.75rem 1.5rem;
  margin: 0;
  background-color: rgb(var(--secondary));
  border-radius: 0.625rem;
  height: auto;
  line-height: normal;
  cursor: pointer;
  text-align: center;
}



@media (min-width: 640px) {
  /* Catalog course list */
  .catalog-courses__course-list {
    grid-template-columns: repeat(auto-fill,minmax(19rem, 1fr));
  }
}

@media (min-width: 768px) {
}

@media (min-width: 1024px) {
  /* Catalog header */
  .catalog-header {
    padding: 2rem; 
    gap: 3rem; 
    grid-template-columns: 1fr auto;
  }
  /* Catalog content */
  .catalog-content {
    grid-template-columns: 21rem auto;
  }

  .catalog-content__filter-menu-action-buttons {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .catalog-content__visibility-toggle-button {
    display: none; 
  }
  .catalog-content_filter-menu-hidden .filter-menu {
    display: flex;
  }
  .catalog-content__reset-filters-button,
  .catalog-content__reset-filters-button:hover {
    text-align: left;
  }

  .catalog-content__coursecount {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .filter-menu {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    box-shadow: none;
    padding: 0;
  }


  .filter-menu__header,
  .filter-menu__show-result-button {
    display: none; 
  }
}

@media (min-width: 1200px) {
  /* Catalog header */
  .catalog-header {
    padding: 3rem; 
    gap: 15rem;
  }
  .catalog-header__title {
    font-size: 4.5rem; 
  }

  .categories-filter-menu {
    justify-content: flex-end;
  }
}
@media (min-width: 1600px) {
  /* Catalog header */
  .catalog-header {
    gap: 20rem;
  }
}




/* Skeleton loading */
.catalog-courses__skeleton {
  opacity: 1;
  transition: opacity 0.3s ease;
}


/* Блоки внутри skeleton-карточки */
.skeleton-card {
  background-color: rgb(var(--white));
}

.skeleton-card > * {
  animation: loading-skeleton 1.5s linear infinite alternate;
  border-radius: 0.5rem;
}

.skeleton-card .catalog-course-card__header {
  height: 1.5rem;
  width: 70%;
}

.skeleton-card .catalog-course-card__title {
  height: 3.5rem;
  width: 100%;
  margin: 0.75rem 0;
}

.skeleton-card .catalog-course-card__image {
  width: 100%;
  aspect-ratio: 18 / 13;
  margin-bottom: 0.75rem;
}

.skeleton-card .catalog-course-card__footer {
  height: 2.2rem;
  width: 40%;
}

@keyframes loading-skeleton {
  0% {
    background-color: hsl(204, 16%, 70%);
  }

  100% {
    background-color: hsl(204, 16%, 90%);
  }
}
