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

/* Пропуск к основному контенту (доступность) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 10001;
    padding: 12px 20px;
    background: #b91c1c;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Фокус для клавиатурной навигации */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
}

html, body {
    height: 100%;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fafafa;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.wrapper {
    width: 100%;
    min-height: 100vh;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: #fff;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    display: inline-block;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: opacity 0.2s;
}
.header-title:hover {
    opacity: 0.9;
}
.header-title:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 12px;
}
.header-nav__link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.header-nav__link:hover {
    text-decoration: underline;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-auth__link {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.header-auth__link:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(15,23,42,0.15);
}
.header-auth__link--accent {
    background: #ffffff;
    color: #b91c1c;
    border-color: transparent;
}
.header-auth__link--accent:hover {
    background: #fef2f2;
    color: #991b1b;
}

.header-profile {
    position: relative;
}
.header-profile__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(15,23,42,0.15);
    color: #e5e7eb;
    cursor: pointer;
    font-size: 14px;
}
.header-profile__btn .material-symbols-outlined {
    font-size: 20px;
}
.header-profile__btn:hover {
    background: rgba(15,23,42,0.25);
}
.header-profile__label {
    max-width: 120px;
    white-space: nowrap;
}
.header-profile__menu {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 180px;
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.25);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.17s ease, transform 0.17s ease, visibility 0.17s ease;
    z-index: 50;
}
.header-profile__menu-item {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    text-decoration: none;
    color: #111827;
}
.header-profile__menu-item:hover {
    background: #f3f4f6;
}
.header-profile:hover .header-profile__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: #fff;
    display: none;
}

.menu-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    gap: 20px;
}
.menu-inner a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.menu-inner a:hover {
    text-decoration: underline;
}
.menu-inner .material-symbols-outlined {
    font-size: 20px;
}

.main {
    flex: 1;
    display: block;
}

.content {
    background: #fafafa;
}

.content-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

/* Страницы контента (Контакты, и т.д.) */
.page-content {
    max-width: 720px;
    margin: 0 auto;
}
.page-content__title {
    font-size: 1.75rem;
    margin: 0 0 12px;
    color: #111827;
}
.page-content__lead {
    font-size: 1.1rem;
    color: #4b5563;
    margin: 0 0 28px;
    line-height: 1.6;
}
.page-content__block {
    margin-bottom: 28px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}
.page-content__block:first-of-type {
    border-top: none;
    padding-top: 0;
}
.page-content__block h2 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    color: #111827;
}
.page-content__block p,
.page-content__block ul {
    margin: 0 0 8px;
    color: #374151;
    line-height: 1.6;
}
.page-content__block ul {
    padding-left: 1.25rem;
}
.page-content__block a {
    color: #b91c1c;
    text-decoration: none;
}
.page-content__block a:hover {
    text-decoration: underline;
}
.page-content__body--article {
    line-height: 1.7;
    color: #374151;
}
.page-content__body--article p {
    margin: 0 0 1em;
}

.footer {
    background: #212121;
    color: #fff;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 24px;
}
.footer__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px 32px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__col-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
}
.footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer__links li { margin: 0 0 6px; }
.footer__links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer__links a:hover { color: #fff; }
.footer__bottom {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.footer__bottom a { color: rgba(255,255,255,0.85); }
@media (max-width: 600px) {
    .footer__columns { grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
}

@media (max-width: 768px) {
    .header-actions {
        display: none;
    }
}

/* ===== ГЛАВНАЯ / HERO-БЛОК (на всю ширину, объединён с шапкой) ===== */
.home-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -24px;
    margin-bottom: 24px;
    padding: 28px 24px 32px;
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
    color: #fef2f2;
}

.home-hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.home-hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.home-hero-subtitle {
    font-size: 0.95rem;
    color: #e5e7eb;
    opacity: 0.9;
    margin-bottom: 16px;
}

.home-hero .search-form {
    margin: 0;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.26);
}

.home-hero .search-form .form-group {
    background: #f9fafb;
}

.home-hero .search-form .search-btn {
    border-radius: 999px;
}

.home-hero .search-form .form-group:first-child input {
    font-weight: 500;
}
.home-hero-cta-secondary {
    margin: 16px 0 0;
}
.home-hero-cta-secondary__link {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    transition: border-color .2s, opacity .2s;
}
.home-hero-cta-secondary__link:hover {
    border-color: #fff;
    opacity: 1;
}
.home-hero-cta-secondary__link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .wrapper {
        width: 100%;
        margin: 0;
	}

    .content-inner {
        width: 100%;
        padding: 16px;
    }

    .home-hero {
        width: 100%;
        margin-left: 0;
        margin: 0 0 16px;
        padding: 28px 16px 20px;
    }

    .home-hero .search-form {
        flex-direction: column;
        border-radius: 16px;
        padding: 14px 12px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
    }

    /* Отступ под фиксированное меню */
    .main::after {
        content: '';
        display: block;
        height: 100px;
	}
	
    /* Нижнее плавающее меню */
    .menu {
        position: fixed;
        bottom: 20px;
        left: 16px;
        right: 16px;
        width: auto;
        background: #991b1b;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        border-radius: 40px;
        gap: 0;
	}
	
    .menu a {
        margin: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 11px;
        padding: 4px 0;
        border: none;
        gap: 2px;
        color: #fff;
        text-decoration: none;
	}
	
    .menu .material-symbols-outlined {
        font-size: 24px;
	}
}

/* ===== ПАНЕЛЬ КАТАЛОГА (НАЙДЕНО + СОРТИРОВКА) ===== */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 20px;
    padding: 12px 0;
}
.catalog-toolbar__count {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}
.catalog-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 8px;
}
.catalog-toolbar__sort-label {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}
.catalog-toolbar__sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    min-width: 180px;
}
.catalog-toolbar__sort-select:focus {
    outline: none;
    border-color: #b91c1c;
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.15);
}
@media (max-width: 600px) {
    .catalog-toolbar { flex-direction: column; align-items: flex-start; }
    .catalog-toolbar__sort-select { min-width: 100%; }
}

/* Панель поиска на странице каталога */
.catalog-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.search-form--catalog {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    min-width: 0;
}
.catalog-search-bar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.catalog-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.catalog-filters-btn:hover {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}
.catalog-filters-btn .material-symbols-outlined { font-size: 20px; }
@media (max-width: 768px) {
    .catalog-search-bar { flex-direction: column; align-items: stretch; }
    .search-form--catalog { flex: none; }
}

/* ===== КАТАЛОГ ОБЪЕКТОВ (стиль Booking.com) ===== */
.catalog-empty {
    text-align: center;
    padding: 48px 24px;
    margin: 24px 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}
.catalog-empty__icon { margin: 0 0 16px; }
.catalog-empty__title { font-size: 1.25rem; margin: 0 0 8px; color: #111827; }
.catalog-empty__text { color: #6b7280; margin: 0 0 20px; line-height: 1.5; max-width: 400px; margin-left: auto; margin-right: auto; }
.catalog-empty__link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; background: #b91c1c; color: #fff; text-decoration: none; border-radius: 10px; font-weight: 600;
}
.catalog-empty__link:hover { background: #991b1b; }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
@media (min-width: 900px) {
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
}
.catalog-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.catalog-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: #b91c1c;
}
.catalog-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.catalog-card__image-wrap {
    position: relative;
    aspect-ratio: 16/10;
    background: #e5e7eb;
    overflow: hidden;
}
.catalog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.catalog-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
}
.catalog-card__image-placeholder .material-symbols-outlined { font-size: 48px; }
/* Бейдж рейтинга на фото: подпись + число (как на Booking) */
.catalog-card__rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #991b1b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px 6px 6px 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}
.catalog-card__rating-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.95;
}
.catalog-card__rating-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
}
.catalog-card__rating--high {
    background: #15803d;
}
.catalog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}
/* Тип объекта — чип/бейдж */
.catalog-card__type {
    display: inline-block;
    font-size: 11px;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    background: #e5e7eb;
    border-radius: 6px;
    font-weight: 600;
    align-self: flex-start;
}
.catalog-card__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.catalog-card__address {
    margin: 0 0 10px;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
    min-height: 0;
}
.catalog-card__address .material-symbols-outlined { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
/* Бейджи: ранний заезд, поздний выезд, бронирование онлайн */
.catalog-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
}
.catalog-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #374151;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}
.catalog-card__badge .material-symbols-outlined {
    font-size: 14px;
    color: #6b7280;
}
.catalog-card__badge--booking .material-symbols-outlined {
    color: #b91c1c;
}
.catalog-card__badge--booking {
    background: #fef2f2;
    color: #991b1b;
}
.catalog-card__badge--response .material-symbols-outlined {
    color: #b91c1c;
}
.catalog-card__badge--response {
    background: #fef2f2;
    color: #991b1b;
}
.catalog-card__desc {
    display: none;
}
/* Блок цены внизу карточки (как на Booking: справа, «за ночь») */
.catalog-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}
.catalog-card__price-wrap {
    text-align: right;
}
.catalog-card__price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    background: none;
    padding: 0;
    position: static;
    border-radius: 0;
}
.catalog-card__price--request {
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
}
.catalog-card__price-unit {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 0;
}
.catalog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #b91c1c;
    flex-shrink: 0;
}
.catalog-card__cta .material-symbols-outlined { font-size: 18px; }
@media (max-width: 600px) {
    .catalog-grid { grid-template-columns: 1fr; gap: 16px; }
    .catalog-card__footer { flex-wrap: wrap; }
    .catalog-card__rating { padding: 4px 8px; font-size: 11px; }
    .catalog-card__rating-label { font-size: 9px; }
    .catalog-card__rating-value { font-size: 14px; }
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 32px 0 24px;
    padding: 0;
}
.pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pagination__list li {
    margin: 0;
    padding: 0;
}
.pagination a,
.pagination__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pagination a:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.pagination__current {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
    cursor: default;
}
.pagination__prev,
.pagination__next {
    min-width: auto;
    padding: 0 16px;
}
@media (max-width: 600px) {
    .pagination { margin: 24px 0 16px; gap: 6px; }
    .pagination a, .pagination__current { min-width: 36px; height: 36px; font-size: 14px; }
}

/* ===== СТРАНИЦЫ АВТОРИЗАЦИИ (вход, регистрация, восстановление пароля) ===== */
.auth-page {
    max-width: 440px;
    margin: 32px auto 48px;
    padding: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}
.auth-page__title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}
.auth-page__subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    color: #6b7280;
}
.auth-page .auth-form__row {
    margin-bottom: 20px;
}
.auth-page .auth-form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.auth-page .auth-form__input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
}
.auth-page .auth-form__input:focus {
    outline: none;
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.auth-page .auth-form__hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}
.auth-page .auth-form__submit {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #b91c1c;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-page .auth-form__submit:hover {
    background: #991b1b;
}
.auth-page .auth-alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
}
.auth-page .auth-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.auth-page .auth-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.auth-page .auth-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 14px;
}
.auth-page .auth-links a {
    color: #b91c1c;
    text-decoration: none;
    font-weight: 500;
}
.auth-page .auth-links a:hover {
    text-decoration: underline;
}
.auth-page .auth-links__forgot {
    display: block;
    margin-top: 12px;
}
@media (max-width: 600px) {
    .auth-page { margin: 20px 16px 32px; padding: 24px; }
}