/**
 * DoctorBookly — Latest Medical News panel (/pages/qa news tab)
 */
#news-panel {
    --mn-teal: #0d9488;
    --mn-teal-dark: #0f766e;
    --mn-blue: #2563eb;
    --mn-slate: #1e293b;
    --mn-muted: #64748b;
    --mn-border: #e2e8f0;
    --mn-radius: 14px;
    font-family: 'DM Sans', 'Poppins', system-ui, sans-serif;
}

#news-panel .qa-news-panel {
    position: relative;
    overflow: hidden;
    margin-top: clamp(12px, 2vw, 24px) !important;
    padding: 0 !important;
    background: linear-gradient(165deg, #ffffff 0%, #f0fdfa 38%, #eff6ff 100%);
    border: 1px solid rgba(13, 148, 136, 0.18);
    border-radius: 18px;
    box-shadow:
        0 4px 6px rgba(15, 118, 110, 0.04),
        0 20px 48px rgba(37, 99, 235, 0.08);
}

#news-panel .qa-news-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08), transparent 70%);
    pointer-events: none;
}

#news-panel .qa-news-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    padding: clamp(18px, 3vw, 26px) clamp(18px, 3vw, 28px) clamp(14px, 2vw, 18px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.12);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,253,250,0.9));
}

#news-panel .qa-news-panel__head-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

#news-panel .qa-news-panel__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mn-teal), var(--mn-teal-dark));
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

#news-panel .qa-news-panel__head-text h2 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.45rem) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--mn-slate) !important;
    line-height: 1.25;
}

#news-panel .qa-news-panel__head-text h2 i { display: none; }

#news-panel .qa-news-panel__subtitle {
    margin: 0;
    font-size: clamp(13px, 1.8vw, 14px);
    color: var(--mn-muted);
    line-height: 1.45;
    max-width: 42ch;
}

#news-panel .qa-news-panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    color: var(--mn-teal-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

#news-panel .qa-news-panel__badge i { font-size: 11px; opacity: 0.85; }

#news-panel .qa-news-panel__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 clamp(18px, 3vw, 28px) clamp(12px, 2vw, 16px);
}

#news-panel .qa-news-panel__topic {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--mn-border);
    color: var(--mn-muted);
}

#news-panel .news-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px !important;
    max-height: min(68vh, 780px);
    overflow-y: auto;
    padding: 4px clamp(14px, 2.5vw, 24px) clamp(14px, 2vw, 20px);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #99f6e4 transparent;
}

#news-panel .news-list::-webkit-scrollbar { width: 6px; }
#news-panel .news-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #5eead4, #2dd4bf);
    border-radius: 999px;
}

#news-panel .qa-news-article {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: clamp(14px, 2vw, 18px) clamp(14px, 2vw, 18px) clamp(14px, 2vw, 18px) clamp(12px, 2vw, 16px);
    background: #fff;
    border: 1px solid var(--mn-border);
    border-radius: var(--mn-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: visible;
    margin-bottom: 0 !important;
}

#news-panel .qa-news-article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--mn-accent, var(--mn-teal));
    border-radius: var(--mn-radius) 0 0 var(--mn-radius);
}

#news-panel .qa-news-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.1);
    border-color: rgba(13, 148, 136, 0.25);
}

#news-panel .qa-news-article[data-cat="RESEARCH"] { --mn-accent: #3b82f6; }
#news-panel .qa-news-article[data-cat="HEALTH"] { --mn-accent: #16a34a; }
#news-panel .qa-news-article[data-cat="NEUROSCIENCE"] { --mn-accent: #8b5cf6; }
#news-panel .qa-news-article[data-cat="WELLNESS"] { --mn-accent: #0d9488; }
#news-panel .qa-news-article[data-cat="PUBLIC HEALTH"] { --mn-accent: #d97706; }

#news-panel .qa-news-article__body {
    flex: 1;
    min-width: 0;
}

#news-panel .qa-news-article__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-top: 2px;
    background: color-mix(in srgb, var(--mn-accent) 12%, white);
    color: var(--mn-accent);
    border: 1px solid color-mix(in srgb, var(--mn-accent) 22%, transparent);
}

#news-panel .qa-news-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px !important;
}

#news-panel .news-cat {
    display: inline-flex !important;
    align-items: center;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    margin-right: 0 !important;
}

#news-panel .news-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 500;
}

#news-panel .news-date i { font-size: 10px; opacity: 0.8; }

#news-panel .qa-news-item__title {
    display: block !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: none !important;
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: clamp(15px, 2vw, 17px) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--mn-slate) !important;
    letter-spacing: -0.01em;
}

#news-panel .qa-news-item__desc {
    margin: 0 !important;
    font-size: clamp(13px, 1.6vw, 14px) !important;
    color: #475569 !important;
    line-height: 1.62 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#news-panel .qa-news-panel__foot {
    padding: clamp(14px, 2.5vw, 20px) clamp(18px, 3vw, 28px) clamp(18px, 3vw, 26px);
    border-top: 1px solid rgba(13, 148, 136, 0.1);
    background: rgba(255, 255, 255, 0.65);
}

#news-panel .qa-news-edu-note {
    margin: 0 0 16px !important;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--mn-border);
    font-size: 12px !important;
    color: #475569 !important;
    line-height: 1.55 !important;
}

#news-panel .qa-news-edu-note i {
    color: var(--mn-teal) !important;
    margin-right: 6px;
}

#news-panel .qa-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 0 !important;
}

#news-panel .qa-cta-bar a {
    flex: 1 1 200px;
    max-width: 100%;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

#news-panel .qa-cta-bar .btn-news {
    background: linear-gradient(135deg, var(--mn-blue), #1d4ed8) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}

#news-panel .qa-cta-bar .btn-ask {
    background: linear-gradient(135deg, var(--mn-teal), var(--mn-teal-dark)) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.28);
}

@media (max-width: 640px) {
    #news-panel .qa-news-panel__head {
        flex-direction: column;
    }
    #news-panel .qa-news-panel__badge {
        align-self: flex-start;
    }
    #news-panel .qa-news-article {
        padding-left: 16px;
    }
    #news-panel .qa-news-article__icon {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #news-panel .qa-news-article:hover { transform: none; }
}
