/* css/member.css */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #0B2447;
    --sidebar-color: #ffffff;
    --sidebar-hover: #193D71;
    --content-bg: #F4F6F9;
}

body {
    background-color: var(--content-bg);
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.profile-status {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-top: 0.2rem;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--sidebar-hover);
    color: white;
    border-left: 4px solid var(--accent-color);
}

.nav-item .icon {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    margin: 1.5rem 1.5rem 0.5rem;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    max-width: 1200px;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    z-index: 1050;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mobile-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.mobile-profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}


/* Breadcrumb & Header */
.content-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.content-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin: 0;
}

/* Video Player Area */
.player-container {
    background: black;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.player-container iframe, .player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Action Bar & Tabs */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-complete {
    background-color: #10B981; /* Green */
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-complete:hover {
    background-color: #059669;
}

.tab-nav {
    display: flex;
    gap: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    line-height: 1.7;
}

.tab-content.active {
    display: block;
}

/* Resources List */
.resource-list {
    list-style: none;
    padding: 0;
}

.resource-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.resource-item .icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.resource-info {
    flex: 1;
}

.resource-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
}

.resource-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-download {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-download:hover {
    background: #e2e8f0;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1100;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: calc(70px + 1.5rem); /* space for header */
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .mobile-header {
        display: flex;
    }
}

/* Multi-panel utilities */
.hidden {
    display: none !important;
}

.main-panel {
    /* panels are visible by default unless .hidden */
}

/* Article Reader Formatting */
.blog-content h2, .blog-content h3 { color: #1e293b; margin-top: 2rem; margin-bottom: 1rem; }
.blog-content p { margin-bottom: 1.5rem; line-height: 1.8; color: #475569; }
.blog-content ul, .blog-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }
.blog-content li { margin-bottom: 0.5rem; color: #475569; }
.blog-content strong { font-weight: 700; color: #0f172a; }
.blog-content em { font-style: italic; }
.blog-content blockquote { border-left: 4px solid #f59e0b; padding-left: 1rem; color: #64748b; font-style: italic; background: #f8fafc; padding: 1rem; margin-bottom: 1.5rem; border-radius: 0 8px 8px 0; }
.blog-content img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }


/* AI Chatbot Styles */
.chat-floating-btn { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #10b981, #059669); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); cursor: pointer; z-index: 1000; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chat-floating-btn:hover { transform: scale(1.1); }
.chat-window { position: fixed; bottom: 100px; right: 30px; width: 350px; height: 500px; background: white; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; z-index: 1000; transition: all 0.3s ease; opacity: 1; transform: translateY(0) scale(1); transform-origin: bottom right; }
.chat-window.hidden { opacity: 0; transform: translateY(20px) scale(0.8); pointer-events: none; visibility: hidden; }
.chat-header { background: linear-gradient(135deg, #0A192F, #193D71); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: #f8fafc; }
.chat-messages .message { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; line-height: 1.5; word-wrap: break-word; }
.chat-messages .message.ai { background: white; color: #1e293b; border-bottom-left-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); align-self: flex-start; }
.chat-messages .message.user { background: #0A192F; color: white; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-input-area { padding: 15px; background: white; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; }
.chat-input-area input { flex: 1; padding: 10px 15px; border: 1px solid #cbd5e1; border-radius: 20px; outline: none; transition: border-color 0.2s; font-family: inherit; font-size: 16px; }
.chat-input-area input:focus { border-color: #f59e0b; }
.chat-input-area button { background: #f59e0b; color: white; border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; font-weight: 600; transition: background 0.2s; }
.chat-input-area button:hover { background: #d97706; }
.chat-typing { font-style: italic; color: #94a3b8; font-size: 0.85rem; padding: 0 16px; align-self: flex-start; display: none; }

.chat-btn-link { display: inline-block; margin-top: 10px; padding: 10px 15px; background-color: #E8A020; color: #fff !important; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-align: center; box-shadow: 0 4px 6px rgba(232, 160, 32, 0.3); transition: all 0.2s; } 
.chat-btn-link:hover { background-color: #d18d1a; transform: translateY(-2px); }
