:root {
    --primary: #201c61;
    --primary-light: #3d37a3;
    --cta-blue: #2563eb;
    --cta-blue-hover: #1d4ed8;
    --red-accent: #a92f2c;
    --red-accent-light: #c23f3d;
    --gold-accent: #f59e0b;
    --accent: #e6f0fa;
    --text-dark: #1f2937;
    --text-gray: #4b5563;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.preload * {
    transition: none !important;
}

html, body {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

.app-container {
    display: flex;
    flex-direction: row-reverse; /* Flips the layout so form is on the right */
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* --- FORM PANEL (Now on right) --- */
.form-panel {
    width: 35%;
    min-width: 400px;
    max-width: 650px;
    background: var(--white);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    box-shadow: -10px 0 25px rgba(0,0,0,0.05);
    overflow: hidden;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.start-over-link {
    color: #6b7280;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    display: none;
    transition: color 0.2s;
    margin-top: 0.5rem;
}

.start-over-link:hover {
    color: var(--primary);
}

.form-header {
    margin-bottom: 2rem;
}

.logo {
    height: 40px;
}

.form-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

.form-content-wrapper {
    flex-grow: 1;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
}

.form-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s;
}

.form-step.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative;
}

.form-step.slide-out-left {
    transform: translateX(-20px);
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

.form-step h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 600;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.back-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text-gray);
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500;
}

.back-btn:hover {
    background: var(--accent);
    border-color: var(--primary-light);
    color: var(--primary);
}

.start-over-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--text-gray);
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-weight: 500;
}

.start-over-btn:hover {
    background: #fffafa;
    border-color: var(--red-accent-light);
    color: var(--red-accent);
}

/* Option Cards */
.option-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-cards.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.option-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.option-cards:not(.grid) .option-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 1.25rem;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.option-card span {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.option-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-card:hover .icon-wrapper {
    background: var(--primary);
    color: var(--white);
}

.option-card.selected {
    border-color: var(--red-accent);
    background: #fffafa;
}

.option-card.selected .icon-wrapper {
    background: var(--red-accent);
    color: var(--white);
}

/* ====== Step Indicator / Progress Dots ====== */
.step-indicator {
    margin-bottom: 1.25rem;
}

.progress-dots {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dot-wrapper {
    display: flex;
    align-items: center;
}

.dot-wrapper:not(:last-child)::after {
    content: '';
    width: 24px;
    height: 3px;
    background: var(--border);
    margin: 0 6px;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.dot-wrapper.done::after {
    background: var(--primary);
}

.dot {
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
}

.dot-done {
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
}

.dot-current {
    background: var(--white);
    border: 3px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
}

.dot-future {
    background: var(--white);
    border: 2px solid var(--border);
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.75rem;
}

/* ====== Question Entrance Animation ====== */
@keyframes questionEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Questions */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.question-item {
    animation: questionEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.question-item label {
    display: block;
    font-weight: 700;
    margin-bottom: 1.1rem;
    color: var(--primary);
    font-size: 1.05rem;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.question-item input[type="text"],
.question-item input[type="number"],
.question-item input[type="email"] {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: 'Inter', sans-serif;
}

.question-item input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(32, 28, 97, 0.08);
    background: var(--white);
}

.question-item input::placeholder {
    color: #b0b7c3;
}

.primary-btn {
    background: var(--gold-accent);
    color: #111827;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.primary-btn:hover:not(:disabled) {
    background: #e58e0a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.primary-btn:disabled {
    background: #fcd34d;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    color: #4b5563;
}

.submit-btn {
    background: var(--gold-accent);
    color: #111827; /* Dark text for contrast on gold */
    font-size: 1.1rem;
    padding: 1.15rem 1.5rem;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.submit-btn:hover:not(:disabled) {
    background: #e58e0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.secondary-btn {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.secondary-btn:hover {
    background: var(--accent);
}
/* ====== Health / Question Flow Option Cards ====== */
.flow-options {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-right: 8px; /* Prevent clipping during hover transform */
    padding-bottom: 8px;
}

.flow-option {
    /* Default: clearly branded, NOT default grey */
    background: #f8f7ff;
    border: 2px solid #dddcf0;
    border-radius: 12px;
    padding: 1rem 1rem 1rem 1.2rem;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    width: 100%;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: border-color 0.2s ease, background 0.2s ease,
                color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.flow-option-text {
    flex: 1;
}

.flow-option-chevron {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8e7f8;
    color: var(--primary-light);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.flow-option:hover {
    border-color: var(--primary);
    background: #eeedff;
    box-shadow: 0 4px 16px rgba(32, 28, 97, 0.1);
    transform: translateX(5px);
}

.flow-option:hover .flow-option-chevron {
    background: var(--primary);
    color: var(--white);
    transform: translateX(2px);
}

/* Selected: fully filled — unmistakably chosen */
.flow-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(32, 28, 97, 0.28);
    transform: translateX(5px);
}

.flow-option.selected .flow-option-text {
    color: var(--white);
}

.flow-option.selected .flow-option-chevron {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Number Pills */

.number-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.number-pill {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-dark);
    padding: 0.6rem 0;
    text-align: center;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
    width: 100%;
}

.number-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.number-pill.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.other-input-container {
    display: none;
    margin-top: 1rem;
}

.other-input-container.active {
    display: block;
}

/* Form inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent);
}

#summary-text {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    padding: 1rem;
    background: var(--accent);
    border-radius: 8px;
    border-left: 4px solid var(--red-accent);
}

/* Success Step */
.success-step {
    text-align: center;
    padding-top: 2rem;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.success-step h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.success-step p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Agent Card */
.agent-card {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-photo {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--primary);
}

.agent-info h4 {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.agent-phone {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 0.15rem;
}

.agent-email {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-light);
    text-decoration: none;
}

.agent-email:hover, .agent-phone:hover {
    text-decoration: underline;
}

/* --- INFO PANEL (Now on left) --- */
.info-panel {
    flex-grow: 1;
    background: linear-gradient(135deg, var(--primary) 0%, #110e3d 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem;
    overflow: hidden;
}

.background-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.circle-1 {
    width: 600px;
    height: 600px;
    top: -150px;
    right: -150px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: 10%;
}

.info-content-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
    width: 100%;
}

.info-content {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%) translateX(-30px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.5s;
}

.info-content.active {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    visibility: visible;
}

.large-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.team-photo {
    max-width: 85%;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem auto;
}

/* Contextual Icon Colors */
.large-icon.c-red { color: var(--red-accent); }
.large-icon.c-gold { color: var(--gold-accent); }
.large-icon.c-green { color: var(--success); }

.info-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.info-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--red-accent-light);
}

.stat span {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
}

.location-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
}

.location-card i {
    font-size: 1.5rem;
    color: var(--red-accent-light);
    margin-top: 0.2rem;
}

/* Continue / Next btn label tweak */
#btn-next-question {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    
    .form-panel {
        width: 100%;
        max-width: none;
        height: auto;
        flex: 1;
        overflow-y: visible;
        padding: 1.5rem;
    }
    
    .info-panel {
        display: none; /* Hide on mobile to focus on form */
    }
}
