/*
 * MOEX Content Hub: front styles
 * Изоляция через классы, чтобы не ломать тему.
 */

.moex-chub-site { box-sizing: border-box; }
.moex-chub-site *, .moex-chub-site *::before, .moex-chub-site *::after { box-sizing: inherit; }

.moex-chub-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

.moex-chub-breadcrumbs {
  margin: 8px 0 20px;
  font-size: 14px;
  opacity: .85;
}
.moex-chub-breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.moex-chub-breadcrumbs li { display: inline-flex; gap: 8px; align-items: center; }
.moex-chub-breadcrumbs li:not(:last-child)::after { content: "›"; opacity: .6; }
.moex-chub-breadcrumbs a { text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.15); }
.moex-chub-breadcrumbs a:hover { border-bottom-color: rgba(0,0,0,.35); }

.moex-chub-hero {
  padding: 42px 0;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(0,0,0,0));
}
.moex-chub-hero h1 { margin: 0 0 10px; }
.moex-chub-hero__text { margin: 0; max-width: 72ch; opacity: .85; }

.moex-chub {
  margin: 0;
}

.moex-chub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.moex-chub-card {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.moex-chub-card__imgwrap { display: block; }
.moex-chub-card__img {
  width: 100%;
  height: auto;
  display: block;
}

.moex-chub-card__body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.moex-chub-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.moex-chub-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.moex-chub-card__title a { text-decoration: none; }
.moex-chub-card__title a:hover { text-decoration: underline; }

.moex-chub-card__excerpt {
  margin: 0;
  opacity: .85;
  line-height: 1.5;
}

.moex-chub-card__meta {
  margin-top: auto;
  font-size: 13px;
  opacity: .85;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.moex-chub-date {
  font-size: 13px;
  opacity: .7;
  white-space: nowrap;
}

.moex-chub-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}
.moex-chub-badge--type {
  font-weight: 600;
}

.moex-chub-card__actions {
  margin-top: 2px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.moex-chub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}
.moex-chub-btn:hover { filter: brightness(.98); }
.moex-chub-btn--primary {
  background: rgba(0,0,0,.06);
  font-weight: 600;
}

.moex-chub-filters {
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0 18px;
}
.moex-chub-filters__row {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px) auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 760px) {
  .moex-chub-filters__row { grid-template-columns: 1fr; }
}

.moex-chub-field { display: flex; flex-direction: column; gap: 6px; }
.moex-chub-field__label { font-size: 12px; opacity: .75; }

.moex-chub-field input[type="search"],
.moex-chub-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
}

.moex-chub-pagination {
  margin: 18px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.moex-chub-page {
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.14);
  text-decoration: none;
  font-size: 13px;
}
.moex-chub-page.is-current {
  background: rgba(0,0,0,.06);
  font-weight: 600;
}

.moex-chub-single__header {
  margin: 6px 0 18px;
}
.moex-chub-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.moex-chub-single__title { margin: 0 0 10px; line-height: 1.15; }
.moex-chub-single__excerpt { margin: 0 0 14px; opacity: .85; max-width: 80ch; }
.moex-chub-single__thumb img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
}

.moex-chub-single__content {
  line-height: 1.7;
}
.moex-chub-single__content h2,
.moex-chub-single__content h3 {
  margin-top: 1.4em;
}

.moex-chub-related {
  margin-top: 26px;
}
.moex-chub-related__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.moex-chub-related__title { margin: 0; font-size: 18px; }
.moex-chub-related__all { font-size: 13px; text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.15); }
.moex-chub-related__all:hover { border-bottom-color: rgba(0,0,0,.35); }
