/*
|--------------------------------------------------------------------------
| EPT Online — Public Course Catalogue
|--------------------------------------------------------------------------
*/

:root {
    --white: #ffffff;
    --sky: #0f8fff;
    --blue: #1d438e;
    --navy: #0b1f3f;
    --text: #142033;
    --muted: #53657a;
    --background: #f3f7fc;
    --border: #dde6f1;
}

/*
|--------------------------------------------------------------------------
| Base
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}

h1,
h2 {
    color: var(--navy);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -1.5px;
    margin: 18px 0;
}

h2 {
    font-size: 28px;
    margin: 12px 0 18px;
}

p {
    color: var(--muted);
}

:focus-visible {
    outline: 3px solid var(--sky);
    outline-offset: 4px;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    font-weight: 700;
}

.brand img {
    width: 120px;
    height: auto;
    display: block;
}

.brand span {
    border-left: 1px solid var(--border);
    padding-left: 18px;
    color: var(--muted);
}

nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

nav a:not(.btn):hover {
    color: var(--blue);
}

/*
|--------------------------------------------------------------------------
| Main layout
|--------------------------------------------------------------------------
*/

main {
    max-width: 1200px;
    margin: auto;
    padding: 30px 24px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--blue);
}

/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: var(--white);
    padding: 13px 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.5;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #12366f;
}

.btn.white {
    background: var(--white);
    color: var(--blue);
}

.btn.white:hover {
    background: #eaf3ff;
}

.secondary {
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
}

.full {
    width: 100%;
}

/*
|--------------------------------------------------------------------------
| Catalogue hero
|--------------------------------------------------------------------------
*/

.hero {
    padding: 56px;
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 95% 15%,
            #157be9 0,
            transparent 50%
        ),
        linear-gradient(
            130deg,
            var(--navy),
            var(--blue)
        );
    color: var(--white);
}

.hero h1,
.hero p {
    color: var(--white);
}

.hero p {
    max-width: 630px;
    font-size: 18px;
    opacity: 0.9;
}

.hero .eyebrow {
    color: #b9dbff;
}

.hero-with-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
}

.hero-copy {
    min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Banner learning panel
|--------------------------------------------------------------------------
*/

.hero-learning {
    padding: 28px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
    min-width: 0;
}

.learning-label {
    display: block;
    color: #d5e9ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.hero-learning h2 {
    color: var(--white);
    font-size: 28px;
    margin: 12px 0;
}

.hero-learning > p {
    font-size: 14px;
    margin-bottom: 24px;
}

.learning-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.learning-number {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.learning-item strong {
    display: block;
    color: var(--white);
    font-size: 15px;
    margin-bottom: 3px;
}

.learning-item div > span {
    display: block;
    color: #e0edff;
    font-size: 13px;
    line-height: 1.5;
}

/*
|--------------------------------------------------------------------------
| Enrolment steps
|--------------------------------------------------------------------------
*/

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 28px 4px 38px;
}

.steps b {
    color: var(--blue);
}

.steps p {
    margin: 7px 0;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Search and filters
|--------------------------------------------------------------------------
*/

.filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 18px;
    flex-wrap: wrap;
}

.filters div:first-child {
    flex: 1;
    min-width: 220px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

input,
select {
    font: inherit;
    border: 1px solid #b9c8da;
    border-radius: 10px;
    padding: 11px;
    width: 100%;
    background: var(--white);
    color: var(--text);
}

.result-count {
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Course cards
|--------------------------------------------------------------------------
*/

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.course-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(11, 31, 63, 0.04);
}

.course-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(
        135deg,
        var(--blue),
        var(--sky)
    );
    position: relative;
    color: var(--white);
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--white);
    color: var(--blue);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 30px;
}

.course-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.course-content h2 {
    font-size: 22px;
    margin: 10px 0;
}

.course-content h2 a {
    text-decoration: none;
}

.course-content h2 a:hover {
    color: var(--blue);
}

.course-content small {
    color: var(--blue);
    font-weight: 700;
}

.course-content p {
    font-size: 14px;
    margin: 0 0 22px;
    overflow-wrap: anywhere;
}

.course-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.price {
    color: var(--blue);
    font-size: 20px;
}

.catalogue-price-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 18px;
}

.catalogue-price-actions .price {
    display: block;
    font-size: 22px;
    overflow-wrap: anywhere;
}

/*
|--------------------------------------------------------------------------
| Panels and callout
|--------------------------------------------------------------------------
*/

.panel {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    min-width: 0;
}

.callout {
    margin-top: 36px;
}

/*
|--------------------------------------------------------------------------
| Course details
|--------------------------------------------------------------------------
*/

.back {
    display: inline-block;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 20px;
}

.back:hover {
    text-decoration: underline;
}

.detail-head {
    max-width: 900px;
    margin-bottom: 30px;
}

.detail-head p {
    font-size: 18px;
    overflow-wrap: anywhere;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.detail-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    margin-bottom: 20px;
}

.description-text {
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.enrol {
    position: sticky;
    top: 24px;
}

.enrol h2 {
    font-size: 30px;
}

.enrol p {
    font-size: 14px;
}

dl {
    margin: 22px 0;
}

dl div {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

dt {
    font-size: 12px;
    color: #64748b;
}

dd {
    margin: 0;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

footer {
    text-align: center;
    padding: 28px 24px;
    color: #64748b;
    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 1000px) {
    .course-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-inner {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .hero-with-panel {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 720px) {
    main {
        padding: 20px 16px;
    }

    .header-inner {
        padding: 18px 16px;
    }

    .brand span {
        display: none;
    }

    nav {
        gap: 14px;
    }

    .hero {
        padding: 30px 24px;
    }

    .hero-learning {
        padding: 22px;
    }

    .steps,
    .course-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        gap: 8px;
        padding: 24px 4px;
    }

    .panel {
        padding: 24px;
    }

    .enrol {
        position: static;
    }

    .filters {
        align-items: stretch;
    }

    .filters > div {
        width: 100%;
    }

    .filters div:first-child {
        min-width: 0;
    }

    h1 {
        letter-spacing: -0.8px;
    }
}

.hero + #catalogue {
    margin-top: 36px;
}

/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}