/* Responsive course list layout for pks-courses.html. */
.pks-courses-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pks-courses-table {
  width: 100%;
  table-layout: fixed;
}

.pks-courses-table th:nth-child(1),
.pks-courses-table td:nth-child(1) { width: 10%; }
.pks-courses-table th:nth-child(2),
.pks-courses-table td:nth-child(2) { width: 42%; }
.pks-courses-table th:nth-child(3),
.pks-courses-table td:nth-child(3) { width: 16%; }
.pks-courses-table th:nth-child(4),
.pks-courses-table td:nth-child(4) { width: 16%; }
.pks-courses-table th:nth-child(5),
.pks-courses-table td:nth-child(5) { width: 16%; }

.pks-courses-table th,
.pks-courses-table td,
.pks-courses-table a {
  overflow-wrap: anywhere;
}

.pks-courses-sidebar-image {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  header .header-spacer { display: none; }

  .pks-courses-table-wrapper { overflow: visible; }

  .pks-courses-table,
  .pks-courses-table tbody,
  .pks-courses-table tr {
    display: block;
    width: auto;
  }

  .pks-courses-table thead { display: none; }

  .pks-courses-table tbody tr {
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
  }

  .pks-courses-table td:nth-child(n) {
    display: grid;
    width: auto;
    grid-template-columns: minmax(96px, 36%) minmax(0, 1fr);
    gap: 8px;
    padding: 9px 10px;
    border-top: 1px solid #eee;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .pks-courses-table td:first-child { border-top: 0; }
  .pks-courses-table td:empty { display: none; }

  .pks-courses-table td::before {
    color: #555;
    font-weight: bold;
  }

  .pks-courses-table td:nth-child(1)::before { content: "Курс №"; }
  .pks-courses-table td:nth-child(2)::before { content: "Специалност"; }
  .pks-courses-table td:nth-child(3)::before { content: "Дата"; }
  .pks-courses-table td:nth-child(4)::before { content: "Място"; }
  .pks-courses-table td:nth-child(5)::before { content: "Регистрация"; }
}

@media (max-width: 380px) {
  .pks-courses-table td:nth-child(n) {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
