/* ==========================================================================
   STILI GETYOURGUIDE - CAROSELLO SCORREVOLE ORIZZONTALE & CARD COMPATTE
   ========================================================================== */

/* Filtri Categoria */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    background-color: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: #f59e0b;
    color: #d97706;
}

.filter-btn.active {
    background-color: #0b2545;
    color: white;
    border-color: #0b2545;
    box-shadow: 0 3px 10px rgba(11, 37, 69, 0.25);
}

/* Contenitore Wrapper dello Slider Orizzontale Stile GetYourGuide */
.grid-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    padding: 0 45px; /* Spazio laterale dedicato affinché le frecce restino completamente ALL'ESTERNO delle card! */
}

/* Griglia / Row Scorrevole Orizzontale */
.grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 4px 25px 4px;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar Sottile ed Elegante */
.grid::-webkit-scrollbar {
    height: 7px;
}
.grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Frecce Fluttuanti di Navigazione Orizzontale Posizionate all'Esterno */
.slider-nav-btn {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #0b2545;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.slider-nav-btn:hover {
    background: #0b2545;
    color: #ffffff;
    border-color: #0b2545;
    box-shadow: 0 6px 18px rgba(11, 37, 69, 0.35);
}

.slider-nav-btn.left {
    left: 0;
}

.slider-nav-btn.right {
    right: 0;
}

@media (max-width: 768px) {
    .grid-wrapper {
        padding: 0 5px;
    }
    .slider-nav-btn {
        display: none; /* Su cellulare si usa lo scorrimento touch fluido nativo */
    }
}

/* Card Compatte Rettangolari Stile GetYourGuide */
.card {
    flex: 0 0 290px;
    width: 290px;
    max-width: 290px;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(11, 37, 69, 0.15);
    border-color: #f59e0b;
}

/* Immagine Copertina Card (Rettangolare 195px) */
.card-img-container {
    position: relative;
    height: 195px;
    overflow: hidden;
    background-color: #0b2545;
    border-radius: 16px 16px 0 0;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.card:hover .carousel-img {
    transform: scale(1.05);
}

/* Pulsanti Frecce Interni per le Foto del Carosello (Visibili solo al passaggio del mouse) */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.card-img-container:hover .carousel-nav-btn {
    opacity: 1;
}

.carousel-nav-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.carousel-nav-btn.prev {
    left: 8px;
}

.carousel-nav-btn.next {
    right: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 5;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
    background: #f59e0b;
    transform: scale(1.3);
}

/* Contenuto Testuale Card GetYourGuide */
.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.badges-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-star {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.card h3 {
    margin: 0 0 6px 0;
    color: #0b2545;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
}

.card-desc {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

/* Dettagli Pratici / Chips GetYourGuide */
.card-chips {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
}

/* Bottone Call To Action Stile GetYourGuide */
.btn-tour {
    background: linear-gradient(135deg, #0b2545 0%, #134074 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(11, 37, 69, 0.2);
    width: 100%;
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-tour:hover {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
    box-shadow: 0 5px 14px rgba(217, 119, 6, 0.35);
    transform: translateY(-1px);
}

.card-footer {
    margin-top: auto;
}

/* Modal Dettagli Tour Ridisegnato */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.85);
}

.modal-header-info {
    padding: 22px 25px 12px 25px;
}

.modal-header-info h2 {
    font-size: 1.8rem;
    color: #0b2545;
    margin-top: 6px;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Box Dettagli Pratici Modale */
.tour-highlights-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.highlight-item {
    font-size: 0.9rem;
    color: #334155;
    overflow-wrap: anywhere;
}

/* Contenuto della Modale */
.modal-body {
    padding: 0 25px 20px 25px;
    font-size: 0.98rem;
    color: #334155;
    line-height: 1.6;
    overflow-x: hidden;
}

.modal-body h3 {
    font-size: 1.2rem;
    color: #0b2545;
    margin-top: 22px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Riquadro Panoramica del Tour */
#modal-description-text {
    background-color: #f8fafc;
    border-left: 4px solid #0b2545;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

/* Timeline Tappe del Tour */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 5px;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.step-number {
    background-color: #0b2545;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
    flex: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Chips Servizi Inclusi */
.services-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    line-height: 1.5;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.btn-whatsapp-modal {
    background-color: #25d366 !important;
}

.btn-whatsapp-modal:hover {
    background-color: #1da851 !important;
}

.modal-footer {
    padding: 18px 25px 25px 25px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
}
