/* OverlandEurope Portfolio Template v1.0.3 */
body.oe-portfolio-post {
    background: var(--oe-colour-background, #faf5ea);
    color: var(--oe-colour-text, #111111);
}
.oe-portfolio { width:100%; margin:0; padding:0 0 var(--oe-space-section,72px); overflow:clip; background:var(--oe-colour-background,#faf5ea); }
.oe-portfolio__article { width:100%; max-width:none; margin:0; }
.oe-portfolio__sequence.entry-content { width:100% !important; max-width:none !important; margin:0 !important; padding:0 !important; }
.oe-portfolio__header { padding:clamp(54px,7vw,96px) 24px clamp(34px,4.5vw,60px); }
.oe-portfolio__header-inner { width:min(860px,100%); margin:0 auto; }
.oe-portfolio__eyebrow,.oe-portfolio__end-label { margin:0 0 18px; color:var(--oe-colour-navy,#000080); font-family:var(--oe-font-body,Inter,Arial,sans-serif); font-size:12px; font-weight:600; line-height:1.3; letter-spacing:.08em; text-transform:uppercase; }
.oe-portfolio__title { max-width:860px; margin:0; color:var(--oe-colour-text,#111); font-family:var(--oe-font-heading,Georgia,serif); font-size:var(--oe-h1-size,40px); font-weight:500; line-height:1.12; text-wrap:balance; }
.oe-portfolio__credit { margin-top:22px; color:var(--oe-colour-text-secondary,#666); font-family:var(--oe-font-body,Inter,Arial,sans-serif); font-size:14px; line-height:1.55; }
.oe-portfolio__intro { max-width:780px; margin-top:30px; color:var(--oe-colour-text,#111); font-family:var(--oe-font-body,Inter,Arial,sans-serif); font-size:16px; line-height:1.75; }
.oe-portfolio__intro p { margin:0; }
.oe-portfolio__hero { width:min(1440px,calc(100vw - 80px)); max-width:none; margin:0 auto clamp(64px,7vw,104px); }
.oe-portfolio__hero img { display:block; width:100%; height:auto; max-width:none; border-radius:0; box-shadow:none; }
.oe-portfolio figcaption { margin:9px 0 0; color:var(--oe-colour-text-secondary,#666); font-family:var(--oe-font-body,Inter,Arial,sans-serif); font-size:13px; font-style:italic; line-height:1.5; text-align:left; }

/* Existing single Image blocks remain supported. */
.oe-portfolio__sequence > figure.wp-block-image,
.oe-portfolio__sequence > .wp-block-gallery,
.oe-portfolio__sequence > figure.wp-block-gallery { width:min(1440px,calc(100vw - 80px)); max-width:none; margin:0 auto 64px; }
.oe-portfolio__sequence figure.wp-block-image img,.oe-portfolio__sequence .wp-block-gallery img { display:block; width:100%; height:auto; max-width:none; border-radius:0; box-shadow:none; }
.oe-portfolio__sequence > figure.wp-block-image.alignfull,.oe-portfolio__sequence > .wp-block-gallery.alignfull,.oe-portfolio__sequence > figure.wp-block-gallery.alignfull { width:min(1800px,calc(100vw - 32px)); }
.oe-portfolio__sequence > figure.wp-block-image.oe-portfolio-image--portrait { width:min(720px,calc(100vw - 48px)); margin-top:clamp(82px,8vw,128px); margin-bottom:clamp(82px,8vw,128px); }

/* Batch editorial sequence. Tight gutters within groups, generous pauses between groups. */
.oe-portfolio-sequence { position:relative; width:min(1440px,calc(100vw - 80px)) !important; max-width:none !important; margin:0 auto !important; clear:both; }
.oe-portfolio-sequence__row { display:flex; align-items:stretch; gap:8px; width:100%; margin:0 0 18px; }
.oe-portfolio-sequence__row + .oe-portfolio-sequence__row { margin-top:0; }
.oe-portfolio-sequence__item { position:relative; flex:var(--oe-photo-ratio) 1 0; min-width:0; margin:0; overflow:visible; background:transparent; }
.oe-portfolio-sequence__row--2 .oe-portfolio-sequence__item,
.oe-portfolio-sequence__row--3 .oe-portfolio-sequence__item { height:clamp(320px,31vw,520px); }
.oe-portfolio-sequence__row--3 .oe-portfolio-sequence__item { height:clamp(260px,25vw,430px); }
.oe-portfolio-sequence__image { display:block; width:100%; height:100%; max-width:none; object-fit:cover; border-radius:0; box-shadow:none; cursor:zoom-in; }
.oe-portfolio-sequence__row--statement .oe-portfolio-sequence__item { height:auto; }
.oe-portfolio-sequence__row--statement .oe-portfolio-sequence__image { height:auto; object-fit:contain; }
.oe-portfolio-sequence__row--portrait-single { justify-content:center; }
.oe-portfolio-sequence__row--portrait-single .oe-portfolio-sequence__item { flex:0 1 min(720px,55vw); }
.oe-portfolio-sequence__row--portrait-single .oe-portfolio-sequence__image { height:auto; object-fit:contain; }

/* Reading-width islands for Portfolio Essay and any optional Portfolio text. */
.oe-portfolio__sequence > p,.oe-portfolio__sequence > h2,.oe-portfolio__sequence > h3,.oe-portfolio__sequence > h4,.oe-portfolio__sequence > blockquote,.oe-portfolio__sequence > ul,.oe-portfolio__sequence > ol { width:min(780px,calc(100vw - 48px)); margin-left:auto; margin-right:auto; }
.oe-portfolio__sequence > p { margin-top:0; margin-bottom:36px; font-family:var(--oe-font-body,Inter,Arial,sans-serif); font-size:16px; line-height:1.8; }
.oe-portfolio__sequence > h2,.oe-portfolio__sequence > h3,.oe-portfolio__sequence > h4 { font-family:var(--oe-font-heading,Georgia,serif); font-weight:500; }

/* Essay deliberately has more breathing room around prose and image groups. */
.oe-portfolio-essay-post .oe-portfolio__sequence > p { margin-bottom:34px; }
.oe-portfolio-essay-post .oe-portfolio__sequence > .oe-portfolio-sequence { margin-top:clamp(52px,6vw,84px); margin-bottom:clamp(56px,6vw,88px); }
.oe-portfolio-essay-post .oe-portfolio__sequence > .oe-portfolio-sequence + p { margin-top:0; }

.oe-portfolio__end-credit { width:min(780px,calc(100vw - 48px)); margin:clamp(88px,9vw,136px) auto 0; padding-top:28px; border-top:1px solid var(--oe-colour-border,#d9d6cf); }
.oe-portfolio__end-label { margin-bottom:10px; }
.oe-portfolio__end-names { color:var(--oe-colour-text,#111); font-family:var(--oe-font-heading,Georgia,serif); font-size:20px; font-weight:500; line-height:1.4; }

@media (max-width: 767px) {
    .oe-portfolio__header { padding:38px 20px 34px; }
    .oe-portfolio__header-inner { width:100%; }
    .oe-portfolio__eyebrow { font-size:12px; margin-bottom:12px; }
    .oe-portfolio__title { font-size:clamp(34px,9.5vw,40px); line-height:1.06; }
    .oe-portfolio__credit { margin-top:18px; font-size:15px; line-height:1.5; }
    .oe-portfolio__intro { margin-top:24px; font-size:18px; line-height:1.55; }

    .oe-portfolio__hero,
    .oe-portfolio__sequence > figure.wp-block-image,
    .oe-portfolio__sequence > .wp-block-gallery,
    .oe-portfolio__sequence > figure.wp-block-gallery,
    .oe-portfolio__sequence > figure.wp-block-image.alignfull,
    .oe-portfolio__sequence > .wp-block-gallery.alignfull,
    .oe-portfolio__sequence > figure.wp-block-gallery.alignfull { width:calc(100vw - 24px); margin-bottom:48px; }
    .oe-portfolio__hero { margin-bottom:56px; }
    .oe-portfolio__sequence > figure.wp-block-image.oe-portfolio-image--portrait { width:calc(100vw - 24px); margin-top:64px; margin-bottom:64px; }

    .oe-portfolio-sequence { width:calc(100vw - 24px) !important; max-width:none !important; margin-left:auto !important; margin-right:auto !important; }
    .oe-portfolio-sequence__row { gap:6px; margin-bottom:14px; }
    .oe-portfolio-sequence__row--statement { margin-bottom:14px; }
    .oe-portfolio-sequence__row--2 { flex-wrap:nowrap; }
    .oe-portfolio-sequence__row--2 .oe-portfolio-sequence__item { height:clamp(170px,45vw,280px); min-width:0; }
    .oe-portfolio-sequence__row--3 { flex-wrap:wrap; }
    .oe-portfolio-sequence__row--3 .oe-portfolio-sequence__item { height:clamp(170px,45vw,280px); min-width:calc(50% - 3px); }
    .oe-portfolio-sequence__row--3 .oe-portfolio-sequence__item:first-child { flex-basis:100%; height:auto; }
    .oe-portfolio-sequence__row--3 .oe-portfolio-sequence__item:first-child .oe-portfolio-sequence__image { height:auto; object-fit:contain; }
    .oe-portfolio-sequence__row--portrait-single .oe-portfolio-sequence__item { flex-basis:100%; }
    .oe-portfolio-sequence__row--portrait-single { margin-top:52px; margin-bottom:52px; }

    .oe-portfolio figcaption { margin-top:7px; font-size:12px; }
    .oe-portfolio__sequence > p { font-size:16px; line-height:1.75; }
}
