/* Search Listings Page - Enhanced */

.doa-search-page {
    background: white;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Override GeneratePress containers */
.page-template-page-search {
    max-width: 100% !important;
}

.page-template-page-search .site-content,
.page-template-page-search .content-area,
.page-template-page-search .inside-article {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Full Width Container */
.doa-container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Hero Section */
.search-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0 80px;
    color: white;
    text-align: left;
}

.search-hero h1 {
    margin: 0 0 12px;
    font-size: 48px;
    color: white;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 20px;
    margin: 0 0 48px;
    opacity: 0.95;
}

/* Location Autocomplete Suggestions */
.search-field-wrapper {
    position: relative;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.location-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f7fafc;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #2d3748;
}

.location-suggestion-item:hover {
    background: #f7fafc;
    color: #667eea;
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

/* Enhanced Search Form */
.search-form-enhanced {
    max-width: 1200px;
    margin: 0 auto;
}

.search-row-primary {
    display: grid;
    grid-template-columns: 2fr 2fr 1.5fr auto;
    gap: 12px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.search-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.search-field input[type="text"],
.search-field select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Only add left padding when there's an icon */
.search-field.has-icon input[type="text"],
.search-field.has-icon select {
    padding-left: 44px;
}

/* Custom dropdown arrow for selects */
.search-field select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M1 1l5 5 5-5"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.search-field input[type="text"]:focus,
.search-field select:focus {
    outline: none;
    border-color: #3a9d82;
    box-shadow: 0 0 0 3px rgba(58, 157, 130, 0.1);
}

.search-field-location input {
    padding-right: 16px;
}

.use-location-btn-text {
    background: transparent;
    border: none;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.use-location-btn-text:hover {
    color: #3a9d82;
    text-decoration: underline;
}

.use-location-btn-text i {
    color: #3a9d82;
}

.use-location-btn-text i {
    font-size: 14px;
}

.btn-search-main {
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    align-self: start;
}

.btn-search-main i {
    font-size: 14px;
}

.btn-search-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Advanced Filters Toggle */
.advanced-toggle {
    text-align: center;
    margin-top: 16px;
}

.btn-toggle-filters {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-toggle-filters:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Advanced Filters Row */
.search-row-advanced {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 12px;
}

.btn-clear-filters {
    padding: 10px 18px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

/* Results Section */
.search-results {
    padding: 60px 0;
    background: #f8f9fa;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-info {
    flex: 1;
}

.results-count {
    color: #333;
    font-size: 18px;
    margin: 0 0 12px;
}

.results-count strong {
    color: #3a9d82;
    font-size: 24px;
}

.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-badge {
    background: white;
    color: #666;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    border: 2px solid #e0e0e0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-badge i {
    color: #3a9d82;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-sort label {
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.sort-select {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.listing-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.listing-card.featured-listing {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25), 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.featured-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.listing-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-photo {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.listing-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 64px;
}

.photo-placeholder .initials {
    font-size: 72px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.listing-content {
    padding: 20px;
}

.listing-content h3 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #333;
    font-weight: 700;
}

.listing-content .credentials {
    font-size: 13px;
    color: #3a9d82;
    font-weight: 600;
    margin: 0 0 6px;
}

.practice-name {
    color: #667eea;
    font-size: 13px;
    margin: 0 0 10px;
    font-weight: 500;
}

.listing-location {
    color: #666;
    font-size: 13px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-location i {
    color: #3a9d82;
    font-size: 12px;
}

.telehealth-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5f1;
    color: #3a9d82;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    margin-right: 6px;
}

.lgbtq-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.listing-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.specialty-tag {
    background: #f0f0f0;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
}

.specialty-more {
    color: #999;
    font-size: 11px;
    padding: 4px 10px;
}

.listing-cta {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.listing-cta i {
    font-size: 11px;
}

.listing-card:hover .listing-cta {
    color: #764ba2;
    gap: 10px;
}

/* Pagination */
.search-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.search-pagination a,
.search-pagination span {
    padding: 10px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-pagination a:hover {
    border-color: #3a9d82;
    color: #3a9d82;
    transform: translateY(-2px);
}

.search-pagination .current {
    background: linear-gradient(135deg, #3a9d82 0%, #2d7a66 100%);
    color: white;
    border-color: transparent;
}

.search-pagination .current i {
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.no-results i {
    font-size: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

.no-results h2 {
    color: #333;
    margin: 0 0 16px;
    font-size: 32px;
}

.no-results p {
    color: #666;
    margin: 0 0 32px;
    font-size: 16px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .search-row-primary {
        grid-template-columns: 1fr 1fr;
    }

    .btn-search-main {
        grid-column: 1 / -1;
    }

    .search-row-advanced {
        grid-template-columns: 1fr 1fr;
    }

    .btn-clear-filters {
        grid-column: 1 / -1;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .listing-photo {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .doa-container-full {
        padding: 0 20px;
    }

    .search-hero {
        padding: 40px 0 60px;
    }

    .search-hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .search-row-primary,
    .search-row-advanced {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .listing-photo {
        height: 200px;
    }
}
