/* Course pages (advanced, essential, upper-quad). Loaded after
   black-friday-2026-new.css and uses its tokens, cards, prices and buttons. */

.course-hero,
.course-overview,
.course-price,
.course-faq {
  padding: var(--space-2xl) 0;
}

.course-gallery,
.course-schedule,
.course-reviews {
  padding: var(--space-2xl) 0;
  background: var(--bf-bg-alt);
}

.course-hero {
  padding-top: var(--space-l);
}

.bf-main a.course-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-bottom: var(--space-l);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.bf-main a.course-back-link:hover {
  text-decoration: underline;
}

.course-hero__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 768px) {
  .course-hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.course-hero__eyebrow {
  display: inline-block;
  margin-bottom: var(--space-xs);
  color: var(--bf-gold);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.course-hero__title {
  margin: 0 0 var(--space-m);
  font-size: var(--font-size-5);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.course-hero__description {
  margin: 0 0 var(--space-l);
  font-size: var(--font-size-1);
  line-height: 1.6;
}

.course-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.course-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-s);
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: 9999px;
  color: var(--bf-text-strong);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-semibold);
}

.course-hero__meta-item svg {
  flex: none;
  color: var(--bf-gold);
}

/* Section headings */
.course-gallery__title {
  margin: 0 0 var(--space-m);
  color: var(--bf-text-muted);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.course-overview__title,
.course-outcomes__title,
.course-schedule__title,
.course-price__title,
.course-reviews__title,
.course-faq__title {
  margin: 0 0 var(--space-s);
  font-size: var(--font-size-3);
  line-height: var(--line-height-snug);
}

.course-overview__text,
.course-schedule__intro {
  margin: 0;
  max-width: 65ch;
  line-height: 1.7;
}

/* Gallery (lightbox behaviour in js/course-gallery.js) */
.course-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
}

@media (min-width: 768px) {
  .course-gallery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.course-gallery__card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
}

.course-gallery__banner {
  padding: var(--space-3xs) var(--space-s);
  color: var(--bf-gold);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.course-gallery__item {
  aspect-ratio: 2075 / 1201;
  overflow: hidden;
}

.course-gallery__trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.course-gallery__trigger:focus-visible {
  outline: 3px solid var(--bf-gold);
  outline-offset: -3px;
}

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

@media (prefers-reduced-motion: no-preference) {
  .course-gallery__item img {
    transition: transform 0.2s ease;
  }

  .course-gallery__trigger:hover img,
  .course-gallery__trigger:focus-visible img {
    transform: scale(1.03);
  }
}

/* Overview and outcomes */
.course-overview__grid,
.course-price__grid {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}

@media (min-width: 1024px) {
  .course-overview__grid,
  .course-price__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.course-outcomes__list {
  display: grid;
  gap: var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-outcomes__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
  color: var(--bf-text-strong);
  line-height: 1.5;
}

.course-outcomes__icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  color: var(--bf-gold);
}

/* Schedule */
.course-schedule__intro {
  margin-bottom: var(--space-l);
}

.course-schedule__list {
  display: grid;
  gap: var(--space-xs);
}

.course-schedule__item {
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-s) var(--space-m);
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
}

@media (min-width: 768px) {
  .course-schedule__item {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: var(--space-m);
  }
}

.course-schedule__time {
  color: var(--bf-gold);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.course-schedule__topic {
  margin: 0;
  line-height: 1.5;
}

/* Enroll card (a .bf-card) */
.course-price .bf-card {
  max-width: 32rem;
}

.course-price__note {
  margin: 0;
  color: var(--bf-text-muted);
  font-size: var(--font-size--1);
  text-align: center;
}

/* Reviews */
.course-reviews__grid {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 768px) {
  .course-reviews__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.course-reviews__card {
  overflow: hidden;
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
}

.course-reviews__meta-strip {
  padding: var(--space-3xs) var(--space-m);
  background: var(--bf-surface-raised);
  color: var(--bf-text-strong);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.course-reviews__stars {
  margin: var(--space-m) var(--space-m) var(--space-xs);
  color: var(--bf-gold);
}

.course-reviews__text {
  margin: 0 var(--space-m) var(--space-s);
  line-height: 1.6;
}

.course-reviews__author {
  margin: 0 var(--space-m) var(--space-m);
  color: var(--bf-text-strong);
  font-size: var(--font-size--1);
  font-weight: var(--font-weight-semibold);
}

/* FAQ */
.course-faq__list {
  display: grid;
  max-width: 48rem;
}

.course-faq__item {
  padding: var(--space-m) 0;
  border-bottom: 1px solid var(--bf-border);
}

.course-faq__item h3 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--font-size-1);
}

.course-faq__item p {
  margin: 0;
  line-height: 1.6;
}

/* Photo lightbox */
.course-lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.course-lightbox::backdrop {
  background: var(--bf-lightbox-backdrop);
}

.course-lightbox[open] {
  display: flex;
}

.course-lightbox__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-l);
}

.course-lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - var(--space-xl));
  object-fit: contain;
  border-radius: var(--bf-radius);
}

.course-lightbox__close,
.course-lightbox__nav {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--bf-lightbox-control-border);
  border-radius: 50%;
  background: var(--bf-lightbox-control);
  color: var(--bf-text-strong);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.course-lightbox__close:hover,
.course-lightbox__nav:hover {
  background: var(--bf-surface-raised);
  border-color: var(--bf-lightbox-control-border-hover);
}

.course-lightbox__close:focus-visible,
.course-lightbox__nav:focus-visible {
  outline: 3px solid var(--bf-gold);
  outline-offset: 2px;
}

.course-lightbox__close {
  top: var(--space-m);
  right: var(--space-m);
}

.course-lightbox__nav--prev {
  left: var(--space-m);
}

.course-lightbox__nav--next {
  right: var(--space-m);
}

@media (max-width: 640px) {
  .course-lightbox__content {
    padding: var(--space-m);
  }

  .course-lightbox__close,
  .course-lightbox__nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.25rem;
  }

  .course-lightbox__close {
    top: var(--space-s);
    right: var(--space-s);
  }

  .course-lightbox__nav--prev {
    left: var(--space-s);
  }

  .course-lightbox__nav--next {
    right: var(--space-s);
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-lightbox__close,
  .course-lightbox__nav {
    transition: none;
  }
}
