/**
 * Modern Hotel Card Styles
 * Airbnb/Chisfis-inspired design for hotel listings
 */

/* Card Container */
.hotel-card-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 320px;
    min-height: 320px;
}

.hotel-card-modern:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Image Container */
.hotel-card-image {
    position: relative;
    width: 100%;
    flex: 0 0 60%;
    height: 50%;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.hotel-card-image-link {
    display: block;
    position: relative;
    height: 100%;
    padding-top: 0;
}

.hotel-card-image img,
.hotel-card-image .img-responsive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Slider */
.hotel-card-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hotel-card-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hotel-card-slide.active {
    opacity: 1;
}

.hotel-card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Navigation Arrows */
.hotel-card-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: none;
}

.hotel-card-nav.prev {
    left: 10px;
}

.hotel-card-nav.next {
    right: 10px;
}

.hotel-card-modern:hover .hotel-card-nav {
    opacity: 1;
}

.hotel-card-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.hotel-card-nav i {
    font-size: 10px;
    color: #222;
}

/* Slider Dots */
.hotel-card-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.hotel-card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hotel-card-dot.active {
    background: #fff;
}

.hotel-card-dot:hover {
    background: #fff;
}

/* Discount/Sale Badge */
.hotel-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc2626;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

/* Featured Badge */
.hotel-card-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #038a52;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

/* When both featured and discount badge exist */
.hotel-card-badge + .hotel-card-featured,
.hotel-card-featured + .hotel-card-badge {
    top: 38px;
}

.item-tour.hotel-card-modern .hotel-card-badge + .hotel-card-featured,
.item-tour.hotel-card-modern .hotel-card-featured + .hotel-card-badge {
    top: auto;
    bottom: 10px;
}

/* Wishlist/Like Button */
.hotel-card-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hotel-card-wishlist:hover {
    transform: scale(1.1);
    background: #fff;
}

.hotel-card-wishlist i {
    font-size: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.hotel-card-wishlist.active i {
    color: #dc2626;
}

.hotel-card-wishlist:hover i {
    color: #dc2626;
}

/* Card Content */
.hotel-card-content {
    padding: 10px 12px 2px 12px !important;
    display: flex;
    flex-direction: column;
    flex: 1 1 50%;
}

.hotel-card-content-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hotel-card-content-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Meta Info (Property type & beds) */
.hotel-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #6b7280;
}

.hotel-card-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.hotel-card-stars i {
    font-size: 12px;
    color: #f59e0b;
}

.hotel-card-type {
    color: #6b7280;
}

.hotel-card-separator {
    color: #9ca3af;
}

.hotel-card-beds {
    color: #6b7280;
}

/* Title */
.hotel-card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #374151;
    text-transform: capitalize;
}

.hotel-card-title a {
    color: inherit;
    text-decoration: none;
    display: block;
    white-space: normal;
}

.hotel-card-title a:hover {
    color: #038a52;
}

.hotel-card-content-link .hotel-card-title {
    color: #374151;
}

/* Location */
.hotel-card-location {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.3;
}

.hotel-card-location i {
    font-size: 13px;
    color: #038a52;
    margin-top: 2px;
    flex-shrink: 0;
}

.hotel-card-location span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6b7280;
    text-transform: capitalize;
}

/* Divider - hidden */
.hotel-card-divider {
    display: none;
}

/* Footer (Price & Rating) */
.hotel-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 4px;
}

/* Price */
.hotel-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.hotel-card-price .price-from {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
}

.hotel-card-price .price-original {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: line-through;
}

.hotel-card-price .price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #111827 !important;
}

.hotel-card-price .price-unit {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

/* Rating - inline with price */
.hotel-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    margin-left: 8px;
}

.hotel-card-rating i {
    color: #f59e0b;
    font-size: 12px;
}

.hotel-card-rating .rating-score {
    font-weight: 600;
    color: #111827;
}

.hotel-card-rating .rating-count {
    color: #6b7280;
}

/* Grid Layout Adjustments */
.bc-list-item .list-item .row {
    margin: 0 -12px;
}

.bc-list-item .list-item .row > [class*="col-"] {
    padding: 0 12px;
    display: flex;
}

.bc-list-hotel .list-item .row > [class*="col-"],
.bc-list-car .list-item .row > [class*="col-"],
.bc-list-tour .list-item .row > [class*="col-"],
.bravo-list-hotel .list-item .row > [class*="col-"],
.bravo-list-car .list-item .row > [class*="col-"],
.bravo-list-tour .list-item .row > [class*="col-"],
.home-section .list-item .row > [class*="col-"] {
    display: flex;
}

/* /stays/ page - 2 columns on desktop */
.bc-list-item .list-item .row > .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .bc-list-item .list-item .row > .col-lg-4,
    .bc-list-item .list-item .row > .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* MOBILE: 2 columns for all service cards (hotels, cars, tours) */
@media (max-width: 767px) {
    .bc-list-item .list-item .row > .col-lg-4,
    .bc-list-item .list-item .row > .col-md-6,
    .bc-list-item .list-item .row > .col-sm-6,
    .bc-list-item .list-item .row > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .bc-list-item .list-item .row {
        margin: 0 -5px;
    }
    
    .bc-list-item .list-item .row > [class*="col-"] {
        padding: 0 5px;
    }
    
    .hotel-card-modern {
        margin-bottom: 10px;
    }
    
    .hotel-card-content {
        padding: 8px 8px 2px 8px;
    }
    
    .hotel-card-title {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .hotel-card-meta {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .hotel-card-stars i {
        font-size: 9px;
    }
    
    .hotel-card-location {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .hotel-card-divider {
        margin-bottom: 4px;
    }
    
    .hotel-card-price .price-amount {
        font-size: 14px;
    }
    
    .hotel-card-price .price-unit {
        font-size: 10px;
    }
    
    .hotel-card-price .price-original {
        font-size: 10px;
    }
    
    .hotel-card-rating {
        font-size: 10px;
    }
    
    .hotel-card-rating i {
        font-size: 10px;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .hotel-card-title {
        font-size: 12px;
    }
    
    .hotel-card-price .price-amount {
        font-size: 13px;
    }
    
    .hotel-card-location {
        font-size: 10px;
    }
}

/* Homepage Hotel Block - 4 columns */
.bc-list-hotel .list-item .row {
    margin: 0 -12px;
}

.bc-list-hotel .list-item .row > [class*="col-"] {
    padding: 0 12px;
}

/* Homepage blocks keep 4 columns on desktop */
@media (min-width: 992px) {
    .bc-list-hotel.layout_normal .list-item .row > .col-lg-3,
    .bc-list-hotel.layout_normal .list-item .row > .col-md-6,
    .bc-list-hotel .list-item .row > .col-lg-3,
    .bravo-list-hotel .list-item .row > [class*="col-"],
    .home-section .list-item .row > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Homepage mobile - 2 columns */
@media (max-width: 767px) {
    .bc-list-hotel .list-item .row > [class*="col-"],
    .bravo-list-hotel .list-item .row > [class*="col-"],
    .home-section .list-item .row > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .bc-list-hotel .list-item .row,
    .bravo-list-hotel .list-item .row {
        margin: 0 -5px;
    }
    
    .bc-list-hotel .list-item .row > [class*="col-"],
    .bravo-list-hotel .list-item .row > [class*="col-"] {
        padding: 0 5px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .hotel-card-modern {
        background: #1f2937;
        border-color: #374151;
    }
    
    .hotel-card-title {
        color: #f9fafb;
    }
    
    .hotel-card-title a:hover {
        color: #34d399;
    }
    
    .hotel-card-meta,
    .hotel-card-location,
    .hotel-card-price .price-unit,
    .hotel-card-rating .rating-count {
        color: #9ca3af;
    }
    
    .hotel-card-price .price-amount,
    .hotel-card-rating .rating-score {
        color: #f9fafb;
    }
    
    .hotel-card-divider {
        background: #374151;
    }
}

/* Animation for slider */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hotel-card-slide.active {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   LOCATIONS: Single column on mobile
   ============================================ */
@media (max-width: 767px) {
    .bc-list-locations .list-item .row > [class*="col-"],
    .bc-list-locations .list-item .row > .col-lg-4,
    .bc-list-locations .list-item .row > .col-lg-8,
    .bc-list-locations .list-item .row > .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .bc-list-locations .list-item .destination-item {
        margin-bottom: 15px;
    }
}

/* ============================================
   STACKED SEARCH FORM: Mobile optimizations
   ============================================ */
@media (max-width: 767px) {
    /* Reduce stacked search form height */
    .bc-form-search-all.carousel_v2 {
        min-height: 80px !important;
        max-height: 80px !important;
        overflow: hidden;
    }
    
    .bc-form-search-all.carousel_v2 .effect {
        min-height: 80px !important;
        max-height: 80px !important;
    }
    
    .bc-form-search-all.carousel_v2 .effect .item {
        min-height: 80px !important;
        max-height: 80px !important;
        padding: 10px 0;
    }
    
    .bc-form-search-all.carousel_v2 .effect .owl-item,
    .bc-form-search-all.carousel_v2 .effect .owl-stage,
    .bc-form-search-all.carousel_v2 .effect .owl-stage-outer,
    .bc-form-search-all.carousel_v2 .effect .owl-carousel {
        min-height: 80px !important;
        max-height: 80px !important;
    }
    
    /* Hide heading text on mobile */
    .bc-form-search-all.carousel_v2 .text-heading,
    .bc-form-search-all.carousel_v2 .sub-heading {
        display: none !important;
    }
    
    /* Center search form at 50% width */
    .bc-form-search-all.carousel_v2 .g-form-control {
        width: 50% !important;
        margin: 0 auto !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .bc-form-search-all.carousel_v2 .container {
        position: relative;
        height: 80px;
    }
    
    /* Make tabs smaller */
    .bc-form-search-all.carousel_v2 .nav-tabs {
        display: none !important;
    }
    
    /* Compact form fields */
    .bc-form-search-all.carousel_v2 .tab-content {
        padding: 0 !important;
    }
    
    .bc-form-search-all.carousel_v2 .g-field-search {
        display: none !important;
    }
    
    /* Show only search button on mobile stacked form */
    .bc-form-search-all.carousel_v2 .g-button-submit {
        width: 100%;
    }
    
    .bc-form-search-all.carousel_v2 .g-button-submit .btn {
        border-radius: 25px !important;
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* Fix for news/articles cards */
.item-news.hotel-card-modern {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.item-news.hotel-card-modern:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.item-news.hotel-card-modern .hotel-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
