/* Homepage-only visual layer. The Tesla Hub backdrop and icons are shared assets. */
.tsh1-home--glass {
  background: #f8fafc;
  color: #192333;
}

.tsh1-home--glass :is(a, button, input):focus-visible {
  outline: 3px solid #ad1728;
  outline-offset: 3px;
}

.tsh1-home--glass ::selection {
  background: #c71924;
  color: #fff;
}

.tsh1-home--glass .tsh1-hero.tsn-home-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, .93fr);
  min-height: 540px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 24px;
  background: #edf2f7;
  box-shadow: 0 18px 42px rgba(31, 45, 67, .09);
}

.tsh1-home--glass .tsh1-hero__copy {
  padding: 48px clamp(25px, 3.6vw, 54px);
  background: linear-gradient(115deg, #f5f8fb, #e9eff5);
}

.tsh1-home--glass .tsh1-hero .tsh1-eyebrow,
.tsh1-home--glass .tsh1-categories .tsh1-eyebrow {
  display: none;
}

.tsh1-home--glass .tsh1-hero h1 {
  max-width: 12ch;
  margin: 0 0 17px;
  color: #17202b !important;
  font-size: clamp(38px, 4.05vw, 59px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.tsh1-home--glass .tsh1-hero h1 span {
  color: #b71927;
  font-weight: inherit;
}

.tsh1-home--glass .tsh1-hero__copy > p {
  max-width: 48ch;
  color: #354256;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.6;
}

.tsh1-home--glass .tsh1-search.tsn-hero-search {
  width: 100%;
  min-height: 58px;
  margin-top: 25px;
  border-color: #bbc7d4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(24, 36, 54, .08);
}

.tsh1-home--glass .tsh1-search:focus-within {
  border-color: #ad1728;
  box-shadow: 0 0 0 3px rgba(173, 23, 40, .13);
}

.tsh1-home--glass .tsh1-search input {
  font-size: 14px;
}

.tsh1-home--glass .tsh1-search input::placeholder {
  color: #606c7b;
  opacity: 1;
}

.tsh1-home--glass .tsh1-search button {
  min-height: 46px;
  background: #b71927;
  font-size: 13px;
}

.tsh1-home--glass .tsh1-search button:hover {
  background: #921522;
}

.tsh1-home--glass .tsh1-quicklinks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  margin-top: 15px;
}

.tsh1-home--glass .tsh1-quicklinks a {
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 5px;
  border: 1px solid #d3dce6;
  border-radius: 12px;
  background: rgba(255, 255, 255, .84);
  color: #172537;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
}

.tsh1-home--glass .tsh1-quicklinks a:hover {
  border-color: #aab9c8;
  background: #fff;
}

.tsh1-home--glass .tsh1-quicklinks img {
  display: block;
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.tsh1-home--glass .tsh1-hero__actions {
  margin-top: 15px;
}

.tsh1-home--glass .tsh1-hero__actions .tsh1-button {
  min-height: 44px;
  gap: 12px;
  border-color: #bbc7d4;
  background: transparent;
  color: #24354a !important;
  font-size: 12px;
}

.tsh1-home--glass .tsh1-hero__actions .tsh1-button:hover {
  background: #fff;
}

.tsh1-home--glass .tsh1-hero__facts {
  gap: clamp(18px, 2vw, 34px);
  margin-top: 20px;
}

.tsh1-home--glass .tsh1-hero__facts strong {
  color: #192333;
  font-size: 19px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.tsh1-home--glass .tsh1-hero__facts small {
  color: #4e5e71;
  font-size: 11px;
}

.tsh1-home--glass .tsh1-hero__media {
  min-height: 100%;
  background: #dfe7ee;
}

.tsh1-home--glass .tsh1-home-slide__content {
  max-width: min(470px, calc(100% - 40px));
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(16, 25, 37, .9);
}

.tsh1-home--glass .tsh1-home-slider__arrow {
  width: 44px;
  height: 44px;
}

.tsh1-home--glass .tsh1-home-slider__dots {
  gap: 2px;
}

.tsh1-home--glass .tsh1-home-slider__dots button,
.tsh1-home--glass .tsh1-home-slider__dots button.is-active {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: transparent;
  box-shadow: none;
}

.tsh1-home--glass .tsh1-home-slider__dots button::after {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  content: '';
}

.tsh1-home--glass .tsh1-home-slider__dots button.is-active::after {
  width: 16px;
  background: #b71927;
}

.tsh1-home--glass .tsh1-hub-entry {
  border-color: #d9e2eb;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 47, 66, .055);
}

.tsh1-home--glass .tsh1-categories {
  isolation: isolate;
  margin-top: 28px;
  overflow: hidden;
  border: 0;
  border-radius: 25px;
  background: #dce5ee url('/assets/tesla-hub-glass-backdrop.webp') center / cover no-repeat;
  box-shadow: 0 18px 42px rgba(31, 45, 67, .14);
}

.tsh1-home--glass .tsh1-categories::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(232, 240, 248, .6);
  content: '';
  pointer-events: none;
}

.tsh1-home--glass .tsh1-categories .tsh1-section-heading h2 {
  margin-top: 0;
  color: #17202b;
  font-weight: 800;
  letter-spacing: -.03em;
}

.tsh1-home--glass .tsh1-categories .tsh1-section-heading > a {
  background: #17202b;
  font-size: 12px;
}

.tsh1-home--glass .tsh1-category-grid {
  gap: 13px;
}

.tsh1-home--glass .tsh1-category-card {
  display: flex;
  min-width: 0;
  min-height: 218px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 16px;
  background: rgba(250, 252, 255, .91);
  box-shadow: 0 8px 26px rgba(27, 42, 61, .11);
  color: #192333;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.tsh1-home--glass .tsh1-category-card::before {
  content: none;
}

.tsh1-home--glass .tsh1-category-card:hover {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 12px 30px rgba(27, 42, 61, .16);
  transform: translateY(-2px);
}

.tsh1-home--glass .tsh1-category-card__art {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 62px;
  height: 62px;
  object-fit: contain;
  pointer-events: none;
}

.tsh1-home--glass .tsh1-category-card__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.tsh1-home--glass .tsh1-category-card__copy strong {
  max-width: calc(100% - 60px);
  min-height: 50px;
  color: #192333;
  font-size: clamp(17px, 1.35vw, 20px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.tsh1-home--glass .tsh1-category-card__description {
  display: block;
  max-width: 42ch;
  overflow: visible;
  color: #354256;
  font-size: 12px;
  line-height: 1.5;
}

.tsh1-home--glass .tsh1-category-card__copy small {
  color: #4b5b70;
  font-size: 11px;
  font-weight: 700;
}

.tsh1-home--glass .tsh1-category-card__action {
  min-height: 34px;
  align-self: start;
  justify-content: flex-start;
  margin-top: auto;
  padding: 8px 0 0;
  background: transparent;
  color: #a3182b;
  font-size: 12px;
}

.tsh1-home--glass .tsh1-category-card--chargers {
  min-height: 184px;
  padding: 25px 28px;
  border-color: rgba(255, 255, 255, .17);
  background: rgba(17, 27, 40, .92);
  color: #fff;
}

.tsh1-home--glass .tsh1-category-card--chargers:hover {
  border-color: rgba(255, 255, 255, .42);
  background: #172235;
}

.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__art {
  top: 10px;
  right: 25px;
  width: 136px;
  height: 136px;
}

.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__copy {
  max-width: calc(100% - 150px);
}

.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__copy strong {
  max-width: none;
  min-height: 0;
  color: #fff;
  font-size: clamp(23px, 2vw, 29px);
}

.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__kicker,
.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__description,
.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__copy small {
  color: #e4e9f0;
}

.tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__action {
  min-height: 36px;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  color: #fff;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (min-width: 761px) {
    .tsh1-home--glass .tsh1-category-card:not(.tsh1-category-card--chargers) {
      background: rgba(250, 252, 255, .82);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
  }
}

@media (max-width: 1160px) {
  .tsh1-home--glass .tsh1-hero.tsn-home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
  }

  .tsh1-home--glass .tsh1-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .tsh1-home--glass .tsh1-quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tsh1-home--glass .tsh1-quicklinks a {
    min-height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .tsh1-home--glass .tsh1-quicklinks img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 760px) {
  .tsh1-home--glass .tsh1-hero.tsn-home-hero {
    display: flex;
    width: min(calc(100% - 24px), var(--tsh1-max));
    min-height: 0;
    flex-direction: column;
    margin-top: 12px;
    border-radius: 20px;
  }

  .tsh1-home--glass .tsh1-hero__copy {
    order: 1;
    padding: 28px 20px 22px;
  }

  .tsh1-home--glass .tsh1-hero h1 {
    max-width: 16ch;
    font-size: clamp(31px, 8vw, 42px);
  }

  .tsh1-home--glass .tsh1-search.tsn-hero-search {
    min-height: 54px;
    margin-top: 21px;
  }

  .tsh1-home--glass .tsh1-search input {
    height: 44px;
    font-size: 14px;
  }

  .tsh1-home--glass .tsh1-search button {
    min-width: 78px;
    min-height: 44px;
  }

  .tsh1-home--glass .tsh1-quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tsh1-home--glass .tsh1-quicklinks a {
    min-height: 56px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    text-align: left;
  }

  .tsh1-home--glass .tsh1-quicklinks img {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
  }

  .tsh1-home--glass .tsh1-hero__actions {
    display: flex;
  }

  .tsh1-home--glass .tsh1-hero__facts {
    margin-top: 18px;
  }

  .tsh1-home--glass .tsh1-hero__media {
    order: 2;
    min-height: 210px;
    height: 210px;
    margin: 0;
    border-top: 1px solid #dce3eb;
    border-bottom: 0;
  }

  .tsh1-home--glass .tsh1-hub-entry {
    width: min(calc(100% - 24px), var(--tsh1-max));
  }

  .tsh1-home--glass .tsh1-categories {
    width: min(calc(100% - 24px), var(--tsh1-max));
    margin-top: 22px;
    padding: 24px 16px;
    border-radius: 20px;
    background-position: center top;
  }

  .tsh1-home--glass .tsh1-categories::before {
    background: rgba(232, 240, 248, .79);
  }

  .tsh1-home--glass .tsh1-category-card {
    min-height: 184px;
  }

  .tsh1-home--glass .tsh1-category-card--chargers {
    min-height: 185px;
  }
}

@media (max-width: 640px) {
  .tsh1-home--glass .tsh1-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tsh1-home--glass .tsh1-category-card,
  .tsh1-home--glass .tsh1-category-card--chargers {
    grid-column: 1;
    min-height: 166px;
  }

  .tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__art {
    top: 13px;
    right: 9px;
    width: 92px;
    height: 92px;
  }

  .tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__copy {
    max-width: calc(100% - 80px);
  }

  .tsh1-home--glass .tsh1-category-card--chargers .tsh1-category-card__copy strong {
    font-size: 21px;
  }
}

@media (max-width: 390px) {
  .tsh1-home--glass .tsh1-hero__copy {
    padding-inline: 16px;
  }

  .tsh1-home--glass .tsh1-quicklinks a {
    gap: 5px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .tsh1-home--glass .tsh1-quicklinks img {
    width: 25px;
    height: 25px;
  }

  .tsh1-home--glass .tsh1-category-card--chargers {
    padding: 19px;
  }
}

@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .tsh1-home--glass .tsh1-category-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fff;
  }

  .tsh1-home--glass .tsh1-category-card--chargers {
    background: #172235;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tsh1-home--glass .tsh1-quicklinks a,
  .tsh1-home--glass .tsh1-category-card {
    transition: none;
  }
}

/* The detailed former Hub directory is now the homepage's primary index. */
.tsh1-home--glass .tshub--home {
  width: min(calc(100% - 40px), var(--tsh1-max));
  margin: clamp(24px, 3vw, 42px) auto 0;
  padding: 0;
}

.tsh1-home--glass .tshub--home .tshub__directory {
  margin-top: 0;
  scroll-margin-top: 88px;
}

@media (max-width: 680px) {
  .tsh1-home--glass .tshub--home {
    width: min(calc(100% - 24px), var(--tsh1-max));
    margin-top: 16px;
  }
}
