/* USHomeReno Custom Styles — Angi-inspired redesign */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #6a5d91;
    --primary-dark: #453575;
    --accent-color: #6a5d91;
    --accent-color-hover: #453575;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-text: #212529;
    --light-bg: #f8f9fa;
}

/* Typography */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-text);
}

/* ===== Navbar ===== */
.navbar {
    background: #fff !important;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
}

.navbar .navbar-brand {
    color: var(--dark-text) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar .navbar-brand:hover {
    color: var(--primary-color) !important;
}

.navbar .nav-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar .btn-outline-dark {
    border-radius: 24px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 20px;
}

.navbar .btn-primary,
.navbar .btn-accent {
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 20px;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.navbar .btn-primary:hover,
.navbar .btn-accent:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.navbar .join-pro-link {
    color: var(--dark-text) !important;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.2s;
}

.navbar .join-pro-link:hover {
    color: var(--primary-color) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    background: url('https://images.unsplash.com/photo-1581578731548-c64695cc6952?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: white;
    padding: 0;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    max-width: 600px;
    margin-bottom: 32px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-section .hero-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    max-width: 520px;
    margin-bottom: 36px;
    opacity: 0.92;
}

/* Inline search bar */
.hero-search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    max-width: 600px;
    overflow: hidden;
    padding: 5px 5px 5px 0;
}

.hero-search .search-input {
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 14px 20px;
    flex: 1;
    background: transparent;
    color: var(--dark-text);
    min-width: 0;
}

.hero-search .search-input::placeholder {
    color: #999;
}

.hero-search .search-divider {
    width: 1px;
    height: 28px;
    background: #ddd;
    flex-shrink: 0;
}

.hero-search .zip-input {
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 14px 12px 14px 8px;
    width: 110px;
    background: transparent;
    color: var(--dark-text);
}

.hero-search .zip-input::placeholder {
    color: #999;
}

.hero-search .zip-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-search .zip-wrapper i {
    color: #999;
    font-size: 1rem;
    margin-left: 8px;
}

.hero-search .search-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.hero-search .search-btn:hover {
    background: var(--primary-dark);
}

/* ===== Category Icon Row ===== */
.category-row {
    padding: 48px 0;
    background: #fff;
}

.category-row h2 {
    text-align: center;
    font-weight: 700;
    margin-bottom: 36px;
    font-size: 1.75rem;
}

.category-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark-text);
    padding: 16px 12px;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
    width: 110px;
    text-align: center;
}

.category-icon-item:hover {
    background: #eeedf4;
    transform: translateY(-3px);
    color: var(--dark-text);
}

.category-icon-item .cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eeedf4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    transition: background 0.2s;
}

.category-icon-item:hover .cat-icon {
    background: #dcd8e8;
}

.category-icon-item .cat-label {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.3;
}

/* ===== Featured Contractors (cleaner) ===== */
.contractor-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.contractor-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contractor-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.verified-badge {
    background: var(--success-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Rating Stars */
.rating-stars {
    color: var(--warning-color);
}

.rating-count {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Review Cards */
.review-card {
    border-left: 4px solid var(--accent-color);
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

/* ===== How It Works ===== */
.how-it-works-step {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.how-it-works-step:nth-child(even) .step-number {
    background: var(--primary-dark);
}

/* ===== CTA Section ===== */
.cta-section {
    background: var(--primary-color);
    color: white;
}

.cta-section .btn-light {
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 24px;
}

.cta-section .btn-outline-light {
    border-radius: 24px;
    font-weight: 500;
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(106, 93, 145, 0.15);
}

/* ===== Buttons ===== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Accent Button */
.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--accent-color-hover);
    border-color: var(--accent-color-hover);
    color: white;
}

.btn-outline-accent {
    border-color: var(--accent-color);
    color: var(--accent-color);
    border-radius: 8px;
}

.btn-outline-accent:hover,
.btn-outline-accent:focus {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
}

/* Filter Sidebar */
.filter-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-top: 4px solid var(--accent-color);
}

.filter-section h5 {
    color: #333;
}

.filter-section h5 i {
    color: var(--accent-color);
}

.filter-section h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Detail Page */
.contractor-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 0;
}

.contractor-detail-logo {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Quote Request Form */
.quote-form-card {
    border: 2px solid var(--primary-color);
    border-radius: 12px;
}

/* Service Tags */
.service-tag {
    display: inline-block;
    background: rgba(106, 93, 145, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    margin: 4px;
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 60px auto;
}

.auth-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ===== Footer ===== */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
}

.site-footer h5,
.site-footer h6 {
    color: #fff;
}

.site-footer a {
    color: #aaa;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--primary-color);
}

.site-footer .social-icon {
    color: #aaa;
    transition: color 0.2s;
}

.site-footer .social-icon:hover {
    color: var(--primary-color);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 40px 0;
    }

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

    .hero-search {
        flex-direction: column;
        border-radius: 16px;
        padding: 8px;
    }

    .hero-search .search-input {
        width: 100%;
        padding: 12px 16px;
    }

    .hero-search .search-divider {
        width: 80%;
        height: 1px;
        margin: 0 auto;
    }

    .hero-search .zip-wrapper {
        width: 100%;
    }

    .hero-search .zip-input {
        width: 100%;
        padding: 12px 16px 12px 8px;
    }

    .hero-search .search-btn {
        width: 100%;
        border-radius: 12px;
        height: 48px;
    }

    .category-icon-item {
        width: 90px;
        padding: 12px 8px;
    }

    .category-icon-item .cat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .contractor-logo {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.65rem;
    }

    .category-icons {
        gap: 8px;
    }

    .category-icon-item {
        width: 80px;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Google Places Results */
.google-result-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.google-result-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.google-result-card .btn-outline-secondary {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.google-result-card .btn-outline-secondary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* ===== Lead Capture Wizard ===== */
.wizard-wrapper {
    min-height: calc(100vh - 80px);
    background: #fff;
}

.wizard-progress {
    height: 4px;
    background: #e9ecef;
    width: 100%;
    position: sticky;
    top: 73px;
    z-index: 100;
}

.wizard-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.4s ease;
}

.wizard-container {
    max-width: 660px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: wizardFadeIn 0.3s ease;
}

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

.wizard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-text);
}

.wizard-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* Service Selection Grid */
.wizard-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 32px 0;
}

.wizard-option-card {
    cursor: pointer;
    display: block;
}

.wizard-option-card input {
    display: none;
}

.wizard-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    text-align: center;
}

.wizard-option-content i {
    font-size: 1.6rem;
    color: var(--primary-color);
}

.wizard-option-content span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark-text);
}

.wizard-option-card:hover .wizard-option-content {
    border-color: var(--primary-color);
    background: rgba(106, 93, 145, 0.04);
}

.wizard-option-card.selected .wizard-option-content,
.wizard-option-card input:checked + .wizard-option-content {
    border-color: var(--primary-color);
    background: rgba(106, 93, 145, 0.08);
    transform: scale(1.02);
}

/* Radio List (timeline, property) */
.wizard-radio-list {
    margin: 32px 0;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.wizard-radio-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.15s;
    margin: 0;
}

.wizard-radio-option:last-child {
    border-bottom: none;
}

.wizard-radio-option:hover {
    background: #f8f9fa;
}

.wizard-radio-option input[type="radio"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.wizard-radio-option span {
    font-size: 1rem;
    font-weight: 450;
    color: var(--dark-text);
}

.wizard-radio-option:has(input:checked) {
    background: rgba(106, 93, 145, 0.06);
}

/* Text inputs */
.wizard-input-wrapper {
    margin: 32px 0;
}

.wizard-text-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: inherit;
    color: var(--dark-text);
    transition: border-color 0.2s;
    outline: none;
}

.wizard-text-input:focus {
    border-color: var(--primary-color);
}

.wizard-text-input::placeholder {
    color: #999;
}

.wizard-textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--dark-text);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.wizard-textarea:focus {
    border-color: var(--primary-color);
}

.wizard-textarea::placeholder {
    color: #999;
}

.wizard-char-count {
    text-align: right;
    font-size: 0.85rem;
    color: #999;
    margin-top: 6px;
}

/* Contact form fields */
.wizard-contact-form {
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wizard-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--dark-text);
}

/* Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 16px;
}

.wizard-nav .btn-wizard-next,
.wizard-nav .btn-wizard-submit {
    min-width: 180px;
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
}

.wizard-nav .btn-wizard-back {
    min-width: 140px;
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 12px;
}

/* Confirmation */
.wizard-confirmation {
    text-align: center;
    padding: 40px 0;
}

.wizard-check-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 24px;
}

.wizard-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-top: 32px;
    text-align: left;
}

.wizard-summary .summary-row {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.wizard-summary .summary-row:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 576px) {
    .wizard-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wizard-title {
        font-size: 1.35rem;
    }

    .wizard-nav .btn-wizard-next,
    .wizard-nav .btn-wizard-submit {
        min-width: 140px;
        padding: 12px 24px;
    }

    .wizard-nav .btn-wizard-back {
        min-width: 100px;
        padding: 12px 24px;
    }

    .wizard-container {
        padding: 32px 16px 60px;
    }
}

/* Phone links */
a[href^="tel:"] {
    color: var(--accent-color);
    font-weight: 500;
}

a[href^="tel:"]:hover {
    color: var(--accent-color-hover);
}
