* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f6fb;
}

/* ================= HEADER ================= */
.notes-header {
    background: linear-gradient(90deg, #1f66d1, #1a4fb5);
    color: white;
    text-align: center;
    padding: 30px 20px 80px;
}

.notes-header h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
}

.notes-header h6 {
    margin-top: 10px;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* ================= WRAPPER ================= */
.notes-wrapper {
    max-width: 1200px;
    margin: -50px auto 60px;
    padding: 0 20px;
}

/* ================= BREADCRUMB + STAGE HEADING ================= */
.browse-topbar {
    background: white;
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.browse-breadcrumb {
    font-size: 14px;
    color: #667;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}

.browse-breadcrumb .crumb {
    cursor: pointer;
    color: #1f66d1;
    font-weight: 500;
}

.browse-breadcrumb .crumb:hover {
    text-decoration: underline;
}

.browse-breadcrumb .crumb.active {
    color: #333;
    cursor: default;
    font-weight: 600;
}

.browse-breadcrumb .crumb.active:hover {
    text-decoration: none;
}

.browse-breadcrumb .crumb-sep {
    color: #bbb;
    font-size: 11px;
    margin: 0 4px;
}

.stage-heading {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a2b4c;
}

/* ================= GRID ================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.empty-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    font-size: 16px;
    padding: 40px 0;
}

/* ================= BROWSE CARDS (Course / Paper) ================= */
.browse-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.browse-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.browse-thumb-wrap {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #e8f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.browse-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.browse-card-body {
    padding: 18px 20px 22px;
}

.browse-card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
    color: #1f66d1;
}

.browse-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.browse-btn {
    width: 100%;
    border: none;
    background: #eaf1ff;
    color: #1f66d1;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.browse-card:hover .browse-btn {
    background: #1f66d1;
    color: white;
}

/* ================= NOTE CARD (final stage) ================= */
.note-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all .3s ease;
    padding: 20px;
}

.note-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.note-card h3 {
    margin: 0 0 10px;
    color: #1f66d1;
    font-size: 35px;
}

.note-card p {
    margin: 4px 0;
    font-size: 14px;
    color: #444;
}

.card-thumb {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #e8f0ff;
    border-radius: 12px;
    display: block;
    margin-bottom: 15px;
    padding: 10px;
}

/* BUTTONS */
.note-card .btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.note-card .buy {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.note-card .open {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    .notes-wrapper {
        margin-top: -40px;
    }
}

@media (max-width: 768px) {
    .notes-header {
        padding: 25px 16px 70px;
    }

    .notes-header h1 {
        font-size: 28px;
    }

    .notes-header h6 {
        font-size: 14px;
    }

    .notes-wrapper {
        padding: 0 14px;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }

    .browse-thumb-wrap {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .notes-header h1 {
        font-size: 22px;
    }

    .notes-wrapper {
        margin-top: -35px;
        padding: 0 10px;
    }

    .browse-topbar {
        padding: 12px 14px;
    }

    .stage-heading {
        font-size: 17px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .browse-thumb-wrap {
        height: 160px;
    }
}