/* ========== FILTRI TOUR - STILE COMPLETO ========== */

.tour-filters-wrapper {
    margin: 30px 0 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 25px 25px 15px;
}

/* Riga filtri */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

/* Singolo filtro */
.filter-item {
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 200px;
}

/* Label dei filtri */
.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Select stile */
.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:hover {
    border-color: #adb5bd;
    background-color: #f8f9fa;
}

.filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

/* Input numerici */
.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-input:hover {
    border-color: #adb5bd;
}

.filter-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.filter-input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

/* Filtri specifici larghezza */
.filter-price,
.filter-duration,
.filter-seats {
    min-width: 130px;
    max-width: 150px;
}

/* Azioni filtri */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    max-width: none;
    margin-left: auto;
}

/* Bottone applica filtri */
.apply-filters-btn {
    padding: 10px 20px;
    background: var(--caltoaction);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.apply-filters-btn:hover {
    background: #005a87;
}

/* Link reset filtri */
.reset-filters-link {
    color: #6c757d;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.reset-filters-link:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* ===== BARRA FILTRI ATTIVI ===== */
.active-filters-bar {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

.active-filter-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #e7f3ff;
    color: #0073aa;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.active-filter-badge:hover {
    background: #d4e9ff;
}

/* ===== STILE PER NESSUN RISULTATO ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    width: 100%;
}

.no-results h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 25px;
}

.reset-filters-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.reset-filters-btn:hover {
    background: #005a87;
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .filters-row {
        gap: 12px;
    }
    
    .filter-item {
        min-width: 140px;
    }
    
    .filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        margin-top: 5px;
    }
}

@media (max-width: 992px) {
    .tour-filters-wrapper {
        padding: 20px;
    }
    
    .filter-item {
        min-width: calc(50% - 8px);
        max-width: none;
        flex: 1 1 calc(50% - 8px);
    }
    
    .filter-price,
    .filter-duration,
    .filter-seats {
        min-width: calc(50% - 8px);
        max-width: none;
    }
    
    .filter-actions {
        min-width: 100%;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .active-filters-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .active-filter-badge {
        width: 100%;
        text-align: center;
    }
}

/* ===== OTTIMIZZAZIONI PER IL TUO GRID ESISTENTE ===== */
.archiveLoopGrid {
    margin-top: 40px !important;
}

.gridPresenCard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Stile per il conteggio risultati */
.search-results-count {
    margin-bottom: 20px;
    font-size: 15px;
    color: #6c757d;
}

/* Animazioni smooth */
.filters-row, 
.active-filters-bar,
.filter-select,
.filter-input,
.apply-filters-btn {
    transition: all 0.2s ease-in-out;
}

/* ===== FILTRI MOBILE MODAL ===== */
.filters-mobile-trigger {
    display: none;
    width: 100%;
    padding: 16px 20px;
    background: var(--caltoaction);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.filters-trigger-count {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
}

.filters-trigger-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* Modal overlay */
.filters-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    backdrop-filter: blur(5px);
}

/* Modal container */
.filters-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 9999;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Modal header */
.filters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.filters-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.filters-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0 10px;
}

/* Modal content (scrollabile) */
.filters-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px; /* Spazio per il footer fisso */
}

/* Footer modal - FISSO IN BASSO */
.filters-modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    gap: 12px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.modal-reset-btn,
.modal-apply-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.modal-reset-btn {
    background: #f8f9fa;
    color: #dc3545;
    border: 1px solid #dee2e6;
}

.modal-apply-btn {
    background: var(--caltoaction);
    color: white;
    border: none;
}

/* Desktop: nascondi modal, mostra filtri normali */
@media (min-width: 769px) {
    .filters-mobile-trigger,
    .filters-modal,
    .filters-modal-overlay {
        display: none !important; 
    }
	/* ✅ MOSTRA IL FORM DESKTOP */
    .filters-row {
        display: flex !important;
    }
}

/* Mobile: nascondi filtri normali, mostra trigger */
@media (max-width: 768px) {
   .tour-filters-wrapper {
        padding: 0;
        background: transparent;
        box-shadow: none;
        margin: 20px 0;
    }
    
    .filters-row {
        display: none;
        padding: 20px;
        background: #fff;
        border: 1px solid #e9ecef;
        border-top: none;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        margin-top: 0;
    }
    
    .filters-row.show {
        display: flex;
    }
    
    .filter-item {
        min-width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .filter-price,
    .filter-duration,
    .filter-seats {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .apply-filters-btn {
        width: 100%;
    }
    
    .reset-filters-link {
        text-align: center;
    }
    
    .active-filters-bar {
        margin-top: 15px;
        padding: 12px 15px;
        background: #fff;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }
.filters-row {
        display: none !important;
    }
    
    .filters-mobile-trigger {
        display: block;
    }
    
    .filters-modal.active,
    .filters-modal-overlay.active {
        display: flex;
    }
    
    .filters-modal-overlay.active {
        display: block;
    }
    
    .filter-group {
        margin-bottom: 20px;
    }
    
    .filter-group label {
        display: block;
        font-weight: 700;
        margin-bottom: 8px;
        color: #495057;
    }
    
    .filter-select,
    .filter-input {
        width: 100%;
        padding: 14px;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        font-size: 16px;
		height:auto;
    }
}

/* Badge filtri attivi */
.active-filters-bar {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.active-filter-badge {
    padding: 6px 12px;
    background: #e7f3ff;
    color: #0073aa;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}