/* Общие настройки */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Arial", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Hero секция */
.hero {
  background-size: cover;
  color: #fff;
}

.hero-inner {
  padding: 64px 32px;
  text-align: center;
}

.hero-inner h1 {
  font-size: 42px;
  color: #333;
  font-family: "Roboto Slab", sans-serif;
  font-weight: 400;
}

/* Course Section */
.course-section {
  display: flex;
  gap: 32px;
  padding: 48px 0;
  justify-content: space-between;
}

.filter-column {
  width: 30%;
}

.price-filter {
  margin-top: 32px;
}

.price-filter h4 {
  margin-bottom: 8px;
  font-size: 16px;
  color: #333;
}

.slider-values {
  font-size: 16px;
  margin-bottom: 16px;
  color: #555;
}

.range-slider {
  position: relative;
  height: 5px;
}

.slider-track {
  position: absolute;
  height: 4px;
  top: 60%;
  transform: translateY(-50%);
  background: #007bff;
  border-radius: 3px;
  z-index: 1;
}

.range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background: none;
  z-index: 2;
  -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  margin-top: -6px;
  z-index: 3;
  position: relative;
}

.range-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  height: 18px;
  width: 18px;
  background: #007bff;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  position: relative;
}

.filter-group {
  margin-top: 32px;
  font-size: 16px;
}

.filter-group h4 {
  margin-bottom: 12px;
  font-weight: 600;
  color: #007bff;
}

.filter-group label {
  display: block;
  margin-bottom: 9px;
  line-height: 1.4;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Вкладки */
.tab-buttons {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  border-bottom: 2px solid #f29323;
  margin-bottom: 16px;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.tab-buttons::-webkit-scrollbar {
  display: none;
}

.tab-button {
  flex: 0 0 auto;
  width: 160px;
  text-align: center;
  padding: 9.6px 16px;
  background: transparent;
  border: transparent;
  border-bottom: 1px solid #ddd;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: 500;
  color: #333;
  transition: background-color 0.2s ease-in-out;
}

.tab-button:hover {
  color: #f29323;
}

.tab-button.active {
  border-bottom: 2px solid #f29323;
  color: #f29323;
  font-weight: 600;
}

.tab-content {
  display: none;
  width: 100%;
}

.tab-content.active {
  display: block;
  width: 100%;
}

.course-tabs {
  width: 100%;
}

/* Карточки */
.course-card {
  width: 260px;
  max-width: 320px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.course-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 19px;
  justify-items: center;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease-in-out;
}

.card-img.default {
  opacity: 1;
  z-index: 1;
}

.card-img.hover {

  z-index: 2;
}

.course-card:hover .card-img.hover {
  opacity: 1;
}

.course-card:hover .card-img.default {

}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 19px;
  font-weight: 600;
  color: #f29323;
}

.card-description {
  font-size: 15px;
  color: #555;
}

.card-price {
  font-weight: bold;
  font-size: 16px;
  color: #f29323;
}

.card-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 16px;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s ease-in-out;
}

.btn:hover {
  color: #ffffff !important;
  background-color: #0a4777 !important
}

.learn-btn {
  background-color: #f29323 !important; 
  color: #fff;  
}

.detail-btn {
  background-color: white;
  color: #333;
  border: 1px solid #ccc;
}

@media (max-width: 1200px) {
  .filter-column {
    display: none;
  }
}

@media (max-width: 768px) {
  .course-section {
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
  }

  .price-filter {
    margin: 0 30px;
  }

  .filter-group {
    margin: 30px;
  }

  .tab-buttons {
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 6px;
  }

  .tab-button {
    width: auto;
    padding: 6px 0;
    font-size: 14px;
  }

  .course-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .card-image-wrapper {
    height: 150px;
  }

  .hero-inner {
    padding: 48px 16px;
  }

  .hero-inner h1 {
    font-size: 32px;
  }

  body,
  html {
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .tab-button {
    font-size: 12px;
    padding: 7px 0;
  }

  .course-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card-image-wrapper {
    height: 120px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-description {
    font-size: 13px;
  }

  .card-price {
    font-size: 14px;
  }

  .hero-inner h1 {
    font-size: 24px;
  }
}
.course-grid {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

.course-grid .col-md-4 {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px;
}

/* 3. Настраиваем саму карточку */
.course-card-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;

  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.course-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.card-image-wrapper img {
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-top: 0;
}
.card-title a {
  color: #333;
}

.card-description {
  color: #666;
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-price {
  font-size: 20px;
  font-weight: bold;
  color: #0056b3;
  margin-top: auto;
}

.card-buttons {
  margin-top: 15px;
}