@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro&display=swap');

/* Общие стили для всего сайта */
body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

h1, h2 {
    margin: 0 0 10px 0;
}

/* Шапка */
header {
    background-color: #e0e6ed;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Название */
header h1 {
    margin: 0 0 10px 0;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-size: 1.8em;
    color: #333;
}

/* Панель управления доступностью */
.accessibility-controls {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}
.accessibility-controls button {
    padding: 5px 10px;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    font-size: 0.9em;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.3s;
}
.accessibility-controls button:hover {
    background-color: #eee;
}

/* Поисковая форма */
header form {
    width: 100%;
    max-width: 400px;
    display: flex;
    gap: 5px;
}

header input[type="text"] {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

header button {
    padding: 5px 10px;
    border: none;
    background-color: #6699cc;
    color: #7a7979;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

/* Навигация */
nav {
    background-color: #d0d8e0;
    padding: 10px 20px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

nav ul li a:hover {
    background-color: #c0c0c0;
}

/* Основной контент */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

/* Заголовки внутри контента */
main h2 {
    margin-top: 0;
}

/* Стили для изображений */
.content-image {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
    border-radius: 4px;
}

/* Подвал */
footer {
    background-color: #e0e6ed;
    padding: 10px 20px;
    text-align: center;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    color: #555;
    margin-top: 20px;
}

/* Контрастный режим */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast a {
    color: #ff0 !important;
}

body.high-contrast header,
body.high-contrast nav,
body.high-contrast footer {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast nav ul li a {
    color: #0ff !important;
}

/* Медиазапросы для адаптивности */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    header h1 {
        font-size: 1.5em;
        text-align: center;
    }

    header form {
        width: 100%;
        max-width: 90%;
        margin-top: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }

    nav ul {
        gap: 6px;
    }

    nav ul li a {
        padding: 4px 8px;
        font-size: 0.9em;
    }
}
