.program-table {
  margin-bottom: 48px;
}
@media (min-width: 1200px) {
  .program-table {
    margin-bottom: 40px !important;
  }
}

.program-table__title {
  font-family: 'Geologica', sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 48px;
  letter-spacing: -2.21px;
  color: #073248;
  margin: 0 0 32px 0;
}

.program-table__intro {
  color: #38596A;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.program-table__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Элемент списка ─────────────────────────────────────────────────────── */

.program-item {
  background: #fff;
  border: 1.5px solid #E1ECF5;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.program-item--selected {
  border-color: #ef6860;
  box-shadow: 0 2px 12px rgba(239, 104, 96, 0.12);
}

/* ── Шапка элемента ─────────────────────────────────────────────────────── */

.program-item__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  border-bottom: none !important;
}

/* ── Радиокнопка ────────────────────────────────────────────────────────── */

.program-item__check-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0 !important;
}

.program-item__radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.program-item__radio-dot {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #D1D9EB;
  background: #EF6860;
  opacity: 0.2;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
  position: relative;
}

.program-item__radio-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
  background-size: 14px 14px;
  opacity: 0;
  transition: opacity 0.15s;
}

.program-item__radio-input:checked ~ .program-item__radio-dot {
  border-color: #ef6860;
  background: #ef6860;
  opacity: 1;
}

.program-item__radio-input:checked ~ .program-item__radio-dot::after {
  opacity: 1;
}

/* ── Тело (название + цена) ─────────────────────────────────────────────── */

.program-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.program-item__name {
  font-size: 15px;
  font-weight: 500;
  color: #073248;
  line-height: 1.45;
}

.program-item__price {
  font-size: 13px;
  color: #748F9F;
  font-weight: 400;
  display: none !important;
}

/* ── Кнопка разворачивания ──────────────────────────────────────────────── */

.program-item__toggle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  color: #073248;
  outline: none !important;
}

.program-item__toggle:hover {
  background: #F0F4F8;
}

.program-item__toggle:focus,
.program-item__toggle:active,
.program-item__toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}


.program-item__toggle svg {
  transition: transform 0.2s ease;
}

.program-item__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ── Описание (скрытая панель) ──────────────────────────────────────────── */

.program-item__description {
  padding: 0 20px 20px 56px;
  font-size: 14px;
  color: #2b3e4d;
  line-height: 1.65;
  border-top: none !important;
  margin-top: 0;
}

.program-item__description:not(:has(.program-item__description-content)):not(:has(.program-item__price)) {
  padding: 0 !important;
}

.program-item__description .program-item__price {
  display: none !important;
}

.program-item--expanded .program-item__description .program-item__price {
  display: inline-block !important;
  margin-top: 20px !important;
}


.program-item__description[hidden] {
  display: none;
}

.program-item--expanded .program-item__description {
  display: block;
}


.program-item__description p {
  margin: 12px 0 0;
}

.program-item__description p:first-child {
  margin-top: 0;
}

.program-item__description strong {
  color: #073248;
}

/* Убираем лишние теги из описания */
.program-item__description br + br {
  display: none;
}

/* ── Адаптив ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .program-table__title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .program-item__header {
    padding: 14px 16px;
    gap: 10px;
  }

  .program-item__name {
    font-size: 14px;
  }

  .program-item__description {
    padding: 0 16px 16px 48px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .program-item__description {
    padding-left: 16px;
  }
}

@media (max-width: 1199px) {
  .program-item {
    border-radius: 20px !important;
  }
  .program-item__header {
    gap: 14px !important;
    padding: 16px 20px !important;
    border-bottom: none !important;
  }
  .program-item__radio-dot {
    width: 24px !important;
    height: 24px !important;
    border: 2px solid #D1D9EB !important;
  }
  .program-item__check-wrap {
    margin-top: 4px !important;
  }
  .program-item__radio-input:checked ~ .program-item__radio-dot {
    border-color: #ef6860 !important;
    background: #ef6860 !important;
    opacity: 1 !important;
  }
  .program-item__radio-input:checked ~ .program-item__radio-dot::after {
    background-size: 15px 15px !important;
  }

  .program-item__name {
    font-family: 'Geologica', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 21px !important;
    letter-spacing: -0.83px !important;
    color: #073248 !important;
  }
  .program-item__toggle {
    display: flex !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #8296A9 !important;
    margin-top: 7px !important;
  }
  .program-item__toggle:hover {
    background: transparent !important;
  }
  .program-item__toggle svg {
    transform: rotate(-90deg) !important;
    transition: transform 0.2s ease !important;
  }
  .program-item--expanded .program-item__toggle svg,
  .program-item__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg) !important;
  }
  .program-item__price {
    display: none !important;
  }
  /* Show price inside description on mobile when selected/expanded */
  .program-item--selected .program-item__description .program-item__price,
  .program-item--expanded .program-item__description .program-item__price {
    display: inline-block !important;
    margin-top: 10px !important;
    padding: 6px 12px !important;
    background-color: #FCEBEA !important;
    color: #ef6860 !important;
    border-radius: 10px !important;
    font-family: 'Geologica', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    width: fit-content !important;
  }
  .program-item--selected {
    border-color: #E1ECF5 !important;
    box-shadow: none !important;
  }
  .program-item--selected .program-item__name {
    color: #ef6860 !important;
  }
}

@media (min-width: 1200px) {
  .program-item {
    background: #FAFCFD !important;
    border-radius: 27px !important;
    box-shadow: 10px 10px 30px 0px #D1D9EB !important;
    border: 1.5px solid #E1ECF5 !important;
  }
  .program-item--selected {
    box-shadow: 10px 10px 30px 0px #D1D9EB !important;
  }
  .program-table__list {
    gap: 16px !important;
  }
  .program-item__radio-dot {
    width: 32px !important;
    height: 32px !important;
  }
  .program-item__radio-input:checked ~ .program-item__radio-dot::after {
    background-size: 20px 20px !important;
  }
  .program-item__name {
    font-family: 'Geologica', sans-serif !important;
    font-weight: 700 !important;
    font-size: 26px !important;
    line-height: 30px !important;
    letter-spacing: -1.2px !important;
    vertical-align: middle !important;
    color: #073248 !important;
    transition: color 0.15s ease !important;
  }
  .program-item__toggle {
    color: #A2B4C3 !important;
    transition: color 0.15s ease !important;
  }
  .program-item__toggle svg {
    transform: rotate(-90deg) scale(1.5) !important;
    transition: transform 0.2s ease !important;
  }
  .program-item--expanded .program-item__toggle svg,
  .program-item__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg) scale(1.5) !important;
  }
  .program-item:hover .program-item__name,
  .program-item--selected .program-item__name {
    color: #ef6860 !important;
  }
  .program-item:hover .program-item__toggle,
  .program-item--selected .program-item__toggle {
    color: #ef6860 !important;
  }

  /* Description styles on desktop */
  .program-item__description {
    border-top: none !important;
    padding: 0 20px 20px 56px !important;
    font-family: 'Geologica', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 30px !important;
    letter-spacing: -0.73px !important;
    color: #313131 !important;
  }
  
  .program-item__description .program-item__description-content,
  .program-item__description p,
  .program-item__description div,
  .program-item__description span,
  .program-item__description li {
    font-family: 'Geologica', sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 30px !important;
    letter-spacing: -0.73px !important;
    color: #313131 !important;
  }


  /* Show price inside description on desktop */
  .program-item__description .program-item__price {
    display: inline-block !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    padding: 6px 12px !important;
    background-color: #FCEBEA !important;
    color: #ef6860 !important;
    border-radius: 10px !important;
    font-family: 'Geologica', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: -0.65px !important;
    width: fit-content !important;
  }
}

