/* ==== Базові налаштування ==== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
    overflow: hidden; /* Забороняємо прокрутку всієї сторінки */
}

/* ==== Головний контейнер ==== */
.page-container {
    display: flex;
    height: 100vh; /* На весь екран */
    width: 100%;
}

/* ==== Сайдбар (Ліва панель) ==== */
.sidebar {
    width: 390px; /* Фіксована ширина */
    flex-shrink: 0;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1000;
}

/* ==== Хедер сайдбару та Логотип ==== */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: center; /* Центруємо вміст (логотип) */
    align-items: center;
    min-height: 80px; /* Збільшена висота для гарного вигляду лого */
}

/* Контейнер для лого */
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Власне зображення логотипу */
.site-logo {
    max-height: 80px;  /* Максимальна висота (лого буде великим) */
    max-width: 320px;  /* Обмеження ширини, щоб не вилізло за межі */
    width: auto;       /* Зберігаємо пропорції */
    height: auto;
    display: block;
    object-fit: contain;
}

/* ==== Пошук ==== */
.filter-bar {
    padding: 15px 20px 5px 20px;
}

.search-input {
    width: 100%;
    box-sizing: border-box; /* Щоб padding не збільшував ширину */
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.search-input:focus {
    background-color: #fff;
    border-color: #4285F4; /* Google Blue */
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* Заголовок результатів (лічильник) */
.results-header {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #777;
    border-bottom: 1px solid #f0f0f0;
}

/* ==== Список карток ==== */
.results-list {
    flex-grow: 1; /* Займає весь вільний простір */
    overflow-y: auto; /* Скрол тільки тут */
    padding: 20px;
    background-color: #f9f9f9;
}

/* Кастомний скролбар */
.results-list::-webkit-scrollbar {
    width: 8px;
}
.results-list::-webkit-scrollbar-track {
    background: transparent;
}
.results-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* ==== Картка Кафе ==== */
.cafe-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.cafe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: transparent;
}

/* Контент картки */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Відстань між назвою і кнопкою */
}

/* Назва кафе */
.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #202124;
    line-height: 1.3;
}

/* Кнопка Google Maps */
.card-google-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4285F4; /* Google Blue */
    color: white;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.card-google-link:hover {
    background-color: #3367D6; /* Темніший синій */
}

.card-google-link::before {
    content: '📍';
    margin-right: 8px;
    font-size: 1.1em;
}

/* ==== Карта (Права частина) ==== */
.map-container {
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

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

/* Адаптивність для мобільних */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column-reverse; /* Карта зверху, список знизу */
    }

    .sidebar {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-top: 1px solid #ccc;
    }

    .map-container {
        height: 50vh;
    }
}