/* Clean, image-led cards with shared borders and spacing across the homepage. */
.portal-home .pop-cour { background: #f5f7f9; }
.portal-home .com-sp { padding-top: 56px; padding-bottom: 48px; }
.portal-home .con-title { padding-bottom: 26px; margin-bottom: 0; }
.portal-home .con-title h2 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
.portal-home .con-title p { font-size: 15px; line-height: 1.65; max-width: 720px; margin: 0 auto; }
.portal-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }
.portal-discipline-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.portal-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #dce2e7; border-radius: 4px; background: #fff; color: #17344b; overflow: hidden; text-decoration: none; transition: border-color .15s ease; }
.portal-card:hover { color: #17344b; border-color: #8c9eac; text-decoration: none; }
.portal-card:focus-visible { outline: 3px solid #ca562b; outline-offset: 3px; }
.portal-card > img { display: block; width: 100%; height: 156px; object-fit: cover; border-bottom: 1px solid #e8ecef; }
.portal-destination-card__media { position: relative; display: block; height: 156px; overflow: hidden; border-bottom: 1px solid #e8ecef; background: #dfe7ec; }
.portal-destination-card__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(17,52,75,.03),rgba(17,52,75,.2)); }
.portal-destination-card__media > img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(.96) brightness(.92); transition: transform .25s ease, filter .25s ease; }
.portal-destination-grid .portal-card:hover .portal-destination-card__media > img { transform: scale(1.025); filter: saturate(.88) contrast(.98) brightness(.95); }
.portal-card__body { padding: 18px; display: flex; flex: 1; flex-direction: column; min-width: 0; }
.portal-card__body h3 { color: #17344b; font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0 0 10px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portal-card__body p { color: #677682; font-size: 12px; line-height: 1.5; margin: auto 0 0; overflow-wrap: anywhere; }
.portal-card__body p span { float: right; padding-left: 8px; color: #b74a24; font-size: 17px; line-height: 1.2; }
.portal-home .cta-buttons { text-align: center; margin-top: 26px; }
.portal-home .cta-buttons .cta-btn { border: 1px solid #cad3db; background: #fff; color: #17344b; box-shadow: none; border-radius: 3px; font-size: 14px; margin-bottom: 0; }
.portal-home .cta-buttons .cta-btn:hover { border-color: #17344b; background: #f5f7f9; }
.portal-home .cta-buttons .cta-btn i { display: none; }
.portal-home .portal-programme-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; width: auto; margin: 0 12px; padding: 0; }
.portal-home .portal-programme-grid .cours { display: flex; flex-direction: column; min-width: 0; width: auto; padding: 0 16px 18px; border: 1px solid #dce2e7; border-radius: 4px; box-shadow: none; overflow: hidden; }
.portal-home .portal-programme-grid .cours:hover { border-color: #8c9eac; box-shadow: none; }
.portal-home .portal-programme-grid .cours-cover { position: relative; height: 150px; margin: 0 -16px 18px; overflow: hidden; background: #f3f6f8; }
.portal-home .portal-programme-grid .cours-cover > img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 0; }
.portal-home .portal-programme-grid .cours-cover > img.cours-cover--logo { object-fit: contain; padding: 24px; background: #f3f6f8; }
.portal-home .portal-programme-grid .cours-cover__mark { display: flex; align-items: center; justify-content: center; height: 100%; color: #17344b; font-size: 42px; font-weight: 700; }
.portal-home .portal-programme-grid .cours-logo { position: absolute; left: 12px; bottom: 12px; box-sizing: border-box; width: 56px; height: 56px; border-radius: 4px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.22); overflow: hidden; }
.portal-home .portal-programme-grid .cours-logo img { position: absolute; left: 5px; top: 5px; width: calc(100% - 10px); height: calc(100% - 10px); max-width: none; object-fit: contain; }
.portal-home .portal-programme-grid h5 { color: #17344b; font-size: 17px; line-height: 1.35; padding: 0; margin: 0 0 12px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portal-home .portal-programme-grid .tags { margin-bottom: 12px; }
.portal-home .portal-programme-grid .tags span { background: #f1f4f6; border-radius: 2px; color: #526473; overflow-wrap: anywhere; }
.portal-home .portal-programme-grid .price { margin-top: auto; padding-top: 16px; border-top: 1px solid #edf0f2; font-size: 20px; color: #17344b; }
.portal-home .portal-programme-grid .price .original-price { color: #677682; text-decoration: none; font-size: 12px; }
.portal-home .portal-programme-grid .rating { margin-bottom: 12px; }
.portal-home .portal-programme-grid .cours:focus-within { outline: 3px solid #ca562b; outline-offset: 3px; }
.portal-home .home-cour-tab { margin-bottom: 0; }
@media(max-width: 1100px) {
    .portal-card-grid, .portal-home .portal-programme-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
}
@media(max-width: 1100px) and (min-width: 801px) {
    .portal-home .portal-destination-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
}
@media(max-width: 800px) {
    .portal-card-grid, .portal-home .portal-programme-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
    .portal-card__body { padding: 16px; }
}
@media(max-width: 600px) {
    .portal-home .com-sp { padding: 36px 20px; }
    .portal-home .con-title { padding-left: 15px; padding-right: 15px; padding-bottom: 24px; }
    .portal-home .con-title h2 { font-size: 25px; }
    .portal-home .con-title p { font-size: 14px; }
    .portal-card-grid, .portal-home .portal-programme-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
    .portal-discipline-grid .portal-card { display: grid; grid-template-columns: 88px minmax(0,1fr); }
    .portal-discipline-grid .portal-card > img { height: 100%; min-height: 98px; border-bottom: 0; border-right: 1px solid #e8ecef; }
    .portal-discipline-grid .portal-card__body { padding: 14px; }
    .portal-card__body h3 { font-size: 16px; margin-bottom: 6px; }
    .portal-destination-card__media { height: 170px; }
    .portal-home .portal-programme-grid .cours-cover,
    .portal-home .portal-programme-grid .cours-cover > img { height: 180px; }
}
@media(prefers-reduced-motion:reduce) { .portal-card, .portal-destination-card__media > img { transition: none; } }
.portal-university-card__media { position: relative; display: block; height: 156px; overflow: hidden; background: #eaf0f4; }
.portal-university-card__media > img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.portal-university-card:hover .portal-university-card__media > img { transform: scale(1.025); }
.portal-university-card__media > span { position: absolute; left: 14px; bottom: 14px; display: grid; place-items: center; width: 52px; height: 52px; padding: 6px; border-radius: 4px; background: #fff; box-shadow: 0 5px 16px rgba(17,42,61,.2); }
.portal-university-card__media > span img { display: block; width: 100%; height: 100%; object-fit: contain; }
.portal-university-card .portal-card__body { border-top: 1px solid #edf0f2; }
.portal-tool .portal-card__body { min-height: 168px; padding: 22px 20px 18px; }
.portal-tool__step { display: block; margin: 0 0 14px; color: #f26838; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }

/* The five-step journey repeats the stages the student dashboard tracks, so a
   signed-in student recognises the same path here and can jump back into it.
   Kept flat and square to match the rest of the home page (no shadows/gradients). */
.portal-next { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px 22px; margin-bottom: 24px; padding: 20px 22px; border: 1px solid #dce2e7; border-radius: 4px; background: #fff; }
.portal-next__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 4px; background: #17344b; color: #fff; font-size: 19px; }
.portal-next.is-complete .portal-next__icon { background: #2f8a5b; }
.portal-next__label { display: block; margin-bottom: 5px; color: #f26838; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.portal-next__body h3 { margin: 0 0 4px; color: #17344b; font-size: 19px; font-weight: 600; }
.portal-next__body p { margin: 0 0 12px; color: #677682; font-size: 13px; line-height: 1.55; }
.portal-next__bar { overflow: hidden; height: 6px; border-radius: 99px; background: #eef2f5; }
.portal-next__bar i { display: block; height: 100%; border-radius: 99px; background: #f26838; transition: width .4s ease; }
.portal-next.is-complete .portal-next__bar i { background: #2f8a5b; }
.portal-next__cta { display: inline-flex; align-items: center; gap: 8px; align-self: center; white-space: nowrap; min-height: 44px; padding: 0 20px; border: 1px solid #f26838; border-radius: 3px; background: #f26838; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.portal-next__cta:hover { border-color: #ca562b; background: #ca562b; color: #fff; text-decoration: none; }

/* A personalised preview of the workspace: one promise, then four clear jobs. */
.portal-journey { background: rgb(245, 247, 249) !important; }
.portal-journey__intro { display: flex; flex-direction: column; align-items: center; max-width: 840px; margin: 0 auto 28px; padding-bottom: 0; text-align: center; }
.portal-journey__intro h2 { margin: 0 0 12px; color: #17344b; font-size: 30px; font-weight: 700; line-height: 1.25; }
.portal-journey__intro h2 span { color: #f26838; }
.portal-journey__intro p { max-width: 720px; margin: 0; color: #677682; font-size: 15px; line-height: 1.65; }
.portal-journey__actions { margin-top: 28px !important; }
.portal-journey__steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.portal-journey__step { position: relative; min-width: 0; }
.portal-journey__card { display: flex; flex-direction: column; height: 100%; padding: 20px 18px 18px; border: 1px solid #dce2e7; border-top: 3px solid #17344b; border-radius: 4px; background: #fff; color: #17344b; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.portal-journey__card:hover { border-color: #8c9eac; border-top-color: #f26838; color: #17344b; text-decoration: none; transform: translateY(-2px); }
.portal-journey__card:focus-visible { outline: 3px solid #ca562b; outline-offset: 3px; }
.portal-journey__node { position: relative; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 4px; background: #f1f4f6; color: #17344b; font-size: 18px; }
.portal-journey__number { position: absolute; top: 20px; right: 18px; color: #8b9ba7; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.portal-journey__step.is-done .portal-journey__node { background: #f26838; color: #fff; }
.portal-journey__count { display: block; margin-bottom: 6px; color: #90a0ad; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.portal-journey__step.is-done .portal-journey__count { color: #2f8a5b; }
.portal-journey__step.is-progress .portal-journey__node { background: #fff3ed; color: #b9562f; }
.portal-journey__step.is-progress .portal-journey__count { color: #b9562f; }
.portal-journey__card h3 { margin: 0 0 8px; color: #17344b; font-size: 18px; font-weight: 700; line-height: 1.35; }
.portal-journey__card p { margin: 0 0 14px; color: #677682; font-size: 13px; line-height: 1.5; }
.portal-journey__tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.portal-journey__tool { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 3px; background: #f1f4f6; color: #526473; font-size: 11px; font-weight: 700; }
.portal-journey__tool i { color: #f26838; font-size: 10px; }
.portal-journey__go { margin-top: auto; color: #17344b; font-size: 13px; font-weight: 700; }
.portal-journey__card:hover .portal-journey__go { color: #ca562b; }

@media(max-width: 1100px) {
    .portal-journey__steps { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
}
@media(max-width: 760px) {
    .portal-next { grid-template-columns: auto minmax(0,1fr); }
    .portal-next__cta { grid-column: 1 / -1; justify-content: center; }
    .portal-journey__steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width: 540px) {
    .portal-journey__steps { grid-template-columns: minmax(0,1fr); }
    .portal-next { padding: 16px; }
    .portal-next__icon { width: 44px; height: 44px; font-size: 17px; }
    .portal-journey__intro h2 { font-size: 25px; }
}
@media(prefers-reduced-motion:reduce) { .portal-journey__card, .portal-next__bar i, .portal-university-card__media > img { transition: none; }
    .portal-journey__card:hover { transform: none; }
}
