/* Directory Page Styles */

/* Header */
.directory-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
}

.directory-header h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.directory-header p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    padding: 60px 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.dropdown-btn:hover {
    border-color: #cbd5e1;
    background-color: white;
}

.dropdown-btn.active {
    border-color: #92400e;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(146, 64, 14, 0.1);
}

.dropdown-btn i {
    transition: transform 0.2s ease;
}

.dropdown-btn.active i {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown-content.show {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-option:hover {
    background-color: #f8fafc;
}

.dropdown-option.active {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 500;
}

.dropdown-option input[type="checkbox"] {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    accent-color: #92400e;
}

.dropdown-option label {
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
    margin: 0;
    flex: 1;
}

/* Update dropdown text to show selected items */
.dropdown-text {
    color: #1a1a1a;
}

.dropdown-text.has-selection {
    color: #92400e;
    font-weight: 500;
}

/* Remove old select styles */
.filter-group select {
    display: none;
}

/* Results Section */
.results-section {
    padding: 60px 0;
    background: #f8fafc;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-control label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-control .custom-dropdown {
    min-width: 180px;
}

.results-count {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.results-count span {
    color: #92400e;
    font-weight: 600;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.housing-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.housing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.card-type {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
}

.card-location i {
    color: #92400e;
}

.card-description {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.service-tag {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.card-contact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.contact-item i {
    color: #92400e;
    width: 16px;
}

.contact-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #92400e;
}

.website-link {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.website-link:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.website-link i {
    font-size: 12px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 16px;
    color: #64748b;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .directory-header {
        padding: 100px 0 40px;
    }
    
    .directory-header h1 {
        font-size: 36px;
    }
    
    .search-section {
        padding: 40px 0;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .results-header h2 {
        font-size: 28px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .housing-card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .website-link {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .directory-header h1 {
        font-size: 32px;
    }
    
    .directory-header p {
        font-size: 16px;
    }
    
    .results-header h2 {
        font-size: 24px;
    }
    
    .housing-card {
        padding: 16px;
    }
} 