/********** RC Hub — Futuristic Knowledge Center **********/

:root {
  --rchub-bg: #050505;
  --rchub-accent: #0066ff;
  --rchub-accent-soft: rgba(0, 102, 255, 0.35);
  --rchub-glass: rgba(255, 255, 255, 0.04);
  --rchub-border: rgba(0, 102, 255, 0.2);
  --rchub-text: #e8eef7;
  --rchub-muted: rgba(255, 255, 255, 0.55);
}

body.rchub-page,
body.garage-page {
  padding-top: 0;
}

body.rchub-page .footer,
body.garage-page .footer {
  margin-top: 2rem !important;
}

body.rchub-page .navbar,
body.garage-page .navbar {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.rchub-section {
  position: relative;
  background: var(--rchub-bg);
  color: var(--rchub-text);
  overflow-x: clip;
  z-index: 2;
}

.rchub-section::before,
.rchub-section::after {
  display: none;
}

.rchub-inner {
  position: relative;
  z-index: 1;
}

/* Minimal page header */
.rchub-pagehead {
  padding: 2.25rem 0 1.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 102, 255, 0.12);
}

.rchub-pagehead__motto {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rchub-accent);
}

.rchub-pagehead__title {
  margin: 0 0 0.65rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.rchub-pagehead__quote {
  margin: 0 auto;
  max-width: 420px;
  font-size: 0.9rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--rchub-muted);
}

.rchub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.rchub-btn--primary {
  background: var(--rchub-accent);
  color: #fff;
  border: 1px solid var(--rchub-accent);
  box-shadow: 0 0 24px rgba(0, 102, 255, 0.35);
}

.rchub-btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(0, 102, 255, 0.5);
}

.rchub-btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.rchub-btn--outline:hover {
  color: #fff;
  border-color: var(--rchub-accent);
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.2);
}

/* Toolbar */
.rchub-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 102, 255, 0.12);
}

.rchub-toolbar__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rchub-search {
  position: relative;
  max-width: 420px;
  width: 100%;
}

.rchub-search i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rchub-muted);
  font-size: 0.9rem;
}

.rchub-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rchub-search input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.rchub-search input:focus {
  outline: none;
  border-color: var(--rchub-accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.rchub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rchub-filter {
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--rchub-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.rchub-filter:hover {
  border-color: var(--rchub-accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 102, 255, 0.2);
}

.rchub-filter.is-active {
  background: rgba(0, 102, 255, 0.15);
  border-color: var(--rchub-accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.25);
}

/* Feed layouts */
.rchub-feed--list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}

.rchub-feed--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1rem 0 2rem;
}

/* List card — reference style */
.rchub-list-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.rchub-list-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rchub-list-card__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #141414 0%, #0d0d0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.rchub-list-card__inner:hover {
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 8px 40px rgba(0, 102, 255, 0.12), 0 0 0 1px rgba(0, 102, 255, 0.08);
  transform: translateY(-3px);
  color: inherit;
}

.rchub-list-card__media {
  overflow: hidden;
}

.rchub-list-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.rchub-list-card__inner:hover .rchub-list-card__media img {
  transform: scale(1.05);
}

.rchub-list-card__content {
  flex: 1;
  position: relative;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rchub-list-card__title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.rchub-list-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  position: relative;
  z-index: 1;
}

.rchub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rchub-pill i {
  font-size: 0.6rem;
  opacity: 0.8;
}

.rchub-pill--date {
  background: rgba(0, 102, 255, 0.15);
  border-color: rgba(0, 102, 255, 0.3);
  color: #7eb4ff;
}

.rchub-pill--tag.rchub-tag--getting-started { background: rgba(0, 102, 255, 0.12); border-color: rgba(0, 102, 255, 0.25); color: #7eb4ff; }
.rchub-pill--tag.rchub-tag--setup-tuning { background: rgba(0, 200, 150, 0.1); border-color: rgba(0, 200, 150, 0.2); color: #5eecc4; }
.rchub-pill--tag.rchub-tag--maintenance { background: rgba(255, 180, 0, 0.1); border-color: rgba(255, 180, 0, 0.2); color: #ffc857; }
.rchub-pill--tag.rchub-tag--performance { background: rgba(255, 80, 80, 0.1); border-color: rgba(255, 80, 80, 0.2); color: #ff8a8a; }
.rchub-pill--tag.rchub-tag--news { background: rgba(147, 112, 219, 0.12); border-color: rgba(147, 112, 219, 0.25); color: #c4b5fd; }

.rchub-list-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.rchub-list-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.65rem 1.35rem;
  border-radius: 50px;
  background: var(--rchub-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.rchub-list-card__inner:hover .rchub-list-card__cta {
  box-shadow: 0 0 28px rgba(0, 102, 255, 0.45);
}

/* Grid card */
.rchub-grid-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(0, 102, 255, 0.1);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rchub-grid-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rchub-grid-card:hover {
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 10px 36px rgba(0, 102, 255, 0.15);
  transform: translateY(-6px);
  color: inherit;
}

.rchub-grid-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.rchub-grid-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.rchub-grid-card:hover .rchub-grid-card__media img {
  transform: scale(1.06);
}

.rchub-grid-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
}

.rchub-grid-card__meta .rchub-pill {
  font-size: 0.62rem;
}

.rchub-grid-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rchub-grid-card__read i {
  font-size: 0.6rem;
  opacity: 0.8;
}

.rchub-grid-card__body {
  padding: 1.15rem 1.25rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rchub-grid-card__body h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.rchub-grid-card__body p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--rchub-muted);
  margin-bottom: 0.75rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rchub-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rchub-tag--getting-started { background: rgba(0, 102, 255, 0.2); color: #7eb4ff; }
.rchub-tag--setup-tuning { background: rgba(0, 200, 150, 0.15); color: #5eecc4; }
.rchub-tag--maintenance { background: rgba(255, 180, 0, 0.15); color: #ffc857; }
.rchub-tag--performance { background: rgba(255, 80, 80, 0.15); color: #ff8a8a; }

.rchub-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--rchub-muted);
}

.rchub-load-more {
  text-align: center;
  padding: 1rem 0 4rem;
}

.rchub-load-more .rchub-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.rchub-load-more .rchub-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}


@media (min-width: 992px) {
  .rchub-toolbar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 767.98px) {
  .rchub-pagehead {
    padding: 1.75rem 0 1.5rem;
  }

  .rchub-pagehead__quote {
    font-size: 0.85rem;
    padding: 0 0.5rem;
  }

  /* List view: horizontal rows — larger thumbnail + gap before text */
  .rchub-feed--list {
    gap: 0.85rem;
  }

  .rchub-feed--list .rchub-list-card {
    height: auto;
  }

  .rchub-feed--list .rchub-list-card__inner {
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    max-height: none;
    height: auto;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    gap: 0;
  }

  .rchub-feed--list .rchub-list-card__media {
    flex: 0 0 132px;
    width: 132px;
    min-height: 108px;
    height: auto;
    max-height: none;
    align-self: stretch;
    border-radius: 0;
  }

  .rchub-feed--list .rchub-list-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 108px;
    object-fit: cover;
  }

  .rchub-feed--list .rchub-list-card__content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0.8rem 2rem 0.8rem 0.9rem;
    gap: 0.3rem;
  }

  .rchub-feed--list .rchub-list-card__title {
    font-size: 0.82rem;
    min-height: 0;
    max-height: none;
    margin-bottom: 0.2rem;
    -webkit-line-clamp: 2;
  }

  .rchub-feed--list .rchub-list-card__pills {
    flex-wrap: wrap;
    max-height: none;
    min-height: 0;
    margin-bottom: 0.15rem;
    gap: 0.3rem;
  }

  .rchub-feed--list .rchub-list-card__pills .rchub-pill:nth-child(2) {
    display: none;
  }

  .rchub-feed--list .rchub-list-card__excerpt {
    min-height: 0;
    max-height: none;
    -webkit-line-clamp: 2;
    font-size: 0.76rem;
    line-height: 1.38;
    margin-bottom: 0;
  }

  .rchub-feed--list .rchub-list-card__cta {
    display: none;
  }

  .rchub-feed--list .rchub-list-card__inner::after {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.28);
    pointer-events: none;
  }

  .rchub-feed--list .rchub-pill {
    font-size: 0.55rem;
    padding: 0.18rem 0.45rem;
  }

  .rchub-feed--grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .rchub-feed--grid .rchub-grid-card__media {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 575.98px) {
  .rchub-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

  .rchub-filters::-webkit-scrollbar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rchub-list-card,
  .rchub-grid-card {
    opacity: 1;
    transform: none;
  }
}
