/* =========================================
   SEARCH & SERVICE DIRECTORY STYLES
   ========================================= */

/* Layout */
body.search-layout {
    display: block;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg-body);
}

/* Search Header */
.search-header {
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.search-bar-compact {
    background: var(--bg-body);
    padding: 6px;
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.search-bar-compact .search-icon {
    font-size: 1.1rem;
    margin-left: 1rem;
    opacity: 0.5;
}

.search-bar-compact input {
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 10px 12px;
    flex: 1;
}

.search-bar-compact input:focus {
    outline: none;
    box-shadow: none;
}

.btn-search-compact {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-search-compact:hover {
    opacity: 0.9;
}

.search-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--brand-dark);
    opacity: 0.7;
    font-size: 0.95rem;
}

.search-stats strong {
    font-weight: 700;
    color: var(--brand-primary);
}

.browse-all-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.browse-all-link:hover {
    text-decoration: underline;
}

/* Search Results Main */
.search-results-main {
    padding: 2rem 1.5rem 4rem 1.5rem;
}

.results-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-results h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.no-results p {
    font-size: 1.1rem;
    opacity: 0.6;
    margin-bottom: 2rem;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Results Sections */
.results-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}

.section-icon {
    font-size: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--brand-dark);
    flex: 1;
}

.result-count {
    background: var(--brand-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--brand-dark);
    transition: all 0.2s;
    display: block;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--brand-primary);
}

.result-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.category-card .result-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.meta-service-card .result-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.service-card .result-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.result-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.result-breadcrumb {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.7;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: 0.5rem;
}

.result-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.2s;
}

.result-card:hover .result-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Directory Header */
.directory-header {
    padding: 3rem 1.5rem 2rem 1.5rem;
    background: radial-gradient(circle at 50% 50%, rgba(0,122,255,0.05) 0%, transparent 70%);
    text-align: center;
}

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

.directory-hero {
    margin-bottom: 2rem;
}

.directory-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.directory-hero p {
    font-size: 1.15rem;
    opacity: 0.7;
}

/* Directory Main */
.directory-main {
    padding: 3rem 1.5rem 4rem 1.5rem;
}

.directory-grid-container {
    max-width: 1200px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card-large {
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--brand-dark);
    transition: all 0.2s;
    display: block;
    text-align: center;
}

.category-card-large:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-color: var(--brand-primary);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card-large h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--brand-dark);
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-primary);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

.category-arrow {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.95rem;
    transition: transform 0.2s;
}

.category-card-large:hover .category-arrow {
    transform: translateX(4px);
}

.no-categories {
    text-align: center;
    padding: 4rem 2rem;
}

.no-categories-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-categories h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.no-categories p {
    font-size: 1.1rem;
    opacity: 0.6;
}

/* Entity Pages (Category, Meta Service, Service Detail) */
.entity-header {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.entity-container {
    max-width: 1000px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    opacity: 0.4;
}

.breadcrumb-current {
    opacity: 0.6;
}

.entity-hero {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.entity-icon {
    font-size: 3.5rem;
    flex-shrink: 0;
}

.entity-info {
    flex: 1;
}

.entity-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--brand-primary);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.entity-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.entity-hero p {
    font-size: 1.1rem;
    opacity: 0.7;
    line-height: 1.6;
}

.service-detail-description {
    font-size: 1.15rem !important;
    opacity: 0.8 !important;
}

/* Entity Main Content */
.entity-main {
    padding: 2rem 1.5rem 4rem 1.5rem;
}

.entity-content {
    max-width: 1000px;
    margin: 0 auto;
}

.section-header-simple {
    margin-bottom: 1.5rem;
}

.section-header-simple h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
}

/* Entity List */
.entity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.entity-list-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--brand-dark);
    transition: all 0.2s;
}

.entity-list-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--brand-primary);
}

.entity-list-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.entity-list-content {
    flex: 1;
}

.entity-list-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--brand-dark);
}

.entity-list-content p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.entity-list-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-tag {
    background: rgba(0,0,0,0.04);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.7;
}

.entity-list-arrow {
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.2s;
}

.entity-list-item:hover .entity-list-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Service Cards Grid */
.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.service-card-detailed {
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--brand-dark);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.service-card-detailed:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--brand-primary);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.service-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
    flex: 1;
}

.service-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.service-description {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.7;
    margin-bottom: 1rem;
    flex: 1;
}

.service-card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.service-card-action {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.95rem;
    margin-top: auto;
}

/* Service Detail Page */
.service-detail-main {
    padding: 2rem 1.5rem 4rem 1.5rem;
    background: var(--bg-body);
}

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

.service-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 2rem;
}

.info-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--brand-dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brand-dark);
}

.price-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-primary);
}

.info-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.info-link:hover {
    text-decoration: underline;
}

/* Expert Info */
.expert-info-simple {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.expert-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.expert-details {
    flex: 1;
}

.expert-details h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.expert-email {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 1rem;
}

.other-services {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.other-services h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.other-services-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.other-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    text-decoration: none;
    color: var(--brand-dark);
    transition: all 0.2s;
}

.other-service-item:hover {
    background: rgba(0,0,0,0.04);
    transform: translateX(4px);
}

.other-service-name {
    font-weight: 600;
}

.other-service-price {
    font-weight: 700;
    color: var(--brand-primary);
}

/* Service Actions */
.service-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .results-grid,
    .category-grid,
    .service-cards-grid {
        grid-template-columns: 1fr;
    }

    .directory-hero h1 {
        font-size: 2rem;
    }

    .entity-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .entity-hero h1 {
        font-size: 1.75rem;
    }

    .entity-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .entity-list-arrow {
        align-self: flex-end;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .service-actions {
        flex-direction: column;
    }

    .service-actions .btn-primary,
    .service-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .expert-info-simple {
        flex-direction: column;
    }

    .service-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
