/* Основные стили для страницы "Контакты" */
.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Сетка контактов */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.contact-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.contact-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(74, 111, 165, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* Карточка информации */
.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.info-card.sticky-top {
    top: 90px;
    z-index: 2;
}

.info-item {
    padding: 0.75rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(74, 111, 165, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Секции */
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #4a6fa5;
    display: inline-block;
}

/* Аккордеон FAQ */
.accordion-button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px !important;
    font-weight: 600;
    color: #2c3e50;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: #4a6fa5;
    color: white;
    border-color: #4a6fa5;
    box-shadow: none;
}

.accordion-button:focus {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 0.25rem rgba(74, 111, 165, 0.25);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232c3e50'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-item {
    background: none;
}

.accordion-body {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 1.25rem;
    color: #495057;
    line-height: 1.6;
}

/* Горизонтальная прокрутка - ОБНОВЛЕНО */
.horizontal-scroll-wrapper {
    position: relative;
    overflow: hidden;
    padding: 10px 0 20px;
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 10px 5px 20px;
    scrollbar-width: thin;
    scrollbar-color: #4a6fa5 #f1f1f1;
    -webkit-overflow-scrolling: touch;
    align-items: stretch; /* Выравнивание по высоте */
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #4a6fa5, #166088);
    border-radius: 10px;
}

.scroll-item {
    flex: 0 0 auto;
    width: 280px;
    display: flex; /* Добавлено для выравнивания */
    flex-direction: column; /* Добавлено для выравнивания */
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex; /* Изменено на flex */
    flex-direction: column; /* Добавлено для выравнивания */
    height: 100%; /* Добавлено для выравнивания */
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    display: flex; /* Добавлено для выравнивания */
    flex-direction: column; /* Добавлено для выравнивания */
    flex: 1; /* Добавлено для выравнивания */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    flex-shrink: 0; /* Предотвращает сжатие изображения */
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.25rem;
    flex: 1; /* Добавлено для выравнивания */
    display: flex; /* Добавлено для выравнивания */
    flex-direction: column; /* Добавлено для выравнивания */
}

.card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Выравнивание контента внутри карточки для постов */
.card-text {
    flex: 1; /* Растягивает текст для заполнения пространства */
    margin-bottom: 1rem;
}

/* Для картин: цена должна быть внизу */
.horizontal-scroll-container .card-body > .mt-3:last-child {
    margin-top: auto; /* Прижимает цену к низу */
}

/* Специфичные стили для постов */
.horizontal-scroll-wrapper .scroll-item .card-img-top[style*="height:150px"] {
    height: 150px !important; /* Переопределение инлайнового стиля */
}

/* Адаптивность */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-icon-large {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .scroll-item {
        width: 240px;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .horizontal-scroll-container {
        gap: 15px;
        padding: 10px 5px 15px;
    }
    
    .info-card {
        position: static !important;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .scroll-item {
        width: 220px;
    }
    
    .card-img-top {
        height: 160px;
    }
    
    .contact-card .card-body,
    .info-card .card-body {
        padding: 1.25rem;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Дополнительные исправления для sticky элемента */
@media (min-width: 992px) {
    .info-card.sticky-top {
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }
}