/* =========================================================
   SUBJECT PAGE
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {

    font-family:
        "Cairo",
        Tahoma,
        Arial,
        sans-serif;

    background: #f5f7fb;

    color: #172033;

    line-height: 1.7;

}


/* =========================================================
   NAVBAR
========================================================= */

.subject-navbar {

    height: 76px;

    background: white;

    border-bottom: 1px solid #e5eaf0;

    position: sticky;

    top: 0;

    z-index: 1000;

}


.navbar-container {

    width: 92%;

    max-width: 1180px;

    height: 100%;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.brand {

    display: flex;

    align-items: center;

    gap: 11px;

    text-decoration: none;

    color: #172033;

}


.brand-icon {

    width: 43px;

    height: 43px;

    border-radius: 12px;

    background: #edf3fc;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

}


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1.35;

}


.brand-text strong {

    font-size: 15px;

}


.brand-text span {

    color: #8994a4;

    font-size: 9px;

}


.back-button {

    display: flex;

    align-items: center;

    gap: 7px;

    text-decoration: none;

    background: #f1f4f8;

    color: #315d9d;

    border-radius: 9px;

    padding: 8px 13px;

    font-size: 11px;

    font-weight: 700;

    transition: 0.2s;

}


.back-button:hover {

    background: #e6edf7;

}


/* =========================================================
   CONTAINER
========================================================= */

.subject-container {

    width: 92%;

    max-width: 1180px;

    margin: auto;

    padding-bottom: 70px;

}


/* =========================================================
   SUBJECT HERO
========================================================= */

.subject-hero {

    margin-top: 30px;

    padding: 35px 40px;

    border-radius: 20px;

    background: #edf3fc;

    border: 1px solid #dfe7f2;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.subject-hero-content {

    max-width: 800px;

}


.subject-label {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    background: white;

    color: #55708f;

    padding: 5px 10px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;

}


.subject-hero h1 {

    font-size: 34px;

    line-height: 1.3;

    margin-top: 12px;

}


.subject-hero p {

    color: #6e7d91;

    font-size: 13px;

    margin-top: 8px;

    max-width: 720px;

}


.subject-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 18px;

}


.subject-meta span {

    background: white;

    color: #667589;

    border-radius: 20px;

    padding: 5px 10px;

    font-size: 9px;

    border: 1px solid #e3e9f1;

}


.subject-hero-icon {

    width: 105px;

    height: 105px;

    flex-shrink: 0;

    border-radius: 27px;

    background: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 48px;

    box-shadow:
        0 12px 30px rgba(40,60,90,0.07);

}


/* =========================================================
   QUICK NAVIGATION
========================================================= */

.quick-navigation {

    display: flex;

    gap: 8px;

    overflow-x: auto;

    padding: 18px 0 5px;

    scrollbar-width: none;

}


.quick-navigation::-webkit-scrollbar {

    display: none;

}


.quick-navigation a {

    flex-shrink: 0;

    display: flex;

    align-items: center;

    gap: 7px;

    text-decoration: none;

    background: white;

    color: #59677a;

    border: 1px solid #e3e8ef;

    border-radius: 10px;

    padding: 8px 13px;

    font-size: 10px;

    font-weight: 700;

    transition: 0.2s;

}


.quick-navigation a:hover {

    color: #315d9d;

    border-color: #bfcfe4;

    transform: translateY(-1px);

}


/* =========================================================
   SECTIONS
========================================================= */

.subject-section {

    margin-top: 50px;

    scroll-margin-top: 100px;

}


.section-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 18px;

}


.section-heading > div:first-child > span {

    color: #8994a3;

    font-size: 9px;

    letter-spacing: 2px;

    font-weight: 800;

}


.section-heading h2 {

    font-size: 23px;

    line-height: 1.4;

    margin-top: 2px;

}


.section-heading p {

    color: #7d8898;

    font-size: 11px;

    margin-top: 2px;

}


.section-count {

    min-width: 38px;

    height: 38px;

    border-radius: 11px;

    background: white;

    border: 1px solid #e3e8ef;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #315d9d;

    font-size: 12px;

    font-weight: 800;

}


/* =========================================================
   NOTIFICATIONS
========================================================= */

.notifications-list {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.notification-card {

    background: white;

    border: 1px solid #e3e8ef;

    border-radius: 13px;

    padding: 17px;

    display: flex;

    align-items: flex-start;

    gap: 13px;

    transition: 0.2s;

}


.notification-card:hover {

    border-color: #cfd9e7;

    transform: translateY(-1px);

}


.notification-icon {

    width: 45px;

    height: 45px;

    flex-shrink: 0;

    border-radius: 12px;

    background: #fff4e4;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

}


.notification-content {

    flex: 1;

}


.notification-top {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 4px;

}


.task-badge,
.notice-badge,
.date-badge {

    display: inline-flex;

    align-items: center;

    padding: 3px 8px;

    border-radius: 20px;

    font-size: 8px;

    font-weight: 700;

}


.task-badge {

    background: #fff2dc;

    color: #9b6725;

}


.notice-badge {

    background: #edf3ff;

    color: #315d9d;

}


.date-badge {

    background: #f2f4f7;

    color: #707b8b;

}


.notification-content h3 {

    font-size: 14px;

}


.notification-content p {

    color: #778496;

    font-size: 11px;

    margin-top: 3px;

}


/* =========================================================
   FILE GRID
========================================================= */

.files-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 11px;

}


.file-card {

    background: white;

    border: 1px solid #e3e8ef;

    border-radius: 13px;

    padding: 15px;

    display: flex;

    align-items: center;

    gap: 12px;

    transition: 0.2s;

}


.file-card:hover {

    border-color: #cdd8e6;

    box-shadow:
        0 8px 25px rgba(30,50,80,0.04);

    transform: translateY(-2px);

}


.file-icon {

    width: 48px;

    height: 48px;

    flex-shrink: 0;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

}


.lecture-icon {

    background: #edf3ff;

}


.explanation-icon {

    background: #f2edff;

}


.lab-icon {

    background: #fff3df;

}


.summary-icon {

    background: #edf8f2;

}


.exam-icon {

    background: #fff0f0;

}


.file-info {

    flex: 1;

    min-width: 0;

}


.file-type {

    display: block;

    color: #8a95a4;

    font-size: 8px;

    font-weight: 700;

}


.file-info h3 {

    font-size: 12px;

    margin-top: 2px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}


/* =========================================================
   FILE ACTIONS
========================================================= */

.file-actions {

    display: flex;

    flex-direction: column;

    gap: 5px;

}


.file-actions a {

    min-width: 65px;

    text-align: center;

    text-decoration: none;

    border-radius: 7px;

    padding: 5px 7px;

    font-size: 9px;

    font-weight: 700;

    transition: 0.2s;

}


.open-button {

    background: #edf3ff;

    color: #315d9d;

}


.open-button:hover {

    background: #e1ebfa;

}


.download-button {

    background: #edf8f2;

    color: #31815a;

}


.download-button:hover {

    background: #dff2e8;

}


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

.empty-state {

    background: white;

    border: 1px dashed #d7dfe9;

    border-radius: 13px;

    text-align: center;

    padding: 35px 20px;

}


.empty-state > div {

    width: 50px;

    height: 50px;

    margin: auto;

    border-radius: 13px;

    background: #f3f5f8;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;

}


.empty-state h3 {

    font-size: 14px;

    margin-top: 10px;

}


.empty-state p {

    color: #8994a2;

    font-size: 10px;

    margin-top: 3px;

}


/* =========================================================
   BOTTOM
========================================================= */

.bottom-navigation {

    margin-top: 55px;

    text-align: center;

}


.bottom-navigation a {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    text-decoration: none;

    background: white;

    border: 1px solid #e1e7ee;

    color: #315d9d;

    padding: 10px 17px;

    border-radius: 9px;

    font-size: 11px;

    font-weight: 700;

}


.bottom-navigation a:hover {

    background: #f0f4f9;

}


/* =========================================================
   FOOTER
========================================================= */

.subject-footer {

    border-top: 1px solid #e1e6ed;

    background: white;

    min-height: 85px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 20px;

    color: #8a94a3;

    font-size: 9px;

}


.subject-footer strong {

    color: #526175;

}


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

@media (max-width: 850px) {


    .subject-hero {

        padding: 28px;

    }


    .subject-hero h1 {

        font-size: 29px;

    }


    .files-grid {

        grid-template-columns: 1fr;

    }

}


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

@media (max-width: 600px) {


    .subject-navbar {

        height: 68px;

    }


    .navbar-container {

        width: 94%;

    }


    .brand-icon {

        width: 38px;

        height: 38px;

        font-size: 18px;

    }


    .brand-text strong {

        font-size: 13px;

    }


    .brand-text span {

        font-size: 8px;

    }


    .back-button {

        padding: 7px 9px;

        font-size: 9px;

    }


    .subject-container {

        width: 94%;

    }


    .subject-hero {

        margin-top: 18px;

        padding: 23px 20px;

        border-radius: 16px;

        align-items: flex-start;

    }


    .subject-hero-icon {

        width: 62px;

        height: 62px;

        border-radius: 17px;

        font-size: 28px;

        margin-right: 10px;

    }


    .subject-label {

        font-size: 8px;

    }


    .subject-hero h1 {

        font-size: 23px;

        margin-top: 8px;

    }


    .subject-hero p {

        font-size: 10px;

        line-height: 1.8;

    }


    .subject-meta {

        margin-top: 12px;

        gap: 5px;

    }


    .subject-meta span {

        font-size: 7px;

        padding: 4px 7px;

    }


    .quick-navigation {

        padding-top: 12px;

    }


    .quick-navigation a {

        padding: 7px 10px;

        font-size: 8px;

    }


    .subject-section {

        margin-top: 38px;

    }


    .section-heading h2 {

        font-size: 19px;

    }


    .section-heading p {

        font-size: 9px;

    }


    .section-count {

        min-width: 32px;

        height: 32px;

        font-size: 10px;

    }


    .notification-card {

        padding: 13px;

        gap: 10px;

    }


    .notification-icon {

        width: 39px;

        height: 39px;

        font-size: 18px;

    }


    .notification-content h3 {

        font-size: 12px;

    }


    .notification-content p {

        font-size: 9px;

    }


    .file-card {

        padding: 12px;

        gap: 9px;

    }


    .file-icon {

        width: 40px;

        height: 40px;

        font-size: 18px;

    }


    .file-info h3 {

        font-size: 10px;

    }


    .file-actions a {

        min-width: 55px;

        padding: 5px;

        font-size: 8px;

    }


    .empty-state {

        padding: 28px 15px;

    }


    .empty-state h3 {

        font-size: 12px;

    }


    .empty-state p {

        font-size: 9px;

    }


    .subject-footer {

        flex-direction: column;

        gap: 3px;

        padding: 20px;

    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {


    .subject-hero-icon {

        display: none;

    }


    .subject-hero h1 {

        font-size: 21px;

    }


    .file-actions {

        flex-direction: row;

    }


    .file-card {

        flex-wrap: wrap;

    }


    .file-info {

        width: calc(100% - 55px);

    }


    .file-actions {

        width: 100%;

    }


    .file-actions a {

        flex: 1;

    }

}