/*
 * verum.today — "Единая Русь" — new design for Joomla 4/5 (Cassiopeia).
 * Location: media/templates/site/cassiopeia/css/user.css
 * Cassiopeia loads this file automatically after its own styles.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --er-bg: #faf8f4;
  --er-surface: #ffffff;
  --er-text: #23211e;
  --er-muted: #6b665e;
  --er-line: #e6e1d8;
  --er-accent: #8b2323;
  --er-accent-dark: #6a1a1a;
  --er-dark: #1d1b19;
  --er-radius: 6px;
  --er-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.06);
  /* Logo text colour: change this one value to recolour the logo */
  --er-logo-color: #8b2323;
  --er-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --er-sans: 'Inter', 'Segoe UI', Arial, sans-serif;

  --cassiopeia-color-primary: var(--er-surface);
  --cassiopeia-color-link: var(--er-accent);
  --cassiopeia-color-hover: var(--er-accent-dark);
}

/* ---------- Base ---------- */
body {
  font-family: var(--er-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--er-text);
  background: var(--er-bg);
}

a {
  color: var(--er-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--er-accent-dark);
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--er-serif);
  color: var(--er-text);
  font-weight: 700;
  line-height: 1.25;
}

/* Page width: ~1200px centered */
.wrapper-static .site-grid {
  grid-template-columns: [full-start] minmax(16px, 1fr) [main-start] repeat(4, minmax(0, 300px)) [main-end] minmax(16px, 1fr) [full-end];
  grid-gap: 0 24px;
}

/* ---------- Header ---------- */
.container-header {
  background: var(--er-surface) !important;
  background-image: none !important;
  box-shadow: none;
  border-bottom: 1px solid var(--er-line);
  color: var(--er-text);
}

.container-header .navbar-brand,
.container-header .site-description {
  display: none;
}

/* Logo module (position below-top) */
.container-header .container-below-top {
  display: flex;
  justify-content: center;
  padding: 28px 16px 8px;
}

.container-header .container-below-top p {
  margin: 0;
}

/* ---------- Text logos (three variants = three custom modules, publish one) ---------- */
.er-logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--er-text);
  text-decoration: none !important;
}

/* Cassiopeia paints header links white: override for the logo */
.container-header a.er-logo,
.container-header a.er-logo:hover,
.container-header a.er-logo:focus,
.er-logo:hover {
  color: var(--er-logo-color, var(--er-accent));
}

.er-logo svg {
  flex-shrink: 0;
  color: var(--er-accent);
}

.er-logo__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.er-logo__name {
  font-weight: 700;
  line-height: 1;
}

.er-logo__tag {
  font-size: 14px;
  color: var(--er-muted);
}

/* A: book classic */
.er-logo--a {
  flex-direction: column;
  gap: 8px;
}

.er-logo--a .er-logo__name {
  font-family: var(--er-serif);
  font-size: 44px;
  color: var(--er-accent);
}

.er-logo--a .er-logo__tag {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--er-serif);
  font-style: italic;
  font-size: 16px;
}

.er-logo--a .er-logo__tag::before,
.er-logo--a .er-logo__tag::after {
  content: "";
  width: 40px;
  height: 1px;
  background: #b9b1a4;
}

/* B: monogram stamp */
.er-logo--b .er-logo__name {
  font-family: var(--er-serif);
  font-size: 34px;
}

.er-logo--b .er-logo__mark text {
  font-family: var(--er-serif);
  font-weight: 700;
}

/* C: open book, Playfair Display */
.er-logo--c .er-logo__name {
  font-family: var(--er-serif);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0;
}

.er-logo--c .er-logo__tag {
  font-family: var(--er-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.er-logo--c svg {
  stroke-width: 2;
}

@media (max-width: 575px) {
  .er-logo--a .er-logo__name { font-size: 32px; }
  .er-logo--b .er-logo__name { font-size: 26px; }
  .er-logo--c .er-logo__name { font-size: 26px; }
  .er-logo svg { width: 48px; height: auto; }
  .er-logo__tag { font-size: 13px; }
}

.container-header .container-below-top img {
  max-width: 300px;
  height: auto;
  margin: 0 !important;
}

/* ---------- Main menu ---------- */
.container-header .container-nav {
  justify-content: center;
  padding: 4px 16px 0;
  border-top: 1px solid var(--er-line);
  margin-top: 16px;
}

.container-header .mod-menu {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span,
.container-header .mod-menu > li > button {
  display: block;
  font-family: var(--er-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--er-text);
  padding: 14px 10px 12px;
  background: transparent;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a {
  color: var(--er-accent);
  border-bottom-color: var(--er-accent);
  text-decoration: none;
}

.container-header .mod-menu img {
  display: none;
}

.container-header .metismenu.mod-menu .mm-collapse {
  background: var(--er-surface);
  border: 1px solid var(--er-line);
  box-shadow: var(--er-shadow);
}

.container-header .metismenu.mod-menu .mm-collapse a {
  color: var(--er-text);
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.container-header .navbar-toggler {
  color: var(--er-text);
  border-color: var(--er-line);
  margin: 8px auto;
}

/* ---------- Module boxes: no default cards ---------- */
.card.top-a,
.card.top-b,
.card.main-top,
.card.main-bottom,
.card.bottom-a,
.card.bottom-b,
.card.sidebar-right {
  border: 0;
  box-shadow: none;
  background: transparent;
  margin-bottom: 0;
}

.card.top-a .card-body,
.card.top-b .card-body,
.card.main-top .card-body,
.card.main-bottom .card-body,
.card.bottom-a .card-body,
.card.bottom-b .card-body {
  padding: 0;
}

/* Top-A: modules stacked, full width */
.container-top-a {
  display: block;
  padding-top: 28px;
}

.container-top-a > * {
  width: 100%;
  margin-bottom: 28px;
}

/* ---------- Search ---------- */
#all2 {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

#all2 .inmenu {
  display: block;
  width: 100% !important;
  max-width: 520px;
}

#all2 .inmenu:first-child {
  display: none;
}

.container-top-a .mod-finder .awesomplete,
.container-top-a .search form {
  display: block;
  width: 100%;
}

.container-top-a input[name="q"],
.container-top-a input[name="searchword"] {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 18px 12px 44px;
  font-size: 15px;
  font-family: var(--er-sans);
  color: var(--er-text);
  background: var(--er-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b665e' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center;
  border: 1px solid var(--er-line);
  border-radius: 999px;
  box-shadow: var(--er-shadow);
}

.container-top-a input[name="q"]:focus,
.container-top-a input[name="searchword"]:focus {
  outline: none;
  border-color: var(--er-accent);
}

/* ---------- Quote (module "Главная") ---------- */
.container-top-a .mod-custom > p:first-of-type,
.container-top-a .mod-custom > p:nth-of-type(2) {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Quiet quote: no card, small muted text, only first 4 lines (full text on hover) */
.container-top-a .mod-custom > p:first-of-type {
  position: relative;
  padding: 0 0 0 14px;
  background: none;
  border-left: 2px solid var(--er-line);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--er-serif);
  font-style: italic;
  text-align: left !important;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
  cursor: default;
}

.container-top-a .mod-custom > p:first-of-type:hover {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.container-top-a .mod-custom > p:first-of-type span {
  font-family: var(--er-serif) !important;
  font-size: 13px !important;
  line-height: 1.5;
  color: #9a948a;
}

.container-top-a .mod-custom > p:nth-of-type(2) {
  padding: 4px 0 0 14px;
  background: none;
  border-left: 2px solid var(--er-line);
  border-radius: 0;
  box-shadow: none;
  text-align: right;
}

.container-top-a .mod-custom > p:nth-of-type(2) span {
  font-family: var(--er-sans) !important;
  font-size: 12px !important;
  font-weight: 700;
  color: #9a948a;
}

.container-top-a .mod-custom > p:nth-of-type(2) span::before {
  content: '— ';
}

/* ---------- Category tiles: История / Культура / Религия / Язык ---------- */
.container-top-a .mod-custom:has(.div-bottom) {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.div-bottom {
  position: relative;
  display: block;
  width: auto;
  height: 220px;
  background-size: cover !important;
  background-position: center;
  background-color: var(--er-dark);
  border-radius: var(--er-radius);
  overflow: hidden;
  opacity: 1;
  filter: none;
  box-shadow: var(--er-shadow);
  transition: transform 0.2s ease;
}

.div-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0) 100%);
  transition: background 0.2s ease;
}

.div-bottom:hover {
  transform: translateY(-3px);
}

.div-bottom:hover::before {
  background: linear-gradient(to top, rgba(139, 35, 35, 0.85) 0%, rgba(0, 0, 0, 0.1) 70%);
}

.div-cell {
  position: absolute;
  inset: auto 0 0 0;
  display: block;
  width: auto !important;
  height: auto;
  padding: 18px 20px;
}

.div-cell a {
  display: inline-block;
  background: none !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-family: var(--er-serif);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none !important;
}

/* Whole tile clickable */
.div-cell a::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* ---------- Home page: tiles on the left, search + quote in a side column ---------- */
.container-top-a:has(#all2) {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.container-top-a:has(#all2) > * {
  margin-bottom: 0;
}

.container-top-a:has(#all2) > .top-a:has(#all2) {
  grid-column: 2;
  grid-row: 1;
}

.container-top-a:has(#all2) > .top-a:has(.div-bottom) {
  grid-column: 1;
  grid-row: 1;
}

.container-top-a:has(#all2) .mod-custom:has(.div-bottom) {
  grid-template-columns: repeat(2, 1fr);
}

.container-top-a:has(#all2) .div-bottom {
  height: 215px;
}

.container-top-a:has(#all2) #all2 {
  margin-bottom: 16px;
}

.container-top-a:has(#all2) #all2 .inmenu,
.container-top-a:has(#all2) input[name="q"],
.container-top-a:has(#all2) .mod-custom > p:first-of-type,
.container-top-a:has(#all2) .mod-custom > p:nth-of-type(2) {
  max-width: none !important;
}

@media (max-width: 991px) {
  .container-top-a:has(#all2) {
    grid-template-columns: 1fr;
  }

  .container-top-a:has(#all2) > .top-a:has(#all2),
  .container-top-a:has(#all2) > .top-a:has(.div-bottom) {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ---------- "Все материалы" toggle ---------- */
.container-main-top,
.main-top {
  margin-bottom: 8px;
}

.main-top button[onclick] {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  cursor: pointer;
}

.main-top button[onclick] h2 {
  margin: 0;
  font-family: var(--er-serif);
  font-size: 26px;
  color: var(--er-text);
}

.main-top button[onclick] h2 span {
  color: var(--er-accent) !important;
}

#all {
  width: 100%;
  margin-top: 16px;
  padding: 24px;
  background: var(--er-surface);
  border-radius: var(--er-radius);
  box-shadow: var(--er-shadow);
}

#all[style*="inline-block"] {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.inmenu {
  width: auto;
  display: block;
}

.inmenu h3 {
  font-size: 18px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--er-accent);
  border-bottom: 1px solid var(--er-line);
  padding-bottom: 8px;
}

.all {
  visibility: hidden;
  display: inline-block;
  width: 24%;
}

/* ---------- Article grid (home + category blogs) ---------- */
.blog-featured .blog-items,
.blog .blog-items {
  gap: 24px;
}

.blog-featured .blog-item,
.blog .blog-item {
  display: flex;
  flex-direction: column;
  background: var(--er-surface);
  border-radius: var(--er-radius);
  box-shadow: var(--er-shadow);
  padding: 20px;
  overflow: hidden;
}

.blog-featured .item-content,
.blog .item-content {
  display: flex;
  flex-direction: column;
}

.blog-featured .page-header,
.blog .page-header,
.blog-featured .item-content > .item-title,
.blog .item-content > .item-title {
  order: 2;
  margin: 0 0 8px;
}

.blog-featured .item-title a,
.blog .item-title a {
  color: var(--er-text);
  text-decoration: none;
}

.blog-featured .item-title a:hover,
.blog .item-title a:hover {
  color: var(--er-accent);
  text-decoration: none;
}

.blog-featured .item-title,
.blog-featured .page-header h2,
.blog .item-title,
.blog .page-header h2 {
  font-family: var(--er-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.blog-featured .page-header h2 a,
.blog .page-header h2 a {
  color: var(--er-text);
  text-decoration: none;
}

.blog-featured .page-header h2 a:hover,
.blog .page-header h2 a:hover {
  color: var(--er-accent);
}

/* Intro text: put images first, centered, never stretched */
.blog-featured .item-content > p,
.blog .item-content > p {
  order: 3;
  font-size: 15px;
  line-height: 1.55;
  color: var(--er-muted);
  margin: 0 0 8px;
  text-align: left !important;
}

.blog-featured .item-content > p:has(img),
.blog .item-content > p:has(img) {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  margin: -20px -20px 16px;
  background: #f1ede6;
}

/* Cards without any picture: same beige band with an open-book mark, so the grid stays even */
.blog-featured .item-content:not(:has(img))::before,
.blog .item-content:not(:has(img))::before {
  content: "";
  order: 1;
  display: block;
  height: 230px;
  margin: -20px -20px 16px;
  background: #f1ede6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='52' viewBox='0 0 64 52' fill='none' stroke='%23b9a99a' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M32 12C24 6 12 5 3 7v39c9-2 21-1 29 4z'/%3E%3Cpath d='M32 12c8-6 20-7 29-5v39c-9-2-21-1-29 4z'/%3E%3C/svg%3E") no-repeat center;
}

.blog-featured .item-content img,
.blog .item-content img {
  float: none !important;
  display: block;
  width: auto !important;
  max-width: 100%;
  height: auto !important;
  max-height: 210px;
  margin: 0 auto !important;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Intro text wrapped in <blockquote> and/or fully linked */
.blog-featured .item-content > blockquote,
.blog .item-content > blockquote {
  order: 3;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--er-muted);
}

.blog-featured .item-content > blockquote p,
.blog .item-content > blockquote p {
  margin: 0;
  text-align: left !important;
}

.blog-featured .item-content > p a,
.blog-featured .item-content > blockquote a,
.blog .item-content > p a,
.blog .item-content > blockquote a {
  color: inherit;
  text-decoration: none;
}

.blog-featured .item-content > p a:hover,
.blog-featured .item-content > blockquote a:hover,
.blog .item-content > p a:hover,
.blog .item-content > blockquote a:hover {
  color: var(--er-accent);
}

.blog-featured .readmore,
.blog .readmore {
  order: 4;
  margin-top: auto;
}

/* Book covers inside articles */
.book {
  float: left;
  margin: 10px;
}

/* ---------- Single article ---------- */
.com-content-article {
  background: var(--er-surface);
  border-radius: var(--er-radius);
  box-shadow: var(--er-shadow);
  padding: 32px 40px;
}

.com-content-article .page-header h1,
.com-content-article .page-header h2 {
  font-size: 30px;
  margin-bottom: 16px;
}

.com-content-article .com-content-article__body {
  font-size: 17px;
  line-height: 1.7;
}

.com-content-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.com-content-article__body iframe {
  max-width: 100%;
  border-radius: var(--er-radius);
}

/* ---------- Breadcrumbs / pagination ---------- */
.pagination {
  --pagination-color: var(--er-accent);
  --pagination-active-bg: var(--er-accent);
  --pagination-active-border-color: var(--er-accent);
  --pagination-hover-color: var(--er-accent-dark);
}

.pagination .page-link {
  color: var(--er-accent);
  border-color: var(--er-line);
}

.pagination .active > .page-link,
.pagination .page-item.active .page-link {
  background: var(--er-accent);
  border-color: var(--er-accent);
  color: #ffffff;
}

/* ---------- Footer (module "divbot", position bottom-a): compact, one row ---------- */
.container-bottom-a {
  margin-top: 28px;
}

.container-bottom-a .mod-custom > div {
  background: var(--er-surface) !important;
  border-top: 2px solid var(--er-accent);
  border-radius: var(--er-radius);
  padding: 14px 24px 12px !important;
  color: var(--er-muted) !important;
  /* font-size 0 hides the stray &nbsp; text node at the top of the module */
  font-size: 0 !important;
  line-height: 1.45;
}

.container-bottom-a .mod-custom .items-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 32px;
  margin: 0;
}

.container-bottom-a .mod-custom .items-row > .item {
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  padding: 0;
  font-size: 13px;
}

.container-bottom-a .mod-custom .items-row > .item br {
  display: none;
}

/* Empty column that only holds the invisible Mail.ru counter */
.container-bottom-a .mod-custom .items-row > .item.column-4 {
  display: none;
}

/* Owner line: full width, centered, small */
.container-bottom-a .mod-custom > div div[style*="background"] {
  flex: 0 0 100%;
  float: none !important;
  background: transparent !important;
  border-top: 1px solid var(--er-line);
  margin-top: 8px;
  padding: 8px 0 0 !important;
  min-height: 0 !important;
  font-size: 12px !important;
  text-align: center;
}

.container-bottom-a .mod-custom > div div[style*="background"] > div {
  width: auto !important;
  margin: 0 !important;
  display: block !important;
}

/* Comments are closed: hide "Add comment" buttons on article cards */
.blog-item .comments-readmore,
.blog-featured .comments-readmore {
  display: none;
}

/* ---------- Header search (mod_finder in position "search", same row as the menu) ---------- */
.container-header .container-nav {
  align-items: center;
}

.container-header .container-search {
  margin-left: 8px;
}

.container-header .container-search .mod-finder {
  margin: 0;
}

.container-header .container-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.container-header .container-search input[type="text"],
.container-header .container-search input[type="search"] {
  width: 220px;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px 7px 34px;
  text-overflow: ellipsis;
  font-size: 14px;
  border: 1px solid var(--er-line);
  border-radius: 999px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b665e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 12px center;
  transition: border-color 0.2s;
}

/* Fixed width on focus: the field must not jump */
.container-header .container-search input:focus {
  border-color: var(--er-accent);
  outline: none;
}

/* Autocomplete wrapper must not change the field size */
.container-header .container-search .awesomplete {
  display: block;
  width: 220px;
}

/* Menu and search in one row on desktop */
@media (min-width: 992px) {
  .container-header .container-nav {
    flex-wrap: nowrap;
  }

  .container-header .container-nav > .navbar {
    flex: 1 1 auto;
    min-width: 0;
  }

  .container-header .container-search {
    flex: 0 0 auto;
  }
}

/* Metismenu adds wide padding to every item: remove it */
.container-header .metismenu.mod-menu > li.metismenu-item {
  padding: 0;
  display: flex;
  align-items: center;
}

/* Dropdown caret for menu items with children (e.g. "Лекции") */
.container-header .metismenu.mod-menu .mm-toggler {
  padding: 14px 6px 12px 0;
  color: var(--er-text);
}

.container-bottom-a .mod-custom > div *:not(a) {
  color: var(--er-muted) !important;
}

.container-bottom-a .mod-custom a {
  color: var(--er-accent);
}

.container-footer,
.footer {
  background: var(--er-bg) !important;
  background-image: none !important;
  color: var(--er-muted);
  border-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .container-top-a .mod-custom:has(.div-bottom),
  #all[style*="inline-block"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .container-top-a .mod-custom:has(.div-bottom),
  #all[style*="inline-block"] {
    grid-template-columns: 1fr;
  }

  .div-bottom {
    height: 160px;
  }

  .com-content-article {
    padding: 20px;
  }

  .container-top-a .mod-custom > p:first-of-type span {
    font-size: 13px !important;
  }
}

/* ---------- Static gallery (replaces JoomGallery {joomplucat}) ---------- */
.er-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.er-gallery a { display: block; border-radius: var(--er-radius); overflow: hidden; background: #f1ede6; }
.er-gallery img { display: block; width: 100%; height: 130px; object-fit: cover; transition: transform .2s; }
.er-gallery a:hover img { transform: scale(1.04); }

/* Home: the old search block (#all2) is empty now, search lives in the header */
.container-top-a #all2 {
  display: none;
}

/* Video embeds (YouTube, RuTube, VK): full width, 16:9, never cropped */
.com-content-article iframe,
.item-page iframe,
.blog-item iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  margin: 16px auto;
  border: 0;
  border-radius: var(--er-radius);
  background: #000;
}

/* Comments are closed for guests: hide the "no rights to post comments" notice (existing comments still show) */
#jc > .alert-warning {
  display: none;
}