/* ============================================================
   C&R — Insights & Updates sub-page
   Layout: navy banner (shared .br-banner from brochure.css)
   + single white "board" container holding the 3-col article grid,
   + compressed pagination. Board lifts into the banner like the
   brochure-page inside / form cards do.

   Builds on core.css, home.css (nav, footer, dropdown),
   brochure.css (.br-banner family for the sub-page header).
   ============================================================ */


/* ============================================================
   BANNER — text-only, single-column, compact
   ============================================================ */
.ins-banner-text {
  max-width: 760px;
}
.ins-banner-intro {
  margin: 14px 0 0;
  max-width: 660px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .6);
}


/* ============================================================
   ARTICLE BOARD — single white container
   Lifts into the banner's bottom padding (matches brochure deck rhythm).
   ============================================================ */
/* Match brochure-page deck spacing rhythm exactly */
.ins-deck {
  background: var(--white);
  padding: 0 0 clamp(56px, 7vw, 96px);
}

.ins-board {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 36px);   /* matches .br-inside / .br-form-card */
  box-shadow: 0 20px 48px -24px rgba(14, 9, 48, .18);
  margin-top: -120px;
  position: relative;
  z-index: 1;
}


/* ============================================================
   ARTICLE GRID — 3 columns inside the board
   ============================================================ */
.ins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;                          /* matches .br-inside-grid gap (12px) scale */
}


/* ============================================================
   ARTICLE CARD — grey-background tile style (mirrors .br-tile pattern
   inside the brochure's inside-card). Image up top, body below.
   ============================================================ */
.ins-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--grey);
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.ins-card:hover {
  background: var(--white);
  border-color: rgba(97, 204, 107, .4);
  transform: translateY(-3px);
}
.ins-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.ins-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;            /* slightly more cinematic than 4:3 */
  overflow: hidden;
  background: var(--navy);
}
.ins-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.ins-card:hover .ins-card-media img {
  transform: scale(1.05);
}
.ins-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27, 20, 66, 0) 55%, rgba(27, 20, 66, .18) 100%);
  pointer-events: none;
}

.ins-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  justify-content: space-between;
}

.ins-card-title {
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: 15.5px;
  line-height: 1.35;
  letter-spacing: -.012em;
  color: var(--navy);
  margin: 0;
}

.ins-card-excerpt {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: -4px 0 0;
  /* Clamp to 3 lines so card heights stay even */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ins-card-link {
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ins-card-link svg {
  width: 12px;
  height: 12px;
  transition: transform var(--dur) var(--ease-out);
}
.ins-card:hover .ins-card-link svg {
  transform: translateX(3px);
}


/* ============================================================
   PAGINATION — inside the board, hairline divider above
   ============================================================ */
.ins-pagination {
  margin-top: clamp(28px, 3.5vw, 40px);
  padding-top: clamp(20px, 2.5vw, 28px);
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: 14px;
}

.ins-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  transition:
    background var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out);
}
.ins-page:hover {
  background: var(--grey);
}
.ins-page.is-current {
  background: var(--navy);
  color: var(--white);
}
.ins-page.is-current:hover {
  background: var(--navy);
}

.ins-page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 38px;
  color: var(--fg-muted);
}

.ins-page-next {
  margin-left: 8px;
  padding: 0 16px;
  background: var(--green);
  color: var(--navy);
  gap: 8px;
}
.ins-page-next:hover {
  background: var(--green);
  filter: brightness(1.04);
}
.ins-page-next svg {
  width: 13px;
  height: 13px;
  transition: transform var(--dur) var(--ease-out);
}
.ins-page-next:hover svg {
  transform: translateX(2px);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .ins-grid { gap: 14px; }
}

@media (max-width: 900px) {
  /* Banner intro tighter */
  .ins-banner-intro { font-size: 14px; }

  /* Board: tighter pad, shallower lift (matches brochure deck behaviour) */
  .ins-board {
    padding: clamp(20px, 3vw, 28px);
    margin-top: -64px;
  }

  /* Grid → 2 columns */
  .ins-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 640px) {
  /* Grid → 1 column */
  .ins-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ins-board {
    padding: 18px;
    margin-top: -48px;
  }
  .ins-card-body {
    padding: 16px 18px 18px;
    gap: 12px;
  }
  .ins-card-title {
    font-size: 15px;
  }
  .ins-pagination {
    gap: 4px;
    font-size: 13px;
  }
  .ins-page {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
  }
  .ins-page-next {
    padding: 0 14px;
  }
}

/* No hover-driven movement on touch / hybrid pointers (e.g. iPad + mouse). */
@media (hover: none), (pointer: coarse) {
  .ins-card:hover { transform: none; }
}
