/* =========================
   HERO OVERFLOW + CENTER FIX
========================= */
/* =========================
   SEARCH DROPDOWN FIX ONLY
========================= */

/* anchor the dropdown to the search form, not center screen */
#quickSearch,
.search-wrap,
.search-bar,
.hero-search {
  position: relative;
}

/* dropdown box */
#searchSuggest {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0 !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;

  width: min(760px, 100%) !important;
  max-width: 100% !important;

  border-radius: 18px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(4, 14, 34, 0.98), rgba(2, 10, 24, 0.98)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35) !important;
  z-index: 999 !important;
}

/* each row */
#searchSuggest a,
#searchSuggest button,
#searchSuggest .suggest-item,
#searchSuggest .search-item,
#searchSuggest .result-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  width: 100% !important;

  padding: 18px 22px !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  text-align: left !important;

  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #eef4ff !important;
}

#searchSuggest a:last-child,
#searchSuggest button:last-child,
#searchSuggest .suggest-item:last-child,
#searchSuggest .search-item:last-child,
#searchSuggest .result-item:last-child {
  border-bottom: 0 !important;
}

/* title and subtitle inside rows */
#searchSuggest strong,
#searchSuggest .title {
  display: block !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 0 0 4px !important;
}

#searchSuggest small,
#searchSuggest .meta,
#searchSuggest .subtitle {
  display: block !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: rgba(220, 230, 245, 0.68) !important;
}

/* right label like PROJECT / AREA / DEVELOPER */
#searchSuggest .type,
#searchSuggest .tag,
#searchSuggest .kind {
  flex: 0 0 auto !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  color: #5ea0ff !important;
  text-transform: uppercase !important;
}

/* hover */
#searchSuggest a:hover,
#searchSuggest button:hover,
#searchSuggest .suggest-item:hover,
#searchSuggest .search-item:hover,
#searchSuggest .result-item:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* make the whole thing smaller on laptop */
@media (max-width: 1200px) {
  #searchSuggest {
    width: min(680px, 100%) !important;
  }

  #searchSuggest a,
  #searchSuggest button,
  #searchSuggest .suggest-item,
  #searchSuggest .search-item,
  #searchSuggest .result-item {
    padding: 16px 18px !important;
    font-size: 14px !important;
  }

  #searchSuggest strong,
  #searchSuggest .title {
    font-size: 15px !important;
  }
}

/* mobile */
@media (max-width: 768px) {
  #searchSuggest {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    border-radius: 16px !important;
  }

  #searchSuggest a,
  #searchSuggest button,
  #searchSuggest .suggest-item,
  #searchSuggest .search-item,
  #searchSuggest .result-item {
    padding: 14px 16px !important;
  }

  #searchSuggest strong,
  #searchSuggest .title {
    font-size: 14px !important;
  }

  #searchSuggest small,
  #searchSuggest .meta,
  #searchSuggest .subtitle {
    font-size: 12px !important;
  }

  #searchSuggest .type,
  #searchSuggest .tag,
  #searchSuggest .kind {
    font-size: 11px !important;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Stop wrappers from pushing page wider */
.wrap,
.hero,
.hero-inner,
.hero-content,
.hero-shell,
.section,
.container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* header/menu spacing fix only */
.topbar-inner {
  width: min(1280px, calc(100% - 48px)) !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 980px) {
  .topbar-inner {
    width: calc(100% - 28px) !important;
  }
}

/* Give page content side space */
/* =========================
   HERO CENTER FIX ONLY
========================= */

.hero,
.home-hero,
.search-hero {
  padding-left: 24px;
  padding-right: 24px;
}

.hero-inner,
.home-hero-inner,
.search-hero-inner,
.hero-content,
.home-hero-content,
.search-hero-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-copy,
.home-hero-copy,
.search-hero-copy,
.hero-text,
.hero-head {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 24px;
  text-align: center !important;
}

.hero-copy h1,
.home-hero-copy h1,
.search-hero-copy h1,
.hero-text h1,
.hero-head h1 {
  margin: 0 auto 18px;
  max-width: 1700px;
  text-align: center !important;
}

.hero-copy p,
.home-hero-copy p,
.search-hero-copy p,
.hero-text p,
.hero-head p {
  margin: 0 auto 32px;
  max-width: 1100px;
  text-align: center !important;
}

.hero-search,
.home-hero-search,
.search-row,
.search-bar,
.search-wrap,
.quick-search-row {
  width: 100%;
  max-width: 1180px;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.hero-search input,
.home-hero-search input,
.search-row input,
.search-bar input,
.search-wrap input,
.quick-search-row input,
.hero-search .search-input,
.home-hero-search .search-input,
.search-row .search-input,
.search-bar .search-input {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-search button,
.home-hero-search button,
.search-row button,
.search-bar button,
.search-wrap button,
.quick-search-row button,
.hero-search .search-btn,
.home-hero-search .search-btn,
.search-row .search-btn,
.search-bar .search-btn {
  flex: 0 0 240px;
  width: 240px;
}

@media (max-width: 980px) {
  .hero-search,
  .home-hero-search,
  .search-row,
  .search-bar,
  .search-wrap,
  .quick-search-row {
    flex-direction: column;
    max-width: 720px;
  }

  .hero-search button,
  .home-hero-search button,
  .search-row button,
  .search-bar button,
  .search-wrap button,
  .quick-search-row button,
  .hero-search .search-btn,
  .home-hero-search .search-btn,
  .search-row .search-btn,
  .search-bar .search-btn {
    width: 100%;
    flex: 0 0 auto;
  }
}

/* Make sure no card strip or section creates overflow */
section,
main,
.hero,
.rankings,
.projects-grid,
.cards-row {
  overflow-x: hidden;
}

/* Mobile and smaller laptop fix */
@media (max-width: 980px) {
  .hero,
  .hero-inner,
  .hero-content,
  .hero-shell,
  .section,
  .container,
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-copy h1,
  .hero-text h1,
  .hero-head h1,
  .search-hero-copy h1 {
    font-size: clamp(34px, 7vw, 56px);
    line-height: 1.08;
  }

  .hero-search,
  .search-row,
  .search-bar,
  .search-wrap,
  .quick-search-row {
    flex-direction: column;
    width: min(100%, 720px);
    gap: 14px;
  }

  .hero-search input,
  .search-row input,
  .search-bar input,
  .search-wrap input,
  .quick-search-row input,
  .hero-search .search-input,
  .search-row .search-input,
  .search-bar .search-input,
  .hero-search button,
  .search-row button,
  .search-bar button,
  .search-wrap button,
  .quick-search-row button,
  .hero-search .search-btn,
  .search-row .search-btn,
  .search-bar .search-btn {
    width: 100%;
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .hero,
  .hero-inner,
  .hero-content,
  .hero-shell,
  .section,
  .container,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-copy h1,
  .hero-text h1,
  .hero-head h1,
  .search-hero-copy h1 {
    font-size: clamp(30px, 8.5vw, 42px);
  }
}

.tool-hub {
  padding: 42px 0 22px;
}

.tool-hub-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.tool-hub-head h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 40px;
  line-height: 1.08;
}

.tool-hub-head p {
  margin: 0;
  max-width: 820px;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.6;
}

.tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  min-height: 220px;
  padding: 24px;
  border-radius: 26px;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(8,37,48,.98), rgba(20,28,55,.98));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(45,240,138,.13), transparent 42%),
    radial-gradient(circle at bottom right, rgba(59,130,246,.12), transparent 38%);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45,240,138,.24);
  box-shadow: 0 24px 50px rgba(0,0,0,.30);
}

.tool-card-featured {
  background:
    linear-gradient(135deg, rgba(7,41,35,.98), rgba(18,28,55,.98));
  border-color: rgba(45,240,138,.18);
}

.tool-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 28px;
}

.tool-copy {
  position: relative;
  z-index: 1;
}

.tool-copy h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
}

.tool-copy p {
  margin: 0 0 14px;
  color: #a8b6ca;
  font-size: 15px;
  line-height: 1.6;
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(45,240,138,.11);
  border: 1px solid rgba(45,240,138,.24);
  color: #bdf7d3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .tool-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tool-hub {
    padding: 30px 0 12px;
  }

  .tool-hub-head h2 {
    font-size: 30px;
  }

  .tool-hub-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 190px;
    padding: 20px;
    border-radius: 22px;
  }

  .tool-copy h3 {
    font-size: 20px;
  }

  .tool-copy p {
    font-size: 14px;
  }
}
/* =========================
   SEARCH FIX
========================= */

.hero,
.hero-inner,
.wrap {
  overflow: visible !important;
}

.quick-search {
  position: relative;
  width: min(760px, 100%);
  max-width: 100%;
  margin: 24px auto 0;
  overflow: visible !important;
  z-index: 200;
}

.quick-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.quick-search-row input[type="search"],
.quick-search-row input[type="text"],
#q {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 0 26px;
  border-radius: 22px;
  font-size: 32px;
  font-weight: 700;
  box-sizing: border-box;
}

.quick-search-row .btn {
  min-width: 170px;
  min-height: 72px;
  border-radius: 22px;
  flex: none;
}

.search-suggest {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  background: #07122a;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
  z-index: 9999;
}

.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  text-decoration: none;
  color: #eaf0ff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-item:hover {
  background: rgba(255,255,255,.04);
}

.s-label {
  display: block;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
}

.s-sub {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: #94a3b8;
}

.s-type {
  flex: none;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #60a5fa;
}

@media (max-width: 768px) {
  .quick-search {
    width: 100%;
  }

  .quick-search-row {
    grid-template-columns: 1fr;
  }

  .quick-search-row input[type="search"],
  .quick-search-row input[type="text"],
  #q,
  .quick-search-row .btn {
    min-height: 58px;
    font-size: 18px;
    border-radius: 16px;
  }

  .quick-search-row .btn {
    min-width: 100%;
  }

  .suggest-item {
    padding: 16px 18px;
  }

  .s-label {
    font-size: 17px;
  }

  .s-sub {
    font-size: 13px;
  }

  .s-type {
    font-size: 11px;
  }
} 


.tr-body{
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tr-name{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f7f9fc;
}

.tr-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tr-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbe6f5;
  font-size: 12px;
  line-height: 1;
}

.tr-chip-label{
  color: #8ea3bd;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.tr-chip strong{
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.tr-stats{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tr-stat-card{
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18,28,48,0.95), rgba(10,18,34,0.95));
  border: 1px solid rgba(91,123,170,0.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.tr-stat-label{
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7f94ad;
  font-weight: 700;
}

.tr-stat-value{
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
}

.tr-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.tr-pill{
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tr-hot,
.tr-very-hot{
  background: rgba(255, 126, 33, 0.14);
  border: 1px solid rgba(255, 126, 33, 0.45);
  color: #ffb067;
}

.tr-warm{
  background: rgba(255, 193, 7, 0.14);
  border: 1px solid rgba(255, 193, 7, 0.40);
  color: #ffd45a;
}

.tr-calm,
.tr-cold{
  background: rgba(117, 136, 163, 0.12);
  border: 1px solid rgba(117, 136, 163, 0.30);
  color: #c3cfdf;
}

.tr-risk-low{
  background: rgba(28, 201, 117, 0.14);
  border: 1px solid rgba(28, 201, 117, 0.42);
  color: #8ff0b8;
}

.tr-risk-moderate{
  background: rgba(255, 193, 7, 0.14);
  border: 1px solid rgba(255, 193, 7, 0.40);
  color: #ffd45a;
}

.tr-risk-high{
  background: rgba(255, 82, 82, 0.14);
  border: 1px solid rgba(255, 82, 82, 0.40);
  color: #ff9a9a;
}

@media (max-width: 640px){
  .tr-stats{
    grid-template-columns: 1fr;
  }

  .tr-name{
    font-size: 17px;
  }
}
.cta-row .compare-ai-btn{
  position: relative;
  border: 1px solid transparent !important;
  background:
    linear-gradient(#2df08a, #1ed66d) padding-box,
    linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335) border-box !important;
  color: #04140c !important;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(30, 214, 109, 0.22);
}

.cta-row .compare-ai-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(30, 214, 109, 0.28);
}

.top-developers {
  padding: 42px 0 28px;
}

.td-head {
  margin-bottom: 22px;
}

.td-head h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 40px;
  line-height: 1.1;
}

.td-head p {
  margin: 0;
  max-width: 860px;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.55;
}

.td-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.td-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 128px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(12,22,42,.98), rgba(7,18,34,.98));
  border: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.td-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59,130,246,.26);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}

.td-logo {
  width: 86px;
  height: 86px;
  min-width: 86px;
  border-radius: 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.td-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.td-logo span {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.td-body h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
  line-height: 1.2;
}

.td-meta {
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 14px;
}

.td-score {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.28);
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 600;
}

.td-bottom {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.td-more {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
}

@media (max-width: 1100px) {
  .td-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .td-head h2 {
    font-size: 28px;
  }

  .td-grid {
    grid-template-columns: 1fr;
  }

  .td-card {
    padding: 18px;
    min-height: 116px;
  }

  .td-logo {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
}
/* =========================
   GOOGLE STYLE FILTER BAR
========================= */

.filters-bar {
  top: 72px;
  z-index: 30;
  padding: 18px 0 14px;
  background: linear-gradient(to bottom, rgba(2,8,23,.96), rgba(2,8,23,.88));
  backdrop-filter: blur(10px);
}

.gfilters-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gfilters-scroll::-webkit-scrollbar {
  display: none;
}

.gfilters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gchip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0b1730;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: .18s ease;
}

.gchip:hover {
  background: #102040;
  border-color: rgba(255,255,255,.18);
}

.gchip.is-active {
  background: rgba(37,99,235,.16);
  border-color: rgba(59,130,246,.38);
  box-shadow: 0 0 0 1px rgba(59,130,246,.10) inset;
}

.gchip-label {
  font-size: 13px;
  color: #9fb0c7;
}

.gchip-value {
  font-size: 14px;
  font-weight: 600;
  color: #f3f6fb;
}

.gchip-reset {
  background: transparent;
  border-style: dashed;
}

/* backdrop */
.gbackdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,8,20,.55);
  backdrop-filter: blur(4px);
  z-index: 80;
}

/* panel */
.gpanel {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 120px);
  overflow: hidden;
  border-radius: 22px;
  background: #071426;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  z-index: 90;
}

.gpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #fff;
}

.gpanel-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: #dbe7f5;
  cursor: pointer;
}

.gpanel-body {
  padding: 14px 16px 16px;
}

.gpanel-search {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0b1830;
  color: #fff;
  padding: 0 14px;
  margin-bottom: 12px;
  outline: none;
}

.gpanel-search:focus {
  border-color: rgba(59,130,246,.45);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.goption-list {
  max-height: 380px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.goption {
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: #e5e7eb;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
  transition: .15s ease;
}

.goption:hover {
  background: rgba(255,255,255,.07);
}

.goption.is-selected {
  background: rgba(37,99,235,.18);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(59,130,246,.30) inset;
}

.gprice-box {
  padding: 6px 2px 2px;
}

.gprice-label {
  display: block;
  margin-bottom: 14px;
  color: #b9c7da;
  font-size: 14px;
}

#priceVal {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

#f-price {
  width: 100%;
}

/* responsive */
@media (max-width: 860px) {
  .gfilters {
    flex-wrap: nowrap;
    width: max-content;
    padding-bottom: 4px;
  }

  .filters-bar {
    top: 62px;
  }
}

@media (max-width: 640px) {
  .gpanel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: 80vh;
    border-radius: 22px 22px 0 0;
  }

  .gpanel-head {
    padding-top: 14px;
  }

  .gchip {
    min-height: 42px;
    padding: 0 14px;
  }
}

/* =========================
   FILTER LAYOUT
========================= */

.filters {
  padding: 32px 0 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 20px;
  align-items: end;
}

.filter {
  min-width: 0;
}

.filter label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #9fb0c7;
}

/* Row 1: 4 equal filters */
.filter-row > .filter:nth-child(1),
.filter-row > .filter:nth-child(2),
.filter-row > .filter:nth-child(3),
.filter-row > .filter:nth-child(4) {
  grid-column: span 1;
}

/* Row 2: price takes 3 cols, reset takes 1 */
.filter-row > .filter.range {
  grid-column: 1 / span 3;
}

.filter-row > #clearFilters {
  grid-column: 4;
  width: 100%;
  min-height: 54px;
  align-self: end;
  margin: 0;
}

/* dropdown button */
.sfilter {
  position: relative;
  width: 100%;
}

.sfilter-toggle {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(59,130,246,.22);
  background: #081426;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 15px;
  cursor: pointer;
}

.sfilter-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sfilter-caret {
  font-size: 18px;
  opacity: .8;
  margin-left: 10px;
}

/* dropdown menu */
.sfilter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #081426;
  border: 1px solid rgba(59,130,246,.22);
  border-radius: 16px;
  padding: 10px;
  z-index: 80;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

.sfilter-search {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0b1830;
  color: #fff;
  padding: 0 12px;
  margin-bottom: 10px;
}

.sfilter-options {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sfilter-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: #e5e7eb;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.sfilter-option:hover,
.sfilter-option.is-selected {
  background: rgba(59,130,246,.16);
}

/* price block */
.filter.range {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.filter.range input[type="range"] {
  width: 100%;
  margin-top: 8px;
}

#priceVal {
  display: inline-block;
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #dbe7f5;
}

/* tablet */
@media (max-width: 1100px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .filter-row > .filter:nth-child(1),
  .filter-row > .filter:nth-child(2),
  .filter-row > .filter:nth-child(3),
  .filter-row > .filter:nth-child(4) {
    grid-column: span 1;
  }

  .filter-row > .filter.range {
    grid-column: 1 / -1;
  }

  .filter-row > #clearFilters {
    grid-column: 1 / -1;
  }
}

/* mobile */
@media (max-width: 640px) {
  .filter-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .filter-row > .filter,
  .filter-row > .filter.range,
  .filter-row > #clearFilters {
    grid-column: 1 / -1;
  }

  .sfilter-toggle,
  .sfilter-search,
  #clearFilters {
    min-height: 50px;
  }

  .filters {
    padding: 24px 0 18px;
  }
}

.sfilter {
  position: relative;
}

.sfilter-toggle {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(59,130,246,.22);
  background: #081426;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 15px;
  cursor: pointer;
}

.sfilter-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sfilter-caret {
  font-size: 18px;
  opacity: .8;
  margin-left: 10px;
}

.sfilter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #081426;
  border: 1px solid rgba(59,130,246,.22);
  border-radius: 16px;
  padding: 10px;
  z-index: 80;
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

.sfilter-search {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: #0b1830;
  color: #fff;
  padding: 0 12px;
  margin-bottom: 10px;
}

.sfilter-options {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sfilter-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: #e5e7eb;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.sfilter-option:hover,
.sfilter-option.is-selected {
  background: rgba(59,130,246,.16);
}

.filter.range input[type="range"] {
  width: 100%;
}

#priceVal {
  display: inline-block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .filter-row {
    grid-template-columns: 1fr;
  }

  .sfilter-toggle,
  .sfilter-search,
  .btn.ghost#clearFilters {
    min-height: 50px;
  }

  .btn.ghost#clearFilters {
    width: 100%;
  }
}
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 22px 0 8px;
}

#loadMoreBtn[hidden],
#loadMoreWrap[hidden] {
  display: none !important;
}
.filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.filter-row-top {
  margin-bottom: 14px;
}

.filter-search {
  grid-column: 1 / -1;
}

.filter-search input,
.filter select {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
}

.filter.range {
  min-width: 0;
}

.filter.range input[type="range"] {
  width: 100%;
}

#priceVal {
  display: inline-block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}

.grid-empty {
  grid-column: 1 / -1;
  padding: 22px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 16px;
  color: #94a3b8;
  background: rgba(255,255,255,.02);
}

@media (max-width: 1200px) {
  .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters.wrap {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

@media (max-width: 560px) {
  .filter-row {
    grid-template-columns: 1fr;
  }

  .filter-search input,
  .filter select,
  .btn.ghost#clearFilters {
    min-height: 50px;
  }

  .btn.ghost#clearFilters {
    width: 100%;
  }
}
.tr-price {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #9ca3af;
}

.tr-price-label {
  font-size: 0.75rem;
  opacity: 0.75;
}

.tr-hand {
  margin-top: 4px;
  font-size: 0.78rem;
  color: #d1d5db;
}

.tr-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tr-tagline {
    font-size: 13px;
    line-height: 1.4;
    color: #b5c1d3;
    margin-top: 6px;

    /* THE IMPORTANT FIXES */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}
.tr-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;

    /* prevents ANY overflow */
    min-height: 360px;
}


/* Ranking Pills */
.tr-pill {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: default;
    position: relative;
    color: #fff;
    font-weight: 500;
}

/* Heat colors */
.tr-hot {
    background: rgba(255, 102, 0, 0.25);
    border: 1px solid rgba(255, 102, 0, 0.5);
}
.tr-very-hot {
    background: rgba(255, 0, 0, 0.25);
    border: 1px solid rgba(255, 0, 0, 0.5);
}
.tr-warm {
    background: rgba(255, 204, 0, 0.25);
    border: 1px solid rgba(255, 204, 0, 0.5);
}
.tr-calm {
    background: rgba(0, 150, 255, 0.25);
    border: 1px solid rgba(0, 150, 255, 0.5);
}
.tr-cold {
    background: rgba(160, 160, 160, 0.25);
    border: 1px solid rgba(160, 160, 160, 0.5);
}

/* Risk colors */
.tr-risk-low {
    background: rgba(34,197,94,0.25);
    border: 1px solid rgba(34,197,94,0.6);
}
.tr-risk-moderate {
    background: rgba(234,179,8,0.25);
    border: 1px solid rgba(234,179,8,0.6);
}
.tr-risk-high {
    background: rgba(239,68,68,0.25);
    border: 1px solid rgba(239,68,68,0.6);
}

/* Tooltip */
.tr-pill:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #e5e7eb;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 20;
    opacity: 1;
}

.tr-pill:hover::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
}

/* --- Top Ranked 3-Column Grid --- */
.tr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 30px;
}

/* --- Card --- */
.tr-card {
    background: #0d1117;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

/* --- Thumbnail Image --- */
.tr-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* --- Body Content --- */
.tr-body {
    padding: 18px 20px;
}

.tr-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.tr-meta {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
}

/* Score row */
.tr-score-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.tr-score-number {
    font-size: 22px;
    font-weight: 700;
    color: #38bdf8;
}

.tr-score-label {
    font-size: 12px;
    color: #9ca3af;
}

/* Tags */
.tr-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.tr-tag {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #e5e7eb;
}

/

/* ============================
   TOP RANKED GRID FIX
   ============================ */

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.rank-card {
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.rank-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.rank-info {
    padding: 14px 16px;
}

.rank-meta {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.rank-score {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #38bdf8;
}



.top-ranked {
  padding: 50px 0 30px;
  background: #0b0f17;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tr-title {
  font-size: 28px;
  margin-bottom: 6px;
  color: #fff;
  text-align: center;
}
.tr-sub {
  text-align: center;
  color: #9ca3af;
  margin-bottom: 28px;
}

.tr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 20px;
}

.tr-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: #fff;
  transition: 0.2s ease;
}
.tr-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.05);
}

.tr-score-wrap {
  text-align: center;
  min-width: 62px;
  padding: 8px 0;
  border-radius: 12px;
  background: radial-gradient(circle at top, #6366f1, #3b0764);
}
.tr-score {
  display: block;
  font-size: 24px;
  font-weight: 700;
}
.tr-score-label {
  font-size: 11px;
  color: #d1d5db;
}

.tr-info {
  flex: 1;
}
.tr-name {
  margin: 0;
  font-size: 16px;
}
.tr-dev {
  margin: 2px 0 8px;
  font-size: 13px;
  color: #9ca3af;
}
.tr-tagline {
  margin-top: 6px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
}

.tr-tags {
  display: flex;
  gap: 6px;
}
.tr-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===============================
   SEARCH – TOP AUTHORITY BADGE
================================ */

.s-badge{
  display:inline-flex;
  align-items:center;
  height:18px;
  padding:0 8px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.4px;
  text-transform:uppercase;
  border-radius:6px;
  line-height:1;
  white-space:nowrap;
}

/* TOP = Authority */
.s-badge.s-top{
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#052e16;
  border:1px solid rgba(34,197,94,.55);
  box-shadow:
    0 0 0 1px rgba(34,197,94,.15),
    0 6px 14px rgba(34,197,94,.25);
}

/* Optional: HOT project */
.s-badge.s-hot{
  background:linear-gradient(135deg,#fbbf24,#f59e0b);
  color:#3b1d00;
  border:1px solid rgba(251,191,36,.55);
  box-shadow:
    0 0 0 1px rgba(251,191,36,.15),
    0 6px 14px rgba(251,191,36,.25);
}
