/* ==========================================================================
   Hire Minds Academy — Course details page
   Markup: resources/views/frontend/course-details.blade.php

   Page-only file: loaded on /course/{slug} and nowhere else, so #main-content
   can be reshaped directly here (no :has() gate needed, unlike courses.css or
   testimonials.css, which are shared with the home page).

   The course cards, FAQ and contact form are reused components and are NOT
   styled here — they come from courses.css, faq.css and contact-form.css.
   ========================================================================== */

/* The shared layout centres #main-content with flex and caps its height; this
   page needs the full canvas, exactly like every other inner page. */
#main-content {
    position: relative;
    display: block;
    min-height: auto;
    padding: 0;
    text-align: left;
    background: #FFFDFB;
}

/* Page-wide aurora — the identical block the rest of the site uses. Fixed, so
   it never boxes a section. */
#main-content::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 30%, rgba(150, 120, 255, .30), transparent 26%),
        radial-gradient(circle at 70% 50%, rgba(255, 205, 95, .30), transparent 26%),
        radial-gradient(circle at 50% 70%, rgba(255, 150, 195, .30), transparent 26%),
        radial-gradient(circle at 30% 50%, rgba(120, 178, 255, .30), transparent 26%);
    filter: blur(64px);
    opacity: .55;
    animation: hm-spin 55s linear infinite;
}

@keyframes hm-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================== PAGE SHELL ============================== */
.hm-cd {
    position: relative;
    z-index: 1;                 /* above the aurora */
    background: transparent;
    /* 70px of breathing room as specced, offset clear of the floating navbar
       (top: 22px + ~72px tall = 94px) — a bare 70px would tuck the breadcrumb
       underneath it. */
    padding-top: calc(94px + 70px);
}

/* Pin the container to 1320px, overriding the global .container (style.css caps
   it at 1140). The horizontal padding is a real side gutter — not just the
   max-width centring — so content never hugs the screen edge when the viewport
   is at or below 1320 (a 1920 monitor at 150% Windows scaling renders ~1280 CSS
   px, where a bare max-width would leave no margin at all). */
.hm-cd .container,
.hm-contact .container,
.hm-faq__container {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: clamp(20px, 3.5vw, 48px);
}

/* ============================== BREADCRUMB ============================== */
.hm-cd__crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #6B7280;
}

.hm-cd__crumbs a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

.hm-cd__crumbs a:hover,
.hm-cd__crumbs a:focus-visible { color: #843D21; }

.hm-cd__crumb-sep { opacity: .6; }

.hm-cd__crumbs li[aria-current="page"] { color: #23180F; font-weight: 600; }

/* ================================= HERO ================================= */
.hm-cd-hero {
    align-items: center;
    --bs-gutter-x: 40px;
    --bs-gutter-y: 32px;
}

.hm-cd-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #843D21;
}

/* Same pulsing gradient square as the site's other section labels */
.hm-cd-hero__label-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--hm-yellow, #F7B500), var(--hm-gold-dark, #C6851A));
}

.hm-cd-hero__title {
    margin: 0 0 14px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    color: #17161A;
}

.hm-cd-hero__desc {
    max-width: 520px;
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.8;
    color: #555555;
}

/* ---- Meta row ---- */
.hm-cd-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.hm-cd-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #4B4B53;
}

.hm-cd-hero__meta-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: .75;
}

/* ---- Buttons ---- */
.hm-cd-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.hm-cd-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    cursor: pointer;
    transition:
        transform .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1)),
        box-shadow .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1)),
        background .3s ease,
        color .3s ease;
}

.hm-cd-btn:hover,
.hm-cd-btn:focus-visible { transform: translateY(-2px); }

/* Brochure button on a course that has no PDF uploaded yet: it keeps its place in
   the pair so the hero layout is unchanged, but reads as unavailable and does not
   respond to hover or clicks. */
.hm-cd-btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}
.hm-cd-btn.is-disabled:hover,
.hm-cd-btn.is-disabled:focus-visible { transform: none; }

/* Centres the "Enquire Now" button under the highlights. */
.hm-cd-enquire {
    display: flex;
    justify-content: center;
    margin: 12px 0 44px;
}

.hm-cd-btn--primary {
    color: #FFFFFF;
    background: #843D21;
    border: 1px solid #843D21;
    box-shadow: 0 10px 24px rgba(132, 61, 33, .28);
}

.hm-cd-btn--primary:hover,
.hm-cd-btn--primary:focus-visible {
    color: #FFFFFF;
    box-shadow: 0 16px 32px rgba(132, 61, 33, .36);
}

/* White circular chip around the arrow, as designed */
.hm-cd-btn--primary i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 10px;
    color: #843D21;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform .3s var(--hm-ease, cubic-bezier(.22, .7, .2, 1));
}

.hm-cd-btn--primary:hover i { transform: translateX(6px); }

.hm-cd-btn--ghost {
    color: #843D21;
    background: #FFFFFF;
    border: 1px solid #843D21;
}

.hm-cd-btn--ghost:hover,
.hm-cd-btn--ghost:focus-visible {
    color: #843D21;
    box-shadow: 0 12px 26px rgba(132, 61, 33, .16);
}

.hm-cd-btn--ghost i { font-size: 12px; transition: transform .3s ease; }
.hm-cd-btn--ghost:hover i { transform: translateY(2px); }

/* ---- Hero banner ----
   The orange composition, its icon tile, the pills and the figure are all baked
   into the one image, so this is a plain rounded frame around it. */
.hm-cd-hero__figure {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;           /* clips the hover zoom */
}

.hm-cd-hero__figure img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform .5s var(--hm-ease, cubic-bezier(.22, .7, .2, 1));
}

.hm-cd-hero__figure:hover img { transform: scale(1.02); }

/* ============================== FEATURES ==============================
   Five equal cards on one row — flex rather than the grid, since a 5-across
   row has no Bootstrap column that divides evenly into 12.                  */
.hm-cd-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.hm-cd-feat {
    flex: 1 1 180px;            /* equal widths, wrapping before they get cramped */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #F0F0F2;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(42, 29, 20, .05);
    transition:
        transform .4s cubic-bezier(.22, .61, .36, 1),
        box-shadow .4s cubic-bezier(.22, .61, .36, 1);
}

.hm-cd-feat:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(42, 29, 20, .12);
}

/* Colour comes from --tint on the modifier, so the tile and its glyph stay in
   step without a rule per card. */
.hm-cd-feat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    font-size: 14px;
    color: #FFFFFF;
    background: var(--tint);
    border-radius: 9px;
}

/* Shared by the "at a glance" chips and the highlight cards — both draw an
   icons-details glyph on a saturated --tint tile.
   The icons ship white, so the filter is a no-op on them; it is kept because it
   flattens ANY source colour to white, so swapping in a dark line-art icon later
   still reads on the tile instead of disappearing into it. */
.hm-cd-feat__icon img,
.hm-cd-hl__icon img {
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.hm-cd-feat--pink   { --tint: #F0508C; }
.hm-cd-feat--blue   { --tint: #2C7BE5; }
.hm-cd-feat--red    { --tint: #F4623A; }
.hm-cd-feat--green  { --tint: #22A15A; }
.hm-cd-feat--gold   { --tint: #B8860B; }

.hm-cd-feat__title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #17161A;
}

.hm-cd-feat__sub {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: #8A8A93;
}

/* ============================ SECTION BASICS ============================ */
.hm-cd-sec { margin-top: 56px; }

.hm-cd-sec__title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #17161A;
}

.hm-cd-sec__desc {
    max-width: 900px;
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.9;
    color: #555555;
}

.hm-cd-sec__desc--about { max-width: 100%; }

/* ============================== AUDIENCE ==============================
   "Who This Course Is For" — a body section in the page's own rhythm, sat
   under About the Course. Chips rather than a paragraph so a short list scans
   at a glance, in the page's terracotta on a warm cream fill (the family the
   hero label and the Enroll button already use). */
.hm-cd-aud__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-cd-aud__chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: #7A3A1E;
    background: linear-gradient(135deg, #FFF4EA, #FFE7D9);
    border: 1px solid rgba(132, 61, 33, .16);
    border-radius: 999px;
}

/* ============================== HIGHLIGHTS ==============================
   Built here rather than reusing home's .hm-cat: that card carries a course
   count and a 56px badge image this one does not have, and its CSS lives in
   home.css — which this page cannot load. Same pastel tone palette, so the two
   still read as one family. */
.hm-cd-hls {
    --bs-gutter-x: 20px;
    --bs-gutter-y: 20px;
}

.hm-cd-hl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 100%;
    padding: 16px 18px;
    background: var(--tint-bg);
    border-radius: 14px;
    transition:
        transform .4s cubic-bezier(.22, .61, .36, 1),
        box-shadow .4s cubic-bezier(.22, .61, .36, 1);
}

.hm-cd-hl:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 18px 38px rgba(42, 29, 20, .12);
}

.hm-cd-hl__title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #17161A;
}

.hm-cd-hl__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    font-size: 14px;
    color: #FFFFFF;
    background: var(--tint);
    border-radius: 9px;
}

/* Pastel card + saturated tile, one pair per tone. */
.hm-cd-hl--red    { --tint-bg: #FEF0EE; --tint: #F4623A; }
.hm-cd-hl--purple { --tint-bg: #F3EFFC; --tint: #7B5CD6; }
.hm-cd-hl--teal   { --tint-bg: #E9F8F4; --tint: #17A98C; }
.hm-cd-hl--pink   { --tint-bg: #FDEFF5; --tint: #E0489B; }
.hm-cd-hl--blue   { --tint-bg: #EAF3FD; --tint: #2C7BE5; }
.hm-cd-hl--gold   { --tint-bg: #FDF6E3; --tint: #D19A16; }
.hm-cd-hl--peach  { --tint-bg: #FEF1EA; --tint: #E8703A; }
.hm-cd-hl--green  { --tint-bg: #EBF8F0; --tint: #22A15A; }

/* ================================ SKILLS ================================ */
.hm-cd-skills {
    --bs-gutter-x: 28px;
    --bs-gutter-y: 20px;
}

.hm-cd-skill {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    height: 100%;
    padding: 16px 18px;
    background: #FFFFFF;
    border-radius: 14px;
    /* The left edge is a transparent border that colours on hover — animating a
       colour, not a width, so nothing reflows. */
    border-left: 3px solid transparent;
    box-shadow: 0 8px 24px rgba(42, 29, 20, .05);
    transition:
        transform .4s cubic-bezier(.22, .61, .36, 1),
        box-shadow .4s cubic-bezier(.22, .61, .36, 1),
        border-left-color .3s ease;
}

.hm-cd-skill:hover {
    transform: translateY(-4px);
    border-left-color: var(--hm-gold, #E9A320);
    box-shadow: 0 18px 38px rgba(42, 29, 20, .10);
}

.hm-cd-skill__num {
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    color: #F2C94C;
}

.hm-cd-skill__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #17161A;
}

.hm-cd-skill__desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: #6B7280;
}

/* ========================= REUSED SECTION FITS =========================
   On the home page the FAQ and the contact section each open a chapter with
   ~100px of lead-in and their own rotating backdrop. Here they stack at the end
   of a page whose aurora is already behind them, so trim the lead-in and drop
   the local backdrop. course-details.css loads after faq.css / contact-form.css,
   so these win.                                                              */
.hm-cd-related { margin-top: 56px; }

.hm-faq { padding: 56px 0 0; }

.hm-contact {
    padding: 56px 0 100px;
    overflow: visible;
}

.hm-contact__bg { display: none; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1199.98px) {
    .hm-cd-hero__title { font-size: 30px; }
    /* Five across gets cramped before the tablet break — go two rows early. */
    .hm-cd-feat { flex-basis: 30%; }
}

@media (max-width: 991.98px) {
    .hm-cd { padding-top: calc(94px + 48px); }
    .hm-cd-feat { flex-basis: 45%; }
    .hm-cd-sec { margin-top: 44px; }
}

@media (max-width: 767.98px) {
    .hm-cd { padding-top: calc(94px + 36px); }
    .hm-cd-hero__title { font-size: 24px; }
    .hm-cd-aud__chip { padding: 7px 14px; font-size: 12.5px; }
    .hm-cd-sec__title { font-size: 21px; }

    .hm-cd-feat { flex-basis: 100%; }

    /* Buttons go full width, as designed. */
    .hm-cd-hero__actions { flex-direction: column; align-items: stretch; }
    .hm-cd-btn { justify-content: center; }
}

/* Phones — Course Highlight and Continue Your Learning both run two per row
   (col-6 in the markup). The course card's own compact rules come from
   courses.css, which this page also loads; the highlight card is sized here. */
@media (max-width: 575.98px) {
    .hm-cd-hls,
    .hm-cd-related .hm-crs-grid {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }

    /* Title beside a 34px icon does not fit at ~46vw, so the card stacks:
       icon on top, title beneath. */
    .hm-cd-hl {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        padding: 14px;
        border-radius: 12px;
    }

    .hm-cd-hl__icon {
        order: -1;             /* icon first once stacked */
        width: 30px;
        height: 30px;
        font-size: 12.5px;
    }

    /* Glyph tracks the smaller tile on phones. */
    .hm-cd-feat__icon img,
    .hm-cd-hl__icon img { width: 15px; height: 15px; }

    .hm-cd-hl__title { font-size: clamp(11.5px, 3.4vw, 13.5px); }
}

/* Reduced motion — hold the aurora and every travel, keep the states. */
@media (prefers-reduced-motion: reduce) {
    #main-content::before { animation: none; }

    .hm-cd-hero__figure img,
    .hm-cd-btn,
    .hm-cd-feat,
    .hm-cd-hl,
    .hm-cd-skill { transition: none; }

    .hm-cd-hero__figure:hover img,
    .hm-cd-btn:hover,
    .hm-cd-feat:hover,
    .hm-cd-hl:hover,
    .hm-cd-skill:hover { transform: none; }
}

/* The enquire modal's styles moved to enquiry-modal.css — it is shared with the
   home page's Upcoming Course Schedules section and the /schedules page, and
   every page that renders the modal loads that file alongside this one. */

/* ==========================================================================
   UPCOMING BATCHES

   Markup: the .hm-cd-batches section in course-details.blade.php, fed by that
   course's rows in Admin → Courses → Create/Edit Course → Course Schedule.

   It renders the same table as the home page's schedules section in its
   compact five-column form, so the look lives in schedules.css (loaded by this
   page) and only the section's own spacing belongs here.
   ========================================================================== */

.hm-cd-batches .hm-sched__panel {
    margin-top: 4px;
}
