/* ============================================================
   IKS - Strona produktu szkolenia (catalog/course_detail.html)
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.course-breadcrumb-wrap {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* ---------- Layout ---------- */
.course-layout {
  padding: 48px 0 80px;
  background: var(--bg);
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 52px;
  align-items: start;
}

/* ---------- Naglowek kursu ---------- */
.course-header {
  margin-bottom: 40px;
}

.course-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  align-items: center;
}

.course-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--bg-alt);
  color: var(--gray-600);
  border: 1px solid var(--border);
}

.course-level-pill svg {
  width: 13px;
  height: 13px;
  color: var(--charcoal);
}

.course-title {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 16px;
}

.course-short-desc {
  font-size: 18px;
  color: var(--gray-600);
  line-height: 1.6;
  max-width: 42em;
  margin-bottom: 22px;
}

.course-quick-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

.course-quick-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.course-quick-meta svg {
  width: 15px;
  height: 15px;
  color: var(--violet);
  flex-shrink: 0;
}

/* ---------- Media (trailer / placeholder) ---------- */
.course-media-wrap {
  margin-bottom: 52px;
}

.course-trailer {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}

.course-trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.course-trailer-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--violet-900, #33007a);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.ctp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(113, 0, 255, 0.72) 0%, rgba(0, 246, 160, 0.20) 100%);
  z-index: 1;
}

.ctp-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 32px;
}

.ctp-play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.3s var(--ease), background 0.3s;
}

.ctp-play:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.26);
}

.ctp-play svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
  fill: #fff;
}

.ctp-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------- Sekcje strony produktu ---------- */
.cp-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.cp-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cp-section-head {
  margin-bottom: 28px;
}

.cp-section-head .eyebrow {
  margin-bottom: 10px;
}

.cp-section-title {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ---------- Cechy (features grid) ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
  border-color: var(--violet-100);
  box-shadow: var(--shadow-sm);
}

.fi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--violet-50);
  display: grid;
  place-items: center;
  color: var(--violet);
  flex-shrink: 0;
}

.fi-icon svg {
  width: 17px;
  height: 17px;
}

/* ---------- Agenda (lessons) ---------- */
.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lesson-item {
  border-bottom: 1px solid var(--border);
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
  gap: 12px;
}

.lesson-summary::-webkit-details-marker {
  display: none;
}

.lesson-summary:hover {
  background: var(--bg-alt);
}

.ls-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.ls-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--violet-50);
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ls-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.ls-free-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--mint-50);
  color: #0a7a55;
  white-space: nowrap;
  flex-shrink: 0;
}

.ls-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.ls-duration {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}

.ls-duration svg {
  width: 13px;
  height: 13px;
}

.ls-chevron {
  color: var(--gray-400);
  transition: transform 0.25s var(--ease);
  display: grid;
  place-items: center;
}

.ls-chevron svg {
  width: 17px;
  height: 17px;
}

.lesson-item[open] .ls-chevron {
  transform: rotate(180deg);
}

.lesson-detail {
  padding: 14px 22px 18px 64px;
  font-size: 14px;
  color: var(--gray-600);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-detail p {
  line-height: 1.6;
}

/* ---------- Bonus lista ---------- */
.bonus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bonus-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--violet-50) 0%, rgba(230, 255, 246, 0.4) 100%);
  border: 1px solid var(--violet-100);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--charcoal);
}

.bonus-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad-violet);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(113, 0, 255, 0.4);
}

.bonus-icon svg {
  width: 17px;
  height: 17px;
}

/* ---------- Checklista ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15.5px;
  color: var(--charcoal);
  line-height: 1.5;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.checklist .cl-item:last-child {
  border-bottom: none;
}

.cl-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--mint);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.cl-check svg {
  width: 13px;
  height: 13px;
  color: #0a7a55;
}

.cl-check-violet {
  background: var(--violet-50);
  border: 1px solid var(--violet-100);
}

.cl-check-violet svg {
  color: var(--violet);
}

/* ---------- Platnosci ---------- */
.cp-payment {
  padding-bottom: 0;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pay-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.pay-item:hover {
  border-color: var(--violet-100);
}

.pay-item-featured {
  background: linear-gradient(135deg, var(--violet-50) 0%, rgba(230, 255, 246, 0.4) 100%);
  border-color: var(--violet-100);
}

.pay-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--violet);
  flex-shrink: 0;
}

.pay-icon svg {
  width: 17px;
  height: 17px;
}

.pay-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pay-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.pay-text span {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.35;
}

/* ---------- Sidebar ---------- */
.course-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Box zakupu ---------- */
.purchase-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-md);
}

.pb-price-block {
  margin-bottom: 22px;
}

.pb-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
}

.pb-amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}

.pb-label {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

.pb-price-gross {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

.pb-vat {
  font-size: 12px;
  color: var(--gray-400);
}

.pb-cta {
  width: 100%;
  justify-content: center;
  margin-bottom: 24px;
  padding: 16px;
  font-size: 16px;
}

.pb-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.pb-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--charcoal);
  font-weight: 500;
}

.pb-meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--violet);
  flex-shrink: 0;
}

.pb-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  background: var(--mint-50);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 246, 160, 0.3);
}

.pb-guarantee svg {
  width: 18px;
  height: 18px;
  color: var(--mint-600, #00c986);
  flex-shrink: 0;
  margin-top: 2px;
}

.pb-guarantee p {
  font-size: 12.5px;
  color: var(--charcoal);
  line-height: 1.5;
  font-weight: 500;
}

/* ---------- Sidebar: materialy ---------- */
.sidebar-resources {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.sr-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.sr-title svg {
  width: 16px;
  height: 16px;
  color: var(--violet);
}

.sr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sr-item {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--charcoal);
}

.sri-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--violet-50);
  display: grid;
  place-items: center;
  color: var(--violet);
  flex-shrink: 0;
}

.sri-icon svg {
  width: 13px;
  height: 13px;
}

/* ---------- Powiazane szkolenia ---------- */
.related-section.section.section-alt {
  padding-top: 80px;
}

/* ---------- Responsywnosc ---------- */
@media (max-width: 1040px) {
  .course-grid {
    grid-template-columns: 1fr 300px;
    gap: 36px;
  }
}

@media (max-width: 820px) {
  .course-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .course-sidebar {
    position: static;
    top: auto;
    order: -1;
  }

  .purchase-box {
    max-width: 480px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .payment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .course-layout {
    padding: 32px 0 60px;
  }

  .course-title {
    font-size: 1.8rem;
  }

  .course-short-desc {
    font-size: 16px;
  }

  .lesson-detail {
    padding-left: 22px;
  }

  .ls-left {
    gap: 10px;
  }

  .features-grid {
    gap: 10px;
  }
}
