#header.alt > span {
  vertical-align: middle;
  font-size: 1.5em;
}

#header.alt .logo {
  display: inline-block;
  margin: 0;
}


#content > h2[id] {
  /* Для правильной перемотки по содержанию */
  padding-top: 20px;
}

.with-border {
  border: #dddddd solid 1px !important;
}

#nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#main > .main {
  padding-top: 3em;
}

#footer .phrase {
  margin-bottom: 0;
}

#footer .phrase-author {
  text-align: right;
  margin-right: 1em;
}

.condensed h4 {
  font-size: 1em;
  font-weight: bold;
  margin: 0;
}

.condensed p {
  margin-bottom: 0.4em;
}

blockquote.small {
  line-height: 1.4em;
}

.small {
  font-size: 0.9em;
}

.small p,
.small ol,
.small ul {
  margin-bottom: 0.5em;
}

blockquote *:last-child {
  margin: 0;
}

code {
  font-size: 0.8em;
}

.posts .heading {
  font-weight: 500;
}

.posts .footer {
  display: flex;
  justify-content: space-between;
  margin-right: 1em;
  margin-bottom: 1em;
  align-items: center;
}

.posts .summary > p:last-child {
  margin-bottom: 1em;
}

.tag-list {
    list-style-type: none;
    padding: 0;
    margin: 0 1em 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer .tag-list {
    justify-content: flex-end;
    display: flex;
}

.tag-list li {
    background-color: rgba(247, 247, 247, 0.95);
    color: rgb(99, 99, 99);
    padding: 3px 20px;
    border-radius: 15px;
    font-size: 0.8em;
    cursor: pointer;
}

.tag-list li  a {
  text-decoration: none;
  border-bottom: 0;
}

.tag-list li:hover {
    background-color: rgba(222, 222, 222, 0.7);
}

@media screen and (max-width: 980px) {
  /* Меняет порядок элементов на обратный (для отображения картинки перед текстом на телефонах) */
  .row.reverse-medium {
    flex-direction: column-reverse;
  }
}


/* Dropdown menu */

.dropdown {
  position: relative;
}

/* Dropdown content */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

/* Links inside dropdown content */
.dropdown-content a {
  color: #636363;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: solid 1px #f1f1f1;
  text-wrap: nowrap;
  text-align: left;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
  background-color: #f1f1f1
}

/* Show the dropdown content on hover */
.dropdown:hover .dropdown-content {
  display: block;
}


/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination li {
    list-style: none;
    margin: 0 5px;
    padding: 0;
}

.pagination a {
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #ccc;
    color: #636363;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #f0f0f0;
}

.pagination li.active a {
    background-color: #8cc9f0;
    color: #636363;
    border-color: #007bff;
}

.pagination li.disabled a {
    color: #999;
    pointer-events: none; /* Prevents clicking */
    background-color: #eee;
}


/* Gallery */

.box .row {
  justify-content: center;
}