/* Core Variables & Reset */
:root {
    --primary: #005b96;
    --secondary: #03396c;
    --accent: #e67e22; 
    --success: #2ecc71; 
    --text: #333;
    --bg: #f8f9fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header & Lang Toggle */
.main-header { background: #fff; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 15px; color: var(--primary); font-size: 1.2rem; text-decoration: none;}
.logo strong { font-weight: 700; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang-toggle { display: flex; background: #eee; border-radius: 20px; overflow: hidden; }
.lang-toggle button { padding: 8px 15px; border: none; background: none; cursor: pointer; font-weight: bold; color: #555; transition: 0.3s; }
.lang-toggle button.active { background: var(--primary); color: #fff; }
.call-cta { background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: bold; }

/* Hero Section */
.hero-section { padding: 60px 0; background-size: cover; background-position: center; min-height: 85vh; display: flex; align-items: center; color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; }
.badge { background: var(--accent); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; text-transform: uppercase; display: inline-block;}
.hero-text h1 { font-size: 2.8rem; margin: 20px 0; line-height: 1.2; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
.hero-text p { font-size: 1.1rem; margin-bottom: 30px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5);}
.trust-list { list-style: none; font-size: 1.1rem; font-weight: bold; }
.trust-list li { margin-bottom: 15px; }

/* Assessment Form Box */
.hero-form-box { background: #fff; border-radius: 10px; padding: 30px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); color: var(--text); border-top: 6px solid var(--accent); }
.hero-form-box h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 5px; text-align: center; }
.subtitle { text-align: center; color: #666; margin-bottom: 25px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: var(--secondary); }
.form-group select { width: 100%; padding: 14px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; background: #fbfbfb; cursor: pointer;}

/* General Buttons */
.btn-primary, .btn-secondary { padding: 15px; border: none; border-radius: 5px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: 0.3s; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #d67118; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2);}
.btn-secondary { background: #eee; color: #555; }
.full-width { width: 100%; }

/* --- POPUP MODAL CSS --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 43, 85, 0.95); z-index: 1000; display: flex; justify-content: center; align-items: center; transition: opacity 0.3s; }
.modal-overlay.hidden { display: none !important; opacity: 0; }
.modal-content { background: #fff; border-radius: 10px; padding: 40px; width: 90%; max-width: 650px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.3); border-top: 8px solid var(--primary); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 30px; font-weight: bold; color: #aaa; cursor: pointer; transition: 0.3s;}
.close-modal:hover { color: var(--accent); }
.modal-state { transition: opacity 0.3s; }
.modal-state.hidden { display: none !important; }
.modal-state.active { display: block !important; }

/* Loading State */
.loader-content { text-align: center; padding: 30px 0; }
.spinner { width: 70px; height: 70px; border: 6px solid #eee; border-top: 6px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#loader-title { color: var(--primary); font-size: 1.8rem; margin-bottom: 15px; }
.positive-msg { font-size: 1.2rem; color: #555; font-style: italic; background: #f0f7ff; padding: 15px; border-radius: 8px; border-left: 4px solid var(--accent); }

/* Results State */
#modal-results h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 20px; text-align: center; }
.score-container { display: flex; flex-direction: column; align-items: center; margin-bottom: 25px; }
.score-circle { width: 130px; height: 130px; border-radius: 50%; background: conic-gradient(var(--success) 0%, #eee 0%); display: flex; justify-content: center; align-items: center; position: relative; }
.score-circle::before { content: ""; width: 95px; height: 95px; background: #fff; border-radius: 50%; position: absolute; }
.score-value { position: relative; z-index: 1; font-size: 2.2rem; font-weight: bold; color: var(--secondary); }
.score-text { margin-top: 15px; font-weight: bold; color: #555; text-align: center; }

/* Detailed Report Boxes */
.analysis-box { background: #f0f7ff; padding: 25px; border-radius: 8px; margin-bottom: 20px; border-left: 5px solid var(--primary); }
.focus-areas-box { background: #eef5fb; padding: 15px 20px; border-radius: 6px; margin-bottom: 20px; border-left: 4px solid var(--accent); }
.focus-areas-box strong { color: var(--secondary); display: block; margin-bottom: 8px; font-size: 1.1rem; }
.focus-areas-box ul { padding-left: 20px; color: #444; }
.focus-areas-box ul li { margin-bottom: 6px; }
.recommended-path { background: #fff; padding: 20px; border-radius: 5px; border: 1px solid #cce0ff; }
.recommended-path strong { display:block; margin-bottom: 10px; color: var(--secondary);}
.recommended-path ul { padding-left: 20px; }

/* AI Disclaimer & Form */
.ai-disclaimer { background-color: #fff8e1; border: 1px solid #ffe082; padding: 15px; border-radius: 8px; margin-bottom: 25px; }
.ai-disclaimer p { margin: 0; font-size: 0.9rem; color: #856404; line-height: 1.5; }
.cta-prompt { font-weight: bold; text-align: center; margin-bottom: 20px; color: var(--secondary); }
.modal-content input { width: 100%; padding: 14px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 5px; }
.privacy-note { text-align: center; font-size: 0.8rem; color: #888; margin-top: 15px; }

/* Doctor Profile & Footer */
.doctor-profile { padding: 80px 0; background: #fff; }
.doctor-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.doc-image img { width: 100%; border-radius: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.main-footer { background: var(--secondary); color: #fff; padding: 50px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

/* ========================================== */
/* FLOATING BUTTONS & CHAT WIDGET STYLES      */
/* ========================================== */

/* WhatsApp Pulse Animation */
.wa-float { 
    position: fixed; bottom: 100px; right: 30px; 
    background: #25D366; border-radius: 50%; width: 60px; height: 60px; 
    display: flex; justify-content: center; align-items: center; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 1000; 
    animation: pulse-green 2s infinite; 
}
.wa-float img { width: 35px; }

@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Chatbot Container & Wiggle Animation */
.chatbot-container { position: fixed; bottom: 30px; right: 30px; z-index: 1001; }

#chatbot-toggle {
    background: linear-gradient(135deg, #005b96 0%, #6497b1 100%); 
    color: white; border: none; padding: 15px 25px; border-radius: 30px; 
    font-size: 1.05rem; font-weight: bold; cursor: pointer; 
    box-shadow: 0 6px 15px rgba(0, 91, 150, 0.4);
    animation: wiggle 3s infinite;
}

@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-10deg); }
    20% { transform: rotateZ(8deg); }
    25% { transform: rotateZ(-8deg); }
    30% { transform: rotateZ(6deg); }
    35%, 100% { transform: rotateZ(0); }
}

/* Chat Window Styling */
#chatbot-window {
    width: 350px; height: 450px; background: #fff; border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); display: flex; flex-direction: column;
    overflow: hidden; position: absolute; bottom: 70px; right: 0; 
    transition: 0.3s ease-in-out; border: 2px solid var(--primary);
}
.chat-hidden { opacity: 0; pointer-events: none; transform: translateY(20px); }
.chat-header { background: linear-gradient(135deg, #005b96 0%, #03396c 100%); color: #fff; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; padding: 15px; overflow-y: auto; background: #fdfdfd; display: flex; flex-direction: column; gap: 12px; }
.message { max-width: 85%; padding: 12px 16px; border-radius: 15px; font-size: 0.95rem; line-height: 1.4; }
.bot-message { background: #f1f3f5; color: #333; align-self: flex-start; border-bottom-left-radius: 2px; }
.user-message { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-input-area { display: flex; padding: 10px; background: #fff; border-top: 1px solid #eee; }
.chat-input-area input { flex: 1; padding: 12px; border: 1px solid #ccc; border-radius: 20px; outline: none; }
.chat-input-area button { background: var(--primary); color: #fff; border: none; padding: 10px 18px; margin-left: 10px; border-radius: 20px; cursor: pointer; font-weight: bold; transition: 0.2s;}

@media (max-width: 768px) {
    .hero-grid, .doctor-grid, .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align:center;}
    .hero-text h1 { font-size: 2.2rem; }
    .nav-right { display: none; }
    .modal-content { padding: 25px; width: 95%; }
    
    /* Responsive Buttons */
    .wa-float { bottom: 100px; right: 20px; width: 55px; height: 55px; }
    .chatbot-container { bottom: 25px; right: 20px; }
    #chatbot-window { width: calc(100vw - 40px); bottom: 65px; height: 400px;}
}