:root {
    --primary: #e5894f;
    --dark: #1a1a1a;
    --light: #f4f6f8;
    --white: #ffffff;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.4;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }

/* === ЛОГОТИП STROYRENT === */
.logo-final {
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-decoration: none;
    font-size: 0;
    margin-bottom: 25px;
}

.logo-part {
    display: inline-block;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    font-size: 28px;
    border-width: 2px;
    letter-spacing: 2px;
}

.part-left {
    color: var(--primary);
    border: 2px solid var(--white);
    border-right: none;
    padding: 10px 0px 10px 15px;
}

.part-right {
    color: var(--white);
    border: 2px solid var(--primary);
    border-left: none;
    padding: 10px 15px 10px 0px;
}

@media (max-width: 480px) {
    .logo-part { font-size: 22px; padding: 8px 0px 8px 10px; }
    .part-right { padding: 8px 10px 8px 0px; }
}

/* === HERO SECTION === */
.hero {
    background: #222;
    color: white;
    padding: 40px 0 60px;
    text-align: center;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.hero h1 { font-size: 24px; margin-bottom: 15px; font-weight: 700; }
.hero-benefits {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px 20px; /* 10px между рядами, 20px между колонками */
    flex-wrap: wrap; /* Разрешаем перенос блоков на новую строку */
    margin-bottom: 25px;
    font-size: 13px;
    color: #ccc;
    font-weight: 600;
}

.hero-benefits li {
    display: flex;
    align-items: center;
    gap: 6px;
    /* ГЛАВНОЕ: Запрещаем перенос внутри одного пункта. 
       Теперь иконка и текст всегда будут на одной строке. */
    white-space: nowrap; 
}

.hero-benefits i {
    color: var(--primary);
    font-size: 14px;
}

/* Адаптация для очень узких экранов (меньше 360px) */
@media (max-width: 360px) {
    .hero-benefits {
        gap: 8px 12px;
        font-size: 12px;
    }
}
.hero-buttons { display: flex; justify-content: center; gap: 10px; }

.btn { 
    padding: 12px 24px; border-radius: 50px; 
    text-decoration: none; font-weight: 600; 
    font-size: 14px; border: none; cursor: pointer; 
}
.btn-outline { background: var(--primary); border: 1px solid var(--primary); color: white; }

/* === ПОИСК === */
.search-container-wrapper { margin-top: -28px; margin-bottom: 20px; }
.search-wrapper { 
    background: white; border-radius: 50px; padding: 2px; 
    display: flex; align-items: center; box-shadow: 0 6px 15px rgba(0,0,0,0.12); 
    max-width: 500px; margin: 0 auto; 
}
.search-icon { padding: 0 10px 0 15px; color: #999; font-size: 16px; }
.search-wrapper input { 
    border: none; width: 100%; padding: 12px; 
    outline: none; font-size: 15px; border-radius: 50px; 
}

/* === КАТАЛОГ 3 В РЯД === */
.catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 8px; /* 15px между рядами, 8px между карточками */
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .catalog { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
}

.card {
    background: white; border-radius: 12px; padding: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; 
    justify-content: space-between; height: 100%;
    align-items: center;
}

.card img { 
    width: 100%; height: 85px; 
    object-fit: contain; margin-bottom: 6px; 
}

.card h3 { 
    font-size: 11px; font-weight: 600; margin: 0; 
    height: 27px; line-height: 1.2; overflow: hidden; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
}

.card-price { 
    font-size: 11px; font-weight: 800; 
    color: var(--primary); margin: 6px 0; 
}

.card-btn { 
    background: #20b657; color: white; padding: 8px 0; 
    border-radius: 6px; text-align: center; font-size: 10px; 
    font-weight: 700; cursor: pointer; text-transform: uppercase; 
}

/* === ОТЗЫВЫ === */
.reviews h2 { text-align: center; font-size: 22px; margin-bottom: 20px; }
.reviews-grid { 
    display: flex; gap: 15px; overflow-x: auto; 
    padding-bottom: 15px; scrollbar-width: none; 
}
.reviews-grid::-webkit-scrollbar { display: none; }
.review-card { 
    background: white; padding: 15px; border-radius: 12px; 
    min-width: 260px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
.review-card .stars { color: gold; font-size: 12px; margin-bottom: 8px; }
.review-card p { font-size: 13px; font-style: italic; color: #555; }
.review-card span { font-weight: bold; color: var(--primary); font-size: 12px; }

/* === КОНТАКТЫ === */
.contacts { background: white; padding: 40px 0; }
.contacts h2 { text-align: center; font-size: 22px; margin-bottom: 25px; }
.location-card { background: var(--light); border-radius: 15px; padding: 18px; margin-bottom: 15px; }
.location-header i { color: #e91e63; font-size: 20px; }
.location-buttons { display: flex; gap: 10px; }
.btn-action { 
    flex: 1; background: white; border: 1px solid #ddd; padding: 12px; 
    text-align: center; text-decoration: none; color: #333; 
    font-size: 13px; font-weight: 600; border-radius: 10px; 
}

.location-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Добавлено: центрирует адрес и иконку */
    gap: 10px;
    margin-bottom: 15px;
}

.location-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    text-align: center; /* На случай переноса строки */
}

.map-placeholder-link { 
    display: block; background: #666; border-radius: 18px; 
    padding: 40px 20px; text-align: center; text-decoration: none; 
    color: white; margin-top: 25px; 
}
.gis-logo-white { height: 30px; filter: brightness(0) invert(1); margin-bottom: 15px; }
.btn-gis-open { 
    display: inline-block; background: var(--primary); 
    padding: 12px 30px; border-radius: 50px; 
    font-weight: 700; margin-top: 15px; 
}

/* === ПЛАВАЮЩАЯ КНОПКА === */
.float-whatsapp { 
    position: fixed; bottom: 20px; right: 20px; 
    width: 60px; height: 60px; background: #25D366; 
    color: white; border-radius: 50%; border: none; 
    font-size: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 1000; 
}

/* === МОДАЛКИ === */
.modal-overlay { 
    display: none; position: fixed; top: 0; left: 0; 
    width: 100%; height: 100%; background: rgba(0,0,0,0.7); 
    z-index: 2000; justify-content: center; align-items: center; 
    padding: 20px; backdrop-filter: blur(2px);
}
.modal-content { 
    background: white; padding: 30px 20px; border-radius: 20px; 
    width: 100%; max-width: 340px; text-align: center; position: relative; 
}
.close-modal { position: absolute; top: 12px; right: 18px; font-size: 26px; cursor: pointer; color: #aaa; }
.modal-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.modal-btn { 
    background: #f8f9fa; padding: 15px; border-radius: 12px; 
    text-decoration: none; color: #333; font-weight: 700; 
    border: 1px solid #eee; cursor: pointer; font-size: 14px;
}
.wa-header { color: #25D366; font-size: 22px; margin-bottom: 5px; }
.footer { text-align: center; padding: 30px; background: #222; color: #888; font-size: 12px; }





/* Обновленная сетка для 3-х кнопок */
.location-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки в ряд */
    gap: 8px;
    margin-top: 10px;
}

.btn-action {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 4px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-size: 11px; /* Чуть меньше шрифт, чтобы влезло */
    font-weight: 600;
    display: flex;
    flex-direction: column; /* Иконка над текстом */
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}

.btn-action i {
    font-size: 16px;
    color: var(--primary); /* Твой оранжевый цвет */
}

/* Цвет иконки WhatsApp */
.btn-action.wa-color i {
    color: #25D366;
}

/* Фикс SVG логотипа 2ГИС */
.gis-logo-svg {
    height: 40px;
    width: auto;
    margin-bottom: 10px;
}

/* Фикс вертикального слипания карточек каталога */
.catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 8px; /* 15px — вертикальный отступ между рядами */
    padding-bottom: 30px;
}

/* Адаптив для маленьких экранов */
@media (max-width: 360px) {
    .btn-action {
        font-size: 10px;
        padding: 8px 2px;
    }
}

/* =========================================
   АНИМАЦИЯ ЛОГОТИПА: ТОЛЬКО СТОЛКНОВЕНИЕ
   ========================================= */

/* Контейнер: добавляем небольшую тряску в момент удара */
.logo-final {
    position: relative;
    animation: logoImpactShake 1.2s cubic-bezier(.36,.07,.19,.97) both;
    overflow: hidden; 
}

/* Левая часть: вылет слева */
.part-left {
    /* Добавляем задержку 0.1s, если звук начинается слишком резко */
    animation: collisionLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-delay: 0.1s; 
}

.part-right {
    animation: collisionRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    animation-delay: 0.1s;
}

/* --- Keyframes --- */

@keyframes collisionLeft {
    0% {
        opacity: 0;
        transform: translateX(-200%); /* Начало далеко слева */
    }
    50% {
        opacity: 1;
        transform: translateX(10px); /* В момент удара немного заходит за центр */
    }
    70% {
        transform: translateX(-5px); /* Отскок назад */
    }
    100% {
        transform: translateX(0); /* Финальная позиция */
    }
}

@keyframes collisionRight {
    0% {
        opacity: 0;
        transform: translateX(200%); /* Начало далеко справа */
    }
    50% {
        opacity: 1;
        transform: translateX(-10px); /* В момент удара немного заходит за центр */
    }
    70% {
        transform: translateX(5px); /* Отскок назад */
    }
    100% {
        transform: translateX(0); /* Финальная позиция */
    }
}

/* Тряска всего логотипа в момент соприкосновения */
@keyframes logoImpactShake {
    0%, 45% { transform: scale(1); }
    50% { transform: scale(1.05); } /* Легкое расширение от удара */
    52% { transform: translateX(-2px) rotate(-0.5deg); }
    55% { transform: translateX(2px) rotate(0.5deg); }
    60% { transform: translateX(0) rotate(0); }
    100% { transform: scale(1); }
}


/* =========================================
   СТИЛИ ДЛЯ ИСКР СВАРКИ (JS)
   ========================================= */

/* Контейнер для центрирования искр */
#welding-sparks-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: -1; /* За текстом */
    overflow: visible;
    pointer-events: none;
}

/* Стиль одной искры */
.welding-spark {
    position: absolute;
    /* Цвет раскаленного металла: белый центр */
    background-color: #ffffcc;
    /* Мощное оранжево-желтое свечение вокруг */
    box-shadow: 0 0 4px 1px rgba(255, 165, 0, 0.8), 0 0 8px 2px rgba(255, 69, 0, 0.6);
    border-radius: 50%;
    /* Изначально в центре */
    top: 0;
    left: 0;
    opacity: 0;
    /* Анимация полета. Переменные --dx, --dy, --scale задаст JS */
    animation: weldFly 0.6s ease-out forwards;
}

/* Анимация полета искры */
@keyframes weldFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    60% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        /* Летят в случайную точку (--dx, --dy) и уменьшаются */
        transform: translate(var(--dx), var(--dy)) scale(var(--scale));
    }
}


/* Удаляем отступ над заголовком "Наши филиалы" */
.contacts {
    background: white;
    padding: 10px 0 40px 0; /* Минимальный отступ сверху (10px) */
}

.contacts h2 {
    text-align: center;
    font-size: 22px;
    margin-top: 0; /* Убираем стандартный отступ заголовка */
    margin-bottom: 20px;
}

/* Обновленная сетка для 2-х кнопок (растягиваются) */
.location-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 колонки по 50% */
    gap: 10px;
    margin-top: 10px;
}

.btn-action {
    padding: 12px 5px;
    font-size: 13px; /* Можно сделать чуть крупнее, так как места больше */
}

/* Настройка модалки 2ГИС */
#open-gis-modal {
    cursor: pointer;
    transition: transform 0.2s;
}

#open-gis-modal:active {
    transform: scale(0.98);
}


/* === ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ === */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.lang-btn {
    background: none;
    border: none;
    color: #aaa;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
}

.lang-btn:hover {
    color: white;
}

.lang-btn.active {
    color: var(--primary); /* Оранжевый цвет активного языка */
    font-weight: 900;
}

.divider {
    color: #555;
    font-size: 12px;
}

/* Адаптив: чтобы на мобилках переключатель не наезжал на логотип */
@media (max-width: 480px) {
    .lang-switcher {
        top: 10px;
        right: 10px;
    }
}


/* График работы в карточке филиала */
.branch-schedule {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: #555;
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    border: 1px dashed #ccc; /* Пунктирная рамка для акцента */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.branch-schedule i {
    color: var(--primary); /* Оранжевый цвет иконки */
}