/* Trend Feed Widget v1.6.1 */
/* Base + accent vars */
.tfw_box{
  border:var(--tfw-bw, 1px) solid var(--tfw-border, #e5e7eb);
  border-radius:var(--tfw-rad, 12px);
  padding:12px;
  background:#fff;
  font:normal 14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif
}
.tfw__hdr{
  display:flex;align-items:center;justify-content:space-between;
  padding-bottom:12px;margin-bottom:14px;
  border-bottom:var(--tfw-divw, 1px) solid var(--tfw-divider, var(--tfw-border, #e5e7eb));
}
.tfw__brand{display:inline-flex;align-items:center;gap:8px;font-weight:700;letter-spacing:.3px}
.tfw__brand img{height:24px;width:auto;display:block}
.tfw__more{display:inline-flex;align-items:center;gap:6px;background:#f6f8fa;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px;text-decoration:none;color:#111}
.tfw__more:hover{background:#eef2f7}

/* List layout (sidebar) */
.tfw__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.tfw__item{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.tfw__thumb{flex:0 0 auto;width:112px;height:84px;border-radius:8px;overflow:hidden;background:#f2f2f2;border:1px solid #eee;order:2;margin-left:10px}
.tfw__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tfw__meta{display:flex;flex-direction:column;gap:6px;order:1;flex:1}
.tfw__link{font-weight:700;line-height:1.35;text-decoration:none;color:#141414}
.tfw__link:hover{text-decoration:underline}
.tfw__time,.tfw_card-time{font-size:12px;color:#6b7280}
.tfw_error{background:#fff7f7;border-color:#ffd4d4}
@media (max-width:480px){.tfw__thumb{width:96px;height:72px}}

/* Carousel layout */
.tfw--carousel { --gap:12px; --pv:1; --pv-md:2; --pv-lg:3; }
.tfw--carousel .tfw_carousel{position:relative}
.tfw--carousel .tfw_track{
  display:grid;grid-auto-flow:column;
  grid-auto-columns:calc((100% - var(--gap)*(var(--pv-active, var(--pv)) - 1)) / var(--pv-active, var(--pv)));
  gap:var(--gap);overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:1px;
  -webkit-overflow-scrolling:touch;padding-bottom:4px
}
/* Hide scrollbar utility */
.tfw--carousel .tfw_track.no-scrollbar{
  -ms-overflow-style:none; /* IE/Edge */
  scrollbar-width:none;    /* Firefox */
}
.tfw--carousel .tfw_track.no-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}

@media (min-width:640px){ .tfw--carousel { --pv-active: var(--pv-md); } }
@media (min-width:1024px){ .tfw--carousel { --pv-active: var(--pv-lg); } }

.tfw--carousel .tfw_card{
  display:flex;flex-direction:column;gap:8px;scroll-snap-align:start;
  text-decoration:none;color:inherit;border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff
}
.tfw--carousel .tfw_card:hover{box-shadow:0 4px 16px rgba(0,0,0,.08)}
.tfw--carousel .tfw_card-thumb{width:100%;height:160px;border-radius:10px;overflow:hidden;background:#f2f2f2;border:1px solid #eee}
.tfw--carousel .tfw_card-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tfw--carousel .tfw_card-title{font-weight:700;line-height:1.3}
.tfw--carousel .tfw_nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:999px;border:1px solid var(--tfw-border,#d1d5db);
  background:#fff;color:#111;display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.08);z-index:1
}
.tfw--carousel .tfw_prev{left:-6px}
.tfw--carousel .tfw_next{right:-6px}
.tfw--carousel .tfw_nav:hover{background:#f9fafb}

/* Elementor/editor preview: rapihin tampilan supaya gak berantakan */
.elementor-editor-active .tfw--carousel .tfw_track{overflow-x:hidden}
.elementor-editor-active .tfw--carousel .tfw_nav{opacity:.7}

/* Accent variant */
.tfw--bsatu{border:var(--tfw-bw, 2px) solid var(--tfw-border, #ef4444);border-radius:10px;padding:10px}
.tfw--bsatu .tfw__hdr{border-bottom:var(--tfw-divw, 1px) solid var(--tfw-divider, var(--tfw-border, #ef4444));padding-bottom:8px;margin-bottom:12px}
.tfw--bsatu .tfw__more{background:#ffffff;border-color:var(--tfw-border, #ef4444);color:var(--tfw-border, #ef4444)}
.tfw--bsatu .tfw__more:hover{background:#fff1f1}
