/* Category Filters CSS */

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 2rem;
    height: auto;
    overflow: visible;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filter-header h4 {
    color: #140000;
    margin: 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.filter-toggle {
    background: none;
    border: none;
    color: #f06421;
    font-size: 1.2rem;
    display: none;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.filter-toggle:hover {
    background: #f8f9fa;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group-title {
    color: #140000;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.filter-group-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #f06421;
    margin-right: 0.5rem;
    border-radius: 2px;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
    background: #fff;
}

.filter-option:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    accent-color: #f06421;
    cursor: pointer;
    position: relative;
}

.filter-option label {
    cursor: pointer;
    margin: 0;
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    transition: color 0.3s ease;
}

/* Selected state styling */
.filter-option input[type="checkbox"]:checked + .filter-label,
.filter-option input[type="radio"]:checked + .filter-label {
    color: #f06421;
    font-weight: 600;
}

/* Modern browsers with :has() support */
.filter-option:has(input[type="checkbox"]:checked),
.filter-option:has(input[type="radio"]:checked) {
    background: rgba(240, 100, 33, 0.1);
    border-color: #f06421;
    box-shadow: 0 2px 8px rgba(240, 100, 33, 0.15);
}

/* Fallback for older browsers - using JavaScript to add class */
.filter-option.selected {
    background: rgba(240, 100, 33, 0.1);
    border-color: #f06421;
    box-shadow: 0 2px 8px rgba(240, 100, 33, 0.15);
    transform: translateY(-1px);
}

/* Add a subtle animation for selected state */
.filter-option.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f06421;
    border-radius: 0 2px 2px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        width: 0;
    }
    to {
        width: 4px;
    }
}

/* Custom checkbox styling for better visibility */
.filter-option input[type="checkbox"] {
    appearance: none;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:hover {
    border-color: #f06421;
    box-shadow: 0 0 0 2px rgba(240, 100, 33, 0.1);
}

.filter-option input[type="checkbox"]:checked {
    background: #f06421;
    border-color: #f06421;
    box-shadow: 0 0 0 2px rgba(240, 100, 33, 0.2);
}

.filter-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    animation: checkmark 0.2s ease;
}

@keyframes checkmark {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Radio button styling */
.filter-option input[type="radio"] {
    appearance: none;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-option input[type="radio"]:hover {
    border-color: #f06421;
    box-shadow: 0 0 0 2px rgba(240, 100, 33, 0.1);
}

.filter-option input[type="radio"]:checked {
    background: #f06421;
    border-color: #f06421;
    box-shadow: 0 0 0 2px rgba(240, 100, 33, 0.2);
}

.filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: radioDot 0.2s ease;
}

@keyframes radioDot {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #f06421;
    box-shadow: 0 0 0 0.2rem rgba(240, 100, 33, 0.15);
    outline: none;
}

/* Filter Actions */
.filter-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

/* Buttons */
.btn-primary {
    background: #f06421;
    border-color: #f06421;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #e55a1a;
    border-color: #e55a1a;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Results Header */
.results-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.results-title {
    color: #140000;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.results-count {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Location Cards */
.locations-grid .row {
    margin: 0 -10px;
}

.locations-grid .col-md-6,
.locations-grid .col-lg-4 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.location-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.location-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.location-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.location-card:hover .location-image {
    transform: scale(1.05);
}

.location-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f06421, #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.8;
}

/* Badges */
.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(45deg, #f06421, #ff8c42);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(240, 100, 33, 0.3);
}

.phot-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Location Content */
.location-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 220px);
}

.location-title {
    margin-bottom: 0.75rem;
}

.location-title a {
    color: #140000;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.location-title a:hover {
    color: #f06421;
}

.location-address {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
}

.location-address::before {
    content: '📍';
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.location-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.stars {
    color: #f39c12;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.star.empty {
    color: #ddd;
}

.rating-text {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

.rating-text.no-rating {
    color: #999;
    font-style: italic;
}

.location-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    margin-top: auto;
}

.category-tag {
    background: linear-gradient(45deg, #f06421, #ff8c42);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.date {
    color: #999;
    font-size: 0.8rem;
}

.location-btn {
    width: 100%;
    border: 2px solid #f06421;
    color: #f06421;
    background: transparent;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.location-btn:hover {
    background: #f06421;
    border-color: #f06421;
    color: white;
    transform: translateY(-1px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-link {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

.pagination-link:hover {
    background: #f06421;
    border-color: #f06421;
    color: white;
    transform: translateY(-2px);
}

.pagination-link.active {
    background: #f06421;
    border-color: #f06421;
    color: white;
}

/* No Results */
.no-results {
    background: white;
    border-radius: 15px;
    padding: 4rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.no-results i {
    color: #f06421;
    margin-bottom: 1.5rem;
}

.no-results h3 {
    color: #140000;
    margin-bottom: 1rem;
}

.no-results p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .filter-toggle {
        display: block;
    }
    
    .filter-content {
        display: none;
        margin-top: 1rem;
    }
    
    .filter-content.show {
        display: block;
    }
    
    .filter-sidebar {
        position: static;
        margin-bottom: 1rem;
    }
    
    .results-title {
        font-size: 1.8rem;
    }
    
    .location-content {
        padding: 1rem;
    }
    
    .location-title a {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .results-header {
        padding: 1.5rem;
    }
    
    .results-title {
        font-size: 1.5rem;
    }
    
    .locations-grid .col-md-6 {
        margin-bottom: 15px;
    }
    
    .location-image-container {
        height: 180px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .pagination-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Additional responsive improvements for filter options */
@media (max-width: 991.98px) {
    .filter-option {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .filter-option input[type="checkbox"],
    .filter-option input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 1rem;
    }
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .filter-sidebar {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filter-option {
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .filter-option input[type="checkbox"]:checked::after {
        font-size: 14px;
    }
    
    .filter-option input[type="radio"]:checked::after {
        width: 8px;
        height: 8px;
    }
}
