:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --text: #101010;
  --muted: #707070;
  --primary: #2471e5;
  --primary-h: #1a5fd1;
  --primary-soft: #e8f1fd;
  --accent: #2471e5;
  --accent-h: #1a5fd1;
  --accent-soft: #f3f3f3;
  --red: #ef4e4e;
  --green: #009e59;
  --border: rgba(0, 0, 0, .08);
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 8px rgba(0, 0, 0, .04);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, .1);
  --ok: #009e59;
  --ok-soft: #e5f6ef;
  --warn: #f79c32;
  --warn-soft: #fef5ea;
  --err: #ef4e4e;
  --err-soft: #fef2f2;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }

a { color: var(--text); transition: color .15s; }
a:hover { color: var(--primary); }

/* ---------- Top bar ---------- */
.header-topbar {
  background: #1c1c1c;
  border-bottom: none;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
}
.header-topbar-inner { justify-content: space-between; }
.header-topbar a,
.header-topbar .topbar-item { color: rgba(255, 255, 255, .75); }
.header-topbar a:hover,
.header-topbar .topbar-item:hover { color: #fff; }
.header-topbar i,
.header-topbar .weather-icon { color: #fff; opacity: .8; }

/* ---------- Main header ---------- */
.site-header { background: #fff; border-bottom: 0; }
.header-main { background: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text);
  white-space: nowrap;
}
.brand-title:hover { color: var(--primary); }

/* Compact search */
.header-search-form {
  position: relative;
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  padding: 10px 14px 10px 34px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, .03);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: background .2s, box-shadow .2s;
}
.header-search-form i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
}
.header-search-text {
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-search-form:hover,
.header-search-form:focus {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(36, 113, 229, .2);
}

/* Menu */
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
  background: none !important;
}
.site-nav a:hover,
.site-nav .current-menu-item > a { background: none !important; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 4px;
}
.header-account-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.header-account-link:hover { color: var(--primary); }
.header-account-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 18px;
}
.header-account-icon:hover { color: var(--primary); }

@media (max-width: 991px) {
  .header-inner { gap: 10px; }
  .header-search-form { max-width: 260px; }
  .header-account-link { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
}
@media (max-width: 640px) {
  .header-search-form { max-width: 140px; }
  .brand-title { font-size: 18px; }
}

/* Remove old search row */
.header-search-row { display: none; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 6px;
  font-weight: 600;
  padding: 10px 18px;
  font-size: 14px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--primary-h);
  box-shadow: 0 4px 12px rgba(36, 113, 229, .25);
}
.btn-primary::before { display: none; }
.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.btn-ghost:hover { background: var(--accent-soft); }

/* ---------- Chips / tag carousel ---------- */
.chip {
  border-radius: 6px;
  background: #f3f3f3;
  border: none;
  color: var(--muted);
  font-weight: 500;
  padding: 7px 14px;
  font-size: 14px;
}
.chip:hover { background: #ececec; color: var(--text); }
.chip.active { background: var(--primary); color: #fff; }

.home-tag-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.tag-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tag-carousel::-webkit-scrollbar { display: none; }
.tag-carousel .chip { white-space: nowrap; flex: 0 0 auto; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card:hover { box-shadow: var(--shadow); }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.section-head h2,
.section-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 0;
}
.section-head .btn { flex: 0 0 auto; }
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.section-link:hover { color: var(--primary-h); }
.page-title { font-size: 28px; font-weight: 700; margin: 0 0 18px; }

/* ---------- RBC homepage layout ---------- */
.home-rbc { background: var(--bg); }
.rbc-layout {
  display: grid;
  gap: 24px;
}
@media (min-width: 992px) {
  .rbc-layout { grid-template-columns: minmax(0, 2fr) minmax(320px, 420px); align-items: start; }
}
.rbc-main { min-width: 0; }
.rbc-sidebar { display: flex; flex-direction: column; gap: 20px; }

.rbc-news-feed { display: flex; flex-direction: column; gap: 12px; }
.rbc-feed-footer { margin-top: 20px; }

.rbc-side-block { padding: 20px; }
.rbc-side-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 14px;
}
.rbc-side-list { display: flex; flex-direction: column; }
.rbc-side-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}
.rbc-side-more:hover { color: var(--primary-h); }

.rbc-cat-list { display: flex; flex-direction: column; gap: 8px; }
.rbc-cat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background .15s;
}
.rbc-cat-item:hover { background: var(--accent-soft); color: var(--primary); }
.rbc-cat-item i {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* ---------- News row (sidebar) ---------- */
.news-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.news-row:last-child { border-bottom: none; }
.news-row-logo,
.news-row-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.news-row-logo img { width: 100%; height: 100%; object-fit: cover; }
.news-row-placeholder i { color: var(--primary); font-size: 20px; }
.news-row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.news-row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.news-row-title:hover { color: var(--primary); }
.news-row-footer {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.news-row-date { display: none; }

/* ---------- News cards (horizontal) ---------- */
#news-archive-list.grid-cols-3 { grid-template-columns: 1fr; }
.news-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-card .thumb {
  width: 120px;
  height: 90px;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
  aspect-ratio: auto;
  background: var(--accent-soft);
  overflow: hidden;
}
.news-card .thumb img,
.news-card .thumb-placeholder { width: 100%; height: 100%; }
.news-card .thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 28px;
}
.news-card .body {
  padding: 0;
  gap: 6px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.news-card .meta { font-size: 13px; color: var(--muted); font-weight: 400; }
.news-card h3 { font-size: 17px; font-weight: 600; line-height: 1.35; margin: 0; }
.news-card h3 a:hover { color: var(--primary); }
.news-card .excerpt { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }
@media (max-width: 560px) {
  .news-card { flex-direction: column; align-items: stretch; }
  .news-card .thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* ---------- Org cards ---------- */
.org-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  gap: 12px;
}
.org-card:hover { border-color: rgba(36, 113, 229, .25); }
.org-card-link { gap: 14px; }
.org-logo {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: var(--accent-soft);
}
.org-card-info h3 {
  font-size: 16px;
  font-weight: 600;
}
.org-card-cat {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}
.org-card-address { font-size: 13px; }
.org-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.org-status.is-open { background: var(--ok-soft); color: var(--ok); }
.org-status.is-closed { background: #f3f3f3; color: var(--muted); }

.org-search-active {
  cursor: pointer;
  user-select: none;
}
.org-search-active input[type="checkbox"] {
  appearance: none;
  width: 38px;
  height: 22px;
  margin: 0 8px 0 0;
  border-radius: 999px;
  background: #d4d4d4;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.org-search-active input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.org-search-active input[type="checkbox"]:checked {
  background: var(--ok);
}
.org-search-active input[type="checkbox"]:checked::before {
  transform: translateX(16px);
}

/* ---------- Event cards: Masonry, фото без обрезки ---------- */
.event-grid,
.rbc-main .event-grid {
  display: block;
  column-count: auto;
  position: relative;
}
.event-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 0 14px;
  break-inside: auto;
  overflow: hidden;
}
@media (min-width: 720px) {
  .event-card { width: calc((100% - 14px) / 2); }
}
@media (min-width: 1100px) {
  .event-card { width: calc((100% - 28px) / 3); }
}
.event-card:hover { transform: none; }
.event-card .event-thumb {
  display: block;
  line-height: 0;
  background: #f4f6f8;
}
.event-card .event-thumb img,
.event-card:hover .event-thumb img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  transform: none;
}
.event-card .event-body { padding: 10px 12px 12px; gap: 4px; }
.event-card .event-meta { font-size: 12px; gap: 8px; }
.event-card h3 { font-size: 15px; line-height: 1.35; font-weight: 600; }
.event-card .event-cat,
.event-card .event-place,
.event-card .event-price { font-size: 12.5px; }
.event-card .event-place {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card .event-price { padding-top: 2px; }

/* ---------- Gallery ---------- */
.gallery-mosaic { gap: 12px; }
.gallery-mosaic .m-item { border-radius: var(--radius); }

/* ---------- Footer (clean white) ---------- */
.site-footer {
  background: #f8fafc;
  color: #334155;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}
.site-footer::before { display: none; }
.site-footer a { color: #475569; transition: color .15s; }
.site-footer a:hover { color: var(--primary); }
.site-footer h3 {
  color: #64748b;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 16px;
}

.footer-cta {
  padding: 48px 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.footer-cta-text h2 { color: #0f172a; }
.footer-cta-text p { color: #64748b; }

.footer-main { padding: 56px 24px 40px; }

.footer-brand .brand-title { color: #0f172a; }
.footer-brand .brand-title:hover { color: var(--primary); }
.footer-desc { color: #64748b; }

.footer-socials { display: flex; gap: 10px; margin-bottom: 26px; }
.footer-socials .social-link {
  background: #fff;
  border: 1px solid var(--border);
  color: #475569;
  transition: all .15s;
}
.footer-socials .social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
}
.footer-socials .social-link.vk:hover { background: #eef6ff; color: #07f; border-color: #cfe4ff; }
.footer-socials .social-link.tg:hover { background: #eef6ff; color: #08c; border-color: #cfe4ff; }
.footer-socials .social-link.ok:hover { background: #fff7ed; color: #f80; border-color: #fed7aa; }

.footer-stats { gap: 12px; }
.footer-stat {
  background: #fff;
  border: 1px solid var(--border);
}
.footer-stat strong { color: #0f172a; }
.footer-stat span { color: #64748b; }

.footer-col ul li a { color: #475569; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col ul li a i { color: var(--primary); }

.footer-contacts li { color: #475569; }
.footer-contacts li i { color: var(--primary); }

.footer-subscribe-title { color: #64748b; }
.footer-subscribe-form input {
  background: #fff;
  border: 1px solid var(--border);
  color: #0f172a;
}
.footer-subscribe-form input::placeholder { color: #94a3b8; }
.footer-subscribe-form input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 113, 229, .12);
}
.footer-subscribe-form button { background: var(--primary); }
.footer-subscribe-form button:hover { background: var(--primary-h); }
.footer-subscribe-message.is-success { color: #16a34a; }
.footer-subscribe-message.is-error { color: #dc2626; }

.footer-bottom {
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-copyright { color: #64748b; }
.footer-links a { color: #64748b; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 767px) {
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ---------- Badges ---------- */
.badge-publish { background: var(--ok-soft); color: var(--ok); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-draft { background: #f3f3f3; color: var(--muted); }
.badge-verified { background: var(--primary-soft); color: var(--primary); }

/* ---------- Form fields ---------- */
.field input,
.field textarea,
.field select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 113, 229, .12);
}

/* ---------- Account ---------- */
.account-sidebar,
.stat-card,
.quick-action { background: #fff; }
.account-nav button.active { background: var(--primary-soft); color: var(--primary); }
.account-nav button.active i { background: rgba(36, 113, 229, .12); }

/* ---------- Organizations by category ---------- */
.org-by-cat-wrap { display: flex; flex-direction: column; gap: 40px; }
.org-by-cat-wrap.reveal { opacity: 1; transform: none; transition: none; }
.org-cat-section { scroll-margin-top: 24px; }
.org-cat-section .section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
}
.org-cat-section .section-head h2 i {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.org-cat-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .org-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .org-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .org-cat-grid { grid-template-columns: repeat(4, 1fr); } }

.org-archive-more[hidden] { display: none; }

/* Hide native search cancel button inside org archive search */
#org-search-input::-webkit-search-cancel-button { display: none; }
#org-search-input::-ms-clear { display: none; }

.org-archive-controls .org-archive-search-field input { padding-right: 46px; }
.org-archive-controls .org-search-clear { right: 14px; }

/* ---------- Minimal org category search toolbar ---------- */
.org-cat-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
@media screen and (min-width: 1024px) {
  .org-cat-search {
    flex: 1 1 360px;
    min-width: 220px;
  }
}
.org-cat-search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.org-cat-search-field > i {
  position: absolute;
  left: 16px;
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}
.org-cat-search-field input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.org-cat-search-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 113, 229, .12);
}
.org-cat-search-clear {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.org-cat-search-clear:hover {
  background: var(--accent-soft);
  color: var(--primary);
}
.org-cat-search-clear[hidden] { display: none; }

.org-cat-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.org-cat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 6px;
  background: #f3f3f3;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.org-cat-toggle:hover { background: #ececec; }
.org-cat-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 34px;
  height: 20px;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: #d4d4d4;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.org-cat-toggle input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.org-cat-toggle input[type="checkbox"]:checked { background: var(--ok); }
.org-cat-toggle input[type="checkbox"]:checked::before { transform: translateX(14px); }

.org-cat-sort {
  height: 40px;
  padding: 0 30px 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%23707070'%3E%3Cpath d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.org-cat-sort:focus { border-color: var(--primary); }

/* ---------- News category page ---------- */
.news-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.news-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .news-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .news-cat-grid { grid-template-columns: repeat(3, 1fr); } }

.news-cat-grid .news-card {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.news-cat-grid .news-card .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.news-cat-grid .news-card .body {
  padding: 16px;
  gap: 8px;
}
.news-cat-grid .news-card h3 {
  font-size: 16px;
  line-height: 1.4;
}
.news-cat-grid .news-card .excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-cat-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.news-cat-footer .btn[hidden] { display: none; }
.news-cat-count {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Homepage sidebar publication block ---------- */
.rbc-pub-block { background: linear-gradient(135deg, #f8fafc, #eef4ff); }
.rbc-pub-lead {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.rbc-pub-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rbc-pub-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}
.rbc-pub-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.rbc-pub-btn { width: 100%; justify-content: center; }

/* ---------- Homepage sidebar events block ---------- */
.rbc-events-list { display: flex; flex-direction: column; gap: 10px; }
.rbc-event-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: color .15s;
}
.rbc-event-row:last-child { border-bottom: none; }
.rbc-event-row:hover .rbc-event-title { color: var(--primary); }
.rbc-event-date {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
.rbc-event-title {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep {
  color: #c4c4c4;
  font-size: 12px;
}
.breadcrumbs span[aria-current="page"],
.breadcrumbs span:last-child {
  color: var(--text);
  font-weight: 500;
}

/* ---------- Flea market: сетка на главной ---------- */
.flea-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .flea-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .flea-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .flea-grid { grid-template-columns: 1fr; } }

.flea-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.flea-card .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f2f4f7;
  overflow: hidden;
}
.flea-card .thumb img,
.flea-card .thumb-placeholder { display: block; width: 100%; height: 100%; object-fit: cover; }
.flea-card .thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #98a2b3; font-size: 28px;
}
.flea-card .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flea-card h3 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  color: var(--text);
}
.flea-card h3 a { color: inherit; }
.flea-card h3 a:hover { color: var(--primary); }
.flea-price {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}
.flea-phone,
.flea-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.flea-phone { color: var(--primary); }
.flea-telegram { color: #229ed9; }
.flea-phone:hover,
.flea-telegram:hover { text-decoration: underline; }
.flea-condition,
.flea-foot { font-size: 13px; color: var(--muted); }
.flea-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.flea-cat { font-size: 13px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }

/* Список объявлений, как на Авито */
.market-feed {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.market-feed .flea-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.market-feed .flea-card:last-child { border-bottom: 0; }
.market-feed .flea-card:hover { background: #f7f8fa; }
.market-feed .flea-card .thumb {
  width: 168px;
  height: 126px;
  aspect-ratio: auto;
  border-radius: 12px;
}
.market-feed .flea-card .body { padding: 2px 0 0; }
.market-feed .flea-card h3 { font-size: 17px; }
.market-feed .flea-price { font-size: 20px; }
@media (max-width: 640px) {
  .market-feed .flea-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .market-feed .flea-card .thumb { width: 104px; height: 80px; }
  .market-feed .flea-card h3,
  .market-feed .flea-price { font-size: 15px; }
}

.avito-item {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
@media (min-width: 860px) {
  .avito-item { grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: start; }
}
.avito-photo {
  background: #f2f4f7;
  border-radius: 16px;
  overflow: hidden;
}
.avito-photo img,
.avito-photo .portal-gallery .swiper-slide img {
  width: 100%;
  height: 460px;
  max-height: none;
  object-fit: cover;
  display: block;
  background: #f2f4f7;
}
.avito-photo .portal-gallery-wrap { margin: 0; width: 100%; }
.avito-photo .portal-gallery { background: transparent; border-radius: 0; }
.avito-photo .portal-gallery .swiper-slide,
.avito-photo .portal-gallery .swiper-slide a { display: block; width: 100%; min-height: 0; }
.avito-photo .portal-gallery .swiper-pagination-bullet { background: #fff; opacity: .7; }
.avito-photo .portal-gallery .swiper-pagination-bullet-active { opacity: 1; }
@media (max-width: 640px) {
  .avito-photo img,
  .avito-photo .portal-gallery .swiper-slide img { height: 280px; }
}
.avito-photo .thumb-placeholder { font-size: 42px; color: #98a2b3; }
.avito-summary { padding: 20px 22px; }
.avito-price { font-size: 28px; font-weight: 700; line-height: 1.1; margin-bottom: 8px; }
.avito-summary h1 { margin: 0 0 16px; font-size: 22px; line-height: 1.3; }
.avito-facts { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.avito-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.avito-facts span { color: var(--muted); }
.avito-phone { width: 100%; justify-content: center; }
.avito-telegram { background: #229ed9; border-color: #229ed9; color: #fff; }
.avito-telegram:hover { background: #1b8bc4; border-color: #1b8bc4; color: #fff; }
.avito-description { padding: 20px 22px; }
.avito-description h2 { margin: 0 0 12px; font-size: 18px; }

/* ---------- Вакансии в духе hh ---------- */
.job-grid,
.vacancy-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hh-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
}
.hh-card:hover { border-color: #c9d7f2; }
.hh-card h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.hh-card h3 a { color: var(--primary); }
.hh-card h3 a:hover { color: var(--primary-h, #1d4ed8); }
.hh-salary { margin-top: 4px; font-size: 18px; font-weight: 700; color: #111; }
.hh-salary.is-muted { font-size: 15px; font-weight: 500; color: var(--muted); }
.hh-company { margin-top: 2px; font-size: 14px; color: #667085; }
.hh-reach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hh-reach .btn { color: #fff; }
.hh-reach .btn-outline { color: var(--primary); background: #fff; }
.form-block-title { margin: 8px 0 0; font-size: 18px; }
.hh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hh-tags span {
  font-size: 13px;
  line-height: 1.3;
  color: #344054;
  background: #f2f4f7;
  border-radius: 6px;
  padding: 4px 8px;
}
.hh-snippet {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #475467;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hh-date { margin-top: 10px; font-size: 13px; color: #98a2b3; }
.hh-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hh-logo img { width: 100%; height: 100%; object-fit: cover; }
.hh-logo-letters { font-size: 22px; font-weight: 700; color: var(--primary); }
.hh-vacancy { padding: 22px 24px 26px; }
.hh-vacancy-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: start;
}
.hh-vacancy h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.hh-vacancy .hh-salary { font-size: 22px; }
.hh-vacancy-body { margin-top: 22px; }
.hh-contacts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.hh-contacts h2 { width: 100%; margin: 0 0 4px; font-size: 18px; }
@media (max-width: 640px) {
  .hh-card, .hh-vacancy-head { grid-template-columns: minmax(0, 1fr) 52px; }
  .hh-logo { width: 52px; height: 52px; }
}

/* ---------- Minimal footer for org category ---------- */
.org-cat-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.org-cat-footer[hidden] { display: none; }
.org-cat-shown {
  font-size: 14px;
  color: var(--muted);
}
.org-cat-footer .btn {
  min-width: 160px;
  height: 40px;
  border-radius: 999px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .org-cat-toolbar { flex-direction: column; align-items: stretch; }
  .org-cat-search { width: 100%; }
  .org-cat-filters { justify-content: space-between; }
  .org-cat-footer { flex-direction: column; }
}

.org-rating { margin: 10px 0; }
.org-rating .stars { color: #f5b342; font-size: 18px; }
.org-rating .rating-value { font-weight: bold; margin-left: 5px; }
.org-rating .review-count { color: #888; margin-left: 5px; }

.org-socials .social-links { display: flex; gap: 10px; margin-top: 5px; }
.org-socials .social-link { font-size: 24px; color: #555; transition: color 0.2s; }
.org-socials .social-link:hover { color: #000; }

.org-features ul { list-style: none; padding: 0; }
.org-features li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.org-gallery .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.org-gallery .gallery-grid img { width: 100%; height: auto; border-radius: 8px; }

.org-status { display: inline-block; margin-left: 15px; padding: 4px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.org-status.is-open { background: #d4edda; color: #155724; }
.org-status.is-closed { background: #f8d7da; color: #721c24; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.is-open .status-dot { background: #28a745; }
.is-closed .status-dot { background: #dc3545; }

/* ---------- Portal pages: sidebar, article, gallery, comments ---------- */
.section-head .archive-subtitle { margin-top: 6px; }
@media (min-width: 992px) {
  .rbc-main .news-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .rbc-main .news-cat-grid { grid-template-columns: 1fr; }
}

.side-rows { display: flex; flex-direction: column; }
.side-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.side-row:last-child { border-bottom: none; }
.side-row:hover .side-row-title { color: var(--primary); }
.side-row-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.side-row-thumb img,
.side-row-thumb .org-logo-letters { width: 100%; height: 100%; object-fit: cover; }
.side-row-thumb .org-logo-letters {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.side-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.side-row-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.side-row-meta { font-size: 12px; color: var(--muted); }

.portal-article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 28px;
}
@media (min-width: 768px) { .portal-article { padding: 28px 32px 36px; } }
.portal-article-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.portal-article h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -.3px;
}
.portal-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}
.portal-article-meta i { margin-right: 6px; }
.portal-article-cover { margin: 0 0 22px; }
.portal-article-cover img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.portal-article-body {
  font-size: 17px;
  line-height: 1.7;
}
.portal-article-body p { margin: 0 0 1em; }
.portal-article-body h2,
.portal-article-body h3 { margin: 1.4em 0 .6em; line-height: 1.3; }

.event-when {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--primary-soft, #eef4ff);
  color: var(--primary);
}
.event-when strong { font-size: 16px; line-height: 1.35; }
.event-when span { font-size: 13px; font-weight: 600; }
.event-facts { margin: 0 0 22px; }
.event-ticket { margin-top: 8px; }

.single-portal .org-header,
.single-portal .org-content { margin-bottom: 16px; }

.portal-gallery-wrap { margin-top: 28px; }
.portal-gallery-title { margin: 0 0 12px; font-size: 20px; }
.portal-gallery {
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}
.portal-gallery .swiper-slide a { display: block; }
.portal-gallery .swiper-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  .portal-gallery .swiper-slide img { height: 240px; }
}
.portal-gallery .swiper-pagination-bullet { background: #fff; opacity: .55; }
.portal-gallery .swiper-pagination-bullet-active { opacity: 1; }

.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .18);
}
.swiper-button-next::after,
.swiper-button-prev::after {
  content: '' !important;
  font-family: inherit !important;
  font-size: 0 !important;
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #111;
  border-right: 2px solid #111;
}
.swiper-button-next::after { transform: rotate(45deg) translate(-1px, 1px); }
.swiper-button-prev::after { transform: rotate(-135deg) translate(-1px, 1px); }
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled { opacity: .35; }

.portal-comments {
  margin-top: 20px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.portal-comments h2 { margin: 0 0 16px; font-size: 22px; }
.portal-comments h2 span { color: var(--muted); font-weight: 600; font-size: 16px; }
.portal-comments-empty { margin: 0 0 16px; color: var(--muted); }
.portal-comment-list { list-style: none; margin: 0 0 18px; padding: 0; }
.portal-comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.portal-comment:last-child { border-bottom: none; }
.portal-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.portal-comment-head strong { font-size: 14px; }
.portal-comment-head time { font-size: 12px; color: var(--muted); }
.portal-comment-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #9a6700;
  background: #fff6dd;
  border-radius: 999px;
  padding: 2px 8px;
}
.portal-comment-text { font-size: 15px; line-height: 1.55; }
.portal-comment-text p:last-child { margin-bottom: 0; }
.portal-comment.is-pending { opacity: .85; }
.portal-comment-form label { display: block; margin-bottom: 12px; }
.portal-comment-form label span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.portal-comment-form textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.portal-comment-form textarea:focus { outline: none; border-color: var(--primary); }
.portal-comment-gate {
  padding: 16px;
  border-radius: 12px;
  background: var(--accent-soft, #f4f7fb);
}
.portal-comment-gate p { margin: 0 0 12px; }

.cat-swiper {
  margin: 0 0 24px;
  overflow: hidden;
}
.cat-swiper .swiper-wrapper { align-items: center; }
.cat-swiper .swiper-slide { width: auto; }
.cat-swiper .chip { white-space: nowrap; cursor: pointer; }
.cat-swiper.news-archive-cats,
.cat-swiper.news-cat-chips,
.cat-swiper.search-cats-bar,
.cat-swiper.map-cats {
  display: block;
  overflow: hidden;
  flex-wrap: nowrap;
}
.cat-swiper.search-cats-bar { margin: 0; padding: 12px 0 14px; }
.cat-swiper.search-cats-bar[hidden] { display: none !important; }
.map-toolbar .cat-swiper.map-cats { flex: 1; min-width: 0; margin: 0; }
.archive-count { margin: -8px 0 16px; color: var(--muted); font-size: 14px; font-weight: 600; }
.navigation.pagination { margin-top: 28px; }
.badge-past { background: #f2f4f7; color: var(--muted); }