/* Homepage "Trending Websites" section (includes/trending-websites.php) */
.trending-web-section { background: #f6f6f8; }
.trending-web-section .tw-accent { color: var(--bt-accent, #ea332d); }

/* 8 sites on a 6-column grid: rows of 3, then 2 wide cards, then 3 */
.tw-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(18px, 2.2vw, 30px); }
.tw-card { display: block; grid-column: span 2; text-decoration: none; color: inherit; }
.tw-card:nth-child(5n+4), .tw-card:nth-child(5n+5) { grid-column: span 3; }
.tw-card:hover, .tw-card:focus-visible { color: inherit; }

.tw-win {
  display: block; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid #e3e3e8;
  box-shadow: 0 34px 64px -46px rgba(14, 14, 16, .6);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
}
.tw-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #f1f1f4; border-bottom: 1px solid #e6e6ea; }
.tw-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; flex: none; }
.tw-bar i:nth-child(2) { background: #febc2e; }
.tw-bar i:nth-child(3) { background: #28c840; }
.tw-bar em {
  flex: 1; max-width: 62%; margin: 0 auto; padding: 2px 12px; border-radius: 7px; background: #fff; color: #8a8a92;
  font-style: normal; font-size: 11.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translateX(-14px);
}
.tw-vid { position: relative; display: block; aspect-ratio: 960 / 600; background: #ececf0; }
.tw-vid video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tw-go {
  position: absolute; right: 14px; bottom: 14px; padding: 10px 16px; border-radius: 999px;
  background: var(--bt-accent, #ea332d); color: #fff; font-size: 13.5px; font-weight: 700;
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 16px 30px -14px rgba(234, 51, 45, .9);
}
.tw-go i { font-size: 11px; margin-left: 4px; }
.tw-card:hover .tw-win, .tw-card:focus-visible .tw-win { transform: translateY(-8px); box-shadow: 0 54px 84px -48px rgba(14, 14, 16, .75); }
.tw-card:hover .tw-go, .tw-card:focus-visible .tw-go { opacity: 1; transform: none; }

.tw-info { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 4px 0; }
.tw-info > span { min-width: 0; }
.tw-info b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: #1a1c1e; transition: color .25s; }
.tw-info small { display: block; margin-top: 2px; color: #8a8a92; font-size: 13.5px; }
.tw-info em { flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; color: #a6a6ae; }
.tw-card:hover .tw-info b { color: var(--bt-accent, #ea332d); }

@media (hover: none) {
  .tw-go { opacity: 1; transform: none; padding: 8px 13px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-win, .tw-go { transition: none; }
  .tw-card:hover .tw-win { transform: none; }
}
@media (max-width: 1080px) {
  .tw-grid { grid-template-columns: repeat(2, 1fr); }
  .tw-card, .tw-card:nth-child(5n+4), .tw-card:nth-child(5n+5) { grid-column: auto; }
  .tw-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tw-grid { grid-template-columns: 1fr; }
  .tw-win { border-radius: 14px; }
  .tw-bar { height: 26px; }
  .tw-bar em { font-size: 10.5px; }
  .tw-info em { display: none; }
}
