/* =========================================================
   NOTES PAGE — ICT.ABUSAYED.NET
   Light Theme, Tech Inspired (PDF Viewer)
========================================================= */

.notes-wrapper {
    max-width: 1200px;
    width: calc(100% - 48px);
    margin: 40px auto;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* subtle grid overlay */
.notes-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(20,27,46,0.04) 1px, transparent 1px),
        linear-gradient(rgba(20,27,46,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}

.notes-wrapper > * {
    position: relative;
    z-index: 1;
}

.notes-header {
    margin-bottom: 32px;
}

.notes-header .section-title {
    font-size: 1.8rem;
    margin-top: 4px;
}

.notes-header .section-lede {
    margin-top: 6px;
    font-size: 0.95rem;
}

/* Chapter Tabs */
.chapter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.chapter-tab {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.chapter-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(217, 119, 6, 0.08);
}

.chapter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

/* Notes Layout */
.notes-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* Sidebar */
.topics-sidebar {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    position: sticky;
    top: 100px;
}

.topics-heading {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    margin-bottom: 12px;
}

.topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topic-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
}

.topic-item:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--accent);
}

.topic-item.active {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* Content Area */
.content-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 400px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.content-header h4 {
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.topic-badge {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.content-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.content-body p {
    margin-bottom: 12px;
}

/* পূর্বের সব স্টাইল থাকবে, সাথে নিচের অংশ যোগ করুন */

/* Sub-topic list */
.subtopic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subtopic-list li {
    margin-bottom: 8px;
}

.subtopic-link {
    display: block;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.subtopic-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
}

/* Open PDF Button */
.open-pdf-btn {
    font-family: var(--mono);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.open-pdf-btn:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

/* ===== FULL-SCREEN PDF OVERLAY ===== */
.pdf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.pdf-overlay.active {
    display: flex;
}

.pdf-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(20,27,46,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10000;
}

.pdf-overlay-title {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 500;
    color: #e7ecf5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: transparent;
    color: #e7ecf5;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pdf-close-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.pdf-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #f8fafc;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .notes-layout {
        grid-template-columns: 1fr;
    }
    .topics-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .notes-wrapper {
        padding: 20px 16px;
        width: calc(100% - 32px);
        margin: 24px auto;
    }
    .chapter-tabs {
        gap: 6px;
    }
    .chapter-tab {
        font-size: 11px;
        padding: 6px 12px;
    }
    .content-area {
        padding: 16px;
    }
    .pdf-overlay-header {
        padding: 12px 16px;
    }
    .pdf-close-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}