/* Общие стили страницы */
body {
  font-family: Verdana, Geneva, Kalimati, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}


header {
    background-color: #ffffff;
    text-align: center;
}

/* Сообщения об ошибках и успехе */
.error {
    color: red;
    text-align: center;
    font-weight: bold;
}
.success {
    color: green;
    text-align: center;
    font-weight: bold;
}

/* Контейнер для содержимого страницы */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
	background-color: #f2f2f2;
}

h1 {
  font-size: 26px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #222; /* тёмно-серый, мягче чем чёрный */
}

/* Контейнер для списка саун (карточек) */
.sauna-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;            /* Расстояние между карточками */
    justify-content: center;
    padding: 30px;
    box-sizing: border-box; /* Чтобы паддинги учитывались в общей ширине */
    line-height: 9px;
    font-size: 14px;
}

/* Карточка сауны (превью) */
.sauna-item {
    width: 300px;                     /* Фиксированная ширина карточки */
    background-color: #fff;           /* Белый фон */
    border-radius: 12px;               /* Скруглённые углы */
    overflow: hidden;                 /* Скрывать всё, что выходит за границы */
    border: 1px solid #bfbfbf;           /* Тонкая рамка */
    box-shadow: 0 4px 4px rgba(0,0,0,0.1); /* Лёгкая тень */
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.sauna-item:hover {
    transform: translateY(-2px);
}

/* Превью-изображение (фото) */
.sauna-item img.thumbnail {
    width: calc(100% - 20px);
    height: 180px;
    object-fit: cover;
    margin: 10px 10px 0 10px; /* сверху 20px, по бокам 15px */
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}



/* Контейнер для текстового контента внутри карточки */
.sauna-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    font-size: 13px;
    line-height: 0.3;
}

hr {
  border: none;         /* Убираем стандартную рамку */
  height: 1px;          /* Толщина линии */
  background-color: #ccc; /* Цвет линии */
  margin: 5px 0;       /* Отступы сверху и снизу */
}

/* Заголовок карточки (название сауны) */
.sauna-content h2 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #333;
    line-height: 20px;
    word-break: normal;
    min-height: 40px;
}

.tel {
    font-size: 16px;
    margin: 0 0 10px;
    color: #333;
    line-height: 20px;
    word-break: normal;
    font-weight: 700;

    background-color: #f0f0f0;
    background-image: url('/tel-icon.png');
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 24px 24px;

    display: inline-block;
    /* старый padding:15px; заменяем, чтобы был больший отступ слева под иконку */
    padding: 15px 15px 15px 40px;
    border-radius: 50px;
}

/* Краткое описание */
.sauna-desc {
    color: #555;
    line-height: 1.4;
}

.sauna-desc1 {
    line-height: 17px;

}

/* Адрес сауны */
.sauna-address {
    margin: 0 0 15px;
    color: #777;
    font-size: 14px;
}

/* Кнопка «Подробнее» */
.details-btn {
    margin-top: auto;
    display: inline-block;
    padding: 12px 12px;
    background-color: #ff6600;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
	box-shadow: 0 3px 10px -4px #959595
}

.details-btn:hover {
    background-color: #e65500;
}

/* Стили модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.text-block {
line-height: 1.6;
}

.text-block h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #222;/* акцентный цвет */
  font-weight: 700;
}

.text-block h3 {
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 10px;
  color: #222;
  font-weight: 600;
}

.text-block p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #555;
}

/* ========== Навигация (адаптивная) ========== */
nav {
    background-color: #333;
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Логотип слева, ссылки справа */
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 15px;
}

/* Логотип */
.logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* Контейнер ссылок */
.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: #fbfbfb;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
}

.nav-links a:hover {
    background-color: #ff6600;
    transform: scale(1.1);
}

/* Адаптивность навигации */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .nav-links {
        flex-direction: column;
    }
}

/* ========== Футер ========== */
footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    width: 100%;
    margin-top: 30px; /* Отступ сверху */
}

footer p {
    margin: 0;
}

footer a {
    color: #ff6600;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

.metro-link {
    color: #000;
    text-decoration: none;   
    transition: color 0.2s;
    line-height: 14px;
}

.metro-link:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* Общая обёртка меню */
.category-nav {
    background-color: #fff; /* или другой цвет */
}

/* Список верхнего уровня */
.category-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 15px 0;
    justify-content: center;
    gap: 15px;
    background-size: cover;
	background-color: #f6f6f6;
	box-shadow: 0 3px 15px -4px #959595;
}




/* Каждый пункт меню */
.category-item {
    position: relative; /* нужно для позиционирования выпадающего меню */
}

/* Ссылки-кнопки (как "формочки") */
/* Ссылки-кнопки (как "чипсы") */
.category-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background-color: #f9f9f9;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

/* Иконка стрелочки, если нужна */
.arrow-icon {
    transition: transform 0.3s;
}

/* Hover-эффект для кнопки */
.category-button:hover {
    background-color: #ff6600;
    color: #fff;
    border-color: #ff6600;
}

/* Когда родитель .dropdown в состоянии active, можно крутить стрелку */
.dropdown.active .arrow-icon {
    transform: rotate(180deg);
}

/* Выпадающее меню */
.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 5px); /* немного ниже кнопки */
    left: 0;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    z-index: 999;
    border-radius: 8px;
}

/* Отображаем при .active у родителя */
.dropdown.active .dropdown-content {
    display: block;
}

/* Пункты выпадающего списка */
.dropdown-content li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap; /* чтобы не ломало текст по строкам */
}

.dropdown-content li a:hover {
    background-color: #f1f1f1;
}

/* Медиазапрос для экранов до 768px */
@media (max-width: 768px) {
    /* Навигация */
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .nav-links a {
        padding: 12px 20px;
        font-size: 18px;
    }

    /* Фильтр-бар */
    .filter-bar,
    .filter-bar-horizontal {
        padding: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    .filter-group,
    .filter-group-horizontal {
        margin: 8px 0;
        font-size: 16px;
    }
    
    /* Контейнер для саун */
    .sauna-list {
        padding: 25px;
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .sauna-item {
        width: 95%;
        max-width: 400px;
    }
    
    .sauna-content h2 {
        font-size: 20px;
    }
    
    .details-btn {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    /* Меню категорий */
    .category-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 50px; /* Фиксированная высота для всех кнопок */
        padding: 10px 18px;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    .dropdown-content {
        min-width: 180px;
    }
    
    .dropdown-content li a {
        padding: 10px 15px;
        font-size: 16px;
    }
}


/* Медиазапрос для экранов до 480px */
@media (max-width: 480px) {
    header {
        padding: 0px;
    }
    
    .nav-links a {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .sauna-list {
        padding: 15px;
        gap: 15px;
		line-height: 20px;
    }
    
    .sauna-item {
        width: 98%;
        max-width: none;
    }
    
    .sauna-content h2 {
        font-size: 18px;
    }
    
    .details-btn {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .category-button {
        padding: 8px 14px;
        font-size: 15px;
    }
    
    .dropdown-content li a {
        padding: 8px 12px;
        font-size: 15px;
    }
}

.pagination {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 20px 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination li a {
    display: block;
    padding: 8px 12px;
    background-color: #f4f4f4;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.pagination li a:hover {
    background-color: #ddd;
}

.pagination li.active a {
    background-color: #333;
    color: #fff;
    border-color: #333;
}


    /* Контейнер для формы регистрации */
.reg-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Заголовок страницы регистрации */
.reg-title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
}

/* Сообщение об ошибке регистрации */
.reg-error {
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Группа элементов формы */
.reg-form-group {
    margin-bottom: 15px;
}

/* Метки для полей */
.reg-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Поля ввода */
.reg-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Кнопка отправки */
.reg-submit {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reg-submit:hover {
    background-color: #45a049;
}

/* Ссылка для входа */
.reg-link {
    text-align: center;
    margin-top: 20px;
}

.reg-link a {
    color: #4CAF50;
    text-decoration: none;
}

.reg-link a:hover {
    text-decoration: underline;
}

/* Для кнопки "Добавить сауну" */
.nav-links a[href="/register.php"]::before {
    content: "\f067"; /* Unicode для иконки plus */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}

/* Для кнопки "Войти" */
.nav-links a[href="/login.php"]::before {
    content: "\f2f6"; /* Unicode для иконки sign-in-alt */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}

/* Для кнопки "Личный кабинет" */
.nav-links a[href="/dashboard.php"]::before {
    content: "\f007"; /* Unicode для иконки user */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}

/* Для кнопки "Выход" */
.nav-links a[href="/logout.php"]::before {
    content: "\f2f5"; /* Unicode для иконки sign-out-alt */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
}


/* Стили для формы поиска (общие) */
.search-input-wrapper {
    position: relative;
    display: inline-block;
}

.search-input-wrapper input[type="text"] {
    width: 260px;
    padding: 6px 40px 6px 10px; /* Отступ справа для кнопки с иконкой */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    outline: none;
}

.search-input-wrapper input[type="text"]:focus {
    background-color: #f5f5f5;
}

.search-input-wrapper button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 18px; /* Размер эмодзи */
    line-height: 1;
    color: #333;
}

.search-input-wrapper button:hover {
    color: #555;
}

/* Мобильная версия: переупорядочиваем элементы в навигации */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    /* Задаём порядок: логотип (order:1), навигационные ссылки (order:2), форма поиска (order:3) */
    .nav-container a.logo {
        order: 1;
    }
    .nav-container .nav-links {
        order: 2;
    }
    .nav-container form.search-form {
        order: 3;
        margin-top: 10px; /* Отступ сверху, чтобы отделить от навигационных ссылок */
    }
    
    /* При необходимости подогнать размеры формы поиска */
    .search-input-wrapper {
        width: 100%;
        max-width: 300px;
    }
    .search-input-wrapper input[type="text"] {
        width: 100%;
    }
}








