/* ==========================================================
   HOTEL SEARCH — SEARCH RESULTS (card-hotel листа)
   Изворно: hotel.css, Section 17
   (без "Hotel Popular Description" и "Hotel Conditions
   Accommodation" - тие се за детален приказ на хотел, не за
   резултати од пребарување; и без 3-те media queries за
   ширина на sidebar/results/map колоните - оние се преместени
   во search-page-layout.css бидејќи ја опишуваат целата
   страница, не само картичките)

   .card-hotel точно одговара на card-hotel.php партијалот
   (foreach низ $retrieveHotels).
   ========================================================== */

/* ==========================================================
   17. SEARCH RESULTS
   ========================================================== */
.search-result-page .search-results__total {
    font-size: 16px !important;
    font-weight: 600;
    margin-bottom: 16px;
}
.search-result-page button#load-more-btn {
    background: #E57757 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 10px !important;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: background 0.3s ease;
}
.search-result-page button#load-more-btn:hover {
    background: #E57757;
    color: #fff !important;
}

.search-results {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}
.search-results .services-item .item {
    cursor: pointer;
}
.search-results .services-item .item:hover {
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.28), 0px 4px 12px rgba(0, 0, 0, 0.05);
}
.search-results .search-results__no-content p.search-results__no-content-msg {
    display: flex;
    justify-content: center;
    gap: 7px;
}
.search-results .search-results__no-content p.search-results__no-content-msg button {
    border: none !important;
    height: auto;
    font-size: 24px;
}

/* BAL-1310 - Search Results Card Enhancements */
.search-results .card-hotel .date-range {
    font-size: 14px !important;
    margin: 0 !important;
}
.search-results .card-hotel .guest-info {
    font-size: 14px !important;
    margin: 0 !important;
}
.search-results .card-hotel .price-info {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 8px 0 4px 0 !important;
}
.search-results .card-hotel .tax-info {
    font-size: 13px !important;
    margin: 0 0 8px 0 !important;
}
.search-results .card-hotel .pay-online {
    font-weight: 500 !important;
    text-decoration: none !important;
    margin-top: 4px !important;
    display: inline-block !important;
}

.card-hotel {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.08), 0px 4px 12px rgba(0, 0, 0, 0.05);
    background: #fff;
    transition: box-shadow 0.3s ease;
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem;
    padding-left: 0 !important;
}
.card-hotel:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}
.card-hotel:hover img {
    transform: scale(1.05);
}
.card-hotel figure.card-hotel__thumbnail {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    border-radius: 14px;
    margin: 2px;
    overflow: hidden;
}
.card-hotel figure.card-hotel__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}
.card-hotel .card-hotel__info {
    color: #fff;
    font-family: "Helvetica Neue", sans-serif;
    background: #003580;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-style: italic;
    font-size: 12px;
    cursor: pointer;
}
.card-hotel .card-body {
    flex: 0 0 66.66%;
    max-width: 66.66%;
    padding: 1rem 1rem 1rem 0rem;
}
.card-hotel .card-body .card-body__heading {
    display: flex;
    gap: 3rem;
}
.card-hotel .card-body .card-body__heading .hotel-rating {
    margin-left: auto;
    margin-bottom: 0;
    display: flex;
    gap: 8px;
}
.card-hotel .card-body .card-body__heading .hotel-rating .hotel-rating__reviews {
    display: flex;
    flex-direction: column;
}
.card-hotel .card-body .card-body__heading .hotel-rating .hotel-rating__reviews span:first-of-type {
    font-size: 16px;
    line-height: 18px;
    color: #2d3137;
}
.card-hotel .card-body .card-body__heading .hotel-rating .hotel-rating__reviews span:last-of-type {
    font-size: 12px;
    line-height: 14px;
    color: #868686;
}
.card-hotel .card-body .card-body__heading .hotel-rating .hotel-rating__grade {
    height: fit-content;
    background: #28a745;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title h2.hotel-title {
    font-size: 18px !important;
    line-height: 22px !important;
    margin: 0;
    color: #2d3137 !important;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title .hotel-address,
.card-hotel .card-body .card-body__heading .card-body__heading-title .hotel-nearby {
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.234;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title .hotel-nearby {
    color: #868686 !important;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title .card-body__hotel-star {
    gap: 2px;
    display: flex;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title .card-body__hotel-star span {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxMCAxMCI+PHBhdGggZmlsbD0idXJsKCNhKSIgZD0iTTQuNjE1LjQ4MmEuNC40IDAgMCAxIC43MjYgMGwxLjEwMiAyLjM3MmEuNC40IDAgMCAwIC4zMTQuMjI4bDIuNTk3LjMxNWEuNC40IDAgMCAxIC4yMjQuNjlMNy42NjIgNS44NjhhLjQuNCAwIDAgMC0uMTIuMzdsLjUwMyAyLjU2N2EuNC40IDAgMCAxLS41ODcuNDI2TDUuMTczIDcuOTZhLjQuNCAwIDAgMC0uMzkgMEwyLjQ5OSA5LjIzYS40LjQgMCAwIDEtLjU4Ny0uNDI2bC41MDMtMi41NjdhLjQuNCAwIDAgMC0uMTItLjM3TC4zNzggNC4wODhhLjQuNCAwIDAgMSAuMjI0LS42OUwzLjIgMy4wODFhLjQuNCAwIDAgMCAuMzE1LS4yMjhMNC42MTUuNDgyWiIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9IjQuOTc4IiB4Mj0iNC45NzgiIHkxPSItLjMiIHkyPSIxMC43IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGQUYwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0YyOTAwNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 12px;
    height: 12px;
}
.card-hotel .card-body .card-body__heading .card-body__heading-title .card-body__hotel-star img {
    max-width: 12px;
}
.card-hotel .card-body .hotel-amenities {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-left: auto;
}
.card-hotel .card-body .hotel-amenities img {
    width: 16px;
}
.card-hotel .card-body .hotel-amenities span i {
    font-size: 12px;
}
.card-hotel .card-body .room-details {
    display: flex;
    margin-top: 8px;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}
.card-hotel .card-body .room-details .room-info {
    display: flex;
    gap: 2rem;
}
.card-hotel .card-body .room-details .room-info .room-info__name {
    max-width: 220px;
}
.card-hotel .card-body .room-details .room-info .room-info__name h3 {
    font-size: 14px !important;
    line-height: 16px;
    color: #2d3137;
    margin-bottom: 0;
    font-weight: 500;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}
.card-hotel .card-body .room-details .room-info .room-info__name p {
    font-size: 12px !important;
    font-weight: 400;
    line-height: 16px;
    text-transform: lowercase;
    margin-bottom: 0;
}
.card-hotel .card-body .room-details .room-info .room-info__value {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}
.card-hotel .card-body .room-details .room-info .room-info__value span {
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 14px;
    margin-bottom: 2px;
    font-size: 12px !important;
}
.card-hotel .card-body .room-details .room-info .room-info__value .active {
    color: #198754 !important;
}
.card-hotel .card-body .room-details .room-info .room-info__value .active img {
    filter: brightness(0) saturate(100%) invert(37%) sepia(89%) saturate(495%) hue-rotate(99deg) brightness(96%) contrast(93%);
}
.card-hotel .card-body .room-details .room-price {
    text-align: right;
    margin-left: auto;
}
.card-hotel .card-body .room-details .room-price .fw-bold {
    font-size: 1.25rem;
}
.card-hotel .card-body .room-details .room-price small {
    display: block;
    color: #6c757d;
    font-size: 12px;
    line-height: 14px;
}
.card-hotel .card-body .show-all-rooms {
    display: flex;
    justify-content: flex-end;
}
.card-hotel .card-body .show-all-rooms .btn-show-rooms {
    background: #E57757;
    border: none;
    color: #fff !important;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: background 0.3s ease;
}
.card-hotel .card-body .show-all-rooms .btn-show-rooms:hover {
    opacity: 0.8;
}

/* Show More / Less */
.desc-wrap {
    position: relative;
}
.desc-wrap .description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}
.desc-wrap.collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3em;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
    pointer-events: none;
}
.desc-wrap.expanded .description {
    -webkit-line-clamp: unset;
}
.desc-wrap.expanded::after {
    display: none;
}

.showmore-btn {
    background: transparent;
    color: #00332A;
    text-decoration: none;
}
.showmore-btn:hover {
    text-decoration: underline;
}
.showmore-btn i {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}
.showmore-btn.expanded i {
    transform: rotate(180deg);
}

/* Sort By Filter */
.sort-by-filter select {
    padding: 4px 12px;
    background: #FFFFFF;
    border: 1px solid #DEDEDE;
    border-radius: 10px;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: var(--grey-color, #5E6D77);
    width: 100%;
    flex: 1;
}


/* Search Results Responsive */
@media (max-width: 768px) {
    .card-hotel .card-body .room-details {
        flex-direction: column;
        gap: 0.75rem;
    }
    .card-hotel .card-body .room-details .room-info {
        max-width: 100%;
    }
    .card-hotel .card-body .room-details .room-price {
        text-align: left;
    }
}

@media (min-width: 768px) and (max-width: 1280px) {
    .search-results-content .search-results .card.card-hotel {
        flex-direction: row !important;
        padding: 0 !important;
    }
    .search-results-content .search-results .card.card-hotel figure {
        flex: 0 0 33.33% !important;
        max-width: 33.33% !important;
    }
    .search-results-content .search-results .card.card-hotel .card-body {
        flex: 0 0 66.66% !important;
        max-width: 66.66% !important;
        padding: 1rem !important;
    }
}



@media (max-width: 480px) {
    .search-results .card-hotel {
        flex-direction: column !important;
        padding: 5px !important;
    }
    .search-results .card-hotel .card-hotel__thumbnail {
        flex: none !important;
        max-width: 100% !important;
    }
    .search-results .card-hotel .card-body {
        flex: none !important;
        max-width: 100% !important;
        padding: 1rem !important;
    }
    .search-results .card-hotel .card-body .card-body__heading {
        flex-direction: column !important;
        max-width: 100% !important;
    }
    .search-results .card-hotel .card-body .card-body__heading .card-body__heading-title,
    .search-results .card-hotel .card-body .card-body__heading .hotel-rating {
        max-width: 100% !important;
    }
    .search-results .card-hotel .card-body .card-body__heading .hotel-rating {
        margin-top: 15px !important;
        text-align: right !important;
    }
    .search-results .card-hotel .card-body .hotel-amenities,
    .search-results .card-hotel .card-body .room-details,
    .search-results .card-hotel .card-body .show-all-rooms {
        flex: none !important;
        max-width: 100% !important;
    }
    .card-hotel .card-body .card-body__heading {
        display: inline !important;
    }
    .card-hotel .card-body .room-details .room-price {
        margin-left: 0 !important;
    }
    .search-results .card-hotel .card-body .room-details .room-info span {
        margin-bottom: 5px !important;
    }
}

@media (max-width: 768px) {
    .btn.btn-show-rooms {
        max-width: unset !important;
    }
}


/* ==========================================================
   FIX — картичката се исекува од десно (hotel-rating) на
   768–1280. Причина: 33.33% + 66.66% + gap 1rem + margin 2px
   > 100%, а .card-hotel има overflow: hidden.
   ========================================================== */
@media (min-width: 768px) and (max-width: 1280px) {
    .search-results-content .search-results .card.card-hotel {
        gap: 0 !important;
    }
    .search-results-content .search-results .card.card-hotel figure.card-hotel__thumbnail {
        margin: 0 !important;
    }
    .search-results-content .search-results .card.card-hotel .card-body {
        flex: 1 1 auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 1rem !important;
    }
    .search-results-content .search-results .card.card-hotel .card-body .card-body__heading {
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }
    .search-results-content .search-results .card.card-hotel .card-body .card-body__heading .card-body__heading-title {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .search-results-content .search-results .card.card-hotel .card-body .card-body__heading .hotel-rating {
        flex: 0 0 auto !important;
    }
}

