.trs-section{
  --red:#D32F2F;
  --black:#111111;
  --sub:#6B7280;
  --paper:#FAF9F6;
  --paper-line:rgba(17,17,17,.12);
  background:var(--paper);
  padding:100px 24px 110px;
  font-family:'Inter','Poppins',Arial,sans-serif;
  overflow:hidden;
}

.trs-container{ max-width:1280px; margin:0 auto; }

/* ---------- HEAD ---------- */
.trs-head{
  text-align:center;
  max-width:640px;
  margin:0 auto 52px;
  opacity:0;
  transform:translateY(16px);
  animation:trsFadeUp .7s ease forwards;
}
.trs-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:'Space Mono',Menlo,Consolas,monospace;
  font-size:11.5px;
  font-weight:700;
  letter-spacing:3px;
  text-transform:uppercase;
  color:var(--red);
  margin-bottom:16px;
}
.trs-eyebrow::before,
.trs-eyebrow::after{ content:""; width:16px; height:1px; background:var(--red); opacity:.5; }
.trs-heading{
  margin:0 0 14px;
  font-size:34px;
  font-weight:800;
  color:var(--black);
  letter-spacing:-.5px;
  line-height:1.15;
}
.trs-desc{
  margin:0 0 26px;
  font-size:14.5px;
  line-height:1.7;
  color:var(--sub);
}

.trs-summary{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  justify-content:center;
  gap:12px;
  padding:13px 22px;
  background:#fff;
  border:1px solid var(--paper-line);
  border-radius:40px;
}
.trs-summary-score{
  font-size:19px;
  font-weight:800;
  color:var(--black);
}
.trs-summary-meta{
  font-size:12.5px;
  color:var(--sub);
}
.trs-summary-link{
  font-size:12px;
  font-weight:700;
  color:var(--red);
  text-decoration:none;
  border-bottom:1.5px solid rgba(211,47,47,.35);
  transition:border-color .25s ease;
}
.trs-summary-link:hover{ border-color:var(--red); }

.trs-stars{ display:inline-flex; gap:2px; vertical-align:middle; }
.trs-star{ width:14px; height:14px; }

@keyframes trsFadeUp{ to{ opacity:1; transform:translateY(0); } }

/* ---------- TICKET CARD (shared by grid + marquee) ---------- */
.trs-card{
  position:relative;
  background:#fff;
  border:1px solid var(--paper-line);
  border-top:2px dashed rgba(17,17,17,.16);
  border-radius:4px 4px 16px 16px;
  padding:24px 24px 22px;
  box-shadow:0 10px 24px rgba(17,17,17,.05);
  transition:box-shadow .3s ease, transform .3s ease;
}
.trs-card:hover{
  box-shadow:0 20px 38px rgba(17,17,17,.09);
  transform:translateY(-3px);
}
/* punch-hole notches at the top corners, like a torn ticket stub */
.trs-card::before,
.trs-card::after{
  content:"";
  position:absolute;
  top:-9px;
  width:16px; height:16px;
  border-radius:50%;
  background:var(--paper);
  border:1px solid var(--paper-line);
}
.trs-card::before{ left:-8px; }
.trs-card::after{ right:-8px; }

.trs-card-top{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.trs-avatar{
  width:40px; height:40px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 auto;
}
.trs-avatar-initial{
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--black);
  color:#fff;
  font-size:14.5px;
  font-weight:700;
}
.trs-card-id{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.trs-card-name{
  font-size:14px;
  font-weight:700;
  color:var(--black);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trs-card-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  color:var(--sub);
}
.trs-g-icon{ flex:0 0 auto; }

.trs-card-stars{ margin-bottom:11px; }

.trs-card-text{
  margin:0 0 4px;
  font-size:13.5px;
  line-height:1.68;
  color:#374151;
  display:-webkit-box;
  -webkit-line-clamp:5;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.trs-card-text.trs-expanded{
  -webkit-line-clamp:unset;
  overflow:visible;
}

.trs-card-more{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  color:var(--red);
  cursor:pointer;
  background:none;
  border:0;
  padding:0 0 10px;
  font-family:inherit;
}

.trs-card-foot{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-top:13px;
  padding-top:13px;
  border-top:1px dashed var(--paper-line);
}
.trs-card-date{
  font-family:'Space Mono',Menlo,Consolas,monospace;
  font-size:10px;
  color:#9CA3AF;
  letter-spacing:.5px;
  text-transform:uppercase;
}

/* ---------- GRID LAYOUT ---------- */
.trs-grid{
  list-style:none;
  margin:0;
  padding-top:10px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:26px 22px;
}
.trs-grid .trs-card{
  opacity:0;
  transform:translateY(18px);
  animation:trsFadeUp .6s ease forwards;
}

/* ---------- AUTO-SCROLLING MARQUEE (no buttons, no dots) ---------- */
.trs-marquee{
  position:relative;
  -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
          mask-image:linear-gradient(90deg, transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
}
.trs-track{
  list-style:none;
  margin:0;
  display:flex;
  gap:20px;
  width:max-content;
  padding:10px 0;
  animation:trsScrollLeft var(--trs-duration, 40s) linear infinite;
}
.trs-marquee:hover .trs-track,
.trs-marquee.trs-paused .trs-track{ animation-play-state:paused; }

@keyframes trsScrollLeft{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

/* card width driven by --trs-visible, set inline from the admin "cards visible at a time" setting */
.trs-track .trs-card{
  flex:0 0 auto;
  width:calc((100vw / var(--trs-visible, 3)) - 60px);
  max-width:360px;
  min-width:240px;
}

/* ============ RESPONSIVE ============ */

@media (max-width:980px){
  .trs-grid{ grid-template-columns:1fr 1fr; }
  .trs-heading{ font-size:29px; }

  /* tablets always show 2 at a time, regardless of the admin desktop setting */
  .trs-track .trs-card{ width:calc(50vw - 50px); max-width:320px; }
}

@media (max-width:640px){
  .trs-section{ padding:64px 18px 72px; }
  .trs-heading{ font-size:23px; }
  .trs-desc{ font-size:14px; }
  .trs-grid{ grid-template-columns:1fr; }
  .trs-summary{ padding:12px 16px; gap:8px; }

  /* phones: one card width, still auto-scrolling — swipe/nav not required */
  .trs-track .trs-card{ width:78vw; max-width:300px; }
  .trs-marquee{
    -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
            mask-image:linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce){
  .trs-head, .trs-grid .trs-card{ animation:none; opacity:1; transform:none; }
  .trs-card:hover{ transform:none; }
  .trs-track{
    animation:none;
    overflow-x:auto;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .trs-track .trs-card{ scroll-snap-align:start; }
}
