/* ==========================================================================
   1. VARIABLES & CORE — ОСНОВНІ НАСТРОЙКИ
   ========================================================================== */
:root {
  --red: #c00113;
  --red-hover: #8b0000;
  --white: #ffffff;
  --black: #1a1a1a;
  --transition: all 0.3s ease-in-out;
  --anthracite: #2C2C2C;
}

html {
    /* ЦЕ ПРИБИРАЄ ДЕРГАННЯ: резервує місце під скролбаp ЗАВЖДИ */
    scrollbar-gutter: stable !important;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    /* Додаємо overflow-y, щоб змусити браузер завжди бачити вертикальну вісь */
    overflow-y: scroll; 
}

body {
    /* Прибираємо горизонтальну прокрутку, але НЕ ставимо width: 100% */
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
}

section[id] { scroll-margin-top: 90px; }

/* ========================================================================== 
   КОЛЬОРИ ФОНУ ДЛЯ ЧЕРГУВАННЯ СЕКЦІЙ 
   ========================================================================== */

.bg-light {
    background-color: #f8f9fa !important; /* Світло-сірий */
}

.bg-white {
    background-color: #ffffff !important; /* Чистий білий */
}

/* ==========================================================================
   2. ЗАГОЛОВКИ ТА ТИПОГРАФІКА 
   ========================================================================== */
h1 {
  font-weight: 900 !important;
  text-transform: uppercase;
  line-height: 1.2;
}

.text-red { color: var(--red) !important; }

/* Единый стиль для всех заголовков секций */
h2, .section-title, .main-section-title {
  color: var(--black) !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  font-size: 2.5rem; /* Можно подправить под свой вкус */
  line-height: 1.2;
  margin-bottom: 20px;
}

/* Принудительно делаем span внутри них черным, 
   кроме случаев, когда ты сам добавил класс .text-red */
h2 span:not(.text-red), 
.section-title span:not(.text-red), 
.main-section-title span:not(.text-red) {
  color: inherit !important;
} 


/* ГЛОБАЛЬНЫЙ СТИЛЬ ДЛЯ ПОДЗАГОЛОВКОВ (С КВАДРАТОМ) */
.left-subtitle, 
.center-subtitle {
  display: inline-block !important;
  font-size: 14px !important;
  color: var(--red) !important;
  font-weight: 700 !important; /* Устанавливаем единую жирность */
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  position: relative !important;
  padding-left: 25px !important;
  margin-bottom: 15px !important; /* Единый отступ до заголовка */
}

/* Общий квадрат для всех подзаголовков */
.left-subtitle::before, 
.center-subtitle::before {
  content: "" !important;
  width: 12px !important;
  height: 12px !important;
  background-color: var(--red) !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/*================ Единый стиль ЛГОТИП для всех страниц=================== */
.navbar-brand {
    color: var(--white) !important;
    text-transform: uppercase;
    font-weight: 900 !important; /* Максимальная жирность */
    font-size: 1.8rem !important;
    letter-spacing: -1px; /* Немного плотности для стиля */
}

/* Если внутри логотипа есть красный текст (например, SERWIS) */
.navbar-brand .text-red {
    color: var(--red) !important;
}


/* ================================================================================================================================= */
/* ЄДИНИЙ ФУНДАМЕНТ ДЛЯ ВСІХ ШАПОК САЙТУ (ЗАМІНА) */

/* 1. Колір для навігації та всіх верхніх секцій */
.navbar, 
.bg-dark-custom, 
.page-header, 
.inner-banner, 
.hero-static,
.header-overlay,
.header-over {
    background-color: #1A1A1A !important; /* Ваш фірмовий антрацит */
}

/* 2. Відступи, щоб текст не ховався під меню та не "злипався" */
.page-header, 
.inner-banner, 
.hero-static, 
.header-overlay, 
.header-over {
    margin-top: 0 !important;
    padding-top: 110px !important; 
    padding-bottom: 70px !important;
}

/*================= Глобальные Отступы для всех секций Сайта ===============*/
/* Умеренный отступ для всех секций */
.section-padding {
  display: block !important; /* Убеждаемся, что секция - это блок */
  padding-top: 66px !important;    /* Этого достаточно, чтобы "отлепить" заголовок */
  padding-bottom: 80px !important;
  background-color: var(--white);
  position: relative;
}

/* ==========================================================================
   3. ШАПКА САЙТУ (УНІВЕРСАЛЬНА)
   ========================================================================== */
header.fixed-top {
  display: flex !important;
  flex-direction: column !important;
  background-color: var(--black) !important;
  padding: 0 !important;
  z-index: 9999 !important;
}

.navbar {
  padding: 5px 0 !important;
  background-color: var(--black) !important;
  min-height: 80px !important; /* Жесткая высота исключает дерганье */
  display: flex !important;
  align-items: center !important;
}
/* ССЫЛКИ МЕНЮ — теперь без лишних приставок */
.nav-link {
    color: var(--white); /* БЕЗ !important — це прибере миготіння */
    text-transform: uppercase;
    font-weight: 700 !important;
    font-size: 1rem; /* Базовий розмір для ПК */
    transition: color 0.3s ease;
    white-space: nowrap !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Стан при наведенні та активна сторінка — завжди червоні */
.nav-link:hover, 
.nav-link.active { 
    color: var(--red) !important; 
}

/* Кнопка-гамбургер (Универсальная) */
.navbar-toggler {
  border: 1px solid rgba(192, 1, 19, 0.6) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Иконки гамбургера (полоски и крестик) */
.navbar-toggler.collapsed .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23C00113' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23C00113' stroke-width='2' stroke-linecap='round' d='M6 6l18 18M6 24L24 6'/%3E%3C/svg%3E") !important;
}

/* ==========================================================================
   4. ГОЛОВНИЙ ЕКРАН (HERO)
   ========================================================================== */
.hero-static {
    position: relative;
    height: 100vh !important; /* Фото на весь екран ПК */
    min-height: 600px !important;
    background: #1A1A1A url('../img/auto-mechanic2.webp') center center / cover no-repeat;
    display: flex !important;
    align-items: center;
    padding-top: 100px; /* Відступ під меню ПК */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.10); /* Трохи затемнив для кращого читання тексту */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    width: 100%; /* Гарантуємо, що контент не стискається */
}

/* ГАРАНТІЯ ВИДИМОСТІ КОНТЕНТУ НА ПК */
.hero-content h1,
.hero-content p, 
.hero-content .cl-btn-primary, 
.hero-content .cl-btn-glass,
.hero-content .btn-wrapper { 
    display: block !important; 
    visibility: visible !important;
    opacity: 1 !important;
}

/* Якщо кнопки в одному рядку */
.hero-content .btn-wrapper {
    display: flex !important;
    gap: 15px;
    margin-top: 25px;
}
/* ==========================================================================
   5. КНОПКИ
   ========================================================================== */

.cl-btn-primary, .cl-btn-glass {
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transform: translateZ(0) !important;
    transition: color 0.4s ease !important;
    white-space: nowrap !important; /* Щоб номер телефону не розривався */
}

/* ВІДСТУП ДЛЯ ІКОНКИ */
.cl-btn-primary i, .cl-btn-glass i {
    margin-right: 12px !important;
    font-size: 1.1rem !important;
}

/* --- ЛОГІКА ШТОРОК --- */
.cl-btn-primary::before, .cl-btn-primary::after,
.cl-btn-glass::before, .cl-btn-glass::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    width: 100% !important;
    z-index: -1 !important;
}

/* Перша шторка (напівпрозора) */
.cl-btn-primary::before, .cl-btn-glass::before {
    top: -130%; 
    height: 130%; 
    transition: top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important; 
}

/* Друга шторка (основна градієнтна) */
.cl-btn-primary::after, .cl-btn-glass::after {
    top: -105%;
    height: 105%;
    transition: top 0.5s cubic-bezier(0.19, 1, 0.22, 1) 0.12s !important; 
}

/* --- ТИП 1: PRIMARY (Червона кнопка - для контенту) --- */
.cl-btn-primary {
    background-color: #C00113 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 16px 28px !important; 
}
.cl-btn-primary::before { background: rgba(0, 0, 0, 0.4) !important; }
.cl-btn-primary::after { background: linear-gradient(180deg, #2a2a2a 0%, #1A1A1A 100%) !important; }

/* --- ТИП 2: GLASS (Контурна кнопка - наприклад, для карток послуг) --- */
.cl-btn-glass {
    background-color: transparent !important;
    color: #C00113 !important;
    border: 2px solid #C00113 !important;
    padding: 14px 26px !important; 
}
.cl-btn-glass::before { background: rgba(192, 1, 19, 0.35) !important; }
.cl-btn-glass::after { background: linear-gradient(180deg, #e60116 0%, #C00113 100%) !important; }

/* --- СПЕЦІАЛЬНИЙ МОДИФІКАТОР: HEADER MODE (Для меню) --- ^^^ */
/* Використовуйте <a class="cl-btn-primary header-mode"> */
.cl-btn-primary.header-mode {
    background-color: var(--red) !important;
    color: var(--white) !important;
    padding: 10px 20px !important;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.cl-btn-primary.header-mode:hover {
    background-color: var(--red-hover) !important;
    transform: translateY(-2px);
}

.cl-btn-primary.header-mode i {
    margin-right: 8px !important;    /* Менший відступ іконки в хедері */
    font-size: 1rem !important;
}

/* --- ЕФЕКТ ПРИ НАВЕДЕННІ (ХОВЕР) --- */
.cl-btn-primary:hover::before, .cl-btn-glass:hover::before,
.cl-btn-primary:hover::after, .cl-btn-glass:hover::after {
    top: 0 !important;
}

.cl-btn-primary:hover, .cl-btn-glass:hover {
    color: #FFFFFF !important;
}

/* Стилі для ПК за замовчуванням */
.top-bar { background-color: var(--black); }

/* ================================================================================================================================= */
/* ФИНАЛЬНОЕ УТОЧНЕНИЕ: КНОПКИ В HERO ВСЕГДА КОМПАКТНЫЕ И СЛЕВА */

.hero-content .cl-btn-primary, 
.hero-content .cl-btn-glass {
    /* Эти свойства перекроют групповой "display: block" */
    display: inline-flex !important; 
    width: fit-content !important;   /* Кнопка сжимается по тексту */
    min-width: auto !important;       /* Отменяем 250px */
    
    /* Выравнивание */
    margin-left: 0 !important;       
    margin-right: auto !important;
    
    /* Дополнительно: чтобы кнопка не прилипала к тексту сверху */
    margin-top: 20px !important;
}

/* Если кнопки обернуты в контейнер, выравниваем и его */
.hero-content .btn-wrapper {
    display: flex !important;
    justify-content: flex-start !important;
    width: 100%;
}

/* ================================================================================================================================= */
/* НАЛАШТУВАННЯ ТЕЛЕФОНУ В ШАПЦІ (БЕЗ КНОПКИ) ^^^ */
/* ================================================================================================================================= */
/* СТИЛІ ТЕЛЕФОНУ У ВЕРХНІЙ ПАНЕЛІ (НАД ЛОГОТИПОМ) */

.header-phone-simple a {
    color: #ffffff !important; 
    font-weight: 700;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem; /* Трохи зменшив для верхньої панелі */
    transition: var(--transition);
}

.header-phone-simple i {
    color: #c00113; /* Ваш фірмовий червоний --red */
}

.header-phone-simple a:hover {
    color: #c00113 !important; /* Напис стає червоним при наведенні */
}

/* ================================================================================================================================= */
/* ТЕМНА КНОПКА "НАГОРУ" (ОПТИМІЗОВАНО) */


.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #333;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    text-decoration: none;
}

/* Малюємо стрілку за допомогою border */
.back-to-top::after {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #FFFFFF;
    border-left: 3px solid #FFFFFF;
    transform: rotate(45deg); /* Повертаємо квадрат, щоб вийшла стрілка вгору */
    margin-top: 5px;
}

.back-to-top:hover {
    background-color: #C00113;
    transform: translateY(-5px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}
/* ================================================================================================================================= */
/* ФІКС ДИЗАЙНУ КАРТОК - ПОВЕРНЕННЯ ДО ОРИГІНАЛУ */

.service-card {
    position: relative !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 20px !important;
    border: 1px solid #eeeeee !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Робить всі картки однієї висоти в ряду */
    overflow: hidden !important; 
}

/* Ефект підйому */
.service-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Червона лінія, що розширюється */
.service-card::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 0 !important;
    height: 3px !important;
    background-color: #c00113 !important;
    transition: width 0.4s ease !important;
    transform: translateX(-50%) !important;
    z-index: 10 !important;
}

.service-card:hover::after {
    width: 100% !important;
}

/* ФОТО: Більше не розповзається на весь екран */
.service-card img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
}

/* ТЕКСТ: Центрування та відступи */
.service-card h4 {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
}

.service-card p {
    flex-grow: 1 !important; /* Штовхає кнопку вниз */
    color: #6c757d !important;
}

/* КНОПКА: Ваша нова система зі шторками всередині картки */
.service-card .cl-btn-glass {
    width: 180px !important;
    margin: 0 auto 10px auto !important;
}
/* ========================================================================== 
   CENNIK
   ========================================================================== */

/* Сама карточка */
.pricing-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 6px !important;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

/* Эффект при наведении */
.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Черная шапка карточки */
.pricing-header {
    background-color: #1A1A1A !important;
    padding: 15px 10px !important;
    text-align: center;
}

.pricing-header h4 {
    color: #ffffff !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Тело карточки с услугами */
.pricing-body {
    padding: 30px 20px;
    flex-grow: 1;
}

.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Измените на flex-start */
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    text-align: left; /* Явное выравнивание текста влево */
  }

/* Красный квадратный маркер перед текстом */
.pricing-list li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #c00113; /* Твой фирменный красный */
    margin-right: 12px;
    flex-shrink: 0;
}

/* Цена все равно уйдет вправо, если она есть */
.pricing-list li span {
    margin-left: auto; 
    font-weight: 700;
    color: #1a1a1a;
    padding-left: 15px; /* Отступ от текста до цены */
}

.pricing-list li:last-child {
    border-bottom: none;
}

/* Футер карточки с кнопкой */
.pricing-footer {
    padding: 10px 15px 25px !important;
    text-align: center;
}


/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .pricing-header {
        padding: 25px 15px !important;
    }
    .pricing-header h4 {
        font-size: 1.4rem !important;
    }
}

/* ========================================================================== 
   СТИЛИ ДЛЯ СЛАЙДЕРА ОТЗЫВОВ (БЕЗ ОБРЕЗАННЫХ ТЕНЕЙ)
   ========================================================================== */

#seoReviewCarousel .carousel-inner {
    overflow: hidden !important; 
    padding-bottom: 15px !important; 
    padding-top: 10px !important;
    padding-left: 10px !important; 
    padding-right: 0 !important;
    margin-left: -10px !important; 
}

.review-seo-card-small {
    background: #ffffff !important;
    padding: 25px !important;
    border-radius: 6px !important;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    margin: 5px !important;
    min-height: 260px !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Золотые звезды */
.stars-gold {
    color: #c00113 !important; 
    font-size: 1.9rem !important;
    letter-spacing: 3px !important;
    margin-bottom: 10px;
    display: block;
}

/* Текст и автор */
.review-quote-small {
    font-style: italic;
    color: #444 !important;
    line-height: 1.7;
    margin: 15px 0 !important;
    flex-grow: 1 !important;
}

.review-author-small {
    font-weight: 700 !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

/* Також важливо зафіксувати висоту самої каруселі */
#seoReviewCarousel {
    min-height: 260px !important;
    margin-bottom: 40px !important; /* Увеличили отступ, чтобы кнопка не липла к слайдеру */
}

/* ========================================================================== 
   ЦЕНТРИРОВАНИЕ КНОПКИ ПОД ОТЗЫВАМИ
   ========================================================================== */

.reviews-btn-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 20px !important;
}

/* Настройка размера конкретно для этой кнопки */
.reviews-btn-wrapper .cl-btn-primary {
    min-width: 250px !important;
}

/* ================================================================================================================================= */
/* СЕКЦІЯ: ЧОМУ ОБИРАЮТЬ НАС (FEATURE ITEMS) — ВІДНОВЛЕННЯ ДИЗАЙНУ */

/* ========================================================================== 
   ЕФЕКТ ШТОРКИ ДЛЯ ПЕРЕВАГ (КЛАС FEATURE-ITEM) 
   ========================================================================== */

.feature-item {
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
    background: #ffffff !important; /* Світло-сірий фон [cite: 2026-02-02] */
    border-left: 3px solid #c00113 !important; /* Червона лінія зліва [cite: 2026-02-02] */
    padding: 15px 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 65px !important;
    transition: color 0.4s ease !important;
    cursor: pointer !important;
    margin-bottom: 15px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    /* Додаємо базову тінь */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

/* Шторка, що виїжджає зліва направо */
.feature-item::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important; 
    width: 100% !important;
    height: 100% !important;
    background-color: #c00113 !important; /* Фірмовий червоний [cite: 2026-02-02] */
    z-index: -1 !important;
    transition: left 0.4s ease !important;
}

/* Колір тексту стає білим, коли заїжджає шторка */
.feature-item:hover {
    color: #ffffff !important; 
}

/* Анімація руху шторки */
.feature-item:hover::before {
    left: 0 !important;
}

/* ==========================================================================
   6. СТОРІНКИ
   ========================================================================== */

.page-o-nas .header-overlay {
  position: relative;
  /* Додаємо #1A1A1A перед URL — це вирішує проблему з сірим фоном */
  background: #1A1A1A url('../img/serwis.webp') center center / cover no-repeat;
  min-height: 400px;
  display: flex;
  align-items: center;
  color: #FFFFFF; /* Використовуємо чистий білий для надійності */
}

.page-o-nas .header-overlay::before {
  content: ""; 
  position: absolute; 
  top: 0; left: 0; width: 100%; height: 100%;
  /* Збільшуємо щільність до 0.7, щоб фон був ще глибшим і чорнішим */
  background: rgba(0, 0, 0, 0.1); 
  z-index: 1;
}
/* ВИПРАВЛЕННЯ: Виносимо текст поверх фільтра */
.page-o-nas .header-overlay .container {
  position: relative;
  z-index: 2; /* Текст стає на шар 2, над фільтром */
}

.page-o-nas .header-overlay h1 {
    font-weight: 900;
    text-transform: uppercase;
    color: var(--white) !important;
}

/* СТИЛІЗАЦІЯ ХЛІБНИХ КРИХТ (Breadcrumbs) */
.breadcrumb-item a {
    color: #3d3d3d !important; 
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: #8b0000 !important;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6a6a6a !important; /* Поточна сторінка світло-сіра */
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #3d3d3d;
}

/* 1. Знаходимо контейнер, у якому лежить фото */
.page-o-nas .about-img-block {
    position: relative;
    border-radius: 6px !important; /* Бажаний радіус */
    overflow: hidden !important;    /* ЦЕ ГОЛОВНЕ: воно обрізає кути фото */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Додаємо тінь */
}

/* 2. Налаштовуємо саму картинку всередині */
.page-o-nas .about-img-block img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

/* 3. Ефект при наведенні (фото збільшується всередині рамок) */
.page-o-nas .about-img-block:hover img {
    transform: scale(1.05);
}

/* ============ Стр. KONTAKT (Шапка и Каркас) =======================*/

/* ================================================================================================================================= */
/* ВИПРАВЛЕННЯ ДЛЯ СТОРІНКИ КОНТАКТІВ */

.page-kontakt .header-over {
  position: relative !important;
  /* Додаємо антрацитовий колір #1A1A1A прямо перед URL */
  background: #1A1A1A url('../img/car_service21.webp') center center / cover no-repeat !important;
  min-height: 400px !important;
  display: flex !important;
  align-items: center !important;
  color: #FFFFFF !important;
}

/* Додаємо темний фільтр, щоб на сторінці контактів теж був чорний відтінок */
.page-kontakt .header-over::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.1); /* Затемнення 60% */
  z-index: 1;
}

/* Піднімаємо текст над фільтром */
.page-kontakt .header-over .container {
  position: relative;
  z-index: 2;
}

/* Контейнер, который держит инфо-блок и форму рядом */
.contact-container {
    display: flex !important;
    flex-wrap: wrap !important; /* Позволяет форме упасть вниз на мобилках */
    gap: 30px !important;       /* Расстояние между контактами и формой */
    align-items: flex-start !important;
}

/* Колонки: левая (инфо) и правая (форма) */
.contact-info {
    width: 350px !important; /* Фіксуємо ширину інфо-блоку */
}

.contact-form-container {
    flex: 1 !important;      /* Тільки форма розтягується на весь залишок місця */
    min-width: 320px !important; 
}

/* Заголовок внутри секции */
.contact-title {
    margin-bottom: 40px !important;
    font-size: 2rem !important;
    font-weight: 900 !important;
}

/* ================================================================================================================================= */
/* ОКРЕМІ СТИЛІ ДЛЯ ПОСИЛАНЬ У КОНТАКТАХ (НА БІЛОМУ ФОНІ) */

.contact-item .contact-link {
    color: #1A1A1A !important; /* Робимо темним тільки тут */
    font-weight: 500;
}

.contact-item .contact-link:hover {
    color: #C00113 !important; /* Ваш червоний при наведенні */
    padding-left: 8px !important;
}
/* ================================================================================================================================= */
/*  КОНТАКТНАЯ ФОРМА 
/* ================================================================================================================================= */

/* Иконки в красных квадратах */
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.icon-box {
    width: 45px;
    height: 45px;
    background-color: #c00113 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.icon-box i {
    color: #ffffff !important;
    font-size: 18px;
}

.info-text strong {
    display: block;
    font-size: 13px;
    color: #1A1A1A !important;
    text-transform: uppercase;
    margin-bottom: 2px;
    font-weight: 900;
}

.info-text span {
    color: #444444 !important;
    display: block;
}

/* Поля ввода */
.contact-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;
}

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

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
    background: #fcfcfc;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: #C00113 !important; /* Робимо рамку червоною при кліку */
    box-shadow: none !important;       /* ПОВНІСТЮ ВИДАЛЯЄМО БЛАКИТНЕ СЯЙВО */
    outline: 0 !important;
    background: #ffffff;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .contact-form .form-row { flex-direction: column; gap: 0; }
}

/* ================================================================================================================================= */
/* УСТРАНЕНИЕ ЗАЗОРА МЕЖДУ КАРТОЙ И ФУТЕРОМ */
/* ================================================================================================================================= */

.map-no-gap {
    line-height: 0 !important; /* Убирает микро-зазор снизу iframe */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.map-no-gap iframe {
    display: block !important; /* Делает iframe блочным элементом */
    margin-bottom: 0 !important;
}


/* ================================================================ */
/* СТИЛІ ФУТЕРА (ПІСЛЯ ОНОВЛЕННЯ) */

.footer-main {
    background-color: var(--black) !important; /* Чорний фон #1a1a1a */
    color: var(--white);
    padding: 80px 0 30px;
    margin-top: 0 !important; /* Убирает внешний отступ футера сверху */
    border-top: none !important;
}

.footer-description {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Логотип */
/* Полная жирность логотипа в футере */
.footer-logo {
    display: inline-block !important;
    font-size: 24px !important;
    text-transform: uppercase !important;
    margin-bottom: 15px !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

/* Прицельно задаем жирность 900 для всех внутренних элементов */
.footer-logo, 
.footer-logo span, 
.footer-logo .logo-white, 
.footer-logo .logo-red {
    font-weight: 900 !important; /* Ультимативная жирность */
}

/* Возвращаем цвета */
.logo-white { color: var(--white) !important; }
.logo-red { color: var(--red) !important; }

/* Заголовки */
.footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--white);
    text-transform: uppercase;
}

/* Списки та посилання (прибираємо крапки) */
.footer-links, .footer-contact-info {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li, .footer-contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: #cccccc;
}

.footer-links a, .contact-link {
    color: #cccccc !important;
    text-decoration: none !important;
    display: inline-block; /* ДОДАЙТЕ ЦЕ, щоб зміщення (padding) працювало коректно */
    transition: var(--transition);
}

.footer-links a:hover, .contact-link:hover {
    color: var(--red) !important;
    padding-left: 8px !important; /* ЦЕ додає ефект руху вправо */
}

.footer-contact-info i {
    color: var(--red);
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* СОЦМЕРЕЖІ: ПОСТІЙНО КВАДРАТНІ */
.footer-socials a {
    display: inline-flex !important;
    width: 40px !important;
    height: 40px !important;
    background: #333 !important; /* Темно-сірий фон за замовчуванням */
    color: var(--white) !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 10px !important;
    text-decoration: none !important;
    
    /* СУВОРИЙ КВАДРАТ — ЗАВЖДИ */
    border-radius: 0 !important; 
    
    transition: all 0.3s ease !important;
}

.footer-socials a:hover {
    background: var(--red) !important; /* Червоний при наведенні */
    color: var(--white) !important;
    border-radius: 0 !important; /* Залишається квадратом */
    transform: translateY(-3px);
}

/* Нижня панель */
.footer-bottom {
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #888;
}


/* Телефони (до 768px) */
/* ================================================================================================================================= 
   7. АДАПТИВНІСТЬ ДЛЯ МОБІЛЬНИХ (ДО 768px)
   ================================================================================================================================= */

@media (max-width: 768px) {
  
  /* Збільшуємо відступ зверху, щоб контент не ховався під подвійною шапкою */
  .section-padding { 
    padding-top: 30px !important; 
    padding-bottom: 40px !important; 
  }
  
  /* Зменшуємо заголовки для мобілок */
  h2, .section-title, .main-section-title { 
    font-size: 1.8rem !important; 
    margin-bottom: 25px !important; 
  }
  
  .hero-content h1 { font-size: 2.2rem !important; }
  
  /* Кнопки на всю ширину */
  .cl-btn-primary, .cl-btn-glass, .btn-price, .btn-send { 
    width: 100% !important; 
    margin-left: 0 !important; 
    margin-bottom: 10px !important; 
  }

  /* ВЕРХНЯ ПАНЕЛЬ: Мінімальна висота та вирівнювання ліворуч */
  .top-bar {
    background-color: var(--black) !important;
    padding: 6px 0 !important; /* Робимо блок тонким (висота зменшена) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
  }

  /* Вирівнюємо вміст контейнера у верхній панелі по лівому краю */
  .top-bar .container {
    justify-content: flex-start !important;
    display: flex !important;
  }

  /* МОБІЛЬНЕ МЕНЮ: Вирівнювання ліворуч */
  .navbar-collapse .navbar-nav {
    text-align: left !important;
    align-items: flex-start !important;
    padding-left: 20px !important;
    padding-top: 15px;
    padding-bottom: 15px;
  }
  
  .navbar-nav .nav-item {
    width: 100%;
  }

  /* Зменшуємо логотип трохи, щоб все виглядало гармонійно */
  .logo-img {
    max-height: 40px;
  }

  .hero-static {
    height: 100vh !important;
    min-height: 600px !important;
    display: flex !important;
    align-items: center;
    padding-top: 100px;
    background-size: cover !important;
}

    .hero-content h1 {
        font-size: 2.1rem !important;
        line-height: 1.2;
        margin-bottom: 0 !important; /* Прибираємо зайвий відступ знизу */
    }

    /* ПРИХОВУЄМО ОПИС ТА КНОПКИ НА МОБІЛЬНИХ */
   .hero-content p, 
.hero-content .cl-btn-primary, 
.hero-content .cl-btn-glass,
.hero-content .btn-wrapper { 
    display: flex !important; /* Повертаємо видимість на ПК */
}
/* ================================================================================================================================= */
/* МОБИЛЬНОЕ МЕНЮ: ВЫРАВНИВАНИЕ ПО ЛЕВОМУ КРАЮ И СКРЫТИЕ КНОПКИ */

@media (max-width: 991px) {
    /* 1. Выравниваем пункты меню по левому краю (вместо центра) */
    .navbar-collapse .navbar-nav {
        text-align: left !important;
        align-items: flex-start !important;
        padding-left: 15px;
        padding-top: 20px;
    }

    .navbar-collapse .nav-item {
        width: 100%; /* Чтобы вся строка была кликабельна */
    }

    /* 2. Скрываем дублирующую красную кнопку телефона внутри выпадающего меню */
    .navbar-collapse .cl-btn-primary.header-mode {
        display: none !important;
    }

    /* 1. Вирівнюємо ТЕЛЕФОН по лівій стороні */
    .top-bar .container {
        justify-content: flex-start !important;
        display: flex !important;
        padding-left: 15px;
    }

    /* 2. Вирівнюємо МЕНЮ по лівій стороні (згідно з вашими стрілками) */
    .navbar-collapse .navbar-nav {
        text-align: left !important;
        align-items: flex-start !important;
        padding-left: 15px !important;
        padding-top: 10px;
    }

    /* 3. Ховаємо дублюючу кнопку телефону в самому меню, щоб не захаращувати екран */
    .navbar-nav .nav-item .cl-btn-primary.header-mode {
        display: none !important;
    }

    .navbar.border-top.border-secondary {
        border-top: none !important;
        border-bottom: none !important;
        border: 0 !important;
    }

    .nav-link { 
        font-size: 1.1rem !important; 
        padding: 10px 0 !important; 
        /* На мобільних скидаємо відступи, щоб меню вирівнялося по лівому краю */
    }

    /* Якщо ви хочете повністю вимкнути дію змінної прозорості */
    .border-secondary {
        --bs-border-opacity: 0 !important;
    }

    /* 2. Головний екран (Hero) на мобільних */
    .hero-static {
        height: auto !important;
        min-height: 450px !important; /* Оптимальна висота, щоб фото не різало */
        padding-top: 150px !important; /* Місце під подвійну шапку */
        padding-bottom: 60px !important;
        background-attachment: scroll !important;
    }
    
    /* Ховаємо опис та кнопки ТІЛЬКИ на мобілках */
    .hero-content p, 
    .hero-content .cl-btn-primary, 
    .hero-content .cl-btn-glass,
    .hero-content .btn-wrapper { 
        display: none !important; 
    }

   .hero-content h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    /* 3. Відступи секцій на мобілках */
    .section-padding { 
        padding-top: 30px !important; 
     }
}

/* Щоб "STRONA GŁÓWNA" не розривалася на вузьких моніторах */
@media (min-width: 992px) and (max-width: 1200px) {
    .nav-link {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 0.85rem !important;
    }
}

