main {
    flex: 1;
    flex-grow: 1;
    background-color: #f9fafb;
}

main a {
  text-decoration: none;
  color: #000;
}

section {
    margin-bottom: 20px;
}

section h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Lista kursów – układ w flexboxie */
.course-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;   /* wyśrodkowanie poziome */
  gap: 20px;                 /* odstęp między kursami */
  max-width: 1500px;         /* 5 kursów × ~300px */
  margin: 0 auto;
  padding: 20px 0;
}

/* Usuń przesunięcie pierwszego elementu */
.course-list .course:first-of-type {
  margin-left: -20px;
}

.course {
  flex: 1 1 260px;
  max-width: 260px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px; /* mocniej zaokrąglone rogi */
  min-height: 440px;
  box-sizing: border-box;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.08); /* efekt 3D */
}

.course:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15); /* mocniejszy cień przy hoverze */
}

/* Pasek pod kursami */
.course::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 0 0 16px 16px;
  transition: background 0.3s ease-in-out;
}

.course:hover::after {
  background: #ed0a30; /* czerwony akcent */
}

/* Odznaka kursu */
.course-badge,
.course-badge-empty {
  width: 100%;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.course-badge {
  font-weight: bold;
  color: #0660cc; /* niebieski akcent */
}

/* Obraz kursu */
.course-image {
  width: 100%;
  max-width: 260px;
  height: 200px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.course:hover .course-image img {
  transform: scale(1.05); /* subtelny zoom obrazka */
}

/* Tekst kursu */
.course-textbox {
  padding: 14px;
}

.course-title {
  font-size: 14px;
  font-weight: bold;
  min-height: 60px;
  margin-bottom: 12px;
  color: #0660cc; /* niebieski nagłówek */
  height: 100px; /* wyrównanie wszystkich kart bez względu na długość tekstu */
}

.course-place {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 12px;
}

.course-infobox {
  font-size: 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.course-price {
  color: #0660cc; /* niebieski akcent */
}

.course-remain {
  color: #333;
}

/* Przycisk */
.course-button {
  text-align: center;
  margin-top: 12px;
}

.course-button a.course-button-a {
  display: inline-block;
  border: 2px solid #0660cc;
  border-radius: 12px;
  padding: 10px 18px;
  color: #0660cc;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.course-button a.course-button-a:hover {
  color: #fff;
  background: #0660cc; /* niebieski wypełniony */
  box-shadow: 0 4px 12px rgba(6,96,204,0.4); /* efekt 3D na hover */
}

@media (max-width: 1460px) {
  .course-list {
    justify-content: center;   /* wyśrodkowanie kart */
    gap: 16px;
    padding: 10px 0;
  }

  .blog-wrapper h2, .site-kadra h2 {
    text-align: center;
  }

  .kadra-container {
    justify-content: center !important;
  }

  .kadra-items {
    width: 260px;
  }
}

/* TABLET – do 1024px */
@media (max-width: 1024px) {
  body {
    background-color: #f7f9fa;
  }

  header {
    padding: 0;
    margin-bottom: 40px;
  }

  .course-list {
    justify-content: center;   /* wyśrodkowanie kart */
    gap: 16px;
    padding: 10px 0;
  }

  .course {
    flex: 1 1 45%;             /* 2 kolumny */
    max-width: 45%;
    min-height: auto;          /* wysokość dopasowana */
  }

  .course-title {
    height: auto;              /* pozwól na naturalną wysokość */
    min-height: 40px;
  }

  .course-image {
    height: 250px;             /* mniejszy obrazek */
    max-width: 100%;
  }

  .blog-wrapper, .site-kadra, .site-kontakt {
    margin-top: 50px;
  }

  .blogs-wrapper, .site-kadra {
    justify-content: center !important;
  }

  .blog-wrapper h2, .site-kadra h2, .site-kontakt h2 {
    text-align: center;
  }

  .kadra-container, .kontakt-container {
    justify-content: center !important;
  }

  .kadra-items {
    width: 260px;
  }
}

/* MOBILE – do 768px */
@media (max-width: 768px) {
  body {
    background-color: #f7f9fa;
  }

  header {
    padding: 0;
    margin-bottom: 40px;
  }

  .course-list {
    align-items: center;
    gap: 20px;
    padding: 10px;
  }

  .course {
    flex: 1 1 100%;
    max-width: 100%;           /* pełna szerokość */
    min-height: auto;
  }

  .course-image {
    width: 100%;             /* mniejszy obrazek */
  }

  .course-title {
    font-size: 16px;           /* większy nagłówek dla czytelności */
    height: auto;
  }

  .course-infobox {
    flex-direction: column;    /* cena i miejsca pod sobą */
    gap: 6px;
    text-align: center;
  }

  .course-button a.course-button-a {
    width: 80%;               /* przycisk na całą szerokość */
    padding: 12px;
  }

  .blogs-wrapper {
    width: 95vw;
  }

  .blog-wrapper, .site-kadra, .site-kontakt {
    margin-top: 50px;
  }

  .blogs-wrapper, .site-kadra, .kadra-container {
    justify-content: center;
  }

  .blog-wrapper h2, .site-kadra h2, .site-kontakt h2 {
    text-align: center;
  }

  .kadra-container, .kontakt-container {
    justify-content: center !important;
  }

  .kadra-items {
    width: 260px !important;
  }
}

/* VERY SMALL – do 480px */
@media (max-width: 480px) {
  body {
    background-color: #f7f9fa;
  }

  header {
    padding: 0;
    margin-bottom: 40px;
  }

  .course-image {
    max-width: 100%;
  }

  .course-title {
    font-size: 14px;
    text-align: center;
  }

  .course-infobox {
    font-size: 14px;
  }

  .kadra-container {
    justify-content: center !important;
  }

  .course-list .course:first-of-type {
    margin-left: 0;
  }

  .blog-wrapper, .site-kadra, .site-kontakt {
    margin-top: 50px;
  }

  .blog-wrapper h2, .site-kadra h2, .site-kontakt h2 {
    text-align: center;
  }

  .kontakt-items {
    width: 260px !important;
  }
}
