/* Podstrony mapy rankingow (/ranking/...). Uzupelnia ranking.css. */

.trr-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 140px 16px 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.trr-page *,
.trr-page *::before,
.trr-page *::after {
  box-sizing: border-box;
}

/* Okruszki (wymuszone, bo motyw potrafi ukrywac nav) */
.trr-page .trr-page__crumbs {
  position: static !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  color: #526273;
  font-size: 13px;
}

.trr-page__crumbs a {
  color: #526273;
  text-decoration: none;
}

.trr-page__crumbs a:hover {
  color: #136B5D;
  text-decoration: underline;
}

.trr-page__author {
  margin: 14px 0 0;
  color: #526273;
  font-size: 13px;
}

/* Naglowek oferty w rankingu tematycznym (h3 zamiast h2) */
.trr-op__title h3 {
  margin: 4px 0 0;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 850;
  line-height: 1.2;
}

.trr-offers--single {
  grid-template-columns: minmax(0, 520px);
}

.trr-page__about p {
  max-width: 820px;
  margin: 0 0 12px;
  color: #2b3440;
  font-size: 16px;
  line-height: 1.65;
}

/* Hub: karty rankingow */
.trr-page__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trr-page__cards a {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(13, 43, 78, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(13, 43, 78, 0.05);
  text-decoration: none;
  transition: border-color 0.14s, transform 0.14s;
}

.trr-page__cards a:hover {
  border-color: #136B5D;
  transform: translateY(-1px);
}

.trr-page__cards strong {
  color: #0D2B4E;
  font-size: 17px;
}

.trr-page__cards span {
  color: #526273;
  font-size: 14px;
}

/* Linkowanie: inne rankingi */
.trr-page__links {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid #d8e4e9;
}

.trr-page__links > h2 {
  margin: 0 0 8px;
  color: #0D2B4E;
  font-size: clamp(22px, 2.4vw, 28px);
}

.trr-page__group {
  margin-top: 18px;
}

.trr-page__group h3 {
  margin: 0 0 10px;
  color: #0D2B4E;
  font-size: 15px;
  font-weight: 750;
}

.trr-page__group ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trr-page__group a {
  display: block;
  padding: 10px 14px;
  border: 1px solid #d8e4e9;
  border-radius: 10px;
  background: #fff;
  color: #0D2B4E;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.trr-page__group a:hover {
  border-color: #136B5D;
  color: #136B5D;
}

.trr-page__hub-link {
  margin: 22px 0 0;
  font-weight: 700;
}

.trr-page__hub-link a {
  color: #136B5D;
}

/* Telefon i tablet: naglowek motywu jest wyzszy i przykrywa gore strony. */
/* Komputer: naglowek motywu przykrywa gore strony, wiec zostawiamy miejsce na okruszki. */
.admin-bar .trr-page {
  padding-top: 172px;
}

@media (max-width: 1024px) {
  .trr-page {
    padding-top: 160px;
  }

  .admin-bar .trr-page {
    padding-top: 206px;
  }

  .trr-page .trr-op,
  .trr-page .trr-section {
    scroll-margin-top: 170px;
  }
}

/* Rankingi tematyczne: oferty w siatce 3 kolumn (szerokość jak w "Ofertach miesiąca" na stronie głównej) */
.trr-section:has(.trr-offers--single) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.trr-section:has(.trr-offers--single) > .trr-h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.trr-section:has(.trr-offers--single) > .trr-op {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 16px;
}

.trr-section:has(.trr-offers--single) .trr-op__head {
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 14px;
}

/* Logo jest już na kafelku oferty */
.trr-section:has(.trr-offers--single) .trr-op__logo {
  display: none;
}

.trr-section:has(.trr-offers--single) .trr-op__pos {
  flex: none;
  width: 38px;
  height: 38px;
  font-size: 17px;
  border-radius: 12px;
}

.trr-section:has(.trr-offers--single) .trr-op__title h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.trr-section:has(.trr-offers--single) .trr-op__title p {
  font-size: 13px;
}

.trr-section:has(.trr-offers--single) .trr-offers--single {
  flex: 1;
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
}

.trr-section:has(.trr-offers--single) .trr-op__links {
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .trr-section:has(.trr-offers--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .trr-section:has(.trr-offers--single) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* DESIGN 2026-11, krok 5: szerokość serwisu, bez pustego pasa 140 px nad treścią */
.trr-page { max-width: 1320px; padding: 32px 20px 88px; }
.trr-page__cards a, .trr-page__group, .trr-page__author { border-color: #DFE7E5 !important; border-radius: 20px; }
@media (max-width: 767px) { .trr-page { padding: 24px 20px 64px; } }
