body {
    background: #f5f5f5;
}

/* Blue search banner */
.search-banner {
    background: #003b95;
    padding: 28px 0;
    transition: padding-right 0.5s ease-in-out, max-width 0.5s ease-in-out;
}

.search-form-bar {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.search-form-bar > :first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.search-form-bar > :last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.search-form-bar input,
.search-form-bar select {
    border: none;
    padding: 14px 18px;
    font-size: 14px;
    outline: none;
    flex: 1;
    border-right: 1px solid #e5e7eb;
}

.search-btn {
    background: #f07c00;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.search-btn:hover {
    background: #d96f00;
}

@media(max-width: 768px) {
    .search-form-bar {
        flex-direction: column;
    }
    
    .search-form-bar > :first-child {
        border-radius: 8px 8px 0 0;
    }
    
    .search-form-bar > :last-child {
        border-radius: 0 0 8px 8px;
    }
    
    .search-form-bar input,
    .search-form-bar select {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
    }
    
    .search-form-bar > div.relative {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
    }
}

/* Layout */
.main-container {
    transition: padding-right 0.5s ease-in-out, max-width 0.5s ease-in-out;
}

body.show-map .main-container {
    max-width: 100% !important;
    padding-right: 100vw !important; /* Mobile pushes original content out entirely */
}

@media(min-width: 1024px) {
    body.show-map .main-container {
        padding-right: 60vw !important; 
    }
}

/* Nasconde la sidebar quando la mappa è aperta e allarga la rete dei risultati */
body.show-map aside {
    display: none !important;
}

body.show-map .list-layout {
    grid-template-columns: 1fr !important;
}

/* Custom dimensions per il map wrapper responsivo */
#large-map-wrapper {
    width: 100vw !important;
    top: 0 !important;
    z-index: 1000 !important;
}

@media(min-width: 1024px) {
    #large-map-wrapper {
        width: 60vw !important;
        top: 80px !important;
        z-index: 99 !important;
    }
}

.list-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

@media(max-width: 1024px) {
    .list-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-sticky {
        position: static !important;
    }
}

.sidebar-sticky {
    position: sticky;
    top: 90px;
}

/* Filter Card */
.filter-box {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 16px;
}

.filter-box h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

.filter-label {
    display: flex;
    align-items: center;
    gap-8px;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.filter-label:hover {
    color: #003b95;
}

.filter-label input {
    accent-color: #003b95;
}

.filter-count {
    margin-left: auto;
    font-size: 12px;
    color: #9ca3af;
}

/* Sort bar */
.sort-bar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sort-btn {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all .2s;
}

.sort-btn:hover,
.sort-btn.active {
    background: #003b95;
    color: #fff;
    border-color: #003b95;
}

/* Hotel Card (horizontal list style) */
.hotel-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 260px 1fr;
    overflow: hidden;
    transition: box-shadow .2s;
    margin-bottom: 16px;
}

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

@media(max-width: 768px) {
    .hotel-card {
        grid-template-columns: 1fr;
    }
}

.hotel-img {
    position: relative;
    overflow: hidden;
}

.hotel-img img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform .4s;
}

.hotel-card:hover .hotel-img img {
    transform: scale(1.05);
}

.hotel-img .badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c8102e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.hotel-no-img-badge {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    padding: 24px 16px;
    text-align: center;
}

@media(max-width: 768px) {
    .hotel-no-img-badge {
        min-height: 110px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

.hotel-icon-badge {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
}

.hotel-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.hotel-no-img-badge .badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c8102e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.hotel-img .badge-fav {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
}

.hotel-img .badge-fav:hover {
    color: #e11d48;
}

.hotel-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}

.hotel-body .stars {
    color: #f59e0b;
    font-size: 13px;
    letter-spacing: 1px;
}

.hotel-body h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 4px 0;
}

.hotel-body h2 a {
    text-decoration: none;
    color: inherit;
}

.hotel-body h2 a:hover {
    color: #003b95;
}

.hotel-location {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.hotel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.hotel-tag {
    background: #f0f4ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.hotel-tag.green {
    background: #f0fdf4;
    color: #166534;
}

/* Rating and price row */
.hotel-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.rating-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-badge {
    background: #003b95;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 5px 10px;
    border-radius: 6px 6px 6px 0;
    display: inline-block;
}

.rating-text {
    font-size: 13px;
}

.rating-text strong {
    display: block;
    font-weight: 700;
    color: #1a1a2e;
    font-size: 14px;
}

.rating-text span {
    color: #6b7280;
}

.price-block {
    text-align: right;
}

.price-block .from {
    font-size: 11px;
    color: #6b7280;
}

.price-block .amount {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.price-block .per {
    font-size: 12px;
    color: #6b7280;
}

.btn-avail {
    display: inline-block;
    background: #006ce4;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s;
    margin-top: 8px;
}

.btn-avail:hover {
    background: #0057b8;
}

/* Map sidebar mini */
#hotels-mini-map {
    height: 220px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Results header */
.results-header {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.results-sub {
    font-size: 13px;
    color: #6b7280;
}

/* Custom Pagination colors for Hotel Section */
.hotel-pagination nav div,
.hotel-pagination nav a,
.hotel-pagination nav span {
    border-color: #e5e7eb;
}
.hotel-pagination p {
    color: #4b5563; /* Text color for 'Showing X to Y' */
    font-weight: 500;
}
.hotel-pagination p span.font-medium {
    color: #003b95 !important;
}
.hotel-pagination nav > div[class*="sm:hidden"] span.font-medium {
    color: #003b95 !important;
}

/* Page Links */
.hotel-pagination a[class*="border"] {
    color: #003b95 !important;
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
    transition: all 0.2s ease-in-out !important;
}
.hotel-pagination a[class*="border"]:focus,
.hotel-pagination a[class*="border"]:active {
    box-shadow: 0 0 0 3px rgba(0, 59, 149, 0.2) !important;
    outline: none !important;
}
.hotel-pagination a[class*="border"]:hover {
    background-color: #003b95 !important;
    border-color: #003b95 !important;
    color: #ffffff !important;
}

/* Active Page Element */
.hotel-pagination span[aria-current="page"] span {
    background-color: #003b95 !important;
    border-color: #003b95 !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Responsive adjustments when split-screen map is open */
body.show-map .search-banner {
    padding-right: 100vw !important; /* Mobile pushes original content out entirely */
}

@media(min-width: 1024px) {
    body.show-map .search-banner {
        padding-right: 60vw !important; /* Restrict content to the left 40vw area */
    }
    
    body.show-map .search-form-bar {
        flex-direction: column !important;
    }
    body.show-map .search-form-bar > * {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        width: 100% !important;
        border-radius: 0 !important;
        padding: 12px 16px !important;
    }
    body.show-map .search-form-bar > :first-child {
        border-radius: 8px 8px 0 0 !important;
    }
    body.show-map .search-form-bar > :last-child {
        border-radius: 0 0 8px 8px !important;
        border-bottom: none !important;
    }
}
