/*глобально для всего проекта*/
* {
    font-family: "Comfortaa", cursive;
}

html,
h1,
h3,
h4,
h6 {
    color: white;
}

h2,
h5 {
    color: #6270B4;
}

p {
    color: #6270B4;
    font-family: 'Merriweather', serif;
    /* Используем Merriweather */
    font-size: 1rem;
    /* Размер шрифта */
    font-weight: 400;
    /* Вес шрифта */
    line-height: 1.4;
    /* Межстрочный интервал */
}

body {
    background-image: url('image/фон.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    /* scroll по умолчанию — fixed дёргается на планшетах и в мобильном Safari */
    background-attachment: scroll;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    body {
        background-attachment: fixed;
    }
}

a {
    text-decoration: none;
    color: white;
}

/*
      HEADER
  */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(to right, #7c94f2, #D6D8F4);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

/* Логотип */
.logo img {
    max-width: 95px;
    height: auto;
}

/* Логотип */
.logo {
    flex: 1;
    /* Растягиваем, чтобы логотип занимал своё пространство */
    display: flex;
    justify-content: flex-start;
    /* Логотип остаётся слева */
}

/* Навигация */

.nav {
    flex: 7;
    /* Растягиваем меню для центрирования */
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: center;
    /* Центрируем меню */
}



/* Список меню */
.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav ul li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    transition: color 0.3s ease;
}

.nav ul li a i {
    margin-right: 8px;
}

.nav ul li a:hover {
    color: #ffcc00;
    /* Жёлтый цвет при наведении */
}

/* Кнопки авторизации */
.auth-buttons {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 20px;
    /* Отступ от правого края */
}

header * {
    color: #ffffff;
}

header h1 {
    margin-top: 14px;
}

/*МЕНЮ*/
header ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    /* Флекс-контейнер */
}

header ul li {
    display: flex;
    /* Устанавливаем флекс для li */
    align-items: center;
    /* Выравнивание иконки и текста по центру */
    margin-right: 20px;
    /* Добавляем отступ между элементами */
}

header ul li a {
    display: flex;
    /* Убираем блочность, чтобы все элементы шли в одну строку */
    align-items: center;
    /* Центрируем элементы по вертикали */
    font-size: 1.2rem;
    padding: 5px;
    color: white;
}

header ul li a i {
    margin-bottom: 3px;
    /* Добавляем отступ между иконкой и текстом */
    margin-right: 5px;
}

header ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    /* Легкий полупрозрачный фон при наведении */
    transition: 0.3s;
    border-radius: 5px;
}

/* гамбургер меню*/
.burger {
    display: none;
    position: relative;
    z-index: 50;
    align-items: center;
    justify-content: flex-end;
    width: 30px;
    height: 18px;
}

.burger span {
    height: 2px;
    width: 80%;
    transform: scale(1);
    background-color: #ffffff;
}

.burger::before,
.burger::after {
    content: '';
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: #ffffff;
    transition: all 0.3s ease 0s;
    /*плавный переход на крестик*/
}

.burger::before {
    top: 0
}

.burger::after {
    bottom: 0
}


/*анимация иконки бургера */
.burger.active span {
    transition: scale(0);
    opacity: 0;
}

.burger.active::before {
    top: 50%;
    transform: rotate(-45deg) translate(0, -50%);
}

.burger.active::after {
    bottom: 50%;
    transform: rotate(45deg) translate(0, 50%);
}

/* при разрешении экрана 900px и ниже, выводим на экран иконку бургера */
@media (max-width: 1500px) {

    .burger {
        display: flex;
    }

    .nav {
        display: none !important;
        flex-direction: column;
        position: fixed;
        height: 100%;
        width: 100%;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        overflow-y: auto;
        padding: 50px 40px;
        background-color: #BAC3F4;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        /*animation: burgerAnimation 0.4s;*/
    }
    
    .nav.open {
        display: flex !important;
        transform: translateX(0);
    }
    
    /* Скрываем сайдбар на мобильных устройствах, если он не активен */
    .sidebar:not(.active) {
        transform: translateX(-100%) !important;
        visibility: hidden !important;
    }
    
    .sidebar.active {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    .nav ul {
        flex-direction: column;
        row-gap: 30px;
    }

    .carousel-image-wrapper {
        width: 30%;
        /* Ширина обертки (70% от родительского контейнера) */
        height: 40%;
        /* Высота обертки (70% от родительского контейнера) */
        border-radius: 20px;
        /* Округленные углы */
        overflow: hidden;
        /* Скрыть части изображения, которые выходят за пределы */
        margin: 0;
        /* Центрируем обертку по горизонтали */
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.open {
    display: flex !important;
}


/* Для экранов меньше 480px */
@media (max-width: 1200px) {
    h2 {
        font-size: 1.1rem;
        /* Уменьшаем размер заголовка */
    }

    h5 {
        font-size: 0.7rem;
        /* Уменьшаем размер имени преподавателя */
    }

    p {
        font-size: 0.69rem;
        /* Уменьшаем размер текста описания */
    }
}



/* Стили кнопок */
header .btn {
    font-size: 1rem;
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 18.74px;
    /* Округленные края */
    background-color: white;
    /* Белый фон */
    color: #6270B4;
    /* Голубой цвет текста */
    display: flex;
    /* Флекс-контейнер для кнопки */
    align-items: center;
    /* Выравнивание иконки и текста по вертикали */
    justify-content: center;
    /* Центрирование текста и иконки по горизонтали */
    white-space: nowrap;
    /* Запрещаем перенос текста на новую строку */
    width: auto;
    /* Даем кнопке автоширину */
    box-sizing: border-box;
    /* Учитываем padding и border в ширину */
}


header .btn:hover {
    background-color: #6270B4;
    /* Голубой фон при наведении */
    color: white;
    /* Белый цвет текста при наведении */
    border-color: #6270B4;
    /* Голубая обводка при наведении */
}

header .btn-primary {
    background-color: #007bff;
    border: none;
    color: white;
}

header .btn-secondary {
    background-color: #5a6268;
    border: none;
    color: white;
}


.carousel-container {
    width: 420px;
    /* Задаем ширину карусели */
    height: 220px;
    /* Задаем высоту карусели */
    margin: 0 auto;
    /* Центрируем карусель */
    margin-bottom: 0;
}

.carousel-image-wrapper {
    width: 70%;
    /* Ширина обертки (70% от родительского контейнера) */
    height: 70%;
    /* Высота обертки (70% от родительского контейнера) */
    border-radius: 20px;
    /* Округленные углы */
    overflow: hidden;
    /* Скрыть части изображения, которые выходят за пределы */
    margin: 0;
    /* Центрируем обертку по горизонтали */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-image {
    width: auto;
    /* Ширина по размеру карусели */
    height: 85%;
    /* Высота по размеру карусели */
    object-fit: contain;
    /* Сохраняет пропорции без обрезки */
    border-radius: 10px;
    /* Округляем края */
}

.carousel-item {
    padding: 10px;
    /* Отступ вокруг каждого изображения */
}



.card {
    background-color: #ECEDFC;
    /* Установите любой желаемый цвет */
    aspect-ratio: 1 / 0.5;
    /* Задание квадратных пропорций */
}


.card-title {
    color: #556CBF;
}

.card-img-top {
    object-fit: cover;
    width: 100%;
    height: 200px;
}



logo-text {
    color: #6270B4;
}


/*
      FOOTER
  */

.footer {
    background: #BAC3F4;
    position: relative;
}

.footer .footer-section {
    padding: 22px;
}

.footer h4,
.footer h3 {
    color: #6270B4;
}


.footer .about .contact span {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.1em;
    line-height: 1.2;
    margin-bottom: 8px;
    margin-top: 10px;
}
.footer .about .contact span i {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    font-size: 1em;
    line-height: 1;
}
/* иконку почты опускаем только на мобильной — почта визуально выше иконки */
@media (max-width: 670px) {
    .footer .about .contact span:nth-child(2) i {
        margin-top: 0.75em;
    }

    .footer-section.about {
        padding-bottom: 10px;
    }

    .footer-section.footer-center {
        padding-top: 6px;
        margin-top: -10px;
    }
}

.footer .about .socials a {
    border: 1px solid white;
    width: 45px;
    height: 41px;
    padding-top: 5px;
    margin-right: 5px;
    text-align: center;
    display: inline-block;
    font-size: 1.3em;
    border-radius: 5px;
    transition: all .3s;
    color: white;
}

.footer .about .socials a:hover {
    border: 1px solid #6270B4;
    color: white;
    transition: all .3s;
}

.footer .links ul a {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2em;
    transition: all .3s;
    color: white;
    text-decoration: none;
}


.footer .links ul a:hover {
    color: white;
    margin-left: 15px;
    transition: all .3s;

}

.footer .contact-form .container-input {
    background: #BAC3F4;
    color: white;
    margin-bottom: 10px;
    line-height: 1.5rem;
    padding: .9rem 1.4rem;
    border: none;
    width: 100%;
}

.footer .contact-form .container-input:focus {
    background: #BAC3F4;
}

.footer .contact-form .container-btn {
    float: right;
    font-size: 1.1em;
}

.footer .footer-bottom {
    background: white;
    color: #BAC3F4;
    height: 20px;
    /* Уменьшенная высота */
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    line-height: 20px;
    /* Вертикальная центровка текста */
    padding: 0;
    /* Убираем отступы */
    font-size: 12px;
    /* Уменьшаем шрифт для гармонии */
}



.footer-section h3 {
    margin-bottom: 1px;
    /* Уменьшаем отступ между заголовком и списком */
}

.footer-center-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    flex-wrap: nowrap;
}

.footer-center-head h3 {
    margin: 0;
    flex: 0 1 auto;
    text-align: left;
    line-height: 1.25;
}

.footer-vk-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 64px;
    min-height: 64px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #6270B4;
    color: #fff !important;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: rgba(98, 112, 180, 0.35);
    touch-action: manipulation;
    cursor: pointer;
}

.footer-vk-link:hover,
.footer-vk-link:focus-visible {
    background: #4a5694;
    color: #fff !important;
    text-decoration: none;
}

.footer-vk-link:active {
    transform: scale(0.98);
}

.footer-vk-link i {
    font-size: 1.6em;
    line-height: 1;
}

@media (max-width: 670px) {
    .footer-center-head {
        justify-content: space-between;
        gap: 12px;
    }

    .footer-center-head h3 {
        font-size: 0.95rem;
    }

    .footer-vk-link {
        min-width: 58px;
        min-height: 58px;
        padding: 12px 16px;
        font-size: 1.1rem;
    }

    .footer-vk-link i {
        font-size: 1.45em;
    }
}

.contact {
    color: white;
}






button {
    font-size: 1rem;
    padding: 8px 16px;
    margin-left: 0;
    border: 2px solid #6270B4;
    /* Белая обводка */
    border-radius: 18.74px;
    /* Округленные края */
    background-color: #6270B4;
    /* Белый фон */
    color: white;
    /* Голубой цвет текста */
    display: flex;
    /* Флекс-контейнер для кнопки */
    align-items: center;
    /* Выравнивание иконки и текста по вертикали */
    justify-content: center;
    /* Центрирование текста и иконки по горизонтали */
    white-space: nowrap;
    /* Запрещаем перенос текста на новую строку */
    width: auto;
    /* Даем кнопке автоширину */
    box-sizing: border-box;
    /* Учитываем padding и border в ширину */
}

button:hover {
    background-color: white;
    /* Голубой фон при наведении */
    color: #6270B4;
    /* Белый цвет текста при наведении */
    border-color: #6270B4;
    /* Голубая обводка при наведении */
}


.text-container {
    text-align: left;
    /* Выравнивание содержимого по левому краю */
}

.link-text {
    font-size: 0.8rem;
    padding: 8px 16px;
    text-decoration: underline;
    /* Подчеркивание текста */
    color: #6270B4;
    /* Цвет текста */
    cursor: pointer;
    /* Указатель в виде руки при наведении */
}

.link-text:hover {
    color: #4e5a94;
    /* Цвет при наведении */
}

    .auth-icons {
      display: block;
    }

.auth-icon {
    color: white;
    font-size: 1.2rem;
}

.auth-icon:hover {
    color: #ffcc00;
}