/* ==========================================================
   WeLUX — Programs page styles (V-programs)
   ========================================================== */

/* ---------- Programs Page Base ---------- */
.page--programs .programs {
  padding-block: 73px 100px;
}

.page--programs .programs .breadcrumbs {
  margin-bottom: 54px;
}

.page--programs .programs__title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #2a2a2a;
  margin: 0 0 78px;
}

/* ---------- Dropdown Filter ---------- */
.programs-filter {
  position: relative;
  display: block;
  width: 226px;
  max-width: 100%;
  margin-bottom: 27px;
}

.programs-filter__button {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #efefef;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  font-family: var(--font-primary, "Wix Madefor Display", sans-serif);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  color: #2a2a2a;
  cursor: pointer;
  box-sizing: border-box;
  text-align: left;
  transition: background-color var(--tr), border-radius var(--tr);
}

.programs-filter__button:hover {
  background-color: #e5e5e5;
}

.programs-filter__button:focus-visible {
  outline: 2px solid var(--color-dark, #565541);
  outline-offset: 2px;
}

.programs-filter.is-open .programs-filter__button {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.programs-filter__current {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.programs-filter__arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #2a2a2a;
  display: block;
}

.programs-filter__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: #ffffff;
  border: 1px solid #2a2a2a;
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.programs-filter__menu[hidden] {
  display: none !important;
}

.programs-filter__option {
  padding: 11px 10px;
  font-family: var(--font-primary, "Wix Madefor Display", sans-serif);
  font-size: 13px;
  line-height: 1.35;
  color: #2a2a2a;
  cursor: pointer;
  border-top: 1px solid #2a2a2a;
  transition: background-color var(--tr);
}

.programs-filter__option[hidden] {
  display: none !important;
}

.programs-filter__option:hover,
.programs-filter__option:focus-visible {
  background-color: #f4f4f4;
  outline: none;
}

.programs-filter__option.is-selected {
  font-weight: 500;
  background-color: #f0f0f0;
}

/* ---------- Groups ---------- */
.programs__groups {
  width: 100%;
}

.programs-group {
  margin-bottom: 100px;
}

.programs-group:last-child {
  margin-bottom: 0;
}

.programs-group[hidden],
.programs-group.is-hidden {
  display: none !important;
}

.programs-group__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  color: #2a2a2a;
  margin: 0 0 38px;
}

/* ---------- Track / Grid ---------- */
.programs-group__track.programs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 10px;
}

/* ---------- Card (по макету Figma, только на странице программ) ---------- */
.programs-group .program-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  color: #2a2a2a;
}

.programs-group .program-card__media {
  aspect-ratio: 340 / 355;
  border-radius: 12px;
  margin-bottom: 31px;
}

.programs-group .program-card__tags {
  top: 20px;
  left: 20px;
  right: 20px;
  gap: 10px;
}

.programs-group .program-card__tags li {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
  background: rgba(86, 85, 65, 0.5);
}

.programs-group .program-card__cta {
  left: 20px;
  right: auto;
  bottom: 21px;
  padding: 9px 28px;
  font-size: 15px;
  border-radius: 8px;
  background: #ccaf83;
}

.programs-group .program-card__name {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: 0;
  color: #2a2a2a;
}

.programs-group .program-card__sub {
  margin: 11px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: #2a2a2a;
}

.programs-group .program-card__meta {
  display: flex;
  gap: 26px;
  margin: 19px 0 0;
  padding: 0;
  border: 0;
}

.programs-group .program-card__row {
  gap: 7px;
}

.programs-group .program-card__row dt {
  font-size: 12px;
  line-height: 14px;
  color: #2a2a2a;
}

.programs-group .program-card__row dd {
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.programs-group .program-card__price {
  gap: 10px;
  margin-top: 24px;
  padding: 0;
  border: 0;
}

.programs-group .program-card__price-label {
  font-size: 12px;
  line-height: 14px;
  color: #2a2a2a;
}

.programs-group .program-card__price-row {
  gap: 20px;
}

.programs-group .program-card__price-new {
  font-size: 20px;
  font-weight: 500;
  line-height: 25px;
  color: #2a2a2a;
}

.programs-group .program-card__price-old {
  font-size: 16px;
  color: #a0a0a0;
}

.programs-group .program-card__more {
  gap: 7px;
  margin-top: 29px;
  font-size: 14px;
  line-height: 19px;
}

.programs-group .program-card__more-circle {
  width: 19px;
  height: 19px;
  background: url("../../img/icons/i000.svg") center / contain no-repeat;
}

.programs-group .program-card__more-circle > svg,
.programs-group .program-card__more-circle::after {
  display: none;
}

.program-card__photo-link {
  display: block;
  width: 100%;
  height: 100%;
}

.program-card__name a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr);
}

.program-card__name a:hover {
  color: var(--color-beige-2, #ccaf83);
}

/* ---------- Slider nav (mobile only) ---------- */
.programs-group__nav {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) and (min-width: 769px) {
  .programs-group__track.programs__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 10px;
  }
}

@media (max-width: 768px) {
  .page--programs .programs {
    padding-block: 28px 64px;
  }

  .page--programs .programs .breadcrumbs {
    margin-bottom: 12px;
  }

  .page--programs .programs__title {
    font-size: 32px;
    line-height: 34px;
    margin-bottom: 29px;
  }

  .programs-filter {
    width: 100%;
    margin-bottom: 48px;
  }

  .programs-group {
    margin-bottom: 90px;
  }

  .programs-group__title {
    font-size: 32px;
    font-weight: 400;
    line-height: 35px;
    margin-bottom: 17px;
  }

  .programs-group__track.programs__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(var(--container-pad) * -1);
    padding-inline: var(--container-pad);
    scroll-padding-inline: var(--container-pad);
  }

  .programs-group__track.programs__grid::-webkit-scrollbar {
    display: none;
  }

  .programs-group__track .program-card {
    flex: 0 0 min(340px, calc(100vw - 2 * var(--container-pad)));
    width: min(340px, calc(100vw - 2 * var(--container-pad)));
    scroll-snap-align: start;
  }

  .programs-group .program-card__cta {
    right: 20px;
    padding-block: 15px;
    font-size: 16px;
  }

  .programs-group__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 15px;
    padding: 0;
  }

  .programs-group__nav.is-hidden {
    display: none !important;
  }

  .programs-group__nav .slider-nav__btn {
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #565541;
    cursor: pointer;
    transition: color var(--tr);
  }

  .programs-group__nav .slider-nav__btn:disabled,
  .programs-group__nav .slider-nav__btn[aria-disabled="true"] {
    color: #a9a983;
    cursor: default;
  }

  .programs-group__nav .slider-nav__btn:focus-visible,
  .programs-group__nav .slider-nav__dot:focus-visible {
    outline: 2px solid #565541;
    outline-offset: 2px;
  }

  .programs-group__nav .slider-nav__btn svg {
    width: 24px;
    height: 24px;
    display: block;
  }

  .programs-group__nav .slider-nav__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .programs-group__nav .slider-nav__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #565541;
    background: transparent;
    cursor: pointer;
    transition: width var(--tr), background-color var(--tr);
  }

  .programs-group__nav .slider-nav__dot.is-active {
    width: 27px;
    border-radius: 4px;
    background: #565541;
  }
}

@media (prefers-reduced-motion: reduce) {
  .programs-group__track.programs__grid {
    scroll-behavior: auto;
  }
}
