/* Modern CSS Reset and Base Styles */
* {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    height: 100%;
    background: #f8fafc;
}

/* Global heading styles */
.sub-heading,
h1,
h2,
h2 a,
h3,
h4,
h5,
h6 {
    font-family: Sandena-Medium, Helvetica, Arial, Lucida Grande, sans-serif;
    text-rendering: optimizeLegibility;
    font-smooth: always;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

.wizard {
    display: flex;
    min-height: 100vh;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* LEFT HERO SECTION */
.wizard-hero {
    width: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(168, 85, 247, 0.8)),
        url('https://cloud.famproperties.com/project/large/-583555-161552.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: white;
    position: relative;
}

.wizard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.wizard-headings {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 500px;
}

.wizard-headings h2 {
    font-size: 72px;
    line-height: 82px;
    color: #fff;
    text-align: left;
    font-weight: 400;
    font-family: Sandena-Medium, Helvetica, Arial, Lucida Grande, sans-serif;
    text-rendering: optimizeLegibility;
    font-smooth: always;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wizard-headings p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* RIGHT FORM SECTION */
.wizard-steps {
    width: 50%;
    padding: 60px 50px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.pagination li {
    width: 40px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination li.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 60px;
}

/* STEP NAVIGATION ARROWS */
.step-navigation {
    display: none;
    /* Hidden by default, shown via JavaScript */
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
}

.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: white;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -4px rgba(102, 126, 234, 0.3);
}

.nav-arrow:active {
    transform: translateY(0);
}

.nav-arrow svg {
    transition: all 0.2s ease;
}

.nav-arrow:hover svg {
    transform: scale(1.1);
}

.nav-prev {
    margin-left: 20px;
}

.nav-next {
    margin-right: 20px;
}

/* STEP CONTAINER */
.step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.step.active {
    display: block;
}

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

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

/* STEP TITLES */
.step-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1a202c;
    text-align: center;
    line-height: 1.3;
}

/* CHOICE BUTTONS */
.choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 30px 0 40px 0;
}

.choice {
    cursor: pointer;
    padding: 24px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.choice:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.choice.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.choice-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px auto;
    background: #f7fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.choice.selected .choice-icon {
    background: rgba(255, 255, 255, 0.2);
}

.choice span {
    font-weight: 500;
    font-size: 1.1rem;
}

/* ICON STYLES */
.choice-icon.buying::before {
    content: '🏠';
}

.choice-icon.selling::before {
    content: '💰';
}

.choice-icon.renting::before {
    content: '🔑';
}

/* PILL BUTTONS */
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 40px 0;
    justify-content: center;
}

.pill {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    font-size: 0.95rem;
}

.pill:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.pill.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(102, 126, 234, 0.3);
}

/* FORM GROUPS */
.form-group {
    margin: 20px 0;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group.error input {
    border-color: #e53e3e;
}

.form-group.error .error {
    display: block;
}

.form-group.success input {
    border-color: #38a169;
    background: #f0fff4;
}

/* PHONE INPUT WITH COUNTRY CODE */
.phone-input-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.country-selector {
    position: relative;
    flex-shrink: 0;
}

.selected-country {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 120px;
}

.selected-country:hover {
    border-color: #667eea;
}

.selected-country .flag {
    font-size: 1.2rem;
}

.selected-country .code {
    font-weight: 500;
    color: #4a5568;
}

.selected-country .arrow {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.country-selector.open .selected-country .arrow {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

.country-selector.open .country-dropdown {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f7fafc;
}

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

.country-option:hover {
    background: #f7fafc;
}

.country-option .flag {
    font-size: 1.1rem;
}

.country-option .name {
    font-size: 0.95rem;
    color: #4a5568;
}

.phone-input-container input {
    flex: 1;
    margin: 0;
}

/* PRICE RANGE SLIDER */
.price-range-container {
    margin: 30px 0 40px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.price-input-wrapper {
    position: relative;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.price-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.price-input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    background: transparent;
}

.currency {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

.range-separator {
    font-weight: 500;
    color: #64748b;
    margin: 0 8px;
    margin-top: 24px;
}

.slider-section {
    margin-top: 20px;
}

.range-slider {
    position: relative;
    height: 40px;
    margin: 20px 0;
}

.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    transform: translateY(-50%);
}

.range-fill {
    position: absolute;
    top: 50%;
    height: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.range-input {
    position: absolute;
    top: 0;
    width: 100%;
    height: 40px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    border-color: #5a67d8;
}

.range-input::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

.range-input::-moz-range-thumb {
    height: 24px;
    width: 24px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.range-input::-moz-range-track {
    background: transparent;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 8px;
}

.input-icon {
    position: relative;
}

.input-icon input,
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.input-icon input {
    padding-right: 50px;
}

.input-icon input:focus,
input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon .clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.4rem;
    color: #a0aec0;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f7fafc;
}

.input-icon .clear:hover {
    color: #e53e3e;
    background: #fed7d7;
}

/* BUTTONS */
.btn-w {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 30px auto 0 auto;
    display: block;
    box-shadow: 0 4px 12px -2px rgba(102, 126, 234, 0.3);
}

.btn-w:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(102, 126, 234, 0.4);
}

.btn-w:active {
    transform: translateY(0);
}

.btn-w.back {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-w.back:hover {
    background: white;
    color: #667eea;
    border-color: #667eea;
    box-shadow: 0 4px 12px -2px rgba(102, 126, 234, 0.2);
}

.button-group {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.button-group .btn-w {
    flex: 1;
    margin: 0;
}

/* ERROR MESSAGES */
.error {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
}

.hidden {
    display: none;
}

/* THANK YOU PAGE */
.thankyou {
    text-align: center;
    padding: 60px 40px;
}

.thankyou h2 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    color: #1a202c;
    font-weight: 700;
}

.thankyou p {
    font-size: 1.2rem;
    color: #718096;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .wizard-headings h2 {
        font-size: 56px;
        line-height: 64px;
    }

    .wizard-steps {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .wizard {
        flex-direction: column;
    }

    .wizard-hero,
    .wizard-steps {
        width: 100%;
    }

    .wizard-hero {
        min-height: 50vh;
        padding: 40px 30px;
        align-items: flex-start;
        justify-content: center;
    }

    .wizard-headings {
        max-width: 100%;
        text-align: left;
    }

    .wizard-headings h2 {
        font-size: 48px;
        line-height: 56px;
        margin-bottom: 16px;
    }

    .wizard-headings p {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .wizard-steps {
        padding: 40px 30px;
    }

    .step-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .choices {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 25px 0 35px 0;
    }

    .choice {
        padding: 20px 16px;
        min-height: 100px;
    }

    .pills {
        justify-content: flex-start;
        gap: 10px;
        margin: 25px 0 35px 0;
    }

    .pill {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .price-range-container {
        margin: 25px 0 35px 0;
        padding: 20px;
    }

    .price-inputs {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 25px;
    }

    .range-separator {
        text-align: center;
        margin: 0;
        padding: 8px 0;
    }

    .price-display {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .price-value {
        padding: 12px 16px;
        min-width: auto;
    }

    .pagination {
        margin-bottom: 35px;
    }

    .pagination li {
        width: 35px;
        height: 6px;
    }

    .pagination li.active {
        width: 50px;
    }

    .button-group {
        flex-direction: column;
        gap: 12px;
    }

    .btn-w {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .wizard-hero {
        padding: 30px 20px;
        min-height: 45vh;
    }

    .wizard-headings h2 {
        font-size: 36px;
        line-height: 42px;
    }

    .wizard-headings p {
        font-size: 1rem;
    }

    .wizard-steps {
        padding: 30px 20px;
    }

    .step-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    .choices {
        margin: 20px 0 30px 0;
    }

    .choice {
        padding: 18px 14px;
        min-height: 90px;
    }

    .choice-icon {
        width: 40px;
        height: 40px;
    }

    .pills {
        margin: 20px 0 30px 0;
    }

    .pill {
        padding: 12px 18px;
        font-size: 0.95rem;
    }

    .price-range-container {
        margin: 20px 0 30px 0;
        padding: 16px;
    }

    .price-inputs {
        gap: 12px;
        margin-bottom: 20px;
    }

    .price-input-wrapper input {
        padding: 12px 45px 12px 14px;
        font-size: 0.95rem;
    }

    .range-labels {
        font-size: 0.75rem;
    }

    .price-display {
        margin-bottom: 15px;
    }

    .price-value {
        padding: 10px 14px;
    }

    .price-amount {
        font-size: 1rem;
    }

    .btn-w {
        padding: 14px 28px;
        font-size: 1rem;
        margin: 25px 0 0 0;
    }

    .form-group {
        margin: 18px 0;
    }

    .input-icon input,
    input[type="text"],
    input[type="email"],
    input[type="tel"] {
        padding: 14px 18px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .input-icon input {
        padding-right: 45px;
    }

    .pagination {
        margin-bottom: 30px;
    }

    .pagination li {
        width: 30px;
        height: 5px;
    }

    .pagination li.active {
        width: 40px;
    }

    .btn-w {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .thankyou {
        padding: 40px 20px;
    }

    .thankyou h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .thankyou p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
}
