/* ============================================
   MULTISTEP-FORM.CSS - Multi-step Contact Form
   F1Key Website - Phase 1 UX/UI Enhancement
   ============================================ */

/* ==================== */
/* WRAPPER */
/* ==================== */

.multistep-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== */
/* FORM PROGRESS BAR */
/* ==================== */

.form-progress {
    margin: 48px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.progress-step.active .step-number {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.5),
                0 0 0 6px rgba(220, 20, 60, 0.1);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #10b981;
    border-color: #10b981;
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.step-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.3s;
}

.progress-step.active .step-label {
    color: var(--color-primary);
    font-weight: 700;
    transform: scale(1.05);
}

.progress-step.completed .step-label {
    color: #10b981;
}

.progress-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    max-width: 120px;
}

.progress-step.completed + .progress-connector {
    background: #10b981;
}

.progress-line {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    margin: 0 -16px;
    top: -16px;
    z-index: 1;
}

.progress-step.completed ~ .progress-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #10b981;
    animation: progressFill 0.5s ease-out;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

/* ==================== */
/* MULTI-STEP FORM */
/* ==================== */

.multistep-form {
    margin-top: 40px;
}

.contact-form-multistep {
    margin-top: 40px;
}

.form-step {
    display: none;
    animation: stepFadeIn 0.5s ease-out;
}

.form-step.active {
    display: block;
}

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

.step-content {
    background: var(--color-surface-1);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    color: var(--color-text-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}

/* ==================== */
/* PROJECT TYPE CARDS */
/* ==================== */

.project-type-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.project-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.project-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.project-card .card-content {
    padding: 28px 20px;
    background: var(--color-surface-2);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
    position: relative;
}

.project-card:hover .card-content {
    border-color: rgba(220, 20, 60, 0.4);
    background: rgba(220, 20, 60, 0.03);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card input:checked ~ .card-content {
    border-color: var(--color-primary);
    background: rgba(220, 20, 60, 0.1);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.15),
                0 8px 24px rgba(220, 20, 60, 0.2);
    transform: translateY(-2px);
}

.project-card input:checked ~ .card-content::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    animation: checkmarkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.card-icon {
    font-size: 2.5rem;
    display: block;
    transition: transform 0.3s;
}

.project-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.card-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: block;
}

/* ==================== */
/* STEP ACTIONS */
/* ==================== */

.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
}

.step-actions button {
    flex: 1;
    padding: 18px 36px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, 
        var(--color-primary) 0%, 
        #ff4d4d 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.3);
}

.btn-next:hover,
.btn-submit:hover {
    box-shadow: 0 12px 32px rgba(220, 20, 60, 0.5);
    transform: translateY(-2px);
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.3);
}

.btn-back {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--color-text-primary);
    max-width: 200px;
}

.btn-back:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ==================== */
/* CHARACTER COUNTER */
/* ==================== */

.char-count {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

/* ==================== */
/* FORM TRUST BOX */
/* ==================== */

.form-trust-box {
    padding: 24px;
    background: linear-gradient(135deg, 
        rgba(220, 20, 60, 0.08) 0%, 
        rgba(220, 20, 60, 0.03) 100%);
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 12px;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
}

.form-trust-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--color-primary) 0%, 
        transparent 100%);
}

.form-trust-box p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.form-trust-box strong {
    display: block;
    margin-bottom: 12px;
    font-size: 1rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* ==================== */
/* SELECT STYLING */
/* ==================== */

.contact-form-multistep select,
.multistep-form select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23DC143C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.contact-form-multistep select option {
    background: var(--color-surface-1);
    color: var(--color-text-primary);
    padding: 12px;
}

/* ==================== */
/* CHARACTER COUNTER */
/* ==================== */

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    font-weight: 500;
}

textarea:focus ~ .char-counter {
    color: var(--color-primary);
}

.trust-icon {
    font-size: 1.3rem;
}

.trust-text {
    font-weight: 500;
}

/* ==================== */
/* SUCCESS STATE */
/* ==================== */

.form-success {
    text-align: center;
    padding: 60px 40px;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #10b981;
}

.success-message {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.success-next-steps {
    background: var(--color-surface-1);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.success-next-steps h4 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.success-next-steps ul {
    list-style: none;
    padding: 0;
}

.success-next-steps li {
    padding: 8px 0;
    font-size: 0.95rem;
}

.success-next-steps a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.success-next-steps a:hover {
    text-decoration: underline;
}

.btn-reset {
    padding: 12px 24px;
    background: var(--color-surface-2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset:hover {
    border-color: var(--color-primary);
    background: rgba(220, 20, 60, 0.05);
}

/* ==================== */
/* ALTERNATIVE CONTACT */
/* ==================== */

.contact-alternatives {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.alternatives-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-text-secondary);
}

.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.alt-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: var(--color-surface-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.alt-contact:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.alt-icon {
    font-size: 2rem;
}

.alt-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alt-value {
    font-size: 0.95rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* ==================== */
/* LOADING SPINNER */
/* ==================== */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== */
/* RESPONSIVE - TABLET */
/* ==================== */

@media (max-width: 968px) {
    .progress-line {
        width: 80px;
    }
    
    .step-content {
        padding: 32px;
    }
}

/* ==================== */
/* RESPONSIVE - MOBILE */
/* ==================== */

@media (max-width: 768px) {
    .form-row,
    .project-type-cards,
    .alternatives-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .progress-line {
        width: 60px;
    }
    
    .step-content {
        padding: 24px;
    }
    
    .step-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .step-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .step-actions button {
        width: 100%;
    }
    
    .btn-back {
        max-width: 100%;
    }
    
    .project-card .card-content {
        padding: 24px 20px;
        min-height: 120px;
    }
}

@media (max-width: 640px) {
    .form-progress {
        margin: 24px 0;
    }
    
    .progress-steps {
        gap: 0;
    }
    
    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .progress-step.active .step-number {
        transform: scale(1.05);
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .progress-line {
        width: 40px;
        top: -12px;
    }
    
    .multistep-form-wrapper {
        padding: 0 4px;
    }
}
