/* Tesla Hub: a light, page-scoped directory using the site's existing palette. */
.tshub {
  --hub-ink: #171a20;
  --hub-muted: #515762;
  --hub-red: #c71924;
  --hub-line: #dce1e7;
  --evx-primary: #c71924;
  --evx-purple-500: #7c5ce7;
  --evx-green-500: #18b56b;
  --evx-surface: #fff;
  --evx-surface-3: #eef2f6;
  --evx-border: #dce1e7;
  --evx-text: #171a20;
  --evx-text-strong: #171a20;
  --evx-text-secondary: #515762;
  --evx-text-muted: #68707b;
  --evx-shadow-card: none;
  --evx-shadow-float: 0 10px 24px rgba(16, 24, 40, .1);
  --evx-transition: 180ms ease;
  width: min(calc(100% - 40px), 1260px);
  margin: 0 auto;
  padding: 22px 0 76px;
  color: var(--hub-ink);
}

.tshub *, .tshub *::before, .tshub *::after { box-sizing: border-box; }
.tshub a { text-decoration: none; }
.tshub a:focus-visible, .tshub button:focus-visible, .tshub input:focus-visible {
  outline: 3px solid #c71924;
  outline-offset: 3px;
}

.tshub__breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--hub-muted); font-size: 12px; }
.tshub__breadcrumb a { color: var(--hub-muted); text-decoration: underline; text-underline-offset: 3px; }
.tshub__breadcrumb span:last-child { color: var(--hub-ink); font-weight: 700; }

.tshub__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, .7fr);
  align-items: end;
  gap: clamp(24px, 4vw, 64px);
  margin-top: 20px;
  padding: clamp(28px, 4.2vw, 62px);
  border-radius: 18px;
  background: #f3f5f7;
}
.tshub__intro { min-width: 0; }
.tshub__hero h1 { max-width: 12ch; margin: 0; font-size: clamp(35px, 4.3vw, 58px); font-weight: 850; letter-spacing: -.035em; line-height: 1.1; }
.tshub__hero p { max-width: 62ch; margin: 18px 0 0; color: var(--hub-muted); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; }
.tshub__search label { display: block; margin-bottom: 8px; color: var(--hub-ink); font-size: 14px; font-weight: 750; }
.tshub__search > div { display: flex; min-width: 0; padding: 5px; border: 1px solid #c6cdd5; border-radius: 14px; background: #fff; }
.tshub__search input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 0; outline: 0; color: var(--hub-ink); background: transparent; font-size: 14px; }
.tshub__search input::placeholder { color: #666e79; opacity: 1; }
.tshub__search:focus-within > div { border-color: var(--hub-red); }
.tshub__search button { flex: 0 0 auto; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff; background: var(--hub-red); font-weight: 750; cursor: pointer; }
.tshub__search button:hover { background: #a9151f; }

.tshub__actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tshub__actions a { display: grid; position: relative; min-width: 0; min-height: 142px; align-content: space-between; gap: 8px; padding: 20px 48px 20px 20px; border: 1px solid var(--hub-line); border-radius: 15px; color: var(--hub-ink); background: #fff; transition: border-color .18s ease, background .18s ease; }
.tshub__actions a:first-child { border-color: #171a20; color: #fff; background: #171a20; }
.tshub__actions a:last-child { border-color: #edc1c5; background: #fff4f4; }
.tshub__actions a:hover { border-color: var(--hub-red); }
.tshub__actions strong { font-size: clamp(17px, 1.45vw, 21px); font-weight: 800; line-height: 1.25; }
.tshub__actions span { color: var(--hub-muted); font-size: 12px; line-height: 1.4; }
.tshub__actions a:first-child span { color: #dfe2e5; }
.tshub__actions svg { position: absolute; top: 18px; right: 17px; width: 22px; height: 22px; }

.tshub__directory, .tshub__deals { margin-top: clamp(52px, 6vw, 86px); }
.tshub__directory {
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 3vw, 42px);
  overflow: hidden;
  border-radius: 26px;
  background: #dfe5ed url('/assets/tesla-hub-glass-backdrop.webp') center / cover no-repeat;
  box-shadow: 0 22px 48px rgba(35, 46, 64, .14);
}
.tshub__directory::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(239, 243, 248, .38), rgba(232, 239, 247, .2) 55%, rgba(218, 228, 239, .12));
  content: "";
  pointer-events: none;
}
.tshub__directory > * { position: relative; z-index: 1; }
.tshub__directory .tshub__section-heading h2 { color: #17202b; }
.tshub__directory .tshub__section-heading p { color: #354256; }
.tshub__section-heading { margin-bottom: 22px; }
.tshub__section-heading h2 { margin: 0; font-size: clamp(27px, 2.8vw, 37px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.tshub__section-heading p { margin: 9px 0 0; color: var(--hub-muted); font-size: 14px; line-height: 1.55; }
.tshub__section-heading--with-link { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.tshub__section-heading--with-link > a, .tshub__empty a { flex: 0 0 auto; color: var(--hub-red); font-size: 13px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.tshub__directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tshub__directory-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 16px;
  color: #192333;
  background: rgba(250, 252, 255, .87);
  box-shadow: 0 8px 28px rgba(25, 37, 56, .13), inset 0 1px 0 rgba(255, 255, 255, .85);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tshub__directory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(25, 37, 56, .18), inset 0 1px 0 rgba(255, 255, 255, .85);
  }
}
.tshub__directory-card:focus-within { border-color: #a71326; }
.tshub__directory-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(15, 26, 42, .16));
  pointer-events: none;
}
.tshub__directory-card h3 {
  max-width: calc(100% - 64px);
  margin: 0;
  font-size: clamp(16px, 1.42vw, 19px);
  font-weight: 800;
  line-height: 1.34;
}
.tshub__directory-card h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.tshub__directory-card h3 a::after { position: absolute; inset: 0; content: ""; }
.tshub__directory-card h3 a:hover { text-decoration-color: currentColor; }
.tshub__directory-card p {
  max-width: 43ch;
  margin: 8px 0 0;
  color: #28354a;
  font-size: 13px;
  line-height: 1.55;
}
.tshub__directory-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}
.tshub__directory-tags > span,
.tshub__directory-tags > a {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
  color: #233249;
  background: rgba(255, 255, 255, .45);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.2;
}
.tshub__directory-tags > a.tshub__secondary-link {
  position: relative;
  z-index: 2;
  color: #a3182b;
  font-weight: 800;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
.tshub__directory-card:last-child {
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
  background: rgba(13, 19, 29, .9);
}
.tshub__directory-card:last-child h3 a, .tshub__directory-card:last-child p { color: #fff; }
.tshub__directory-card:last-child .tshub__directory-tags span {
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  background: rgba(255, 255, 255, .13);
}
.tshub__directory-card:last-child:hover, .tshub__directory-card:last-child:focus-within { border-color: rgba(255, 255, 255, .65); }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tshub__directory-card {
    background: rgba(250, 252, 255, .44);
    -webkit-backdrop-filter: blur(15px) saturate(1.25);
    backdrop-filter: blur(15px) saturate(1.25);
  }
  .tshub__directory-card:last-child { background: rgba(13, 19, 29, .85); }
}
@media (prefers-reduced-transparency: reduce) {
  .tshub__directory-card, .tshub__directory-card:last-child {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .tshub__directory-card { background: #f8fafd; }
  .tshub__directory-card:last-child { background: #171a20; }
}
@media (forced-colors: active) {
  .tshub__directory-card, .tshub__directory-card:last-child {
    border-color: CanvasText;
    color: CanvasText;
    background: Canvas;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .tshub__directory-card:last-child h3 a, .tshub__directory-card:last-child p { color: CanvasText; }
  .tshub__directory-card:last-child .tshub__directory-tags span { color: CanvasText; }
}

.tshub__deals-grid.mp-grid.evm-listing-grid { width: 100% !important; }
.tshub__empty { padding: 28px; border: 1px solid var(--hub-line); border-radius: 14px; background: #f7f8fa; }
.tshub__empty p { max-width: 65ch; margin: 0 0 12px; color: var(--hub-muted); line-height: 1.55; }

@media (max-width: 1060px) {
  .tshub__hero { grid-template-columns: minmax(0, 1fr); }
  .tshub__hero h1 { max-width: 18ch; }
  .tshub__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tshub__actions a { min-height: 125px; }
  .tshub__directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .tshub { width: min(calc(100% - 24px), 1260px); padding-top: 18px; padding-bottom: 45px; }
  .tshub__directory {
    padding: 24px 15px;
    border-radius: 22px;
    background-color: #dfe5ed;
    background-size: auto 700px;
    background-position: center top;
    background-repeat: no-repeat;
  }
  .tshub__directory::before { background: linear-gradient(180deg, rgba(240, 244, 249, .55), rgba(235, 241, 248, .67) 630px, #e8edf4 840px); }
  .tshub__hero { gap: 24px; padding: 25px 19px; }
  .tshub__hero h1 { font-size: clamp(31px, 8vw, 42px); }
  .tshub__actions { gap: 9px; }
  .tshub__actions a { min-height: 126px; padding: 16px 34px 16px 15px; }
  .tshub__actions strong { font-size: 16px; }
  .tshub__actions svg { top: 14px; right: 10px; width: 17px; height: 17px; }
  .tshub__directory-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tshub__directory-card { min-height: 159px; padding: 16px; }
  .tshub__directory-card h3 { max-width: calc(100% - 67px); font-size: 17px; }
  .tshub__directory-icon { width: 67px; height: 67px; }
  .tshub__directory-card p { margin-top: 6px; }
  .tshub__section-heading--with-link { align-items: start; flex-direction: column; }
}
@media (max-width: 390px) {
  .tshub__actions { grid-template-columns: minmax(0, 1fr); }
  .tshub__actions a { min-height: 98px; }
  .tshub__search > div { flex-wrap: wrap; }
  .tshub__search input { flex-basis: 100%; }
  .tshub__search button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tshub * { transition-duration: .01ms !important; }
}
