/* ==========================
   Reset i font
========================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #fdfcf8;
  color: #2c2c2c;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================
   Nagłówek
========================== */
header {
  background-color: #a2a05a;
  color: #fff;
  padding: 20px 30px;
  text-align: center;
}

/* ==========================
   Layout główny + sidebar
========================== */
main {
  flex: 1;
}

.content-wrapper {
  display: flex;
  gap: 20px;
  max-width: 1100px;
  margin: 30px auto;
  align-items: flex-start;
  align-content: stretch; /* rozciąga elementy do tej samej wysokości */
}

.main-list {
  flex: 1;
  background-color: #fffef9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.sidebar {
  flex: 1;
  background-color: #fffef9;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* ==========================
   Tytuły
========================== */
h2 {
  color: #5f5e3c;
  text-align: center;
  margin-bottom: 20px;
}

/* ==========================
   Lista filmików - układ poziomy
========================== */
.main-list li, .sidebar li {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
}

.youtube-container {
  flex-shrink: 0;
  width: 320px;
  height: 180px;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.youtube-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-container .play-button {
  font-size: 2em;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
  pointer-events: none;
}

.video-info {
  max-width: 100%;
  width: 100%;
  text-align: center;
}


li span {
  font-weight: bold;
  color: #5f5e3c;
  margin-bottom: 8px;
}

li a.pdf {
  color: #2a9d8f;
  font-weight: bold;
  margin-top: 5px;
}

li a.pdf:hover {
  text-decoration: underline;
}
.back-to-home {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.back-to-home a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: #6a0dad;
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.back-to-home a:hover {
  background: #4b087a;
}

/* ==========================
   Back to top
========================== */
.back-to-top {
  text-align: right;
  margin: 20px 0;
}

.back-to-top a {
  display: inline-block;
  padding: 8px 15px;
  background: #808000;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
}

.back-to-top a:hover {
  background: #6b7000;
}

/* ==========================
   Responsywność
========================== */
@media (max-width: 850px) {
  .content-wrapper {
    flex-direction: column;
    align-items: center;
  }

  .sidebar {
    width: 100%;
    margin-top: 20px;
  }

  .main-list li, .sidebar li {
    flex-direction: column;
    align-items: center;
  }

  .video-info {
    max-width: 100%;
    margin-top: 10px;
  }

  .youtube-container {
    width: 100%;
    max-width: 400px;
    height: 225px;
  }
}
