/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #000;
    line-height: 1.6;
    animation: fadeIn 1.5s ease-in;
}

/* Ограничение ширины и центрирование */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Выравнивание текста по ширине, кроме заголовков */
.container p,
.container ul,
.container li {
    text-align: justify; /* Выравнивание текста по ширине */
}

/* Выравнивание заголовков по умолчанию (по левому краю) */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6 {
    text-align: left; /* По левому краю */
}

/* Карусель */
.carousel-container {
    max-width: 1200px; /* Ограничение максимальной ширины карусели */
    margin: 20px auto;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel img {
    width: calc(100% / 3); /* Три изображения одновременно */
    height: auto;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .carousel img {
        width: calc(100% / 2); /* Два изображения одновременно на планшетах */
    }
}

@media (max-width: 480px) {
    .carousel img {
        width: calc(100% / 1); /* Одно изображение на маленьких экранах */
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Header */
header {
    background-color: #ffffff;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideDown 1s ease-in-out;
    width: 100%;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Logo */
.logo img {
    max-width: 500px;
    min-width: 150px;
    width: 100%;
    height: auto;
}

/* Навигация */
nav {
    background-color: #FF0000;
    width: 100%;
    padding: 10px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    padding: 10px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: #d00000;
}

/* Hero section */
.hero-section {
    text-align: center;
    padding: 0px 10px;
    margin: 5px auto 0;
    max-width: 1200px; /* Ограничение ширины для заголовков и текста */
}

.hero-section h2 {
    font-size: 32px;
    margin-bottom: 0px;
    animation: fadeInUp 1.5s ease-in-out;
}

@keyframes fadeInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-section p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 auto 20px;
    text-align: justify;
}

@media (max-width: 1024px) {
    .hero-section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section h2 {
        font-size: 1.2rem;
    }
}

/* CTA Button */
.btn-cta {
    display: inline-block;
    padding: 15px 30px;
    background-color: #FF0000;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    max-width: 200px;
    margin: 0 auto;
}

.btn-cta:hover {
    background-color: #d00000;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .btn-cta {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .btn-cta {
        font-size: 0.8rem;
        padding: 10px 20px;
    }
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

/* Contact and social media panel */
.top-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.phone-numbers {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-numbers a {
    color: #000;
    text-decoration: none;
}

.phone-numbers a:hover {
    text-decoration: underline;
}

/* Messenger buttons */
.messenger-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-messenger {
    display: inline-block;
    padding: 10px 20px;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease; /* Добавляем анимацию */
}

.btn-whatsapp {
    background-color: #25D366;
}

.btn-telegram {
    background-color: #0088cc;
}

.btn-vk {
    background-color: #4C75A3;
}

/* Анимация при наведении на кнопки */
.btn-messenger:hover {
    transform: scale(1.1); /* Увеличение кнопки на 10% */
}

.btn-whatsapp:hover {
    background-color: #1EBE5B; /* Более темный оттенок зеленого для WhatsApp */
}

.btn-telegram:hover {
    background-color: #006C9A; /* Более темный оттенок для Telegram */
}

.btn-vk:hover {
    background-color: #3B5998; /* Темный оттенок для ВКонтакте */
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .top-contact {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .hero-section h2 {
        font-size: 28px;
    }

    .hero-section p {
        font-size: 16px;
    }

    .btn-cta {
        font-size: 14px;
        padding: 12px 24px;
    }
}

@media (max-width: 480px) {
    .hero-section h2 {
        font-size: 24px;
    }

    .hero-section p {
        font-size: 14px;
    }

    .btn-cta {
        font-size: 12px;
        padding: 10px 20px;
    }
}

/* Контейнер контактов */
.contact-info {
    text-align: left; /* Прижимаем текст к левому краю */
    line-height: 1.2; /* Уменьшаем межстрочный интервал в два раза */
}

.contact-info p {
    margin: 5px 0; /* Уменьшаем вертикальные отступы между абзацами */
}

.contact-info a {
    color: inherit;
    text-decoration: none;
}

/* Таблицы */
/* Динамическая ширина таблицы */
.services-table {
    width: 100%;              /* Занимает всю ширину экрана */
    max-width: 1200px;        /* Максимальная ширина таблицы */
    margin: 0 auto;           /* Центрирование */
    border-collapse: collapse;
    margin: 20px auto;        /* Отступы сверху и снизу */
    font-family: 'Poppins', sans-serif;
    transition: height 1.0s ease-out, opacity 1.0s ease-out;
}

/* Ячейки таблицы */
.services-table th, .services-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.services-table th {
    background-color: #f4f4f4;
    font-weight: 600;
}

.services-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.services-table tr:hover {
    background-color: #f1f1f1;
}

/* Плавное раскрытие и скрытие таблицы */
.services-table {
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: block;
}

.services-table.open {
    height: auto; /* Позволяет таблице расширяться до естественной высоты */
    opacity: 1;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    .services-table th, .services-table td {
        padding: 8px;
        font-size: 14px;
    }
}

h2 {
  cursor: pointer;
  margin-top: 15px; /* Decreased from 30px to 15px */
}