.search-page {
  padding-top: 5px;
}

/* Drupal's clear-block clearfix was never carried over during migration,
   even though templates place a `.clear-block` div right after every
   floated `.title h2` (baseof.html) to contain it. Without this, the
   float stays open and the following content (e.g. the first article's
   floated thumbnail) rises up beside the title instead of below it. */
.clear-block:after {
  content: "";
  display: table;
  clear: both;
}

div.title {
  padding-bottom: 35px;
}

.nav-toggle {
  display: none;
}

.error-404-page .title h2 {
  font-size: 260%;
  color: #2f6fb3;
}

.error-404-image {
  padding: 10px 0 20px;
}

.error-404-image img {
  width: 320px;
}

.error-404-lead {
  font-size: 130%;
  color: #444;
}

/* The theme hardcodes image width/height as HTML attributes (410x200,
   100x100, 468x60, ...) instead of CSS. A CSS type-selector rule like
   `img{}` beats a presentational HTML attribute in the cascade, so
   `height:auto` alone doesn't just override the *attribute* height — with
   no CSS width set either, a floated `.img` container with no width of
   its own shrinks-to-fit the image's natural size, and the thumbnail
   renders full-size instead of clamped to the attribute's width. So each
   context needs its own explicit CSS width restoring the original
   intent; only then does `max-width:100%` correctly act as a mobile-only
   safety cap instead of the only sizing rule in effect. */
img {
  max-width: 100%;
  height: auto;
}

.view-frontpage .img img, .view-razdel .img img {
  width: 100px;
}

.first-img img {
  width: 410px;
}

.promo-anons-item img {
  width: 100px;
}

.views-field-field-image-c-fid img {
  width: 50px;
}

#sidebar-header img {
  width: 468px;
}

/* Drupal core's system.css supplied .links.inline styling; it never got
   carried over into style.css during migration, so tag lists rendered as
   a default bulleted vertical list instead of an inline row. */
ul.links.inline {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.links.inline li {
  display: inline;
  margin-right: 8px;
}

/* Mobile: the theme is a fixed 950px, 3-column, absolutely-positioned
   2010s layout with zero responsive rules of its own. Collapse it to a
   single stacked column below 780px (the width the original CSS already
   assumed as its floor, see the disabled `min-width:780px` comment in
   style.css) without touching the desktop layout at all. */
@media (max-width: 780px) {
  #page {
    width: auto;
    padding: 20px 12px 15px;
  }

  #header {
    height: auto;
    padding-bottom: 10px;
  }

  #logo-floater, .login, #sidebar-header {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    text-align: left;
  }

  #wrapper {
    margin-top: 10px;
  }

  #wrapper #container #center {
    float: none;
    width: auto;
  }

  body.sidebar-left #center,
  body.sidebar-right #center,
  body.sidebars #center {
    margin: 0;
  }

  body.sidebar-left #squeeze,
  body.sidebar-right #squeeze,
  body.sidebars #squeeze {
    margin: 0;
  }

  #sidebar-left, #sidebar-right {
    float: none;
    width: auto;
  }

  .view-frontpage .img, .view-razdel .img {
    float: none;
  }

  .txt {
    margin-left: 0;
    margin-top: 10px;
  }

  .similar, .meta {
    padding-left: 0;
  }

  .similar b, .meta b {
    margin-left: 0;
    float: none;
    width: auto;
    display: block;
  }

  .promo-anons-grid {
    flex-direction: column;
  }

  #footer {
    height: auto;
    padding: 15px 0;
  }

  #footer-left, #footer-right {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    text-align: left;
  }

  #footer-right {
    margin-top: 10px;
  }

  body {
    font-size: 87.5%;
  }

  html.js .nav-toggle {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background-color: #ecf1f6;
    border: none;
    font-size: 100%;
    text-align: left;
    cursor: pointer;
  }

  html.js #sidebar-left {
    display: none;
  }

  html.js #sidebar-left.nav-open {
    display: block;
  }
}

/* style.css floats .img left with no clearfix on .views-row, so a taller
   thumbnail bleeds down into the next row(s) instead of staying inside its
   own listing entry. */
.view-frontpage .views-row, .view-razdel .views-row {
  overflow: hidden;
}

.promo-anons h2 {
  padding-bottom: 10px;
  font-size: 135%;
  border-bottom: 1px solid #9f9f9f;
}

.promo-anons-grid {
  display: flex;
  gap: 18px;
  padding-top: 15px;
}

.promo-anons-item {
  flex: 1;
}

.promo-anons-item img {
  display: block;
  margin-bottom: 8px;
}

.promo-anons-title a {
  color: #000;
  text-decoration: none;
}

.promo-anons-title a:hover {
  text-decoration: underline;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  margin-top: 10px;
  border-top: 1px solid #9f9f9f;
}

.pager-prev, .pager-next {
  background-color: #ecf1f6;
  color: #000;
  text-decoration: none;
  padding: 7px 14px;
}

.pager-prev:hover, .pager-next:hover {
  text-decoration: underline;
}

.pager-disabled {
  color: #9f9f9f;
}

.pager-current {
  color: #606060;
}

.pagefind-ui {
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  --pagefind-ui-primary: #606060;
  --pagefind-ui-text: #333;
  --pagefind-ui-background: #fff;
  --pagefind-ui-border: #d7dfe8;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 0;
  --pagefind-ui-font: Arial, Helvetica, sans-serif;
}

.pagefind-ui__form {
  margin-bottom: 20px;
}

.pagefind-ui__search-input {
  border: 1px solid #9f9f9f;
  color: #333;
  font-size: 16px;
  height: 34px;
  line-height: 34px;
  padding: 0 10px;
}

.pagefind-ui__search-clear {
  color: #606060;
}

.pagefind-ui__result {
  border-top: 1px solid #ecf1f6;
  padding: 16px 0;
}

.pagefind-ui__result-title {
  font-size: 120%;
  font-weight: bold;
  margin-bottom: 8px;
}

.pagefind-ui__result-title a {
  color: #000;
  text-decoration: none;
}

.pagefind-ui__result-title a:hover {
  text-decoration: underline;
}

.pagefind-ui__result-excerpt {
  color: #606060;
  line-height: 1.45;
}

.pagefind-ui__button {
  background: #ecf1f6;
  border: 1px solid #d7dfe8;
  color: #000;
  cursor: pointer;
  padding: 7px 12px;
}
