/* Основные стили */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #ddd6fe;
    --text-color: #2d3436;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(108, 92, 231, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

/* Навигация */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(45, 52, 54, 0.95) !important;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    margin-right: 8px;
    color: var(--accent-color);
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Главный экран */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.search-container .input-group {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.search-container .btn {
    border: none;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.search-container .btn:hover {
    background: #e84393;
    transform: translateY(-2px);
}

/* Секция заведений */
.venues-section {
    padding-top: 2rem;
}

.map-container {
    position: relative;
    height: 600px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
}

.map {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.map-controls .btn {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(108, 92, 231, 0.2);
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.map-controls .btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Список заведений */
.venues-list {
    height: 600px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.venues-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--light-color), rgba(255, 255, 255, 0.8));
}

.venues-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.venues-header .badge {
    background: var(--accent-color) !important;
}

.filter-controls .form-select {
    border: 1px solid var(--light-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.venues-cards {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.venue-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 15px rgba(108, 92, 231, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.venue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.2);
    border-color: var(--primary-color);
}

.venue-card-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: var(--light-color);
    position: relative;
}

.venue-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}

.venue-card-body {
    padding: 1.25rem;
}

.venue-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.venue-card-address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.venue-card-address i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.venue-card-price {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* Мини-галерея изображений в карточке заведения */
.venue-card-gallery {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.venue-card-thumb {
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 2px solid #f1f1f1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

/* О нас */
.about-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.footer h5 {
    color: var(--primary-color);
}

.footer i {
    color: var(--accent-color);
}

/* Модальное окно */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-title {
    font-weight: 700;
}

.btn-close {
    filter: invert(1);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .map-container,
    .venues-list {
        height: 400px;
        margin-bottom: 2rem;
    }
    
    .venues-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .search-container .form-control {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
    
    .search-container .btn {
        padding: 0.875rem 1.5rem;
    }
}

/* Кастомные скроллбары */
.venues-cards::-webkit-scrollbar {
    width: 6px;
}

.venues-cards::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.venues-cards::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.venues-cards::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Состояния загрузки */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Карта и поиск */
.main-map-section {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #f8f9fa;
    min-height: 60vh;
    overflow: hidden;
}
#mainMap {
    width: 100vw;
    height: 65vh;
    min-height: 400px;
    background: #eaeaea;
    border-bottom: 1px solid #ddd;
}
#openSearchBtn {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.6em;
    box-shadow: 0 4px 16px rgba(108,92,231,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    z-index: 1050;
    transition: background 0.2s;
    padding: 0;
}
#openSearchBtn:hover {
    background: var(--accent-color);
}
#searchPanel {
    position: absolute;
    min-width: 340px;
    max-width: 95vw;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    top: 100px;
    left: 50%;
    transform: translate(-50%, 20px); /* чуть ниже и прозрачнее при скрытии */
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4,0,0.2,1), transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
#searchPanel.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0); /* плавно поднимается вверх */
}
.search-panel-blur {
    opacity: 0.6 !important;
    pointer-events: none;
    transition: opacity 0.3s;
}
@media (max-width: 768px) {
    #mainMap { height: 45vh; min-height: 220px; }
    #searchPanel { min-width: 90vw; padding: 1.2em 0.7em; top: 70px; left: 50%; transform: translate(-50%, 0); z-index: 1040; }
    #openSearchBtn {
        width: 44px;
        height: 44px;
        font-size: 1.2em;
        top: 60px;
        left: 50%;
        bottom: unset;
        transform: translateX(-50%);
        z-index: 1050;
    }
}
@media (max-width: 480px) {
    #openSearchBtn {
        top: 52px;
        left: 50%;
        bottom: unset;
        transform: translateX(-50%);
        z-index: 1050;
    }
    #searchPanel { top: 50px; left: 50%; transform: translate(-50%, 0); z-index: 1040; }
}

