/* CSS per pagina Esplora - VERSIONE FINALE CORRETTA */

.explore-main {
    padding-top: 2rem;
}

/* Search Hero Section */
.search-hero {
    background: linear-gradient(135deg, #138fc5 0%, #47a4cc 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.search-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.search-hero h1 i {
    margin-right: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.search-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Main Search Form */
.main-search-form {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.search-input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.search-input-group i {
    position: absolute;
    left: 1.5rem;
    color: #666;
    z-index: 2;
}

.main-search-input {
    flex: 1;
    border: none;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    background: transparent;
    color: #333;
    outline: none;
}

.main-search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: scale(1.05);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.search-suggestions h4 {
    margin: 0;
    padding: 1rem 1.5rem 0.5rem;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.search-suggestion:hover {
    background: #f8f9fa;
}

.search-suggestion:last-of-type {
    border-bottom: none;
}

.search-suggestion i {
    color: #999;
    width: 16px;
}

.search-suggestion span {
    flex: 1;
    color: #333;
    font-size: 0.9rem;
}

.search-suggestion small {
    color: #999;
    font-size: 0.8rem;
}

.clear-suggestions {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.clear-suggestions button {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    transition: opacity 0.3s ease;
}

.clear-suggestions button:hover {
    opacity: 0.8;
}

/* Quick Location Search */
.quick-location-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-location {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-location:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-location.loading {
    opacity: 0.7;
    pointer-events: none;
}

.location-status {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Explore Content Layout */
.explore-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 2rem;
    overflow: hidden;
}

.filters-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-filters {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.clear-filters:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Filter Sections */
.filter-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.filter-section h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.filter-section h4 i {
    color: #e74c3c;
    width: 16px;
}

/* Filter Options */
.filter-options,
.sort-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.filter-option input[type="radio"]:checked + .radio-custom {
    border-color: #e74c3c;
    background: #e74c3c;
}

.filter-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.option-text {
    flex: 1;
    color: #555;
    font-size: 0.9rem;
}

.count {
    color: #999;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Rating Filter */
.rating-filter {
    padding: 0.5rem 0;
}

.rating-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#ratingSlider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    appearance: none;
}

#ratingSlider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

#ratingSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.rating-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stars-display {
    display: flex;
    gap: 2px;
}

.stars-display i {
    color: #ddd;
    font-size: 0.9rem;
}

.stars-display i.active {
    color: #f39c12;
}

.rating-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* Location Filter */
.location-filter {
    margin-bottom: 1rem;
}

.location-filter:last-child {
    margin-bottom: 0;
}

.location-filter label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

.location-filter select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #555;
    outline: none;
    transition: border-color 0.3s ease;
}

.location-filter select:focus {
    border-color: #e74c3c;
}

/* Geographic Filter */
.geographic-filter {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.current-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #e8f6f3;
    border-radius: 6px;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 0.9rem;
}

.current-location i {
    color: #1abc9c;
}

.btn-remove-geo {
    margin-left: auto;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.btn-remove-geo:hover {
    background: rgba(231, 76, 60, 0.1);
}

.radius-slider {
    margin-top: 1rem;
}

.radius-slider label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

#radiusSlider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    appearance: none;
}

#radiusSlider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1abc9c;
    cursor: pointer;
}

#radiusSlider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1abc9c;
    cursor: pointer;
    border: none;
}

/* Apply Filters Button */
.apply-filters-btn {
    width: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    margin: 1.5rem;
    margin-bottom: 0;
}

.apply-filters-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
}

/* Results Content */
.results-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Results Header */
.results-header {
    padding: 2rem;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.results-info h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.results-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.results-info strong {
    color: #e74c3c;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.view-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    font-size: 1.1rem;
}

.view-btn:hover {
    color: #e74c3c;
    background: #fef5f5;
}

.view-btn.active {
    background: #e74c3c;
    color: white;
}

/* Active Filters */
.active-filters {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filters-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-tag {
    background: #e74c3c;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.clear-all-filters {
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    border: 1px solid #e74c3c;
    transition: all 0.3s ease;
}

.clear-all-filters:hover {
    background: #e74c3c;
    color: white;
}

/* Results Grid */
.results-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Results List - CORRETTO */
.results-list {
    padding: 0;
}

.results-list .place-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
    align-items: flex-start;
}

.results-list .place-item:hover {
    background: #fafafa;
}

.results-list .place-item:last-child {
    border-bottom: none;
}

.results-list .item-image {
    width: 250px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.results-list .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.results-list .item-image:hover img {
    transform: scale(1.05);
}

.results-list .no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2rem;
}

.results-list .item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.results-list .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.results-list .item-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: block;
}

.results-list .item-title:hover {
    color: #e74c3c;
}

.results-list .card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.results-list .card-rating i {
    color: #ddd;
    font-size: 0.9rem;
}

.results-list .card-rating i.active {
    color: #f39c12;
}

.results-list .rating-text {
    color: #666;
    font-size: 0.85rem;
    margin-left: 0.25rem;
    white-space: nowrap;
}

.results-list .item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.results-list .item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.results-list .item-meta i {
    color: #e74c3c;
    width: 14px;
}

.results-list .item-description {
    flex: 1;
    color: #777;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.results-list .item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.results-list .card-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-list .author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.results-list .author-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.results-list .publish-date {
    color: #999;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.results-list .card-stats {
    display: flex;
    gap: 1rem;
}

.results-list .stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.85rem;
}

.results-list .stat i {
    color: #999;
    width: 14px;
}

/* Results Map */
.results-map {
    padding: 0;
}

.places-map {
    width: 100%;
    height: 600px;
}

/* Place Card */
.place-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.place-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(231, 76, 60, 0.2);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2rem;
}

.card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
}

.category-tag {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.distance-tag {
    background: rgba(27, 188, 156, 0.9);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Card Content */
.card-content {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.75rem;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #e74c3c;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.card-location i {
    color: #e74c3c;
    width: 14px;
}

.card-description {
    margin-bottom: 1rem;
}

.card-description p {
    color: #777;
    line-height: 1.5;
    font-size: 0.9rem;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-rating i {
    color: #ddd;
    font-size: 0.9rem;
}

.card-rating i.active {
    color: #f39c12;
}

.rating-text {
    color: #666;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

.card-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    margin-bottom: 0.75rem;
}

.author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.publish-date {
    color: #999;
    font-size: 0.8rem;
    margin-left: auto;
}

.card-stats {
    display: flex;
    gap: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.85rem;
}

.stat i {
    color: #999;
    width: 14px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    color: #ddd;
    margin-bottom: 2rem;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.no-results p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    border-top: 2px solid #f8f9fa;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fef5f5;
}

.page-link.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.page-link.first,
.page-link.last,
.page-link.prev,
.page-link.next {
    font-size: 0.9rem;
}

.pagination-info {
    margin-left: 2rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loading States */
.results-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

.results-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animations per il caricamento delle cards */
.place-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.place-card:nth-child(1) { animation-delay: 0.1s; }
.place-card:nth-child(2) { animation-delay: 0.2s; }
.place-card:nth-child(3) { animation-delay: 0.3s; }
.place-card:nth-child(4) { animation-delay: 0.4s; }
.place-card:nth-child(5) { animation-delay: 0.5s; }
.place-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions */
.results-grid,
.results-list,
.results-map {
    transition: opacity 0.3s ease;
}

.results-grid:not(.active),
.results-list:not(.active),
.results-map:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* Custom scrollbar */
.filters-sidebar {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* RESPONSIVE DESIGN - MOBILE CORRETTO */

@media (max-width: 1200px) {
    .explore-content {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    /* MOBILE: Layout verticale corretto */
    .explore-content {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Filtri sopra i risultati */
    .filters-sidebar {
        order: 1;
        position: static;
        margin-bottom: 0;
        border-radius: 15px 15px 0 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
    
    .results-content {
        order: 2;
        border-radius: 0 0 15px 15px;
        border-top: none;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }
    
    /* Filtri collassabili */
    .filters-header {
        cursor: pointer;
        user-select: none;
        position: relative;
    }
    
    .filters-header::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 6px solid white;
        transition: transform 0.3s ease;
    }
    
    .filters-sidebar.filters-open .filters-header::after {
        transform: rotate(180deg);
    }
    
    /* Form nascosto di default su mobile */
    .filters-form {
        display: none;
    }
    
    .filters-sidebar.filters-open .filters-form {
        display: block;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .view-btn {
        flex: 1;
        max-width: 100px;
    }
}

@media (max-width: 768px) {
    .explore-main {
        padding-top: 1rem;
    }
    
    .search-hero {
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
        padding: 2rem 1rem;
    }
    
    .search-hero h1 {
        font-size: 1.8rem;
    }
    
    .search-hero p {
        font-size: 1rem;
    }
    
    /* Search form responsive */
    .search-input-group {
        flex-direction: column;
        align-items: stretch;
        border-radius: 15px;
        padding: 1rem;
        gap: 1rem;
    }
    
    .main-search-input {
        padding: 1rem;
        padding-left: 3rem;
        border-radius: 10px;
    }
    
    .search-btn {
        border-radius: 10px;
        padding: 1rem;
        min-width: auto;
    }
    
    .quick-location-search {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Layout mobile */
    .results-content,
    .filters-sidebar {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    /* Lista responsive */
    .results-list .place-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .results-list .item-image {
        width: 100%;
        height: 200px;
    }
    
    .results-list .item-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .results-list .card-rating {
        align-self: flex-start;
    }
    
    .place-card:hover {
        transform: none;
    }
    
    /* Suggerimenti responsive */
    .search-suggestions {
        margin: 0 -1rem;
        border-radius: 0;
        left: -1rem;
        right: -1rem;
    }
}

@media (max-width: 480px) {
    .explore-main {
        padding-top: 0.5rem;
    }
    
    .search-hero {
        padding: 1.5rem 0.5rem;
    }
    
    .search-hero h1 {
        font-size: 1.5rem;
    }
    
    .search-hero p {
        font-size: 0.9rem;
    }
    
    .main-search-form {
        margin: 0 auto 1rem;
    }
    
    .search-input-group {
        padding: 0.75rem;
    }
    
    .main-search-input {
        font-size: 1rem;
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    }
    
    .search-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .filters-sidebar,
    .results-content {
        margin: 0 -0.5rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-image {
        height: 160px;
    }
    
    .results-list .place-item {
        padding: 1rem;
    }
    
    .results-list .item-image {
        height: 180px;
    }
    
    .results-header {
        padding: 1rem;
    }
    
    .results-info h2 {
        font-size: 1.2rem;
    }
    
    .view-toggle {
        margin-top: 1rem;
    }
    
    .active-filters {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .clear-all-filters {
        margin-left: 0;
        margin-top: 0.5rem;
        align-self: flex-start;
    }
    
    .pagination {
        padding: 1rem 0.5rem;
    }
    
    .pagination-info {
        font-size: 0.8rem;
        margin: 1rem 0 0 0;
        width: 100%;
        text-align: center;
    }
}

/* Focus states per accessibilità */
.main-search-input:focus,
.location-filter select:focus,
#ratingSlider:focus,
#radiusSlider:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.filter-option:focus-within {
    background: #fef5f5;
    outline: 2px solid rgba(231, 76, 60, 0.3);
    outline-offset: -2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .place-card {
        border: 2px solid #000;
    }
    
    .filter-option {
        border: 1px solid #666;
    }
    
    .search-input-group {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .place-card:hover {
        transform: none;
    }
    
    .search-input-group:focus-within {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .filters-sidebar,
    .results-content {
        background: #2c3e50;
        color: white;
    }
    
    .place-card {
        background: #34495e;
        color: white;
    }
    
    .card-title a {
        color: #ecf0f1;
    }
    
    .card-title a:hover {
        color: #e74c3c;
    }
    
    .filter-section {
        border-bottom-color: #4a5f7a;
    }
    
    .location-filter select {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
    
    .results-header {
        background: #34495e;
    }
    
    .active-filters {
        background: #34495e;
        border-bottom-color: #4a5f7a;
    }
    
    .pagination {
        border-top-color: #4a5f7a;
    }
    
    .page-link {
        background: #34495e;
        border-color: #4a5f7a;
        color: #bdc3c7;
    }
    
    .page-link:hover {
        background: #4a5f7a;
        border-color: #e74c3c;
        color: white;
    }
    
    .search-suggestions {
        background: #34495e;
        border-color: #4a5f7a;
        color: white;
    }
    
    .search-suggestion:hover {
        background: #4a5f7a;
    }
}