.ddlec-courses-section,
.ddlec-courses-section * {
  box-sizing: border-box;
}

.ddlec-courses-section {
  --ddlec-card-gap: 16px;
  background: #f3f7f8;
  border-radius: 0;
  padding: 32px 24px 40px;
}

.ddlec-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.ddlec-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 24px;
  border: 1px solid #d8e3e8;
  border-radius: 999px;
  background: #ffffff;
  color: #4e6775;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ddlec-filter-button:hover,
.ddlec-filter-button:focus {
  border-color: rgba(20, 166, 200, 0.35);
  color: #0d3344;
  transform: translateY(-1px);
}

.ddlec-filter-button.is-active,
.ddlec-filter-button[aria-current="true"] {
  border-color: #0d3344;
  background: #0d3344;
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(13, 51, 68, 0.12);
}

.ddlec-courses-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
}

.ddlec-course-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid #d8e3e8;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(13, 51, 68, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.ddlec-course-card:hover,
.ddlec-course-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(20, 166, 200, 0.3);
  box-shadow: 0 24px 56px rgba(13, 51, 68, 0.12);
}

.ddlec-course-card-media {
  aspect-ratio: 1.3 / 0.86;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #d7e2e8 0%, #eef4f7 100%);
}

.ddlec-course-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ddlec-course-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--ddlec-card-gap);
  padding-top: var(--ddlec-card-gap);
}

.ddlec-course-category {
  display: inline-block;
  margin: 0;
  color: #14a6c8;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ddlec-course-title {
  margin: 0;
  color: #0d3344;
  font-size: clamp(1.45rem, 1.8vw, 2rem);
  font-weight: 800;
  line-height: 1.12;
  text-wrap: balance;
}

.ddlec-course-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 6px;
}

.ddlec-course-price {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: #0d3344;
  line-height: 1;
}

.ddlec-course-price.is-free {
  justify-content: center;
  color: #14a6c8;
}

.ddlec-course-price-currency,
.ddlec-course-price-amount,
.ddlec-course-price-label {
  display: block;
}

.ddlec-course-price-currency {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.ddlec-course-price-amount {
  font-size: clamp(1.9rem, 2.4vw, 2.5rem);
  font-weight: 800;
}

.ddlec-course-price-label {
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  font-weight: 800;
  line-height: 1.05;
}

.ddlec-course-button,
.ddlec-view-all-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #0d3344;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.ddlec-course-button {
  min-height: 52px;
  padding: 14px 28px;
  white-space: nowrap;
}

.ddlec-course-button:hover,
.ddlec-course-button:focus,
.ddlec-view-all-button:hover,
.ddlec-view-all-button:focus {
  background: #14a6c8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(20, 166, 200, 0.24);
}

.ddlec-view-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.ddlec-view-all-button {
  min-height: 58px;
  padding: 16px 44px;
}

.ddlec-empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(13, 51, 68, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  color: #0d3344;
  text-align: center;
}

.ddlec-empty-state p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.ddlec-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.ddlec-pagination-link,
.ddlec-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.ddlec-pagination-link {
  border: 1px solid #d8e3e8;
  background: #ffffff;
  color: #0d3344;
  text-decoration: none;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ddlec-pagination-link:hover,
.ddlec-pagination-link:focus {
  border-color: rgba(20, 166, 200, 0.35);
  color: #14a6c8;
  transform: translateY(-1px);
}

.ddlec-pagination-link.is-current,
.ddlec-pagination-link[aria-current="page"] {
  border-color: #0d3344;
  background: #0d3344;
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(13, 51, 68, 0.12);
}

.ddlec-pagination-ellipsis {
  color: #6d8694;
}

@media (max-width: 1024px) {
  .ddlec-courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ddlec-course-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ddlec-course-button {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .ddlec-courses-section {
    padding: 24px 18px 32px;
  }

  .ddlec-filters {
    gap: 10px;
    margin-bottom: 22px;
  }

  .ddlec-filter-button {
    min-height: 48px;
    padding: 12px 20px;
  }

  .ddlec-courses-grid {
    grid-template-columns: 1fr;
  }

  .ddlec-course-card {
    padding: 18px;
    border-radius: 24px;
  }

  .ddlec-course-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .ddlec-view-all-button {
    width: 100%;
  }

  .ddlec-pagination {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ddlec-filter-button,
  .ddlec-course-card,
  .ddlec-pagination-link,
  .ddlec-course-button,
  .ddlec-view-all-button {
    transition: none;
  }
}
