/* Native WordPress media, with full-frame photographs and touch navigation. */
.portfolio-page { padding-top: 64px; }
.portfolio-page > h1 { font-size: clamp(36px, 4.5vw, 58px); line-height: 1.1; margin: 0 0 24px; }
.portfolio-page > p { max-width: 780px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.ejc-portfolio-featured { padding-block: 84px; }
.ejc-portfolio-featured > h2 { font-size: clamp(30px, 3.5vw, 44px); margin: 0 0 32px; }
.ejc-portfolio-featured-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 64px; }
.ejc-portfolio-copy h2, .ejc-portfolio-copy h3 { font-size: clamp(25px, 2.5vw, 34px); line-height: 1.25; margin: 0 0 20px; }
.ejc-portfolio-copy p { font-size: 15px; line-height: 1.85; color: var(--muted); max-width: 440px; }
.ejc-portfolio-copy .button { margin-top: 22px; }
.ejc-portfolio-copy a:not(.button) { text-underline-offset: 4px; font-weight: 650; }
.ejc-portfolio { padding-block: 28px 88px; }
.ejc-portfolio-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.ejc-portfolio-filters[hidden], .ejc-portfolio-card[hidden] { display: none !important; }
.ejc-portfolio-filters button { appearance: none; font: inherit; font-size: 13px; font-weight: 650; border: 1px solid var(--line); color: var(--ink); background: white; border-radius: 999px; padding: 12px 20px; min-height: 46px; cursor: pointer; }
.ejc-portfolio-filters button[aria-pressed="true"] { background: var(--st-brand-dark); color: white; border-color: var(--st-brand-dark); }
.ejc-portfolio-count { font-size: 12px; color: var(--muted); margin: 14px 0 28px; }
.ejc-portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; align-items: start; }
.ejc-portfolio-card { min-width: 0; border-top: 1px solid var(--line); padding-top: 24px; }
.ejc-portfolio-card h2 { font-size: clamp(22px, 2.1vw, 28px); line-height: 1.3; margin: 0 0 12px; }
.ejc-portfolio-card h2 a { color: var(--ink); text-decoration: none; }
.ejc-portfolio-card h2 a:hover { color: var(--st-brand-dark); }
.ejc-portfolio-card > p { font-size: 14px; color: var(--muted); margin: 0 0 24px; line-height: 1.85; }
.ejc-portfolio-card .ejc-gallery { margin-block: 24px 0; }
.ejc-gallery { min-width: 0; max-width: 100%; margin: 0; }
.ejc-gallery:not(.is-enhanced), .ejc-gallery-track { display: flex; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #94a3b8 #edf2f5; border-radius: 12px; background: #edf2f5; gap: 0; }
.ejc-gallery-track { -webkit-overflow-scrolling: touch; }
.ejc-gallery:not(.is-enhanced) > figure, .ejc-gallery-track > figure { flex: 0 0 100%; position: relative; min-width: 0; width: 100%; max-width: 100%; height: clamp(330px, 35vw, 510px); margin: 0 !important; padding: 0 0 36px; box-sizing: border-box; scroll-snap-align: start; scroll-snap-stop: always; border-radius: 0; overflow: hidden; }
.ejc-gallery figure > a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.ejc-gallery figure img, .ejc-gallery figure video { display: block; width: 100% !important; height: 100% !important; max-width: 100%; object-fit: contain !important; aspect-ratio: auto !important; border-radius: 0 !important; margin: 0; transform: none !important; }
.ejc-gallery figure video { background: #101823; }
.ejc-gallery figure figcaption { position: absolute; bottom: 0; inset-inline: 0; height: 36px; display: flex; justify-content: center; align-items: center; margin: 0; padding: 0 12px; background: #fff; color: #334155; font-size: 12px; font-weight: 650; text-align: center; }
.ejc-gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.ejc-gallery-arrow { font: inherit; font-size: 20px; width: 46px; height: 46px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); cursor: pointer; }
.ejc-gallery-arrow:hover:not(:disabled) { border-color: var(--st-brand-dark); background: #f0fbfd; }
.ejc-gallery-arrow:disabled, .ejc-lightbox button:disabled { opacity: .3; cursor: default; }
.ejc-gallery-status { font-size: 12px; font-weight: 600; color: #475569; text-align: center; }
.ejc-gallery-thumbs { display: flex; gap: 10px; justify-content: flex-start; margin-top: 12px; padding: 4px; overflow-x: auto; }
.ejc-gallery-thumbs > :first-child { margin-inline-start: auto; }
.ejc-gallery-thumbs > :last-child { margin-inline-end: auto; }
.ejc-gallery-dot { position: relative; appearance: none; display: block; flex: 0 0 58px; width: 58px; height: 58px; border: 2px solid transparent; border-radius: 7px; padding: 3px; background: #f1f5f9; cursor: pointer; overflow: hidden; }
.ejc-gallery-dot img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.ejc-gallery-dot[aria-pressed="true"] { border-color: var(--st-brand-dark); background: #fff; }
.ejc-gallery-dot > span { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: #0f172a40; font-size: 17px; }
.work-detail { max-width: 1050px; padding-block: 56px 80px; }
.work-detail h1 { margin: 24px 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.15; }
.work-detail .work-content > p { max-width: 720px; color: var(--muted); font-size: 16px; margin-bottom: 30px; }
.work-detail .ejc-gallery { max-width: 900px; margin: 32px auto; }
.work-detail .ejc-gallery-track > figure { height: min(70vh, 680px); min-height: 360px; }
.ejc-lightbox-open { overflow: hidden; }
.ejc-lightbox { position: fixed; inset: 0; margin: auto; width: min(1160px, 100%); height: min(940px, 100%); max-width: 100vw; max-height: 100dvh; border: 0; padding: 20px; background: #0c1522; color: #fff; border-radius: 12px; }
.ejc-lightbox::backdrop { background: #020617ed; }
.ejc-lightbox-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ejc-lightbox-top, .ejc-lightbox-bottom { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 20px; }
.ejc-lightbox-top p { margin: 0; font-size: 15px; }
.ejc-lightbox button { width: 48px; height: 48px; padding: 0; flex: none; color: #fff; border: 1px solid #475569; border-radius: 50%; background: #1e293b; font-size: 24px; cursor: pointer; }
.ejc-lightbox button:focus-visible { outline-color: #67e8f9; }
.ejc-lightbox-image { min-height: 0; flex: 1; padding-block: 16px; display: flex; justify-content: center; align-items: center; touch-action: pan-y pinch-zoom; }
.ejc-lightbox-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.ejc-lightbox-bottom { justify-content: center; font-size: 13px; }
@media (max-width: 900px) {
  .ejc-portfolio-featured-grid { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
  .ejc-portfolio-grid { gap: 40px 24px; }
}
@media (max-width: 700px) {
  .portfolio-page { padding-top: 36px; }
  .portfolio-page > p { font-size: 14px; }
  .ejc-portfolio-featured { padding-block: 48px; }
  .ejc-portfolio-featured > h2 { font-size: 29px; margin-bottom: 24px; }
  .ejc-portfolio-featured-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .ejc-portfolio-copy h2, .ejc-portfolio-copy h3 { font-size: 25px; }
  .ejc-portfolio-copy p { font-size: 14px; }
  .ejc-portfolio-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ejc-portfolio { padding-block: 24px 48px; }
  .ejc-portfolio-filters { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 12px; margin-inline: -4px; }
  .ejc-portfolio-filters button { flex: none; font-size: 12px; padding-inline: 16px; }
  .ejc-gallery:not(.is-enhanced) > figure, .ejc-gallery-track > figure { height: 390px; }
  .ejc-gallery-thumbs { gap: 7px; }
  .ejc-gallery-dot { flex-basis: 48px; width: 48px; height: 52px; }
  .ejc-lightbox { padding: 12px; border-radius: 0; height: 100dvh; }
  .work-detail { padding-block: 36px 52px; }
}
@media (max-width: 360px) {
  .ejc-gallery:not(.is-enhanced) > figure, .ejc-gallery-track > figure { height: 340px; }
  .ejc-gallery-status { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ejc-gallery-track { scroll-behavior: auto; }
}
