/*
* Автошкола "Дорога Успеха" - Основные стили
* Автор: Дорога Успеха
* Версия: 1.0
*/

/* Общие стили */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    color: #212529;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    opacity: 0.85;
}

img {
    max-width: 100%;
    height: auto;
}

/* Кнопки */
.btn {
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Хедер и навигация */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.nav-link.active {
    font-weight: 700;
}

/* Заголовки и тексты */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 800;
}

.lead {
    font-weight: 400;
    font-size: 1.15rem;
}

/* Разделы страницы */
section {
    position: relative;
}

.page-header {
    padding-top: 6rem;
    padding-bottom: 3rem;
}

/* Иконки преимуществ и контактов */
.feature-icon, .contact-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* Обертка для иконок с линией */
.feature-icon-wrapper {
    position: relative;
}

.feature-line {
    position: absolute;
    height: 2px;
    width: 50px;
    background: var(--primary-color);
    top: 35px;
    left: 70px;
    opacity: 0.5;
}

/* Разделитель для заголовков секций */
.divider-custom {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

/* Карточки */
.card {
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border-radius: 8px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Специальные карточки (курсы, отзывы) */
.course-card, .testimonial-card {
    transition: all 0.4s ease;
    overflow: hidden;
}

.course-card:hover, .testimonial-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Кастомные скругления */
.rounded-custom {
    border-radius: 16px;
}

.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-bottom-end-3 {
    border-bottom-right-radius: 0.5rem !important;
}

.rounded-bottom-start-3 {
    border-bottom-left-radius: 0.5rem !important;
}

/* Эффекты для изображений */
.transform-hover {
    transition: transform 0.5s ease;
}

.transform-hover:hover {
    transform: scale(1.03);
}

/* Команда инструкторов */
.team-card .team-img-container {
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

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

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

.social-links {
    bottom: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.team-card:hover .social-links {
    opacity: 1;
}

.social-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    transition: background-color var(--transition-speed) ease;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.social-link:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Большие социальные иконки */
.social-links-large .social-link-lg {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Процесс обучения */
.process-step {
    position: relative;
}

.process-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Опыт */
.experience-badge {
    bottom: -20px;
    right: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
}

/* Отзывы */
.rating {
    font-size: 1rem;
}

/* Аккордеон (FAQ) */
.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Форма обратной связи */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Карта */
.map-container {
    overflow: hidden;
    padding-bottom: 50%;
    position: relative;
    height: 0;
}

.map-container iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

/* Футер */
footer {
    background-color: var(--dark-color);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Cookie согласие */
.cookie-consent {
    display: none;
    z-index: 1050;
}

/* Z-index слоёв для кастомных элементов */
.z-index-0 {
    z-index: 0;
}

.z-index-1 {
    z-index: 1;
}

.z-index-2 {
    z-index: 2;
}

/* Анимация для элементов домашней страницы */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Адаптивные стили */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .page-header {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }
    
    .map-container {
        padding-bottom: 70%;
    }
    
    /* Перестраиваем плавающие элементы на планшетах */
    .position-absolute.bg-white.p-3.rounded-custom.shadow-lg {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin-top: 15px;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .experience-badge {
        right: 50%;
        transform: translateX(50%);
    }
    
    .process-step {
        text-align: center;
    }
    
    .process-number {
        margin: 0 auto;
    }
    
    .map-container {
        padding-bottom: 80%;
    }
    
    /* Мобильные улучшения */
    .feature-line {
        display: none; /* Скрываем линии на мобильных */
    }
    
    .feature-icon-wrapper {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand svg {
        width: 30px;
        height: 30px;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .map-container {
        padding-bottom: 100%;
    }
    
    /* Упрощаем карточки на мобильных */
    .course-card .bg-light, 
    .testimonial-card .rating {
        font-size: 0.875rem;
    }
    
    /* Центрируем кнопки на мобильных */
    .d-flex.flex-wrap.gap-3.mb-4 {
        justify-content: center;
    }
    
    /* Уменьшаем лишние отступы */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}
