.courses-section {
  max-width: 1440px;
  margin: 60px auto;
  padding: 0px.
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

.courses-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  width: 100%;
}

.course-card-modern {
  border: 1px solid #1a4a9e;
  border-radius: 25px;
  padding: 35px 40px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 260px;
  box-sizing: border-box;
}

.card-photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100%;
}

/* Tytuł wyrównany do jednej linii bazowej we wszystkich kartach */
.card-title {
  font-size: 30px;
  font-weight: 600;
  color: #222;
  margin: 0 0 12px 0;
  line-height: 1.2;
  min-height: 36px;
  display: flex;
  align-items: flex-start;
}

/* Opis wycentrowany w pionie w dostępnej przestrzeni, niezależnie od długości tekstu */
.card-description {
  font-size: 17px;
  color: #555;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

/* Przycisk dociśnięty do dołu karty - ta sama linia we wszystkich kartach */
.btn-read-more {
  border: 1.5px solid #c8102e;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  color: #c8102e !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  cursor: pointer;
  box-sizing: border-box;
  margin-top: 22px;

  background-image: linear-gradient(to left, #8b0c20 50%, transparent 50%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  transition: background-position 0.4s ease, color 0.4s ease;
}

.btn-read-more:hover {
  background-position: 100% 0%;
  color: #ffffff !important;
}

.btn-read-more .arrow {
  margin-left: 8px;
  font-size: 18px;
}

@media (max-width: 992px) {
  .courses-section {
    padding: 0 40px;
  }
  .courses-grid-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .courses-section {
    padding: 0 20px;
    margin: 40px auto;
  }
  .course-card-modern {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 25px;
    min-height: auto;
  }
  .card-photo {
    width: 140px;
    height: 140px;
  }
  .card-content {
    align-items: center;
  }
  .card-title {
    justify-content: center;
    min-height: auto;
  }
  .card-description {
    text-align: left;
    justify-content: flex-start;
  }
  .btn-read-more {
    margin-top: 16px;
  }
}