/* Основные стили */
body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    display: flex; 
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    margin: 0 auto;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%; /* Ширина контейнера будет 90% от ширины экрана */
    max-width: 600px; /* Максимальная ширина контейнера для лучшего визуального восприятия */
    box-sizing: border-box;
    margin: 20px; /* Отступы вокруг контейнера */
}

.form-group {
    margin-bottom: 15px;
}

.label-head {
    font-weight: bold;
    font-size: 20px;
    text-align: center;
}

label {
    display: block;
    margin-bottom: 5px;
}

input, select, button {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input:required, select:required, textarea:required {
    border-left: 4px solid red;
}

textarea {
    resize: vertical; /* Разрешаем изменение высоты */
    width: 100%; /* Ширина будет занимать всю доступную ширину контейнера */
    max-width: 100%; /* Максимальная ширина не будет превышать ширину контейнера */
    min-width: 100%; /* Минимальная ширина равна ширине контейнера */
}

img {
    max-width: 40%; /* Максимальная ширина изображения будет равна ширине контейнера */
    height: auto; /* Автоматическая высота, сохраняющая пропорции */
    display: block; /* Чтобы изображение не обрезалось по горизонтали на мобильных устройствах */
    margin: 0 auto; /* Центрируем изображение по горизонтали */
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Стили для кастомного чекбокса */
.custom-checkbox {
    display: block;
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #4CAF50;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    text-align: center;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    img {
        width: 40%; /* На мобильных устройствах установим ширину 80% */
    }
    .container {
        width: 100%; /* На мобильных устройствах контейнер займет всю ширину экрана */
        margin: 10px; /* Уменьшим отступы для мобильных устройств */
    }
}

.course-details {
    margin-top: 10px;
    padding: 15px;
    border: 2px solid #4CAF50;
    background-color: #f9fff9;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}
.course-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}
.course-details .price {
    color: #4CAF50;
    font-weight: bold;
}
