
  .course-section {
    margin-bottom: 40px;
  }

  .course-section h2 {
    color: #2A2055;
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .course-section h3 {
    color: #2A2055;
    font-size: 1.4rem;
    margin-bottom: 24px;
    font-weight: 700;
  }

  .topic-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .topic-item {
    background: #ffffff6b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-height: fit-content;
  }

  .topic-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
  }

  .topic-toggle:hover {
    /* background: #EEEAFF; */
  }

  .topic-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #2A2055;
    border-radius: 4px;
    position: relative;
    display: none;
  }

  .topic-item.completed .topic-checkbox::after {
    content: "✓";
    position: absolute;
    top: -2px;
    left: 2px;
    color: #2A2055;
    font-size: 14px;
  }

  .topic-title {
    flex: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1B1640;
  }

  .topic-arrow {
    transition: transform 0.3s ease;
  }

  .topic-toggle[aria-expanded="true"] .topic-arrow {
    transform: rotate(180deg);
  }

  .topic-materials {
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 48px;
    list-style: none;
  }

  .topic-materials.active {
    /* margin: 8px 0px 0px; */
    max-height: 500px;
    padding: 0 0 12px 48px;
  }

  .topic-materials li {
    padding: 8px 0;
  }

  .topic-materials a {
    color: #1B1640;
    text-decoration: none;
    font-size: 1rem;
  }

  .topic-materials a:hover {
    text-decoration: underline;
  }



  .subtopic-item {
    position: relative;
    margin: 8px 0;
  }

  .subtopic-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0px 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: #1B1640;
    font-size: 1rem;
  }

  .subtopic-toggle:hover {
    color: #2A2055;
  }

  .subtopic-title {
    flex: 1;
  }

  .subtopic-toggle svg {
    transition: transform 0.3s ease;
    width: 14px;
    height: 10px;
  }

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

  .subtopic-materials {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
    list-style: none;
  }

  .subtopic-materials.active {
    max-height: 500px;
    padding: 8px 0 8px 20px;
  }

  .subtopic-materials li {
    padding: 4px 0;
  }

  .subtopic-materials a {
    color: #1B1640;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 4px 0;
  }

  .subtopic-materials a:hover {
    text-decoration: underline;
    color: #1B1640;
  }

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


@media(max-width: 500px)
{
    .section-nav-layout
    {
        overflow: hidden;
    }
    /* Ссылки в списках материалов */
.materials-list a {
  display: inline-block;          /* чтобы переносы работали корректно */
  white-space: normal;            /* разрешаем перенос строк (отключаем nowrap) */
  overflow-wrap: anywhere;        /* современный способ принудить перенос в любом месте */
  /* если нужна поддержка старых браузеров, можно добавить: */
  word-wrap: break-word;          /* IE/старый Edge */
  word-break: break-word;         /* Safari < 14 */
  hyphens: auto;                  /* разбивать по слогам при возможности */
}

}