/* TIS Certificates — front-end showcase v1.1 (light cards, RTL safe) */
.tisc-stage {
  --tisc-accent: var(--tg-accent, #dc6421);
  --tisc-accent-2: var(--tg-accent-2, #ff9b42);
  --tisc-line: rgba(255, 255, 255, .1);
  --tisc-soft: rgba(255, 255, 255, .62);
  /* light card palette */
  --tisc-card-bg: #fffdf9;
  --tisc-card-line: rgba(226, 119, 44, .22);
  --tisc-ink: #22262d;
  --tisc-ink-soft: #5c6270;
  --tisc-ink-faint: #8a8f99;
  --tisc-green: #1a9e5f;
  --tisc-amber: #b97a10;
}

/* filter chips -------------------------------------------------------- */
.tisc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}
.tisc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--tisc-soft);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--tisc-line);
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.tisc-chip span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.tisc-chip:hover { transform: translateY(-1px); color: #fff; }
.tisc-chip.is-active {
  color: #131313;
  background: linear-gradient(135deg, var(--tisc-accent), var(--tisc-accent-2));
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(220, 100, 33, .4);
}
.tisc-chip.is-active span { background: rgba(0, 0, 0, .18); color: #fff; }
.tisc-chip:focus-visible { outline: 2px solid var(--tisc-accent-2); outline-offset: 2px; }

/* grid ---------------------------------------------------------------- */
.tisc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
@media (max-width: 560px) {
  .tisc-grid { grid-template-columns: 1fr; }
}

/* card (light) -------------------------------------------------------- */
.tisc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  color: var(--tisc-ink);
  background:
    linear-gradient(180deg, rgba(255, 246, 236, .65), rgba(255, 255, 255, 0) 46%),
    var(--tisc-card-bg);
  border: 1px solid var(--tisc-card-line);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(8, 10, 14, .42), 0 2px 0 rgba(255, 255, 255, .9) inset;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .35s ease;
  animation: tisc-in .6s cubic-bezier(.22, .8, .3, 1) both;
  animation-delay: var(--tisc-delay, 0ms);
}
@keyframes tisc-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.tisc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 100, 33, .45);
  box-shadow: 0 22px 46px rgba(8, 10, 14, .5), 0 0 0 1px rgba(255, 155, 66, .28);
}
.tisc-card.tisc-hidden { display: none; }

/* authentication shield (corner) --------------------------------------- */
.tisc-card__auth {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #19b56b, #0e8a4e);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 12px rgba(14, 138, 78, .4);
}
.tisc-card__auth svg { width: 16px; height: 16px; }

/* head: seal + heading ------------------------------------------------- */
.tisc-card__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-inline-end: 26px; /* room for the corner shield */
}
.tisc-card__seal {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 190, 130, .55), transparent 62%),
    linear-gradient(160deg, #ffe9d4 0%, #ffd9b4 55%, #ffcf9f 100%);
  border: 1.5px solid rgba(220, 100, 33, .38);
  box-shadow: 0 6px 14px rgba(220, 100, 33, .22);
  overflow: visible;
}
.tisc-card__seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.tisc-card__ribbon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #b4591b;
}
.tisc-card__ribbon svg { width: 36px; height: 36px; }
.tisc-card__initials {
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -56%);
  font-family: 'Orbitron', 'Arial Black', 'Segoe UI', Tahoma, sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .05em;
  color: #7a3a10;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(220, 100, 33, .3);
  border-radius: 999px;
  padding: 2px 8px;
  pointer-events: none;
}
html[dir="rtl"] .tisc-card__initials { transform: translate(50%, -56%); }

.tisc-card__heading { min-width: 0; }

/* tags ----------------------------------------------------------------- */
.tisc-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tisc-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b5036;
  background: #f6efe6;
  border: 1px solid #ecdfcf;
  border-radius: 999px;
}
.tisc-tag__flag { font-size: 12px; line-height: 1; }
.tisc-tag--shop {
  color: #b4591b;
  border-color: rgba(220, 100, 33, .4);
  background: #fdeede;
}
.tisc-tag--staff {
  color: #0d6d9c;
  border-color: rgba(23, 145, 203, .35);
  background: #e8f5fd;
}
.tisc-tag--country { text-transform: none; }

/* text ------------------------------------------------------------------ */
.tisc-card__title {
  margin: 0 0 3px;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--tisc-ink);
}
.tisc-card__person {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: #b4591b;
}
.tisc-card__issuer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12.5px;
  color: var(--tisc-ink-soft);
}
.tisc-card__issuer svg { width: 14px; height: 14px; color: var(--tisc-green); flex: 0 0 auto; }
.tisc-card__issuer span { opacity: .75; }

/* expertise chips -------------------------------------------------------- */
.tisc-card__skills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tisc-card__skills-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tisc-ink-faint);
}
.tisc-skill {
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #8a4a12;
  background: #fff3e3;
  border: 1px solid #f3dfc0;
  border-radius: 999px;
}

/* teaser ----------------------------------------------------------------- */
.tisc-card__teaser {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tisc-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* expandable details ------------------------------------------------------ */
.tisc-card__details {
  border-top: 1px dashed #ead9c4;
  padding-top: 10px;
  display: grid;
  gap: 7px;
}
.tisc-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--tisc-ink-soft);
}
p.tisc-detail:first-child { align-items: flex-start; }
p.tisc-detail:first-child svg { margin-top: 2px; }
.tisc-detail svg { width: 15px; height: 15px; color: #b4591b; flex: 0 0 auto; }
.tisc-detail span { font-weight: 700; color: var(--tisc-ink); }
.tisc-detail code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #7a3a10;
  background: #f6efe6;
  border: 1px solid #ecdfcf;
  border-radius: 6px;
  padding: 1px 7px;
  direction: ltr;
  unicode-bidi: embed;
}
.tisc-detail--valid span, .tisc-detail--valid svg { color: var(--tisc-green); }
.tisc-detail--due span, .tisc-detail--due svg { color: var(--tisc-amber); }
.tisc-verify {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: #b4591b;
  text-decoration: none;
  border-bottom: 1.5px dotted #d9a05f;
  padding-bottom: 1px;
}
.tisc-verify:hover { color: #124f36; border-bottom-style: solid; }
.tisc-verify svg { width: 13px; height: 13px; }

/* footer: credential echo + expander --------------------------------------- */
.tisc-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}
.tisc-card__foot:empty { display: none; }
.tisc-credecho {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--tisc-ink-faint);
  direction: ltr;
  unicode-bidi: embed;
}
.tisc-credecho svg { width: 13px; height: 13px; color: var(--tisc-green); }
.tisc-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  padding: 7px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: #b4591b;
  background: #fff3e3;
  border: 1px solid #f0d6b2;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.tisc-more:hover { background: #ffe8c9; transform: translateY(-1px); }
.tisc-more svg { width: 15px; height: 15px; transition: transform .25s ease; }
.tisc-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.tisc-more:focus-visible { outline: 2px solid #b4591b; outline-offset: 2px; }

.tisc-empty { color: var(--tisc-soft); font-size: 15px; }

@media (max-width: 560px) {
  .tisc-card { padding: 16px; }
  .tisc-card__seal { flex-basis: 62px; width: 62px; height: 62px; border-radius: 15px; }
  .tisc-card__ribbon svg { width: 30px; height: 30px; }
  .tisc-card__title { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .tisc-card { animation: none; transition: none; }
  .tisc-chip, .tisc-more { transition: none; }
  .tisc-more svg { transition: none; }
}

@media print {
  .tisc-filters, .tisc-more { display: none; }
  .tisc-card { box-shadow: none; break-inside: avoid; }
  .tisc-card__details[hidden] { display: grid; }
}
