/* ==========================================================================
   Single Blog Post — Page-specific CSS
   Loaded only on single posts via functions.php conditional enqueue.
   All measurements extracted from live serefni.is blog posts.
   ========================================================================== */

/* ── HERO ── */
body.single-post .site-main {
  background: #ebe6e3;
}

body.single-post .site-content {
  overflow: visible !important;
}

body.single-post .site-content,
body.single-post .content-area,
body.single-post .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-hero--single {
  position: relative;
  min-height: 550px;
  padding: 0;
  overflow: visible !important;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background: transparent;
  /* Full-bleed: escape parent container max-width */
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-bottom: 5rem;
}

/* Grey #545b5c covering 70% from LEFT, extending to viewport left edge.
   Matches live layout: title on LEFT, image on RIGHT. */
.page-hero--single::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * (50vw - 50%));
  width: 70vw;
  background: #545B5C;
  z-index: 0;
}

/* Title area: bottom-LEFT of grey area. */
.page-hero--single .page-hero-inner {
  position: relative;
  z-index: 1;
  width: 70%;
  max-width: none;
  margin: 0 auto 0 0;
  padding: 0 40px 67px 101px;
}

/* H1: white ivypresto-display 62px — matches live blog post hero. */
.page-hero--single .page-title {
  text-align: left;
  font-size: 62px;
  color: #fff;
  font-family: "ivypresto-display", serif;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 80px;
  margin: 0;
  max-width: 605px;
}

/* Featured image: positioned to match live — overlaps gray/beige boundary naturally. */
.page-hero__image {
  position: absolute;
  right: 9%;
  bottom: -100px;
  z-index: 2;
  width: 38%;
  max-width: 550px;
  overflow: visible;
}

.page-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── CONTENT ── */
body.single-post article.post-loop {
  padding-top: 150px;
}

body.single-post .entry-content {
  max-width: 1154px;
  margin: 0 auto;
  padding: 0 40px 60px;
}

/* Text: granville 18px/30px #484848 — matches live blog posts */
body.single-post .entry-content p {
  font-family: granville, serif !important;
  font-size: 18px !important;
  line-height: 30px !important;
  color: #484848;
}

body.single-post .entry-content strong {
  font-weight: 700;
}

body.single-post .entry-footer:empty {
  display: none;
}

/* Gutenberg columns inside post content — respect side-by-side layout */
body.single-post .entry-content .wp-block-columns {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  /* flex-wrap: nowrap; */
}
body.single-post .entry-content .wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}

/* Images in post content keep natural aspect ratio — don't force same size.
   Cap max-height on standalone images so huge portrait images (1024h) don't
   dominate the flow and look "forced into same huge size" (client feedback). */
body.single-post .entry-content .wp-block-image {
  margin: 25px 0;
  text-align: center;
}
body.single-post .entry-content .wp-block-image img,
body.single-post .entry-content figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
body.single-post .entry-content .wp-block-image.alignfull img,
body.single-post .entry-content .wp-block-image.alignwide img {
  width: 100%;
  max-height: none;
}
/* Inside columns, images fill their column width without height cap */
body.single-post .entry-content .wp-block-column .wp-block-image {
  margin: 0;
}
body.single-post .entry-content .wp-block-column .wp-block-image img {
  width: 100%;
  max-height: none;
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-hero--single {
    min-height: 300px;
    flex-direction: column;
  }
  .page-hero--single::before {
    width: calc(100% + (50vw - 50%)) !important;
  }
  .page-hero--single .page-hero-inner {
    width: 100%;
    padding: 40px 20px;
  }
  .page-hero--single .page-title {
    font-size: 28px;
  }
  .page-hero__image {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 80%;
    height: auto;
    max-width: none;
    max-height: 300px;
    margin: 0 auto -40px;
    overflow: hidden;
  }
  .page-hero__image img {
    height: auto;
  }
  body.single-post article.post-loop {
    padding-top: 40px;
  }
  body.single-post .entry-content .wp-block-columns {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .page-hero--single .page-title {
    font-size: 24px;
  }
}
