/* Provider Directory Frontend Styles */

.provider-directory-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Filters */
.provider-filters {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.filter-group button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.filter-group button:hover {
    background: #005a87;
}

.filter-group button:last-child {
    background: #666;
    margin-right: 0;
}

.filter-group button:last-child:hover {
    background: #444;
}

/* Map Container */
#provider-map {
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Info Window Styles */
.provider-info-window {
    max-width: 300px;
    padding: 10px;
}

.provider-info-window h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.provider-info-window p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.provider-info-window img {
    border-radius: 4px;
    object-fit: cover;
}

.provider-info-window .button {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.provider-info-window .button:hover {
    background: #005a87;
}

/* Provider List Container */
.provider-list-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Provider Grid */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.provider-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.provider-image {
    height: 200px;
    overflow: hidden;
}

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

.provider-info {
    padding: 20px;
}

.provider-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    line-height: 1.3;
}

.provider-position {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
    font-style: italic;
}

.provider-specialization {
    color: #007cba !important;
    font-weight: 600;
    margin: 5px 0;
    font-size: 14px;
}

.provider-address {
    color: #666;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.provider-tags {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.provider-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #ddd;
}

.provider-social {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

.social-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.social-link.facebook {
    background: #1877f2;
    color: white;
}

.social-link.facebook:hover {
    background: #166fe5;
}

.social-link.instagram {
    background: #e4405f;
    color: white;
}

.social-link.instagram:hover {
    background: #d62953;
}

.social-link.linkedin {
    background: #0077b5;
    color: white;
}

.social-link.linkedin:hover {
    background: #006ba1;
}

.view-details-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease;
}

.view-details-btn:hover {
    background: #005a87;
}

/* Featured Providers Grid */
.featured-providers-grid {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.featured-providers-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.featured-providers-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.featured-providers-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.featured-provider-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.provider-thumbnail {
    height: 200px;
    overflow: hidden;
}

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

.featured-provider-card:hover .provider-thumbnail img {
    transform: scale(1.05);
}

.provider-content {
    padding: 20px;
}

.provider-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.provider-content h3 a {
    color: #333;
    text-decoration: none;
}

.provider-content h3 a:hover {
    color: #007cba;
}

.provider-title {
    color: #666;
    font-size: 14px;
    margin: 5px 0 10px 0;
    font-style: italic;
}

.provider-location {
    color: #666;
    margin: 10px 0;
    font-size: 14px;
}

.provider-excerpt {
    color: #555;
    margin: 15px 0;
    line-height: 1.5;
    font-size: 14px;
}

.read-more-btn {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.read-more-btn:hover {
    background: #005a87;
}

/* Pagination */
.provider-pagination {
    text-align: center;
    margin: 30px 0;
}

.pagination-links {
    display: inline-flex;
    gap: 5px;
}

.pagination-links a,
.pagination-links .current-page {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.pagination-links a:hover {
    background: #f0f0f0;
}

.pagination-links .current-page {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Modal */
.provider-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* No Results */
.no-providers,
.no-featured-providers {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .provider-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .featured-providers-grid {
        grid-template-columns: 1fr !important;
    }
    
    .provider-social {
        flex-direction: column;
        gap: 5px;
    }
    
    .social-link {
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
}