/* style.css */


/* Горизонтальный скролл */
.scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    width: 100%;
    box-sizing: border-box;
}

.scroll-row::-webkit-scrollbar {
    height: 6px;
}
.scroll-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Карточки (основные стили) */
.hotel-card {
    width: 100%;
    max-width: 250px;   /* ограничение для ПК */
    height: 350px;      /* фиксированная высота */
    flex-shrink: 0;
    background: #fff;
    border-radius: 24px;   /* закругленные углы */
    overflow: hidden;      /* чтобы фото не выпирало */
    display: flex;
    flex-direction: column;
}

.hotel-card .card-title {
    white-space: nowrap;      /* текст в одну строку */
    overflow: hidden;         /* обрезаем, если не влезает */
    text-overflow: ellipsis;  /* добавляем "..." в конце */
    display: block;           /* чтобы работало правильно */
}

.hotel-card img {
    height: 180px;      /* фиксированная высота картинки */
    object-fit: cover;  /* чтобы не растягивалось */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.hotel-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    padding: 0.5rem;
}

/* Уменьшаем отступы и делаем текст плотнее */
.hotel-card .card-body h5,
.hotel-card .card-body p,
.hotel-card .card-body .hotel-price {
    margin: 2px 0;       /* уменьшенный отступ сверху и снизу */
    line-height: 1.2;    /* делаем строки плотнее */
}

/* Ссылки */
.hotel-link {
    display: block;
    color: inherit;
    text-decoration: none;
    flex: 0 0 auto;
    transition: transform 0.2s ease-in-out;
}
.hotel-link:hover {
    transform: translateY(-3px);
}

/* Планшеты */
@media (min-width: 768px) {
    .hotel-card {
        max-width: 250px;
        height: 280px;
    }
}

/* ПК */
@media (min-width: 1200px) {
    .hotel-card {
        max-width: 300px;
        min-width: 300px;
        height: 280px;
    }

    .container-fluid {
    padding-left: 2rem;    /* отступ слева */
    padding-right: 2rem;   /* отступ справа */
    max-width: 1200px;     /* ограничиваем ширину контента */
    margin: 0 auto;        /* центрируем блок на экране */
    }
}


/* 📱 Мобильная версия — всё крупнее */
@media (max-width: 767px) {
    .hotel-card {
        max-width: 180px;   /* почти на всю ширину экрана */
        min-width: 180px;
        height: 180px;    /* делаем выше */
        border-radius: 24px;
    }

    .hotel-card img {
        height: 120px;    /* картинка крупнее */
    }

    .hotel-card .card-title {
        font-size: 0.6rem; /* заголовок крупнее */
        margin: 1px 0;
    }

    .hotel-card .card-text {
        font-size: 0.8rem;    /* текст чуть больше */
        margin: 1px 0;
    }

    .hotel-price {
        font-size: 0.6rem;
        margin: 1px 0;
    }

        /* Здесь переопределяем все элементы для плотного текста */
    .hotel-card .card-body h5,
    .hotel-card .card-body p,
    .hotel-card .card-body .hotel-price {
        margin: 1px 0;    /* ещё меньше отступы на мобильных */
        line-height: 1.2; /* плотнее */
    }

    h2 {
        font-size: 1.25rem;  /* заголовок раздела больше */
    }


    /* правила для мобильного меню */
    nav.navbar, footer {
        display: none !important; /* прячем старые */
    }


}
#mobile-nav {
  display: none; /* скрыта по умолчанию */
  position: fixed;
  bottom: 0rem;
  left: 0;
  height: 80px;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  justify-content: space-around;
  padding: 0rem 0;
  z-index: 1000;
}

#mobile-nav .nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* убираем старый padding */
    height: 100%;
    margin: 0 4px; /* расстояние между кнопками */
    border-radius: 16px;
    text-decoration: none;
    color: #555;
    font-size: 24px; /* размер иконки */
    background: #fff;
    transition: color 0.3s ease;
}

#mobile-nav .nav-item.active {
    background: none;
    color: #2563eb;
    box-shadow: none;
}
.mobile-nav {
    display: flex;
    justify-content: space-around;
    flex: 1;
}

.nav-item {
    flex: 1;
    display: flex;
    justify-content: center;  /* центрируем иконку */
    align-items: center;
    padding: 8px 0;           /* вертикальный padding */
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
}

.nav-item .material-icons {
    font-size: 32px;
    transform: translateY(-10px);
}

/* Убираем текст */
.nav-item .label {
    display: none;
}

.nav-item.active {
    background: #222;
    color: white;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.2),
                -4px -4px 8px rgba(255,255,255,0.8);
}


/* Быстрыый поиск*/

#hotelSearch {
    border-radius: 12px;
    border: 1px solid #ccc;
    padding: 6px 7px;
    width: 100%;
    max-width: 400px;
    transition: all 0.3s;
}

#hotelSearch:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0,123,255,0.3);
}


.amenity-item.selected {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
    transform: scale(1.05);
}

/* раскрытие контейнера */
#amenitiesContainer {
    max-height: 4.5rem;
    overflow: hidden;
    transition: max-height 0.3s;
}

#amenitiesContainer.expanded {
    max-height: none;
}