/* Project Intake Hero Styles */

:root {
    --pi-primary: #B39783;
    --pi-primary-dark: #8c7360;
    --pi-text-dark: #2d2d2d;
    --pi-bg-glass: rgba(255, 255, 255, 0.95);
    --pi-transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Container & Background */
.project-intake-hero-container {
    position: relative;
    width: 100%;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    overflow: hidden;
    margin-top: var(--nav-height);
    padding: 1rem 0;
}

@media (min-width: 1024px) {
    .project-intake-hero-container {
        margin-top: calc(var(--nav-height) + 140px);
        /* Accommodate Brand Header (140px) + Nav */
        min-height: calc(100vh - (var(--nav-height) + 140px));
    }
}

.pi-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    /* Base background color/pattern if images fail to load */
    background: #eef2f3;
}

.pi-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.pi-bg-image.active {
    opacity: 1;
}

.pi-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Dark overlay for white text contrast */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
    pointer-events: none;
}

.project-intake-hero-container .container {
    max-width: var(--max-width);
    position: relative;
    z-index: 10;
}

/* Hero Content (Initial State) */
.pi-hero-content {
    min-width: 750px;
    text-align: center;
    transition: var(--pi-transition);
}

.pi-hero-title {
    font-size: 3.5rem;
    /* Slightly larger for impact */
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 160px;
    /* Reserve space to prevent layout shifts */
    justify-content: center;
    justify-content: center;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.pi-title-row {
    display: block;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.pi-title-row.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.pi-title-row.fade-in {
    animation: slideUpFadeIn 0.5s forwards;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pi-fade-in {
    animation: slideUpFadeIn 0.5s ease forwards;
}

.pi-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}



/* Input Wrapper */
.pi-input-wrapper {
    position: relative;
    background: white;
    padding: 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 700px;
    margin: auto;
    transition: var(--pi-transition);
    border: 2px solid transparent;
}

.pi-input-wrapper:focus-within {
    border-color: var(--pi-primary);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(179, 151, 131, 0.2);
}

.pi-hero-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.125rem;
    padding: 0.5rem 1rem;
    resize: none;
    min-height: 24px;
    /* Expandable via JS ideally */
    font-family: inherit;
}

.pi-start-btn {
    background: var(--pi-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--pi-transition);
    white-space: nowrap;
}

.pi-start-btn:hover {
    background: var(--pi-primary-dark);
}

.pi-start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Trust Bar */
.pi-trust-bar {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.pi-trust-bar .separator {
    margin: 0 0.5rem;
}

.pi-trust-link {
    color: white;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.pi-trust-link:hover {
    cursor: pointer;
    color: white;
    border-bottom: 1px solid white;
}

.pi-advertiser-link {
    color: var(--pi-primary);
    text-decoration: none;
    font-weight: 500;
}

.pi-advertiser-link:hover {
    text-decoration: underline;
}

/* TIMELINE CONTAINER (Hidden State) */
.pi-timeline-container {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    min-height: 400px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    animation: fadeScaleIn 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.pi-timeline-container.matched-pros {
    min-width: 1160px;
}

.pi-timeline-container.hidden {
    display: none;
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Progress Header */
.pi-progress-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pi-back-btn {
    display: none;
    /* Hidden as requested, moving to bottom */
}

.pi-slide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pi-footer-back {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.pi-footer-back:hover {
    color: var(--pi-text-dark);
}

.pi-footer-next {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    background: var(--pi-primary);
    /* Default enabled */
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.pi-footer-next:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.pi-progress-track {
    flex: 1;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.pi-progress-fill {
    height: 100%;
    background: var(--pi-primary);
    width: 0%;
    transition: width 0.5s ease;
}

.pi-percent-text {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--pi-primary);
    font-weight: 700;
}

/* Slides */
.pi-slides-viewport {
    flex: 1;
    /* Take remaining height */
    position: relative;
    overflow: hidden;
    /* Hide slides off screen */
}

.pi-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.pi-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
    /* Let it take space flow */
}

.pi-slide.exit-left {
    transform: translateX(-50px);
    opacity: 0;
}

/* Loading / Thinking Slide */
.pi-loading-slide {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Start from top to allow list growth */
    padding-top: 1rem;
    height: 100%;
}

.pi-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid var(--pi-primary);
    border-radius: 50%;
    animation: pi-spin 1s linear infinite;
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.pi-loading-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.pi-loading-item {
    font-size: 1.25rem;
    color: var(--pi-text-dark);
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pi-loading-item .check {
    color: #27ae60;
    font-size: 1.1em;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pi-loading-item.completed .check {
    opacity: 1;
    transform: scale(1);
}

@keyframes pi-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

.pi-question {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--pi-text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

/* Option List (Checkbox Style) */
.pi-options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.pi-option-card {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    font-size: 1.05rem;
    color: #444;
}

.pi-option-card:hover {
    border-color: #aaa;
    background: #fafafa;
}

.pi-option-card.selected {
    border-color: var(--pi-primary);
    background: #fff;
    box-shadow: 0 0 0 1px var(--pi-primary);
    color: var(--pi-text-dark);
}

/* Checkbox simulation */
.pi-option-card::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    /* Square for checkbox feel */
    transition: all 0.2s;
    flex-shrink: 0;
}

.pi-option-card.selected::before {
    background-color: var(--pi-primary);
    border-color: var(--pi-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='14px' height='14px'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.pi-option-icon {
    display: none !important;
    /* Force hide icons */
}

/* Contact Form Steps */
.pi-form-group {
    margin-bottom: 1rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pi-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.pi-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.pi-form-input:focus {
    border-color: var(--pi-primary);
    outline: none;
}

.text-gradient {
    /* Keep primary color but ensure it pops on dark bg */
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    color: var(--pi-primary);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Recommended Profiles */
.pi-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.pi-pro-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color, #e0e0e0);
}

.pi-pro-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.pi-pro-card.featured {
    border: 2px solid var(--secondary-color);
}

.pi-pro-card.featured::before {
    content: '⭐ FEATURED';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Card Header */
.pi-pro-header {
    background: var(--off-white);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.pi-pro-logo {
    width: 180px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem;
    /* No border, no background, no padding by default */
}

/* Header Text */
.pi-pro-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.pi-pro-info small {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Card Body */
.pi-pro-reason {
    padding: 1rem 1.5rem 0;
    font-style: italic;
    color: var(--pi-primary);
    font-size: 0.95rem;
    text-align: center;
}

.pi-pro-desc {
    padding: 1rem 1.5rem;
    color: var(--text-light, #666);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

/* Contact / Footer */
.pi-pro-contact {
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pi-contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark, #333);
}

.pi-contact-row a {
    color: var(--accent-color, #3498db);
    text-decoration: none;
}

.pi-contact-row a:hover {
    text-decoration: underline;
}

.pi-btn-profile {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--pi-primary);
    /* Use theme primary */
    color: white;
    margin-top: 0.5rem;
}

.pi-btn-profile:hover {
    background: var(--pi-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 151, 131, 0.3);
}

@media (max-width: 768px) {
    .pi-matches-grid {
        grid-template-columns: 1fr;
    }

    .pi-hero-content {
        min-width: unset;
        width: 100%;
        padding: 0 1.5rem;
    }

    .pi-hero-title {
        font-size: 2.25rem;
        min-height: auto;
    }

    .pi-input-wrapper {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .pi-hero-input {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        font-size: 1rem;
    }

    .pi-start-btn {
        width: 100%;
        padding: 0.875rem;
    }

    .pi-timeline-container.matched-pros {
        min-width: unset;
        width: 100%;
    }

    .pi-timeline-container {
        padding: 1.5rem;
    }
}