/*
Theme Name: Sheshi Reference Discovery Cards
Version: 0.30.5
Description: Rebuilds the homepage cards from the approved four-level reference layout in the Sheshi light palette.
*/

body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery {
  display: grid !important;
  height: 210px !important;
  min-height: 210px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: 0 !important;
  padding: 18px 18px 16px !important;
  overflow: visible !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  color: var(--text-primary) !important;
  background: var(--surface-card) !important;
  box-shadow: none !important;
}

body.sheshi-home .sheshi-discovery-card-topline {
  display: grid !important;
  min-width: 0;
  grid-template-columns: minmax(0, auto) 18px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 0 8px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

body.sheshi-home .sheshi-discovery-card-category {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheshi-home .sheshi-discovery-card-location {
  min-width: 0;
  justify-self: end;
  overflow: hidden;
  color: var(--text-secondary) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheshi-home .sheshi-discovery-proof {
  width: 18px !important;
  height: 18px !important;
  color: var(--accent) !important;
}

body.sheshi-home .sheshi-discovery-proof svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  overflow: visible;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

body.sheshi-home .sheshi-discovery-card-title {
  display: -webkit-box !important;
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
  color: var(--text-primary) !important;
  font-size: 21px !important;
  font-weight: 680 !important;
  letter-spacing: -.02em !important;
  line-height: 1.17 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.sheshi-home .sheshi-result-card--discovery > .sheshi-result-description {
  display: -webkit-box !important;
  min-height: 40px;
  align-self: end;
  margin: 14px 0 14px !important;
  overflow: hidden !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.sheshi-home .sheshi-discovery-card-foot {
  display: grid !important;
  min-width: 0;
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  align-items: end !important;
  gap: 10px !important;
  padding: 12px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
}

body.sheshi-home .sheshi-discovery-card-languages,
body.sheshi-home .sheshi-discovery-card-languages span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 450 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheshi-home .sheshi-discovery-card-languages .is-primary {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

body.sheshi-home .sheshi-discovery-card-arrow {
  position: relative;
  z-index: 2;
  display: inline-flex !important;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: flex-end;
  color: var(--accent) !important;
  font-size: 21px;
  line-height: 1;
}

body.sheshi-home .sheshi-result-card--discovery:hover,
body.sheshi-home .sheshi-result-card--discovery:focus-within {
  border-color: var(--border-strong) !important;
}

@media (max-width: 1023px) {
  body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery {
    height: 210px !important;
    min-height: 210px !important;
  }
}

@media (max-width: 767px) {
  body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery {
    height: 204px !important;
    min-height: 204px !important;
    padding: 16px 16px 14px !important;
  }

  body.sheshi-home .sheshi-discovery-card-title {
    font-size: 20px !important;
  }

  body.sheshi-home .sheshi-result-card--discovery > .sheshi-result-description {
    margin-block: 12px !important;
  }
}
