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

:root {
    /* Color Palette */
    --primary: #0284c7;       /* Medical Sky Blue */
    --primary-dark: #0369a1;  /* Darker Sky Blue */
    --primary-light: #e0f2fe; /* Light Blue BG Tint */
    --primary-glow: rgba(2, 132, 199, 0.15);
    
    --navy: #0f172a;          /* Slate 900 */
    --navy-light: #1e293b;    /* Slate 800 */
    --navy-muted: #334155;    /* Slate 700 */
    
    --gray-light: #f8fafc;    /* Global reset */
    --gray-border: #e2e8f0;   /* Slate 200 */
    --gray-text: #64748b;     /* Slate 500 */
    
    --white: #ffffff;
    --success: #10b981;       /* Emerald 500 */
    --success-light: #d1fae5;
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Effects & Layout */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -15px rgba(2, 132, 199, 0.12);
    --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-round: 50px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--navy);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--navy);
}

p {
    color: var(--gray-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--navy) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-round);
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary-light);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-round);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Header / Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-border);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
}

.logo svg {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 550;
    font-size: 0.95rem;
    color: var(--navy-muted);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 8rem 0;
    background: radial-gradient(circle at 80% 20%, var(--primary-light) 0%, rgba(255, 255, 255, 0) 50%),
                radial-gradient(circle at 10% 80%, rgba(2, 132, 199, 0.05) 0%, rgba(255, 255, 255, 0) 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.25rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-muted);
}

/* Chatbot Assessment Widget */
.chat-widget-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.chat-widget {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 520px;
    position: relative;
    transition: var(--transition);
}

.chat-widget:focus-within {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary);
}

.chat-header {
    background-color: var(--navy);
    color: var(--white);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background-color: rgba(2, 132, 199, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    position: relative;
}

.chat-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    border: 1.5px solid var(--navy);
}

.chat-header-info h4 {
    color: var(--white);
    font-size: 0.95rem;
}

.chat-status {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.chat-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--gray-light);
    scroll-behavior: smooth;
}

/* Chat Messages */
.message {
    display: flex;
    gap: 0.75rem;
    max-width: 80%;
    animation: messageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

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

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-round);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.message.user .msg-avatar {
    background-color: var(--primary);
    color: var(--white);
}

.msg-bubble {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.message.bot .msg-bubble {
    background-color: var(--white);
    color: var(--navy-muted);
    border-top-left-radius: 0;
}

.message.user .msg-bubble {
    background-color: var(--primary);
    color: var(--white);
    border-top-right-radius: 0;
}

/* Options / Action area in chatbot */
.chat-footer {
    padding: 1.25rem 1.5rem;
    background-color: var(--white);
    border-top: 1px solid var(--gray-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.chat-opt-btn {
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-round);
    border: 1.5px solid var(--primary-light);
    background-color: var(--white);
    color: var(--navy-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.chat-opt-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: scale(1.03);
}

/* Chat Input field (for contact step) */
.chat-input-wrapper {
    display: none;
    gap: 0.5rem;
    width: 100%;
}

.chat-input-wrapper.active {
    display: flex;
}

.chat-text-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-round);
    border: 1.5px solid var(--gray-border);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.chat-text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.chat-send-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--gray-text);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    from {
        opacity: 0.3;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Assessment Dashboard (Final Result UI inside chatbot or replacing it) */
.result-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
    animation: messageSlideIn 0.5s ease forwards;
}

.result-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-circle-svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

.result-circle-svg circle {
    fill: none;
    stroke-width: 10;
}

.result-circle-bg {
    stroke: var(--primary-light);
}

.result-circle-val {
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-dasharray: 408; /* 2 * PI * r (r=65) */
    stroke-dashoffset: 408;
    transition: stroke-dashoffset 1.5s ease-out;
}

.result-value-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-val {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.result-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--navy-muted);
    text-transform: uppercase;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.result-desc {
    font-size: 0.875rem;
    color: var(--gray-text);
    margin-bottom: 1.5rem;
    max-width: 280px;
}

/* Features Section */
.features {
    padding: 7rem 0;
    background-color: var(--gray-light);
    border-top: 1px solid var(--gray-border);
    border-bottom: 1px solid var(--gray-border);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-border);
    transition: var(--transition-bounce);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon-wrapper svg {
    width: 30px;
    height: 30px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.feature-card p {
    font-size: 0.95rem;
}

/* Solution Illustration Section (Middle Promo) */
.solution-showcase {
    padding: 7rem 0;
    background-color: var(--white);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.showcase-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid var(--gray-border);
}

.mock-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.showcase-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.showcase-content h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.showcase-content p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.bullet-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bullet-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.bullet-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.bullet-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.bullet-text h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.bullet-text p {
    font-size: 0.925rem;
}

/* Call to Action Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2.25rem;
}

/* Footer */
footer {
    padding: 4rem 0 2rem 0;
    background-color: var(--white);
    border-top: 1px solid var(--gray-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(2, 0.75fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--gray-text);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--gray-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-text);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .showcase-image-wrapper {
        order: 2;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero {
        padding: 5rem 0 3rem 0;
    }
    
    .features {
        padding: 4rem 0;
    }
    
    .solution-showcase {
        padding: 4rem 0;
    }
    
    .cta-section {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .section-header h2,
    .showcase-content h2,
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .stat-item {
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.85rem;
    }
    
    .section-header h2,
    .showcase-content h2,
    .cta-content h2 {
        font-size: 1.6rem;
    }
    
    .showcase-image-wrapper {
        padding: 0.75rem;
    }
    
    .mock-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Progress bar inside assessment chatbot */
.chat-progress-container {
    width: 100%;
    height: 4px;
    background-color: var(--gray-border);
    position: relative;
}

.chat-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}
