
/* =====================================================
   MY LIBRARY — MEDICAL ACADEMIA THEME
   Warm Ivory | Sage Green | Forest Green
   Subject-specific colours added to inner pages
===================================================== */


/* ==================== GLOBAL ==================== */

:root {
    --ivory: #f8f7f1;
    --cream: #f0efe5;
    --white: #ffffff;

    --forest: #294b3b;
    --forest-dark: #1e392d;
    --sage: #91a994;
    --sage-light: #dce7d9;

    --text: #34453a;
    --muted: #788579;

    --border: #e5e8df;

    --shadow: 0 8px 28px rgba(41, 75, 59, 0.07);
    --shadow-hover: 0 14px 35px rgba(41, 75, 59, 0.13);

    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--ivory);
    color: var(--text);
}

a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
}


/* ==================== HEADER ==================== */

.home-page .header,
.subject-page .header,
.resource-page .header {

    min-height: 82px;
    padding: 15px 6%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: var(--ivory);
    color: var(--forest);

    border-bottom: 1px solid var(--border);

    position: relative;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: var(--forest);
    text-decoration: none;

    font-size: 19px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--forest);
    color: white;

    border-radius: 13px;

    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: bold;
}

.header-tag {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}


/* ==================== PROFILE ==================== */

.home-profile {
    position: relative;

    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;
    color: var(--forest);

    padding: 7px 12px;
    border-radius: 30px;

    transition: background 0.2s;
    z-index: 5;
}

.home-profile:hover {
    background: var(--sage-light);
}

.home-profile-picture {
    width: 43px;
    height: 43px;

    border-radius: 50%;

    background: var(--sage-light);
    color: var(--forest);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;
    font-weight: bold;

    overflow: hidden;
    flex-shrink: 0;
}

.home-profile-name {
    font-size: 13px;
    font-weight: 700;
}


/* ==================== MENU BUTTON ==================== */

.menu-button {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1002;

    width: 46px;
    height: 46px;

    background: var(--forest);
    color: white;

    border: none;
    border-radius: 13px;

    font-size: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: var(--shadow);

    transition:
        background 0.25s,
        transform 0.25s;
}

.menu-button:hover {
    background: var(--forest-dark);
    transform: translateY(-2px);
}


/* ==================== SIDEBAR ==================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 280px;
    max-width: 85%;
    height: 100vh;
    height: 100dvh;

    padding: 25px;

    background: var(--forest-dark);

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 1001;

    transform: translateX(-100%);
    transition: transform 0.35s ease;

    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 25px;
    margin-bottom: 25px;
}

.sidebar-brand .brand-icon {
    background: var(--sage-light);
    color: var(--forest);
}

.sidebar-brand h2 {
    color: white;
    font-size: 16px;
    letter-spacing: 1px;
    margin: 0;
}

.sidebar-label {
    color: #a9bcae;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;

    margin: 5px 0;
}

.sidebar h2:not(.sidebar-brand h2) {
    color: white;
    margin-top: 35px;
}

.sidebar a {
    color: #edf3ed;
    text-decoration: none;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.7px;

    padding: 14px 15px;
    border-radius: 10px;

    transition: background 0.2s, color 0.2s;
}

.sidebar a:hover {
    background: #3b604b;
    color: white;
}

.close-button {
    align-self: flex-end;

    background: transparent;
    color: white;

    border: none;
    font-size: 23px;

    cursor: pointer;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 25px;

    color: #a9bcae;
    font-size: 12px;

    border-top: 1px solid rgba(255,255,255,0.15);
}


/* ==================== SIDEBAR OVERLAY ==================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;

    background: rgba(19, 34, 25, 0.45);

    z-index: 1000;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ==================== SHARED TEXT ==================== */

.eyebrow {
    display: inline-block;

    color: #718b75;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;

    margin-bottom: 13px;
}

.section-title {
    color: var(--forest);

    font-family: Georgia, "Times New Roman", serif;

    font-size: 32px;
    font-weight: 600;

    margin: 10px 0;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 30px;
}

.section-heading p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    margin: 8px 0 0;
}


/* ==================== HOMEPAGE ==================== */

.home-main {
    max-width: 1250px;
    width: 88%;

    margin: 0 auto;
    padding-bottom: 60px;
}


/* WELCOME HERO */

.home-hero {
    min-height: 350px;

    margin: 45px 0 65px;

    padding: 55px 65px;

    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;

    background: #e8eee4;

    border-radius: 25px;
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 620px;
}

.hero-content h1 {
    color: var(--forest);

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(36px, 5vw, 57px);
    line-height: 1.12;

    font-weight: 600;

    margin: 8px 0 18px;
}

.hero-content h1 span {
    color: #79947b;
}

.hero-content p {
    max-width: 480px;

    color: #69786c;

    font-size: 15px;
    line-height: 1.8;

    margin-bottom: 25px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    background: var(--forest);
    color: white;

    text-decoration: none;

    padding: 14px 22px;

    border-radius: 10px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;

    transition:
        background 0.2s,
        transform 0.2s;
}

.hero-button:hover {
    background: var(--forest-dark);
    transform: translateY(-2px);
}

.hero-button span {
    font-size: 18px;
}


/* HERO DECORATION */

.hero-decoration {
    position: absolute;
    right: 7%;
    top: 0;

    width: 310px;
    height: 100%;

    pointer-events: none;
}

.hero-circle {
    position: absolute;

    border-radius: 50%;
    border: 1px solid rgba(41, 75, 59, 0.13);
}

.hero-circle-one {
    width: 290px;
    height: 290px;

    top: 30px;
    right: 0;
}

.hero-circle-two {
    width: 205px;
    height: 205px;

    top: 72px;
    right: 43px;

    background: rgba(255,255,255,0.2);
}

.hero-note {
    position: absolute;

    right: 15px;
    bottom: 55px;

    padding: 15px 18px;

    background: white;

    border-radius: 12px;

    box-shadow: var(--shadow);

    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--forest);

    font-size: 12px;
    font-weight: 700;
}

.hero-note-icon {
    color: #91a994;
    font-size: 22px;
}


/* SUBJECT GRID */

.subjects-section {
    margin-bottom: 65px;
}

.subjects-section .section-heading {
    align-items: center;
}

.subject-count {
    white-space: nowrap;

    background: var(--sage-light);
    color: var(--forest);

    padding: 10px 15px;

    border-radius: 30px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.subjects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.subject-card {
    min-height: 95px;

    padding: 22px 25px;

    position: relative;

    display: flex;
    align-items: center;
    gap: 17px;

    text-decoration: none;
    color: var(--forest);

    border-radius: 15px;
    border: 1px solid rgba(41, 75, 59, 0.06);

    transition:
        transform 0.25s,
        box-shadow 0.25s;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.subject-number {
    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: rgba(255,255,255,0.55);

    color: var(--forest);

    font-size: 11px;
    font-weight: 800;
}

.subject-name {
    flex: 1;

    font-size: 15px;
    font-weight: 700;
}

.subject-arrow {
    font-size: 18px;
    opacity: 0.55;

    transition: transform 0.2s;
}

.subject-card:hover .subject-arrow {
    transform: translate(3px, -3px);
    opacity: 1;
}


/* SUBJECT CARD COLOURS */

.c1  { background: #e9e1ed; }
.c2  { background: #dce9eb; }
.c3  { background: #eee8d8; }
.c4  { background: #eddddd; }
.c5  { background: #dce9dc; }
.c6  { background: #eee3d8; }
.c7  { background: #e2e3ed; }
.c8  { background: #eddee4; }
.c9  { background: #dce9e3; }
.c10 { background: #eee1d8; }
.c11 { background: #e6e0ed; }
.c12 { background: #dce6ee; }
.c13 { background: #eee7d9; }
.c14 { background: #e0eadb; }
.c15 { background: #eddfdf; }
.c16 { background: #dce8ec; }
.c17 { background: #e8e0ed; }
.c18 { background: #ece4d8; }
.c19 { background: #dce9e1; }


/* ABOUT AND CONTACT */

.info-section {
    padding: 40px;

    margin-top: 25px;

    background: #e8eee4;

    border-radius: 18px;
}

.info-section h2 {
    color: var(--forest);

    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 600;
}

.info-section p {
    color: #68786b;
    font-size: 14px;
    line-height: 1.8;
}

.contact-section {
    background: #f0efe5;
}


/* ==================== SUBJECT PAGE ==================== */

.subject-main,
.resource-main {
    width: 88%;
    max-width: 1150px;

    margin: 0 auto;
    padding-bottom: 50px;
}


/* SUBJECT HERO */

.subject-hero {
    min-height: 270px;

    margin: 45px 0 55px;
    padding: 45px 55px;

    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;

    background: #e8eee4;

    border-radius: 24px;
}

.subject-hero-content {
    position: relative;
    z-index: 2;

    max-width: 650px;
}

.subject-hero h1 {
    color: var(--forest);

    font-family: Georgia, serif;
    font-size: clamp(35px, 5vw, 52px);

    font-weight: 600;
    margin: 5px 0 15px;
}

.subject-hero p {
    color: #68786b;

    font-size: 14px;
    line-height: 1.8;

    max-width: 500px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 17px;

    color: var(--forest);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;

    text-decoration: none;
}

.back-link:hover {
    color: #79947b;
}

.back-link span {
    font-size: 19px;
}


/* SUBJECT DECORATION */

.subject-hero-decoration {
    position: absolute;

    width: 280px;
    height: 280px;

    right: 7%;
    top: 0;

    border: 1px solid rgba(41,75,59,0.15);
    border-radius: 50%;
}

.subject-decoration-circle {
    position: absolute;

    inset: 35px;

    border-radius: 50%;

    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(41,75,59,0.12);
}

.subject-decoration-symbol {
    position: absolute;

    top: 90px;
    left: 105px;

    color: #79947b;
    font-size: 65px;
}


/* RESOURCE SECTION */

.resource-section {
    margin-bottom: 45px;
}


/* CATEGORY CARDS */

.category-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;

    margin: 30px 0;
}

.category {
    min-height: 190px;

    padding: 25px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    position: relative;

    border-radius: 17px;

    text-decoration: none;
    color: var(--forest);

    transition:
        transform 0.25s,
        box-shadow 0.25s;
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 49px;
    height: 49px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,0.65);

    border-radius: 14px;

    font-size: 25px;
}

.category-text {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.category-text strong {
    font-size: 17px;
    letter-spacing: 1px;
}

.category-text small {
    color: #718174;
    font-size: 12px;
}

.category-arrow {
    position: absolute;

    right: 24px;
    bottom: 25px;

    font-size: 20px;
}

.books {
    background: #e9e1ed;
}

.notes {
    background: #dce9e1;
}

.videos {
    background: #eee7d9;
}


/* SUBJECT FOOTER NOTE */

.subject-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 22px;

    background: #f0efe5;
    border-radius: 13px;

    color: #718174;
}

.subject-footer-note span {
    color: #91a994;
    font-size: 21px;
}

.subject-footer-note p {
    font-size: 13px;
    margin: 0;
}


/* ==================== BOOKS & NOTES ==================== */

.resource-hero {
    min-height: 205px;

    margin: 45px 0 50px;
    padding: 35px 45px;

    display: flex;
    align-items: center;
    gap: 28px;

    border-radius: 22px;
}

.books-hero {
    background: #e9e1ed;
}

.notes-hero {
    background: #dce9e1;
}

.resource-hero-icon {
    width: 80px;
    height: 80px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,0.6);

    border-radius: 20px;

    color: var(--forest);
    font-size: 38px;
}

.resource-hero h1 {
    color: var(--forest);

    font-family: Georgia, serif;
    font-size: 38px;

    margin: 0 0 10px;
}

.resource-hero p {
    color: #68786b;

    font-size: 14px;
    line-height: 1.7;

    margin: 0;
}

.resource-type-label {
    white-space: nowrap;

    background: var(--sage-light);
    color: var(--forest);

    padding: 10px 14px;

    border-radius: 30px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* RESOURCE LIST */

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 13px;

    margin: 25px 0 35px;
}

.resource-list > p {
    color: var(--muted);

    padding: 25px;

    background: white;
    border: 1px solid var(--border);

    border-radius: 13px;

    font-size: 14px;
}


/* GENERATED RESOURCE LINKS */

.resource-link {
    min-height: 75px;

    display: flex;
    align-items: center;
    gap: 15px;

    background: white;

    padding: 20px 24px;

    border: 1px solid var(--border);
    border-radius: 13px;

    text-decoration: none;
    color: var(--forest);

    font-size: 15px;
    font-weight: 700;

    box-shadow: 0 3px 12px rgba(41,75,59,0.025);

    transition:
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.resource-link:hover {
    border-color: var(--sage);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: #fcfdf9;
}


/* BACK LINK */

#back-link,
.resource-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin: 15px 0;

    padding: 13px 18px;

    border-radius: 10px;

    background: var(--sage-light);
    color: var(--forest);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;

    text-decoration: none;

    transition: background 0.2s;
}

#back-link:hover,
.resource-back-link:hover {
    background: #cbdcc9;
}

.resource-back-link span {
    font-size: 18px;
}


/* ==================== VIDEOS PAGE ==================== */

.videos-page {
    min-height: 100vh;
}

.coming-soon-page {
    min-height: calc(100vh - 82px);

    width: 88%;
    max-width: 1150px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px 0;
}

.coming-soon-card {
    width: 100%;
    max-width: 700px;

    padding: 55px 45px;

    text-align: center;

    background: #e8eee4;

    border-radius: 25px;
}

.coming-soon-icon {
    width: 90px;
    height: 90px;

    margin: 0 auto 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;

    color: var(--forest);

    border-radius: 25px;

    font-size: 38px;

    box-shadow: var(--shadow);
}

.coming-soon-card h1 {
    color: var(--forest);

    font-family: Georgia, serif;

    font-size: clamp(30px, 4vw, 42px);
    font-weight: 600;

    line-height: 1.2;

    margin: 10px 0 18px;
}

.coming-soon-card p {
    max-width: 480px;

    margin: 0 auto 25px;

    color: #68786b;

    font-size: 14px;
    line-height: 1.9;
}

.coming-soon-label {
    display: inline-block;

    padding: 11px 17px;

    margin-bottom: 25px;

    background: white;
    color: var(--forest);

    border-radius: 30px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.coming-soon-card .hero-button {
    display: flex;
    width: fit-content;
    margin: 0 auto;
}


/* ==================== FOOTER ==================== */

.home-footer {
    margin-top: 55px;
    padding: 28px 10px;

    text-align: center;

    border-top: 1px solid var(--border);
}

.home-footer span {
    color: var(--forest);

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.home-footer p {
    color: var(--muted);

    font-size: 12px;
    margin: 9px 0 0;
}


/* =====================================================
   LOGIN PAGE — PRESERVE EXISTING DESIGN
===================================================== */

.login-page {
    background-color: #eef2f7;
    font-family: Arial, sans-serif;

    min-height: 100vh;
    min-height: 100svh;

    padding: 20px 12px;
    box-sizing: border-box;

    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background-color: white;

    width: 340px;
    max-width: 100%;
    box-sizing: border-box;

    padding: 22px;

    border: 3px solid #26364b;
    border-radius: 30px;

    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
    text-align: center;

    margin: auto;
}

.login-container h1 {
    color: #26364b;
    margin-top: 5px;
    margin-bottom: 12px;
}

.login-container h2 {
    margin-bottom: 6px;
}

.login-container label {
    display: block;
    text-align: left;
    margin-top: 14px;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px;
    margin-top: 7px;

    border: 1px solid #ccc;
    border-radius: 7px;
}

.login-container button {
    width: 100%;
    padding: 11px;
    margin-top: 14px;

    border: none;
    border-radius: 7px;

    background-color: #26364b;
    color: white;

    font-size: 16px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: #e6a23c;
    color: #26364b;
}

.login-container > p {
    margin: 9px 0;
}

.login-container > button + hr {
    margin-top: 13px;
    margin-bottom: 13px;
}

.login-container hr {
    border: none;
    border-top: 1px solid #ddd;
}

.login-container a {
    color: #26364b;
    font-weight: bold;
    text-decoration: none;
}

.login-container a:hover {
    color: #e6a23c;
}


/* =====================================================
   RESPONSIVE DESIGN — TABLETS
===================================================== */

@media (max-width: 850px) {

    .home-main,
    .subject-main,
    .resource-main {
        width: 92%;
    }

    .home-hero {
        padding: 45px;
    }

    .hero-decoration {
        right: -70px;
        opacity: 0.65;
    }

    .subject-hero-decoration {
        right: -100px;
        opacity: 0.6;
    }

    .category-container {
        gap: 13px;
    }

    .category {
        padding: 20px;
    }

    .resource-type-label {
        display: none;
    }

}


/* =====================================================
   RESPONSIVE DESIGN — MOBILE
===================================================== */

@media (max-width: 600px) {

    .home-page .header,
    .subject-page .header,
    .resource-page .header {
        min-height: 70px;
        padding: 12px 15px 12px 68px;
    }

    .brand {
        gap: 8px;
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    .brand-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
        border-radius: 10px;
    }

    .header-tag {
        font-size: 8px;
        letter-spacing: 1px;
        text-align: right;
    }

    .home-profile {
        gap: 6px;
        padding: 4px;
    }

    .home-profile-picture {
        width: 35px;
        height: 35px;
    }

    .home-profile-name {
        font-size: 11px;
        max-width: 75px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .menu-button {
        top: 12px;
        left: 12px;

        width: 40px;
        height: 40px;

        font-size: 19px;
        border-radius: 11px;
    }


    /* HOMEPAGE */

    .home-main,
    .subject-main,
    .resource-main {
        width: 91%;
    }

    .home-hero {
        min-height: 300px;

        margin: 25px 0 45px;

        padding: 35px 25px;

        border-radius: 19px;
    }

    .hero-content h1 {
        font-size: 37px;
    }

    .hero-content p {
        font-size: 13px;
    }

    .hero-decoration {
        right: -170px;
        opacity: 0.3;
    }

    .hero-note {
        display: none;
    }

    .hero-button {
        padding: 13px 17px;
        font-size: 10px;
    }


    /* SUBJECT GRID */

    .subjects-section {
        margin-bottom: 45px;
    }

    .subjects-section .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-heading p {
        font-size: 12px;
    }

    .subject-count {
        font-size: 9px;
    }

    .subjects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .subject-card {
        min-height: 83px;
        padding: 13px 10px;
        gap: 8px;

        border-radius: 12px;
    }

    .subject-number {
        width: 27px;
        height: 27px;
        border-radius: 8px;
        font-size: 9px;
        flex-shrink: 0;
    }

    .subject-name {
        font-size: 11px;
        line-height: 1.35;
    }

    .subject-arrow {
        font-size: 14px;
    }


    /* ABOUT AND CONTACT */

    .info-section {
        padding: 25px;
        border-radius: 14px;
    }

    .info-section h2 {
        font-size: 21px;
    }

    .info-section p {
        font-size: 12px;
    }


    /* SUBJECT PAGE */

    .subject-hero {
        min-height: 245px;

        margin: 25px 0 40px;

        padding: 30px 24px;

        border-radius: 18px;
    }

    .subject-hero h1 {
        font-size: 35px;
        overflow-wrap: anywhere;
    }

    .subject-hero p {
        font-size: 12px;
        max-width: 95%;
    }

    .subject-hero-decoration {
        right: -190px;
        opacity: 0.3;
    }

    .category-container {
        grid-template-columns: 1fr;
        gap: 13px;
        margin: 22px 0;
    }

    .category {
        min-height: 115px;

        padding: 18px;

        display: grid;
        grid-template-columns: 48px 1fr 20px;
        align-items: center;
        gap: 14px;

        border-radius: 14px;
    }

    .category-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .category-text strong {
        font-size: 14px;
    }

    .category-text small {
        font-size: 11px;
    }

    .category-arrow {
        position: static;
        font-size: 18px;
    }

    .subject-footer-note {
        padding: 17px 12px;
    }

    .subject-footer-note p {
        font-size: 11px;
    }


    /* BOOKS AND NOTES */

    .resource-hero {
        min-height: 160px;

        margin: 25px 0 35px;

        padding: 23px 18px;

        gap: 15px;

        border-radius: 17px;
    }

    .resource-hero-icon {
        width: 55px;
        height: 55px;

        border-radius: 14px;

        font-size: 27px;
    }

    .resource-hero h1 {
        font-size: 29px;
    }

    .resource-hero p {
        font-size: 11px;
    }

    .resource-list {
        gap: 11px;
        margin: 20px 0 25px;
    }

    .resource-link {
        min-height: 65px;
        padding: 16px;

        font-size: 13px;
        border-radius: 11px;
    }

    #back-link,
    .resource-back-link {
        font-size: 10px;
        padding: 12px 15px;
    }


    /* VIDEOS */

    .coming-soon-page {
        min-height: calc(100vh - 70px);
        width: 91%;
        padding: 35px 0;
    }

    .coming-soon-card {
        padding: 40px 23px;
        border-radius: 19px;
    }

    .coming-soon-icon {
        width: 72px;
        height: 72px;
        font-size: 30px;
        border-radius: 19px;
    }

    .coming-soon-card h1 {
        font-size: 30px;
    }

    .coming-soon-card p {
        font-size: 12px;
    }


    /* FOOTER */

    .home-footer {
        margin-top: 40px;
    }

    .home-footer p {
        font-size: 10px;
    }

}


/* =====================================================
   SMALL PHONES
===================================================== */

@media (max-width: 380px) {

    .brand {
        font-size: 12px;
    }

    .header-tag {
        font-size: 7px;
    }

    .home-profile-name {
        max-width: 55px;
    }

    .subjects {
        gap: 8px;
    }

    .subject-card {
        padding: 11px 8px;
    }

    .subject-name {
        font-size: 10px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

}


/* =====================================================
   LOGIN RESPONSIVE ADJUSTMENTS
===================================================== */

@media (max-width: 480px) {

    .login-container {
        width: 100%;
        padding: 20px;
        border-radius: 25px;
    }

}

@media (max-height: 700px) {

    .login-page {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .login-container {
        padding: 17px;
    }

    .login-container h1 {
        margin-top: 2px;
        margin-bottom: 8px;
    }

    .login-container label {
        margin-top: 10px;
    }

    .login-container button {
        margin-top: 10px;
        padding: 10px;
    }

    .login-container > p {
        margin: 6px 0;
    }

}


/* =====================================================
   SUBJECT-SPECIFIC COLOUR THEMES
   Homepage remains completely unchanged.
===================================================== */

/* Default fallback */
.subject-page,
.resource-page {
    --subject-bg: #e9e1ed;
    --subject-accent: #80658f;
    --subject-text: #493b52;
    --subject-border: #d9c9df;
    --subject-soft: #f5f0f7;
}

/* Subject hero */
.subject-page .subject-hero {
    background: var(--subject-bg);
}

.subject-page .subject-hero h1 {
    color: var(--subject-text);
}

.subject-page .subject-hero p {
    color: var(--subject-text);
    opacity: 0.78;
}

.subject-page .eyebrow,
.resource-page .eyebrow {
    color: var(--subject-accent);
}

.subject-page .back-link {
    color: var(--subject-text);
}

.subject-page .back-link:hover {
    color: var(--subject-accent);
}

.subject-page .subject-hero-decoration {
    border-color: var(--subject-border);
}

.subject-page .subject-decoration-circle {
    border-color: var(--subject-border);
}

.subject-page .subject-decoration-symbol {
    color: var(--subject-accent);
}

/* Books, Notes and Videos category cards */
.subject-page .category {
    background: var(--subject-bg);
    color: var(--subject-text);
    border: 1px solid var(--subject-border);
}

.subject-page .category-icon {
    color: var(--subject-accent);
}

.subject-page .category-text small {
    color: var(--subject-text);
    opacity: 0.75;
}

.subject-page .category-arrow {
    color: var(--subject-accent);
}

/* Subject footer note */
.subject-page .subject-footer-note {
    background: var(--subject-soft);
    color: var(--subject-text);
}

.subject-page .subject-footer-note span {
    color: var(--subject-accent);
}

/* Books and Notes hero */
.resource-page .resource-hero {
    background: var(--subject-bg);
    border: 1px solid var(--subject-border);
}

.resource-page .resource-hero-icon {
    color: var(--subject-accent);
}

.resource-page .resource-hero h1 {
    color: var(--subject-text);
}

.resource-page .resource-hero p {
    color: var(--subject-text);
    opacity: 0.78;
}

.resource-page .resource-type-label {
    background: var(--subject-bg);
    color: var(--subject-text);
}

/* Individual PDF links */
.resource-page .resource-link {
    border-color: var(--subject-border);
    border-left: 4px solid var(--subject-accent);
    color: var(--subject-text);
}

.resource-page .resource-link:hover {
    background: var(--subject-soft);
    border-color: var(--subject-accent);
}

/* Empty resource message */
.resource-page .resource-list > p {
    border-color: var(--subject-border);
    background: var(--subject-soft);
    color: var(--subject-text);
}

/* Back button */
.resource-page #back-link,
.resource-page .resource-back-link {
    background: var(--subject-bg);
    color: var(--subject-text);
}

.resource-page #back-link:hover,
.resource-page .resource-back-link:hover {
    background: var(--subject-border);
}

/* Videos coming-soon section */
.resource-page .coming-soon-card {
    background: var(--subject-bg);
}

.resource-page .coming-soon-icon {
    color: var(--subject-accent);
}

.resource-page .coming-soon-card h1 {
    color: var(--subject-text);
}

.resource-page .coming-soon-card p {
    color: var(--subject-text);
    opacity: 0.78;
}

.resource-page .coming-soon-label {
    color: var(--subject-text);
    background: rgba(255, 255, 255, 0.75);
}

/* Small screens: retain the same subject colours */
@media (max-width: 600px) {
    .subject-page .subject-hero,
    .resource-page .resource-hero {
        background: var(--subject-bg);
    }
}

/* Align hamburger menu with the MY LIBRARY header */
.menu-button {
    position: fixed;
    top: 27px;
    left: 20px;
    z-index: 1001;
}

/* =====================================================
   PROFILE PAGE — MEDICAL ACADEMIA THEME
===================================================== */

/* Slightly darker background */
body.profile-page {
    background: #e3e7df !important;
    min-height: 100vh;
    color: #34453a;
}

/* Profile page header */
body.profile-page .header {
    min-height: 110px;
    padding: 20px 6% 20px 85px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    background: #f0efe5;
    color: #294b3b;

    border-bottom: 1px solid #d5dbd1;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* MY LIBRARY heading */
body.profile-page .header h1 {
    color: #294b3b !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.2;
    margin: 0;
}

/* MY PROFILE subtitle */
body.profile-page .header h2 {
    color: #718b75 !important;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    line-height: 1.4;
    margin: 0;
}

/* Profile content area */
body.profile-page .profile-container {
    background: #f8f8f2;
    border: 1px solid #d9ded5;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(41, 75, 59, 0.08);
}

/* Mobile adjustment */
@media (max-width: 600px) {
    body.profile-page .header {
        min-height: 95px;
        padding: 15px 15px 15px 65px;
    }

    body.profile-page .header h1 {
        font-size: 22px;
    }

    body.profile-page .header h2 {
        font-size: 10px;
        letter-spacing: 2px;
    }
}
