/* ==========================================================================
   North Liverpool College — design system
   British blue + gold on white. Shared by the public site and the portals.
   ========================================================================== */

:root {
    --navy: #0c1f33;
    --navy-dark: #091726;
    --navy-darker: #06101b;
    --navy-light: #204267;
    --navy-50: #f3f6f9;
    --navy-100: #d8e1eb;

    --gold: #d8242a;
    --gold-light: #df5a5e;
    --gold-dark: #ab181d;
    --gold-50: #fbf1f2;

    --ink: #16202e;
    --body: #46586e;
    --muted: #7b8ca3;
    --line: #e2e9f1;
    --surface: #ffffff;
    --surface-alt: #f7fafd;

    --success: #0f9d58;
    --danger: #d93636;
    --warning: #e8930c;
    --info: #2b7cd3;

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(12, 31, 51, .06), 0 1px 3px rgba(12, 31, 51, .08);
    --shadow: 0 4px 14px rgba(12, 31, 51, .08);
    --shadow-lg: 0 18px 44px rgba(12, 31, 51, .14);
    --shadow-gold: 0 8px 24px rgba(216, 36, 42, .28);

    --font-en: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --font-ar: 'Cairo', 'Tajawal', system-ui, sans-serif;
    --font: var(--font-en);

    /* The public header is three stacked rows: contact strip, brand row,
       navigation row. --header-h is their combined height and is what page
       content offsets itself by; the media queries below zero out the rows
       that are hidden on smaller screens so the total stays correct. */
    --topbar-h: 38px;
    --brandbar-h: 84px;
    --navbar-h: 50px;
    --header-h: calc(var(--topbar-h) + var(--brandbar-h) + var(--navbar-h));
    --container: 1240px;
}

html[dir="rtl"] {
    --font: var(--font-ar);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--body);
    background: var(--surface);
    line-height: 1.7;
    font-size: 15.5px;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    letter-spacing: 0;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--gold-dark);
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

::selection {
    background: var(--gold);
    color: #fff;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--navy-50);
}

::-webkit-scrollbar-thumb {
    background: #b9c9db;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy-light);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Anything linked to by a fragment (e.g. the #results target the pagination
   points at) must clear the fixed header instead of hiding behind it. */
[id] {
    scroll-margin-top: calc(var(--header-h) + 24px);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 22px;
}

.section {
    padding: 84px 0;
}

.section-alt {
    background: var(--surface-alt);
}

.section-navy {
    background: var(--navy-darker);
    color: #cfdcea;
}

.section-navy h1,
.section-navy h2,
.section-navy h3,
.section-navy h4 {
    color: #fff;
}

.grid {
    display: grid;
    gap: 26px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}

/* ── Section headings ───────────────────────────────────────────────────── */
.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 52px;
}

.section-head.start {
    text-align: start;
    margin-inline: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: '';
    width: 26px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.section-head.start .eyebrow::before {
    display: none;
}

.section-title {
    font-size: clamp(27px, 3.4vw, 39px);
    margin-bottom: 14px;
}

.section-sub {
    font-size: 16px;
    color: var(--body);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    white-space: nowrap;
    line-height: 1;
}

.btn i {
    font-size: 17px;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--navy-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-gold {
    background: var(--gold);
    color: #fff;
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: #fff;
}

.btn-ghost-light {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
    backdrop-filter: blur(6px);
}

.btn-ghost-light:hover {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b52b2b;
    color: #fff;
}

.btn:disabled,
.btn.disabled {
    opacity: .55;
    pointer-events: none;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--navy-100);
}

.card-body {
    padding: 26px;
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--navy-50);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s;
}

.card-hover:hover .card-media img {
    transform: scale(1.06);
}

.card-media-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-media-fallback i {
    font-size: 46px;
    color: rgba(255, 255, 255, .32);
}

/* Icon tile used across feature/faculty/training cards */
.icon-tile {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
}

.icon-tile-navy {
    background: var(--navy-50);
    color: var(--navy);
}

.icon-tile-gold {
    background: var(--gold-50);
    color: var(--gold-dark);
}

.icon-tile-solid {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: #fff;
}

/* ── Badges & chips ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.5;
}

.badge-navy {
    background: var(--navy-50);
    color: var(--navy);
}

.badge-gold {
    background: var(--gold-50);
    color: var(--gold-dark);
}

.badge-success {
    background: #e6f6ee;
    color: var(--success);
}

.badge-danger {
    background: #fdeaea;
    color: var(--danger);
}

.badge-warning {
    background: #fdf3e2;
    color: #a86a05;
}

.badge-info {
    background: #e8f2fc;
    color: var(--info);
}

.badge-muted {
    background: #eef2f7;
    color: var(--muted);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}

.meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-row i {
    color: var(--gold-dark);
    font-size: 15px;
}

/* ── Page banner (every page has one) ───────────────────────────────────── */
.page-banner {
    position: relative;
    margin-top: var(--header-h);
    /* Tall enough for the photography to read as a scene rather than a strip. */
    min-height: 380px;
    padding: 104px 0 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-darker) 0%, var(--navy) 55%, var(--navy-light) 100%);
    color: #fff;
    overflow: hidden;
}

.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: .6;
}

/* The photograph sits behind the copy. --banner-focus lets a page shift the
   crop (people are usually in the upper half, so the default favours it), and
   the gradient keeps the text side dark enough to stay readable. */
.page-banner.has-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--banner-image);
    background-size: cover;
    background-position: var(--banner-focus, center 30%);
    background-repeat: no-repeat;
    opacity: .35;
}

.page-banner.has-image::after {
    background-image:
        linear-gradient(to var(--banner-fade, right),
            rgba(6, 16, 27, .82) 0%,
            rgba(6, 16, 27, .55) 45%,
            rgba(6, 16, 27, .15) 100%);
    opacity: 1;
}

html[dir="rtl"] .page-banner.has-image {
    --banner-fade: left;
}

.page-banner .container {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    color: #fff;
    font-size: clamp(29px, 4.2vw, 46px);
    margin-bottom: 14px;
}

.page-banner .banner-sub {
    font-size: 17px;
    color: rgba(255, 255, 255, .84);
    max-width: 720px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, .78);
}

.breadcrumb a:hover {
    color: var(--gold-light);
}

.breadcrumb .sep {
    color: rgba(255, 255, 255, .38);
    font-size: 11px;
}

.breadcrumb .current {
    color: var(--gold-light);
    font-weight: 600;
}

html[dir="rtl"] .breadcrumb .sep {
    transform: scaleX(-1);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field {
    margin-bottom: 19px;
}

.field-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 7px;
}

.field-label .req {
    color: var(--danger);
}

.field-hint {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 6px;
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 12px 15px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--ink);
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(12, 31, 51, .1);
}

.input::placeholder,
.textarea::placeholder {
    color: #a8b6c7;
}

.textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.7;
}

.select {
    appearance: none;
    padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%237b8ca3' d='M1.4 0 7 5.6 12.6 0 14 1.4 7 8.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

html[dir="rtl"] .select {
    background-position: left 15px center;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--danger);
}

.field-error {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 3px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 17px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    border-inline-start: 4px solid;
}

.alert i {
    font-size: 19px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: #e9f7f0;
    border-color: var(--success);
    color: #0b6b3d;
}

.alert-danger {
    background: #fdeded;
    border-color: var(--danger);
    color: #93211f;
}

.alert-warning {
    background: #fdf5e7;
    border-color: var(--warning);
    color: #8a5a04;
}

.alert-info {
    background: #eaf3fc;
    border-color: var(--info);
    color: #1a548f;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: var(--navy-50);
    color: var(--navy);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 13px 16px;
    text-align: start;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    color: var(--body);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--navy-50);
}

.table .actions {
    display: flex;
    gap: 7px;
}

.empty-state {
    text-align: center;
    padding: 62px 24px;
    color: var(--muted);
}

.empty-state i {
    font-size: 52px;
    color: #cbd7e5;
    margin-bottom: 14px;
    display: block;
}

.empty-state h4 {
    color: var(--body);
    margin-bottom: 7px;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 38px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--body);
    background: #fff;
}

.pagination a:hover {
    border-color: var(--navy);
    color: var(--navy);
}

.pagination .active span {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.pagination .disabled span {
    opacity: .4;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-start {
    text-align: start;
}

.text-muted {
    color: var(--muted);
}

.text-gold {
    color: var(--gold-dark);
}

.text-navy {
    color: var(--navy);
}

.fw-700 {
    font-weight: 700;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 34px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 34px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.flex-wrap {
    flex-wrap: wrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose {
    color: var(--body);
    line-height: 1.85;
}

.prose p {
    margin-bottom: 17px;
}

.prose h2 {
    font-size: 25px;
    margin: 34px 0 15px;
}

.prose h3 {
    font-size: 20px;
    margin: 28px 0 12px;
}

.prose ul {
    list-style: none;
    margin: 0 0 17px;
}

.prose ul li {
    position: relative;
    padding-inline-start: 27px;
    margin-bottom: 10px;
}

.prose ul li::before {
    content: '\ea6c';
    font-family: 'remixicon';
    position: absolute;
    inset-inline-start: 0;
    color: var(--gold-dark);
    font-size: 17px;
    line-height: 1.6;
}

.prose strong {
    color: var(--ink);
    font-weight: 700;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 64px 0;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 15px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-auto {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 52px 0;
    }

    .section-head {
        margin-bottom: 36px;
    }

    .page-banner {
        min-height: 260px;
        padding: 72px 0 56px;
    }

    .card-body {
        padding: 21px;
    }

    .btn {
        padding: 12px 22px;
    }

    .container {
        padding-inline: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {

    .site-header,
    .site-footer,
    .page-banner,
    .no-print {
        display: none !important;
    }

    body {
        color: #000;
    }
}

/* Fallback cover: a branded gradient carrying the subject's own icon, so a
   card without uploaded photography still reads as designed rather than empty.
   --tilt varies per subject to stop a grid of fallbacks looking flat. */
.card-media-fallback {
    background: linear-gradient(var(--tilt, 135deg), var(--navy) 0%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

.card-media-fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M20 18v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/svg%3E");
}

.card-media-fallback i {
    position: relative;
    z-index: 2;
}

.card-media-badge {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 3;
    background: rgba(255, 255, 255, .94);
    color: var(--navy);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .02em;
    padding: 5px 11px;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
}