@font-face {
    font-family: Montserrat;
    src: url("/fonts/Montserrat.ttf");
}

@font-face {
    font-family: MontserratBold;
    src: url("/fonts/Montserrat-Bold.ttf");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
	display: flex;           /* Включаем Flexbox */
    flex-direction: column;  /* Располагаем элементы вертикально (один под другим) */
    min-height: 100vh;       /* Минимальная высота = 100% высоты окна */
	
	
    font-family: Montserrat, sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
	min-width: 240px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #065fd4;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

main.main-content { /* Используйте этот селектор, так как у вас есть класс */
    flex-grow: 1; /* Позволяем этому блоку занять всё доступное пространство */
    padding-top: 40px; /* Этот отступ создает пространство под шапкой. Возможно, потребуется его увеличить, если шапка стала выше */
    padding-bottom: 60px;
}


.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.content-reset {
    /* Базовые стили для текста */
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: #333;

    /* Сброс отступов */
    margin: 0;
    padding: 0;
}

/* Сброс стилей для абзацев */
.content-reset p {
    margin-bottom: 1em;
    margin-top: 0;
}

/* Сброс стилей для заголовков */
.content-reset h2,
.content-reset h3,
.content-reset h4,
.content-reset h5,
.content-reset h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.2;
}

/* Сброс стилей для списков */
.content-reset ul,
.content-reset ol {
    margin-top: 0;
    margin-bottom: 1em;
    padding-left: 2em;
}

/* Сброс стилей для ссылок */
.content-reset a {
    color: #0066cc;
    text-decoration: none;
}

.content-reset a:hover {
    text-decoration: underline;
}

/* Сброс стилей для изображений */
.content-reset img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
}


#main-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 990;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 80%,
        rgba(255, 255, 255, 0.2) 100%
    );
    padding: 20px 15px;
    box-sizing: border-box;
    transition: none;
}

#main-header-logo {
    font-size: 16px;
    color: #065fd4;
    display: flex;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
    flex-grow: 0;
}

#main-header-logo img {
    height: 50px;
    flex-shrink: 0;
}

#main-header-logo-text {
    margin-left: 10px;
    font-size: 16px;
    line-height: normal;
    color: #034aa0;
    width: 310px;
}

#burger-menu-toggle {
    display: none;
}

#burger-menu-button {
    display: none;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    width: 40px;
    height: 35px;
    position: relative;
    flex-shrink: 0;
    z-index: 1001;
}

#burger-menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #065fd4;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    border-radius: 1px;
}

#burger-menu-toggle:checked ~ #burger-menu-button span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#burger-menu-toggle:checked ~ #burger-menu-button span:nth-child(2) {
    opacity: 0;
}

#burger-menu-toggle:checked ~ #burger-menu-button span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Оверлей для затемнения (десктоп - скрыт) */
#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

#main-header-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    justify-content: center;
}

#main-header-menu a.menu-item {
    font-size: 16px;
    font-family: MontserratBold, sans-serif;
    color: #065fd4;
    padding: 5px 10px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

#main-header-menu a.menu-item:hover,
#main-header-menu a.menu-item.active {
    color: #065fd4;
    border-bottom: 2px solid #065fd4;
}
/*
.site-footer {
    padding: 25px 0;
    background-color: #065fd4;
    color: white; 
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright p,
.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: white; 
}
.contact-info p a { 
    color: white;
    text-decoration: none; 
}
.contact-info p a:hover {
    text-decoration: underline; 
}


.copyright p:last-child,
.contact-info p:last-child {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links img {
    width: 35px;
    height: 35px;
}

.social-links a:hover {
    transform: scale(1.1);
}
*/

/* Адаптивные стили */
@media (max-width: 768px) {
    #main-header {
        padding: 20px 15px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 0;
    }

    #main-header-logo {
        max-width: calc(100% - 50px);
    }

    #main-header-logo img {
        height: 40px;
    }

    #main-header-logo-text {
        font-size: 12px;
        margin-left: 8px;
        flex-grow: 1;
        flex-shrink: 1;
        min-width: 0;
        line-height: 1.3;
        max-width: calc(100% - 50px);
    }

    #burger-menu-button {
        display: block;
        order: 3;
        margin-right: 10px;
    }

    /* Показываем оверлей на мобильных */
    #menu-overlay {
        display: block;
    }

    #burger-menu-toggle:checked ~ #menu-overlay {
        opacity: 1;
    }

    #main-header-menu {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
        padding-left: 25px;
        padding-right: 25px;
        padding-top: 80px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        transition: right 0.35s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
        justify-content: flex-start;
        gap: 0;
    }

    /* Заголовок "Меню" в мобильной версии */
    #main-header-menu::before {
        content: 'Меню';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 20px 25px;
        font-family: MontserratBold, sans-serif;
        font-size: 20px;
        color: #1e88e5;
        border-bottom: 2px solid #e3f2fd;
        background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
        z-index: 1;
    }

    #burger-menu-toggle:checked ~ #main-header-menu {
        right: 0;
        z-index: 1002;
    }

    #main-header-menu a.menu-item {
        font-size: 18px;
        padding: 16px 0;
        color: #333;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
        background-color: transparent;
        text-decoration: none;
        font-family: MontserratBold, sans-serif;
        transition: color 0.3s ease, padding-left 0.3s ease;
    }

    #main-header-menu a.menu-item:hover,
    #main-header-menu a.menu-item.active {
        color: #1e88e5;
        background-color: transparent;
        border-bottom-color: #1e88e5;
        padding-left: 10px;
    }

    #main-header-menu a.menu-item:last-child {
        border-bottom: none;
    }

    #burger-menu-toggle:checked ~ #burger-menu-button {
        position: fixed;
        top: 15px;
        right: 15px;
        z-index: 1003;
    }

    /* Двухстрочный футер для мобильных */
    .site-footer {
        padding: 15px 0; /* Уменьшаем вертикальные отступы футера */
    }

    .footer-container {
        flex-direction: column; /* Основное направление - колонка */
        text-align: center;
        gap: 8px; /* Уменьшаем отступ между строками */
    }

    .copyright {
        width: 100%; /* Копирайт занимает всю ширину */
        order: 1; /* Первая строка */
        margin-bottom: 5px; /* Небольшой отступ снизу */
    }

    .contact-info {
        order: 2; /* Вторая строка, часть 1 */
        /* Можно скрыть email, если он делает строку слишком длинной */
    }
    .contact-info p {
        margin-bottom: 0.2rem; /* Уменьшаем отступы между телефоном/email если оба видимы */
        line-height: 1.3; /* Уменьшаем межстрочный интервал для контактов */
    }
     /* Скрываем email на мобильных для компактности, если нужно */
    .contact-info p:nth-child(2) { /* Предполагаем, что email - это второй <p> в .contact-info */
        /* display: none; */ /* Раскомментируйте, чтобы скрыть email */
    }


    .social-links {
        order: 2; /* Вторая строка, часть 2 */
        justify-content: center; 
        width: 100%; /* Позволяет social-links и contact-info быть в одном "ряду" flex-контейнера, но визуально разделены */
                      /* Если contact-info и social-links должны быть строго на одной линии, нужна другая структура HTML или display:inline-block для них */
    }
    
    /* Обертка для второй строки футера, если бы мы меняли HTML:
    .footer-line-two {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        order: 2;
    }
    Тогда .contact-info и .social-links были бы внутри .footer-line-two
    */

    /* Текущий подход без изменения HTML: */
    /* Чтобы .contact-info и .social-links были на одной линии, но .copyright выше,
       мы можем сделать .footer-container flex-wrap: wrap и задать .copyright width: 100% */
    .footer-container { /* Переопределяем для двухстрочного варианта */
        display: flex;
        flex-wrap: wrap; /* Позволяет элементам переноситься */
        justify-content: center; /* Центрируем контент по горизонтали */
        align-items: center;
        text-align: center;
        gap: 5px 15px; /* row-gap, column-gap */
    }
    .copyright {
        flex-basis: 100%; /* Копирайт занимает всю ширину и переносится на новую строку */
        text-align: center;
        margin-bottom: 5px; /* Отступ между первой и второй строкой */
    }
    .contact-info, .social-links {
        /* Они будут на одной линии, если поместятся */
        /* Можно добавить flex-grow: 1; для .contact-info, чтобы оно заняло больше места, если нужно */
    }


    .copyright p,
    .contact-info p {
        font-size: 0.78rem; /* Уменьшаем шрифт текста в футере */
        margin-bottom: 0; /* Убираем лишние отступы у параграфов */
    }
    .contact-info p {
        display: inline; /* Чтобы телефон и email (если оба) были в одну строку */
    }
    .contact-info p:not(:last-child)::after {
        content: " | "; /* Разделитель, если и телефон и email отображаются */
        margin: 0 5px;
        /* display: none; /* Если email скрыт, разделитель не нужен */
    }
     /* Если email скрыт, этот стиль для :after не нужен или должен быть display:none */
     /* Пример: если email скрыт через display:none на .contact-info p:nth-child(2) */
     /* .contact-info p:nth-child(1)::after { display: none; } */


    .social-links {
        gap: 10px; 
    }
    .social-links img {
        width: 26px; 
        height: 26px;
    }

    #main-header-logo {
        font-size: 14px; 
    }
    #main-header-logo-text {
        width: auto; 
        margin-right: 10px; 
    }
}

@media (max-width: 576px) {

    #main-header-logo-text {
        font-size: 13px; 
    }

    .social-links img { 
        width: 24px;
        height: 24px;
    }
     .copyright p,
    .contact-info p {
        font-size: 0.73rem; 
    }
    .contact-info p:not(:last-child)::after {
        margin: 0 3px; /* Уменьшаем отступ для разделителя */
    }


    #main-header-menu { 
        padding-top: 50px; 
    }

    .site-footer {
        padding: 12px 0; 
    }
    .footer-container {
        gap: 3px 10px; /* Еще уменьшаем отступы */
    }
    .copyright {
        margin-bottom: 3px;
    }
}
