/* Demo Section Styles */

.demo-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.demo-header {
    text-align: center;
    margin-bottom: 3rem;
}

.demo-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.demo-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 1rem;
}

.demo-header-hint {
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Left box slightly larger */
    gap: 1.75rem;
    align-items: start;
}

.demo-content {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.demo-steps {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.demo-step {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.125rem 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

.demo-step:hover {
    opacity: 0.9;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.12);
    border-color: var(--primary-color);
}

.demo-step.active {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.2);
    cursor: pointer;
}

.demo-step.active::after {
    display: none;
}

.demo-step.active:hover {
    transform: translateX(0) scale(1.01);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.25);
}

.demo-step-number {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--bg-light);
    color: var(--text-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.demo-step.active .demo-step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.demo-step:hover .demo-step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.demo-step-content h3 {
    color: var(--text-dark);
    font-size: 1.0625rem;
    margin-bottom: 0.375rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.demo-step.active .demo-step-content h3 {
    color: var(--primary-color);
    font-weight: 700;
}

.demo-step-content p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.demo-visual {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 50%, #dbeafe 100%);
    border: 3px solid var(--primary-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(26, 54, 93, 0.2), 0 2px 8px rgba(26, 54, 93, 0.1);
    overflow: hidden;
    min-height: 500px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.demo-visual::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(26, 54, 93, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.demo-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    padding: 1.5rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    min-height: 500px;
    max-height: 500px;
    z-index: 1;
    box-sizing: border-box;
}

.demo-screen.active {
    opacity: 1;
    visibility: visible;
}

.demo-screen-content {
    text-align: center;
    max-width: 550px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    overflow: visible;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Special styling for form preview screen */
.demo-screen[data-step="1"] .demo-screen-content {
    text-align: left;
    align-items: stretch;
}

.demo-screen-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(26, 54, 93, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(26, 54, 93, 0);
    }
}

.demo-screen-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.demo-screen-content h3 {
    color: var(--primary-color);
    font-size: 1.375rem;
    margin-bottom: 1rem;
    margin-top: 0;
    font-weight: 700;
    width: 100%;
    letter-spacing: -0.01em;
}

.demo-screen-content p {
    color: var(--text-dark);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
    width: 100%;
    font-weight: 500;
}

.demo-form-preview {
    margin-top: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.25rem;
    border-radius: 12px;
    text-align: left;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.demo-form-preview .form-field {
    margin-bottom: 0.875rem;
}

.demo-form-preview .form-field:last-of-type {
    margin-bottom: 0;
}

.demo-form-preview label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
    font-weight: 600;
}

.demo-form-preview input,
.demo-form-preview select {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
    background: white;
    color: var(--text-dark);
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364758b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.demo-form-preview input:hover,
.demo-form-preview select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.demo-form-preview input:focus,
.demo-form-preview select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.demo-form-cta {
    margin-top: 0.875rem;
    padding-top: 0;
    flex-shrink: 0;
}

.demo-form-cta .btn {
    width: 100%;
    padding: 0.8125rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
    box-sizing: border-box;
}

.demo-form-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.demo-screen-cta {
    margin-top: 1.5rem;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.demo-screen-cta .btn {
    min-width: 180px;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
}

.demo-try-button {
    text-align: center;
    margin-top: 1rem;
}

.demo-try-button .btn {
    padding: 1rem 2rem;
}

/* Responsive */
@media (max-width: 968px) {
    .demo-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .demo-visual {
        min-height: 450px;
        max-height: 450px;
    }
    
    .demo-screen {
        padding: 1.5rem 1.25rem;
        min-height: 450px;
        max-height: 450px;
        overflow: hidden;
    }
    
    .demo-form-preview {
        padding: 1.125rem 1.125rem;
    }
    
    .demo-form-preview .form-field {
        margin-bottom: 0.75rem;
    }
    
    .demo-form-preview label {
        margin-bottom: 0.3125rem;
    }
    
    .demo-form-cta {
        margin-top: 0.75rem;
    }
    
    .demo-screen-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }
    
    .demo-screen-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .demo-step-number {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .demo-header h2 {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .demo-section {
        padding: 60px 0;
    }
    
    .demo-header h2 {
        font-size: 1.0625rem;
    }
    
    .demo-step {
        padding: 1rem 0.875rem;
        gap: 0.875rem;
    }
    
    .demo-step-content h3 {
        font-size: 1rem;
    }
    
    .demo-visual {
        min-height: 400px;
        max-height: 400px;
    }
    
    .demo-screen {
        min-height: 400px;
        max-height: 400px;
        padding: 1.25rem 1rem;
        overflow: hidden;
    }
    
    .demo-form-preview {
        padding: 1rem 0.875rem;
    }
    
    .demo-form-preview .form-field {
        margin-bottom: 0.625rem;
    }
    
    .demo-form-preview label {
        margin-bottom: 0.25rem;
        font-size: 0.8125rem;
    }
    
    .demo-form-preview input,
    .demo-form-preview select {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        padding-right: 2.25rem;
    }
    
    .demo-form-cta {
        margin-top: 0.625rem;
    }
    
    .demo-form-cta .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .demo-screen-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 0.875rem;
    }
    
    .demo-screen-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .demo-screen-content h3 {
        font-size: 1.125rem;
    }
    
    .demo-screen-content p {
        font-size: 0.875rem;
    }
    
    .demo-screen-cta .btn {
        width: 100%;
        min-width: auto;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}
