/* -------------------------
   NEWSLETTER HERO
-------------------------- */
.nlp-hero {
  position: relative;
  background: center/cover no-repeat var(--nlp-bg);
  min-height: 540px;
  padding: 112px 64px;
  display: grid;
  place-items: center;
  text-align: center;
}
.nlp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.50);
}
.nlp-hero__inner {
  position: relative;
  width: min(1312px, 100%);
  margin: 0 auto;
}
.nlp-hero__title {
  color: #fff;
  font: 700 64px/120% Roboto, system-ui;
  margin: 0 0 20px;
}
.nlp-hero__strap {
  color: #fff;
  font: 700 18px/150% Roboto, system-ui;
  max-width: 926px;
  margin: 0 auto;
}

/* -------------------------
   INTRO CONTAINER
-------------------------- */
.nlp-intro {
  padding: 64px 0;
  background: #f7f5f2;
}
.nlp-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 80px 64px;
}
.nlp-heading {
  font-size: 48px;
  font-weight: 700;
  color: #146782;
  margin-bottom: 16px;
}
.nlp-heading span {
  color: #0c5a6c;
}
.nlp-subtext {
  max-width: 1312px;
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 40px;
}

/* -------------------------
   FEATURE SECTION
-------------------------- */
.nlp-feature {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 1312px;
  margin: 0 auto 60px;
}

.nlp-feature__main {
  flex: 2;
  min-width: 0;
}
.nlp-feature__main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}
.nlp-feature__main h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.nlp-feature__main p {
  font-size: 16px;
  color: #444;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nlp-feature__main span {
  font-size: 14px;
  color: #666;
}

/* -------------------------
   SIDE CARDS
-------------------------- */
.nlp-feature__side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 5;
}

.nlp-feature__card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.nlp-feature__card img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
}

.nlp-feature__card h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nlp-feature__card span {
  font-size: 13px;
  color: #666;
}

/* -------------------------
   PAST NEWSLETTERS
-------------------------- */
.nlp-past-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
}

.nlp-past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.nlp-past-card {
  background: #f7f5f2;
  padding: 18px 22px;
  border: 1px solid #e8e5df;
  border-radius: 6px;
  transition: 0.25s ease;
}
.nlp-past-card:hover {
  transform: translateY(-4px);
  background: #eef3f4;
}
.nlp-past-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nlp-past-card span {
  font-size: 14px;
  color: #666;
}

/* -------------------------
   LOAD MORE BUTTON
-------------------------- */
.nlp-load-more-wrap {
  text-align: center;
}
.nlp-load-more {
  padding: 14px 36px;
  background: #146782;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  margin-top:20px;
}
.nlp-load-more:hover {
  background: #0f4d5a;
}

/* -------------------------
   RESPONSIVE
-------------------------- */
@media (max-width: 900px) {
  .nlp-feature {
    flex-direction: column;
  }
  .nlp-feature__side {
    flex-direction: column;
    width: 100%;
  }
}

/* -------------------------
   FIX GRAMMARLY OVERLAY ISSUE
-------------------------- */
grammarly-desktop-integration {
  display: none !important;
}


/* FEATURED — Make excerpt exactly 2 lines */
.nlp-feature-desc {
  font-size: 17px;
  line-height: 1.45;
  color: #444;
  margin: 8px 0 10px 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured big image fix */
.nlp-feature-img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.nlp-feature-desc {
  font-size: 17px;
  color: #444;
  margin: 8px 0 10px 0;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* MOBILE HERO FIX — device-safe */
@media (max-width: 768px) {
  .nlp-hero {
    min-height: clamp(320px, 55vh, 420px);
    padding: 72px 20px;
    background-position: center top;
  }

  .nlp-hero__title {
    font-size: 40px;
    line-height: 1.15;
  }

  .nlp-hero__strap {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-width: 768px) {
  .nlp-heading {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .nlp-subtext {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 28px;
  }
}

@media (max-width: 900px) {
  .nlp-feature {
    gap: 40px;
  }

  .nlp-feature__main img,
  .nlp-feature-img {
    height: auto;
    max-height: 320px;
  }

  .nlp-feature__side {
    gap: 20px;
  }

  .nlp-feature__card img {
    width: 96px;
    height: 96px;
  }

  .nlp-feature__card h4 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .nlp-past-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .nlp-past-card {
    padding: 14px 16px;
  }

  .nlp-past-card h4 {
    font-size: 16px;
    line-height: 1.35;
  }
}

/* =====================================================
   MOBILE FIX — SIDE NEWSLETTER CARDS ALIGNMENT
===================================================== */

@media (max-width: 768px) {

  /* Stack image + text vertically */
  .nlp-feature__card {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Image should be full-width but constrained */
  .nlp-feature__card img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  /* Text spacing reset */
  .nlp-feature__card h4 {
    margin-top: 10px;
    margin-bottom: 4px;
  }

  /* Prevent any accidental horizontal overflow */
  .nlp-feature__side {
    overflow-x: hidden;
  }
}

/* =====================================================
   MOBILE FIX — PAST NEWSLETTER TITLE (3 LINES)
===================================================== */

@media (max-width: 768px) {

  .nlp-past-card h4 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;   /* 👈 max 3 lines */
    overflow: hidden;

    line-height: 1.35;
    max-height: calc(1.35em * 3); /* hard safety */
  }
}

/* -------------------------
   NEWSLETTER HERO — MOBILE FIX
-------------------------- */
@media (max-width: 768px) {

  .nlp-hero {
    min-height: unset;                 /* remove vh problems */
    aspect-ratio: 4 / 5;               /* stable across phones */
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position: center top;   /* avoid face cut */
  }

  .nlp-hero__title {
    font-size: 34px;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .nlp-hero__strap {
    font-size: 14px;
    line-height: 1.4;
    max-width: 100%;
  }
}

/* MOBILE: reduce gap between hero and intro */
@media (max-width: 768px) {
  .nlp-intro {
    padding-top: 0px; /* instead of 64px */
	padding-left: 10px;
  }
	.nlp-hero {
    margin-bottom: 0;
  }
}

/* =====================================================
   MOBILE SIDE PADDING REFINEMENT — NEWSLETTER
===================================================== */
@media (max-width: 768px) {

  /* Main container: reduce side padding */
  .nlp-container {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 30px;   /* keep vertical comfort */
    padding-bottom: 48px;
  }

  /* Intro section wrapper (extra safety) */
  .nlp-intro {
    padding-left: 0;
    padding-right: 0;
  }

  /* Past newsletter grid cards */
  .nlp-past-grid {
    padding-left: 0;
    padding-right: 0;
  }

  /* Featured + side sections align nicely */
  .nlp-feature {
    padding-left: 0;
    padding-right: 0;
  }
}
