/* ══════════════════════════════════════════════════════════════════
   ✦ ALLODOCTOR ELITE DASHBOARD V7.0 — ULTIMATE PRECISION
   matches the user reference image in every detail.
   ══════════════════════════════════════════════════════════════════ */

:root {
    --feed-bg: #f1f5f9;
    /* Slate 100 for better contrast against white cards */
    --card-bg: #ffffff;
    --primary-blue: #2563eb;
    --accent-blue: #3b82f6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--feed-bg);
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* --- 1. TOP CATEGORY BAR --- */
/* Legacy category bar styles removed. Standardized 'q-category-nav' from questions_premium.css / doctors.css is now used. */

/* --- 2. GLOBAL LAYOUT --- */
.feed-dash-v2 {
    max-width: 1800px;
    margin: 0 auto;
}

.feed-workspace {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    padding: 24px 32px;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    box-sizing: border-box;
}

.feed-main-content {
    grid-column: 2 / span 3;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feed-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1400px) {
    .feed-workspace {
        grid-template-columns: repeat(4, 1fr);
    }

    .feed-workspace>.feed-col:last-child {
        display: none;
    }

    .feed-main-content {
        grid-column: 2 / span 3;
    }
}

@media (max-width: 1100px) {
    .feed-workspace {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 20px;
    }

    .feed-main-content {
        grid-column: auto;
        display: contents;
    }

    .feed-posts-grid {
        display: contents;
    }

    .feed-workspace>.feed-col {
        grid-column: span 1;
    }
}

@keyframes modalSlideUpMobile {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .feed-workspace {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 16px;
    }

    .feed-main-content,
    .feed-posts-grid {
        display: contents;
    }

    /* Allow the sidebar to reappear at the bottom for mobile */
    .feed-workspace>.feed-col:last-child {
        display: flex !important;
        grid-column: auto;
    }

    .masonry-feed-container {
        padding: 0 12px 4rem 12px !important;
    }

    .q-category-nav {
        padding: 0 8px;
        top: 0;
        /* Sticky closer to top for mobile */
    }

    .scc-header {
        padding: 20px 12px;
        margin-bottom: 16px;
    }

    .start-conversation-card h2 {
        font-size: 1.1rem;
    }

    /* Premium Mobile Modals */
    .modal-overlay {
        padding: 12px !important;
        align-items: center !important;
    }

    .question-creation-modal {
        max-width: none;
        width: 100%;
        max-height: 90vh;
        max-height: 90dvh;
        display: flex;
        flex-direction: column;
        border-radius: 22px;
        margin: 0;
        animation: modalSlideUpMobile 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .question-creation-modal .modal-header {
        padding: 14px 16px !important;
        flex-shrink: 0;
    }

    .question-creation-modal .modal-title-group h3 {
        font-size: 1.05rem !important;
    }

    .question-creation-modal .modal-title-group p {
        font-size: 0.78rem !important;
        line-height: 1.35;
    }

    .modal-form-premium {
        padding: 12px 16px 14px !important;
        overflow-y: auto;
        flex: 1;
        gap: 8px !important;
    }

    .question-creation-modal .form-field-premium label {
        font-size: 0.7rem !important;
        margin-bottom: 3px !important;
    }

    .question-creation-modal .form-field-premium input,
    .question-creation-modal .form-field-premium select {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    .question-creation-modal .form-field-premium textarea {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        min-height: 58px !important;
        height: 60px !important;
    }

    .question-creation-modal .q-upload-zone {
        padding: 10px 12px !important;
        min-height: 0 !important;
    }

    .question-creation-modal .q-upload-content {
        gap: 2px !important;
    }

    .question-creation-modal .q-upload-content i {
        font-size: 1.25rem !important;
        margin-bottom: 2px !important;
    }

    .question-creation-modal .q-upload-content span {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }

    .question-creation-modal .q-upload-content small {
        font-size: 0.7rem !important;
    }

    .question-creation-modal .modal-footer-premium {
        padding: 6px 0 0 !important;
        gap: 10px !important;
    }

    .question-creation-modal .btn-discard-premium,
    .question-creation-modal .btn-ask-premium-gradient {
        padding: 12px 12px !important;
        font-size: 0.84rem !important;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}

.feed-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: visible;
}

/* --- MOBILE FLOATING ACTION BUTTON (ELITE STYLE) --- */
.mobile-ask-fab {
    display: none;
}

@media (max-width: 768px) {
    .mobile-ask-fab {
        display: flex !important;
        position: fixed;
        bottom: 85px;
        /* Sits above mobile bottom nav */
        left: 50%;
        transform: translateX(-50%);
        height: 54px;
        padding: 0 24px;
        background: var(--primary-blue);
        color: #fff !important;
        border-radius: 27px;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 0.95rem;
        font-weight: 800;
        box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
        z-index: 2500;
        border: 2px solid rgba(255, 255, 255, 0.2);
        cursor: pointer;
        white-space: nowrap;
        animation: fabRise 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .feed-dash-v2 .mobile-ask-fab::after {
        content: 'Create Insight';
        /* Context-aware labeling */
    }

    .mobile-ask-fab i {
        font-size: 1.1rem;
    }

    /* Hide static starting card on mobile for cleaner feed */
    .start-conversation-card {
        display: none !important;
    }
}

/* --- 3. LEFT PILLAR: Start Conversation (COMPACT & MODERN) --- */
/* --- 3. LEFT PILLAR: Start Conversation (COMPACT & MODERN) --- */
.clinical-fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    border: none;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.clinical-fab:hover {
    transform: scale(1.1) translateY(-4px);
    background: #1d4ed8;
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.5);
}

.clinical-fab i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.clinical-fab:hover i {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .clinical-fab {
        display: flex;
        bottom: 85px; /* Stay above nav but below any other overlays if needed */
        right: 20px;
        width: 56px;
        height: 56px;
    }
}

.scc-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 30px 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.scc-header::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: -30px;
    right: -30px;
    border-radius: 50%;
}

.scc-icon-box {
    width: 64px;
    height: 64px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.start-conversation-card:hover .scc-icon-box {
    transform: scale(1.1) rotate(5deg);
    border-color: #3b82f6;
    color: #1d4ed8;
    box-shadow: 0 15px 25px rgba(37, 99, 235, 0.2);
}

.start-conversation-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.start-conversation-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
    padding: 0 4px;
}

.btn-create-post-blue {
    background: #2563eb;
    color: #ffffff !important;
    border: none;
    height: 48px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.btn-create-post-blue:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.15);
}

.btn-create-post-blue i {
    color: #ffffff;
    font-size: 1.1rem;
}

/* --- 4. MIDDLE SECTION: Header & Tabs --- */
.feed-header-section {
    margin-bottom: 24px;
}

.feed-header-section h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 20px;
}

.feed-sub-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.sub-pill {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-pill.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

/* --- 5. VIDEO INSIGHT CARDS (ULTIMATE PRECISION) --- */
.video-insight-card {
    background: #ffffff;
    border: 0.5px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.video-insight-card:hover {
    border-color: #2563EB;
    transform: translateY(-2px);
}

.vi-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #EFF6FF;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vi-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vi-thumb-fallback {
    width: 100%;
    height: 100%;
    background-color: #EFF6FF;
}

.vi-play-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.2s;
}

.video-insight-card:hover .vi-play-ring {
    transform: translate(-50%, -50%) scale(1.05);
}

.vi-specialty-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 20px;
    padding: 3px 9px;
    z-index: 10;
}

        /* Specialty Tag Colors - REMOVED TO STANDARDIZE ON PLATFORM BLUE */
        .vi-thumbnail-wrapper .vi-specialty-tag {
            background: var(--primary-blue);
            color: #ffffff;
            font-weight: 700;
        }

.vi-duration-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 10;
    line-height: 1;
}

.vi-view-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 10px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    z-index: 10;
    line-height: 1;
}

.vi-card-body {
    padding: 12px;
}

.vi-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.45;
    margin: 0;
    margin-bottom: 10px;
}

.vi-doctor-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.vi-doctor-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #DBEAFE;
    color: #1E40AF;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vi-doctor-info {
    display: flex;
    flex-direction: column;
}

.vi-doctor-name-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vi-doctor-name {
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
}

.vi-verified-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vi-doctor-specialty {
    font-size: 10px;
    color: #888888;
    line-height: 1;
    margin-top: 2px;
}

.vi-book-btn {
    margin-left: auto;
    padding: 6px 14px;
    background: #2563EB;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.vi-book-btn:hover {
    background: #1D4ED8;
}

.vi-stats-row {
    border-top: 0.5px solid #f0f0f0;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vi-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999999;
}

/* --- 6. SIDEBAR WIDGETS (ULTIMATE FIDELITY) --- */
.sidebar-widget {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
}

.sw-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sw-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sw-pill-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    /* Light grey/blue background */
    padding: 6px 12px;
    border-radius: 12px;
    flex: 1;
    margin-right: 15px;
    transition: all 0.2s;
    min-width: 0;
}

.sw-pill-box:hover {
    background: #e2e8f0;
}

.drawer-content-body {
    padding-top: 80px;
    padding-bottom: 80px;
    background: #faf8ff;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sw-icon {
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.sw-icon i {
    font-size: 0.85rem;
}

.sw-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw-insights-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 4px;
}

.sw-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: #94a3b8;
    flex-shrink: 0;
}

.sw-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sw-tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 50px;
    /* Capsule shape */
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
}

.sw-tag.blue {
    background: #eff6ff;
    color: #2563eb;
}

.sw-tag:hover {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

/* Contributor Styling */
.contributor-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.contributor-avatar-box {
    position: relative;
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.contributor-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contributor-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    background: #2563eb;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    z-index: 2;
}

.contributor-info h5 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
}

.contributor-stats {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 2px;
}

.cv-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.cv-thumb {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.cv-play-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 5;
    font-size: 1rem;
}

.cv-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cv-info {
    display: flex;
    flex-direction: column;
}

.cv-name {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
}

.cv-role {
    font-size: 0.7rem;
    color: #64748b;
}

.cv-views {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
}

/* Modal Premium Overrides */
/* Modal Premium Styles & Layout Fixes */
.modal-overlay {
    overflow-y: auto !important;
    padding: 40px 20px !important;
    display: none;
    /* Controlled by JS */
    align-items: center !important;
    /* Ensure scrolling starts from top */
    justify-content: center;
}

/* --- PREMIUM MODAL SYSTEM (Unified for Insights & Profile) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    /* Handle overflow on the overlay itself */
}

.question-creation-modal {
    background: white;
    width: 100%;
    max-width: 540px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 20px auto;
    /* Margin for scrolling in overlay */
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.modal-form-premium {
    padding: 16px 28px 28px;
    /* No max-height or overflow-y here per user request to remove inner scrollbar */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.form-field-premium {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field-premium label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.form-field-premium input[type="text"],
.form-field-premium textarea,
.form-field-premium select {
    width: 100%;
    padding: 10px 14px;
    /* Slightly more compact */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #1e293b;
    transition: all 0.2s;
}

.form-field-premium input:focus,
.form-field-premium textarea:focus,
.form-field-premium select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-discard-premium {
    background: none;
    border: none;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    padding: 10px 24px;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-discard-premium:hover {
    color: #64748b;
    background: #f1f5f9;
    border-radius: 10px;
}

.q-upload-zone {
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    /* Reduced padding */
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s;
}

.q-upload-zone:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.q-upload-content i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 12px;
    display: block;
}

.q-upload-content span {
    font-weight: 600;
    color: #475569;
    display: block;
}

.q-upload-content small {
    color: #94a3b8;
}

.modal-footer-premium {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.btn-journal-action {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-journal-action:hover {
    background: #e2e8f0;
}

.btn-ask-premium-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    color: #ffffff !important;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.btn-ask-premium-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

/* --- FIX: Ensure Bootstrap Modals appear above the Insight Drawer --- */
.modal {
    z-index: 11000 !important;
}
.modal-backdrop {
    z-index: 10900 !important;
}

/* --- 7. SLIDE-IN INSIGHT DRAWER (Premium Redesign) --- */
.insight-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

.insight-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.insight-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.5s ease-out;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    overflow: hidden;
}

[dir="rtl"] .insight-drawer {
    right: auto;
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    transform: translateX(-100%);
}

.insight-drawer.active,
[dir="rtl"] .insight-drawer.active {
    transform: none;
}

[dir="rtl"] .drawer-close-btn i,
[dir="rtl"] .back-btn-styled i {
    transform: scaleX(-1);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 80px;
    width: 100%;
    position: absolute;
    top: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
}

.drawer-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.drawer-header-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #131b2e;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.drawer-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eaedff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #464555;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: #e2e7ff;
}

.drawer-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #2563eb;
    transition: all 0.2s ease;
}

.drawer-share-btn:hover {
    background: rgba(53, 37, 205, 0.1);
}

.drawer-content-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.drawer-content-body::-webkit-scrollbar {
    width: 8px;
}

.drawer-content-body::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-content-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.insight-drawer .fb-detail-workspace {
    padding-top: 0;
}

.insight-drawer .feedback-drawer-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .insight-drawer {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .insight-drawer .premium-media-container {
        border-radius: 0 !important;
        overflow: visible !important;
        box-shadow: none !important;
    }

    body.mobile-drawer-open .feed-col,
    body.mobile-drawer-open .mobile-bottom-nav,
    body.mobile-drawer-open .mobile-ask-fab {
        visibility: hidden !important;
    }

    .drawer-header {
        padding: 12px 16px;
    }

    .insight-drawer .det-article-body {
        padding: 32px 20px;
        /* Internal relative padding for content */
    }

    .insight-drawer .det-entry-title {
        font-size: 1.8rem;
        font-weight: 800;
        line-height: 1.2;
        margin-bottom: 24px;
    }

    .insight-drawer .det-interaction-bar {
        padding: 0 0 24px;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 32px;
    }

    .insight-drawer .det-author-actions {
        display: flex !important;
        flex-direction: row !important;
        /* Side by side as in detail page */
        gap: 12px;
        width: 100%;
        margin: 20px 0 !important;
    }

    .insight-drawer .det-author-actions .det-btn-pill {
        flex: 1;
        /* Equal width buttons */
        padding: 14px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .insight-drawer .det-actions-group {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px;
        width: 100%;
        margin-left: 0 !important;
    }

    .insight-drawer .det-actions-group .det-btn-pill {
        flex: 1;
        padding: 10px 8px;
        background: #f8fafc;
    }

    .insight-drawer .det-btn-pill.options,
    .insight-drawer .det-btn-pill.bookmark {
        flex: 0 0 48px;
        width: 48px;
    }

    .insight-drawer .det-visual-hero {
        margin: 0;
        border-radius: 0;
    }

    .insight-drawer .det-visual-hero video,
    .insight-drawer .det-visual-hero img {
        border-radius: 0 0 32px 32px;
        /* Cinematic curved bottom as in reference */
    }
}

.insight-drawer .fb-sidebar-left,
.insight-drawer .fb-sidebar-right {
    display: none;
    /* Hide sidebars to leave room for the main article */
}

/* ══════════════════════════════════════════════════════════════════
   ✦ INDUSTRIAL INSIGHT CARD (ii-card)
   Wholly aligned to Platform Identity v2
   ══════════════════════════════════════════════════════════════════ */
.ii-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ii-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #2563eb;
}

/* Industrial Left Accent */
.ii-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: #2563eb;
    opacity: 0.1;
    transition: 0.3s;
}

.ii-card:hover::before {
    opacity: 1;
}

/* Header & Badges */
.ii-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ii-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-type {
    background: #eff6ff;
    color: #1e40af;
}

.badge-spec {
    background: #f1f5f9;
    color: #475569;
}

.ii-meta-views {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Media Area */
.ii-media-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    position: relative;
}

.ii-media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ii-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 5;
    transition: 0.2s;
}

.ii-card:hover .ii-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: #2563eb;
}

.ii-pill-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

/* Body & Typography */
.ii-body {
    flex: 1;
}

.ii-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ii-expert-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}

.ii-expert-avatar {
    width: 36px;
    height: 36px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.ii-expert-meta {
    flex: 1;
    min-width: 0;
}

.ii-expert-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ii-verified {
    color: #2563eb;
    font-size: 10px;
}

.ii-expert-subtext {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ii-book-action {
    background: #ffffff;
    border: 1.5px solid #2563eb;
    color: #2563eb;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ii-book-action:hover {
    background: #2563eb;
    color: #fff;
}

/* Footer & Stats */
.ii-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.ii-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
}

.ii-stat i {
    font-size: 1rem;
}

.ii-date-stamp {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 600;
    margin-left: auto;
}

/* ══════════════════════════════════════════════════════════════════
   ✦ INSIGHT CARD V2 (Aligned with Doctor Card)
   ══════════════════════════════════════════════════════════════════ */
.insight-card-v2 {
    margin-bottom: 24px;
}

.insight-card-v2 .card-media {
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid #f1f5f9;
    background-color: #0f172a;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.insight-card-v2 .ii-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 5;
    transition: 0.2s;
}

.insight-card-v2:hover .ii-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: #2563eb;
}

.insight-card-v2 .ii-pill-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.insight-card-v2 .ii-expert-avatar {
    width: 24px;
    height: 24px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

.insight-card-v2 .tags-row {
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    display: flex;
    align-items: center;
}

.insight-card-v2 .action-footer {
    padding-top: 15px;
}

/* ═══════════════════════════════════════════════════
   Extracted from: Views/Feed\Index.cshtml
═══════════════════════════════════════════════════ */
/* ── Responsive Feed Grid ── */
        .feed-workspace {
            /* Ensure grid children don't overflow their cell */
            & > * { min-width: 0; }
        }

        /* Tablet: 2 columns */
        @media (max-width: 900px) {
            .feed-workspace {
                grid-template-columns: repeat(2, 1fr) !important;
                padding: 16px !important;
                gap: 16px !important;
            }
        }

        /* Mobile: 1 column */
        @media (max-width: 600px) {
            .feed-workspace {
                grid-template-columns: 1fr !important;
                padding: 12px !important;
                gap: 14px !important;
            }
        }

/* ═══════════════════════════════════════════════════
   Extracted from: Views/Feed\Browse.cshtml
═══════════════════════════════════════════════════ */
.public-cta-banner {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        border-radius: 32px;
        padding: 4rem;
        margin: 6rem auto 2rem;
        max-width: 1200px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.3);
    }
    
    .cta-inner {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 3rem;
        text-align: left;
    }
    
    .cta-icon-box {
        width: 100px;
        height: 100px;
        background: rgba(37, 99, 235, 0.1);
        border-radius: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 3rem;
        color: #2563eb;
        border: 1px solid rgba(37, 99, 235, 0.2);
    }
    
    .cta-text h2 {
        color: #fff;
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 0.5rem;
    }
    
    .cta-text p {
        color: #94a3b8;
        font-size: 1.1rem;
        margin: 0;
    }
    
    .cta-btns {
        margin-left: auto;
        display: flex;
        gap: 1rem;
    }
    
    .btn-cta-primary {
        background: #2563eb;
        color: #fff;
        padding: 1rem 2.5rem;
        border-radius: 16px;
        font-weight: 800;
        text-decoration: none;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    }
    
    .btn-cta-secondary {
        background: transparent;
        border: 2px solid #334155;
        color: #fff;
        padding: 1rem 2.5rem;
        border-radius: 16px;
        font-weight: 800;
        text-decoration: none;
        transition: 0.3s;
    }
    
    .btn-cta-primary:hover { transform: translateY(-3px); background: #1d4ed8; }
    .btn-cta-secondary:hover { background: rgba(255,255,255,0.05); border-color: #475569; }

    @media (max-width: 900px) {
        .cta-inner { flex-direction: column; text-align: center; gap: 2rem; }
        .cta-btns { margin: 0 auto; }
        .cta-icon-box { margin: 0 auto; }
    }

/* --- PREMIUM INSIGHT DRAWER CLASSES --- */
.drawer-content-body {
    padding-top: 80px;
    padding-bottom: 80px;
    background: #faf8ff;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.premium-profile-section {
    padding: 24px;
    border-bottom: 1px solid rgba(199, 196, 216, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(53, 37, 205, 0.2);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.premium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.premium-profile-name {
    font-size: 18px;
    line-height: 28px;
    font-weight: 700;
    color: #131b2e;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.premium-badge {
    padding: 2px 8px;
    border-radius: 9999px;
    background: #e2dfff;
    color: #0f0069;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-follow-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid #777587;
    color: #131b2e;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: background 0.2s;
}

.premium-follow-btn:hover {
    background: #eaedff;
}

.premium-article {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.premium-article-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: #131b2e;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.bento-card {
    padding: 24px;
    border-radius: 16px;
    background: #f2f3ff;
    border: 1px solid rgba(199, 196, 216, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bento-label {
    font-size: 14px;
    font-weight: 700;
    color: #131b2e;
    margin: 0;
}

.bento-value {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.bento-value.primary { color: #2563eb; }
.bento-value.secondary { color: #505f76; }

.premium-media-container {
    position: relative;
    width: 100%;
    height: 400px; /* Fallback to prevent height collapse */
    aspect-ratio: 1/1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: #0f172a;
}

.premium-media-container video,
.premium-media-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.premium-footer {
    padding: 16px 0;
    background: transparent;
    border-top: 1px solid rgba(199, 196, 216, 0.2);
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.btn-premium-save {
    flex: 1;
    height: 48px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-premium-save:hover { opacity: 0.9; }

.btn-premium-more {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    border: 1px solid #777587;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #464555;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-premium-more:hover {
    background: #e2e7ff;
}

/* --- RTL & Modal Header Alignment Fixes --- */
[dir="rtl"] .modal-close-btn,
html[lang="ar"] .modal-close-btn,
body[dir="rtl"] .modal-close-btn {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .modal-title-group,
html[lang="ar"] .modal-title-group,
body[dir="rtl"] .modal-title-group {
    text-align: right;
}

.question-creation-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.question-creation-modal .modal-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.question-creation-modal .modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.question-creation-modal .modal-close-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.question-creation-modal .modal-close-btn:hover {
    background: #fff;
    color: #ef4444;
    border-color: #fee2e2;
}

