/* Importa il font Poppins da Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Applica il font Poppins all'intero documento */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9; 
    color: #333;
}

/* Griglia principale: 3 colonne */
.custom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 colonne */
    gap: 20px;
    /* Spazio tra le card */
    padding: 20px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    /* Centrare la griglia */
}

/* Card */
.custom-card {
    display: flex;
    flex-direction: column;
    /* Disposizione verticale per le card */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background-color: #fff;
    margin-bottom: 10px;
}

.custom-card:hover {
    transform: translateY(-5px);
    /* Effetto hover */
}

/* Immagini con dimensioni uniformi */
.custom-card-image {
    width: 100%;
    height: 200px;
    /* Altezza fissa per tutte le immagini */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    /* Colore di sfondo per immagini mancanti */
}

.custom-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mantiene le proporzioni senza distorsione */
}

/* Contenuto */
.custom-card-content {
    padding: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    position: relative;
    /* Per posizionare la durata */
}

.custom-card-header {
    position: relative;
}

.custom-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    text-align: center;
    word-break: break-word;
}

/* Durata sempre sopra */
.custom-duration {
    top: 0;
    /* Posiziona sempre in alto */
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.custom-duration-icon {
    font-size: 16px;
    color: #555;
    /* Colore per l'icona */
}

.custom-duration-text {
    font-size: 14px;
    color: #333;
}

@media screen and (max-width: 768px) {
    .custom-duration-text {
        display: block;
        margin-bottom: 5px;
    }
}

/* Dettagli */
.custom-card-details {
    text-align: center;
    margin: 0px 0;
    font-size: 14px;
    color: #555;
}

/* Footer */
.custom-card-footer {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-price-section p {
    font-size: 14px;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.custom-price-section h4 {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
    margin: 5px 0 0;
}

.custom-booking-button {
    font-size: 14px;
    padding: 10px 20px;
    background-color: #006ce4;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.custom-booking-button:hover {
    background-color: #0056c7;
    color: white;
    text-decoration: none;
}

/* Layout Responsivo */
@media (max-width: 768px) {
    .custom-grid {
        grid-template-columns: 1fr;
        /* 1 colonna per dispositivi mobili */
    }

    .custom-card-image {
        height: 200px;
        /* Altezza ridotta per il mobile */
    }

    .custom-duration {
        font-size: 12px;
        /* Riduci la dimensione per il mobile */
    }
}

/* ==============================================
   BREADCRUMB E HEADER
   ============================================== */

.breadcrumb-new {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.breadcrumb-new a {
    color: #0071c2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-new a:hover {
    color: #005bb5;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #6b6b6b;
    font-weight: normal;
}

.breadcrumb-current {
    color: #262626;
    font-weight: 500;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 24px 0;
}

/* ==============================================
   RISULTATI CON SIDEBAR
   ============================================== */

.results-header {
    margin-bottom: 0px;
    padding: 16px 4px;
    background: #f8f9fa;
    border-radius: 8px;
    /* border-left: 4px solid #0071c2; */
}

.results-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #262626;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==============================================
   FILTRI SIDEBAR (LEGACY - da rimuovere)
   ============================================== */

.filter-section {
    border-bottom: 1px solid #e7e7e7;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    padding: 16px 20px;
    margin: 0;
    /* border-bottom: 1px solid #e7e7e7; */
}

.popular-destinations {
    font-size: 11px;
    color: #6b6b6b;
    margin-bottom: 12px;
    line-height: 1.3;
    padding: 0px 22px;
}

.price-range {
    position: relative;
    padding: 16px;
}

.price-histogram {
    display: flex;
    align-items: end;
    height: 30px;
    margin-bottom: 12px;
    gap: 1px;
    padding: 0 2px;
}

.histogram-bar {
    flex: 1;
    background-color: #e6f3ff;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: background-color 0.2s ease;
}

.histogram-bar.active {
    background-color: #b3d9ff;
}

.price-slider-container {
    position: relative;
    height: 24px;
    margin-bottom: 16px;
    background: #e7e7e7;
    border-radius: 12px;
}

.slider-track {
    position: absolute;
    height: 4px;
    background: #0071c2;
    border-radius: 2px;
    top: 10px;
}

.price-slider {
    position: absolute;
    width: 100%;
    height: 24px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0071c2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: all;
    position: relative;
    z-index: 2;
}

.price-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0071c2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: all;
    position: relative;
    z-index: 2;
}

.price-slider#minPrice::-webkit-slider-thumb {
    z-index: 3;
}

.price-slider#minPrice::-moz-range-thumb {
    z-index: 3;
}

.price-display {
    text-align: center;
    font-size: 14px;
    color: #262626;
    font-weight: 500;
}

/* ==============================================
   FILTRO CITTÀ BOOKING.COM STYLE
   ============================================== */

.countries-filter {
    padding: 8px 0;
}

.country-checkbox {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.country-checkbox:hover {
    background-color: #f5f5f5;
}

.country-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    border: 2px solid #868686;
    border-radius: 3px;
    accent-color: #006ce4;
    flex-shrink: 0;
}

.country-input:checked {
    accent-color: #006ce4;
}

.checkmark {
    display: none; /* Non utilizzato nel nuovo design */
}

.country-name {
    flex: 1;
    font-size: 14px;
    color: #262626;
    font-weight: 400;
    line-height: 1.2;
}

.filter-count {
    font-size: 14px;
    color: #6b6b6b;
    margin-left: 8px;
}

/* ==============================================
   BOOKING.COM STYLE LAYOUT
   ============================================== */

/* Layout principale con sidebar */
.booking-main-container {
    display: flex;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Filters sidebar */
.booking-sidebar {
    width: 260px;
    background: white;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e7e7e7;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.booking-filters {
    padding: 0;
}

.booking-filters h3 {
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    padding: 16px;
    margin: 0;
    border-bottom: 1px solid #e7e7e7;
}

/* Area risultati - una escursione per riga */
.booking-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Grid container for booking cards - 2 columns layout */
.booking-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* Override booking-card style when inside grid */
.booking-style-grid .booking-card {
    flex-direction: column;
    margin-bottom: 0;
    height: 100%;
    min-height: 450px;
    display: flex;
}

/* Booking card components for grid layout */
.booking-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.booking-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.booking-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.booking-favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.booking-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Wrapper per header e details che cresce */
.booking-card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.booking-card-header {
    margin-bottom: 0;
}

.booking-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.booking-rating-score {
    background: #003580;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.booking-rating-text {
    font-weight: 600;
    color: #003580;
}

.booking-rating-reviews {
    color: #6c757d;
}

.booking-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #262626;
}

.booking-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 14px;
}

.booking-card-details {
    flex: 1;
    margin-bottom: 0;
}

.booking-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.booking-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booking-duration, .booking-feature {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 4px;
}

.booking-card-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.booking-price-section {
    flex: 1;
}

.booking-price-from {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    display: block;
}

.booking-price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.booking-price {
    font-size: 20px;
    font-weight: 700;
    color: #262626;
}

.booking-price-per {
    font-size: 12px;
    color: #6c757d;
}

.booking-button-section .booking-button {
    background: #0071c2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.booking-button-section .booking-button:hover {
    background: #005999;
    text-decoration: none;
}

/* Card Booking.com Style */
.booking-card {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e7e7e7;
    transition: all 0.3s ease;
}

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

.card-image-section {
    position: relative;
    flex: 1;
    max-width: 330px;
    min-width: 280px;
    height: 100%;
    overflow: hidden;
}

.card-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffd700;
    border: 1px solid #ffcd00;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background: #ffcd00;
    transform: scale(1.05);
}

.favorite-btn.active {
    background: #ff6b6b;
    border-color: #ff5252;
}

.favorite-btn.active svg path {
    fill: #fff;
    stroke: #fff;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.card-header-left {
    flex: 1;
}

.card-header-right {
    flex-shrink: 0;
    min-width: 150px;
}

.rating-badge {
    background: #003580;
    color: white;
    padding: 4px 8px;
    border-radius: 6px 6px 6px 0;
    font-weight: bold;
    font-size: 16px;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rating-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-label {
    font-weight: 600;
    color: #262626;
    font-size: 14px;
}

.reviews {
    color: #6b6b6b;
    font-size: 14px;
}

.card-title {
    color: #0071c2;
    font-size: 20px;
    font-weight: 600;
    margin: 8px 0;
    cursor: pointer;
    line-height: 1.3;
}

.card-title a {
    color: #0071c2;
    text-decoration: none;
}

.card-title a:hover {
    text-decoration: underline;
}

.location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b6b6b;
    font-size: 14px;
    margin-bottom: 8px;
}

.description {
    color: #262626;
    line-height: 1.5;
    margin: 12px 0;
    font-size: 14px;
}

.duration-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b6b6b;
    margin-bottom: 12px;
    font-size: 14px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #262626;
}

.check-icon {
    color: #008009;
    font-weight: bold;
}

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

.price-label {
    color: #6b6b6b;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.original-price {
    font-size: 16px;
    color: #d63031;
    text-decoration: line-through;
    margin-bottom: 2px;
    display: block;
}

.price-amount {
    font-size: 24px;
    font-weight: bold;
    color: #262626;
    margin: 4px 0;
}

.price-note {
    font-size: 14px;
    color: #6b6b6b;
    display: block;
    margin-bottom: 4px;
}

.taxes-included {
    font-size: 12px;
    color: #6b6b6b;
    display: block;
    margin-top: 4px;
}

.bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 16px;
    gap: 20px;
}

.cta-button {
    background: #006ce4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.cta-button:hover {
    background: #0057b8;
    color: white;
    text-decoration: none;
}

/* Responsive */
/* Tablet: 2 colonne */
@media (max-width: 991px) {
    .booking-style-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        padding: 18px;
    }
    
    .booking-sidebar {
        display: none; /* O implementa come drawer mobile */
    }
    
    .booking-main-container {
        flex-direction: column;
        padding: 16px;
    }
}

/* Mobile: 1 colonna */
@media (max-width: 768px) {
    .booking-style-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .booking-main-container {
        padding: 12px;
        gap: 16px;
    }
    
    .booking-card {
        flex-direction: column;
        box-sizing: border-box;
    }
    
    .booking-style-grid .booking-card-image {
        height: 180px;
    }
    
    .booking-card-content {
        padding: 14px;
    }
    
    .booking-card-title {
        font-size: 15px;
    }
    
    .booking-price {
        font-size: 18px;
    }
    
    .card-image-section {
        width: 100%;
        height: 200px;
        min-width: auto;
    }
    
    .card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .card-header-right {
        min-width: auto;
    }
    
    .price-section {
        text-align: left;
    }
    
    .bottom-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .features {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .feature-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .booking-card-image {
        width: 250px;
        height: 180px;
    }
    
    .booking-card-title {
        font-size: 15px;
    }
    
    .booking-price {
        font-size: 18px;
    }
}