/* ============================================
   MediAsk — "Your Health, Your Questions"
   NHS Blue + White Medical Theme
   Reddit-style Threaded Layout
   ============================================ */

/* === VOICE INPUT BUTTON === */
.voice-btn {
    background: none;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    min-width: 38px;
    cursor: pointer;
    color: #64748b;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.voice-btn:hover {
    border-color: var(--nhs-blue);
    color: var(--nhs-blue);
    background: var(--nhs-blue-pale);
}
.voice-btn.voice-active {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    animation: voice-pulse 1s infinite;
}
@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
}

/* === GOOGLE TRANSLATE TWEAKS === */
#google_translate_element {
    display: flex;
    align-items: center;
}
#google_translate_element .goog-te-gadget {
    font-size: 0 !important;
}
#google_translate_element .goog-te-gadget .goog-te-combo {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
}
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }

/* === HAZARD STATUS BADGES === */
.badge-submitted { background: #fef3c7; color: #92400e; }
.badge-acknowledged { background: #dbeafe; color: #1e40af; }
.badge-resolved { background: #dcfce7; color: #166534; }

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

:root {
    /* NHS Medical Blue Palette */
    --nhs-blue: #005eb8;
    --nhs-blue-dark: #003f78;
    --nhs-blue-light: #41b6e6;
    --nhs-blue-pale: #e8f4fd;
    --nhs-blue-hover: #004f9f;

    /* Core */
    --bg: #f4f6f9;
    --bg-alt: #edf0f5;
    --card: #ffffff;
    --glass: rgba(255,255,255,0.85);
    --text: #0b1222;
    --text-secondary: #3d4f6f;
    --text-muted: #8896ab;
    --white: #ffffff;
    --border: #dce3ed;
    --border-hover: #b8c5d6;

    /* Accents */
    --success: #059669;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --purple: #7c3aed;
    --purple-bg: #f5f3ff;
    --teal: #0d9488;
    --teal-bg: #f0fdfa;

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #005eb8 0%, #41b6e6 100%);
    --gradient-mental: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
    --gradient-warm: linear-gradient(135deg, #059669 0%, #34d399 100%);

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.07);
    --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1);
    --shadow-blue: 0 4px 14px rgba(0,94,184,0.25);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.03);

    /* Sizing */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-full: 50px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--nhs-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--nhs-blue-dark); }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
::selection { background: var(--nhs-blue-pale); color: var(--nhs-blue-dark); }

/* ===== NAVBAR ===== */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    border-bottom: 3px solid var(--nhs-blue);
    height: 60px;
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1.25rem; color: var(--nhs-blue); font-weight: 700;
    letter-spacing: -0.5px; flex-shrink: 0;
}
.logo:hover { text-decoration: none; opacity: 0.9; }
.logo strong { font-weight: 800; }
.logo-icon {
    width: 34px; height: 34px;
    background: var(--gradient-blue);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 0.95rem;
}

/* Search */
.search-bar { flex: 1; max-width: 480px; position: relative; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.82rem; pointer-events: none; }
.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem; font-family: inherit;
    background: var(--bg); color: var(--text);
    transition: var(--transition);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
    outline: none;
    border-color: var(--nhs-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0,94,184,0.12);
}

/* Nav Links */
.nav-links { display: flex; align-items: center; gap: 0.2rem; flex-shrink: 0; }
.nav-link {
    display: flex; align-items: center; gap: 0.35rem;
    color: var(--text-secondary); font-weight: 500; font-size: 0.82rem;
    padding: 0.4rem 0.65rem; border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover { background: var(--nhs-blue-pale); color: var(--nhs-blue); text-decoration: none; }
.nav-link.active { background: var(--nhs-blue-pale); color: var(--nhs-blue); font-weight: 600; }
.nav-link i { font-size: 0.85rem; }
.nav-mental.active, .nav-mental:hover { background: var(--purple-bg); color: var(--purple); }
.nav-link-icon { color: var(--text-muted); padding: 0.35rem; font-size: 0.95rem; }
.nav-link-icon:hover { color: var(--danger); }
.nav-user { display: flex; align-items: center; gap: 0.35rem; margin-left: 0.2rem; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.2rem; color: var(--text); cursor: pointer; padding: 0.3rem; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.45rem 1.1rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.82rem; font-family: inherit;
    border: none; cursor: pointer; transition: var(--transition);
    text-decoration: none; white-space: nowrap;
}
.btn-glow {
    background: var(--gradient-blue); color: var(--white);
    box-shadow: var(--shadow-blue);
}
.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,94,184,0.35);
    color: var(--white); text-decoration: none;
}
.btn-lg { padding: 0.65rem 1.6rem; font-size: 0.92rem; border-radius: var(--radius); }
.btn-glass {
    background: rgba(255,255,255,0.8); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5); color: var(--white);
}
.btn-glass:hover { background: rgba(255,255,255,0.95); color: var(--nhs-blue); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: var(--white); border: 2px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--nhs-blue); color: var(--nhs-blue); text-decoration: none; }
.btn-full { width: 100%; padding: 0.7rem; font-size: 0.92rem; }

/* ===== AVATAR ===== */
.avatar-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--gradient-blue); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0; text-decoration: none;
}
.avatar-sm:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--nhs-blue-pale); }

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 0.5rem 0; display: flex; justify-content: center;
}
.breadcrumb-inner {
    max-width: 1280px; width: 100%; padding: 0 1.5rem;
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--text-muted);
}
.breadcrumb-inner a { color: var(--text-secondary); }
.breadcrumb-inner a:hover { color: var(--nhs-blue); }
.breadcrumb-inner i.fa-chevron-right { font-size: 0.55rem; }
.btn-back {
    margin-left: auto; font-size: 0.78rem; font-weight: 600;
    color: var(--text-secondary); display: flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.7rem; border-radius: var(--radius-xs);
    transition: var(--transition);
}
.btn-back:hover { background: var(--nhs-blue-pale); color: var(--nhs-blue); text-decoration: none; }

/* ===== LAYOUT ===== */
.app-layout {
    max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem;
    display: flex; gap: 1.5rem; min-height: calc(100vh - 63px);
}
.main-content { flex: 1; min-width: 0; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: 240px; flex-shrink: 0;
    position: sticky; top: 76px; align-self: flex-start;
    max-height: calc(100vh - 90px); overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 2px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.sidebar-section { margin-bottom: 1.2rem; }
.sidebar-title {
    font-size: 0.65rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px;
    font-weight: 700; padding: 0 0.6rem; margin-bottom: 0.4rem;
}
.category-list { list-style: none; }
.category-list li { margin-bottom: 1px; }
.category-list li a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.42rem 0.6rem; border-radius: var(--radius-xs);
    color: var(--text-secondary); font-size: 0.82rem; font-weight: 500;
    transition: var(--transition);
}
.category-list li a i { width: 16px; text-align: center; font-size: 0.75rem; opacity: 0.5; color: var(--nhs-blue); }
.category-list li a:hover { background: var(--nhs-blue-pale); color: var(--nhs-blue); text-decoration: none; }
.category-list li a:hover i { opacity: 1; }
.category-list li a.active { background: var(--nhs-blue-pale); color: var(--nhs-blue); font-weight: 600; }
.category-list li a.active i { opacity: 1; }
.cat-count {
    margin-left: auto; font-size: 0.68rem;
    background: var(--bg-alt); padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full); color: var(--text-muted); font-weight: 600;
}
.cta-card {
    background: var(--nhs-blue-pale); border: 1px solid #c5ddf5;
    border-radius: var(--radius-sm); padding: 1rem; text-align: center;
}
.cta-icon { font-size: 1.5rem; color: var(--nhs-blue); margin-bottom: 0.4rem; }
.cta-card h4 { font-size: 0.82rem; margin-bottom: 0.2rem; color: var(--text); }
.cta-card p { font-size: 0.72rem; color: var(--text-secondary); line-height: 1.45; }

/* ===== HOME HERO ===== */
.home-hero {
    background: var(--gradient-blue);
    border-radius: var(--radius); padding: 2rem 2.2rem;
    margin-bottom: 1.2rem; position: relative; overflow: hidden;
}
.home-hero::before {
    content: ''; position: absolute; top: -60%; right: -15%;
    width: 350px; height: 350px;
    background: rgba(255,255,255,0.08); border-radius: 50%;
}
.home-hero::after {
    content: ''; position: absolute; bottom: -40%; left: -8%;
    width: 250px; height: 250px;
    background: rgba(255,255,255,0.06); border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
    color: var(--white); font-size: 1.6rem; font-weight: 800;
    margin-bottom: 0.3rem; letter-spacing: -0.3px;
}
.hero-content p { color: rgba(255,255,255,0.88); font-size: 0.9rem; margin-bottom: 1rem; max-width: 480px; }
.hero-stats-row { display: flex; gap: 1.5rem; }
.hero-stat { color: rgba(255,255,255,0.8); font-size: 0.82rem; font-weight: 500; }
.hero-stat strong { color: var(--white); font-weight: 800; font-size: 1rem; }

/* ===== FEED ===== */
.feed-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.8rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--border);
}
.feed-header h2 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 0.4rem;
}
.feed-header h2 i { color: var(--nhs-blue); font-size: 0.9rem; }
.category-desc { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; }

/* ===== REDDIT-STYLE QUESTION CARDS ===== */
.question-card {
    display: flex; align-items: stretch;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
    transition: var(--transition);
    cursor: pointer; position: relative;
    overflow: hidden;
}
.question-card:hover {
    border-color: var(--nhs-blue);
    box-shadow: var(--shadow-sm);
}

/* Vote column (Reddit-style left bar) */
.question-stats {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 0.15rem;
    min-width: 52px; padding: 0.6rem 0;
    background: var(--bg); border-right: 1px solid var(--border);
}
.stat-pill {
    display: flex; align-items: center; gap: 0.2rem;
    font-size: 0.72rem; color: var(--text-muted); font-weight: 600;
}
.stat-pill.has-answers { color: var(--success); }
.stat-pill i { font-size: 0.65rem; }

/* Content */
.question-content { flex: 1; min-width: 0; padding: 0.7rem 0.9rem; }
.question-content h3 { font-size: 0.92rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.15rem; }
.question-content h3 a { color: var(--text); }
.question-content h3 a:hover { color: var(--nhs-blue); text-decoration: none; }
.question-preview {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 0.3rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.question-arrow {
    color: var(--text-muted); font-size: 0.75rem; align-self: center;
    padding-right: 0.7rem;
    opacity: 0; transform: translateX(-4px); transition: var(--transition);
}
.question-card:hover .question-arrow { opacity: 1; transform: translateX(0); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center; gap: 0.2rem;
    padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
    font-size: 0.67rem; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap;
}
.badge-sm { font-size: 0.62rem; padding: 0.1rem 0.4rem; }
.badge-category { background: var(--nhs-blue-pale); color: var(--nhs-blue); }
.badge-official { background: var(--success-bg); color: var(--success); }
.badge-topic { background: var(--teal-bg); color: var(--teal); }
.badge-active { background: var(--gradient-blue); color: var(--white); }
.meta-text { color: var(--text-muted); font-size: 0.75rem; }
.meta-text a { color: var(--text-secondary); font-weight: 500; }
.meta-text a:hover { color: var(--nhs-blue); }
.question-meta { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

/* ===== DETAIL PAGE ===== */
.detail-page { max-width: 780px; }
.detail-question {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem;
    border-top: 3px solid var(--nhs-blue);
}
.detail-question-header { padding: 1.3rem 1.5rem 0.8rem; }
.detail-question-header h1 { font-size: 1.3rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.5rem; }
.detail-question-body {
    padding: 0 1.5rem 1.3rem; font-size: 0.9rem;
    line-height: 1.75; color: var(--text-secondary); white-space: pre-wrap;
}
.answers-section { margin-top: 0.3rem; }
.answers-header { margin-bottom: 0.8rem; }
.answers-header h2 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
.answers-header h2 i { color: var(--nhs-blue); }

/* ===== ANSWERS ===== */
.answer-card {
    display: flex; gap: 0.8rem; padding: 1rem 1.1rem;
    background: var(--card); border: 1px solid var(--border);
    border-left: 3px solid var(--nhs-blue-pale);
    border-radius: var(--radius-sm); margin-bottom: 0.4rem;
    transition: var(--transition);
}
.answer-card:hover { border-left-color: var(--nhs-blue); box-shadow: var(--shadow-xs); }
.vote-controls { display: flex; flex-direction: column; align-items: center; gap: 0; }
.vote-btn {
    background: none; border: none;
    width: 32px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.2rem; color: var(--text-muted);
    transition: var(--transition); border-radius: var(--radius-xs);
}
.vote-btn:hover { background: var(--bg); }
.upvote:hover { color: var(--success); background: var(--success-bg); }
.downvote:hover { color: var(--danger); background: var(--danger-bg); }
.vote-score { font-weight: 800; font-size: 1rem; color: var(--text); padding: 0.05rem 0; }
.answer-content { flex: 1; min-width: 0; }
.answer-body { margin-bottom: 0.6rem; white-space: pre-wrap; line-height: 1.7; font-size: 0.88rem; color: var(--text-secondary); }
.answer-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }
.answer-author { display: flex; align-items: center; gap: 0.5rem; }
.author-name { font-weight: 600; font-size: 0.8rem; color: var(--text); }
.author-name:hover { color: var(--nhs-blue); }

/* ===== FORMS ===== */
.form-container {
    max-width: 620px; background: var(--card); padding: 1.8rem;
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    border: 1px solid var(--border); border-top: 3px solid var(--nhs-blue);
}
.form-container h2 { margin-bottom: 0.3rem; font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 0.4rem; }
.form-container h2 i { color: var(--nhs-blue); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.82rem; color: var(--text-secondary); }
.form-control {
    width: 100%; padding: 0.55rem 0.8rem;
    border: 2px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.88rem; font-family: inherit; transition: var(--transition);
    background: var(--bg); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--nhs-blue); background: var(--white); box-shadow: 0 0 0 3px rgba(0,94,184,0.08); }
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.55; }
.form-row { display: flex; gap: 0.8rem; }
.form-row .form-group { flex: 1; }
.form-error { display: block; color: var(--danger); font-size: 0.75rem; margin-top: 0.2rem; font-weight: 500; }

/* ===== AUTH ===== */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.auth-card {
    background: var(--card); padding: 2.2rem; border-radius: var(--radius);
    width: 100%; max-width: 420px; box-shadow: var(--shadow-xl);
    border: 1px solid var(--border); border-top: 3px solid var(--nhs-blue);
}
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.2rem; font-weight: 700; }
.auth-switch { text-align: center; margin-top: 1.2rem; font-size: 0.82rem; color: var(--text-muted); }
.answer-form {
    margin-top: 1.2rem; padding: 1.2rem; background: var(--card);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.answer-form h3 { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.35rem; }
.auth-prompt {
    text-align: center; padding: 1.3rem; background: var(--nhs-blue-pale);
    border-radius: var(--radius-sm); margin-top: 1.2rem;
    border: 1px dashed var(--nhs-blue-light);
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--text-secondary);
}

/* ===== TOAST ===== */
.toast-container { position: fixed; top: 72px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 0.4rem; }
.toast {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease;
    min-width: 260px; background: var(--white);
}
.toast-success { border-left: 3px solid var(--success); }
.toast-success i { color: var(--success); }
.toast-danger { border-left: 3px solid var(--danger); }
.toast-danger i { color: var(--danger); }
.toast-info { border-left: 3px solid var(--nhs-blue); }
.toast-info i { color: var(--nhs-blue); }
.toast-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); margin-left: auto; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== MENTAL HEALTH HUB ===== */
.mh-page { max-width: 860px; margin: 0 auto; }
.mh-hero {
    border-radius: var(--radius); padding: 2.5rem 2.2rem;
    position: relative; overflow: hidden;
    background: var(--gradient-mental); margin-bottom: 1.5rem;
}
.mh-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.mh-hero-orb {
    position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 280px; height: 280px; background: #a78bfa; top: -80px; right: -40px; }
.orb-2 { width: 180px; height: 180px; background: #e9d5ff; bottom: -60px; left: -25px; animation-delay: -3s; }
.orb-3 { width: 130px; height: 130px; background: #818cf8; top: 40%; left: 55%; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-15px) scale(1.03); } }
.mh-hero-content { position: relative; z-index: 1; }
.mh-hero-badge {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
    padding: 0.3rem 0.9rem; border-radius: var(--radius-full);
    color: var(--white); font-size: 0.78rem; font-weight: 600; margin-bottom: 0.8rem;
}
.mh-hero-content h1 { color: var(--white); font-size: 1.9rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.6rem; }
.mh-hero-content p { color: rgba(255,255,255,0.9); font-size: 0.92rem; max-width: 500px; margin-bottom: 1.2rem; line-height: 1.55; }
.mh-hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.mh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
.stat-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem; text-align: center;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-number { font-size: 1.4rem; font-weight: 800; color: var(--nhs-blue); margin-bottom: 0.15rem; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

.crisis-banner {
    display: flex; align-items: center; gap: 0.8rem;
    background: var(--warning-bg); border: 1px solid #fcd34d;
    border-radius: var(--radius-sm); padding: 0.8rem 1.2rem; margin-bottom: 1.2rem;
}
.crisis-icon { font-size: 1.1rem; color: var(--warning); }
.crisis-text { font-size: 0.8rem; color: #92400e; }
.crisis-text strong { color: #78350f; }

.mh-topics { margin-bottom: 1.5rem; }
.mh-topics h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.8rem; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.topic-card {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 1rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.85rem; color: var(--white);
    transition: var(--transition-bounce); text-decoration: none;
}
.topic-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: var(--shadow-lg); color: var(--white); text-decoration: none; }
.topic-card i { font-size: 1.1rem; }
.tc-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.tc-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.tc-orange { background: linear-gradient(135deg, #ea580c, #fb923c); }
.tc-red { background: linear-gradient(135deg, #dc2626, #f87171); }
.tc-indigo { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.tc-teal { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.mh-feed h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
.mh-feed h2 i { color: var(--purple); }

/* ===== WORKPLACE ===== */
.workplace-card { border-left: 3px solid var(--teal); }
.workplace-card .question-content p { font-size: 0.8rem; color: var(--text-secondary); margin: 0.2rem 0; line-height: 1.45; }
.topic-filters { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.topic-filters .badge {
    cursor: pointer; padding: 0.3rem 0.75rem; font-size: 0.75rem;
    background: var(--white); color: var(--text-secondary);
    border: 1px solid var(--border); transition: var(--transition);
}
.topic-filters .badge:hover { border-color: var(--nhs-blue); color: var(--nhs-blue); text-decoration: none; }
.topic-filters .badge-active { background: var(--gradient-blue); color: var(--white); border-color: transparent; }

/* ===== PROFILE ===== */
.profile-page { max-width: 760px; }
.profile-header {
    display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.5rem;
    padding: 1.3rem; background: var(--card); border-radius: var(--radius);
    border: 1px solid var(--border); border-top: 3px solid var(--nhs-blue);
}
.avatar-placeholder {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--gradient-blue); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; flex-shrink: 0;
}
.profile-info h1 { font-size: 1.15rem; font-weight: 700; }
.profile-content h2 { margin: 1.2rem 0 0.6rem; font-size: 0.92rem; font-weight: 600; color: var(--text-secondary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.6rem; margin-top: 1.5rem; padding: 0.8rem 0; }
.page-info { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty-state i { margin-bottom: 0.8rem; color: var(--nhs-blue-light); display: block; }
.empty-state h3 { margin-bottom: 0.4rem; color: var(--text-secondary); font-size: 1rem; }
.empty-state p { margin-bottom: 1rem; font-size: 0.88rem; }
.source-link { font-size: 0.78rem; font-weight: 500; }
.source-link a { color: var(--nhs-blue); }

/* ===== FOOTER ===== */
.footer { background: var(--white); border-top: 3px solid var(--nhs-blue); padding: 1.5rem 0; margin-top: 2rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; text-align: center; }
.footer-brand { font-size: 1rem; font-weight: 700; color: var(--nhs-blue); margin-bottom: 0.2rem; }
.footer-brand i { margin-right: 0.2rem; }
.footer p { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.footer-links { display: flex; justify-content: center; gap: 1.2rem; }
.footer-links a { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.footer-links a:hover { color: var(--nhs-blue); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) { .sidebar { display: none; } .mh-stats { grid-template-columns: repeat(2, 1fr); } .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .navbar { height: auto; }
    .nav-container { flex-wrap: wrap; padding: 0.5rem 1rem; gap: 0.4rem; }
    .search-bar { order: 3; flex: 1 1 100%; max-width: 100%; }
    .nav-links { display: none; flex-direction: column; width: 100%; gap: 0.2rem; order: 4; padding-top: 0.4rem; border-top: 1px solid var(--border); }
    .nav-links.show { display: flex; }
    .mobile-toggle { display: block; margin-left: auto; }
    .app-layout { padding: 0.8rem; flex-direction: column; }
    .form-row { flex-direction: column; gap: 0; }
    .mh-hero-content h1 { font-size: 1.4rem; }
    .home-hero { padding: 1.3rem; }
    .hero-content h1 { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .topic-grid { grid-template-columns: 1fr; }
    .mh-stats { grid-template-columns: 1fr 1fr; }
    .question-card { flex-direction: column; }
    .question-stats { flex-direction: row; min-width: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 0.4rem 0.7rem; }
    .question-arrow { display: none; }
    .hero-stats-row { flex-direction: column; gap: 0.2rem; }
    .sort-tabs { gap: 0.2rem; }
    .sort-tab { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
    .daily-prompt { flex-direction: column; text-align: center; }
}

/* ===== AUTHENTICITY BADGES ===== */
.badge-nhs { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-ai { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-human { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.badge-govuk { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.auth-badge-row { margin-bottom: 0.5rem; }
.avatar-ai { background: linear-gradient(135deg, #1565c0, #42a5f5) !important; }
.avatar-nhs { background: linear-gradient(135deg, #2e7d32, #66bb6a) !important; }

/* ===== SORT TABS ===== */
.sort-tabs { display: flex; gap: 0.3rem; }
.sort-tab {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0.4rem 0.8rem; border-radius: var(--radius-full);
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); background: var(--bg);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.sort-tab:hover { color: var(--nhs-blue); border-color: var(--nhs-blue); text-decoration: none; }
.sort-tab.active { background: var(--nhs-blue); color: var(--white); border-color: var(--nhs-blue); }
.sort-tab i { font-size: 0.7rem; }

/* ===== DAILY PROMPT ===== */
.daily-prompt {
    display: flex; align-items: center; gap: 1rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d; border-radius: var(--radius-sm);
    padding: 0.9rem 1.2rem; margin-bottom: 0.8rem;
}
.prompt-icon { font-size: 1.3rem; color: #d97706; }
.prompt-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: #92400e; font-weight: 700; display: block; }
.prompt-content { flex: 1; }
.prompt-content p { font-size: 0.88rem; color: #78350f; font-weight: 500; margin-top: 0.15rem; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }

/* ===== UNANSWERED CALLOUT ===== */
.unanswered-callout {
    display: flex; align-items: center; gap: 0.7rem;
    background: var(--nhs-blue-pale); border: 1px solid #a8d4f5;
    border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-bottom: 0.8rem;
    font-size: 0.82rem; color: var(--nhs-blue-dark);
}
.unanswered-callout i { font-size: 1.1rem; color: var(--nhs-blue); }
.unanswered-callout span { flex: 1; }

/* ===== HERO TAGLINE ===== */
.hero-tagline {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
    color: rgba(255,255,255,0.7); font-weight: 600; margin-bottom: 0.3rem;
}

/* ===== NOTIFICATION BELL ===== */
.notif-bell { position: relative; }
.notif-badge {
    position: absolute; top: -4px; right: -6px;
    background: var(--danger); color: var(--white);
    font-size: 0.6rem; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--white);
}
.notif-page { max-width: 700px; }
.notif-page h2 { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.notif-item {
    display: flex; align-items: flex-start; gap: 0.8rem;
    padding: 0.8rem 1rem; border: 1px solid var(--border);
    border-radius: var(--radius-sm); margin-bottom: 0.3rem;
    transition: var(--transition); color: var(--text);
}
.notif-item:hover { background: var(--nhs-blue-pale); text-decoration: none; }
.notif-unread { border-left: 3px solid var(--nhs-blue); background: #fafcff; }
.notif-item i { font-size: 1rem; color: var(--nhs-blue); margin-top: 0.2rem; }
.notif-item p { font-size: 0.85rem; margin-bottom: 0.1rem; }

/* ===== REPUTATION CARD ===== */
.rep-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.3rem;
    margin-bottom: 1.5rem;
}
.rep-level { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.rep-level-name { font-size: 1.1rem; font-weight: 700; }
.rep-points { font-size: 0.82rem; color: var(--text-muted); }
.rep-stats-row { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.rep-stat { text-align: center; }
.rep-stat strong { display: block; font-size: 1.2rem; color: var(--text); }
.rep-stat span { font-size: 0.75rem; color: var(--text-muted); }
.rep-progress { margin-top: 0.5rem; }
.rep-progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.rep-progress-bar {
    height: 8px; background: var(--bg); border-radius: var(--radius-full); overflow: hidden;
}
.rep-progress-fill {
    height: 100%; background: var(--gradient-blue); border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ===== STORIES ===== */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.story-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.2rem;
    transition: var(--transition);
}
.story-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.story-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.story-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; line-height: 1.4; }
.story-card h3 a { color: var(--text); }
.story-card h3 a:hover { color: var(--nhs-blue); }
.story-preview { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 0.6rem; }
.story-card-footer { display: flex; justify-content: space-between; align-items: center; }
.story-read { max-width: 760px; }

/* ===== RELATED QUESTIONS ===== */
.related-section {
    margin-top: 1.5rem; padding: 1.2rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.related-section h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
.related-section h3 i { color: var(--nhs-blue); }
.related-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0; border-bottom: 1px solid var(--border);
    color: var(--text); font-size: 0.85rem; transition: var(--transition);
}
.related-link:last-child { border-bottom: none; }
.related-link:hover { color: var(--nhs-blue); text-decoration: none; padding-left: 0.3rem; }

/* ===== RESPONSIVE EXTRAS ===== */
@media (max-width: 768px) {
    .story-grid { grid-template-columns: 1fr; }
    .rep-stats-row { gap: 1rem; }
}

/* ===== WORKPLACE SUB-NAV ===== */
.workplace-subnav {
    display: flex; gap: 0.3rem; margin-bottom: 1rem;
    padding-bottom: 0.8rem; border-bottom: 2px solid var(--border);
}
.subnav-tab {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary); background: var(--bg);
    border: 1px solid var(--border); transition: var(--transition);
}
.subnav-tab:hover { color: var(--nhs-blue); border-color: var(--nhs-blue); text-decoration: none; }
.subnav-tab.active { background: var(--nhs-blue); color: var(--white); border-color: var(--nhs-blue); }

/* ===== GOOGLE SIGN IN BUTTON ===== */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; padding: 0.65rem; border-radius: var(--radius-sm);
    background: var(--white); border: 2px solid var(--border);
    color: var(--text); font-weight: 600; font-size: 0.88rem;
    font-family: inherit; cursor: pointer; transition: var(--transition);
    text-decoration: none; margin-bottom: 1rem;
}
.btn-google:hover { border-color: #4285f4; box-shadow: 0 2px 8px rgba(66,133,244,0.2); text-decoration: none; color: var(--text); }
.auth-divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1rem 0; color: var(--text-muted); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; border-top: 1px solid var(--border);
}

/* Button Styling */
.btn-report {
  background-color: #ff9800; /* Matches your orange UI buttons */
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
}

/* Modal Background */
.modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0; top: 0;
  width: 100%; height: 100%; 
  background-color: rgba(0,0,0,0.5); 
}

/* Modal Box */
.modal-content {
  background-color: #fefefe;
  margin: 10% auto; 
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  font-family: sans-serif;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Close Button */
.close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close-btn:hover { color: black; }

/* Form Elements */
.modal-content label { display: block; margin-top: 10px; font-weight: bold;}
.modal-content input, .modal-content textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.btn-submit {
  background-color: #4CAF50; /* Green */
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  margin-top: 15px;
  cursor: pointer;
  width: 100%;
}
