/* Контейнер, який ми додали в base.html.twig */
.lang-switcher-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
    height: 100%;
}

/* Стандартний список плагіна (у нього клас без дефісу) */
ul.langswitcher {
    display: flex !important; /* Примусово в рядок */
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 5px; /* Відстань між словами */
    align-items: center;
}

/* Елементи списку */
ul.langswitcher li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Посилання (самі слова) */
ul.langswitcher a {
    text-decoration: none !important;
    font-size: 10px !important; /* Дуже компактний шрифт */
    font-weight: bold;
    color: #888 !important;
    padding: 2px 4px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 3px;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1;
    white-space: nowrap; /* Забороняємо перенос слів */
}

/* Активна мова */
ul.langswitcher a.active {
    background: #5755d9;
    color: white !important;
    border-color: #5755d9;
}

/* При наведенні */
ul.langswitcher a:hover {
    color: #5755d9 !important;
    border-color: #5755d9;
}

/* Hero Banner */
.hero-section {
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 400px;
}
.hero-overlay {
    background: rgba(0, 0, 0, 0.4); /* Затемнення картинки */
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
}

/* Filter Buttons */
.filter-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.filter-btn {
    padding: 10px 20px;
    border-radius: 50px;
    background: #f0f2f5;
    color: #3b4351;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active {
    background: #5755d9;
    color: white;
    text-decoration: none;
}

/* Car Card */
.car-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.car-card .card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}
.car-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.no-photo {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.car-badges {
    position: absolute;
    bottom: 10px;
    left: 10px;
}
.car-badges .badge {
    background: rgba(0,0,0,0.7);
    color: white;
    margin-right: 5px;
}
.price-highlight {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2ecc71;
}

/* Feature Icons */
.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* --- РОБИМО САЙТ ШИРШИМ --- */

/* Збільшуємо максимальну ширину контейнера */
.grid-lg .container, 
.container {
    max-width: 1280px !important; /* Стандартна ширина була вужчою */
    padding-left: 20px;   /* Відступи від країв екрану на мобільних */
    padding-right: 20px;
}

/* Якщо екран дуже великий (FullHD+), можна ще ширше */
@media (min-width: 1400px) {
    .grid-lg .container, 
    .container {
        max-width: 1380px !important;
    }
}

/* Стилі для галереї */
.thumbnails-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.thumb-link img {
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.thumb-link:hover img {
    border-color: #5755d9; /* Синя рамка при наведенні */
    opacity: 0.8;
}

/* Красива табличка цін */
.prices-box.panel {
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.no-photo-box {
    background: #f0f0f0;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
}

/* --- КАРТКА АВТО: ХАРАКТЕРИСТИКИ --- */
/* --- КАРТКА АВТО: ХАРАКТЕРИСТИКИ (Версія: Квадратики) --- */
.specs-grid {
    display: grid;
    /* Робимо рівно 3 стовпчики однакової ширини */
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px; /* Відступи між квадратиками */
    margin-top: 15px;
    margin-bottom: 20px;
}

.spec-item {
    background: #f8f9fa;
    border: 1px solid #eef0f3;
    border-radius: 8px; /* Більш округлі кути */
    
    /* ЦЕ ВАЖЛИВО: Робимо блок квадратним */
    aspect-ratio: 1 / 1; 
    
    /* Центруємо іконку і текст */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    text-align: center;
    color: #555;
    transition: all 0.2s ease;
    padding: 5px; /* Щоб текст не лип до країв */
}

.spec-item:hover {
    border-color: #5755d9;
    background: #fff;
    transform: translateY(-3px); /* Легкий підйом при наведенні */
    box-shadow: 0 5px 15px rgba(87, 85, 217, 0.15);
    color: #5755d9;
}

.spec-icon {
    font-size: 1.6rem; /* Збільшимо іконки, бо в квадраті більше місця */
    margin-bottom: 8px;
    color: #5755d9;
}

.spec-text {
    font-size: 0.75rem; /* Трохи менший текст, щоб вліз у квадрат */
    font-weight: 600;
    line-height: 1.2;
}

/* На мобільному можна зробити 3 в ряд, вони будуть меншими, але квадратами */
/* Або якщо хочеш по 2 в ряд на дуже вузьких екранах - розкоментуй це: */
/*
@media (max-width: 400px) {
    .specs-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}
*/

/* --- Sticky Sidebar (залишаємо) --- */
@media (min-width: 840px) {
    .column.col-5 {
        position: sticky;
        top: 20px;
        align-self: flex-start;
        height: auto;
    }
}

/* --- FAQ BLOCK (ПИТАННЯ-ВІДПОВІДЬ) --- */

.faq-item {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item[open] {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-color: #5755d9;
}

.faq-question {
    padding: 15px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* Прибираємо стандартний трикутник */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #3b4351;
}

/* Прибираємо стандартний маркер у Safari/Chrome */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background-color: #f9f9f9;
    color: #5755d9;
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: #666;
    line-height: 1.6;
    border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
    border-top-color: #f0f2f5;
    padding-top: 15px; /* Додаємо відступ зверху, коли відкрито */
}

/* Анімація стрілочки */
.faq-icon {
    transition: transform 0.3s ease;
    color: #ccc;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    color: #5755d9;
}