/* Стили только для главной страницы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

.home-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Убираем возможные отступы */
    margin: 0;
    padding: 0;
}

/* Хедер главной страницы (60px) */
.home-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    flex-shrink: 0; /* Запрещаем сжатие */
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-logo {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

/* Основной контент - занимает все доступное пространство */
.home-main {
    flex: 1 0 auto; /* Растягивается, но не сжимается */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* Убедимся, что нет лишних отступов */
    margin: 0;
}

.search-section {
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Убираем старые стили для логотипа, если они не используются */
.search-form {
    width: 100%;
}

.search-box {
    width: 100%;
    max-width: 584px;
    height: 52px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin: 0 auto;
    transition: box-shadow 0.2s;
    background: white;
}

.search-box:hover,
.search-box:focus-within {
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
}

.search-icon {
    color: #9aa0a6;
    margin-right: 12px;
    font-size: 14px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    height: 100%;
    background: transparent;
}

.search-button {
    background: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    padding: 0 16px;
    height: 36px;
    font-size: 14px;
    margin-left: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.search-button:hover {
    border: 1px solid #dadce0;
}

/* Футер главной страницы (47px) */
.home-footer {
    height: 47px;
    background: #f2f2f2;
    border-top: 1px solid #dadce0;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Запрещаем сжатие */
}

.footer-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 14px;
    color: #70757a;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: #70757a;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .home-header {
        padding: 0 15px;
    }

    .home-main {
        padding: 15px;
    }

    .home-footer {
        height: auto;
        padding: 10px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .home-nav {
        gap: 10px;
    }

    .nav-btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    .search-box {
        height: 46px;
        padding: 0 12px;
    }

    .home-main {
        padding: 10px;
    }
}

/* Гарантируем, что на главной странице не будет вертикальной прокрутки */
@media (min-height: 600px) {
    .home-page {
        height: 100vh;
        overflow: hidden;
    }
}

/* Стили для подсказок поиска на главной странице */
.home-page .search-suggestions {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 584px;
    background: white;
    border: 1px solid #dfe1e5;
    border-top: none;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 6px rgba(32,33,36,0.28);
    z-index: 1000;
    display: none;
    margin-top: -1px;
}

.home-page .search-form {
    position: relative;
}

.home-page .suggest-header {
    padding: 8px 16px;
    font-size: 14px;
    color: #70757a;
    border-bottom: 1px solid #e8e9eb;
    background: #f8f9fa;
}

.home-page .suggestion-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 16px;
    color: #3c4043;
    transition: background-color 0.2s;
}

.home-page .suggestion-item:hover,
.home-page .suggestion-item.selected {
    background-color: #f8f9fa;
}

.home-page .suggestion-item i {
    margin-right: 12px;
    color: #9aa0a6;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.home-page .suggestion-item mark {
    background-color: #feffcd;
    color: #1a1a1a;
    font-weight: 500;
}

.home-page .search-box.suggestions-visible {
    border-radius: 24px 24px 0 0;
    border-bottom: none;
    z-index: 1001;
}

/* Адаптивность для главной страницы */
@media (max-width: 768px) {
    .home-page .search-suggestions {
        max-width: calc(100% - 30px);
    }
}

@media (max-width: 480px) {
    .home-page .search-suggestions {
        max-width: calc(100% - 20px);
    }

    .home-page .suggestion-item {
        padding: 10px 12px;
        font-size: 14px;
    }
}