/* MotorHub site chrome — feed cards, related */

/* Search block: hide redundant «Поиск» label (button already says it). */
.sidebar .wp-block-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Light theme: search field a touch darker so it doesn’t melt into the page. */
html[data-mh-theme="light"] .sidebar .wp-block-search__input {
  background-color: #ececef;
  border-color: #c8c8ce;
  color: #1a1a1a;
}

html[data-mh-theme="light"] .sidebar .wp-block-search__input:focus {
  background-color: #e4e4e8;
  border-color: #a8a8b0;
  outline: none;
}

@media (prefers-color-scheme: light) {
  html:not([data-mh-theme="dark"]) .sidebar .wp-block-search__input {
    background-color: #ececef;
    border-color: #c8c8ce;
    color: #1a1a1a;
  }

  html:not([data-mh-theme="dark"]) .sidebar .wp-block-search__input:focus {
    background-color: #e4e4e8;
    border-color: #a8a8b0;
    outline: none;
  }
}

/* —— Feed / archive cards —— */
body:not(.single-post) .inside-article > .entry-header .entry-meta {
  font-size: 0.82rem;
  opacity: 0.72;
  letter-spacing: 0.01em;
}

body:not(.single-post) .inside-article > .entry-summary,
body:not(.single-post) .inside-article > .entry-content {
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.9;
}

body:not(.single-post) .inside-article > .post-image,
body:not(.single-post) .inside-article > .post-image-aligned {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body:not(.single-post) .inside-article > .post-image a,
body:not(.single-post) .inside-article > .post-image-aligned a {
  display: block;
  height: 100%;
}

body:not(.single-post) .inside-article > .post-image img,
body:not(.single-post) .inside-article > .post-image-aligned img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center;
}

/* —— Related on single —— */
.mh-related {
  margin: 2.25rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mh-related__title {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.mh-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.mh-related__link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit !important;
  height: 100%;
}

.mh-related__media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.mh-related__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mh-related__name {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.35;
}

.mh-related__link:hover .mh-related__name,
.mh-related__link:focus-visible .mh-related__name {
  color: var(--mh-link, var(--mh-accent, #f87800));
}

@media (max-width: 768px) {
  .mh-related__list {
    grid-template-columns: 1fr;
  }
}

/* —— Sidebar Telegram (Popular reuses .widget_recent_entries list styles) —— */
.sidebar .mh-sidebar-telegram .mh-sidebar-telegram__text {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sidebar .mh-sidebar-telegram .mh-sidebar-telegram__actions {
  margin: 0;
}

.sidebar .mh-sidebar-telegram .mh-sidebar-telegram__btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  background: var(--mh-accent, #f87800);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.3;
}

.sidebar .mh-sidebar-telegram .mh-sidebar-telegram__btn:hover,
.sidebar .mh-sidebar-telegram .mh-sidebar-telegram__btn:focus-visible {
  filter: brightness(1.08);
  outline: none;
}
