/* ============================================ */
/* E9 INFOGRAPHICS                              */
/* ============================================ */
.ig-section {
  background: #fbfaf6;
  padding: 48px 0 56px;
  border-top: 1px solid var(--line, #e5e0d5);
  color: var(--navy, #14213d);
  scroll-margin-top: 90px;
}
.ig-section .container-fluid { padding-left: 5.5%; padding-right: 5.5%; }

/* ---- Heading (keeps the E9 wordmark fonts) ---- */
.ig-head { margin-bottom: 24px; }
.ig-title { margin: 0; font-size: 34px; line-height: 1.2; }
.ig-title a {
  color: var(--navy, #14213d);
  text-decoration: none;
  background: linear-gradient(var(--gold, #c9a54b), var(--gold, #c9a54b)) no-repeat 0 100% / 0 3px;
  padding-bottom: 4px;
  transition: background-size .3s ease;
}
.ig-title a:hover, .ig-title a:focus-visible { background-size: 100% 3px; }
.ig-sub { font-family: 'Calibri-bold', Calibri, sans-serif; }
.ig-f1  { font-family: 'ABeeZee', sans-serif; }
.ig-f2  { font-family: 'Fira Sans', sans-serif; }

/* ---- Featured: frame + details card ---- */
.ig-feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.ig-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1530;
  border: 1px solid var(--line, #e5e0d5);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(20, 33, 61, 0.16);
}
.ig-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  overflow: auto;                      /* lets the embedded page scroll inside the frame */
  -webkit-overflow-scrolling: touch;   /* smooth swipe on iOS */
}

/* ---- Click-to-load facade (only used when a poster image is set) ---- */
.ig-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ig-facade img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ig-facade:hover img { transform: scale(1.03); }
.ig-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 18, 38, 0.55), rgba(8, 18, 38, 0) 60%);
  pointer-events: none;
}
.ig-open {
  position: absolute;
  z-index: 1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #b58f4a;
  color: #14213d;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.ig-facade:hover .ig-open { background: var(--navy, #14213d); color: #fff; }
.ig-facade:focus-visible { outline: 3px solid var(--gold, #c9a54b); outline-offset: -3px; }

.ig-new {
  position: absolute;
  z-index: 2;
  top: 14px; left: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold, #c9a54b);
  color: var(--navy, #14213d);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ---- Details card ---- */
.ig-card {
  padding: 24px 24px 22px;
  background: #fff;
  border: 1px solid var(--line, #e5e0d5);
  border-left: 4px solid var(--gold, #c9a54b);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(20, 33, 61, 0.06);
}
.ig-card__kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dark, #8a6d2f);
}
.ig-card__title {
  margin: 0 0 8px;
  font-family: Georgia, "Source Serif 4", "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
.ig-card__summary { margin: 0 0 4px; font-size: 15px; line-height: 1.6; color: #5b6472; }

.ig-meta { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.ig-meta li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 600; }
.ig-meta i { margin-top: 2px; font-size: 18px; color: var(--gold-dark, #8a6d2f); }
.ig-meta small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7380;
}

.ig-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid #b58f4a;
  border-radius: 6px;
  background: #b58f4a;
  color: #14213d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.ig-btn:hover, .ig-btn:focus-visible { background: var(--navy, #14213d); border-color: var(--navy, #14213d); color: #fff; }
.ig-btn--ghost { background: transparent; border-color: var(--navy, #14213d); color: var(--navy, #14213d); }

/* ---- More infographics ---- */
.ig-more { margin-top: 40px; }
.ig-more h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Source Serif 4", "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
}
.ig-more__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ig-thumb {
  position: relative;
  background: #fff;
  border: 1px solid var(--line, #e5e0d5);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ig-thumb:hover { border-color: var(--gold, #c9a54b); box-shadow: 0 10px 24px rgba(20, 33, 61, 0.10); transform: translateY(-2px); }
.ig-thumb__img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e6eaf1, #ece8df); }
.ig-thumb__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ig-thumb__body { padding: 12px 14px 14px; }
.ig-thumb__date { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark, #8a6d2f); }
.ig-thumb__title { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.ig-thumb__title a { color: var(--navy, #14213d); text-decoration: none; }

/* ---- Bottom row ---- */
.ig-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 28px; }
.ig-viewall { font-size: 15px; font-weight: 600; color: var(--navy, #14213d); text-decoration: none; }
.ig-viewall:hover { color: var(--gold-dark, #8a6d2f); }
.ig-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy, #14213d);
  color: var(--gold, #c9a54b);
  box-shadow: 0 4px 12px rgba(20, 33, 61, 0.25);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.ig-back:hover, .ig-back:focus-visible { background: var(--gold, #c9a54b); color: var(--navy, #14213d); transform: translateY(-3px); }

.ig-section a:focus-visible, .ig-section button:focus-visible { outline: 2px solid var(--gold, #c9a54b); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .ig-facade img, .ig-facade:hover img, .ig-thumb, .ig-thumb:hover, .ig-back, .ig-back:hover { transition: none; transform: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
  .ig-section { padding: 36px 0 44px; }
  .ig-section .container-fluid { padding-left: 24px; padding-right: 24px; }
  .ig-title { font-size: 30px; }
  .ig-feature { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .ig-more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ---------- Phone ---------- */
@media (max-width: 575.98px) {
  .ig-section { padding: 28px 0 36px; }
  .ig-section .container-fluid { padding-left: 16px; padding-right: 16px; }
  .ig-title { font-size: 26px; }
  .ig-head { margin-bottom: 18px; }

  /* Frame: full width, bleeding to the screen edges */
  .ig-frame {
    aspect-ratio: 16 / 9;              /* default (Canva slides) */
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  /* Tall frame: full screen height for long vertical infographics */
  .ig-frame--tall {
    aspect-ratio: auto;
    height: 100vh;
    height: 100svh;                    /* full visible screen, ignores browser bars */
    min-height: 480px;
    max-height: none;
  }
  .ig-frame--tall iframe { touch-action: pan-y pinch-zoom; }

  .ig-open { padding: 9px 16px; font-size: 14px; }
  .ig-new { top: 10px; left: 26px; font-size: 11px; }
  .ig-card { padding: 18px 18px 18px; }
  .ig-card__title { font-size: 21px; }
  .ig-meta li { font-size: 15px; }
  .ig-actions .ig-btn { flex: 1 1 100%; justify-content: center; }
  .ig-more { margin-top: 30px; }

  /* ---- Horizontal swipe scroller for "More infographics" ---- */
  .ig-more__grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin: 0 -16px;
    padding: 4px 16px 14px;
    scroll-padding-left: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold, #c9a54b) transparent;
  }
  .ig-more__grid::-webkit-scrollbar { height: 4px; }
  .ig-more__grid::-webkit-scrollbar-thumb { background: var(--gold, #c9a54b); border-radius: 4px; }
  .ig-thumb { scroll-snap-align: start; }

  .ig-foot { margin-top: 20px; gap: 12px; }
  .ig-viewall { font-size: 14px; }
  .ig-back { width: 40px; height: 40px; }
}