/* ===== HOME ARTICLE GRID (HORIZONTAL-ONLY RESET) ===== */
/* If Divi injects margins/padding on Post Content, strip only the sides */
body.home .et_pb_post_content{
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* 1) Grid wrapper mirrors global container + gutter math */
@media (min-width:1272px){
  .home-article-grid__wrap{
    width:min(1272px, 100vw);
    margin:0 auto;
  }
}
/* 981–1271: subtract 2×84px */
@media (max-width:1271px) and (min-width:981px){
  .home-article-grid__wrap{
    width:calc(100vw - 168px);
    margin:0 auto;
  }
}
/* 768–980: subtract 2×48px */
@media (max-width:980px) and (min-width:768px){
  .home-article-grid__wrap{
    width:calc(100vw - 96px);
    margin:0 auto;
  }
}
/* ≤767: subtract 2×16px */
@media (max-width:767px){
  .home-article-grid__wrap{
    width:calc(100vw - 32px);
    margin:0 auto;
  }
}

/* 2) Grid: Desktop 3-up; Tablet 2-up; Mobile 1-up */
.home-article-grid__grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap:32px;
  row-gap:96px;
}
@media (max-width:1271px) and (min-width:981px){
  .home-article-grid__grid{ grid-template-columns: repeat(3, 1fr); column-gap:32px; row-gap:96px; }
}
@media (max-width:980px) and (min-width:768px){
  .home-article-grid__grid{ grid-template-columns: repeat(2, 1fr); column-gap:24px; row-gap:64px; }
}
@media (max-width:767px){
  .home-article-grid__grid{ grid-template-columns:1fr; column-gap:0; row-gap:64px; }
}

/* 3) Whole-card link */
.home-article-grid__link{
  display:flex; flex-direction:column; text-decoration:none; color:inherit; height:100%;
}
.home-article-grid__link, .home-article-grid__link *{ text-decoration:none !important; }
.home-article-grid__link:hover .home-article-grid__title{ text-decoration:underline; }

/* 4) IMAGE */
@media (min-width:981px){
  .home-article-grid__img{ aspect-ratio:402/313; border-radius:4px; overflow:hidden; margin:0 0 35px; }
  .home-article-grid__img img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; border-radius:4px; }
}
@media (max-width:980px) and (min-width:768px){
  .home-article-grid__img{ aspect-ratio:3/2; border-radius:4px; overflow:hidden; margin:0 0 35px; }
  .home-article-grid__img img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; border-radius:4px; }
}
@media (max-width:767px){
  .home-article-grid__img{ aspect-ratio:auto; border-radius:4px; overflow:hidden; margin:0 0 35px; }
  .home-article-grid__img img{ width:100%; height:343px; object-fit:cover; object-position:center; display:block; border-radius:4px; }
}

/* 5) AUTHOR */
.home-article-grid__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%;
  margin:0 0 16px;
}

/* 6) TITLE */
@media (min-width:981px){
  .home-article-grid__title{
    font-size: var(--h3-fs); font-weight: var(--h3-w); letter-spacing: var(--h3-trk); color: var(--color-heading);
    line-height:120%;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
    overflow:hidden; text-overflow:ellipsis; white-space:normal;
    min-height:calc(2 * 1em * 1.2); max-height:calc(2 * 1em * 1.2);
    margin-bottom:16px;
  }
}
@media (max-width:980px) and (min-width:768px){
  .home-article-grid__title{
    font-size: var(--h3-fs); font-weight: var(--h3-w); letter-spacing: var(--h3-trk); color: var(--color-heading);
    line-height:140%;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; text-overflow:ellipsis;
    min-height:calc(2 * 1em * 1.4); max-height:calc(2 * 1em * 1.4);
    margin-bottom:16px;
  }
}
@media (max-width:767px){
  .home-article-grid__title{
    font-size: var(--h3-fs); font-weight: var(--h3-w); letter-spacing: var(--h3-trk); color: var(--color-heading);
    line-height:105%;
    -webkit-line-clamp:unset; line-clamp:unset; overflow:visible; min-height:auto; max-height:none;
    margin-bottom:16px;
  }
}

/* 7) DEK */
.home-article-grid__dek{
  font-size:var(--body-fs); font-weight:var(--body-w); letter-spacing:var(--body-trk);
  color:var(--color-body); line-height:145%; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}





/* ================================
   HOME FEATURED ARTICLE — CONTENT
   (no container/gutter rules here)
   ================================ */

/* --- Make whole section clickable, but keep the button on top --- */
.home-featured-article__stretched-link{ position:absolute; inset:0; z-index:1; text-indent:-9999px; }
.home-featured-article .moov-cta-button,
.home-featured-article .moov-cta-button *{ position:relative; z-index:3; }

/* --------------------------------
   Layout + ordering per breakpoint
   -------------------------------- */

/* Desktop (≥981): 2 columns, auto gap clamped between 25px–132px */
@media (min-width:981px){
  .home-featured-article__inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    /* 25px at 981px  →  132px at 1272px  (slope ≈ 0.368px per 1px of viewport) */
    column-gap: clamp(25px, calc(25px + (100vw - 981px) * 0.368), 132px);
    align-items:stretch;
  }
  .hfa-left, .hfa-media{ min-width:0; }
}

/* Tablet (768–980): SINGLE column, image FIRST, fixed 532px + 64px below */
@media (min-width:768px) and (max-width:980px){
  .home-featured-article__inner{
    display:flex; flex-direction:column; align-items:stretch;
  }
  .hfa-media{
    order:-1; height:532px; margin:0 0 64px;
    border-radius:4px; overflow:hidden; position:relative;
  }
  .hfa-left{ display:flex; flex-direction:column; gap:24px; }
  .hfa-left .moov-cta-button{ margin-top:40px; }
}

/* Mobile (≤767): SINGLE column, image FIRST, fixed 343px + gradient + 9px gap */
@media (max-width:767px){
  .home-featured-article__inner{
    display:flex; flex-direction:column; align-items:stretch;
  }
  .hfa-media{
    order:-1; height:343px; margin:0 0 9px;
    border-radius:4px; overflow:hidden; position:relative;
  }
  .hfa-media::after{
    content:""; position:absolute; inset:0; pointer-events:none; z-index:1;
    background:linear-gradient(180deg, rgba(11,27,43,0) 12.6%, #0B1B2B 99.92%);
  }
}

/* -------------------------
   Content / visuals (shared)
   ------------------------- */

.hfa-left{ display:flex; flex-direction:column; gap:24px; min-width:0; }

/* Author row */
.hfa-author{ display:flex; align-items:center; gap:12px; }
.hfa-author__avatar{ width:32px; height:32px; border-radius:4px; object-fit:cover; display:block; }
.hfa-author__name{
  font: var(--label-font, var(--label-w) var(--label-fs)/100% var(--label-family));
  letter-spacing: var(--label-trk);
  color:#00FFE1; line-height:100%;
}

/* Title (no clamp; uses your H1 tokens) */
.hfa-title,
.home-featured-article .et_pb_post_title .et_pb_title_container h1.entry-title{
  margin:0; color:#ffffff;
  font-size:var(--h1-fs); line-height:var(--h1-lh);
  font-weight:var(--h1-w); letter-spacing:var(--h1-trk);
}

/* Intro / dek */
.hfa-intro{
  margin:0; color:#b4c0cc;
  font-size:var(--body-fs); line-height:var(--body-lh);
  font-weight:var(--body-w); letter-spacing:var(--body-trk);
}

/* Default multi-line clamp to 5 lines with ellipsis */
.hfa-intro.is-clamped{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

/* If we used the first sentence, let it flow naturally (no clamp/ellipsis) */
.hfa-intro.is-first-sentence{
  display: block;
  overflow: visible;
  -webkit-box-orient: initial;
  -webkit-line-clamp: initial;
}

/* Image wrapper */
.hfa-media{ border-radius:4px; overflow:hidden; display:flex; min-height:0; }
.hfa-media img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block; }

/* Featured pill */
.hfa-pill{
  position:absolute; z-index:2;
  background:#0b1b2b; color:#fff; border-radius:4px; padding:8px 12px;
  font: var(--label-font, var(--label-w) var(--label-fs)/100% var(--label-family));
  letter-spacing: var(--label-trk); line-height:100%; white-space:nowrap;
}
@media (min-width:981px){ .hfa-pill{ top:36px; right:40px; } }
@media (min-width:768px) and (max-width:980px){ .hfa-pill{ top:28px; right:22px; } }
@media (max-width:767px){ .hfa-pill{ top:14px; left:12px; } }

/* Button safety */
.home-featured-article .moov-cta-button{ display:flex; justify-content:flex-start; }
.home-featured-article .moov-cta-button .moov-btn.btn--sm,
.home-featured-article .moov-cta-button .moov-btn{ height:40px; }

/* === Home Article Grid: everywhere → 3-line dek === */
/* @media (max-width: 767px){ */
  .home-article-grid__dek{
    -webkit-line-clamp: 3;
            line-clamp: 3; /* optional non-webkit */
  }
/*}*/