/* =============================================
   RESPONSIVE FIXES — Автоэвакуатор22
   Shared across all pages
   ============================================= */

/* ---- Global Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html  { overflow-x: visible; }
body  { overflow-x: hidden; -webkit-text-size-adjust: 100%; position: relative; }
img, video { max-width: 100%; height: auto; object-fit: cover; object-position: center; }

/* ==============================================
   КНОПКИ — единый стиль по всему сайту
   ============================================= */

/* Все главные оранжевые CTA-кнопки */
a.bg-ener,
button.bg-ener {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ff5722 !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: 0.625rem !important;   /* 10px — единый радиус везде */
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(255,87,34,0.22);
    line-height: 1.25;
    white-space: nowrap;
}

a.bg-ener:hover,
button.bg-ener:hover {
    background-color: #e64a19 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,87,34,0.35);
}

/* Кнопка «Вызвать» в шапке — компактнее */
header a.bg-ener {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Кнопки в карточках и формах — на всю ширину */
.mt-auto a.bg-ener,
[class*="pt-0"] a.bg-ener,
form button.bg-ener {
    width: 100%;
    display: flex;
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 0.625rem !important;
}

/* WhatsApp / зелёные кнопки — тот же радиус */
a[class*="bg-\[#25D366\]"] {
    border-radius: 0.625rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================
   HERO SLIDER — скругление на всех устройствах
   ============================================= */

/* Всегда скруглённый, всегда с отступами по бокам */
section#hero-slider-section > div {
    padding-left:  0.75rem;
    padding-right: 0.75rem;
    padding-top:   0.5rem;
}

.hero-container {
    border-radius: 1rem !important;
    overflow: hidden !important;
    min-height: 380px;
    cursor: grab;
    user-select: none;
}

.hero-container:active {
    cursor: grabbing;
}

@media (min-width: 480px) {
    .hero-container { min-height: 420px; }
}

@media (min-width: 640px) {
    section#hero-slider-section > div {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top: 1.5rem;
    }
    .hero-container { min-height: 440px; }
}

@media (min-width: 768px) {
    .hero-container { min-height: 480px; }
}

@media (min-width: 1024px) {
    section#hero-slider-section > div {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .hero-container { border-radius: 1.25rem !important; }
}

/* Контент слайда на маленьких экранах */
@media (max-width: 639px) {
    .hero-slide > div[class*="relative z-10"] {
        padding: 1.2rem 1rem 2.8rem !important;
    }
    .hero-slide h1 {
        font-size: 1.6rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.65rem !important;
    }
    .hero-slide p {
        font-size: 0.88rem !important;
        margin-bottom: 0.85rem !important;
    }
}

/* Скрыть/показать слайды плавно */
.hero-slide {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-dot {
    width: 0.5rem !important;
    height: 0.5rem !important;
    border-radius: 99px !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    padding: 0 !important;
}

.hero-dot.active {
    width: 1.5rem !important;
    background-color: #ff5722 !important;
}

/* ==============================================
   ХЕДЕР — мобильная адаптация
   ============================================= */

@media (max-width: 639px) {
    .header-inner {
        height: 60px !important;
        padding-left:  0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .logo-text  { font-size: 1.05rem !important; }
    .logo-phone { font-size: 0.72rem !important; letter-spacing: 0 !important; }
    .header-inner img { width: 2.5rem !important; height: 2.5rem !important; }
}

@media (max-width: 400px) {
    .header-inner {
        padding-left:  0.4rem !important;
        padding-right: 0.4rem !important;
    }
    .logo-text  { font-size: 0.95rem !important; }
    .logo-phone { font-size: 0.65rem !important; }
    .header-inner img { width: 2.2rem !important; height: 2.2rem !important; }
    header a.bg-ener { padding: 0.4rem 0.65rem !important; font-size: 0.78rem !important; }
    .header-inner .gap-2 { gap: 0.2rem !important; }
}

/* На ≥sm скрываем телефон в лого (он дублируется справа) */
@media (min-width: 640px) {
    .logo-phone { display: none; }
}

/* ==============================================
   КАРТОЧКИ УСЛУГ И ЦЕН
   ============================================= */

@media (max-width: 639px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4,
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==============================================
   ПОРТФОЛИО — сетка
   ============================================= */

@media (max-width: 479px) {
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
}

/* ==============================================
   ФОРМА обратного звонка
   ============================================= */

@media (max-width: 639px) {
    .form-inner { padding: 1.25rem !important; }
    .form-inner h2 { font-size: 1.4rem !important; }
    .form-inner form { flex-direction: column !important; }
    .form-inner form button,
    .form-inner form a { width: 100% !important; }
}

/* ==============================================
   КАРТА
   ============================================= */

@media (max-width: 479px) {
    .w-full.h-\[350px\] { height: 260px !important; }
    .w-\[280px\].h-\[280px\] { width: 180px !important; height: 180px !important; }
}

/* ==============================================
   МОДАЛЬНОЕ ОКНО
   ============================================= */

@media (max-width: 767px) {
    .modal-inner { flex-direction: column !important; max-height: 90vh !important; }
    .modal-inner > div { width: 100%; flex-shrink: 0; }
    .modal-img-wrapper { height: 200px !important; min-height: 200px !important; max-height: 200px !important; }
    .modal-text-wrapper { flex-shrink: 1 !important; flex-grow: 1 !important; overflow-y: auto !important; padding: 1.25rem !important; background: white; }
}

/* ==============================================
   ПРЕИМУЩЕСТВА — 2 колонки на планшете
   ============================================= */

@media (min-width: 640px) and (max-width: 1023px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==============================================
   ФУТЕР
   ============================================= */

@media (max-width: 639px) {
    footer.site-footer {
        margin-left:  0 !important;
        margin-right: 0 !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 5rem !important;
    }
}

/* ==============================================
   ПЛАВАЮЩАЯ КНОПКА ЗВОНКА
   ============================================= */

@media (max-width: 639px) {
    .floating-call {
        bottom: 1rem !important;
        right:  1rem !important;
        width:  auto !important;
        height: auto !important;
        padding: 0.6rem 1rem !important;
    }
    .floating-call span { font-size: 0.85rem !important; display: block !important; }
    .floating-call svg { width: 1.2rem !important; height: 1.2rem !important; }
    .floating-call div { width: 1.75rem !important; height: 1.75rem !important; }
}

/* ==============================================
   КОНТАКТЫ — мессенджер-кнопки
   ============================================= */

@media (max-width: 400px) {
    .messenger-buttons { flex-direction: column !important; }
}

/* ==============================================
   КАРТОЧКА ЦЕН — обёртка картинки
   ============================================= */

.price-card-img-wrapper {
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: 1rem 1rem 0 0;
    overflow: hidden;
}

/* ==============================================
   АНИМАЦИИ
   ============================================= */

@keyframes slowPing {
    0%   { transform: scale(1);    opacity: 0.2; }
    50%  { transform: scale(1.08); opacity: 0.08; }
    100% { transform: scale(1);    opacity: 0.2; }
}
.slow-ping { animation: slowPing 4s ease-in-out infinite !important; }

/* ==============================================
   ТИПОГРАФИКА — предотвращаем overflow
   ============================================= */

h1, h2, h3, h4, p, span, a, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==============================================
   УТИЛИТЫ
   ============================================= */

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.price-card-btn { display: block; text-align: center; }

/* Логотип и телефон в шапке */
.logo-phone {
    display: block !important;
    width: 100%;
    letter-spacing: 0.115em; /* Растягиваем номер до ширины названия */
    line-height: 1;
    margin-top: 2px;
}
