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

:root {
    --primary-color: #461fef;
    --primary-hover: #3516cf;
    --text-dark: #111111;
    --text-muted: #6b7280;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ff3b30;
    --testimonial-bg: #f9f9fb;
    --author-bg: #efebff;
    /* Very light purple for the author bar */
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: flex;
    width: 100%;
    min-height: 100%;
    background-color: #fff;
}

/* SIDEBAR STYLING - FULL SCREEN 45% */
.sidebar {
    width: 45%;
    background-color: #000;
    position: relative;
    padding: 100px 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #fff;
    z-index: 10;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: -2;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 50%, rgba(70, 31, 239, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: -1;
}

.sidebar-logo {
    margin-bottom: 60px;
}

.sidebar-logo img {
    height: 45px;
    max-width: 200px;
    filter: brightness(0) invert(1);
}

.sidebar-content {
    max-width: 90%;
}

.sidebar-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    color: #fff;
    text-transform: none;
    /* Allow lowercase as in 'welcome' step */
}

.sidebar-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 40px;
    line-height: 1.5;
}

.features-label {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}

.sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-item .check {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}

/* Sectors Grid with pipes for step 5 */
.sidebar-sectors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
    margin-top: 25px;
}

.sector-item {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
}

.sector-item::before {
    content: '|';
    color: var(--primary-color);
    font-weight: 900;
    margin-right: 8px;
}

.sidebar-pillars {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    padding-top: 20px;
}

.sidebar-pillars p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

/* FORM AREA - THE WHITE CARD EFFECT */
.form-container {
    flex: 1;
    background-color: #fff;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    border-radius: 40px 0 0 40px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    position: relative;
    width: 100%;
}

.back-btn {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 10px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--primary-color);
}

.logo img {
    height: 40px;
}

.form-content {
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-wrapper {
    display: none;
    opacity: 0;
}

.step-wrapper.active {
    display: block;
    animation: fadeInStep 0.5s ease forwards;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

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

.greeting {
    font-size: 1rem;
    color: #888;
    margin-bottom: 8px;
}

.question {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 35px;
    color: #111;
    line-height: 1.2;
}

.input-group {
    width: 100%;
    margin-bottom: 24px;
}

.error-message {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 8px;
    display: none;
    text-align: left;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 22px 28px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
    background: #fff;
}

textarea {
    height: 150px;
    resize: none;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
}

/* BUTTON BUTTON POSITIONING */
.cta-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    margin-bottom: 40px;
}

.next-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 18px 45px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(70, 31, 239, 0.2);
}

.next-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* TESTIMONIAL - REFINED ACCORDING TO SCREENSHOT */
.testimonial-box {
    background-color: var(--testimonial-bg);
    border: 1px solid #f0f0f5;
    border-radius: 15px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    border-left: 2px solid #eee;
}

.testimonial-content-wrapper {
    padding: 30px;
    display: flex;
    gap: 15px;
}

.quote-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    font-family: Georgia, serif;
    line-height: 1;
    margin-top: -15px;
    opacity: 0.8;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    font-style: italic;
}

.testimonial-author {
    padding: 15px 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--author-bg);
    border-top: 1px solid #f0f0f5;
}

/* FOOTER */
.form-footer {
    padding-top: 40px;
    margin-top: auto;
    text-align: center;
}

.form-footer p {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

.form-footer a {
    color: #333;
    text-decoration: underline;
    font-weight: 600;
}

.copyright {
    font-size: 0.7rem;
    color: #aaa;
}

/* Phone Input styles */
.phone-input-group {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.phone-input-group:focus-within {
    border-color: var(--primary-color);
}

.phone-input-group input {
    border: none !important;
}

.country-selector-wrapper {
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-right: 1px solid #e5e7eb;
    background-color: #fff;
    position: relative;
    /* Fixed: Added relative positioning */
}

.country-selector-wrapper select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* FINAL STEP THEME (PURPLE) */
.sidebar.final-step::after {
    background: radial-gradient(circle at 0% 0%, rgba(70, 31, 239, 0.95) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.sidebar.final-step .sidebar-title {
    font-size: 3.5rem;
    line-height: 0.9;
    font-weight: 800;
}

.sidebar.final-step .sidebar-title span {
    font-size: 6rem;
    display: block;
    letter-spacing: -2px;
}

/* SUCCESS STEP (FULL WIDTH) */
.container.success-layout .sidebar {
    display: none;
}

.container.success-layout .form-container {
    width: 100%;
    border-radius: 0;
    padding: 60px 20px;
    align-items: center;
}

.container.success-layout .form-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.container.success-layout .header {
    justify-content: center !important;
}

.container.success-layout .header .back-btn {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .form-container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 40px 20px;
    }

    .header {
        display: flex;
        justify-content: space-between !important;
        align-items: center;
        margin-bottom: 25px;
        position: relative;
    }

    .logo {
        margin: 0;
        position: static;
        transform: none;
    }

    .logo img {
        height: 30px;
    }

    .back-btn {
        position: static;
    }

    .next-btn {
        width: 100%;
        max-width: 100%;
        margin: 30px auto 0;
        float: none;
        display: flex;
        justify-content: center;
    }

    .cta-section {
        justify-content: center;
        width: 100%;
    }

    .testimonial-box {
        margin-top: 25px;
        width: 100%;
        padding: 0;
    }

    .testimonial-text {
        font-size: 0.85rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .testimonial-author {
        font-size: 0.75rem;
        padding: 10px 20px;
    }

    .form-footer {
        margin-top: 30px;
        padding-bottom: 20px;
        text-align: center;
        font-size: 0.7rem;
    }

    input,
    select,
    textarea,
    .phone-input-group {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .question {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        padding: 16px 18px;
        font-size: 1rem;
    }

    .greeting {
        font-size: 0.9rem;
    }

    .form-container {
        padding: 30px 20px;
    }
}