/**
 * Hotel Carousel - Frontend Styles (Booking.com Style)
 * Адаптивная карусель отелей в стиле Booking.com
 */

/* ==========================================================================
   CSS Reset & Base Styles
   ========================================================================== */

.hc-carousel * {
    box-sizing: border-box;
}

.hc-carousel {
    font-family: "BlinkMacSystemFont", -apple-system, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #262626;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    position: relative;
}

/* ==========================================================================
   Header Section - Заголовок и подзаголовок
   ========================================================================== */

.hc-header {
    margin-bottom: 16px;
}

.hc-title {
    font-size: 24px;
    font-weight: 700;
    color: #262626;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.hc-subtitle {
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.hc-subtitle a {
    color: #0054a6;
    text-decoration: none;
}

.hc-subtitle a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Filters Section - Фильтры
   ========================================================================== */

.hc-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.hc-filters::-webkit-scrollbar {
    display: none;
}

.hc-filter {
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 22px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #262626;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    role: tab;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-filter:hover:not(.hc-filter--active) {
    background-color: #f5f5f5;
    border-color: #d4d4d4;
    color: #262626;
}

.hc-filter--active {
    background-color: #0054a6;
    border: none;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 84, 166, 0.2);
}

.hc-filter--active:hover {
    background-color: #003f80;
}

.hc-filter:focus {
    outline: none;
    box-shadow: none;
}

/* ==========================================================================
   Carousel Container - Контейнер карусели
   ========================================================================== */

.hc-carousel-container {
    position: relative;
    overflow: hidden;
}

.hc-track {
    display: flex;
    gap: 24px;
    transition: transform 0.3s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.hc-track::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   Navigation Arrows - Стрелки навигации (только для ПК)
   ========================================================================== */

.hc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s ease;
    color: #0054a6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.hc-nav:hover {
    opacity: 0.8;
    background: #0054a6;
    color: #fff;
    border-color: #0054a6;
}

.hc-nav:active {
    opacity: 0.6;
}

.hc-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hc-nav:disabled:hover {
    opacity: 0.4;
    background: #fff;
    color: #0054a6;
    border-color: #d4d4d4;
}

.hc-nav--prev {
    left: -60px;
}

.hc-nav--prev svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.hc-nav--next {
    right: -60px;
}

.hc-nav--next svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ==========================================================================
   Hotel Card - Карточка отеля
   ========================================================================== */

.hc-item {
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.hc-item {
    cursor: pointer;
}

/* ==========================================================================
   Hotel Image - Изображение отеля
   ========================================================================== */

.hc-item-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.hc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    loading: lazy;
}

/* ==========================================================================
   Badges - Бейджи
   ========================================================================== */

.hc-badge {
    position: absolute;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 1;
}

.hc-badge--top {
    top: 8px;
    left: 8px;
    background: #1a365d;
    color: #fff;
}

.hc-badge--luxury {
    background: #d4af37;
    color: #fff;
}

.hc-badge--comfort {
    background: #4a90e2;
    color: #fff;
}

.hc-badge--affordable {
    background: #28a745;
    color: #fff;
}

.hc-badge--label {
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

/* ==========================================================================
   Hotel Content - Контент карточки
   ========================================================================== */

.hc-item-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hc-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #262626;
    margin: 0 0 10px 0;
    line-height: 1.3;
    letter-spacing: -0.25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Rating Block - Блок рейтинга
   ========================================================================== */

.hc-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.hc-rating-score {
    background: #0054a6;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    min-width: 36px;
    text-align: center;
}

.hc-rating-reviews {
    color: #111111;
    font-size: 16px;
}

.hc-rating-stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
    color: #ffc107;
    margin-left: auto;
}

.hc-rating-stars .star {
    display: inline-block;
}

.hc-rating-stars .star--empty {
    color: #d4d4d4;
}

/* ==========================================================================
   Description - Описание
   ========================================================================== */

.hc-description {
    margin-bottom: 16px;
}

.hc-description-text {
    font-size: 16px;
    color: #111111;
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}



.hc-read-more {
    background: none;
    border: none;
    color: #0054a6;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    padding: 0;
    text-decoration: underline;
    pointer-events: none;
}

/* ==========================================================================
   Amenities - Удобства
   ========================================================================== */

.hc-amenities {
    margin-bottom: 16px;
}

.hc-amenities ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hc-amenities li {
    font-size: 14px;
    color: #6b6b6b;
    position: relative;
    padding-left: 14px;
}

.hc-amenities li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0054a6;
    font-weight: bold;
}

/* ==========================================================================
   CTA Button - Кнопка действия
   ========================================================================== */

.hc-cta {
    background: #0054a6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: block;
    margin-bottom: 16px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-cta:hover {
    background: #003f80;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Price - Цена
   ========================================================================== */

.hc-price {
    margin-top: auto;
}

.hc-price-amount {
    font-size: 16px;
    color: #111111;
    font-weight: normal;
    margin-bottom: 4px;
}

.hc-price-verification {
    font-size: 16px;
    color: #111111;
}

.hc-price-verification strong {
    font-weight: 600;
}

/* ==========================================================================
   View All Button - Кнопка "Посмотреть все"
   ========================================================================== */

.hc-view-all {
    background: #0054a6;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
    min-height: 52px;
}

.hc-view-all:hover {
    background: #003f80;
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   Responsive Design - Адаптивность
   ========================================================================== */

/* Мобильные устройства (до 768px) */
@media (max-width: 767px) {
    .hc-carousel {
        padding: 20px 0;
        font-size: 16px;
    }
    
    .hc-title {
        font-size: 22px;
    }
    
    .hc-subtitle {
        font-size: 16px;
    }
    
    .hc-item {
        width: 85vw;
        max-width: 320px;
    }
    
    .hc-track {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .hc-item {
        scroll-snap-align: start;
    }
    
    /* Скрываем стрелки на мобильных */
    .hc-nav {
        display: none !important;
    }
    
    .hc-filters {
        margin-bottom: 20px;
    }
    
    .hc-filter {
        font-size: 16px;
        padding: 12px 18px;
        min-height: 48px;
    }
    
    .hc-item-title {
        font-size: 18px;
    }
    
    .hc-description-text {
        font-size: 15px;
    }
    
    .hc-cta {
        font-size: 16px;
        padding: 12px 20px;
        min-height: 48px;
    }
    
    .hc-view-all {
        font-size: 16px;
        padding: 18px 24px;
        min-height: 52px;
    }
}

/* Планшеты (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hc-item {
        width: 45vw;
        max-width: 400px;
    }
    
    .hc-track {
        gap: 24px;
    }
}

/* Десктоп средний (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .hc-carousel {
        max-width: 1200px;
        padding: 24px 0;
    }
    
    .hc-carousel-container {
        margin: 0 20px;
        position: relative;
        padding: 0;
    }
    
    .hc-item {
        width: calc((100% - 2 * 24px) / 2.3);
        min-width: 340px;
    }
    
    .hc-track {
        gap: 24px;
        padding-right: 60px;
    }
    
    /* Стрелки временно отключены */
    .hc-nav {
        display: none;
    }
}

/* Широкие экраны (1200px и больше) */
@media (min-width: 1200px) {
    .hc-carousel {
        max-width: 1400px;
        padding: 24px 0;
    }
    
    .hc-carousel-container {
        margin: 0 20px;
        position: relative;
        padding: 0;
    }
    
    .hc-item {
        width: calc((100% - 2 * 24px) / 2.5);
        min-width: 380px;
    }
    
    .hc-track {
        gap: 24px;
        padding-right: 60px;
    }
    
    /* Стрелки временно отключены */
    .hc-nav {
        display: none;
    }
}

/* ==========================================================================
   Accessibility & Focus States - Доступность
   ========================================================================== */

.hc-filter:focus,
.hc-nav:focus,
.hc-cta:focus,
.hc-view-all:focus {
    outline: 2px solid #0054a6;
    outline-offset: 2px;
}

/* Уменьшенная анимация для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    .hc-track {
        transition: none;
    }
    
    .hc-item {
        transition: none;
    }
}

/* ==========================================================================
   Loading States - Состояния загрузки
   ========================================================================== */

.hc-carousel--loading .hc-item {
    opacity: 0.6;
    pointer-events: none;
}

.hc-carousel--loading .hc-item::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid #0054a6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Print Styles - Стили для печати
   ========================================================================== */

@media print {
    .hc-nav,
    .hc-filters {
        display: none;
    }
    
    .hc-track {
        display: block;
    }
    
    .hc-item {
        display: block;
        width: 100%;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
} 