:root {
    --primary-color: #2A9D8F;
    --primary-dark: #1A7A6F;
    --primary-light: #4FC3A8;
    --secondary-color: #3A86FF;
    --secondary-dark: #2667CC;
    --light-bg: #F8F9FA;
    --dark-text: #2C3E50;
    --light-text: #7F8C8D;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --info-color: #3498DB;
    --soft-blue: #E3F2FD;
    --soft-green: #E8F5E9;
    --soft-purple: #F3E5F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: #ffffff;
    padding-top: 70px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Навигация */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    padding: 0.8rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand i {
    color: var(--secondary-color);
}

.nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 0.3rem;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Кнопки */
.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(58, 134, 255, 0.3);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.2);
}

/* Hero секция */
.hero-section {
    background: linear-gradient(135deg, var(--soft-blue), var(--soft-green));
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-content {
    padding-right: 2rem;
}

.hero-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-5px);
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Секции */
section {
    padding: 5rem 0;
    position: relative;
    scroll-margin-top: 80px;
}

.section-title {
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Карточки */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 100%;
    background: white;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.card-body {
    padding: 1.0rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Бейджи языков */
.language-badge {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0.2rem;
}

/* Секция преимуществ */
.benefits-section {
    background: linear-gradient(135deg, var(--soft-green), white);
}

.benefits-section .card-body i {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Секция репетиторов */
.tutors-section {
    background: linear-gradient(135deg, var(--soft-blue), white);
}

/* Таблицы */
.table {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    padding: 1.2rem;
    font-weight: 600;
    font-size: 1rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(42, 157, 143, 0.05);
    transform: scale(1.01);
}

/* Пагинация */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid rgba(42, 157, 143, 0.3);
    margin: 0 5px;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
}

/* Уведомления */
#notification-area {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}

.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Формы */
.form-control, .form-select {
    border: 1px solid rgba(42, 157, 143, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(42, 157, 143, 0.25);
    transform: translateY(-2px);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Футер */
footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 3rem;
}

footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: underline;
    transform: translateX(5px);
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Карта */
#map-container {
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-color);
}

/* Спиннер загрузки */
.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Инициалы преподавателей */
.teacher-initials-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Курсы на карточках */
.course-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card .card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.course-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card .card-text {
    flex-grow: 1;
    min-height: 100px;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Отступы для мобильных устройств */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    html {
        scroll-padding-top: 60px;
    }
    
    section {
        padding: 3rem 0;
        scroll-margin-top: 60px;
    }
    
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .hero-image img {
        height: 300px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    #notification-area {
        max-width: 300px;
        right: 10px;
        top: 70px;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    #map-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    footer {
        padding: 2rem 0 1rem;
    }
    
    #map-container {
        height: 350px;
    }
    
    .hero-image img {
        height: 250px;
    }
}

/* Улучшение внешнего вида карточек курсов */
.course-card .card-header {
    background: linear-gradient(135deg, var(--soft-blue), white);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.course-card .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* Стили для кнопок в таблице */
.btn-group-sm > .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Стили для формы */
.input-group-text {
    background: linear-gradient(135deg, var(--soft-blue), white);
    border: 1px solid rgba(42, 157, 143, 0.3);
    color: var(--primary-dark);
}

/* Ховер эффекты для ссылок */
a {
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Стили для декоративных элементов */
.decorative-line {
    height: 4px;
    width: 60px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 1rem auto;
}

/* Стили для карты */
#map-container {
    height: 600px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary-color);
    position: relative;
}

/* Стили для фильтров */
#filter-buttons .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

#filter-buttons .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

#filter-buttons .filter-btn:hover:not(.active) {
    background-color: rgba(42, 157, 143, 0.1);
    transform: translateY(-2px);
}

/* Баллуны на карте */
.balloon-content {
    padding: 15px;
    max-width: 300px;
}

.balloon-title {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.balloon-info {
    margin-bottom: 10px;
}

.balloon-label {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.balloon-value {
    font-size: 0.9rem;
    color: var(--dark-text);
    margin-bottom: 5px;
}

.balloon-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 10px;
    margin-top: 5px;
}

/* Иконки для фильтров */
.filter-btn i {
    font-size: 0.9rem;
}

/* Стили для поиска */
#map-search {
    border-radius: 10px 0 0 10px;
}

#search-btn {
    border-radius: 0 10px 10px 0;
}

/* Стили для списка популярных мест */
.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Стили для маркеров на карте */
.placemark-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Разные цвета для разных типов мест */
.education-marker {
    background: linear-gradient(135deg, #3498DB, #2980B9);
}

.library-marker {
    background: linear-gradient(135deg, #27AE60, #229954);
}

.culture-marker {
    background: linear-gradient(135deg, #F39C12, #D68910);
}

.cafe-marker {
    background: linear-gradient(135deg, #9B59B6, #8E44AD);
}

/* Информационное окно при клике на маркер */
.custom-balloon {
    background: white;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.custom-balloon-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 15px;
    font-weight: 600;
}

.custom-balloon-body {
    padding: 15px;
}

@media (max-width: 768px) {
    #map-container {
        height: 450px;
    }
    
    #filter-buttons {
        gap: 5px;
    }
    
    #filter-buttons .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    #map-container {
        height: 350px;
    }
    
    .balloon-content {
        max-width: 250px;
    }
}
/* Дополнительные стили для карты */
.hover-effect {
    transition: all 0.3s ease;
}

.hover-effect:hover {
    background-color: rgba(42, 157, 143, 0.05);
}

/* Стили для сообщений */
.no-results-message {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Анимация для меток */
@keyframes markerPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse-marker {
    animation: markerPulse 2s infinite;
}

/* Стили для карты на мобильных */
@media (max-width: 576px) {
    .balloon-content {
        max-width: 200px;
    }
    
    .balloon-title {
        font-size: 1rem;
    }
    
    .balloon-value {
        font-size: 0.8rem;
    }
}
/* Стили для кнопок фильтров */
.filter-btn[data-type="all"] {
    background-color: #2C3E50;
    color: white;
    border: none;
}

.filter-btn[data-type="education"] {
    background-color: transparent;
    color: #white;
    border: 2px solid #3498DB;
}

.filter-btn[data-type="education"].active {
    background-color: #3498DB;
    color: white;
    border: none;
}

.filter-btn[data-type="library"] {
    background-color: transparent;
    color: #white;
    border: 2px solid #27AE60;
}

.filter-btn[data-type="library"].active {
    background-color: #27AE60;
    color: white;
    border: none;
}

.filter-btn[data-type="culture"] {
    background-color: transparent;
    color: #white;
    border: 2px solid #F39C12;
}

.filter-btn[data-type="culture"].active {
    background-color: #F39C12;
    color: white;
    border: none;
}

.filter-btn[data-type="cafe"] {
    background-color: transparent;
    color: #white;
    border: 2px solid #9B59B6;
}

.filter-btn[data-type="cafe"].active {
    background-color: #9B59B6;
    color: white;
    border: none;
}

.filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}
