/* Rehab Directory Styles */
.rehab-hero {
    background: linear-gradient(rgba(26, 82, 118, 0.8), rgba(26, 82, 118, 0.9)), url('../images/rehab-center-hero.jpg');
    background-size: cover;
    background-position: center;
    padding: 5rem 0;
    color: var(--white);
}

.rehab-hero .hero-content {
    padding-top: 3rem;
    max-width: 100%;
}

.rehab-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.rehab-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--white);
}

.search-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.search-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.search-tab.active {
    color: var(--white);
}

.search-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    position: relative;
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-family: var(--font-primary);
    outline: none;
}

.btn-search {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-end;
}

.btn-search:hover {
    background-color: #d14215;
    transform: translateY(-3px);
}

/* Directory Tools */
.directory-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray);
}

.results-count h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.results-count p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.view-options {
    display: flex;
    gap: 1rem;
}

.view-option {
    background-color: var(--white);
    border: 1px solid var(--gray);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-option.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-filter {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-filter:hover {
    background-color: var(--dark-color);
}

/* Directory Content */
.directory-content {
    display: flex;
    gap: 2rem;
}

.filters-sidebar {
    flex: 0 0 300px;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray);
}

.filter-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.filter-section h5 {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.btn-clear-filters {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: auto;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-family: var(--font-primary);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.price-range {
    margin-top: 1rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.selected-price {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.rating-filter {
    margin-top: 0.5rem;
}

.star-rating {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray-dark);
    transition: var(--transition);
}

.star-rating input:checked ~ label {
    color: var(--warning);
}

.btn-apply-filters {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-apply-filters:hover {
    background-color: var(--dark-color);
}

.results-section {
    flex: 1;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rehab-card {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.rehab-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.rehab-image {
    flex: 0 0 300px;
    position: relative;
}

.rehab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rehab-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--white);
}

.rehab-badge.premium {
    background-color: var(--primary-color);
}

.rehab-badge.luxury {
    background-color: var(--accent-color);
}

.rehab-badge.faith {
    background-color: var(--info);
}

.rehab-badge.affordable {
    background-color: var(--success);
}

.btn-save {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.btn-save:hover {
    background-color: var(--white);
    color: var(--accent-color);
}

.btn-save.saved {
    color: var(--accent-color);
}

.rehab-details {
    flex: 1;
    padding: 1.5rem;
}

.rehab-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rehab-header h3 {
    margin-bottom: 0;
}

.rehab-header h3 a {
    color: var(--dark-color);
    transition: var(--transition);
}

.rehab-header h3 a:hover {
    color: var(--primary-color);
}

.rehab-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rehab-rating .stars {
    color: var(--warning);
}

.rehab-rating .rating {
    font-size: 0.9rem;
    color: var(--text-light);
}

.rehab-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.rehab-location i {
    color: var(--primary-color);
}

.rehab-type {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-badge.inpatient {
    background-color: rgba(26, 82, 118, 0.1);
    color: var(--primary-color);
}

.type-badge.outpatient {
    background-color: rgba(88, 214, 141, 0.1);
    color: var(--secondary-color);
}

.type-badge.detox {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

.type-badge.private {
    background-color: rgba(29, 53, 87, 0.1);
    color: var(--info);
}

.type-badge.government {
    background-color: rgba(42, 157, 143, 0.1);
    color: var(--success);
}

.type-badge.faith {
    background-color: rgba(255, 190, 11, 0.1);
    color: #d4a017;
}

.type-badge.luxury {
    background-color: rgba(233, 78, 27, 0.1);
    color: #e94e1b;
}

.type-badge.holistic {
    background-color: rgba(168, 218, 220, 0.2);
    color: #4a8fe7;
}

.type-badge.low-cost {
    background-color: rgba(106, 168, 79, 0.1);
    color: #6aa84f;
}

.rehab-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

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

.rehab-price {
    text-align: right;
}

.rehab-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.rehab-price .duration {
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn-view {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-view:hover {
    background-color: var(--dark-color);
    transform: translateY(-3px);
}

/* Map View */
.results-map {
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
}

#southern-africa-map {
    height: 100%;
    width: 100%;
}

.map-legend {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.map-legend h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.legend-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-icon.government {
    background-color: var(--success);
}

.legend-icon.private {
    background-color: var(--primary-color);
}

.legend-icon.faith {
    background-color: var(--info);
}

.legend-icon.luxury {
    background-color: var(--accent-color);
}

.legend-icon.affordable {
    background-color: var(--secondary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.btn-pagination {
    background-color: var(--white);
    border: 1px solid var(--gray);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-pagination:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    background-color: var(--white);
    border: 1px solid var(--gray);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.page-number.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-number:hover:not(.active) {
    background-color: var(--light-color);
}

/* Why Choose Section */
.why-choose-section {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    margin-bottom: 1rem;
}

/* Need Help Section */
.need-help-section {
    padding: 0 0 5rem;
}

.help-card {
    display: flex;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.help-content {
    flex: 1;
    padding: 3rem;
}

.help-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.help-contacts {
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.contact-method h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.help-image {
    flex: 1;
}

.help-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .directory-content {
        flex-direction: column;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .rehab-card {
        flex-direction: column;
    }
    
    .rehab-image {
        flex: auto;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .directory-tools {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .help-card {
        flex-direction: column;
    }
    
    .help-image {
        order: -1;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .rehab-hero h1 {
        font-size: 2.2rem;
    }
    
    .rehab-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .rehab-price {
        text-align: left;
    }
    
    .btn-view {
        width: 100%;
    }
}