:root {
    --moodle-blue: #0f6cbf;
    --text: #1d2125;
    --border: #dee2e6;
    --light-border: #e9ecef;
    --link: #0f6cbf;

    /* Moodle 5.2 / Boost typography */
    --bs-font-sans-serif:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        "Noto Sans",
        "Liberation Sans",
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol",
        "Noto Color Emoji";

    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);

    color: var(--text);
    background: #fff;
}

/* =========================
   MOODLE / BOOST HEADINGS
   ========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: .5rem;

    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: calc(1.375rem + 1.5vw);
}

h2 {
    font-size: calc(1.325rem + .9vw);
}

h3 {
    font-size: calc(1.3rem + .6vw);
}

h4 {
    font-size: calc(1.275rem + .3vw);
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

@media (min-width: 1200px) {

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    h4 {
        font-size: 1.5rem;
    }
}

/* =========================
   TOP BAR
   ========================= */

.navbar {
    height: 72px;

    display: flex;
    align-items: stretch;

    width: 100%;

    background: #fff;

    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);

    position: sticky;
    top: 0;

    z-index: 1000;
}

/* =========================
   TOP BAR LOGO
   ========================= */

.nav-brand {
    width: 190px;

    display: flex;
    align-items: center;

    padding: 2px 10px;

    overflow: hidden;
}

.nav-brand img {
    display: block;

    width: 170px;
    height: auto;

    max-height: 68px;

    object-fit: contain;
}

/* =========================
   HOME LINK
   ========================= */

.nav-home {
    position: relative;

    display: flex;
    align-items: center;

    padding: 0 18px;

    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;

    color: var(--text);
    text-decoration: none;
}

.nav-home:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-home.active::after {
    content: "";

    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 0;

    height: 3px;

    background: var(--moodle-blue);
}

/* =========================
   RIGHT SIDE OF NAVBAR
   ========================= */

.nav-right {
    margin-left: auto;

    display: flex;
    align-items: stretch;
}

.nav-item {
    display: flex;
    align-items: center;

    border-left: 1px solid var(--light-border);
}

/* =========================
   LANGUAGE
   ========================= */

.language {
    position: relative;
}

.language-button {
    height: 100%;

    border: 0;
    background: transparent;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 15px;

    cursor: pointer;

    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;

    color: var(--text);
}

.language-button:hover {
    background: #f8f9fa;
}

.language-icon {
    display: inline-flex;

    width: 18px;
    height: 18px;

    flex: 0 0 auto;
}

.language-icon svg {
    width: 18px;
    height: 18px;
}

.language-arrow {
    font-size: 11px;
}

/* =========================
   LANGUAGE DROPDOWN
   ========================= */

.language-menu {
    display: none;

    position: absolute;

    top: 72px;
    right: 0;

    min-width: 180px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 4px;

    box-shadow: 0 5px 15px rgba(0,0,0,.15);

    overflow: hidden;

    z-index: 1000;
}

.language-menu.open {
    display: block;
}

.language-option {
    display: block;

    width: 100%;

    padding: 10px 16px;

    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;

    color: var(--text);
    text-decoration: none;

    white-space: nowrap;

    background: #fff;
}

.language-option:hover {
    background: #f8f9fa;

    color: var(--text);
    text-decoration: none;
}

.language-option.active {
    background: #f8f9fa;
}

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

.login-link {
    display: flex;
    align-items: center;

    padding: 0 18px;

    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;

    color: var(--link);
    text-decoration: none;

    white-space: nowrap;
}

.login-link:hover {
    text-decoration: underline;
}

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

.page {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 40px 24px 70px;
}

.page-title {
    width: 800px;
    max-width: 100%;

    margin: 0 0 28px;
}

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

.card {
    width: 800px;
    max-width: 100%;

    border: 1px solid #d5d9dd;
    border-radius: 7px;

    background: #fff;

    padding: 26px 30px 20px;
}

.main-logo {
    display: block;

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

    height: auto;

    margin: 0 auto 22px;
}

.welcome {
    text-align: center;

    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;

    margin: 4px 0 14px;
}

.content-list {
    margin: 0;
    padding-left: 25px;
}

.content-list li {
    margin-bottom: 13px;
}

.card a,
.page a {
    color: var(--link);
    text-decoration: none;
}

.card a:hover,
.page a:hover {
    text-decoration: underline;
}

.archive {
    margin-top: 3px;
}

/* =========================
   RESOURCE LINKS
   ========================= */

.resources {
    margin-top: 23px;
}

.resource {
    min-height: 55px;

    display: flex;
    align-items: center;

    gap: 15px;

    padding: 11px 14px;

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

.resource-icon {
    width: 21px;
    height: 25px;

    flex: 0 0 auto;
}

/* =========================
   ARTICLE PAGES
   ========================= */

.article-card {
    width: 900px;
    max-width: 100%;

    border: 1px solid #d5d9dd;
    border-radius: 7px;

    background: #fff;

    padding: 28px 32px;
}

.article-card h2 {
    margin-top: 0;
}

.article-card li {
    margin-bottom: 14px;
}

.article-card img {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 12px 0 20px;

    border: 1px solid #ddd;
    border-radius: 8px;
}

/* =========================
   CODE / MONOSPACE
   ========================= */

code {
    font-family:
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        "Courier New",
        monospace;

    font-size: .875em;

    background: #f6f6f6;
    border-radius: 3px;

    padding: 1px 4px;
}

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

@media (max-width: 700px) {

    .navbar {
        height: 62px;
    }

    .nav-brand {
        width: 125px;

        padding: 2px 7px;
    }

    .nav-brand img {
        width: 112px;

        max-height: 58px;
    }

    .nav-home {
        padding: 0 10px;
    }

    .language-button {
        padding: 0 9px;
    }

    .language-menu {
        top: 62px;
    }

    .login-link {
        padding: 0 10px;
    }

    .page {
        padding: 28px 15px 50px;
    }

    .card,
    .article-card {
        padding: 20px 16px;
    }
}
