/* winners/2026/assets/winner-index.css
   Public winner index. Loaded after winner-company.css (shares :root vars,
   .site-header, .footer, .hex-bg, .container). */

/* Same hex background as the single winner page, but pinned to the viewport
   so the pattern stays at a consistent (small) scale no matter how tall the
   page gets. On the winner page `cover` looks fine because the page is short;
   on this very long index, `cover` on the section would blow the hexagons up
   ~5x. Fixed attachment sizes the image to the screen instead of the element. */
.index-body {
  background-color: var(--bg);
  background-image: url("https://awards.thehackernews.com/wp-content/themes/awards/assets/images/single-winner-bg.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}
/* Stop the .hex-bg section from layering its own tall, blown-up copy on top —
   let the fixed body pattern show through the winners list. */
.index-body .hex-bg { background: transparent; }
/* iOS ignores fixed attachment; fall back to a normal scroll background there. */
@media (max-width: 768px) {
  .index-body { background-attachment: scroll; }
}

/* ── Preview banner ── */
.preview-banner {
  background: #fffbef;
  border-bottom: 1px solid #f1e1b3;
  color: #8a6817;
  text-align: center;
  padding: 8px 16px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.preview-banner code {
  background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: #5a4517;
}

/* ============================================================
   HERO  (medal left, text right)
============================================================ */
.index-hero {
  background-color: #0a163d;
  background-image: url("https://awards.thehackernews.com/wp-content/uploads/2025/03/pricing-hero-bg-scaled.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  color: #fff;
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.index-hero__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 18px;
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: 24px;
  align-items: center; text-align: center;
}
.index-hero__medal {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.index-hero__medal img {
  width: 100%; height: auto; max-width: 180px;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.45));
}
/* Badge download links under the medal — label row, then formats row */
.index-hero__downloads {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: .02em;
}
.index-hero__downloads-label {
  text-transform: uppercase; font-weight: 700; font-size: 10px; letter-spacing: .14em;
  color: #8c9bc4;
}
.index-hero__downloads-files {
  display: flex; align-items: center; gap: 8px;
}
.index-hero__downloads a {
  color: #eed17f; font-weight: 700; text-decoration: none;
  transition: color .12s ease;
}
.index-hero__downloads a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.index-hero__downloads-sep { color: #5a6aa0; }
.index-hero__text { min-width: 0; }
.index-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.index-hero__eyebrow::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,164,55,.25);
}
.index-hero__title {
  font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0 0 14px;
  letter-spacing: -.01em; text-wrap: balance; color: #d2ae72;
}
.index-hero__lead {
  font-size: 14px; line-height: 1.65; color: #c9d2ed; max-width: 620px; margin: 0 0 22px;
}
.index-hero__count {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  color: #c9d2ed; font-weight: 500; font-size: 13px; letter-spacing: .02em;
}
.index-hero__count strong { font-size: 20px; font-weight: 800; color: #fff; }
@media (min-width: 640px) {
  .index-hero { padding: 64px 0 72px; }
  .index-hero__title { font-size: 42px; }
  .index-hero__lead  { font-size: 15.5px; }
  .index-hero__medal img { max-width: 215px; }
}
@media (min-width: 920px) {
  .index-hero { padding: 60px 0 60px; }
  .index-hero__inner {
    grid-template-columns: minmax(240px, 300px) 1fr; gap: 56px;
    text-align: left; align-items: center;
  }
  .index-hero__medal { justify-self: center; width: 100%; }
  /* width:100% (not auto) so the SVG scales to the column; capped at 250px. */
  .index-hero__medal img { width: 100%; height: auto; max-width: 250px; }
  .index-hero__title { font-size: 52px; }
  .index-hero__lead  { margin-left: 0; margin-right: 0; }
}
@media (min-width: 1200px) {
  .index-hero { padding: 80px 0 80px; }
}

/* ============================================================
   MAIN
============================================================ */
.index-main { padding: 36px 0 80px; position: relative; }

/* Compact filter bar at the top of the winners list (non-sticky). */
.index-filter {
  display: flex; align-items: stretch; gap: 10px;
  max-width: 860px; margin: 0 auto 38px;
  flex-wrap: wrap;
}
.index-filter__search {
  flex: 1 1 240px; min-width: 200px;
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 14px; color: var(--ink-400);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.index-filter__search:focus-within {
  border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,164,55,.14);
}
.index-filter__search svg { flex: none; color: var(--ink-400); }
.index-filter__search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  padding: 12px 0;
  font: 400 14.5px/1 'Inter', system-ui, sans-serif; color: var(--ink-900);
}
.index-filter__search input::placeholder { color: var(--ink-400); }

.index-filter__select-wrap {
  position: relative; flex: 0 1 200px; min-width: 150px;
}
.index-filter__select-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%;
  width: 8px; height: 8px; margin-top: -5px;
  border-right: 2px solid var(--ink-400); border-bottom: 2px solid var(--ink-400);
  transform: rotate(45deg); pointer-events: none;
}
.index-filter__select {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 12px 34px 12px 14px;
  font: 500 14px/1 'Inter', system-ui, sans-serif; color: var(--ink-900);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.index-filter__select:focus {
  outline: 0; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(212,164,55,.14);
}
@media (max-width: 600px) {
  .index-filter__search { flex: 1 1 100%; }
  .index-filter__select-wrap { flex: 1 1 calc(50% - 5px); min-width: 0; }
}
.index-noresults {
  text-align: center; color: var(--ink-500); font-size: 15px;
  padding: 60px 0;
}

.cat-section { margin-bottom: 56px; scroll-margin-top: 24px; }
.cat-section:last-child { margin-bottom: 0; }
/* Centered category divider: golden line — name // count — golden line. */
.cat-section__head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 32px;
}
.cat-section__rule {
  flex: 1 1 auto; min-width: 16px; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(212,164,55,.9));
}
.cat-section__rule:last-child {
  background: linear-gradient(90deg, rgba(212,164,55,.9), transparent);
}
.cat-section__label {
  flex: none; margin: 0; text-align: center; white-space: nowrap;
  font-size: 17px; font-weight: 700; letter-spacing: .01em;
  color: var(--ink-900);
}
.cat-section__sep { color: var(--gold-500); font-weight: 800; margin: 0 6px; }
.cat-section__num { color: var(--ink-500); font-weight: 600; }

/* subcategory jump pills */
.subcat-pills {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px;
}
.subcat-pill {
  font-size: 12px; font-weight: 600; color: var(--ink-700);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; text-decoration: none;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.subcat-pill:hover { border-color: var(--gold-500); color: var(--ink-900); background: #fffbef; }
.subcat-pill span {
  display: inline-block; margin-left: 4px; color: var(--ink-400); font-weight: 700; font-size: 11px;
}

/* subcategory group + heading */
.subcat-group { margin-bottom: 36px; scroll-margin-top: 24px; }
.subcat-group:last-child { margin-bottom: 0; }
/* Subcategory = the award. Prominent heading. */
.subcat-head {
  display: flex; align-items: center; gap: 16px; margin: 0 0 18px;
  padding-left: 3px;
}
.subcat-head__name {
  font-size: 17px; font-weight: 700; letter-spacing: -.005em;
  color: var(--ink-900);
}
.subcat-head__rule { flex: 1 1 auto; min-width: 16px; height: 1px; background: var(--line); }
.subcat-head__count {
  flex: none; font-size: 11px; font-weight: 800; color: var(--ink-400);
  width: 22px; height: 22px; border-radius: 50%; background: #f6f4ea;
  display: grid; place-items: center;
}

/* ============================================================
   WINNER CARD
============================================================ */
.winner-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
@media (min-width: 600px) { .winner-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 1000px) { .winner-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.wcard {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(14,21,48,.05);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
  min-height: 100%;
  overflow: hidden;
}
/* subtle gold top accent that reveals on hover — quiet awards cue */
.wcard::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-500), #e7c97a);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.wcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(14,21,48,.13);
  border-color: #e8dcb4;
}
.wcard:hover::before { transform: scaleX(1); }

/* logo + company name share a row; company name is vertically centered
   beside the logo. Nomination title sits below, full width. */
.wcard__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.wcard__logo {
  width: 60px; height: 60px; flex: none;
  border-radius: 9px; overflow: hidden;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
}
.wcard__logo img { width: 90%; height: 90%; object-fit: contain; }
.wcard__logo--mono {
  background: linear-gradient(155deg, #1c2c5e 0%, #0e1530 100%);
  border-color: transparent;
  color: var(--gold-500);
  font: 800 24px/1 'Inter', system-ui, sans-serif;
  box-shadow: inset 0 0 0 1px rgba(212,164,55,.18);
}

/* main title = company name (#0e1530), centered beside the logo */
.wcard__title {
  margin: 0; flex: 1 1 auto; min-width: 0;
  font-size: 17px; font-weight: 700; line-height: 1.3;
  color: #0e1530; letter-spacing: -.006em;
  text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* secondary = nomination title (#5a6586). Made to stand out: heavier weight,
   roomy line-height, and a guaranteed gap before the divider. */
.wcard__sub {
  margin: 0 0 16px;
  font-size: 15px; font-weight: 600; color: #5a6586;
  line-height: 1.5; letter-spacing: -.003em; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* compact last row */
.wcard__foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wcard__country {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--ink-500);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wcard__country svg { flex: none; color: var(--gold-600); }
.wcard__country span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard__go {
  flex: none;
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-500); color: var(--gold-600);
  background: #fff;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.wcard__go svg { width: 13px; height: 13px; }
.wcard:hover .wcard__go {
  background: var(--gold-500); color: #0e1530; transform: translateX(3px);
}

/* ── Mobile tightening ── */
@media (max-width: 600px) {
  .index-main { padding: 26px 0 60px; }
  .wcard { padding: 16px; border-radius: 10px; }
  .wcard__head { gap: 12px; }
  .wcard__logo { width: 54px; height: 54px; border-radius: 8px; }
  .wcard__logo--mono { font: 800 22px/1 'Inter', system-ui, sans-serif; }
  .wcard__title { font-size: 16px; }
  .wcard__sub { font-size: 14px; }
  .cat-section { margin-bottom: 42px; }
  .subcat-head { padding-left: 3px; }
  .cat-section__head { gap: 12px; }
  .cat-section__label, .subcat-head__name { font-size: 15px; }
  .cat-section__label { white-space: normal; }
}

/* ── Empty state ── */
.empty-state {
  background: #fff; border: 1px dashed var(--line); border-radius: 10px;
  padding: 60px 24px; text-align: center; color: var(--ink-500); margin-top: 32px;
}
.empty-state__title { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 0 0 8px; }

/* ── Back to top ── */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink-900); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(14,21,48,.3);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .15s ease;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { background: var(--gold-600); }
