/* Course entry only. The surrounding Moodle navigation and native enrolment remain intact. */
body.apol-entry .apol-main { max-width: none; width: 100%; padding: 0; }
body.apol-entry .apol-primary { min-width: 0; }
.apol-course-entry {
    --entry-navy: #173f53;
    --entry-orange: #f58232;
    --entry-action: #b25200;
    --entry-action-hover: #8f4100;
    --entry-ink: #344f5d;
    --entry-muted: #536873;
    --entry-card-width: 360px;
    color: var(--entry-ink);
    width: 100%;
    min-width: 0;
}
.apol-course-entry *, .apol-course-entry *::before, .apol-course-entry *::after { box-sizing: border-box; }
.apol-entry-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--entry-navy); }
.apol-entry-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 21, 26, .62); }
body.apol-entry .apol-course-entry .apol-entry-hero-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.apol-entry-hero-inner { display: flex; align-items: center; width: min(100%, 1184px); min-height: 328px; margin: 0 auto; padding: 64px 32px; }
.apol-entry-heading { width: calc(100% - var(--entry-card-width) - 56px); max-width: 720px; }
.apol-course-entry .apol-entry-heading h1 { margin: 0; color: #fff; font-family: inherit; font-size: clamp(2rem, 3.7vw, 3rem); line-height: 1.25; font-weight: 400; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: break-word; }
.apol-entry-heading h1::after { display: block; content: ""; width: 72px; height: 3px; margin-top: 22px; background: var(--entry-orange); }
.apol-entry-details-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 17px; color: #fff; font-size: .9375rem; line-height: 1.5; text-decoration: none; }
.apol-entry-details-link:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.apol-entry-details-link svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; }
.apol-entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--entry-card-width); gap: 56px; width: min(100%, 1184px); margin: 0 auto; padding: 0 32px 48px; align-items: start; }
.apol-entry-card { grid-column: 2; grid-row: 1; position: relative; z-index: 1; margin-top: -264px; background: #fff; border-radius: 6px; box-shadow: 0 18px 38px rgba(23, 63, 83, .09); overflow: hidden; }
.apol-entry-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--entry-navy); }
.apol-entry-cover, .apol-entry-cover-overlay { display: block; width: 100%; height: 100%; object-fit: cover; }
.apol-entry-cover-overlay { position: absolute; inset: 0; object-fit: contain; pointer-events: none; }
.apol-entry-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.apol-entry-preview-trigger { display: grid; place-items: center; position: absolute; inset: 0; width: 100%; border: 0; border-radius: 0; padding: 0; background: rgba(0, 0, 0, .12); color: var(--entry-navy); cursor: pointer; }
.apol-entry-preview-trigger svg { width: 58px; height: 58px; padding: 15px; border-radius: 50%; fill: currentColor; background: #fff; }
.apol-entry-preview-trigger:hover { background: rgba(0, 0, 0, .24); }
.apol-entry-card-body { padding: 22px 30px 28px; }
.apol-entry-preview-caption { margin: 0 0 16px; color: var(--entry-muted); font-size: .8125rem; line-height: 1.5; text-align: center; }
.apol-entry-status { margin: 0 0 16px; padding: 8px 14px; background: #f6f8f9; border-radius: 24px; color: var(--entry-muted); font-size: .875rem; line-height: 1.5; text-align: center; }
.apol-entry-cta, .apol-entry-action .btn-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin: 0; padding: 10px 18px; border: 1px solid transparent; border-radius: 24px; background: var(--entry-action); color: #fff; font-family: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; cursor: pointer; }
.apol-entry-cta:hover, .apol-entry-action .btn-primary:hover { color: #fff; background: var(--entry-action-hover); text-decoration: none; }
.apol-entry-action { margin: 0; }
.apol-entry-action .mform { margin: 0; }
.apol-entry-action .mform .row { margin-inline: 0; }
.apol-entry-action .mform [data-fieldtype="group"] { width: 100%; padding-inline: 0; }
.apol-entry-action .mform .btn:disabled, .apol-entry-cta[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.apol-entry-free { margin: 16px 0 23px; color: var(--entry-muted); font-size: .875rem; line-height: 1.5; text-align: center; }
.apol-entry-facts h2 { margin: 0 0 14px; color: var(--entry-muted); font-size: .875rem; line-height: 1.4; font-weight: 400; }
.apol-entry-facts ul { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.apol-entry-facts li { display: flex; align-items: center; gap: 12px; color: var(--entry-ink); font-size: .9375rem; line-height: 1.45; }
.apol-entry-facts svg { flex: 0 0 18px; width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.apol-entry-noscript { margin: 20px 0 0; font-size: .875rem; line-height: 1.5; }
.apol-entry-content { grid-column: 1; grid-row: 1; padding-top: 32px; min-width: 0; font-size: 1rem; line-height: 1.75; overflow-wrap: break-word; scroll-margin-top: 100px; }
.apol-entry-content p { margin: 0 0 1.3rem; }
.apol-entry-content > :last-child { margin-bottom: 0; }
.apol-entry-content h2 { margin: 2rem 0 1rem; color: var(--entry-navy); font-size: 1.5rem; line-height: 1.35; font-weight: 600; }
.apol-entry-content h3 { margin: 1.75rem 0 .75rem; color: var(--entry-navy); font-size: 1.125rem; line-height: 1.45; font-weight: 600; }
.apol-entry-content ul, .apol-entry-content ol { margin: .75rem 0 1.5rem; padding-inline-start: 1.5rem; }
.apol-entry-content li + li { margin-top: .5rem; }
.apol-entry-content a, .apol-entry-noscript a { color: var(--entry-navy); text-decoration: underline; text-underline-offset: .2em; }
.apol-course-entry a:focus-visible, .apol-course-entry button:focus-visible, .apol-entry-action .btn:focus-visible { outline: 3px solid var(--entry-navy); outline-offset: 3px; box-shadow: none; }
.apol-entry-details-link:focus-visible { outline-color: #fff; }
.apol-entry-preview-trigger:focus-visible { outline-color: #fff; outline-offset: -6px; }
.apol-entry-content:focus { outline: none; }
.apol-course-entry ::selection { background: #ffe0c4; color: var(--entry-navy); }
@media (max-width: 980px) {
    .apol-course-entry { --entry-card-width: 320px; }
    .apol-entry-grid { gap: 36px; }
    .apol-entry-heading { width: calc(100% - var(--entry-card-width) - 36px); }
    .apol-entry-card-body { padding-inline: 24px; }
}
@media (max-width: 800px) {
    .apol-entry-hero-inner { min-height: 248px; padding: 44px 24px; }
    .apol-entry-heading { width: 100%; max-width: 680px; }
    .apol-course-entry .apol-entry-heading h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
    .apol-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 24px 24px 40px; }
    .apol-entry-card { grid-column: 1; grid-row: 1; width: min(100%, 480px); margin: 0 auto; }
    .apol-entry-content { grid-column: 1; grid-row: 2; padding-top: 0; }
}
@media (max-width: 480px) {
    .apol-entry-hero-inner { padding: 38px 20px; }
    .apol-entry-grid { padding: 20px 16px 36px; }
    .apol-entry-card-body { padding: 20px 24px 24px; }
    .apol-entry-content { line-height: 1.7; }
    .apol-entry-content h2 { font-size: 1.375rem; }
}

.apol-course-entry [hidden] { display: none !important; }
.apol-entry-native-action .card { margin: 0; border: 0; background: transparent; box-shadow: none; }
.apol-entry-native-action .card-body { padding: 0; }
.apol-entry-native-action .card-body:empty, .apol-entry-native-action .card-header:empty { display: none; }
.apol-entry-native-action .femptylabel > .col-form-label { display: none !important; }
.apol-entry-native-action .femptylabel > .felement { flex: 0 0 100%; width: 100%; max-width: 100%; }
.apol-entry-native-action [data-groupname="buttonar"] .fitem { width: 100%; margin-bottom: 0; }
.apol-entry-native-action [data-fieldtype="submit"] { display: block; width: 100%; }

/* Centre only the native keyless self-enrol action inside its card. */
.apol-entry-native-action [data-apol-simple-enrol] .card-footer { display: flex; justify-content: center; }
