@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Serif+Display&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Crimson+Text:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --pathwise-blue: #4285F4;
    --pathwise-blue-soft: #5B9BF8;
    --pathwise-accent: #4285F4;
    --pathwise-green: #28A745;
    --pathwise-yellow: #F7B500;
    --pathwise-yellow-soft: #FFD54F;
    --pathwise-purple: #4285F4;
    --pathwise-bg: #f5f5f7;
    --pathwise-gray-light: #F4F4F4;
    --pathwise-gray-text: #6c757d;
    --pathwise-border: rgba(0, 0, 0, 0.08);
    --pathwise-border-light: rgba(66, 133, 244, 0.15);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-brand: 'Crimson Text', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.fp-page {
    background: #f5f5f7;
    background-image: none;
}
body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    background: var(--pathwise-bg);
    background-image: none;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    overflow: visible;
    animation: containerFadeIn 0.6s ease-out;
}
@keyframes containerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: var(--pathwise-blue);
    font-size: 2rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.questionnaire-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

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

.page-indicator {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.12) 0%, rgba(247, 181, 0, 0.12) 100%);
    border-radius: 8px;
    color: #1a1a1a;
}

.questions-wrapper {
    margin-bottom: 30px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.nav-buttons .btn-primary,
.nav-buttons .btn-secondary {
    flex: 1;
    margin: 0;
}

.question-item {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--pathwise-gray-light);
    border-radius: 12px;
    border-left: 4px solid rgba(66, 133, 244, 0.4);
}

.question-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
}

.question-item input[type="text"],
.question-item input[type="email"],
.question-item input[type="number"],
.question-item textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.question-item input:focus,
.question-item textarea:focus {
    outline: none;
    border-color: var(--pathwise-purple);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.question-item textarea {
    resize: vertical;
    min-height: 100px;
}

.question-item select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

.question-item input[type="radio"],
.question-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.radio-option:hover,
.checkbox-option:hover {
    background: #f0f0f0;
}

.btn-primary {
    background: var(--pathwise-green);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    background: #218838;
}

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

.btn-secondary {
    background: white;
    color: #333;
    border: 1px solid rgba(66, 133, 244, 0.4);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--pathwise-purple);
    color: white;
}

.thank-you {
    text-align: center;
    padding: 40px;
}

.thank-you h2 {
    color: var(--pathwise-blue);
    margin-bottom: 15px;
    font-size: 2rem;
}

.thank-you p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--pathwise-blue);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 300px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

.error-message {
    background: #f0f0f0;
    color: #333;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #666;
}

.success-message {
    background: #f0f0f0;
    color: #333;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #666;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 40px);
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--font-brand);
}

/* Shared nav bar - same on all pages */
.nav-header {
    position: sticky;
    top: 20px;
    z-index: 100;
    background: white;
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease;
}
.nav-header:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-header .logo {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1;
    margin: 0;
    padding: 0;
    transition: opacity 0.25s ease;
}

.nav-header .logo:hover {
    opacity: 0.9;
}



.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    overflow: visible;
}

.nav-links a,
.nav-links button {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    display: flex;
    align-items: center;
    line-height: 1;
}

.nav-links a:hover,
.nav-links button:hover {
    color: #1a1a1a;
}

.nav-links a:active,
.nav-links button:active {
    color: #1a1a1a;
}

.nav-links .auth-button {
    margin-left: auto;
}

.nav-links #plansLink {
    margin-right: 20px;
}

/* Modules dropdown (logged-in only) */
.nav-modules-dropdown {
    position: relative;
}
.nav-modules-dropdown .dropdown-btn {
    background: none;
    border: none;
    color: #555;
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-modules-dropdown .dropdown-btn:hover {
    color: #1a1a1a;
}
.nav-modules-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 200px;
    max-height: min(70vh, 400px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 200;
}
.nav-modules-dropdown .dropdown-menu.show {
    display: block;
}
.nav-modules-dropdown .dropdown-menu a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border: none;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    white-space: nowrap;
}
.nav-modules-dropdown .dropdown-menu a:last-child {
    border-bottom: none;
}
.nav-modules-dropdown .dropdown-menu a:hover {
    background: #f0f0f0;
}

.logo h1 {
    font-family: var(--font-heading);
    color: #000;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.tagline {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.auth-form h2 {
    color: #333;
    margin-bottom: 8px;
    font-size: 2rem;
    text-align: center;
    font-family: var(--font-heading);
}

.auth-form .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
    text-align: center;
    font-family: var(--font-body);
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--pathwise-purple);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

.user-info {
    color: var(--pathwise-purple);
    font-weight: 600;
    margin-right: 15px;
}

@media (prefers-reduced-motion: reduce) {
    .container {
        animation: none;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .questionnaire-container {
        padding: 20px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }
}

