/* Bagian "Publikasi Terbaru" dan "Mitra" di Home */
.l4l-pub, .l4l-pub *, .l4l-mitra, .l4l-mitra * { box-sizing: border-box; }
.l4l-pub, .l4l-mitra { padding: clamp(56px, 7vw, 104px) 0; color: var(--l4l-ink); }
.l4l-pub { background: #eef5f2; overflow: hidden; }
.l4l-mitra { background: #fff; }
.l4l-pub__inner, .l4l-mitra__inner { max-width: calc(var(--l4l-max) + 2 * var(--l4l-gutter)); margin: 0 auto; padding: 0 var(--l4l-gutter); }
.l4l-pub ul, .l4l-mitra ul { list-style: none; margin: 0; padding: 0; }

.l4l-pub .l4l-pub__title, .l4l-mitra .l4l-mitra__title { margin: 0; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; word-spacing: .08em; color: var(--l4l-green); }
.l4l-pub__title > span, .l4l-mitra__title > span { display: block; }
.l4l-pub .l4l-pub__all, .l4l-mitra .l4l-mitra__all {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--l4l-green); border-radius: 999px; color: var(--l4l-green); font-size: .9375rem; font-weight: 700; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.l4l-pub .l4l-pub__all:hover, .l4l-mitra .l4l-mitra__all:hover { background: var(--l4l-green); color: #fff; }
.l4l-pub__all svg, .l4l-mitra__all svg { transition: transform .25s var(--l4l-ease); }
.l4l-pub__all:hover svg, .l4l-mitra__all:hover svg { transform: translateX(4px); }
.l4l-pub a:focus-visible, .l4l-mitra a:focus-visible { outline: 3px solid var(--l4l-orange); outline-offset: 3px; border-radius: 999px; }

/* ---------------- Publikasi ---------------- */
.l4l-pub__head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 40px; margin-bottom: clamp(20px, 2.6vw, 36px); }
.l4l-pub__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; }
.l4l-pub-item { position: relative; display: flex; flex-direction: column; }

/* Sampul dengan rasio asli, berdiri di atas rak */
.l4l-pub-item__shelf { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 330px; padding: 16px 14px 0; perspective: 900px; }
.l4l-pub-item__shelf::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: -8px; height: 8px; background: linear-gradient(#cfe0d9, #b7cec5); transform-origin: left; }
.l4l-pub-item:first-child .l4l-pub-item__shelf::after { left: 0; border-radius: 4px 0 0 4px; }
.l4l-pub-item:last-child .l4l-pub-item__shelf::after { right: 0; border-radius: 0 4px 4px 0; }
.l4l-pub-item__cover { position: relative; display: block; max-width: 100%; transform-origin: 50% 100%; transition: transform .4s var(--l4l-ease); }
.l4l-pub .l4l-pub-item__cover img { display: block; max-width: 100%; max-height: 306px; width: auto; height: auto; border-radius: 3px 6px 6px 3px; box-shadow: 0 2px 4px rgba(5, 28, 24, .18), 0 16px 28px -8px rgba(5, 28, 24, .38); }
/* Lipatan punggung buku */
.l4l-pub-item__cover::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 18px; border-radius: 3px 0 0 3px; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(255, 255, 255, .25) 35%, rgba(0, 0, 0, .1) 60%, transparent); pointer-events: none; }
.l4l-pub-item:hover .l4l-pub-item__cover, .l4l-pub-item:focus-within .l4l-pub-item__cover { transform: translateY(-12px) rotateY(-9deg); }
.l4l-pub-item__cover.is-missing { width: 190px; height: 260px; border-radius: 3px 6px 6px 3px; background: linear-gradient(140deg, #0a7565, #0a2e29); box-shadow: 0 16px 28px -8px rgba(5, 28, 24, .38); }
.l4l-pub-item__cover.is-missing img { display: none; }

.l4l-pub .l4l-pub-item__meta { display: flex; align-items: center; gap: 12px; margin: 30px 0 0; padding: 0 4px; font-size: .875rem; font-weight: 600; color: var(--l4l-ink-soft); }
.l4l-pub-item__type { padding: 4px 13px; border-radius: 999px; background: #fff; color: var(--l4l-green); font-weight: 700; }
.l4l-pub .l4l-pub-item__title { margin: 12px 0 0; padding: 0 4px; font-size: 1.0625rem; font-weight: 700; line-height: 1.42; }
.l4l-pub .l4l-pub-item__title a { color: var(--l4l-ink); text-decoration: none; transition: color .2s; }
.l4l-pub .l4l-pub-item:hover .l4l-pub-item__title a { color: var(--l4l-green); }
.l4l-pub-item__title a::after { content: ""; position: absolute; inset: 0; }
.l4l-pub .l4l-pub-item__title a:focus-visible { outline: 0; }
.l4l-pub-item__title a:focus-visible::after { outline: 3px solid var(--l4l-orange); outline-offset: -2px; border-radius: 12px; }

@media (max-width: 1099.98px) {
  .l4l-pub__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 28px; }
  .l4l-pub-item:nth-child(odd) .l4l-pub-item__shelf::after { left: 0; border-radius: 4px 0 0 4px; }
  .l4l-pub-item:nth-child(even) .l4l-pub-item__shelf::after { right: 0; border-radius: 0 4px 4px 0; }
}
/* Ponsel: rak digeser menyamping */
@media (max-width: 767.98px) {
  .l4l-pub .l4l-pub__list {
    display: flex; gap: 0 24px; margin: 0 calc(-1 * var(--l4l-gutter)); padding: 0 var(--l4l-gutter) 14px;
    overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--l4l-gutter); scrollbar-width: thin; scrollbar-color: #9dbab0 transparent;
  }
  .l4l-pub-item { flex: 0 0 70%; scroll-snap-align: start; }
  .l4l-pub-item__shelf { height: 290px; }
  .l4l-pub .l4l-pub-item__cover img { max-height: 264px; }
  .l4l-pub-item .l4l-pub-item__shelf::after { left: -14px !important; right: -14px !important; border-radius: 0 !important; }
  .l4l-pub .l4l-pub__all, .l4l-mitra .l4l-mitra__all { width: 100%; justify-content: center; }
}

/* ---------------- Mitra ---------------- */
.l4l-mitra__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 56px; align-items: start; }
.l4l-mitra__head { position: sticky; top: calc(var(--l4l-head-gap) + 32px); }
.l4l-mitra .l4l-mitra__all { margin-top: 24px; }
.l4l-mitra__wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 24px; overflow: hidden; border: 1px solid #d9e4df; }
/* Garis antarsel; sel terakhir yang kosong tetap bersih */
.l4l-mitra__wall li { position: relative; box-shadow: 0 0 0 .5px #d9e4df; }
.l4l-mitra .l4l-mitra__wall a, .l4l-mitra__wall li > span { display: grid; place-items: center; height: 172px; padding: 24px; transition: background-color .25s; }
.l4l-mitra .l4l-mitra__wall a:hover { background: #f3f8f6; }
.l4l-mitra .l4l-mitra__wall img { display: block; width: auto; height: auto; max-width: min(100%, 168px); max-height: 96px; transition: transform .35s var(--l4l-ease); }
.l4l-mitra__wall a:hover img { transform: scale(1.07); }
.l4l-mitra .l4l-mitra__wall a:focus-visible { outline-offset: -4px; border-radius: 18px; }

@media (max-width: 1099.98px) {
  .l4l-mitra__inner { grid-template-columns: minmax(0, 1fr); }
  .l4l-mitra__head { position: static; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
  .l4l-mitra .l4l-mitra__all { margin-top: 0; }
}
@media (max-width: 600px) {
  .l4l-mitra .l4l-mitra__wall a, .l4l-mitra__wall li > span { height: 118px; padding: 12px; }
  .l4l-mitra .l4l-mitra__wall img { max-height: 64px; }
}

/* ------------------------------------------------------------------
   Animasi. Keadaan awal hanya berlaku bila JS memasang .l4l-motion.
------------------------------------------------------------------- */
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes l4l-sec-rise { from { transform: translateY(115%); } to { transform: none; } }
  @keyframes l4l-sec-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes l4l-sec-draw { from { transform: scaleX(0); } to { transform: none; } }
  @keyframes l4l-sec-place { 0% { opacity: 0; transform: translateY(-64px) rotate(-7deg); } 55% { opacity: 1; transform: translateY(0) rotate(2.5deg); } 78% { transform: rotate(-1deg); } 100% { opacity: 1; transform: none; } }
  @keyframes l4l-sec-logo { from { opacity: 0; transform: scale(.72); } to { opacity: 1; transform: none; } }

  .l4l-motion .l4l-pub__title, .l4l-motion .l4l-mitra__title { overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
  .l4l-motion .l4l-pub__head:not(.is-in) .l4l-pub__title > span,
  .l4l-motion .l4l-mitra__head:not(.is-in) .l4l-mitra__title > span { transform: translateY(115%); }
  .l4l-motion .l4l-pub__head:not(.is-in) .l4l-pub__all,
  .l4l-motion .l4l-mitra__head:not(.is-in) .l4l-mitra__all,
  .l4l-motion .l4l-pub__list:not(.is-in) > *,
  .l4l-motion .l4l-mitra__wall:not(.is-in) { opacity: 0; }

  .l4l-motion .l4l-pub__head.is-in .l4l-pub__title > span,
  .l4l-motion .l4l-mitra__head.is-in .l4l-mitra__title > span { animation: l4l-sec-rise .95s cubic-bezier(.16, 1, .3, 1) both; }
  .l4l-motion .l4l-pub__head.is-in .l4l-pub__all,
  .l4l-motion .l4l-mitra__head.is-in .l4l-mitra__all { animation: l4l-sec-up .7s var(--l4l-ease) .25s backwards; }

  /* Rak tergambar, lalu buku diletakkan satu per satu */
  .l4l-motion .l4l-pub__list.is-in .l4l-pub-item__shelf::after { animation: l4l-sec-draw .55s cubic-bezier(.65, 0, .2, 1) calc(var(--i) * .12s) backwards; }
  .l4l-motion .l4l-pub__list.is-in .l4l-pub-item__cover { animation: l4l-sec-place .95s cubic-bezier(.3, .7, .3, 1) calc(.35s + var(--i) * .16s) backwards; }
  .l4l-motion .l4l-pub__list.is-in .l4l-pub-item__meta { animation: l4l-sec-up .6s var(--l4l-ease) calc(.75s + var(--i) * .16s) backwards; }
  .l4l-motion .l4l-pub__list.is-in .l4l-pub-item__title { animation: l4l-sec-up .6s var(--l4l-ease) calc(.83s + var(--i) * .16s) backwards; }

  /* Logo muncul menyilang dari kiri atas */
  .l4l-motion .l4l-mitra__wall.is-in { animation: l4l-sec-up .7s var(--l4l-ease) backwards; }
  .l4l-motion .l4l-mitra__wall.is-in img { animation: l4l-sec-logo .6s cubic-bezier(.2, 1.1, .4, 1) calc(.3s + var(--i) * .14s) backwards; }

  .l4l-motion .l4l-pub .is-done, .l4l-motion .l4l-pub .is-done *, .l4l-motion .l4l-pub .is-done *::after,
  .l4l-motion .l4l-mitra .is-done, .l4l-motion .l4l-mitra .is-done * { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) { .l4l-pub *, .l4l-mitra * { transition-duration: .01ms !important; } .l4l-pub-item:hover .l4l-pub-item__cover, .l4l-pub-item:focus-within .l4l-pub-item__cover { transform: none; } }
