/* Isopaint Journal v2 — clean Gutenberg-first stylesheet. NO ACF layout rules. */
body:has(.isj){background:#f8f6f1}
body:has(.isj) #page,body:has(.isj) #content{background:transparent}
body:has(.isj) #content.site-content{display:block;width:100%;max-width:none;margin:0;padding:0}
.isj{--ink:#27352e;--muted:#617065;--paper:#f8f6f1;--line:#dadcd3;color:var(--ink);background:var(--paper);width:100%;max-width:none;float:none;padding:0 0 75px;box-sizing:border-box}
.isj *, .isj *::before, .isj *::after{box-sizing:border-box}
.isj a{text-decoration:none}
.isj-wide{width:min(1180px,calc(100% - 48px));margin-left:auto;margin-right:auto}
.isj-narrow{width:min(790px,calc(100% - 48px));margin-left:auto;margin-right:auto}
.isj-eyebrow{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:700;color:#687e6d}
.isj-post-meta{color:#7b877d;font-size:12px;letter-spacing:.07em;text-transform:uppercase}
/* Blog listing */
.isj-archive-header{text-align:center;padding:92px 0 46px}
.isj-archive-header h1{font-size:clamp(38px,5.5vw,76px);font-weight:400;line-height:1.08;letter-spacing:-.055em;color:var(--ink);margin:17px auto 20px;max-width:1050px}
.isj-archive-header p{font-size:clamp(16px,1.4vw,19px);line-height:1.7;color:var(--muted);max-width:780px;margin:0 auto}
.isj-topics{display:flex;flex-wrap:wrap;gap:8px;padding:0 0 35px;border-bottom:1px solid var(--line);margin-bottom:42px}
.isj-topics a{border:1px solid var(--line);border-radius:30px;padding:9px 16px;color:#526457;background:transparent;font-size:13px;transition:background .2s}
.isj-topics a:hover,.isj-topics a.is-current{background:#27352e;color:white;border-color:#27352e}
.isj-archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:46px 25px}
.isj-card{min-width:0}
.isj-card-media{display:block;aspect-ratio:4/3;overflow:hidden;background:#ecebe4;border-radius:2px}
.isj-card-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s}
.isj-card:hover .isj-card-media img{transform:scale(1.035)}
.isj-card-placeholder{height:100%;min-height:180px;display:grid;place-items:center;color:#77867b;background:#e8e8df;font-size:12px;letter-spacing:.18em;text-align:center}
.isj-card-copy{padding-top:18px}
.isj-card-copy .isj-post-meta{margin:0 0 11px}
.isj-card h2{font-size:clamp(20px,2vw,27px);font-weight:500;letter-spacing:-.03em;line-height:1.28;margin:0 0 12px}
.isj-card h2 a{color:var(--ink)}
.isj-card-excerpt{font-size:14px;color:var(--muted);line-height:1.75;margin:0 0 15px}
.isj-read,.isj-back{font-size:13px;font-weight:600;color:#405b49;border-bottom:1px solid currentColor;padding-bottom:4px}
.isj-pagination{margin:48px 0 0}
.isj-pagination ul{display:flex;flex-wrap:wrap;list-style:none;gap:9px;padding:0;margin:0;justify-content:center}
.isj-pagination a,.isj-pagination span{display:block;border:1px solid var(--line);padding:8px 14px;color:var(--ink)}
.isj-pagination .current{background:var(--ink);color:#fff}
.isj-empty{text-align:center;padding:70px 15px}
/* Single article header / hero */
.isj-article-header{padding:58px 0 36px;text-align:center}
.isj-article-header .isj-back{display:inline-block;margin:0 0 26px}
.isj-article-header h1{font-size:clamp(34px,5vw,66px);font-weight:400;letter-spacing:-.05em;line-height:1.12;margin:18px 0 20px;color:var(--ink)}
.isj-deck{font-size:clamp(16px,1.5vw,20px);line-height:1.72;color:var(--muted);margin:0}
.isj-article-hero{margin-top:0;margin-bottom:48px}
.isj-article-hero img{width:100%;height:auto;max-height:680px;object-fit:cover;display:block}
.isj-article-hero figcaption,.isj-content figcaption{font-size:12px;line-height:1.55;color:#7b857b;margin-top:10px;text-align:left}
/* Normal Gutenberg content; no forced heights, gaps, or ACF sections */
.isj-content{overflow:visible}
.isj-content > *:not(.alignwide):not(.alignfull){max-width:790px;margin-left:auto;margin-right:auto}
.isj-content > .alignwide,.isj-content > .alignfull{max-width:1180px;width:100%;margin-left:auto;margin-right:auto}
.isj-content > .wp-block-columns,.isj-content > .wp-block-gallery,.isj-content > .wp-block-cover,.isj-content > .wp-block-media-text{max-width:1100px}
.isj-content p,.isj-content li{font-size:17px;line-height:1.85;color:#425248}
.isj-content p{margin-top:0;margin-bottom:24px}
.isj-content h2{font-size:clamp(25px,3vw,38px);font-weight:500;letter-spacing:-.035em;line-height:1.24;margin-top:60px;margin-bottom:22px;color:var(--ink)}
.isj-content h3{font-size:clamp(21px,2vw,28px);font-weight:500;letter-spacing:-.02em;line-height:1.35;margin-top:34px;margin-bottom:15px;color:var(--ink)}
.isj-content a{color:#335f45;text-decoration:underline;text-underline-offset:3px}
.isj-content :is(ul,ol){padding-left:26px;margin-bottom:26px}
.isj-content :is(figure,.wp-block-gallery,.wp-block-columns,.wp-block-cover,.wp-block-media-text){margin-top:34px;margin-bottom:40px}
.isj-content .wp-block-image img{display:block;max-width:100%;height:auto}
.isj-content figure.wp-block-image{max-width:100%;}
.isj-content .wp-block-gallery{gap:14px}
.isj-content .wp-block-gallery img{width:100%;height:auto}
.isj-content .wp-block-columns{gap:clamp(20px,4vw,58px);align-items:center}
.isj-content .wp-block-columns .wp-block-column{min-width:0}
.isj-content .wp-block-columns h2{margin-top:0}
.isj-content .wp-block-media-text{gap:30px}
.isj-content .wp-block-media-text img{width:100%;height:auto}
.isj-content blockquote{border-left:3px solid #9daea0;padding-left:26px;font-style:italic;color:var(--ink)}
.isj-content .wp-block-separator{border:0;border-top:1px solid var(--line);margin-top:48px;margin-bottom:48px}
.isj-content .wp-block-button__link{background:#27352e;color:#fff;text-decoration:none;padding:13px 23px;border-radius:4px;font-size:14px}
.isj-content .wp-block-button__link:hover{background:#3c5743}
.isj-content .wp-block-cover{min-height:360px;border-radius:2px;overflow:hidden}
.isj-content .wp-block-cover :is(h2,p){color:inherit}
.isj-content .wp-block-table table{border-collapse:collapse;width:100%}
.isj-content .wp-block-table :is(td,th){padding:12px 15px;border:1px solid var(--line);font-size:14px;text-align:left}
.isj-page-links{margin:30px auto}
/* Related reading */
.isj-related{padding:54px 0 40px;margin-top:65px;border-top:1px solid var(--line)}
.isj-related h2{font-size:30px;font-weight:500;color:var(--ink);margin:12px 0 25px}
.isj-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.isj-related-card{display:block;color:var(--ink)}
.isj-related-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;margin-bottom:13px}
.isj-related-card strong{display:block;font-size:16px;line-height:1.5;font-weight:600}
.isj-article-footer{border-top:1px solid var(--line);padding-top:28px}
@media(max-width:900px){.isj-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.isj-archive-header{padding-top:65px}}
@media(max-width:680px){.isj-wide,.isj-narrow{width:calc(100% - 36px)}.isj-archive-grid,.isj-related-grid{grid-template-columns:1fr;gap:30px}.isj-article-header{padding-top:37px}.isj-article-hero{margin-bottom:30px}.isj-article-hero img{max-height:none}.isj-content p,.isj-content li{font-size:16px;line-height:1.8}.isj-content h2{margin-top:43px}.isj-content .wp-block-columns{gap:20px}.isj-related{margin-top:40px}.isj-topics{gap:7px}}
@media(prefers-reduced-motion:reduce){.isj-card-media img{transition:none!important}}

/* v2.1: two optional ACF Free conveniences; rich body remains Gutenberg. */
.isj-article-intro{padding:0 0 26px}
.isj-article-intro p{font-size:clamp(17px,1.5vw,20px);color:#526256;line-height:1.85;margin:0 0 18px}
.isj-featured-product{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.8fr);gap:clamp(24px,5vw,74px);align-items:center;margin-top:70px;margin-bottom:55px;padding:35px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#f1efe9}
.isj-featured-product h2{font-size:14px;font-weight:500;color:#647369;margin:14px 0 22px}
.isj-featured-product h3{font-size:clamp(23px,3vw,38px);font-weight:500;color:var(--ink);margin:0 0 18px;line-height:1.2}
.isj-featured-product p{font-size:16px;line-height:1.8;color:#526256;margin:0 0 28px}
.isj-product-link{display:inline-block;background:#27352e;color:#fff!important;padding:13px 22px;text-decoration:none!important;font-size:14px}
.isj-featured-product-media{display:block;background:#e8e7df;min-width:0}
.isj-featured-product-media img{display:block;width:100%;height:auto;max-height:400px;object-fit:contain}
.isj-product-placeholder{display:grid;place-items:center;min-height:250px;color:#79877c;font-size:12px;letter-spacing:.15em}
@media(max-width:680px){.isj-featured-product{grid-template-columns:1fr;padding:25px 18px;gap:24px;margin-top:45px}}

/* Journal v2.2 – responsive ACF Free editorial layout */
.isj-editorial-section{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(26px,5vw,68px);align-items:start;margin-top:clamp(24px,3.2vw,44px);margin-bottom:clamp(24px,3.2vw,44px)}
.isj-editorial-section:not(:has(.isj-editorial-gallery)){grid-template-columns:1fr;max-width:790px}
.isj-editorial-section.isj-editorial--reverse .isj-editorial-gallery{order:-1}
.isj-editorial-copy h2,.isj-editorial-conclusion h2{font-size:clamp(25px,2.8vw,39px);line-height:1.2;letter-spacing:-.035em;font-weight:500;color:#27352e;margin:0 0 24px}
.isj-editorial-body p,.isj-editorial-conclusion p,.isj-editorial-body li{color:#435349;font-size:17px;line-height:1.82;margin:0 0 18px}
.isj-editorial-body ul,.isj-editorial-body ol{padding-left:25px;margin-bottom:22px}
.isj-editorial-gallery{display:grid;gap:14px;min-width:0;align-items:start}
.isj-editorial-gallery--two{grid-template-columns:repeat(2,minmax(0,1fr))}
.isj-editorial-figure{margin:0;min-width:0}
.isj-editorial-figure img{width:100%;height:auto;display:block;aspect-ratio:auto;object-fit:contain;max-height:none;image-rendering:auto}
.isj-editorial-gallery--two img{aspect-ratio:auto;max-height:none}
.isj-editorial-figure figcaption{font-size:12px;line-height:1.55;color:#667469;margin-top:9px}
.isj-editorial-conclusion{margin-top:60px;margin-bottom:45px;padding-top:28px;border-top:1px solid #dddcd3}
@media(max-width:780px){.isj-editorial-section,.isj-editorial-section:not(:has(.isj-editorial-gallery)){grid-template-columns:1fr;gap:22px}.isj-editorial-section.isj-editorial--reverse .isj-editorial-gallery{order:initial}.isj-editorial-gallery--two{gap:10px}.isj-editorial-body p,.isj-editorial-conclusion p{font-size:16px}.isj-editorial-section{margin-top:26px;margin-bottom:26px}}

/* v2.4: tighter editorial rhythm and top-aligned media/text. */
.isj-article-intro{padding-bottom:10px}
.isj-editorial-section + .isj-editorial-section{margin-top:clamp(28px,3vw,42px)}
.isj-editorial-section .isj-editorial-copy{align-self:start}
.isj-editorial-section .isj-editorial-gallery{align-self:start}
.isj-editorial-copy h2{margin-bottom:18px}
.isj-editorial-body p{margin-bottom:15px}
.isj-editorial-conclusion{margin-top:34px;margin-bottom:35px}
@media (max-width:780px){.isj-editorial-section + .isj-editorial-section{margin-top:30px}}

/* v2.5 — Hard reset for third-party section sizing and compact article rhythm.
   Explicitly opt blog editorial sections out of full-height / animation layout rules. */
body .isj-single section.isj-editorial-section {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: clamp(22px, 3vw, 42px) !important;
  width: min(1180px, calc(100% - 48px)) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 auto 38px !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  clear: both !important;
}
body .isj-single section.isj-editorial-section > .isj-editorial-copy,
body .isj-single section.isj-editorial-section > .isj-editorial-gallery {
  box-sizing: border-box !important;
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: flex-start !important;
  position: static !important;
  transform: none !important;
}
body .isj-single section.isj-editorial-section:not(:has(.isj-editorial-gallery)) > .isj-editorial-copy {
  flex: 0 1 790px !important;
  width: auto !important;
}
body .isj-single section.isj-editorial--reverse > .isj-editorial-gallery {order: -1 !important;}
body .isj-single .isj-editorial-gallery {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 12px !important;
}
body .isj-single .isj-editorial-gallery--two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body .isj-single .isj-editorial-gallery .isj-editorial-figure { margin: 0 !important; padding: 0 !important; min-height: 0 !important; height: auto !important; }
body .isj-single .isj-editorial-gallery .isj-editorial-figure img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 520px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}
body .isj-single .isj-editorial-copy h2 { margin: 0 0 17px !important; }
body .isj-single .isj-editorial-body p { margin: 0 0 13px !important; }
body .isj-single .isj-editorial-conclusion { margin-top: 28px !important; }
@media (max-width: 780px) {
  body .isj-single section.isj-editorial-section {
    flex-direction: column !important;
    gap: 17px !important;
    width: calc(100% - 36px) !important;
    margin-bottom: 30px !important;
  }
  body .isj-single section.isj-editorial-section > .isj-editorial-copy,
  body .isj-single section.isj-editorial-section > .isj-editorial-gallery {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
  body .isj-single section.isj-editorial--reverse > .isj-editorial-gallery {order: 0 !important;}
}


/* v2.6: Captions immediately beneath their own texture images. */
body .isj-single .isj-editorial-gallery .isj-editorial-figure {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  align-self: start !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: normal !important;
}
body .isj-single .isj-editorial-gallery .isj-editorial-figure > img {
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  vertical-align: top !important;
}
body .isj-single .isj-editorial-gallery .isj-editorial-figure > figcaption {
  display: block !important;
  position: static !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  transform: none !important;
}

/* v2.7: Isolate ACF image captions from theme figure/figcaption layout rules. */
body .isj-single .isj-editorial-gallery > .isj-photo-card {
  display: block !important;
  align-self: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
body .isj-single .isj-editorial-gallery > .isj-photo-card > img.isj-photo-image {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}
body .isj-single .isj-editorial-gallery > .isj-photo-card > p.isj-photo-caption {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 5px 0 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #667469 !important;
  text-align: left !important;
}

/* v2.8 – Caption anchored to the actual image edge, independent of row height. */
body .isj-single .isj-editorial-gallery > .isj-photo-card-v28 {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 0 31px !important;
  align-self: start !important;
  position: relative !important;
}
body .isj-single .isj-photo-card-v28 > .isj-photo-frame-v28 {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}
body .isj-single .isj-photo-frame-v28 > img.isj-photo-image-v28 {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
}
body .isj-single .isj-photo-frame-v28 > .isj-photo-caption-v28 {
  display: block !important;
  position: absolute !important;
  top: calc(100% + 5px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: 0 !important;
  float: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: #667469 !important;
  text-align: left !important;
  transform: none !important;
}
