/*
 * Inside Indonesia: sidebar "Latest Articles" list (mod_articles layout "ii-latest").
 * Installed at media/templates/site/tz_magazine/css/ii-latest.css; loaded by the layout itself.
 *
 * Reproduces the SP Page Builder / Jollyany "uiarticles" box it replaces, measured on the live
 * site 2026-12-06. Heading font, weight and colour are inherited from the template's h3, as before.
 * Breakpoints follow the old box's UIkit grid: 640 / 960 / 1200 / 1600px.
 */

.ii-latest {
  --ii-inset: .75rem;      /* side inset of the list; the module heading stays at the column edge */
  --ii-gap: 30px;          /* space between articles */
  --ii-thumb: calc(100% / 3.001);  /* thumbnail column width; UIkit's "1/3" is 100%/3.001, kept so lines wrap identically */
  padding: 0 var(--ii-inset);
}

@media (min-width: 640px)  { .ii-latest { --ii-thumb: 25%; } }
@media (min-width: 960px)  { .ii-latest { --ii-inset: 40px; --ii-thumb: 100%; } }  /* stacked: image above text */
@media (min-width: 1200px) { .ii-latest { --ii-gap: 40px; --ii-thumb: calc(100% / 3.001); } }
@media (min-width: 1600px) { .ii-latest { --ii-thumb: 25%; } }

.ii-latest__item {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

.ii-latest__item + .ii-latest__item {
  margin-top: var(--ii-gap);
}

/* Thumbnail: at least 3:2, grows with the text beside it, image cropped to fill (centred). */
.ii-latest__media {
  position: relative;
  overflow: hidden;
  flex: 0 0 var(--ii-thumb);
  max-width: var(--ii-thumb);
}

.ii-latest__media::before {
  content: "";
  display: block;
  padding-top: 66.6667%;
}

.ii-latest__media a {
  position: absolute;
  inset: 0;
  display: block;
}

.ii-latest__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.ii-latest__body {
  flex: 1;
  min-width: 1px;
  box-sizing: border-box;
  padding: 20px;
}

.ii-latest__body > :last-child {
  margin-bottom: 0;
}

.ii-latest .ii-latest__title {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.ii-latest .ii-latest__title a {
  color: inherit;
  text-decoration: none;
}

.ii-latest .ii-latest__title a:hover,
.ii-latest .ii-latest__title a:focus {
  color: inherit;
  text-decoration: underline;
}

.ii-latest__meta {
  font-family: Poppins;
  font-size: .875rem;
  line-height: 1.4;
  color: #999;
}

.ii-latest__meta > * {
  line-height: 1.7;
}

.ii-latest__meta > * + *::before {
  content: "-";
  margin: 0 8px;
}
