/* === ARTICLE HEADER === */

/* === H1 (works for both WP Post Title and ACF override) === */
/* Post Title module */
body.single-post .et_pb_post_title .et_pb_title_container h1.entry-title,
/* ACF H1 override (Text module) */
body.single-post h1.post-title {
  font-size: var(--h1-fs);
  line-height: var(--h1-lh);
  font-weight: var(--h1-w);
  letter-spacing: var(--h1-trk);
  color: var(--color-heading);
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  margin-bottom: 24px; /* unified bottom spacing */
}
/* 2) Dek */
.post-dek .et_pb_text_inner{
  font-size: var(--body-blog-fs);
  line-height: var(--body-blog-lh);
  font-weight: var(--body-blog-w);
  letter-spacing: var(--body-blog-trk);
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #B4C0CC;
}
.post-dek{ margin: 0 0 24px; }
.post-dek:empty{ margin: 0; }

/* 3) Author chip (Code module wrapper has class "author-chip") */
.author-chip .et_pb_text_inner,
.author-chip .et_pb_code_inner{ display:flex; justify-content:center; }

/* Desktop: stacked avatar → name → title */
.moov-author-inline{
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.moov-author-inline .author-avatar img{
  width:32px; height:32px; border-radius:4px; object-fit:cover; display:block; margin-bottom:8px;
}
@media (max-width: 980px){
  .moov-author-inline .author-avatar img{
    width: 44px;
    height: 44px;
    margin-bottom: 0;   /* remove stacked gap when inline */
    flex: 0 0 40px;     /* lock width so text doesn’t wrap underneath */
  }
}
.moov-author-inline .author-name{
  color:#00FFE1; font-size:16px; line-height:1; font-weight:500; margin:0 0 8px 0;
}
.moov-author-inline .author-title{
  color:#B4C0CC; font-size:16px; line-height:1; margin:0;
}

/* === AUTHOR BIO BLOCK === */
.author-bio-block {
  max-width: 840px;
  width: 100%;
  margin-left: auto;             /* center the block */
  margin-right: auto;
  border-top: 1px solid #102C49;
  border-bottom: 1px solid #102C49;
  padding: 32px 0;               /* 32px top and bottom */
  text-align: left;              /* keep inner text aligned left */
}

/* Avatar + text row */
.author-bio-head {
  display: flex;
  align-items: center;   /* center text block with avatar vertically */
  gap: 12px;                     /* space between avatar and text */
}

/* Avatar (shortcode image) */
.author-bio-block .author-avatar img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}

/* Name + Title */
.author-bio-block .author-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.author-bio-block .author-name {
  color: #00FFE1;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  margin: 0 0 8px 0;             /* space under name */
}

.author-bio-block .author-title {
  color: #B4C0CC;
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
}

/* Bio content below */
.author-bio {
  margin-top: 16px;              /* 16px above bio */
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Sub-desktop (≤980px): inline avatar left, text stacked; left-align */
@media (max-width: 980px){
   body.single-post .et_pb_post_title .et_pb_title_container h1.entry-title, body.single-post h1.post-title { text-align:left !important; }
  .post-dek .et_pb_text_inner{ text-align:left !important; }

  .author-chip .et_pb_text_inner,
  .author-chip .et_pb_code_inner{ justify-content:flex-start; }

  .moov-author-inline{ flex-direction:row; align-items:center; gap:10px; text-align:left; }
  .moov-author-inline .author-avatar img{ margin-bottom:0; }
  .moov-author-inline .author-text{ display:flex; flex-direction:column; align-items:flex-start; }
  .moov-author-inline .author-name,
  .moov-author-inline .author-title{ line-height:1.3; }
}

/* === Featured image — max 1200px wide, smooth height 600→343, cropped === */
.hero-img,
.hero-img .et_pb_image_wrap{
  width: min(1200px, 100vw);   /* default ≥1272: cap at 1200, center */
  margin: 0 auto;
  overflow: hidden;
}
.hero-img img{
  display:block;
  width:100%;
  /* 600px at 1200vw → 343px at 375vw, smooth between */
  height: clamp(343px, calc(31.152vw + 226.182px), 600px);
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
}

/* 981–1271: subtract 2×84px gutters = 168px */
@media (min-width:981px) and (max-width:1271px){
  .hero-img,
  .hero-img .et_pb_image_wrap{
    width: min(1200px, calc(100vw - 168px));
  }
}

/* 768–980: subtract 2×48px gutters = 96px */
@media (min-width:768px) and (max-width:980px){
  .hero-img,
  .hero-img .et_pb_image_wrap{
    width: min(1200px, calc(100vw - 96px));
  }
}

/* ≤767: subtract 2×16px gutters = 32px */
@media (max-width:767px){
  .hero-img,
  .hero-img .et_pb_image_wrap{
    width: min(1200px, calc(100vw - 32px));
  }
}

/* 5) Safety: kill Post Title meta if Divi re-enables it */
.et_pb_post_title .et_pb_title_meta{ display:none !important; }
.et_pb_post_title{ margin-bottom:0 !important; }

/* 6) Reading column for article body */
.post-content{ max-width:820px; margin-inline:auto; }


/* === SINGLE POST TEMPLATE: REMOVE DEFAULT SECTION/ROW PADDING AROUND POST CONTENT ===
   Divi always wraps the Post Content module in a Section and a Row on the front end.
   Even if you only add a Row in the Theme Builder, Divi outputs an extra Section.
   By default, those wrappers carry padding that squeezes your article body.
   This rule zeroes out that padding and margin so the article content aligns
   cleanly with your custom design.
*/

.et-l--post .et_builder_inner_content > .et_pb_section:first-of-type{
  padding:0 !important; /* kill section padding */
}

.et-l--post .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row,
.et-l--post .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_column{
  padding:0 !important; /* kill row/column padding */
}

.et-l--post .et_pb_post_content{
  margin:0 !important;  /* remove any margin injected by Divi */
  padding:0 !important; /* remove default module padding */
}


/* === CTA Box === */
.moov-cta-box {
  max-width: 840px;
  margin: 0 auto;
  padding: 64px 40px;
  background: #E0EFFF;
  border-radius: 4px;
  text-align: center;
}

.moov-cta-title {
  color: #000D1A;
  font-size: var(--h2-fs);
  line-height: var(--h2-lh);
  font-weight: var(--h2-w);
  margin: 0 0 20px;
  padding: 0;
}

.moov-cta-body {
  color: #000D1A;
  font-size: var(--body-fs);
  line-height: var(--body-lh);
  margin: 0 auto 40px;
  max-width: 622px;
  text-align: center;

}

.moov-cta-button {
  display: flex;
  justify-content: center;
}

/* === UP NEXT CARDS === */

/* Grid: 2-up desktop & tablet (24px gap), stack only ≤767 */
.up-next__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  column-gap:24px;   /* was 48px */
  row-gap:0;
}
@media (max-width:767px){
  .up-next__grid{
    grid-template-columns:1fr;
    row-gap:64px;
    column-gap:0;
  }
}

/* Whole-card link */
.up-next__link{
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color:inherit;
  height:100%;
}
.up-next__link,
.up-next__link *{ text-decoration:none !important; }
.up-next__link:hover .up-next__title{ text-decoration:underline; }

/* IMAGE */
.up-next__img{
  border-radius:4px;
  overflow:hidden;
  margin:0 0 32px;
}
@media (min-width:768px){
  /* Fluid aspect ratio on desktop/tablet (3:2) */
  .up-next__img{ aspect-ratio: 3 / 2; }
  .up-next__img img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    display:block;
    border-radius:4px;
  }
}
@media (max-width:767px){
  /* Fixed square on mobile */
  .up-next__img{ aspect-ratio:auto; }
  .up-next__img img{
    width:100%;
    height:343px;
    object-fit:cover;
    object-position:center;
    display:block;
    border-radius:4px;
  }
}

/* Author */
.up-next__author{
  font: var(--label-font, var(--label-w) var(--label-fs)/100% var(--label-family));
  letter-spacing: var(--label-trk);
  color:#00FFE1;
  line-height:100%;    /* enforce spec */
  margin:0 0 24px;
}
@media (max-width:767px){ .up-next__author{ margin-bottom:16px; } }

/* TITLE (desktop/tablet) */
@media (min-width:768px){
  .up-next__title{
    font-size: var(--h3-fs);
    font-weight: var(--h3-w);
    letter-spacing: var(--h3-trk);
    color: var(--color-heading);

    line-height: 140%;           /* spec */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;

    /* baseline align: exactly 2 lines tall */
    min-height: calc(2 * 1em * 1.4);
    max-height: calc(2 * 1em * 1.4);

    margin-bottom: 24px;
  }
}

/* TITLE (mobile) */
@media (max-width:767px){
  .up-next__title{
    line-height: 105%;           /* spec */
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    min-height: auto;
    max-height: none;
    margin-bottom: 16px;
  }
}

/* Dek */
.up-next__dek{
  font-size:var(--body-blog-fs);
  font-weight:var(--body-blog-w);
  letter-spacing:var(--body-blog-trk);
  color:var(--color-body);
  line-height:145%;              /* spec */
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Up Next: allow 3-line dek (match home grid) */
.up-next__dek{
  -webkit-line-clamp: 3;
          line-clamp: 3; /* optional non-webkit */
}