/* ==================== */
/* Общие стили */
/* ==================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

@font-face {
    font-family: 'Font Awesome Brands';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
    font-display: swap;
}

/* ==================== */
/* Шапка (Header) */
.site-header {
    background-color: #333;
    padding: 5px 0;
    position: fixed;
    width: 100vw;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.flex-wrap {
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 5px 0;
    width: 100%;
    overflow: visible;
}

.logo-section img {
    display: block;
    width: 60px;
    height: auto;
}

.header-navigation .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.phone-number {
    font-size: 34px;
    font-weight: bold;
    color: #fff;
}

.header-order.primary-btn {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    padding: 8px 15px;
    min-height: 40px;
    width: auto;
    max-width: 120px;
}

.nav-item {
    display: inline-block;
    position: relative;
}

.header-navigation .nav-item {
    padding: 0 5px;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: color 0.3s ease;
}

.header-navigation .nav-item:hover {
    color: #007bff;
}

.header-right-section {
    display: flex;
    gap: 30px;
    overflow: visible;
}

.language-switcher,
.city-switcher {
    position: relative;
    cursor: pointer;
    z-index: 1003;
}

.language-current,
.phone-link {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-right-section .icon {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain;
}

.phone-link .icon {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    object-fit: contain;
}

.app-links .icon {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
}

.language-options,
.city-options {
    display: none;
    position: absolute;
    background: #fffdf0;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    top: calc(100% + 5px);
    min-width: 150px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    z-index: 1002;
}

.language-switcher.active .language-options,
.city-switcher.active .city-options {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.language-options li,
.city-options li {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-options a,
.city-options a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: block;
    font-weight: 500;
    pointer-events: auto;
    padding: 6px 12px; /* Переносим padding сюда */
    width: 100%; /* Убедимся, что <a> занимает всю ширину */
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.language-options li:hover,
.city-options li:hover {
    background-color: #FFC509;
    color: #000;
    border-radius: 4px;
}

.city-options {
    right: 0;
    min-width: 200px;
    max-width: 250px;
    max-height: 300px;
    overflow-y: auto;
}

.city-options::-webkit-scrollbar {
    width: 6px;
}

.city-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.city-options::-webkit-scrollbar-thumb {
    background: #FFC509;
    border-radius: 8px;
}

.city-options::-webkit-scrollbar-thumb:hover {
    background: #e0b007;
}

.city-options li.current-city,
.language-options li.current-lang {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #007bff;
}

.city-options a {
    padding: 6px 12px; /* Уточняем padding для city-options */
}

.city-options a:hover {
    color: #000;
}

.city-current,
.language-current {
    color: #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #FFC509;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.city-current:hover,
.language-current:hover {
    background-color: #e0b007;
}

.city-toggle i,
.lang-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-switcher.active .lang-toggle i,
.city-switcher.active .city-toggle i {
    transform: rotate(180deg);
}

.contact-block {
    display: flex;
    gap: 15px;
}

.phone-link {
    text-decoration: none;
}

.app-links {
    display: flex;
    gap: 10px;
}

.primary-btn {
    background-color: #FFC509;
    color: black;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.primary-btn:hover {
    background-color: #0056b3;
}

.header-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 30px;
    color: #fff;
    margin-left: -5px;
    margin-right: 15px;
    padding: 5px 10px;
}

.menu-close-btn {
    display: none;
    cursor: pointer;
    font-size: 30px;
    color: #fff;
    margin-left: -5px;
    margin-right: 15px;
    padding: 5px 10px;
    position: relative;
    z-index: 1002;
}

.mobile-navigation {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(51, 51, 51, 0.96);
    flex-direction: column;
    padding: 20px 0;
    z-index: 1001;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    align-items: center;
    text-align: center;
}

/* Медиа-запросы для шапки */
@media (max-width: 768px) {
    .site-header {
        padding: 0;
    }
    
    .logo-section img {
        width: 50px; /* Новый размер логотипа для мобильной версии */
    }

    .phone-number {
        color: #fff;
        font-size: 30px;
    }

    .header-menu-toggle {
        display: block;
    }

    .site-header.menu-active .header-menu-toggle {
        display: none;
    }

    .site-header.menu-active .menu-close-btn {
        display: block;
    }

    .header-navigation,
    .header-right-section,
    .city-switcher {
        display: none !important;
    }

    .header-container {
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-navigation.active {
        display: flex;
        transform: translateX(0);
    }

    .mobile-header-middle {
        width: 50%;
        max-width: 300px;
        margin: 40px auto;
    }

    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-menu-item {
        border-bottom: 1px solid #eee;
        padding: 2px 0;
        margin: 2px 0;
    }

    .mobile-menu-item:last-child {
        border-bottom: none;
    }

    .mobile-menu-link {
        text-decoration: none;
        padding: 6px 0;
        display: block;
        color: #fff;
        font-size: 18px;
        font-weight: bold;
    }

    .mobile-header-bottom {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .mobile-language-switcher,
    .mobile-city-switcher {
        margin-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .mobile-city-switcher {
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-header-bottom .primary-btn {
        white-space: normal;
        width: 100%;
        max-width: 200px;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: 1.2;
        padding: 10px 20px;
    }

    .lang-option,
    .city-option {
        text-decoration: none;
        color: #fff;
        margin: 0 10px;
        font-size: 16px;
        white-space: nowrap;
    }

    .city-selected,
    .lang-selected {
        color: #FFC509;
    }

    .mobile-app-links {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .mobile-app-links a img {
        display: block;
    }
}

/* ==================== */
/* Секция с приложением */
.app-download-section {
    background-image: url('/images/app-download-bg.avif');
    background-size: cover;
    background-position: center;
    padding: 15px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: visible;
    min-height: 500px;
    margin-top: 80px;
}

.app-download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.app-download-content {
    position: relative;
    z-index: 2;
}

.app-download-section h1 {
    font-size: 50px;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-in-out;
}

.app-download-section p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-in-out;
}

.app-download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeIn 1.5s ease-in-out;
}

.app-download-link img {
    transition: transform 0.3s ease;
}

.app-download-link:hover img {
    transform: scale(1.05);
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.car-animation {
    position: absolute;
    bottom: 50px;
    left: 50%;
    width: 1000px;
    height: auto;
    transform: translateX(-50%);
    animation: driveIn 3s ease-in-out forwards;
}

@keyframes driveIn {
    0% { transform: translateX(-150%) translateY(0); }
    100% { transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
    .app-download-section {
        padding: 60px 20px;
        min-height: 300px;
        background-image: url('/images/app-download-bg-mobile.avif');
        margin-top: 60px;
    }

    .app-download-section h1 {
        font-size: 16px;
    }

    .app-download-section p {
        font-size: 13px;
    }

    .app-download-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .app-download-link img {
        width: 150px;
        height: auto;
        min-height: 48px;
        object-fit: contain;
    }

    .car-animation {
        width: 370px;
        bottom: 1px;
    }
}

/* ==================== */
/* Основной контент */
.contentwrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content {
    display: flex;
    gap: 20px;
}

.content-left {
    flex: 2;
}

.main-text {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    color: #333;
    font-size: 18px;
    line-height: 1.6;
    animation: bgChange 5s infinite alternate;
}

@keyframes bgChange {
    from { background-color: rgba(255, 255, 255, 0.9); }
    to { background-color: rgba(240, 240, 240, 0.9); }
}

.main-text h2 {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #2a2a2a;
    margin: 0 0 20px 0;
    line-height: 1.3;
    text-align: center;
    transition: transform 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.main-text h2:hover {
    transform: scale(1.02);
}

.main-text-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0 0 0;
}

.main-text-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.6;
    transition: transform 0.3s ease;
}

.main-text-list li:hover {
    transform: translateX(5px);
}

.main-text-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: #28a745;
    font-size: 20px;
}

.diamond-list li::before {
    content: "🔹";
    top: 2px;
    color: #2a6db0;
    font-size: 18px;
}

.diamond-css-list li::before {
    content: "";
    top: 8px;
    width: 12px;
    height: 12px;
    background: #2a6db0;
    transform: rotate(45deg);
}

.main-text a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    padding: 3px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: none;
}

.main-text a:hover {
    color: white;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

.content-right {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: bgChange 5s infinite alternate;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.zagolovok-uslugi {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.services-container {
    max-height: 145vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    animation: bgChange 5s infinite alternate;
    padding: 0;
    display: flex;
    justify-content: center;
}

.services-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    table-layout: auto;
}

.services-header {
    background-color: #FFC509 !important;
    color: white !important;
    padding: 15px;
    text-align: center;
    font-size: 18px;
}

.services-table td,
.services-table th {
    border-bottom: 1px solid #ccc;
    vertical-align: middle;
    padding: 10px;
    text-align: left;
    box-sizing: border-box;
}

.services-table tr:last-child td {
    border-bottom: none;
}

.services-table td:first-child {
    width: 20% !important;
    max-width: 120px !important;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.services-table td:last-child {
    width: 80%;
    overflow: hidden;
}

.services-table a {
    text-decoration: none;
    color: #333 !important;
    font-size: 16px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.services-table a:hover {
    color: #4CAF50 !important;
    background: none !important;
}

.services-table .left-menu2 {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 0 !important;
    background: none !important;
    border-radius: 0 !important;
}

.services-table .left-menu2:hover {
    color: #2a6db0 !important;
    transform: translateX(5px);
    background: none !important;
}

.left-menu2 {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 0;
    background-color: transparent !important;
}

.left-menu2:hover {
    color: #2a6db0 !important;
    transform: translateX(5px);
    background-color: transparent !important;
}

.services-table td img {
    margin-right: 10px;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
    max-width: 40px;
    max-height: 40px;
}

.services-table td:first-child img {
    max-width: 100%;
    height: auto;
    margin: 0 5px 0 0;
    float: right;
    padding: 0;
}

.img-menu-left-2 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-3 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-4 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-5 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-6 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-7 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-8 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-9 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-10 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-11 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-12 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-13 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-14 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-15 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-16 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-17 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-18 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-19 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-20 { width: 30px; height: 39px; margin-top: 0; }
.img-menu-left-21 { width: 30px; height: 39px; margin-top: 0; }

/* Медиа-запросы для контента таблицы */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }

    .content-right {
        margin-top: 20px;
    }

    .main-text-list li {
        padding-left: 25px;
        font-size: 16px;
    }

    .main-text-list li::before {
        font-size: 18px;
    }

    .diamond-list li::before {
        font-size: 16px;
    }

    .diamond-css-list li::before {
        width: 10px;
        height: 10px;
        top: 6px;
    }

    .main-text h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .services-container {
        max-height: none;
        overflow-y: visible;
    }

    .services-table td:first-child {
        width: 20% !important;
        max-width: 120px !important;
        overflow: visible;
    }

    .services-table td:last-child {
        width: 80% !important;
    }

    .services-table td img {
        max-width: 40px;
        max-height: 40px;
    }

   .services-table td:first-child img {
        float: none !important;
        margin-left: 10px !important;
        margin-right: 0 !important;
    }

    .zagolovok-uslugi {
        font-size: 18px;
    }

    .services-table td,
    .services-table th {
        padding: 10px;
    }

    .services-table a {
        font-size: 15px !important;
    }
}

/* ==================== */
footer {
    background-color: #333;
    color: white;
    padding: 40px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.footer-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo h2 {
    font-size: 24px;
    margin: 0;
    color: #fff;
    text-align: center;
}

.footer-subtitle {
    font-size: 8px; /* маленький шрифт */
    color: #FFC509; /* оранжевый цвет */
    margin: 0; /* убираем отступ сверху */
    margin: 1px 0 0 0; /* небольшой отступ сверху */
    text-align: center;
    line-height: 1; /* уменьшаем межстрочный интервал для плотного прилегания */
}

.footer-links {
    display: flex;
    flex-direction: row; /* Горизонтально на десктопе */
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff;
}

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

.footer-social a {
    color: white;
    font-size: 20px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #007bff;
}

.footer-copyright {
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

/* Медиа-запросы для подвала */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column; /* Вертикально в мобильной версии */
        align-items: center; /* Центрируем ссылки */
        gap: 12px;
    }

    .footer-social {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    footer {
        padding: 20px 10px;
    }

    .footer-links {
        gap: 10px; /* Уменьшаем расстояние */
    }

    .footer-social {
        flex-wrap: wrap;
    }

    .footer-copyright {
        font-size: 10px;
    }
}

/* ==================== */
/* Блок с рекламой номеров */
.ad-block {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f8f9fa;
    padding: 20px;
    margin: 0 auto 20px;
    max-width: 1200px;
}

.ad-item {
    width: 200px;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ad-title {
    font-size: 25px;
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
}

.ad-phone {
    font-size: 24px;
    font-weight: bold;
    color: #0000FF;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
}

.ad-phone:hover {
    color: #0056b3;
}

.ad-callback {
    font-size: 16px;
    color: #FF0000;
    margin-bottom: 10px;
}

.ad-image {
    max-width: 100px;
    height: auto;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .ad-block {
        flex-direction: column;
        gap: 20px;
    }

    .ad-item {
        width: 80%;
    }
}

/* ==================== */
/* Анимации и дополнительные стили */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #FFC509;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#scroll-to-top:hover {
    background-color: #0056b3;
    color: #fff;
    transform: scale(1.1);
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}
