/* ==========================================================================
   Projects — Listing + Single + Stories
   Figma-accurate layout. Only the content is dynamic; everything visual lives
   in this stylesheet so editors can't accidentally break the design.
   ========================================================================== */

:root {
    --pj-blue: var(--color-primary-blue, #0F4C81);
    --pj-blue-deep: #0A3B66;
    --pj-cream: var(--color-cream, #FDF7EC);
    --pj-gold: #D6A24E;
    --pj-gold-strong: #C18E3D;
    --pj-black: #101010;
    --pj-gray: #6B6B6B;
    --pj-white: #ffffff;
    --pj-heading: var(--font-heading, 'Bespoke Serif', 'Times New Roman', serif);
    --pj-body: var(--font-body, 'DM Sans', system-ui, sans-serif);
}

/* ==========================================================================
   ALL PROJECTS PAGE — hero
   ========================================================================== */
.pj-hero {
    background: #005598;
    color: var(--pj-white);
    padding: 64px 0 0;
    position: relative;
}
.pj-hero__title {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 42px;
    line-height: 1.15;
    text-align: center;
    margin: 0 auto;
    color: var(--pj-white);
    max-width: 640px;
}
.pj-hero__image {
    max-width: 1160px;
    margin: 44px auto 0;
    padding: 0 24px;
    transform: translateY(90px);
}
.pj-hero__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1160 / 440;
}

.pj-lead {
    padding: 150px 0 70px;
    text-align: center;
    background: var(--pj-white);
}
.pj-lead h2 {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.2;
    color: var(--pj-black);
    max-width: 720px;
    margin: 0 auto 18px;
}
.pj-lead p {
    font-family: var(--pj-body);
    color: var(--pj-gray);
    max-width: 660px;
    margin: 0 auto;
    line-height: 1.75;
    font-size: 15px;
}

/* ==========================================================================
   STATIC PROJECT ROWS — alternating cream/white, auto via :nth-of-type
   1st/3rd/5th …  = cream on left, text left, image right (overlaps the seam)
   2nd/4th/6th …  = plain white, image left, text right
   Duplicate a .pj-project block in the template and the pattern continues.
   ========================================================================== */
.pj-projects {
    background: var(--pj-white);
    padding: 10px 0 40px;
    overflow-x: hidden;            /* safety against any sub-pixel bleed overflow */
}
.pj-project { position: relative; }

/* full-width grid so one side can bleed to the viewport edge.
   align-items:stretch makes both cells fill the row height, so the cream
   backdrop covers the full height of the (taller) image. */
.pj-project__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
}

/* --- shared text block --- */
.pj-project__text {
    grid-area: text;
    display: flex;
    flex-direction: column;
    align-items: flex-start;       /* keep content narrow, never full-cell width */
    justify-content: center;
    padding: 70px 0;
}
.pj-project__title {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 30px;
    line-height: 1.2;
    color: var(--pj-black);
    margin: 0 0 16px;
    max-width: 430px;
}
.pj-project__tag {
    display: inline-block;
    background: #C18E3D;
    color: var(--pj-white);
    font-family: var(--pj-body);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    margin: 0 0 18px;
    width: fit-content;
}
.pj-project__desc {
    font-family: var(--pj-body);
    color: var(--pj-gray);
    font-size: 14px;
    line-height: 1.75;
    margin: 0 0 22px;
    max-width: 440px;              /* keeps text off the image */
}
.pj-project__desc p { margin: 0 0 12px; }
.pj-project__desc p:last-child { margin-bottom: 0; }
.pj-project__more {
    font-family: var(--pj-body);
    color: var(--pj-black);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.pj-project__more-arrow {
    display: inline-flex;
    transition: transform 0.3s ease;
    transform-origin: 50% 50%;
}
.pj-project__more:hover .pj-project__more-arrow { transform: rotate(45deg); }

/* --- shared media block ---
   align-self:start keeps the image at the TOP of the row (not vertically
   centered), so both the cream row and the white row start their image at the
   same position. */
.pj-project__media { grid-area: image; align-self: start; }
.pj-project__media img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

/* ================= ODD rows: cream(text) LEFT, image RIGHT ================= */
.pj-project:nth-of-type(odd) .pj-project__inner { grid-template-areas: "text image"; }
.pj-project:nth-of-type(odd) .pj-project__text {
    background: #FFF5E7;                                             /* cream fills the whole left half, bleeds to the left edge */
    padding-left: max(24px, calc((100vw - 1160px) / 2 + 24px));     /* content aligns to the 1160 container */
    padding-right: 48px;
}
.pj-project:nth-of-type(odd) .pj-project__media {
    /* overlaps the cream seam on the left, bleeds to the RIGHT edge of the page */
    margin: 40px 0 40px -80px;
    position: relative;
    z-index: 2;
}

/* ================= EVEN rows: image LEFT (full bleed), text RIGHT ================= */
.pj-project:nth-of-type(even) .pj-project__inner { grid-template-areas: "image text"; }
.pj-project:nth-of-type(even) .pj-project__media {
    margin: 40px 0;                                                 /* image bleeds to the left viewport edge, ends at centre */
}
.pj-project:nth-of-type(even) .pj-project__text {
    padding-left: 60px;
    padding-right: max(24px, calc((100vw - 1160px) / 2 + 24px));    /* content aligns to the 1160 container */
}

/* ==========================================================================
   Big CTA strip at the bottom of the listing page
   ========================================================================== */
.pj-cta-strip {
    background: #005598;
    color: var(--pj-white);
    padding: 72px 0;
}
.pj-cta-strip__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.pj-cta-strip h2 {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.15;
    margin: 0;
    color: var(--pj-white);
}
.pj-cta-strip__aside p {
    font-family: var(--pj-body);
    color: rgba(255,255,255,0.9);
    line-height: 1.7;
    margin: 0 0 24px;
    font-size: 15px;
}
.pj-cta-strip__aside .pj-btn {
    background: var(--pj-white);
    color: var(--pj-black);
    padding: 12px 26px;
    font-family: var(--pj-body);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background 0.25s ease;
}
.pj-cta-strip__aside .pj-btn:hover {
    background: var(--pj-cream);
}

/* ==========================================================================
   SINGLE PROJECT PAGE — hero (full-width, image to right edge)
   ========================================================================== */
.pj-single-hero {
    background: var(--pj-blue);
    color: var(--pj-white);
    padding: 70px 0;
}
.pj-single-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    align-items: center;
}
.pj-single-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.pj-single-hero__title {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 44px;
    line-height: 1.12;
    margin: 0;
    color: var(--pj-white);
    max-width: none;
}
.pj-single-hero__subtitle {
    font-family: var(--pj-body);
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin: 14px 0 0;
}
.pj-single-hero__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(255,255,255,0.08) center/cover no-repeat;
}
.pj-single-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   SINGLE PROJECT PAGE — content sections
   ========================================================================== */
.pj-single-body {
    background: var(--pj-white);
    padding: 70px 0 40px;
}
.pj-section {
    max-width: 1160px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.pj-section__tag {
    display: inline-block;
    background: var(--pj-gold);
    color: var(--pj-white);
    font-family: var(--pj-body);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    margin: 0 0 16px;
}
.pj-section__heading {
    font-family: var(--pj-heading);
    font-weight: 500;
    font-size: 32px;
    line-height: 1.2;
    color: var(--pj-black);
    margin: 0 0 20px;
    max-width: 640px;
}
.pj-section__body {
    font-family: var(--pj-body);
    color: var(--pj-gray);
    font-size: 15px;
    line-height: 1.75;
}
.pj-section__body p {
    margin: 0 0 14px;
}
.pj-section__body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Full-width centred image (used on the Young Women project page)
   ========================================================================== */
.pj-full-image {
    max-width: 1020px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pj-full-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   Text + Image section
   ========================================================================== */
.pj-text-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1160px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pj-text-image--image-left {
    grid-template-areas: "image content";
}
.pj-text-image--image-right {
    grid-template-areas: "content image";
}

.pj-text-image__content {
    grid-area: content;
}
.pj-text-image__content .pj-section__body {
    max-width: none;
}
.pj-text-image__image {
    grid-area: image;
    width: 100%;
    overflow: hidden;
}
.pj-text-image__image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Quote layouts */
.pj-quote {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pj-quote__body {
    font-family: var(--pj-heading);
    font-style: italic;
    font-size: 22px;
    line-height: 1.4;
    color: var(--pj-black);
    margin: 0 0 22px;
    max-width: 420px;
}
.pj-quote__name {
    font-family: var(--pj-body);
    font-weight: 700;
    font-size: 14px;
    color: var(--pj-black);
    margin: 0;
}
.pj-quote__desig {
    font-family: var(--pj-body);
    font-size: 13px;
    color: var(--pj-gray);
    margin: 4px 0 0;
}
.pj-quote__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ddd center/cover no-repeat;
}
.pj-quote__media img,
.pj-quote__media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pj-quote__media iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Image + bullets layout */
.pj-bullets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pj-bullets__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ddd center/cover no-repeat;
}
.pj-bullets__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pj-bullets__list {
    list-style: disc;
    padding-left: 22px;
    margin: 0;
    font-family: var(--pj-body);
    font-size: 18px;
    line-height: 1.7;
    color: #000;
}
.pj-bullets__list li {
    margin-bottom: 8px;
}

/* Back link */
.pj-back {
    text-align: center;
    padding: 20px 0 80px;
    background: var(--pj-white);
}
.pj-back a {
    font-family: var(--pj-body);
    color: var(--pj-black);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.pj-back a::before {
    content: "\2190";
    font-size: 18px;
}
.pj-back a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   STORY BLOCKS — inner page (bullets under text, captions, inline CTA,
   centered media, video, media+content split, standalone quotations)
   ========================================================================== */

/* Bullet list directly under section text (Content + Bullets) */
.pj-section__bullets {
    list-style: disc;
    padding-left: 22px;
    margin: 4px 0 0;
    font-family: var(--pj-body);
    font-size: 18px;
    line-height: 1.7;
    color: #000;
    max-width: 780px;
}
.pj-section__bullets li { margin-bottom: 8px; }

/* Inline CTA link used inside content blocks */
.pj-inline-cta {
    font-family: var(--pj-body);
    color: var(--pj-black);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--pj-black);
}
.pj-inline-cta__arrow { display: inline-flex; transition: transform 0.3s ease; transform-origin: 50% 50%; }
.pj-inline-cta:hover .pj-inline-cta__arrow { transform: rotate(45deg); }

/* Caption under images / media */
.pj-caption {
    font-family: var(--pj-body);
    font-size: 13px;
    color: var(--pj-gray);
    text-align: center;
    margin-top: 12px;
}
.pj-full-image { text-align: center; }
.pj-full-image figcaption { text-align: center; }

/* Centered media (video-only, etc.) */
.pj-media-center {
    max-width: 900px;
    margin: 0 auto 60px;
    padding: 0 24px;
    text-align: center;
}
.pj-media-center img { display: block; width: 100%; height: auto; }

/* Responsive video (16:9) — wraps oEmbed iframes and <video> */
.pj-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}
.pj-video iframe,
.pj-video video,
.pj-video embed,
.pj-video object {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* Media + side content (Video + Content, Media + Summary) */
.pj-media-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.pj-media-split__media img { width: 100%; height: auto; display: block; object-fit: cover; }
.pj-media-split__content .pj-section__body { max-width: none; }
.pj-media-split__bullets {
    list-style: disc;
    padding-left: 22px;
    margin: 0;
    font-family: var(--pj-body);
    font-size: 18px;
    line-height: 1.7;
    color: #000;
}
.pj-media-split__bullets li { margin-bottom: 10px; }

/* Standalone quotation (Quote / Quote Group):
   full-width quote text, author block underneath on the bottom-right. */
.pj-quote-group { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.pj-quotation {
    display: block;
    max-width: 1160px;
    margin: 0 auto 48px;
    padding: 0 24px;
}
.pj-quote-group .pj-quotation { padding: 0; }
.pj-quotation:last-child { margin-bottom: 60px; }
.pj-quotation__text {
    font-family: var(--pj-heading);
    font-style: italic;
    font-size: 20px;
    line-height: 1.55;
    color: var(--pj-black);
    margin: 0;
    max-width: none;
}
.pj-quotation__author {
    font-family: var(--pj-body);
    text-align: right;
    margin-top: 22px;
}
.pj-quotation__author span { display: block; }
.pj-quotation__name { font-weight: 700; font-size: 14px; color: var(--pj-black); }
.pj-quotation__role,
.pj-quotation__org { font-size: 13px; color: var(--pj-gray); }
/* Quote with no author → centered text */
.pj-quotation--center { text-align: center; }

/* Stories archive pagination */
.pj-pagination { max-width: 1160px; margin: 10px auto 0; padding: 0 24px; }
.pj-pagination ul { list-style: none; display: flex; gap: 8px; justify-content: center; padding: 0; margin: 0; }
.pj-pagination a, .pj-pagination span {
    font-family: var(--pj-body); font-size: 14px; text-decoration: none;
    padding: 8px 14px; color: var(--pj-black); border: 1px solid #e2e2e2;
}
.pj-pagination .current { background: var(--pj-blue, #005598); color: #fff; border-color: transparent; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .pj-hero__title { font-size: 32px; }
    .pj-lead h2 { font-size: 34px; }
    .pj-project__title { font-size: 26px; }
    .pj-single-hero__title { font-size: 40px; }
    .pj-section__heading { font-size: 28px; }
    .pj-cta-strip h2 { font-size: 34px; }
}

@media (max-width: 900px) {
    /* Hero image overlaps less on small screens */
    .pj-hero__title { font-size: 30px; }
    .pj-hero__image { transform: translateY(50px); }
    .pj-lead { padding: 100px 0 50px; }
    .pj-lead h2 { font-size: 30px; }
    .pj-lead h2 br { display: none; }

    /* Project rows stack. Odd = text then image, Even = image then text. */
    .pj-project__inner {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    .pj-project:nth-of-type(odd) .pj-project__inner {
        grid-template-areas:
            "text"
            "image";
    }
    .pj-project:nth-of-type(even) .pj-project__inner {
        grid-template-areas:
            "text"
            "image";
    }
    /* reset all the desktop bleed paddings/margins */
    .pj-project:nth-of-type(odd) .pj-project__text,
    .pj-project:nth-of-type(even) .pj-project__text {
        padding: 32px 24px !important;
    }
    .pj-project:nth-of-type(odd) .pj-project__text { background: #FFF5E7; }
    .pj-project:nth-of-type(odd) .pj-project__media,
    .pj-project:nth-of-type(even) .pj-project__media {
        margin: 0 !important;
    }
    .pj-project__media img { aspect-ratio: 16 / 10; }
    .pj-project__title,
    .pj-project__desc { max-width: none; }
    .pj-project__title { font-size: 24px; }

    .pj-cta-strip__inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    /* Inner story hero → stacked, contained */
    .pj-single-hero { padding: 44px 0; }
    .pj-single-hero__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .pj-single-hero__text { padding: 0; }
    .pj-single-hero__title {
        font-size: 34px;
        max-width: none;
    }

    .pj-quote,
    .pj-bullets,
    .pj-text-image {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .pj-text-image--image-left,
    .pj-text-image--image-right {
        grid-template-areas:
            "content"
            "image";
    }

    /* Story blocks stack */
    .pj-media-split {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .pj-quotation__text { font-size: 18px; }
}

@media (max-width: 600px) {
    .pj-hero { padding: 40px 0 0; }
    .pj-hero__title { font-size: 26px; }
    .pj-hero__image { padding: 0 16px; transform: translateY(36px); }

    .pj-lead { padding: 74px 0 30px; }
    .pj-lead h2 { font-size: 26px; }
    .pj-lead p { font-size: 14px; padding: 0 20px; }

    .pj-projects { padding: 0 0 20px; }
    .pj-project { padding: 26px 0; }
    .pj-project__title { font-size: 22px; }
    .pj-project__desc { font-size: 13.5px; }

    .pj-cta-strip { padding: 50px 0; }
    .pj-cta-strip h2 { font-size: 26px; }

    .pj-single-hero__text { padding: 40px 16px !important; }
    .pj-single-hero__title { font-size: 28px; }
    .pj-single-hero__image { min-height: 240px; }
    .pj-single-body { padding: 50px 0 20px; }
    .pj-section__heading { font-size: 22px; }
    .pj-section__body { font-size: 14px; }
    .pj-section__bullets,
    .pj-media-split__bullets,
    .pj-bullets__list { font-size: 16px; }

    .pj-quote__body { font-size: 18px; }

    .pj-text-image { gap: 24px; }
}
