/* Only individual project wrappers. Shared design.css and portfolio grid untouched. */
.pyb-single {
  --pyb-case-space: clamp(56px, 8vw, 112px);
  --pyb-case-line: rgba(33,33,32,.16);
  width: min(calc(100% - 80px), 1360px);
  max-width: 1360px;
  margin-inline: auto;
  padding-block: clamp(44px, 6vw, 86px) clamp(64px, 8vw, 120px);
  color: #212120;
}
.pyb-single > * { min-width: 0; }
.pyb-single .back { display: inline-flex; font-size: 13px; font-weight: 700; letter-spacing: .04em; margin-bottom: 36px; text-decoration: none; }
.pyb-single > .wp-block-post-title {
  max-width: 1100px;
  font-size: clamp(44px, 7.4vw, 106px);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 900;
  margin: 0 0 32px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.pyb-single > .wp-block-post-title::after { content: ''; display: block; width: 72px; height: 9px; border-radius: 9px; background: #ffed00; margin-top: 28px; }
.pyb-single .pyb-project-services { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; padding: 0; }
.pyb-single .pyb-project-services a { display: inline-flex; padding: 11px 17px; border: 1px solid var(--pyb-case-line); border-radius: 100px; color: inherit; background: transparent; font-size: 13px; line-height: 1.4; text-decoration: none; }
.pyb-single .pyb-project-services a:hover { background: #ffed00; border-color: #ffed00; }
.pyb-single .wp-block-post-featured-image { width: 100%; max-width: none; margin: 0 0 var(--pyb-case-space); border-radius: 24px; overflow: hidden; background: #efeee8; }
/* Override the old template's inline 16/9 ratio without altering saved attributes. */
.pyb-single .wp-block-post-featured-image img { display: block; width: 100%; height: auto !important; aspect-ratio: auto !important; object-fit: contain !important; }
.pyb-single .wp-block-post-content { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.65fr); column-gap: clamp(36px,7vw,100px); row-gap: 24px; max-width: none; font-size: clamp(17px,1.5vw,20px); line-height: 1.7; }
.pyb-single .wp-block-post-content > * { grid-column: 1 / -1; min-width: 0; max-width: 100%; width: auto; margin: 0 !important; }
.pyb-single .wp-block-post-content > :is(p,ul,ol,blockquote) { grid-column: 2; width: 100%; }
.pyb-single .wp-block-post-content > p:first-child { grid-column: 1 / -1; padding-bottom: 24px; border-bottom: 1px solid var(--pyb-case-line); font-size: 14px; line-height: 1.6; }
.pyb-single .wp-block-post-content > h2 { grid-column: 1; font-size: clamp(28px,3.3vw,46px); line-height: 1.12; letter-spacing: -.045em; margin-top: 56px !important; text-wrap: balance; }
.pyb-single .wp-block-post-content > h2 + :is(p,ul,ol) { margin-top: 56px !important; }
.pyb-single .wp-block-post-content > :is(figure,.wp-block-columns,.pyb-case-pattern) { margin-block: 36px !important; }
.pyb-single .wp-block-post-content > p:empty { display: none; }
.pyb-single .wp-block-post-content :is(img,video) { max-width: 100%; height: auto; display: block; border-radius: 16px; }
.pyb-single .wp-block-post-content img { object-fit: contain; transition: transform .4s ease; }
.pyb-single .wp-block-post-content :is(figure,.wp-block-column) { min-width: 0; }
.pyb-single .wp-block-post-content .wp-block-image { overflow: visible; }
.pyb-single .wp-block-post-content .wp-block-image img { width: 100%; }
.pyb-single .wp-block-post-content :is(.alignwide,.alignfull) { width: 100%; max-width: 100%; margin-inline: 0; }
.pyb-single .wp-block-post-content .wp-block-columns { gap: clamp(20px,3vw,44px); align-items: flex-start; }
.pyb-single .wp-block-post-content .wp-block-column > * + * { margin-top: 28px; }
.pyb-single .wp-block-post-content :is(h1,h2,h3) { overflow-wrap: anywhere; }
.pyb-single .wp-block-post-content figcaption { font-size: 13px; line-height: 1.5; margin-top: 12px; opacity: .72; }
.pyb-single .wp-block-post-content .wp-block-gallery { gap: 24px; }
.pyb-single .wp-block-post-content .wp-block-gallery img { height: auto !important; aspect-ratio: auto !important; object-fit: contain !important; }
.pyb-single .wp-block-post-content .wp-block-embed iframe { max-width: 100%; }
.pyb-single .wp-block-post-content .wp-block-embed.is-type-video .wp-block-embed__wrapper { aspect-ratio: var(--pyb-video-ratio, 16 / 9); }
.pyb-single .wp-block-post-content .wp-block-embed.is-type-video iframe { width: 100%; height: 100%; border: 0; border-radius: 16px; }
.pyb-single .wp-block-post-content .wp-block-embed.is-type-video .wp-block-embed__wrapper::before { display: none; }
.pyb-single .pyb-case-pattern { width: 100%; }
.pyb-single .pyb-case-asymmetric > .wp-block-column:last-child { padding-top: clamp(32px,6vw,96px); }
.pyb-single .pyb-case-copy { padding: clamp(24px,4vw,52px); background: #f0efe7; border-radius: 22px; }
.pyb-single .pyb-case-copy h2 { font-size: clamp(26px,3vw,42px); letter-spacing: -.035em; }
.pyb-single .pyb-project-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-block: 28px; margin: var(--pyb-case-space) 0 48px; border-block: 1px solid var(--pyb-case-line); font-size: 14px; }
.pyb-single .pyb-project-next a { color: inherit; text-decoration: none; }
.pyb-single .pyb-project-next a:hover { text-decoration: underline; text-underline-offset: 5px; }
.pyb-single .pyb-simple-cta { display: flex; justify-content: space-between; align-items: center; gap: 28px; width: 100%; max-width: none; padding: clamp(30px,5vw,68px); margin: 0; border-radius: 26px; background: #ffed00; color: #212120; font-family: var(--wp--preset--font-family--display,'Archivo Black',Arial,sans-serif); font-size: clamp(27px,4.5vw,62px); line-height: 1.12; letter-spacing: -.045em; text-decoration: none; text-wrap: balance; }
.pyb-single .pyb-simple-cta:hover { transform: none; }
.pyb-single .pyb-cta-arrow { display: inline-block; flex: 0 0 auto; font-family: Arial,sans-serif; transition: transform .25s ease; }
.pyb-single .pyb-simple-cta:hover .pyb-cta-arrow { transform: translate(4px,-4px); }
.pyb-single a:focus-visible { outline: 3px solid #365ff0; outline-offset: 5px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .pyb-single .wp-block-post-content .wp-block-image img:hover { transform: scale(1.015); }
}
@media (max-width:1000px) {
  .pyb-single { width: calc(100% - 48px); }
  /* Existing Elemento V25 headings may have a fixed inline font size. */
  .pyb-single .wp-block-post-content h1 { font-size: clamp(32px,5.8vw,64px) !important; --pyb-fontSize: clamp(32px,5.8vw,64px) !important; padding-inline: 0 !important; }
}
@media (max-width:781px) {
  .pyb-single { width: calc(100% - 36px); padding-top: 36px; }
  .pyb-single > .wp-block-post-title { letter-spacing: -.045em; }
  .pyb-single .wp-block-post-content { display: block; }
  .pyb-single .wp-block-post-content > * + * { margin-top: 22px !important; }
  .pyb-single .wp-block-post-content > h2 { margin-top: 56px !important; }
  .pyb-single .wp-block-post-content > h2 + :is(p,ul,ol) { margin-top: 22px !important; }
  .pyb-single .wp-block-post-content .wp-block-columns { display: flex; flex-wrap: wrap !important; gap: 24px; }
  .pyb-single .wp-block-post-content .wp-block-columns > .wp-block-column { flex-basis: 100% !important; }
  .pyb-single .pyb-case-asymmetric > .wp-block-column:last-child { padding-top: 0; }
  .pyb-single .wp-block-post-featured-image { border-radius: 16px; }
  .pyb-single .pyb-simple-cta { border-radius: 20px; gap: 12px; }
  .pyb-single .pyb-project-next { margin-bottom: 32px; }
}
@media (prefers-reduced-motion:reduce) {
  .pyb-single *, .pyb-single *::before, .pyb-single *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .pyb-single .wp-block-post-content img:hover, .pyb-single .pyb-simple-cta:hover .pyb-cta-arrow { transform: none; }
}
/* A saved V25 CTA may carry margin:40px inline; keep it inside the page on mobile. */
.pyb-single .pyb-simple-cta { margin-inline: 0 !important; box-sizing: border-box; }
.pyb-single > p:empty { display: none; }

/* Preserve WordPress provider ratios for embedded videos, including portrait. */
.pyb-single .wp-embed-aspect-21-9 { --pyb-video-ratio: 21 / 9; }
.pyb-single .wp-embed-aspect-18-9 { --pyb-video-ratio: 18 / 9; }
.pyb-single .wp-embed-aspect-4-3 { --pyb-video-ratio: 4 / 3; }
.pyb-single .wp-embed-aspect-1-1 { --pyb-video-ratio: 1; }
.pyb-single .wp-embed-aspect-9-16 { --pyb-video-ratio: 9 / 16; }
.pyb-single .wp-embed-aspect-1-2 { --pyb-video-ratio: 1 / 2; }

/* 3.2.1: section copy below its heading and compact final button. */
.pyb-single .wp-block-post-content { display: block; }
.pyb-single .wp-block-post-content > * + * { margin-top: 24px !important; }
.pyb-single .wp-block-post-content > h2 + :is(p,ul,ol) { margin-top: 22px !important; }
.pyb-single .pyb-simple-cta {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 18px 27px;
  gap: 12px;
  border-radius: 100px;
  font-family: var(--wp--preset--font-family--body,'DM Sans',Arial,sans-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
}
