
/* =========================================================
   NEOASPIRE QBANK
   Professional Public Page
========================================================= */


/* =========================================================
   PAGE LAYOUT
========================================================= */

main {
    width: 100%;
    padding-bottom: var(--space-2xl);
    background: var(--color-bg-light);
}

.qbank-hero-content,
.qbank-focus-section,
.qbank-resources-section {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   HERO SECTION
========================================================= */

.qbank-hero {
    width: 100%;
    padding: 76px 24px;
    text-align: center;

    background: linear-gradient(
        135deg,
        var(--color-primary-light),
        var(--color-white)
    );

    border-bottom: 1px solid var(--color-border);
}

.qbank-hero-content {
    max-width: 820px;
}

.qbank-hero .hero-label {
    display: inline-block;

    padding: 7px 16px;
    margin-bottom: var(--space-md);

    color: var(--color-primary);
    background: var(--color-white);

    border: 1px solid rgba(236, 97, 27, 0.18);
    border-radius: var(--radius-full);

    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 1px;
}

.qbank-hero h1 {
    margin: 0 0 10px;

    color: var(--color-heading);

    font-size: clamp(32px, 4vw, 44px);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

.qbank-hero h2 {
    margin: 0 0 var(--space-md);

    color: var(--color-primary);

    font-size: clamp(19px, 2.5vw, 25px);
    font-weight: 600;
    line-height: 1.4;
}

.qbank-hero p {
    max-width: 700px;
    margin: 0 auto;

    color: var(--color-text-secondary);

    font-size: var(--font-size-md);
    line-height: 1.8;
}


/* =========================================================
   SECTION HEADINGS
========================================================= */

.qbank-focus-section {
    padding: 56px 24px 24px;
}

.qbank-focus-section > h2 {
    margin: 0 0 28px;

    text-align: center;

    color: var(--color-heading);

    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}


/* =========================================================
   CHOOSE YOUR CLASS
========================================================= */

.qbank-focus-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 20px;
}


/* CLASS CARD */

.qbank-focus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 190px;
    padding: 26px 20px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    color: var(--color-text-primary);
    font-family: inherit;
    text-align: center;

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.qbank-focus-card:hover {
    transform: translateY(-5px);

    border-color: rgba(236, 97, 27, 0.4);

    box-shadow: var(--shadow-md);
}

.qbank-focus-card.active,
.qbank-focus-card.selected {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.qbank-focus-card:focus-visible {
    outline: 3px solid rgba(236, 97, 27, 0.3);
    outline-offset: 3px;
}


/* CLASS ICON */

.focus-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin: 0 auto 16px;

    border-radius: var(--radius-lg);

    background: var(--color-primary-light);

    font-size: 27px;
}


/* CLASS TITLE */

.qbank-focus-card h3 {
    margin: 0 0 8px;

    color: var(--color-heading);

    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.4;
}

.qbank-focus-card p {
    margin: 0;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.6;
}


/* =========================================================
   RESOURCES MAIN SECTION
========================================================= */

.qbank-resources-section {
    margin-top: 24px;
    padding: 48px 28px;

    background: var(--color-bg-warm);

    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);

    scroll-margin-top: 90px;
}


/* =========================================================
   RESOURCES HEADER
========================================================= */

.qbank-resources-header {
    max-width: 780px;

    margin: 0 auto 36px;

    text-align: center;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 14px;
    margin-bottom: var(--space-md);

    color: var(--color-primary);
    background: var(--color-primary-light);

    border: 1px solid rgba(236, 97, 27, 0.12);
    border-radius: var(--radius-full);

    font-size: var(--font-size-xs);
    font-weight: 700;
}

.qbank-resources-header h2 {
    margin: 0 0 12px;

    color: var(--color-heading);

    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.35;
}

.qbank-resources-header p {
    max-width: 650px;
    margin: 0 auto;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.7;
}


/* =========================================================
   SUBJECT GRID
========================================================= */

.qbank-subject-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
    margin-top: 30px;
}


/* SUBJECT CARD */

.qbank-subject-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;
    min-height: 190px;

    padding: 24px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    text-align: left;
    font-family: inherit;

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.qbank-subject-card:hover {
    transform: translateY(-4px);

    border-color: rgba(236, 97, 27, 0.4);

    box-shadow: var(--shadow-md);
}

.qbank-subject-card:focus-visible {
    outline: 3px solid rgba(236, 97, 27, 0.3);
    outline-offset: 3px;
}


/* SUBJECT ICON */

.qbank-subject-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    margin-bottom: 16px;

    border-radius: var(--radius-md);

    background: var(--color-primary-light);

    font-size: 27px;
}


/* SUBJECT CONTENT */

.qbank-subject-card h3 {
    margin: 0 0 8px;

    color: var(--color-heading);

    font-size: var(--font-size-md);
    font-weight: 700;
    line-height: 1.4;
}

.qbank-subject-card p {
    margin: 0 0 14px;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.qbank-subject-card span {
    display: inline-block;

    margin-top: auto;

    color: var(--color-primary);

    font-size: var(--font-size-sm);
    font-weight: 700;
}


/* =========================================================
   SELECTED SUBJECT
========================================================= */

.qbank-selected-subject {
    margin-top: 36px;
    padding-top: 30px;

    border-top: 1px solid var(--color-border);
}

.qbank-subject-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
    flex-wrap: wrap;

    margin-bottom: 24px;
}

.qbank-subject-header h2 {
    margin: 0 0 6px;

    color: var(--color-heading);

    font-size: var(--font-size-xl);
    font-weight: 700;
}

.qbank-subject-header p {
    margin: 0;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
}


/* =========================================================
   RESOURCE GRID
========================================================= */

.qbank-resource-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   RESOURCE CARD
========================================================= */

.qbank-resource-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 220px;

    padding: 22px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.qbank-resource-card:hover {
    transform: translateY(-4px);

    border-color: rgba(236, 97, 27, 0.35);

    box-shadow: var(--shadow-md);
}


/* RESOURCE TOP */

.resource-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 18px;
}

.resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    flex-shrink: 0;

    background: var(--color-primary-light);

    border-radius: var(--radius-md);

    font-size: 22px;
}


/* RESOURCE BADGES */

.resource-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    border-radius: var(--radius-full);

    background: var(--color-bg-light);

    color: var(--color-text-secondary);

    font-size: 11px;
    font-weight: 700;
}

.resource-badge.premium {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.resource-badge.free {
    color: #047857;
    background: #ecfdf5;
}


/* RESOURCE TITLE */

.qbank-resource-card h3 {
    margin: 0 0 9px;

    color: var(--color-heading);

    font-size: var(--font-size-md);
    font-weight: 700;
    line-height: 1.45;
}

.qbank-resource-card p {
    margin: 0;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.65;
}


/* RESOURCE META */

.resource-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 14px;
}

.resource-meta span {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: var(--radius-sm);

    background: var(--color-bg-light);

    color: var(--color-text-secondary);

    font-size: 11px;
}


/* =========================================================
   RESOURCE ACTIONS
========================================================= */

.resource-actions,
.qbank-resource-card-actions {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: auto;
    padding-top: 20px;
}

.resource-actions button,
.resource-actions a,
.qbank-resource-card-actions button,
.qbank-resource-card-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 1;
    min-height: 38px;

    padding: 9px 12px;

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    font-family: inherit;
    font-size: var(--font-size-xs);
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


/* VIEW RESOURCE */

.view-resource {
    color: var(--color-secondary);
    background: #eff6ff;
}

.view-resource:hover {
    background: #dbeafe;
}


/* DOWNLOAD RESOURCE */

.download-resource {
    color: var(--color-white);
    background: var(--color-primary);
}

.download-resource:hover {
    background: var(--color-primary-hover);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.no-resources-message {
    padding: 44px 20px;

    text-align: center;

    background: var(--color-white);

    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
}

.no-resources-message.hidden {
    display: none !important;
}

.no-resources-icon {
    margin-bottom: 14px;

    font-size: 42px;
}

.no-resources-message h3 {
    margin: 0 0 8px;

    color: var(--color-heading);

    font-size: var(--font-size-lg);
    font-weight: 700;
}

.no-resources-message p {
    margin: 0;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.6;
}


/* =========================================================
   GENERAL HIDDEN STATE
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN MODAL
========================================================= */

.qbank-modal {
    position: fixed;
    inset: 0;

    z-index: 99999;

    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;

    margin: 0;
    padding: 20px;

    border: none;
    background: transparent;

    align-items: center;
    justify-content: center;
}

.qbank-modal.hidden {
    display: none !important;
}

.qbank-modal:not(.hidden) {
    display: flex;
}


/* MODAL OVERLAY */

.qbank-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(17, 24, 39, 0.55);

    backdrop-filter: blur(4px);
}


/* MODAL BOX */

.qbank-modal-box {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 420px;

    padding: 34px 28px;

    background: var(--color-white);

    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);

    text-align: center;

    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);

    animation: qbankModalIn 0.2s ease;
}


/* MODAL ICON */

.qbank-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    margin: 0 auto 18px;

    border-radius: 50%;

    background: var(--color-primary-light);

    font-size: 27px;
}


/* MODAL TITLE */

.qbank-modal-box h3 {
    margin: 0 0 10px;

    color: var(--color-heading);

    font-size: var(--font-size-lg);
    font-weight: 700;
}


/* MODAL DESCRIPTION */

.qbank-modal-box p {
    max-width: 330px;

    margin: 0 auto 24px;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);
    line-height: 1.7;
}


/* MODAL CLOSE */

.qbank-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;
    border-radius: var(--radius-md);

    background: transparent;

    color: var(--color-text-secondary);

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.qbank-modal-close:hover {
    background: var(--color-bg-light);
    color: var(--color-heading);
}


/* MODAL BUTTONS */

.qbank-modal-actions {
    display: flex;
    justify-content: center;

    gap: 12px;
}


/* PAGE SCROLL LOCK */

body.modal-open {
    overflow: hidden;
}


/* MODAL ANIMATION */

@keyframes qbankModalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

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


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

    .qbank-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qbank-subject-grid,
    .qbank-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    .qbank-hero {
        padding: 54px 20px;
    }

    .qbank-hero h1 {
        font-size: 30px;
    }

    .qbank-hero h2 {
        font-size: 19px;
    }

    .qbank-hero p {
        font-size: var(--font-size-sm);
        line-height: 1.7;
    }

    .qbank-focus-section {
        padding: 42px 18px 20px;
    }

    .qbank-focus-section > h2 {
        font-size: 23px;
        margin-bottom: 22px;
    }

    .qbank-focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .qbank-focus-card {
        min-height: 160px;
        padding: 20px 12px;
    }

    .focus-icon {
        width: 50px;
        height: 50px;
        font-size: 23px;
    }

    .qbank-focus-card h3 {
        font-size: var(--font-size-md);
    }

    .qbank-resources-section {
        margin-top: 20px;
        padding: 38px 18px;
    }

    .qbank-resources-header {
        margin-bottom: 26px;
    }

    .qbank-resources-header h2 {
        font-size: 23px;
    }

    .qbank-subject-grid,
    .qbank-resource-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .qbank-subject-card {
        min-height: 0;
        padding: 21px;
    }

    .qbank-resource-card {
        min-height: 0;
        padding: 20px;
    }

    .qbank-subject-header {
        align-items: flex-start;
        margin-top: 24px;
    }

    .qbank-subject-header h2 {
        font-size: 21px;
    }

    .resource-actions,
    .qbank-resource-card-actions {
        gap: 8px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .qbank-focus-grid {
        grid-template-columns: 1fr;
    }

    .qbank-focus-card {
        min-height: 135px;
    }

    .resource-actions,
    .qbank-resource-card-actions {
        flex-direction: column;
    }

    .resource-actions button,
    .resource-actions a,
    .qbank-resource-card-actions button,
    .qbank-resource-card-actions a {
        width: 100%;
    }

    .qbank-modal {
        padding: 16px;
    }

    .qbank-modal-box {
        padding: 30px 20px;
    }

    .qbank-modal-actions {
        flex-direction: column;
    }

    .qbank-modal-actions .btn {
        width: 100%;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .qbank-focus-card,
    .qbank-subject-card,
    .qbank-resource-card,
    .qbank-modal-close {
        transition: none;
    }

    .qbank-focus-card:hover,
    .qbank-subject-card:hover,
    .qbank-resource-card:hover {
        transform: none;
    }

    .qbank-modal-box {
        animation: none;
    }

}
