/* ABU portal front page (theme_academi local customisation, 2026-10-26).
   Colours: #003d78 navy, #00abc7 turquoise, #0f2554 dark navy. */

body.abu-portal-active #page { background: #f3f5f9; }

.abu-portal { color: #0f2554; padding-bottom: 28px; }
.abu-portal [hidden] { display: none !important; }
.abu-portal a { text-decoration: none; }
.abu-portal a:hover { text-decoration: none; }
.abu-portal .abu-h2 { margin: 0; font-size: 1.125rem; font-weight: 700; color: #0f2554; line-height: 1.3; }
.abu-portal .abu-sub, .abu-portal .abu-muted { font-size: 0.8125rem; color: #5a6680; margin: 0; }
.abu-portal .abu-muted { font-size: 0.875rem; margin: 4px 0 20px; }
.abu-portal .abu-strong { font-size: 0.875rem; font-weight: 600; color: #00798d; }
.abu-portal .abu-strong:hover { color: #003d78; }
.abu-portal .abu-muted-link { font-size: 0.875rem; color: #4a5876; }

.abu-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 20px; }
.abu-top { padding-top: 24px; }
.abu-main { padding-top: 20px; align-items: flex-start; }
.abu-col { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.abu-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Cards */
.abu-card { background: #ffffff; border: 1px solid #e1e7f0; border-radius: 16px; padding: 18px 20px 20px; box-sizing: border-box; }
.abu-card-flush { padding: 0; overflow: hidden; }
.abu-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 12px; padding: 18px 20px 14px; }
.abu-card-head-tight { padding: 0 0 14px; }

/* Hero */
.abu-hero { position: relative; overflow: hidden; flex: 999 1 540px; min-width: 0; background: #003d78; color: #ffffff; border-radius: 16px; padding: 36px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.abu-hero-art { position: absolute; right: -40px; bottom: -40px; opacity: 0.18; pointer-events: none; }
.abu-hero-text { position: relative; }
.abu-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: #0d5592; color: #bfeef6; font-size: 0.8125rem; font-weight: 600; }
.abu-dot { width: 7px; height: 7px; border-radius: 999px; background: #00abc7; }
.abu-portal .abu-hero-title { margin: 16px 0 10px; font-size: 2rem; line-height: 1.2; font-weight: 700; max-width: 560px; color: #ffffff; }
.abu-hero-sub { margin: 0; font-size: 1rem; line-height: 1.6; color: #d9e6f2; max-width: 520px; }
.abu-shortcuts { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.abu-portal .abu-shortcut { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: #0b4c8a; color: #ffffff; transition: background-color .15s; }
.abu-portal .abu-shortcut:hover, .abu-portal .abu-shortcut:focus { background: #0d5aa0; color: #ffffff; }
.abu-sc-title { font-size: 0.9375rem; font-weight: 600; }
.abu-sc-sub { font-size: 0.75rem; color: #bcd2e8; }

/* Login card */
.abu-login { flex: 1 1 340px; min-width: 0; padding: 28px; }
.abu-form { display: flex; flex-direction: column; gap: 14px; }
.abu-field { display: flex; flex-direction: column; gap: 6px; }
.abu-field label { font-size: 0.8125rem; font-weight: 600; margin: 0; color: #0f2554; }
.abu-field input, .abu-pw { height: 44px; border: 1px solid #c9d3e1; border-radius: 8px; font-size: 0.9375rem; color: #0f2554; background: #ffffff; box-sizing: border-box; }
.abu-portal .abu-field > input { padding: 0 12px; width: 100%; max-width: none; }
.abu-portal .abu-pw input { max-width: none; }
.abu-field input:focus, .abu-pw:focus-within { outline: none; border-color: #003d78; box-shadow: 0 0 0 3px rgba(0, 171, 199, 0.25); }
.abu-pw { display: flex; align-items: center; padding: 0 4px 0 12px; }
.abu-pw input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; box-shadow: none !important; }
.abu-pw-toggle { width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: #4a5876; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.abu-pw-toggle:hover, .abu-pw-toggle[aria-pressed="true"] { background: #eef2f7; color: #003d78; }
.abu-check { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: #2c3d5c; margin: 0; }
.abu-check input { width: 16px; height: 16px; accent-color: #003d78; margin: 0; }
.abu-login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.abu-stack { display: flex; flex-direction: column; gap: 10px; }

/* Buttons */
.abu-portal .abu-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 8px; font-size: 0.9375rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; line-height: 1; box-sizing: border-box; white-space: nowrap; }
.abu-portal .abu-btn-sm { height: 40px; padding: 0 14px; font-size: 0.875rem; }
.abu-portal .abu-btn-block { width: 100%; }
.abu-portal .abu-btn-primary { background: #003d78; color: #ffffff; }
.abu-portal .abu-btn-primary:hover, .abu-portal .abu-btn-primary:focus { background: #0f2554; color: #ffffff; }
.abu-portal .abu-btn-outline { background: transparent; color: #003d78; border-color: #003d78; }
.abu-portal .abu-btn-outline:hover, .abu-portal .abu-btn-outline:focus { background: #003d78; color: #ffffff; }
.abu-portal .abu-btn:focus-visible, .abu-portal .abu-tile:focus-visible, .abu-portal .abu-shortcut:focus-visible { outline: 3px solid #00abc7; outline-offset: 2px; }

/* Segmented control */
.abu-seg { display: flex; padding: 3px; border-radius: 10px; background: #eef2f7; }
.abu-seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #4a5876; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.abu-seg button[aria-pressed="true"] { background: #ffffff; color: #003d78; font-weight: 700; box-shadow: 0 1px 2px rgba(15, 37, 84, 0.12); }

/* Tiles */
.abu-grid { display: grid; gap: 10px; padding: 0 20px 20px; }
.abu-grid-links { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.abu-grid-courses { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.abu-portal .abu-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e6ebf2; border-radius: 12px; color: #0f2554; background: #ffffff; transition: border-color .15s, box-shadow .15s; }
.abu-portal .abu-tile:hover { border-color: #00abc7; box-shadow: 0 2px 8px rgba(15, 37, 84, 0.08); color: #0f2554; }
.abu-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.abu-icon-teal { background: #e3f5f8; color: #00798d; }
.abu-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.abu-tile-title { font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.abu-tile-meta { font-size: 0.75rem; color: #5a6680; }
.abu-badge { flex: none; width: 64px; height: 44px; border-radius: 8px; background: #003d78; color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.15; border-bottom: 3px solid #00abc7; box-sizing: border-box; padding: 0 4px; }
.abu-chevron { flex: none; }

/* Search */
.abu-search { display: flex; align-items: center; gap: 10px; margin: 0 20px 14px; height: 48px; padding: 0 4px 0 14px; border: 1px solid #d3dbe7; border-radius: 10px; background: #f8fafc; box-sizing: border-box; }
.abu-search:focus-within { border-color: #003d78; box-shadow: 0 0 0 3px rgba(0, 171, 199, 0.25); }
.abu-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 0.9375rem; color: #0f2554; outline: none; }
.abu-empty { margin: 0 20px 20px; padding: 24px 20px; border: 1px dashed #c9d3e1; border-radius: 12px; text-align: center; font-size: 0.875rem; color: #4a5876; }

/* Steps */
.abu-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.abu-steps li { display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: #f6f8fb; }
.abu-steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.abu-steps strong { font-size: 0.875rem; }
.abu-steps li > span:last-child > span { font-size: 0.8125rem; line-height: 1.5; color: #4a5876; }
.abu-num { flex: none; width: 30px; height: 30px; border-radius: 999px; background: #003d78; color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; }
.abu-num-teal { background: #00abc7; color: #0f2554; }

/* FAQ */
.abu-faq-h { padding: 18px 20px 10px; }
.abu-faq { border-top: 1px solid #edf1f6; }
.abu-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
.abu-faq summary::-webkit-details-marker { display: none; }
.abu-faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; border-radius: 999px; background: #eef2f7; color: #003d78; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; }
.abu-faq[open] summary::after { content: "\2212"; }
.abu-faq summary:focus-visible { outline: 3px solid #00abc7; outline-offset: -3px; }
.abu-faq p { margin: 0; padding: 0 20px 16px; font-size: 0.875rem; line-height: 1.6; color: #2c3d5c; }

/* Categories */
.abu-cats { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.abu-portal .abu-cat { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; color: #0f2554; }
.abu-portal .abu-cat:hover { color: #003d78; }
.abu-cat-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.875rem; }
.abu-cat-row strong { font-size: 0.8125rem; color: #003d78; }
.abu-bar { display: block; height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.abu-bar > span { display: block; height: 100%; border-radius: 999px; background: #00abc7; }

/* Help */
.abu-help { background: #e6f6f9; border-color: #bfe7ef; }
.abu-help-text { margin: 6px 0 14px; font-size: 0.875rem; line-height: 1.6; color: #2c3d5c; }
.abu-contact { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; }
.abu-contact li { display: flex; align-items: center; gap: 8px; }
.abu-portal .abu-contact a { color: #0f2554; }
.abu-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Front page: header contents centred on the 1240px content width (site-wide header styles live in the custom CSS). */
@media (min-width: 1280px) {
    body.abu-portal-active.moodle-based-header #header > .container-fluid { padding: 0 calc((100% - 1240px) / 2 + 20px); }
}

/* Phones */
@media (max-width: 575.98px) {
    .abu-wrap { padding: 0 12px; gap: 14px; }
    .abu-top { padding-top: 14px; }
    .abu-main { padding-top: 14px; }
    .abu-col, .abu-side { gap: 14px; }
    .abu-hero { padding: 24px 20px; gap: 20px; }
    .abu-portal .abu-hero-title { font-size: 1.5rem; }
    .abu-hero-sub { font-size: 0.9375rem; }
    .abu-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .abu-portal .abu-shortcut { padding: 12px 10px; align-items: center; text-align: center; }
    .abu-sc-sub { display: none; }
    .abu-login { padding: 22px 18px; }
    .abu-field input, .abu-search input { font-size: 16px; } /* iOS: no zoom on focus */
    .abu-card-head { padding: 16px 16px 12px; }
    .abu-grid { padding: 0 16px 16px; grid-template-columns: 1fr; }
    .abu-search { margin: 0 16px 12px; }
    .abu-seg { width: 100%; }
    .abu-seg button { flex: 1; padding: 0 6px; }
    .abu-faq summary { padding: 14px 16px; }
    .abu-faq p { padding: 0 16px 14px; }
    .abu-faq-h { padding: 16px 16px 8px; }
}
