/* Home Services Page Styles - Using Beauty Industry Color Theme */
/* Color variables are inherited from main style.css */

/* Additional text colors for home services page */
:root {
    --text-primary: var(--charcoal);
    --text-secondary: var(--dark-gray);
    --text-muted: var(--medium-gray);
    --border-color: #E8DDD4;
}

/* Enhanced Page Typography */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Collapsible Filter Section */
.filter-toggle-container {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--light-cream) 100%);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.filter-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.filter-toggle-header:hover {
    color: var(--primary-color);
}

.filter-toggle-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-toggle-icon {
    font-size: 1.125rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.filter-toggle-icon.rotated {
    transform: rotate(180deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.filter-content.expanded {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 1;
    padding-top: 1.5rem;
}

.filter-stats {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Enhanced Filter System */
.filter-system-enhanced {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: visible;
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-label i {
    color: var(--primary-color);
    font-size: 1rem;
}

.filter-input, .filter-select {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: var(--white);
}

.filter-input:focus, .filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
    outline: none;
}

/* Modern Toast Notification System */
.location-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.location-toast {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 10px;
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.location-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.location-toast.success {
    border-left-color: var(--success-color);
}

.location-toast.error {
    border-left-color: var(--danger-color);
}

.location-toast.warning {
    border-left-color: var(--warning-color);
}

.location-toast.info {
    border-left-color: var(--info-color);
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-cream);
}

.toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
}

.toast-icon.loading {
    background: rgba(212, 165, 116, 0.1);
    color: var(--primary-color);
}

.toast-icon.success {
    background: rgba(127, 176, 105, 0.1);
    color: var(--success-color);
}

.toast-icon.error {
    background: rgba(231, 111, 81, 0.1);
    color: var(--danger-color);
}

.toast-icon.warning {
    background: rgba(244, 162, 97, 0.1);
    color: var(--warning-color);
}

.toast-icon.info {
    background: rgba(184, 149, 106, 0.1);
    color: var(--info-color);
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toast-close:hover {
    background: var(--border-color);
}

.toast-body {
    padding: 12px 16px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Enhanced Home Services Grid - Matching Shop Cards Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Service Card Wrapper - Matching Shop Card Structure */
.service-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Enhanced Service Card Styles - Matching Shop Cards */
.service-card {
    border: 2px solid var(--warm-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--white);
    overflow: hidden;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Service Image Styling - Matching Shop Card Images */
.service-image {
    position: relative;
    overflow: hidden;
}

.service-img,
.service-img-placeholder {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-cream), var(--secondary-color));
    color: var(--primary-color);
    font-size: 3rem;
}

.service-card:hover .service-img {
    transform: scale(1.05);
}

/* Service Overlay - Matching Shop Card Overlay */
.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .service-overlay {
    opacity: 1;
}

.service-overlay .btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 0.2rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.service-overlay .btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Service Badge - Matching Shop Badges */
.service-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.service-badge.featured-badge {
    background: linear-gradient(135deg, var(--warning-color), #f39c12);
    color: var(--white);
    box-shadow: var(--shadow);
}

/* Service Content - Matching Shop Card Body */
.service-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Service Category - Enhanced Styling */
.service-category {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 165, 116, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.subcategory-path {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Service Title - Matching Shop Card Title */
.service-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service Description - Enhanced */
.service-description {
    font-family: var(--font-body);
    color: var(--medium-gray);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service Details - Enhanced Layout */
.service-details {
    margin-bottom: 1rem;
}

.price-duration {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--light-cream);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.service-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.currency {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.service-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.service-duration i {
    color: var(--primary-color);
}

/* Service Fees - Enhanced */
.service-fees {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fee-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    background: var(--off-white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.fee-item i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Service Footer - Matching Shop Card Footer */
.service-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.service-provider {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.provider-info,
.location-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.provider-info i,
.location-info i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Service Actions - Enhanced Button Styling */
.service-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-enhanced {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--primary-color);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.btn-enhanced:hover {
    background: linear-gradient(135deg, var(--primary-dark), #a67c52);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
    text-decoration: none;
}

/* Enhanced Button Styles - Matching Shop Cards */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 2px solid var(--primary-color);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #a67c52);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
    text-decoration: none;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--medium-gray);
    color: var(--medium-gray);
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    background: var(--medium-gray);
    color: var(--white);
    transform: translateY(-2px);
}

/* Empty State - Enhanced */
.empty-state {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
    margin: 2rem 0;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Results Header Enhancement */
.results-header {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--light-cream) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.results-count {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Loading Spinner */
.spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--light-cream);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Detect Location Button */
#detectLocationBtn {
    position: relative;
    overflow: hidden;
}

#detectLocationBtn.loading {
    color: transparent;
}

#detectLocationBtn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--light-cream);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Location Status in Dropdown */
.location-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.detecting {
    background: var(--warning-color);
    animation: pulse 1.5s infinite;
}

.status-dot.success {
    background: var(--success-color);
}

.status-dot.error {
    background: var(--danger-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* No Results State */
.no-results {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Pagination Enhancement */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(212, 165, 116, 0.05);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .location-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .location-toast {
        margin-bottom: 8px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .service-img,
    .service-img-placeholder {
        height: 180px;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .filter-toggle-container {
        padding: 1rem;
    }
    
    .results-header {
        padding: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-system-enhanced {
        padding: 1rem;
    }

    .filter-content.expanded {
        max-height: 80vh;
    }
    
    .service-title {
        font-size: 1.125rem;
    }
    
    .service-price {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .service-price {
        font-size: 1.125rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .price-duration {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .service-provider {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .filter-content.expanded {
        max-height: 85vh;
    }
}

/* Auto Location Toggle Styles */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.25);
}

/* Enhanced Form Controls */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.25);
}

/* Service Card Hover Effects */
.service-card .btn-enhanced {
    opacity: 0.9;
    transition: all var(--transition);
}

.service-card:hover .btn-enhanced {
    opacity: 1;
    transform: translateY(-2px);
}

/* Category Icon Styling */
.service-category i {
    font-size: 1rem;
}

/* Service Areas Styling */
.service-areas-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
}
