/* =========================================================
   ELPS Resource Center
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
    font-family: 'Open Sans';
    src: url('/media/x1tntp4w/opensans-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/media/yq0jftc0/opensans-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- Page ---------- */
.elps-page {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
}
.elps-page:focus { outline: none; }
.elps-page img { max-width: 100%; height: auto; }

/* ---------- Banner ---------- */
.elps-page .elps-banner {
    position: relative;
    margin-bottom: 1rem;
}
.elps-page .elps-banner img {
    display: block;
    width: 100%;
}
.elps-page .elps-banner-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 17%;
    margin: 0;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    text-align: center;
    pointer-events: none;
}

/* ---------- Description ---------- */
.elps-page .elps-description {
    margin-bottom: 2rem;
    overflow-wrap: break-word;
}
.elps-page .elps-description a {
    color: #0b5cad;
    text-decoration: underline;
}

/* =========================================================
   Collapsible section (Asynchronous Courses)
   ========================================================= */
.elps-page .elps-collapse {
    margin-bottom: 2.5rem;
}
.elps-page .elps-collapse-heading {
    margin: 0;
    padding: 0;
    font-size: inherit;
}

/* Header: open state = top of the yellow box */
.elps-page .elps-collapse-toggle {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #ecaf33;
    border-radius: 0;
    box-shadow: none;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #012169;
    text-align: left;
    text-transform: none;
    cursor: pointer;
}

/* Header: collapsed state = navy title with a yellow underline only */
.elps-page .elps-collapse-toggle.collapsed {
    border-color: transparent transparent #ecaf33 transparent;
    padding-left: 10px;
    padding-right: 10px;
}

.elps-page .elps-collapse-toggle:hover,
.elps-page .elps-collapse-toggle:active {
    background: #fff;
    color: #012169;
}

/* No border on mouse click; visible outline only for keyboard (Tab) users */
.elps-page .elps-collapse-toggle:focus {
    outline: none;
    box-shadow: none;
}
.elps-page .elps-collapse-toggle:focus-visible {
    outline: 3px solid #012169;
    outline-offset: 2px;
}

.elps-page .elps-collapse-chevron {
    flex-shrink: 0;
    color: #000;
    transition: transform 0.25s ease;
}
.elps-page .elps-collapse-toggle.collapsed .elps-collapse-chevron {
    transform: rotate(180deg);   /* points down when closed */
}

/* Body: the rest of the yellow box */
.elps-page .elps-collapse-body {
    box-sizing: border-box;
    background: #fdf7ea;
    border: 2px solid #ecaf33;
    border-top: 0;
    border-radius: 0 0 40px 40px;
    padding: 30px 40px 45px;
}

/* Fixed gutters so nothing can overflow the yellow border */
.elps-page .elps-collapse-body > .row {
    margin-left: -15px;
    margin-right: -15px;
}
.elps-page .elps-collapse-col {
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 2.5rem;
}
.elps-page .elps-collapse-col:last-child { margin-bottom: 0; }

/* =========================================================
   Media + text item (used in courses AND resource boxes)
   ========================================================= */

/* Phone: image on top, text below */
.elps-page .elps-item {
    display: flex;
    flex-direction: column;
}

.elps-page .elps-item-image {
    position: relative;          /* the link is stretched over this */
    max-width: 100%;
    margin: 0 0 15px 0;
}

/* Transparent PNGs show the background colour: no white box, padding or shadow */
.elps-page .elps-item-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Invisible link covering the whole image */
.elps-page .elps-item-image-link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: block;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0;
    line-height: 0;
    color: transparent;
    text-decoration: none;
}

/* Hide the "Opens a new window" text and icon the site script adds */
.elps-page .elps-item-image-link > *,
.elps-page .elps-item-image-link::before,
.elps-page .elps-item-image-link::after {
    display: none !important;
}

/* Keyboard focus: outline around the image; no outline on mouse click */
.elps-page .elps-item-image-link:focus { outline: none; }
.elps-page .elps-item-image-link:focus-visible {
    outline: 3px solid #012169;
    outline-offset: 2px;
}

.elps-page .elps-item-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
    color: #000;
}
.elps-page .elps-item-text p { margin: 0; }
.elps-page .elps-item-text a { color: #0b5cad; }
.elps-page .elps-item-text .elps-item-title {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    margin: 0;
    padding: 0;
}
.elps-page .elps-item-text .elps-item-meta {
    font-weight: 700;
    margin: 0;
}

/* =========================================================
   Resources section
   ========================================================= */

/* "Resources" heading with yellow underline (matches collapsed courses header) */
.elps-page .elps-section-heading {
    margin: 0 0 2rem 0;
    padding: 10px;
    border-bottom: 2px solid #ecaf33;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #012169;
}

/* ---------- Box (shared by blue and yellow) ---------- */
.elps-page .elps-box {
    box-sizing: border-box;
    border: 2px solid;
    border-radius: 40px 0 40px 0;       /* rounded top-left and bottom-right */
    padding: 30px 40px 40px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.elps-page .elps-box-blue {
    background: #e0ecf6;
    border-color: #012169;
}
.elps-page .elps-box-yellow {
    background: #fdf7ea;
    border-color: #ecaf33;
}

.elps-page .elps-box .elps-box-title {
    margin: 0 0 1.75rem 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #012169;
    text-align: center;
}

/* Fixed gutters so nothing overflows the box border */
.elps-page .elps-box > .row {
    margin-left: -15px;
    margin-right: -15px;
}
.elps-page .elps-box-col,
.elps-page .elps-box-content {
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
}
.elps-page .elps-box-col { margin-bottom: 2rem; }

/* Space between an items row and a text row */
.elps-page .elps-box-text-row { margin-top: 0.5rem; margin-bottom: 1rem; }
.elps-page .elps-box-text-row:last-child { margin-bottom: 0; }

/* ---------- Rich text inside boxes ---------- */
.elps-page .elps-box-content {
    font-size: 16px;
    line-height: 1.3;
    color: #000;
}
.elps-page .elps-box-content p { margin: 0 0 1rem 0; }
.elps-page .elps-box-content p:last-child { margin-bottom: 0; }
.elps-page .elps-box-content h3,
.elps-page .elps-box-content h4,
.elps-page .elps-box-content strong {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}
.elps-page .elps-box-content h3,
.elps-page .elps-box-content h4 { margin: 0 0 0.5rem 0; }

/* Bullet lists inside boxes (box text and item descriptions) */
.elps-page .elps-box ul {
    margin: 0.5rem 0 0 0;
    padding-left: 70px;
    list-style: disc;
}
.elps-page .elps-box li { margin-bottom: 0.5rem; }
.elps-page .elps-box a {
    color: #0b5cad;
    text-decoration: underline;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet and up: image beside text */
@media (min-width: 768px) {
    .elps-page .elps-item {
        flex-direction: row;
        align-items: flex-start;
    }
    .elps-page .elps-item-image {
        flex: 0 0 35%;
        max-width: 35%;
        margin: 0 25px 0 0;      /* gap between image and text */
    }
}

/* Desktop: match the mockup's image widths */
@media (min-width: 992px) {
    .elps-page .elps-item-full .elps-item-image {   /* ELPS Academy, TEALearn */
        flex-basis: 25%;
        max-width: 25%;
    }
    .elps-page .elps-item-half .elps-item-image {   /* the 4 CBLI courses */
        flex-basis: 45%;
        max-width: 45%;
    }
    .elps-page .elps-box .elps-item-half .elps-item-image {   /* LIAG / Side-by-Side covers */
        flex-basis: 32%;
        max-width: 32%;
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .elps-page .elps-banner-title { font-size: 28px; }
}

/* Mobile */
@media (max-width: 767.98px) {
    .elps-page .elps-banner-title { font-size: 18px; }

    .elps-page .elps-collapse-toggle { font-size: 20px; }
    .elps-page .elps-collapse-body {
        padding: 20px 15px 30px;
        border-radius: 0 0 25px 25px;
    }

    .elps-page .elps-section-heading { font-size: 20px; }
    .elps-page .elps-box {
        padding: 20px 15px 25px;
        border-radius: 25px 0 25px 0;
    }
    .elps-page .elps-box ul { padding-left: 30px; }

    /* Cover images centred and smaller on phones, like the mobile mockup */
    .elps-page .elps-box .elps-item-image {
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 400px) {
    .elps-page .elps-banner-title { font-size: 14px; }
}