/* Основные стили модальных окон */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px auto;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.modal h3 {
    color: var(--primary);
    margin: 25px 0 15px;
    font-size: 1.3em;
}

.modal h4 {
    color: var(--dark);
    margin: 20px 0 10px;
    font-size: 1.1em;
}

.modal p, .modal li {
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal ul ul {
    margin-bottom: 5px;
}

/* Анимация появления */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal h2 {
        font-size: 1.5em;
    }
}