body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden; /* Hide horizontal scroll */
      background-image: url("img/bg.png");
      background-repeat: no-repeat; /* Чтобы не повторялась */
      background-size: cover; /*  Растянуть на весь фон, обрезая, если нужно */
    }

/*Sparkles effect*/
.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

/*Header styling*/
header {
    background: linear-gradient(to bottom, #1c1c1c, #0a0a0a);
    padding: 2rem;
    border-bottom: 1px solid #2a2a2a;
    overflow: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-text {
    width: 50%;
    text-align: left;
    padding-right: 2rem;
}

.header-text h1 {
    color: #b0c4de;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.header-image {
    width: 50%;
    text-align: right;
}

.header-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/*Collapsible section*/
.collapsible {
    margin: 20px auto;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
    background-color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.collapsible:hover {
    transform: translateY(-3px);
}

.collapsible-button {
    background-color: #222;
    color: #b0c4de;
    cursor: pointer;
    padding: 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-size: 50px;
    background-repeat: no-repeat;
    background-position: left 20px center;
    padding-left: 70px;
    transition: transform 0.1s ease-in-out;
}

.collapsible-button:active {
    transform: scale(0.95);
}

.collapsible-button:before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #b0c4de;
    transition: transform 0.3s ease;
}

.collapsible-button.active:before {
    transform: translateY(-50%) rotate(180deg);
}

.collapsible-button:hover {
    background-color: #333;
    color: #c0d6e4;
}

.collapsible-button:hover, .collapsible-button:focus {
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(176, 196, 222, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(176, 196, 222, 0.8);
    }
}

.content, .content-w {
         padding: 0;
         max-height: 0; /* Изначально скрываем */
         overflow: hidden;
         transition: max-height 0.4s ease-out;
         background-color: #222;
         text-align: center;
     }
     .content-w {

         overflow-y: auto; /* Добавляет вертикальную прокрутку */
     }

.topic-button {
    background-color: #333;
    color: #b0c4de;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.topic-button:hover {
    background-color: #444;
    color: #c0d6e4;
}

.topic-image {
    max-width: 100%;
    height: auto;
    border-bottom: 1px solid #2a2a2a;
    border-radius: 8px 8px 0 0;
}

.topic-description {
    width: 90%; /* Увеличено для лучшей читаемости */
    margin: 20px auto;
    padding: 15px;
    text-align: left;
    border-radius: 8px;
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: inline-block; /* Отображать контент в строку */
    vertical-align: top; /* Выравнивание по верхнему краю */
}

.topic-description p, .topic-description ol, .topic-description ul {
    padding: 1rem;
    margin: 0;
}

/*Teacher Styles*/
.teachers {
    display: flex;
    flex-direction: column; /* Учителя друг под другом */
    align-items: center; /* Центрируем по горизонтали, если нужно */
}

.teacher-block {
    width: 80%; /* Занимает большую часть ширины экрана */
    margin-bottom: 20px; /* Увеличим отступ между учителями */
}

.teacher {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.3s ease;
    width: 100%; /* Чтобы занимал всю ширину teacher-block */
    box-sizing: border-box; /* Чтобы padding не увеличивал ширину */
}

.teacher:last-child {
    border-bottom: none;
}

.teacher:hover {
    background-color: #333;
}

.teacher-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    flex-shrink: 0; /* Важно: запрещает сжиматься, если места не хватает */

}

.teacher-avatar:hover {
    transform: scale(1.1);
}

.teacher-avatar img {
    width: 100%;
    height: 100%; /* Изменено: чтобы картинка занимала всю высоту контейнера */
    object-fit: cover; /* Важно: обрезает или масштабирует картинку, чтобы заполнить контейнер */
    display: block;
}

.teacher-info p {
    margin: 0.3rem 0;
}

a {
    color: #b0c4de;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #c0d6e4;
}

/*Tariffs Styles*/
.tariffs {
    text-align: center;
    padding: 20px;
}

.tariff-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.tariff-block {
    width: 250px;
    margin: 20px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tariff-block > img {
    max-width: 240px;
    margin-bottom: 10px;
}

/*Floating button styles*/
.floating-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #141516;
    color: #9ebeca;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.floating-button:hover {
    background-color: #576768;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/*Training styles*/
.training-blocks {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.training-block {
    width: 40%;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-align: left;
}

/*Price styles*/
.price-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.price-category {
    width: 45%;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-align: left;
    margin: 0 auto;
}

.price-category ul {
    padding-left: 20px;
}

.price-category li {
    margin-bottom: 5px;
}

/* Parallax Styles */
.parallax-bg {
    height: 300px;
    overflow: hidden;
    position: relative;
    background-image: url('parallax_image.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.parallax-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 50px;
    width: 30%;
    text-align: center;
    margin: 0 auto;
}

/* Phantom Block */
.phantom-block {
    height: 100px; /* Задайте высоту фантомного блока */
    width: 100%;
    clear: both; /* Предотвращает обтекание */
}

ol {
  list-style-type: decimal; /* Use decimal numbers */
}
.content-w img, .content img{
    width: 70%;
}

/*Media Queries for Responsiveness*/
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-text {
        width: 100%;
        padding-right: 0;
    }

    .header-image {
        width: 100%;
        text-align: center;
    }

    .topic-description {
        width: 90%;
        margin: 20px auto;
        text-align: left;
    }

    .floating-button {
        bottom: 10px;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }

    .collapsible-button {
        padding-left: 20px;
        background-position: left 10px center;
    }

    .parallax-bg {
        height: 200px;
    }

    /*Teacher Styles*/
    .teachers {
        flex-direction: column;
    }

    .teacher-block {
        width: 100%;
    }

    /*Training styles*/
    .training-blocks {
        flex-direction: column;
    }

    .training-block {
        width: 100%;
    }

    /*Price styles*/
    .price-list {
        flex-direction: column;
    }

    .price-category {
        width: 100%;
    }
}

/* Добавьте стили для отображения контента в строку */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрирует контент по горизонтали */
}

/* Установите ширину для collapsible-sections */
.collapsible-sections {
    width: 100%; /* Занимает всю доступную ширину */
}
.topic-content {
    padding: 10px;
    margin-top: 5px;
    background-color: #333;
    border-radius: 5px;
    display: none; /* Скрываем контент по умолчанию */
}

.topic-content.active {
    display: block; /* Показываем контент, когда active */
}