/* Общие стили */
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Roboto', sans-serif; /* Попробуем Roboto, если доступен, или Arial */
    background-image: url('../images/background.jpg'); /* Устанавливаем фоновое изображение */
    background-repeat: no-repeat; /* Отключаем повторение изображения */
    background-position: center center; /* Центрируем изображение */
    background-size: cover; /* Растягиваем изображение на всю область */
    background-attachment: fixed; /* Фиксируем фон при прокрутке */
    color: #343a40;
    line-height: 1.6;
}

header {
    background-color: rgba(128, 128, 128, 0.8); /* Серый фон с 80% прозрачностью */
    padding-top: 2px; /* Уменьшаем верхний отступ */
    padding-bottom: 2px; /* Уменьшаем нижний отступ */
    padding-left: 0;
    padding-right: 0; /* Явно удаляем горизонтальные отступы */
    box-shadow: none; /* Убираем тень, если фон прозрачный */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw; /* Убедимся, что header занимает всю ширину viewport */
}

nav {
    display: flex;
    justify-content: flex-start; /* Изменяем распределение элементов */
    align-items: center; /* Выравниваем элементы по центру по вертикали */
    padding: 0 40px; /* Увеличиваем горизонтальный отступ для смещения логотипа */
    width: 100%; /* Убедимся, что nav занимает всю ширину */
}

.logo {
    padding: 0;
    margin: 0;
}

.logo img {
    height: 50px; /* Уменьшаем высоту логотипа */
    width: auto; /* Сохраняем пропорции */
    transition: transform 0.3s ease;
}

.logo img:hover {
    /* transform: scale(1.05); */ /* Убираем эффект масштабирования */
    box-shadow: none;
    outline: none;
}

.logo:hover {
    background-color: transparent;
    box-shadow: none;
}

nav a {
    text-decoration: none;
    color: #ffffff; /* Белый цвет для кнопок */
    font-weight: 500; /* Немного тоньше */
    padding: 12px 10px; /* Уменьшаем горизонтальный отступ кнопок */
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 5px; /* Сближаем кнопки */
}

nav a:hover {
    background-color: rgba(0, 123, 255, 0.7); /* Синий фон при наведении */
    color: #ffffff;
}

/* Убираем эффект квадрата при наведении на логотип, делая правило очень специфичным */
header nav .logo a {
    padding: 0;
    margin: 0;
}

header nav .logo a:hover {
    background-color: transparent;
    box-shadow: none;
    border: none;
    outline: none;
    padding: 0; /* Убираем отступы, которые могут создавать видимость квадрата */
}

/* Новые стили для контактной информации */
.contact-info {
    display: flex;
    flex-direction: row; /* Размещаем элементы в строку */
    align-items: center; /* Выравниваем по центру по вертикали */
    gap: 20px; /* Отступ между блоком телефонов и почтой */
    margin-left: auto; /* Смещаем контактную информацию вправо */
}

.phone-numbers {
    display: flex;
    flex-direction: row; /* Размещаем телефонные номера в строку */
    gap: 15px; /* Отступ между телефонными номерами */
}

.contact-info a {
    text-decoration: none;
    color: #ffffff; /* Белый цвет для ссылок */
    font-weight: 500;
    /* display: inline-block; */ /* Делаем ссылки блочно-строчными для применения padding */
    /* padding: 12px 20px; */ /* Отступы как у кнопок */
    /* border-radius: 4px; */ /* Скругление углов как у кнопок */
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: #007bff; /* Синий при наведении */
    background-color: transparent; /* Убираем фон для телефонов */
}

.email-link-button {
    display: inline-block;
    padding: 12px 20px; /* Отступы как у кнопок */
    border-radius: 4px; /* Скругление углов как у кнопок */
}

.email-link-button:hover {
    background-color: rgba(0, 123, 255, 0.7); /* Синий фон при наведении */
    color: #ffffff; /* Белый текст при наведении */
}

/* Дополнительные стили для контейнера навигационных ссылок */
.nav-links {
    display: flex;
    gap: 20px; /* Увеличиваем расстояние между кнопками */
    margin-left: auto; /* Смещаем навигационные ссылки вправо */
}

/* Hero Section */
.hero {
    /* background: linear-gradient(rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8)), url('../images/hero_background.jpg') no-repeat center center/cover; */ /* Фон с градиентом и изображением */
    color: white;
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 30px; /* Возвращаем отступ снизу */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    color: white; /* Белый цвет для заголовка hero */
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.button-primary {
    background-color: #ffffff; /* Белый фон для основной кнопки */
    color: #007bff; /* Светло-голубой текст */
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block; /* Для кнопок в тексте */
}

.button-primary:hover {
    background-color: #e9ecef;
    color: #0056b3;
    transform: translateY(-3px); /* Чуть больше подъем */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

main {
    padding: 40px 20px; /* Возвращаем стандартные отступы main */
    max-width: 960px;
    margin: 30px auto; /* Возвращаем отступы сверху/снизу */
    margin-left: auto;
    margin-right: auto;
    background-color: transparent;
    border-radius: 8px;
    box-shadow: none; /* Более выраженная тень */
}

h1, h2, h3, h4, h5, h6 {
    color: #0056b3; /* Чуть темнее голубой для заголовков */
    margin-bottom: 20px;
    margin-top: 30px;
}

p {
    margin-bottom: 15px;
}

ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.feedback-form {
    margin-top: 40px;
    padding: 30px;
    border: 1px solid #ced4da; /* Нейтральный цвет границы */
    border-radius: 8px;
    background-color: #ffffff; /* Белый фон для формы */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feedback-form h2 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form input[type="tel"],
.feedback-form textarea {
    width: 100%; /* Занимаем всю доступную ширину */
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box; /* Учитываем padding в ширине */
    font-size: 16px;
}

.feedback-form textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-form button[type="submit"],
#callbackButton {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Добавим трансформацию */
    display: block; /* Сделаем кнопки блочными */
    width: fit-content; /* Ширина по контенту */
    margin: 20px auto 0; /* Центрируем кнопку */
}

.feedback-form button[type="submit"]:hover,
#callbackButton:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Небольшой подъем при наведении */
}

footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    background-color: #212529; /* Темный фон для футера */
    color: #f8f9fa;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}

.social-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links img {
    height: 30px;
    width: 30px;
    transition: transform 0.3s ease;
}

.social-links img:hover {
    transform: scale(1.1);
}

/* Стили для портфолио */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* Обрезка содержимого, которое выходит за пределы */
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    max-width: 100%;
    height: 200px; /* Фиксированная высота для изображений портфолио */
    object-fit: cover; /* Обрезка изображения для заполнения */
    display: block;
    margin-bottom: 15px;
    border-radius: 4px;
}

.portfolio-item h2 {
    color: #0056b3;
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 10px;
}

.portfolio-item p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.portfolio-item .button-primary {
    align-self: flex-start;
    padding: 10px 20px;
    font-size: 1em;
    margin: 0;
}

/* Стили для раздела Услуги (services.html) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Адаптивная сетка */
    gap: 30px;
    margin-top: 30px;
}

.service-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Распределяет содержимое по высоте */
    position: relative; /* Добавляем для позиционирования псевдоэлемента */
    overflow: hidden; /* Обрезаем содержимое, выходящее за границы */
    color: #ffffff; /* Изменяем цвет текста на белый для лучшей читаемости */
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный фон */
    z-index: 1; /* Размещаем поверх изображения, но под текстом */
}

.service-item h2,
.service-item p {
    position: relative;
    z-index: 2; /* Размещаем текст над псевдоэлементом */
    color: #ffffff; /* Устанавливаем белый цвет для заголовков и параграфов */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Добавляем тень для лучшей читаемости */
}

.service-item:hover {
    transform: translateY(-5px); /* Эффект подъема при наведении */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-item h2 {
    color: #0056b3; /* Более темный синий для заголовков услуг */
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Позволяет параграфу занимать доступное пространство */
}

.service-item .button-primary {
    align-self: flex-start; /* Выравнивание кнопки по левому краю */
    padding: 10px 20px;
    font-size: 1em;
    margin: 0; /* Убираем лишние отступы, так как flex-direction: column */
}

.service-item img {
    max-width: 100%;
    height: 180px; /* Фиксированная высота для изображений услуг */
    object-fit: cover; /* Обрезка изображения для заполнения */
    display: block;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }

    nav a {
        padding: 8px 12px;
    }

    main {
        padding: 20px 15px;
        margin: 20px auto;
    }

    .feedback-form {
        padding: 20px;
    }

    .feedback-form button[type="submit"],
    #callbackButton {
        width: 100%;
        margin: 20px auto 0;
    }
}

/* Дополнительные стили для placeholder карты */
#map-placeholder {
    border: 1px solid #ced4da;
    border-radius: 8px;
    overflow: hidden; /* Чтобы текст не выходил за рамки */
    background-color: #e9ecef; /* Легкий серый фон */
    color: #6c757d; /* Темнее текст */
    font-size: 1.1em;
}

/* Стили для секций лендинга */
main section {
    margin-top: 60px; /* Отступ между секциями */
    padding-top: 20px; /* Дополнительный внутренний отступ сверху */
    border-top: none; /* Разделительная линия */
}

/* Убираем верхний отступ для первой секции, чтобы не было лишнего пространства после hero */
main section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

#myVideo {
  min-width: 100%; 
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.video-background:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); 
  z-index: 0; 
}

.content {
  position: relative;
  z-index: 1;
  color: white; 
}

section#about {
}

section#about h1 {
}

.section-separator {
    height: 0; /* Высота линии */
    background-color: transparent; /* Полностью прозрачный цвет */
    margin: 100px auto; /* Отступы сверху и снизу, центрирование */
    width: 80%; /* Ширина линии */
    max-width: 800px; /* Максимальная ширина */
}

/* Скрытые блоки портфолио */
.hidden-portfolio {
    display: none;
}

/* Кнопка 'Еще' по центру */
#showMorePortfolio {
    margin: 30px auto 0;
    display: block;
} 