/* Local Plumber Directory - Enhanced Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --background-gray: #f8fafc;
    --background-light: #f1f5f9;
    --border-light: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
}

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

.logo:hover {
    color: var(--primary-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Search Form */
.search-form {
    margin-top: 2rem;
}

.search-grid {
    display: flex;
    gap: 1rem;
    align-items: end;
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.search-grid .form-group {
    flex: 1;
}

.search-grid .btn {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Services Section */
.services {
    background: var(--background-gray);
    padding: 4rem 0;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Featured Businesses Section */
.featured-businesses {
    padding: 4rem 0;
}

.featured-businesses h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* Business Grid - Equal Height Cards */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: stretch; /* Make all cards stretch to same height */
}

.business-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.business-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

.business-header h3 {
    margin: 0;
    font-size: 1.25rem;
    flex: 1;
    min-width: 200px;
}

.business-header h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.business-header h3 a:hover {
    text-decoration: underline;
}

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

.stars {
    display: flex;
    gap: 1px;
}

.star {
    color: #d1d5db;
    font-size: 1.1rem;
}

.star.filled,
.star.half {
    color: #fbbf24;
}

.rating-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.review-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.business-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.business-actions .btn {
    flex: 1;
    min-width: 120px;
}

.business-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.business-actions .btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.business-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.business-info {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.business-info .location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Why Choose Section */
.why-choose {
    background: var(--background-light);
    padding: 4rem 0;
    position: relative;
}

.why-choose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.why-choose h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
}

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

.feature {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.2s; }
.feature:nth-child(3) { animation-delay: 0.3s; }
.feature:nth-child(4) { animation-delay: 0.4s; }
.feature:nth-child(5) { animation-delay: 0.5s; }
.feature:nth-child(6) { animation-delay: 0.6s; }

/* Popular Cities Section */
.popular-cities {
    padding: 4rem 0;
}

.popular-cities h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
}

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

.city-link {
    text-decoration: none;
    color: inherit;
}

.city-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.city-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.city-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.city-card:nth-child(1) { animation-delay: 0.1s; }
.city-card:nth-child(2) { animation-delay: 0.2s; }
.city-card:nth-child(3) { animation-delay: 0.3s; }
.city-card:nth-child(4) { animation-delay: 0.4s; }
.city-card:nth-child(5) { animation-delay: 0.5s; }
.city-card:nth-child(6) { animation-delay: 0.6s; }

/* FAQ Section */
.faq {
    background: var(--background-gray);
    padding: 4rem 0;
    position: relative;
}

.faq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }

/* Breadcrumbs */
.breadcrumbs {
    background: var(--background-gray);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

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

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-center p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-links .separator {
    opacity: 0.5;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a, 
.pagination .current {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    background: white;
}

.pagination a:hover {
    background: var(--background-gray);
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Autocomplete Styles */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: var(--background-gray);
}

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

.suggestion-main {
    font-weight: 500;
    color: #1e293b !important;
}

.suggestion-details {
    font-size: 0.85rem;
    color: #64748b !important;
}

/* Filter styles */
.filters {
    background: var(--background-gray);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Legal Pages */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.legal-page h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-content section {
    margin-bottom: 2rem;
}

.legal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Icons */
.icon-search::before { content: "🔍"; }
.icon-location::before { content: "📍"; }
.icon-phone::before { content: "📞"; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .search-grid {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-grid .btn {
        width: 100%;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .business-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .business-actions {
        flex-direction: column;
    }
    
    .filter-grid {
        flex-direction: column;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.875rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-grid {
        padding: 0.75rem;
    }
    
    .business-card {
        padding: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .legal-page {
        padding: 1rem 0;
    }
    
    .legal-page h1 {
        font-size: 2rem;
    }
}

/* Loading and performance improvements */
.btn, .business-card, .service-card, .city-card, .faq-item {
    will-change: transform;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header, .footer, .search-form, .business-actions {
        display: none;
    }
    
    .hero {
        background: none;
        color: black;
        padding: 1rem 0;
    }
}

/* Additional Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

/* Enhanced business card styling */
.business-card .business-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.business-card .business-actions .btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.business-card .business-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Enhanced section spacing */
.section + .section {
    border-top: 1px solid var(--border-light);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-light);
    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 hover effects */
.city-card:hover h3,
.business-card:hover h3 a {
    color: var(--primary-dark);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    transition: var(--transition);
} 