/* ============ PAGE HERO ============ */
.nav__link--active {
  color: var(--gold);
  font-weight: 700;
}

.page-hero {
  background: var(--bg);
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-hero__inner { display: flex; flex-direction: column; gap: 10px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--gray-light);
}
.breadcrumb a { color: var(--gray); transition: color .2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--ink); font-weight: 500; }

.page-hero__title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.1;
}
.page-hero__sub { font-size: 15px; color: var(--gray); }

/* ============ RATING SECTION ============ */
.rating-section { background: var(--bg); padding: 36px 0 80px; }

/* Controls */
.rt-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.rt-search {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  height: 48px;
  transition: border-color .2s;
}
.rt-search:focus-within { border-color: var(--gold); }
.rt-search input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
  background: transparent;
}

.rt-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rt-filter-label { font-size: 14px; color: var(--gray); white-space: nowrap; }
.rt-select {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.rt-select:focus { border-color: var(--gold); }

.rt-info {
  font-size: 14px;
  color: var(--gray-light);
  white-space: nowrap;
  margin-left: auto;
}

/* Table wrapper */
.rt-wrap {
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  overflow-x: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.05);
}

/* Table */
.rt {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

/* Head */
.rt__th {
  padding: 16px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--line);
  background: #fafafa;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color .2s;
}
.rt__th:hover { color: var(--ink); }
.rt__th:first-child { border-radius: 20px 0 0 0; }
.rt__th:last-child  { border-radius: 0 20px 0 0; cursor: default; }

.rt__th--num     { width: 60px; text-align: center; }
.rt__th--score   { width: 140px; }
.rt__th--pos     { width: 170px; }
.rt__th--neg     { width: 170px; }
.rt__th--action  { width: 160px; text-align: center; }

.rt__th span, .rt__th svg { vertical-align: middle; }
.sort-icon { display: inline-flex; align-items: center; margin-left: 4px; opacity: .35; transition: opacity .2s; }
.rt__th:hover .sort-icon { opacity: .7; }
.rt__th.is-sorted .sort-icon { opacity: 1; color: var(--gold); }

/* Rows */
.rt__tr { border-bottom: 1px solid var(--line); transition: background .15s; }
.rt__tr:last-child { border-bottom: none; }
.rt__tr:hover { background: #faf8f4; }
.rt__tr.is-top3 { background: #fffdf7; }
.rt__tr.is-top3:hover { background: #fff9ed; }

.rt__td {
  padding: 16px 20px;
  font-size: 15px;
  vertical-align: middle;
}

/* Rank cell */
.rt__td--num { text-align: center; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.rank-badge--1 { background: var(--gold); }
.rank-badge--2 { background: #a0a0a0; }
.rank-badge--3 { background: #cd9a5b; }
.rank-badge--other { background: #e8e8e8; color: var(--gray); }

/* Company cell */
.company-cell { display: flex; align-items: center; gap: 14px; }
.company-avatar {
  width: 64px;
  height: 44px;
  border-radius: 3px;
  background: #fff;
  padding:3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: -.5px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.company-info { display: flex; flex-direction: column; gap: 3px; }
.company-name { font-weight: 700; font-size: 15px; }
.company-city { font-size: 12px; color: var(--gray-light); display:none; }

/* Score cell */
.score-cell { display: flex; align-items: center; gap: 8px; }
.score-num { font-size: 18px; font-weight: 800; }
.score-stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }

/* Positive / Negative cells */
.reviews-cell { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.reviews-cell--pos { color: #16a34a; }
.reviews-cell--neg { color: #dc2626; }
.reviews-bar {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  min-width: 60px;
  max-width: 100px;
}
.reviews-bar__fill { height: 100%; border-radius: 3px; }
.reviews-bar__fill--pos { background: #22c55e; }
.reviews-bar__fill--neg { background: #ef4444; }

/* Action cell */
.rt__td--action { text-align: center; }
.site-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
  white-space: nowrap;
  text-decoration: none;
}
.site-btn:hover { background: var(--gold); color: #fff; }
.site-btn svg { transition: transform .2s; }
.site-btn:hover svg { transform: translate(2px, -2px); }

/* Empty state */
.rt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  gap: 12px;
  color: var(--gray-light);
}
.rt-empty p { font-size: 18px; font-weight: 700; color: var(--gray); margin: 0; }
.rt-empty span { font-size: 14px; }

/* Pagination */
.rt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.page-btn {
  min-width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.page-btn:hover { border-color: var(--gold); color: var(--gold); }
.page-btn.is-active { background: var(--gold); border-color: var(--gold); color: #fff; }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis {
  font-size: 14px;
  color: var(--gray-light);
  padding: 0 4px;
  line-height: 42px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .page-hero__title { font-size: 30px; }
  .rt-controls { flex-direction: column; align-items: stretch; }
  .rt-info { margin-left: 0; text-align: center; }
  .rt-filters { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .rt__th--pos .reviews-bar,
  .rt__td .reviews-bar { display: none; }
}
