/* ==========================================================================
   local_custompages – Plugin stylesheet
   ========================================================================== */

/* ── Landing page ── */

.custompages-landing {
    margin: 0;
    padding: 0;
}

/* Hero */
.custompages-hero {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.custompages-hero--image {
    background-size: cover;
    background-position: center;
}

.custompages-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.custompages-hero__content {
    position: relative;
    z-index: 1;
    padding: 4rem 1rem;
    text-align: center;
}

.custompages-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.custompages-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.custompages-hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Custom HTML content block */
.custompages-custom-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Course catalogue */
.custompages-catalogue__heading {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Course cards */
.custompages-course-card {
    transition: transform .2s ease, box-shadow .2s ease;
    border-radius: .5rem;
    overflow: hidden;
}

.custompages-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,.15) !important;
}

.custompages-course-card__img-wrap {
    height: 180px;
    overflow: hidden;
}

.custompages-course-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.custompages-course-card:hover .custompages-course-card__img-wrap img {
    transform: scale(1.04);
}

.custompages-course-card__summary {
    /* Clamp summary to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CTA button */
.custompages-cta {
    letter-spacing: .05em;
    padding: .75rem 2rem;
}

/* ==========================================================================
   Enrolment description block
   ========================================================================== */

.custompages-enrol-description {
    border-left: 4px solid #0f6cbf;
    border-radius: .5rem;
}

.custompages-enrol-description__title {
    font-size: 1.5rem;
    font-weight: 700;
}

.custompages-enrol-description__body {
    font-size: 1rem;
    line-height: 1.7;
}

/* Instructor block */
.custompages-instructor img {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    object-fit: cover;
}

/* Outcomes checklist */
.custompages-outcomes__heading {
    color: #343a40;
}

.custompages-outcomes__list li {
    font-size: .95rem;
}

/* Enrol box spacing */
.custompages-enrolbox {
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   Dark-mode overrides
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    .custompages-enrol-description {
        border-left-color: #4fa3e3;
        background: #1e1e2e;
        color: #e0e0e0;
    }

    .custompages-enrol-description__title,
    .custompages-outcomes__heading {
        color: #e0e0e0;
    }

    .custompages-course-card {
        background: #1e1e2e;
        color: #e0e0e0;
    }
}
