/* Общий сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    box-shadow: none !important;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: #cccfcf; /* Серо-синий фон */
    color: #ffffff; /* Белый цвет текста */
}

h1, h2, h3 {
    color: #2c3e50;
}

a { 
    text-decoration: none;
    color: #fdfdfd;
}

/* Настройка нижней центр части */
#main-down-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

header {
    margin-bottom: 350px;
}

/* Видео справа */
.video-background {
    position: absolute; /* Видео будет закреплено */
    top: 0;
    right: 0;
    width: 100%; /* Занимает правую половину экрана */
    height: 60vh; /* Полная высота экрана */
    overflow: hidden;
}
/* В полную ширину */
.video-background video {
    position: absolute;
    top: 50%; /* Центрирование по вертикали */
    left: 50%; /* Центрирование по горизонтали */
    transform: translate(-50%, -50%); /* Смещение для точного центрирования */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполнение контейнера с сохранением пропорций */
}
/* Затемнение */
.video-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Более сильное затемнение (регулируется значением alpha) */
    z-index: 1; /* Затемнение выше видео */
}
/* Текст внизу */
.text-overlay {
    position: absolute;
    top: 30%; /* Центрирование по вертикали */
    left: 50%; /* Центрирование по горизонтали */
    transform: translate(-50%, -50%); /* Смещение для точного центрирования */
    text-align: center;
    z-index: 2; /* Поверх видео */
    color: #ffffff; /* Белый цвет для читаемости */
    font-size: 1.5rem;
    padding: 20px;
}

/* Навигационное меню */

/* Основное меню */
.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.733);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    position: relative ; /* Чтобы элементы меню были правильно расположены */
    z-index: 10;
}

.menu h1 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Навигационное меню */
.nav-menu {
    display: flex;
    flex-direction: row; /* Горизонтальное расположение на больших экранах */
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 100;
}

.nav-menu li {
    flex: 0 1 auto;
    text-align: center;
}

.nav-menu li a {
    text-decoration: none;
    font-size: 1rem;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-menu li a:hover {
    background-color: #fff;
    color: #000;
}

/* бургер-меню */

.navbar-toggler {
    display: none; /* Скрываем на больших экранах */
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 20px; /* Выравниваем справа */
    top: 15px; /* Слегка отступаем сверху */
    z-index: 20; /* Выше всего остального */
}

.navbar-toggler .toggler-icon {
    display: block;
    width: 35px; /* Увеличенный размер полосок */
    height: 4px;
    background-color: #fff; /* Яркий цвет для видимости */
    margin: 6px 0; /* Промежуток между полосками */
    border-radius: 2px; /* Скругленные углы полосок */
    opacity: 1;
}

/*  Секция О нас  */
.about {
    background: #34495ec7; /* Темный фон */
    box-shadow: 14px -27px 100px 1px #00000083 inset;
    color: #fff;
    background-color: #0000009a;
    padding: 3rem 1rem;
    text-align: center;
    z-index: 2;
    bottom: 0;
    width: 100%;
    position: absolute;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #000;
}

.about p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #eeeeee;
}



/* Секция Услуги */
#services {
    padding: 3rem 1rem;
    background: #00000000;
    text-align: center;
    box-shadow: 0px 43px 54px 7px #00000083 inset;
}

#services h2 .h2 {
    display: inline-block; /* Кнопка как блок */
    font-size: 1.5rem; /* Размер текста */
    font-weight: bold; /* Жирный текст */
    margin-bottom: 20px;
    color: #fff; /* Белый текст */
    background-color: #302c2c; /* Синий фон */
    border: 1px solid #00000000; /* Синяя граница */
    padding: 0.5rem 1rem; /* Отступы внутри кнопки */
    border-radius: 0.25rem; /* Скругленные углы */
    text-align: center; /* Текст по центру */
    text-transform: uppercase; /* Верхний регистр */
    cursor: pointer; /* Курсор в виде руки */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Плавный переход */
}

#services h2 .h2:hover {
    background-color: #000000; /* Темно-синий при наведении */
    border-color: #5e5e5e; /* Граница становится темно-синей */
}

#services h2 .h2:focus {
    outline: none; /* Убираем стандартный фокус */
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* Мягкая подсветка */
}

#services h2 .h2:active {
    background-color: #5e5e5e; /* Ещё более тёмный синий при нажатии */
    border-color: #5e5e5e;
    box-shadow: none; /* Убираем тень */
}

#services ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

#services ul li {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: #a09d9db2;
    border-radius: 5px;
    width: fit-content;
    transition: background 0.3s;
}

#services ul li:hover {
    background: #95a5a6;
}

.service-list {
    overflow: visible;
    font-size: 0;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content:space-evenly; /* Равномерное распределение карточек */
    gap: 2rem; /* Промежутки между карточками */
    padding: 2rem;
}

.service-list li {
    max-width: 300px;
    position: relative;
    flex: 1 1 30%; /* Ширина элемента адаптируется */
    list-style: none;
    font-size: 1rem;
    background: #ecf0f1;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 2.5s ease-in-out;
}

.service-list li:hover {
    transform: scale(1.05);
}

.service-list img {
    max-width: 200px;
    margin-bottom: 1rem;
}

.service-list button {
    display: inline-block;
    color: #fff; /* Белый текст */
    background-color: #007bff; /* Синий цвет */
    border: 1px solid #007bff; /* Синяя граница */
    padding: 0.5rem 1rem; /* Отступы внутри кнопки */
    border-radius: 0.25rem; /* Скругленные углы */
    font-size: 1rem; /* Размер текста */
    text-align: center; /* Текст по центру */
    cursor: pointer; /* Курсор в виде руки при наведении */
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-top: 10px;
    margin-bottom: 10px;
}

.service-list button:hover {
    background-color: #0056b3; /* Более тёмный синий при наведении */
    border-color: #0056b3; /* Граница становится тёмно-синей */
}

.service-list button:focus {
    outline: none; /* Убираем стандартный контур */
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* Добавляем мягкую подсветку */
}

.service-list button:active {
    background-color: #004085; /* Ещё более тёмный синий при нажатии */
    border-color: #00376b;
    box-shadow: none; /* Убираем тень */
}

.error-message {
    color: #ff4d4d; /* Красный текст для ошибок */
    font-size: 0.85rem;
    margin-top: -5px;
    margin-bottom: 10px;
    display: none; /* По умолчанию скрыто */
}

input.invalid {
    border-color: #ff4d4d; /* Красная рамка для ошибочного поля */
}


/* Настройка кнопки над видеофоном */ 

.cta-button {
    display: inline-block;
    color: #fff; /* Белый текст */
    background-color: #007bff; /* Синий цвет */
    border: 1px solid #007bff; /* Синяя граница */
    padding: 0.5rem 1rem; /* Отступы внутри кнопки */
    border-radius: 0.25rem; /* Скругленные углы */
    font-size: 1rem; /* Размер текста */
    text-align: center; /* Текст по центру */
    margin-top: 10px;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.cta-button:hover {
    background-color: #0056b3; /* Более тёмный синий при наведении */
    border-color: #0056b3; /* Граница становится тёмно-синей */
}

.cta-button:focus {
    outline: none; /* Убираем стандартный контур */
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* Добавляем мягкую подсветку */
}

.cta-button:active {
    background-color: #004085; /* Ещё более тёмный синий при нажатии */
    border-color: #00376b;
    box-shadow: none; /* Убираем тень */
}


/* Форма записи */
#appointment {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    box-shadow: 14px -27px 100px 1px #00000083 inset; /* Внутренняя тень */
    border-radius: 10px; /* Закруглённые углы */
    color: #fff; /* Белый текст */
}

#appointment h2 {
    font-size: 1.5rem;
    color: #ffffff; /* Белый цвет текста */
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    font-weight: bold; /* Жирный шрифт */
}

.form-background {
    background: rgba(0, 0, 0, 0.671); /* Полупрозрачный чёрный фон */
    padding: 20px;
    border-radius: 10px; /* Закругленные углы */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

form {
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem;
    background: hsla(0, 0%, 0%, 0.726);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

form input, form button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form button {
    background: #1abc9c;
    color: #fff;
    border: none;
    cursor: pointer;
}

form button:hover {
    background: #16a085;
}

/* Юридическая информация */

#legal {
    display: flex;
    flex-direction: column;
    align-items: center; /* Центровка содержимого по горизонтали */
    background-color: rgba(0, 0, 0, 0.7); /* Чёрный цвет с прозрачностью */
    padding: 2rem; /* Отступы внутри */
    border-radius: 10px; /* Закруглённые углы */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Тень для объёма */
    max-width: 50%; /* Ограничение ширины */
    max-height: 80vh;
    margin-bottom: 2rem; /* Центрирование блока */
    color: #fff; /* Белый текст */
    text-align: center; /* Центровка текста */
}
#legal h2 {
    color: #fff; /* Белый цвет для заголовка */
    margin-bottom: 1rem; /* Отступ под заголовком */
}

#legal p {
    font-size: 1rem; /* Размер текста */
    margin-bottom: 1.5rem; /* Отступ под параграфом */
}

#legal .cta-button {
    text-decoration: none;
    background-color: #0d57f7; /* Цвет кнопки */
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#legal .cta-button:hover {
    background-color: #132e87; /* Цвет кнопки при наведении */
}

/* Модальное окно */
/* Стили модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #ffffff;
    color: #000;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
}

/* Заголовок модального окна */
.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Текст модального окна */
.modal-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 1rem 0;
}

/* Изображение в модальном окне */
.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Кнопка закрытия */
.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}


/* Закрыть */
.close {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: -10px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

input[type="date"] {
    width: 100%; /* Растягиваем на всю ширину */
    padding: 0.5rem; /* Немного увеличиваем отступы */
    border-radius: 5px; /* Скругляем углы */
    border: 1px solid #ccc; /* Легкая граница */
    font-size: 1rem; /* Увеличиваем размер текста */
}

input[type="date"]:focus {
    outline: none; /* Убираем стандартный фокус */
    border-color: #007bff; /* Синий цвет при фокусе */
}




/* Футер */
footer {
    margin-top: 40px;
    background: #000000;
    color: #ecf0f1;
    text-align: center;
    padding: 2rem 0; /* Увеличили padding для нового контента */
}
#contacts {
    position: relative; /* Убедитесь, что #contacts позиционирован корректно */
    padding: 2rem 0; /* Отступы сверху и снизу */
    overflow: visible; /* Убедитесь, что содержимое не обрезается */
}

footer h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ecf0f1;
}

footer .contact-info {
    padding: 1rem;
    margin-bottom: 1rem; /* Добавили отступ от остальных элементов */
    background: none; /* Убираем фон */
}

footer .contact-info p {
    margin: 0.5rem 0;
    color: #ecf0f1;
}

footer .contact-info a {
    color: #1abc9c; /* Цвет ссылок */
    text-decoration: none;
}

footer .contact-info a:hover {
    color: #16a085;
    text-decoration: underline;
}

/* карта */
#map {
    display: flex;
    align-items: center;
    justify-content: center;
}


@media (min-width: 1441px) {
    .service-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 равные колонки */
        gap: 2rem;
        padding: 2rem;
    }

    .service-list li {
        max-width: none; /* Убираем ограничение максимальной ширины */
        font-size: 1rem;
        background: #ecf0f1;
        border-radius: 5px;
        padding: 1rem;
        text-align: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease-in-out;
    }

    .service-list li:hover {
        transform: scale(1.05);
    }
}



/* Адаптивность */
@media (max-height: 1000px) {
    #legal {
        max-height: 70vh;
    }
}

/* Адаптивность для секции услуг */
@media (max-width: 992px) {
    #services .service-list {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    #services .service-list li {
        flex: 0 1 calc(50% - 20px); /* Ширина элемента 50% с учётом отступов */
        box-sizing: border-box; /* Чтобы отступы не влияли на размер */
    }
}

@media (max-width: 650px) {
    .service-list {
        justify-content: center;
    }
}

/* Адаптивность для навигации */
@media (max-width: 992px) {
    
    .navbar-toggler {
        display: block; /* Показываем бургер */
    }

    .nav-menu {
        display: none; /* Скрываем меню на мобильных по умолчанию */
        flex-direction: column; /* Вертикальное расположение */
        position: absolute;
        top: 47px; /* Расположение сразу под меню */
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.678);
        padding: 10px 0;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
        transform: translateY(-100%);
        opacity: 0;
    }

    .nav-menu.active {
        display: flex; /* Показываем меню */
        transform: translateY(0);
        opacity: 1;
    }

    .nav-menu li {
        text-align: center;
    }

    .nav-menu li a {
        font-size: 1rem; /* Увеличенный размер ссылок для мобильных */
    }

    .video-background {
        height: 70vh; /* Полная высота экрана */
    }    

    header {
        margin-bottom: 400px;
    }

    #main-down-container { 
        flex-direction: column;
    }
}

@media (max-height: 470px) {
    header {
        margin-bottom: 250px;
    }
    .nav-menu {
        background-color: rgba(0, 0, 0, 0.842);
    }
}

@media (max-height: 270px) {
    header {
        margin-bottom: 150px;
    }
}

@media (min-height: 900px) {
    header {
        margin-bottom: 450px;
    }
    .video-background {
        max-height: 60vh;
    }
}

@media (min-height: 800px) {
    header {
        margin-bottom: 420px;
    }
}

@media (min-height: 1000px) {
    header {
        margin-bottom: 500px;
    }
    .video-background {
        max-height: 50vh;
    }
}

@media (min-height: 1200px) {
    .video-background {
        max-height: 40vh;
    }
}

/* Адаптивность для устройств до 650px */
@media (max-width: 650px) {
    .menu nav ul li {
        flex: 0 1 100%; /* Элемент навигации занимает всю строку */
    }

    .nav-menu li a {
        text-align: center;
        padding: 10px;
    }
    
    .nav-menu li {
        font-size: 0.9rem; /* Уменьшаем текст */
    }

    .nav-menu {
        top: 50px; /* Уменьшаем отступ сверху */
    }

    .video-background {
        height: 70vh; /* Полная высота экрана */
    }
    
    header {
        margin-bottom: 530px;
    } 

    .about {
        display: flex;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.719); /* Чёрный цвет с прозрачностью */
        padding: 2rem; /* Отступы внутри элемента */
        border-radius: 10px; /* Закруглённые углы (по желанию) */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Тень для объёма (по желанию) */
        width: 100%; /* Ограничение ширины */
    }


}

@media (max-width: 750px) {
    #legal {
        max-width: 90%;
    }    

    #legal p {
        text-align: center;
        font-size: 0.7rem; /* Размер текста */
    }
}