/* Search Page Styles */

/* Search Hero Section */
.search-hero {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%230d6efd" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.search-hero .hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.search-hero .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.1;
}

.search-hero .hero-description {
    font-size: 1.1rem;
    color: #5a6c7d;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Filters */
.search-filters {
    padding: 2rem 0;
    background: #f8fafc;
}

.filters-card {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.08);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filters-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-select,
.search-input {
    padding: 0.75rem 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: #3CB8E6;
    box-shadow: 0 0 0 3px rgba(60, 184, 230, 0.1);
}

.filter-select option {
    background: #ffffff;
    color: #2c3e50;
}

.search-input-container {
    position: relative;
    display: flex;
}

.search-input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.search-btn {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #3CB8E6, #2a9fd6);
    border: 1px solid #3CB8E6;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2a9fd6, #1e8bb8);
    transform: translateY(-1px);
}

/* Search Results */
.search-results {
    padding: 3rem 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    color: #5a6c7d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.results-grid.list-view {
    grid-template-columns: 1fr;
}

.business-card {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.08);
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(60, 184, 230, 0.15);
    border-color: #3CB8E6;
}

.business-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.business-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3CB8E6, #2a9fd6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
}

.business-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    display: none;
}

.business-info h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.business-category {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.business-location {
    color: #7a8a9a;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.business-rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.15rem;
}

.star {
    color: #ffd700;
    font-size: 0.9rem;
}

.star.empty {
    color: #e1e8ed;
}

.rating-text {
    color: #5a6c7d;
    font-size: 0.9rem;
    font-weight: 500;
}

.business-description {
    color: #5a6c7d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.business-footer {
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: auto;
}

.business-btn {
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, #3CB8E6, #2a9fd6);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.business-btn:hover {
    background: linear-gradient(135deg, #2a9fd6, #1e8bb8);
    transform: translateY(-1px);
}

.business-btn-secondary {
    background: #ffffff;
    border: 1px solid #3CB8E6;
    color: #3CB8E6;
}

.business-btn-secondary:hover {
    background: #e0f2fe;
    color: #1d4ed8;
}

/* List View Styles */
.results-grid.list-view .business-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.results-grid.list-view .business-header {
    flex: 1;
    margin-bottom: 0;
}

.results-grid.list-view .business-info {
    flex: 1;
}

.results-grid.list-view .business-rating,
.results-grid.list-view .business-description {
    margin-bottom: 0.5rem;
}

.results-grid.list-view .business-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    color: #5a6c7d;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: #3CB8E6;
    border-color: #3CB8E6;
    color: #ffffff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #5a6c7d;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #5a6c7d;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #e1e8ed;
}

.no-results h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-hero .hero-title {
        font-size: 2.2rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid.list-view .business-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .results-grid.list-view .business-footer {
        width: 100%;
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .filters-card {
        padding: 1.5rem;
    }
    
    .filters-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .business-card {
        padding: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}
