/* =====================================================================
   PE Group of Institutions: HOME PAGE ONLY styles
   Loaded only by home.blade.php (through @push('styles')).
   Reuses the colour tokens from pe-header.css, with fallbacks.
   ===================================================================== */

/* ---------- Space between home sections: change this one value ----------
   Every section gets this much space above and below it, so the gap
   between two sections is about double this number. */
:root { --pe-section-space: clamp(16px, 2vw, 32px); }

.pe-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* =====================================================================
   Our Programmes carousel
   ===================================================================== */
.pe-courses {
    --pc-forest: var(--pe-forest, #17392c);
    --pc-sage: var(--pe-sage, #7c8c6b);
    --pc-sage-100: var(--pe-sage-100, #e5ebe0);
    --pc-mustard: var(--pe-mustard, #d9a036);
    --pc-ink: var(--pe-ink, #1c2521);
    --pc-muted: var(--pe-muted, #5b675f);
    --pc-line: #dfe4dd;
    --pc-card: #f6f7f4;
    --pc-gap: 24px;

    /* top stays a bit larger: it clears the quick-links strip under the banner */
    padding-block: clamp(32px, 4vw, 48px) var(--pe-section-space);
    color: var(--pc-ink);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.pe-courses *,
.pe-courses *::before,
.pe-courses *::after { box-sizing: border-box; }
.pe-courses :focus-visible {
    outline: 2px solid var(--pc-forest);
    outline-offset: 3px;
}

/* ---------- Heading ---------- */
.pe-courses__head {
    max-width: 44rem;
    margin-bottom: 24px;
}
.pe-courses__title {
    margin: 0 0 8px;
    color: var(--pc-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
    font-weight: 400;
    line-height: 1.12;
}
.pe-courses__sub {
    margin: 0;
    color: var(--pc-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* ---------- Tabs + arrows ---------- */
.pe-courses__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.pe-courses__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pe-courses__tab {
    min-height: 50px;
    padding: 0 26px;
    border: 1.5px solid var(--pc-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pc-ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.pe-courses__tab:hover { border-color: var(--pc-sage); }
.pe-courses__tab.is-active {
    border-color: var(--pc-forest);
    background: var(--pc-forest);
    color: #fff;
}
.pe-courses__arrows {
    display: flex;
    flex: none;
    gap: 10px;
}
.pe-courses__arrow {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1.5px solid var(--pc-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pc-forest);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.pe-courses__arrow:hover:not(:disabled) {
    border-color: var(--pc-forest);
    background: var(--pc-forest);
    color: #fff;
}
.pe-courses__arrow:disabled {
    opacity: .35;
    cursor: default;
}

/* ---------- Track (scrolls sideways, snaps to cards) ---------- */
.pe-courses__panel[hidden] { display: none; }
.pe-courses__track {
    display: flex;
    gap: var(--pc-gap);
    margin: 0;
    padding: 4px 2px 10px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pe-courses__track::-webkit-scrollbar { display: none; }

/* ---------- Card ---------- */
.pe-course {
    position: relative;
    display: flex;
    flex: 0 0 calc((100% - 3 * var(--pc-gap)) / 4);   /* 4 cards on wide screens */
    flex-direction: column;
    padding: 14px 14px 0;
    overflow: hidden;
    border: 1.5px solid var(--pc-line);
    border-radius: 16px;
    background: var(--pc-card);
    scroll-snap-align: start;
    transition: border-color .2s, box-shadow .2s;
}
.pe-course:hover {
    border-color: var(--pc-sage);
    box-shadow: 0 20px 36px -26px rgba(23, 57, 44, .55);
}

.pe-course__media {
    position: relative;
    aspect-ratio: 4 / 3.3;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(160deg, var(--pc-sage), var(--pc-forest));
}
.pe-course__fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .85);
    font-size: 3.2rem;
}
.pe-course__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.pe-course:hover .pe-course__media img { transform: scale(1.04); }

.pe-course__badges {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pe-course__badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(18, 26, 22, .72);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.3;
}
.pe-course__badge.is-primary {
    background: var(--pc-mustard);
    color: var(--pc-forest);
}

/* College chip: overlaps the photo and runs into the card's left edge */
.pe-course__college {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    max-width: calc(100% - 10px);
    margin: -18px 0 0 -15.5px;
    padding: 7px 18px 7px 20px;
    border-radius: 0 999px 999px 0;
    background: var(--pc-sage-100);
    color: var(--pc-forest);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
}

.pe-course__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}
.pe-course__name {
    min-height: calc(1.1875rem * 1.3 * 2);   /* keeps 1-line and 2-line titles aligned */
    margin: 0;
    color: var(--pc-ink);
    font-family: inherit;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
}
.pe-course__name a {
    color: inherit;
    text-decoration: none;
}
/* the title link covers the whole card, so the entire card is clickable */
.pe-course__name a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 15px;
}
.pe-course__name a:focus-visible { outline: none; }
.pe-course__name a:focus-visible::after {
    outline: 2px solid var(--pc-forest);
    outline-offset: -3px;
}

.pe-course__pill {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1.5px solid var(--pc-line);
    border-radius: 999px;
    background: #fff;
    color: var(--pc-ink);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}
.pe-course__pill i { color: var(--pc-forest); }

.pe-course__meta {
    display: grid;
    gap: 4px;
    margin: auto 0 0;    /* pushed to the bottom so it lines up across cards */
    padding: 5px 0 52px;   /* 52px = room for the tag in the corner */
    list-style: none;
    color: var(--pc-muted);
    font-size: .95rem;
}
.pe-course__meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pe-course__meta i { color: var(--pc-forest); }

/* Tag sits in the bottom-right corner of the card */
.pe-course__tag {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 10px 20px 10px 22px;
    border-radius: 999px 0 0 999px;
    background: var(--pc-forest);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .2s, color .2s;
}
.pe-course:hover .pe-course__tag {
    background: var(--pc-mustard);
    color: var(--pc-forest);
}

/* ---------- Page dots: current page is a diamond ---------- */
.pe-courses__dots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    margin-top: 16px;
}
.pe-courses__dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.pe-courses__dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1.5px solid #9aa59d;
    border-radius: 50%;
    transition: transform .25s, border-radius .25s, background-color .25s, border-color .25s;
}
.pe-courses__dot:hover::before { border-color: var(--pc-forest); }
.pe-courses__dot[aria-current="true"]::before {
    border-color: var(--pc-forest);
    border-radius: 2px;
    background: var(--pc-forest);
    transform: rotate(45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .pe-course { flex-basis: calc((100% - 2 * var(--pc-gap)) / 3); }   /* 3 cards */
}
@media (max-width: 991.98px) {
    .pe-courses { --pc-gap: 18px; }
    .pe-course { flex-basis: calc((100% - var(--pc-gap)) / 2); }       /* 2 cards */
}
@media (max-width: 575.98px) {
    .pe-courses { --pc-gap: 14px; }
    .pe-courses__arrows { display: none; } /* swipe + dots on phones */

    /* all three tabs on one line; they shrink to fit (and scroll on very narrow phones) */
    .pe-courses__bar { display: block; }
    .pe-courses__tabs {
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .pe-courses__tabs::-webkit-scrollbar { display: none; }
    .pe-courses__tab {
        flex: 1 0 auto;
        min-height: 44px;
        padding: 0 clamp(8px, 2.6vw, 16px);
        font-size: clamp(.8125rem, 3.6vw, .9375rem);
        white-space: nowrap;
    }

    /* exactly one full-width course per swipe */
    .pe-courses__track { padding-inline: 0; }
    .pe-course {
        flex-basis: 100%;
        scroll-snap-stop: always;   /* a fast swipe still moves only one card */
    }
    .pe-course__name { font-size: 1.0625rem; min-height: calc(1.0625rem * 1.3 * 2); }
}

@media (prefers-reduced-motion: reduce) {
    .pe-courses * { transition-duration: .01ms !important; }
    .pe-course:hover .pe-course__media img { transform: none; }
}

/* =====================================================================
   Placement section
   ===================================================================== */
.pe-place {
    --pp-forest: var(--pe-forest, #17392c);
    --pp-sage: var(--pe-sage, #7c8c6b);
    --pp-sage-50: var(--pe-sage-50, #f3f6f0);
    --pp-sage-100: var(--pe-sage-100, #e5ebe0);
    --pp-mustard: var(--pe-mustard, #d9a036);
    --pp-blush: var(--pe-blush, #eda792);
    --pp-ink: var(--pe-ink, #1c2521);
    --pp-muted: var(--pe-muted, #5b675f);
    --pp-line: #dfe4dd;

    padding-block: var(--pe-section-space);
    color: var(--pp-ink);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.pe-place *,
.pe-place *::before,
.pe-place *::after { box-sizing: border-box; }
.pe-place ul { margin: 0; padding: 0; list-style: none; }
.pe-place :focus-visible { outline: 2px solid var(--pp-forest); outline-offset: 3px; }

.pe-place__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "photo copy"
        "rec   copy";
    gap: 20px;
}

/* ---------- Photo card ---------- */
.pe-place__photo {
    grid-area: photo;
    position: relative;
    min-height: 320px;
    border-radius: 18px;
    background:
        radial-gradient(rgba(23, 57, 44, .12) 1px, transparent 1.4px) 0 0 / 14px 14px,
        var(--pp-sage-100);
}
.pe-place__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover;
}
/* transparent PNG: the student stands on the card's bottom edge and rises above its top */
.pe-place__photo.is-cutout img {
    top: auto;
    left: 50%;
    width: auto;
    height: 118%;
    max-width: 92%;
    border-radius: 0 0 18px 18px;
    object-fit: contain;
    object-position: bottom center;
    transform: translateX(-50%);
}
.pe-place--cutout .pe-place__grid { margin-top: clamp(48px, 6vw, 84px); }   /* room for the head */

.pe-place__spark {
    position: absolute;
    z-index: 1;
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--pp-forest);
    stroke-width: 1.6;
    stroke-linejoin: round;
}
.pe-place__spark--a { top: 20%; left: 9%; transform: rotate(-12deg); }
.pe-place__spark--b { top: 56%; right: 8%; width: 24px; height: 24px; stroke: var(--pp-blush); transform: rotate(10deg); }
.pe-place__photo:not(.is-cutout) .pe-place__spark { stroke: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }

.pe-place__sticker {
    position: absolute;
    z-index: 2;
    top: 34%;
    right: 12%;
    padding: 8px 16px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--pp-mustard);
    color: var(--pp-forest);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .45);
    transform: rotate(-16deg);
}

/* ---------- Recruiters strip ---------- */
.pe-place__recruiters {
    grid-area: rec;
    min-width: 0;
    padding: 22px 0 22px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--pp-sage-50);
}
.pe-place__rec-title {
    margin: 0 22px 18px;
    color: var(--pp-forest);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}
.pe-place__marquee {
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.pe-place__logos {
    display: flex;
    flex: none;
    gap: 12px;
    padding-right: 12px;
    animation: pe-marquee 30s linear infinite;
}
.pe-place__marquee:hover .pe-place__logos { animation-play-state: paused; }
@keyframes pe-marquee { to { transform: translateX(-100%); } }
.pe-place__logo {
    display: grid;
    place-items: center;
    min-width: 136px;
    height: 64px;
    padding: 0 18px;
    border-radius: 12px;
    background: #fff;
    color: var(--pp-ink);
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}
.pe-place__logo img {
    max-width: 110px;
    max-height: 36px;
    object-fit: contain;
}

/* ---------- Headline + stats card ---------- */
.pe-place__copy {
    grid-area: copy;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 3.4vw, 44px);
    overflow: hidden;
    border-radius: 18px;
    background: var(--pp-sage-50);
}
.pe-place__copy::before {
    /* faint arch in the background, echoing the banner's arched photo */
    content: "";
    position: absolute;
    right: -6%;
    bottom: -30%;
    z-index: -1;
    width: 58%;
    aspect-ratio: 4 / 5;
    border: 34px solid rgba(255, 255, 255, .85);
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
    pointer-events: none;
}
.pe-place__title {
    max-width: 22ch;
    margin: 0 0 18px;
    color: var(--pp-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.9rem, 1.1rem + 2.5vw, 3.1rem);
    font-weight: 400;
    line-height: 1.22;
}
/* the circled words */
.pe-place__circled {
    position: relative;
    display: inline-block;
    padding: 0 .12em;
    white-space: nowrap;
}
.pe-place__circle {
    position: absolute;
    top: -22%;
    right: -14%;
    bottom: -18%;
    left: -12%;
    width: 126%;
    height: 140%;
    overflow: visible;
    pointer-events: none;
}
.pe-place__circle path {
    fill: none;
    stroke: var(--pp-mustard);
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
}
/* drawn in once the section scrolls into view (set up by pe-home.js) */
.pe-place.js-draw .pe-place__circle path { stroke-dashoffset: 1; }
.pe-place.js-draw.is-drawn .pe-place__circle path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.1s cubic-bezier(.65, 0, .35, 1) .2s;
}

.pe-place__text {
    max-width: 38em;
    margin: 0 0 26px;
    color: var(--pp-muted);
    font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
    line-height: 1.6;
}
.pe-place__link {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    color: var(--pp-forest);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}
.pe-place__link i { transition: transform .2s; }
.pe-place__link:hover { text-decoration: underline; text-decoration-color: var(--pp-mustard); text-underline-offset: 5px; }
.pe-place__link:hover i { transform: translateX(3px); }

.pe-place__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto !important;
    padding-top: clamp(20px, 3vw, 40px) !important;
}
.pe-place__stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px 20px;
    border: 1.5px solid var(--pp-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
}
.pe-place__num {
    color: var(--pp-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.4rem, .9rem + 1vw, 2rem);
    font-weight: 400;
    line-height: 1.05;
    white-space: nowrap;
}
.pe-place__label {
    color: var(--pp-muted);
    font-size: .95rem;
    line-height: 1.4;
}

/* ---------- Responsive ---------- */
@media (max-width: 1299.98px) {
    .pe-place__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1199.98px) {
    .pe-place__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
}
@media (max-width: 991.98px) {
    /* headline card on top, photo and recruiters side by side below */
    .pe-place__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "copy  copy"
            "photo rec";
    }
    .pe-place__grid { grid-template-rows: auto auto; }
    .pe-place__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pe-place__photo { min-height: 260px; }
    .pe-place--cutout .pe-place__grid { margin-top: 0; }
    .pe-place--cutout .pe-place__photo,
    .pe-place--cutout .pe-place__recruiters { margin-top: 56px; }   /* room for the head */
    .pe-place__recruiters { display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 767.98px) {
    .pe-place__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .pe-place__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "copy"
            "photo"
            "rec";
        gap: 16px;
    }
    .pe-place__grid { grid-template-rows: none; }
    .pe-place__photo { aspect-ratio: 1.2 / 1; min-height: 0; }
    .pe-place--cutout .pe-place__recruiters { margin-top: 0; }
    .pe-place__stat { gap: 6px; padding: 16px 14px; }
    .pe-place__label { font-size: .875rem; }
    .pe-place__copy::before { width: 90%; bottom: -12%; border-width: 26px; }
    .pe-place__logo { min-width: 116px; height: 56px; font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pe-place__logos { animation: none; }
    .pe-place__logos[aria-hidden="true"] { display: none; }
    .pe-place__marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .pe-place__link i { transition: none; }
}

/* =====================================================================
   Student stories
   ===================================================================== */
.pe-stories {
    --ps-forest: var(--pe-forest, #17392c);
    --ps-green: var(--pe-green, #2f6b4f);
    --ps-mustard: var(--pe-mustard, #d9a036);
    --ps-ink: var(--pe-ink, #1c2521);
    --ps-muted: #4d5a53;
    --ps-line: #dfe4dd;
    --ps-cream: #fdf8ea;
    --ps-gap: 24px;

    padding-block: var(--pe-section-space) clamp(32px, 4vw, 48px);
    color: var(--ps-ink);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.pe-stories *,
.pe-stories *::before,
.pe-stories *::after { box-sizing: border-box; }
.pe-stories :focus-visible { outline: 2px solid var(--ps-forest); outline-offset: 3px; }

/* ---------- Header ---------- */
.pe-stories__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding-bottom: 18px;
    margin-bottom: clamp(20px, 3vw, 32px);
    border-bottom: 1px solid var(--ps-line);
}
.pe-stories__title {
    margin: 0;
    color: var(--ps-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
    font-weight: 400;
    line-height: 1.12;
}
.pe-stories__cta {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 12px;
    background: var(--ps-forest);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 24px -14px rgba(23, 57, 44, .8);
    transition: background-color .2s, transform .2s;
}
.pe-stories__cta:hover {
    background: var(--ps-green);
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- Carousel ---------- */
.pe-stories__viewport {
    position: relative;
    padding-inline: 60px;          /* room for the side arrows */
}
.pe-stories__track {
    display: flex;
    gap: var(--ps-gap);
    margin: 0 0 -20px;             /* the extra bottom padding is only room for the hover shadow */
    padding: 10px 0 28px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pe-stories__track::-webkit-scrollbar { display: none; }

.pe-stories__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--ps-line);
    border-radius: 50%;
    background: #fff;
    color: var(--ps-forest);
    font-size: 1.15rem;
    box-shadow: 0 10px 24px -12px rgba(23, 57, 44, .5);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .2s, color .2s, opacity .2s;
}
.pe-stories__arrow--prev { left: 0; }
.pe-stories__arrow--next { right: 0; }
.pe-stories__arrow:hover:not(:disabled) { background: var(--ps-forest); color: #fff; }
.pe-stories__arrow:disabled { opacity: .35; cursor: default; }

/* ---------- Card: coloured frame, photo on top, quote below ---------- */
.pe-story {
    --frame: var(--ps-mustard);
    display: flex;
    flex: 0 0 calc((100% - 2 * var(--ps-gap)) / 3);   /* 3 cards on wide screens */
    flex-direction: column;
    gap: 9px;
    padding: 9px;
    border-radius: 24px;
    background: var(--frame);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);   /* faint inner highlight on the frame */
    scroll-snap-align: start;
    transition: transform .3s ease, box-shadow .3s ease;
}
.pe-story:nth-child(3n + 2) { --frame: var(--ps-green); }
.pe-story:nth-child(3n + 3) { --frame: var(--ps-forest); }
.pe-story:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 26px 40px -26px rgba(23, 57, 44, .7);
}

/* photo: round portrait on a light tint of the frame colour */
.pe-story__photo {
    position: relative;
    display: grid;
    justify-items: center;
    margin: 0;
    padding: 24px 16px 16px;
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .28), transparent 62%),
        rgba(255, 255, 255, .14);
}
.pe-story__initials,
.pe-story__photo img {
    grid-area: 1 / 1;              /* photo sits on top of the initials */
    width: min(62%, 210px);
    aspect-ratio: 1;
    border: 5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6);
}
.pe-story__initials {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--pe-sage, #7c8c6b), var(--ps-forest));
    color: rgba(255, 255, 255, .92);
    font-family: var(--pe-font-display, Georgia, serif);
    font-size: clamp(2.2rem, 1.8rem + 1.6vw, 3rem);
}
.pe-story__photo img {
    height: auto;
    object-fit: cover;
    object-position: center 22%;   /* keeps faces in frame */
    transition: transform .5s ease;
}
.pe-story:hover .pe-story__photo img { transform: scale(1.03); }

/* location and course chips: centred under the photo, overlapping its edge */
.pe-story__meta {
    position: relative;
    z-index: 1;
    grid-area: 2 / 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: -16px 0 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}
.pe-story__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--ps-forest);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55);
}
.pe-story__meta i { color: var(--frame); font-size: .95rem; }
.pe-story:nth-child(3n + 1) .pe-story__meta i { color: #a8741a; }   /* darker gold, readable on white */

/* quote */
.pe-story__quote {
    display: flex;
    flex: 1;                       /* equal-height cards */
    flex-direction: column;
    margin: 0;
    padding: 18px 22px 20px;
    border-radius: 17px;
    background: var(--ps-cream);
}
.pe-story__quote::before {
    /* large opening quote mark in the card's frame colour */
    content: "\201C";
    display: block;
    height: .5em;
    margin: 0 0 12px -2px;
    color: var(--frame);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: 4rem;
    line-height: 1;
}
.pe-story__quote p {
    margin: 0 0 18px;
    color: var(--ps-muted);
    font-size: 1rem;
    line-height: 1.65;
    text-align: center;
}
.pe-story__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(23, 57, 44, .1);
    color: var(--ps-forest);
    font-size: 1.05rem;
    font-weight: 700;
}
.pe-story__name::before {
    /* short line in the frame colour instead of a dash */
    content: "";
    flex: none;
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--frame);
}

/* ---------- Page dots (phones) ---------- */
.pe-stories__dots {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 18px;
}
.pe-stories__dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.pe-stories__dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1.5px solid #9aa59d;
    border-radius: 50%;
    transition: transform .25s, border-radius .25s, background-color .25s, border-color .25s;
}
.pe-stories__dot[aria-current="true"]::before {
    border-color: var(--ps-forest);
    border-radius: 2px;
    background: var(--ps-forest);
    transform: rotate(45deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .pe-story { flex-basis: calc((100% - var(--ps-gap)) / 2); }   /* 2 cards */
}
@media (max-width: 767.98px) {
    .pe-stories { --ps-gap: 14px; }
    .pe-stories__viewport { padding-inline: 0; }
    .pe-stories__arrow { display: none; }                          /* swipe + dots */
    .pe-stories__dots { display: flex; }
    .pe-story {
        flex-basis: 100%;                                          /* 1 card per swipe */
        scroll-snap-stop: always;
        padding: 8px;
        border-radius: 20px;
    }
    .pe-story:hover { transform: none; }                           /* no lift on touch screens */
    .pe-stories__cta { min-height: 46px; padding: 0 20px; }
}
@media (max-width: 575.98px) {
    .pe-stories__head { flex-direction: column; align-items: flex-start; }
    .pe-stories__cta { width: 100%; justify-content: center; }
    .pe-story__meta span { font-size: .8125rem; padding: 5px 10px 5px 8px; }
    .pe-story__initials,
    .pe-story__photo img { width: min(56%, 190px); }
    .pe-story__photo { padding: 20px 12px 14px; }
    .pe-story__quote { padding: 14px 18px 18px; }
    .pe-story__quote::before { font-size: 3.4rem; margin-bottom: 10px; }
    .pe-story__quote p { font-size: .9375rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pe-stories *, .pe-story { transition-duration: .01ms !important; }
    .pe-story:hover { transform: none; }
    .pe-story:hover .pe-story__photo img { transform: none; }
}

/* =====================================================================
   FAQs
   ===================================================================== */
.pe-faq {
    --pf-forest: var(--pe-forest, #17392c);
    --pf-green: var(--pe-green, #2f6b4f);
    --pf-sage-50: var(--pe-sage-50, #f3f6f0);
    --pf-mustard: var(--pe-mustard, #d9a036);
    --pf-ink: var(--pe-ink, #1c2521);
    --pf-muted: var(--pe-muted, #5b675f);
    --pf-line: #dfe4dd;

    padding-block: var(--pe-section-space, 32px) clamp(40px, 5vw, 72px);
    color: var(--pf-ink);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
    interpolate-size: allow-keywords;   /* lets answers slide open in browsers that support it */
}
.pe-faq *,
.pe-faq *::before,
.pe-faq *::after { box-sizing: border-box; }
.pe-faq :focus-visible { outline: 2px solid var(--pf-forest); outline-offset: 3px; }

.pe-faq__grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(32px, 5vw, 72px);
}

/* ---------- Left column ---------- */
.pe-faq__side {
    position: sticky;
    top: 100px;                    /* stays in view below the sticky header */
    display: grid;
    gap: 28px;
}
.pe-faq__title {
    margin: 0 0 12px;
    color: var(--pf-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
    font-weight: 400;
    line-height: 1.12;
}
.pe-faq__lead {
    max-width: 30em;
    margin: 0;
    color: var(--pf-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.pe-faq__help {
    position: relative;
    overflow: hidden;
    padding: 26px 26px 28px;
    border-radius: 18px;
    background: var(--pf-forest);
    color: #d5e0cf;
}
.pe-faq__help::after {
    /* faint arch, like the banner and placement card */
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 160px;
    aspect-ratio: 4 / 5;
    border: 18px solid rgba(255, 255, 255, .06);
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
    pointer-events: none;
}
.pe-faq__help-title {
    margin: 0 0 6px;
    color: #fff;
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: 1.5rem;
    line-height: 1.2;
}
.pe-faq__help-text {
    max-width: 28em;
    margin: 0 0 20px;
    font-size: .975rem;
    line-height: 1.55;
}
.pe-faq__help-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
.pe-faq__help-link {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--pf-mustard);
    text-underline-offset: 5px;
}
.pe-faq__help-link:hover { color: var(--pf-mustard); }
.pe-faq__help :focus-visible { outline-color: var(--pf-mustard); }

/* ---------- Questions ---------- */
.pe-faq__list {
    display: grid;
    gap: 12px;
}
.pe-faq__item {
    border: 1.5px solid var(--pf-line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .2s, background-color .2s;
}
.pe-faq__item:hover { border-color: #c9d2c6; }
.pe-faq__item[open] {
    border-color: var(--pf-green);
    background: var(--pf-sage-50);
}
.pe-faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 18px 22px;
    color: var(--pf-ink);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}
.pe-faq__q::-webkit-details-marker { display: none; }
.pe-faq__item[open] .pe-faq__q { color: var(--pf-forest); }

/* plus icon that turns into a minus */
.pe-faq__icon {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--pf-line);
    border-radius: 50%;
    background: #fff;
    transition: background-color .2s, border-color .2s;
}
.pe-faq__icon::before,
.pe-faq__icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--pf-forest);
    transition: transform .25s ease, background-color .2s;
}
.pe-faq__icon::after { transform: rotate(90deg); }
.pe-faq__item[open] .pe-faq__icon {
    border-color: var(--pf-forest);
    background: var(--pf-forest);
}
.pe-faq__item[open] .pe-faq__icon::before,
.pe-faq__item[open] .pe-faq__icon::after { background: #fff; }
.pe-faq__item[open] .pe-faq__icon::after { transform: rotate(0deg); }

.pe-faq__a {
    padding: 0 22px 20px;
    color: var(--pf-muted);
    font-size: 1rem;
    line-height: 1.65;
}
.pe-faq__a p { max-width: 60ch; margin: 0; }
.pe-faq__a p + p { margin-top: 10px; }

/* smooth open/close where the browser supports it (others simply open instantly) */
.pe-faq__item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .3s ease, content-visibility .3s allow-discrete;
}
.pe-faq__item[open]::details-content { block-size: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    /* heading, then questions, then the help card */
    .pe-faq__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .pe-faq__side { display: contents; }
    .pe-faq__intro { order: 1; }
    .pe-faq__list { order: 2; }
    .pe-faq__help { order: 3; }
}
@media (max-width: 575.98px) {
    .pe-faq__q { padding: 16px 14px 16px 16px; font-size: 1rem; }
    .pe-faq__icon { width: 30px; height: 30px; }
    .pe-faq__a { padding: 0 16px 16px; font-size: .9375rem; }
    .pe-faq__help { padding: 22px 20px 24px; }
    .pe-faq__help-actions .pe-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .pe-faq * { transition-duration: .01ms !important; }
    .pe-faq__item::details-content { transition: none; }
}


/* =====================================================================
   Our institutions (carousel)
   ===================================================================== */
.pe-inst {
    --pi-forest: var(--pe-forest, #17392c);
    --pi-sage: var(--pe-sage, #7c8c6b);
    --pi-sage-50: var(--pe-sage-50, #f3f6f0);
    --pi-sage-100: var(--pe-sage-100, #e5ebe0);
    --pi-mustard: var(--pe-mustard, #d9a036);
    --pi-ink: var(--pe-ink, #1c2521);
    --pi-muted: var(--pe-muted, #5b675f);
    --pi-line: #dfe4dd;
    --pi-gap: 20px;

    padding-block: clamp(32px, 4vw, 48px) var(--pe-section-space, 32px);
    color: var(--pi-ink);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.pe-inst *, .pe-inst *::before, .pe-inst *::after { box-sizing: border-box; }
.pe-inst ul { margin: 0; padding: 0; list-style: none; }
.pe-inst :focus-visible { outline: 2px solid var(--pi-forest); outline-offset: 3px; }

.pe-inst__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(20px, 3vw, 28px);
}
.pe-inst__title {
    margin: 0 0 8px;
    color: var(--pi-forest);
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
    font-weight: 400;
    line-height: 1.12;
}
.pe-inst__sub {
    max-width: 52rem;
    margin: 0;
    color: var(--pi-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
}
.pe-inst__arrows { display: flex; flex: none; gap: 10px; }
.pe-inst__arrow {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border: 1.5px solid var(--pi-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pi-forest);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.pe-inst__arrow:hover:not(:disabled) { border-color: var(--pi-forest); background: var(--pi-forest); color: #fff; }
.pe-inst__arrow:disabled { opacity: .35; cursor: default; }

.pe-inst__track {
    display: flex;
    gap: var(--pi-gap);
    padding: 4px 2px 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.pe-inst__track::-webkit-scrollbar { display: none; }

/* ---------- Card ---------- */
.pe-instcard {
    position: relative;
    display: flex;
    flex: 0 0 calc((100% - 3 * var(--pi-gap)) / 4);   /* 4 cards on desktop */
    flex-direction: column;
    padding: 14px 16px 18px;
    border: 1.5px solid var(--pi-line);
    border-radius: 18px;
    background: #fff;
    scroll-snap-align: start;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.pe-instcard:hover {
    border-color: var(--pi-sage);
    box-shadow: 0 22px 38px -28px rgba(23, 57, 44, .6);
    transform: translateY(-3px);
}
/* logo panel: the logo sits whole on a light background, never cropped */
.pe-instcard__logo {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr);   /* a definite row, so the logo can size to it */
    place-items: center;
    height: 132px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1.5px solid var(--pi-line);
    border-radius: 14px;
    background: #fff;
}
.pe-instcard__initials {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    width: 84px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--pi-sage), var(--pi-forest));
    color: rgba(255, 255, 255, .92);
    font-family: var(--pe-font-display, Georgia, serif);
    font-size: 2rem;
}
.pe-instcard__logo img {
    grid-area: 1 / 1;          /* the logo covers the initials when it loads */
    width: auto;
    height: auto;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;          /* scales the logo down to fit, never crops it */
    object-fit: contain;
    transition: transform .3s ease;
}
.pe-instcard:hover .pe-instcard__logo img { transform: scale(1.04); }

.pe-instcard__approvals {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--pi-forest);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
}
.pe-instcard__approvals i { margin-top: 2px; color: var(--pi-mustard); }

.pe-instcard__name {
    min-height: calc(1.0625rem * 1.35 * 2);   /* keeps short and long names aligned */
    margin: 0 0 10px;
    color: var(--pi-forest);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
}
.pe-instcard__name a { color: inherit; text-decoration: none; }
.pe-instcard__name a::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 17px; }
.pe-instcard__name a:focus-visible { outline: none; }
.pe-instcard__name a:focus-visible::after { outline: 2px solid var(--pi-forest); outline-offset: -3px; }

.pe-instcard__place,
.pe-instcard__phone {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--pi-muted);
    font-size: .9375rem;
    line-height: 1.45;
}
.pe-instcard__place i,
.pe-instcard__phone i { margin-top: 2px; color: var(--pi-forest); }
.pe-instcard__text {
    margin: 0 0 14px;
    color: var(--pi-muted);
    font-size: .9375rem;
    line-height: 1.55;
}
.pe-instcard__courses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px !important;
}
.pe-instcard__courses li {
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--pi-sage-100);
    color: var(--pi-forest);
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
}
.pe-instcard__phone { margin: auto 0 0; }

/* ---------- Dots + link ---------- */
.pe-inst__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-top: 14px;
}
.pe-inst__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 28px;
}
.pe-inst__dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.pe-inst__dot::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1.5px solid #9aa59d;
    border-radius: 50%;
    transition: transform .25s, border-radius .25s, background-color .25s, border-color .25s;
}
.pe-inst__dot[aria-current="true"]::before {
    border-color: var(--pi-forest);
    border-radius: 2px;
    background: var(--pi-forest);
    transform: rotate(45deg);
}
.pe-inst__all {
    color: var(--pi-forest);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--pi-mustard);
    text-underline-offset: 5px;
}
.pe-inst__all:hover { color: var(--pi-mustard); }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .pe-instcard { flex-basis: calc((100% - 2 * var(--pi-gap)) / 3); }   /* 3 cards */
}
@media (max-width: 991.98px) {
    .pe-instcard { flex-basis: calc((100% - var(--pi-gap)) / 2); }       /* 2 cards */
}
@media (max-width: 575.98px) {
    .pe-inst { --pi-gap: 14px; }
    .pe-inst__head { display: block; }
    .pe-inst__arrows { display: none; }          /* swipe + dots on phones */
    .pe-inst__track { padding-inline: 0; }
    .pe-instcard {
        flex-basis: 100%;                        /* one institute per swipe */
        scroll-snap-stop: always;
    }
    .pe-inst__foot { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .pe-inst * { transition-duration: .01ms !important; }
    .pe-instcard:hover { transform: none; }
}