/* ===== Базовая типографика и ссылки ===== */
html {
    background: #ffffff;
}

body {
    margin: 8px;
    font-family: Helvetica, Arial, Tahoma, sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #000000;
}

a {
    color: #000000;
    font-family: Arial, sans-serif;
}

a:hover {
    color: #f70000;
}

a:focus-visible {
    outline: 1px solid #f70000;
    outline-offset: 3px;
}

.page_active {
    color: #333333;
    font-family: Arial, sans-serif;
}

.page {
    color: #000000;
    font-family: Arial, sans-serif;
}

.page:hover {
    color: #f70000;
}

/* ===== Главная навигация ===== */
#menu {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    height: 30px;
    margin: 0 auto;
    padding-top: 10px;
    border-bottom: 1px solid #000000;
    background-color: #ffffff;
}

.menu_item,
.menu_item1 {
    padding-right: 0;
    color: #000000;
}

.menu_item:hover,
.menu_item1:hover {
    color: #f70000;
}

.menu_itemactive,
.menu_item1active {
    padding-right: 0;
    color: #f70000;
    font-family: Arial, sans-serif;
    text-decoration: none;
}

.active {
    color: #000000;
    font-family: Tahoma, Arial, sans-serif;
    text-decoration: none;
}

.menu-links {
    display: contents;
}

.mobile-bar {
    display: none;
}

/* ===== Служебные слои страницы ===== */
.layout-gap {
    height: 44px;
}

#lang {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: right;
}

#list_pages {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: right;
}

/* ===== Контентные слои ===== */
.m-content {
    width: 100%;
    max-width: 600px;
    min-height: 600px;
    margin: 0 auto;
    overflow-wrap: break-word;
}

.m-content img {
    width: 100%;
    border: 0;
}

.m-content span,
.m-content p {
    font-size: 14px !important;
    line-height: 22px !important;
}

.m-content h1,
h1 {
    margin: 0;
    padding: 0;
    color: #000000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 35pt;
    line-height: 1;
}

.m-content h1 span {
    margin: 0;
    padding: 0;
    color: #000000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 35pt !important;
    line-height: 1 !important;
}

.gallery_name {
    margin-top: 3px;
    margin-bottom: 3px;
    padding-top: 3px;
    padding-bottom: 3px;
    color: #000000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 20px;
    font-weight: normal;
    line-height: 3;
    text-decoration: none;
}

.m-content span.gallery_name {
    font-size: 20px !important;
    line-height: 3 !important;
}

.gallery_name:hover {
    color: #f70000;
    text-decoration: underline;
}

h3 {
    margin-top: 3px;
    padding-top: 3px;
    color: #000000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 20px;
    font-weight: normal;
    line-height: 1;
}

.comment {
    color: #000000;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 12px;
}

.m-content span.comment {
    font-size: 12px !important;
    line-height: 22px !important;
}

.artwork-gallery {
    line-height: 18px;
}

.artwork-gallery > p:first-child {
    line-height: 17.5px !important;
}

/* ===== Блочный список галерей ===== */
.gallery-index {
    padding-bottom: 22px;
    font-size: 0;
    line-height: 0;
}

.gallery-entry {
    display: block;
    font-size: 14px;
    line-height: 22px;
}

.gallery-entry .gallery_name {
    display: block;
    min-height: 60px;
    height: auto;
    margin: 22px 0 0;
    padding: 0;
    line-height: 60px;
}

.gallery-entry .gallery_name.is-empty {
    display: block;
    min-height: 22px;
    height: 22px;
    margin: 0;
    line-height: 22px;
}

.gallery-entry:first-child .gallery_name.is-empty {
    display: none;
}

.gallery-entry .gallery-photo {
    display: block;
    font-size: 0;
    line-height: 0;
}

.gallery-entry .gallery-photo br {
    display: none;
}

.gallery-entry .gallery-photo img {
    display: block;
}

/* ===== Подвал ===== */
.site-footer {
    clear: both;
    margin: 11px 0;
    color: #999999;
    font-size: 11px;
    text-align: center;
}

.site-footer a {
    color: #999999;
}

.footer-spacer {
    display: block;
    height: 53px;
}

@media (max-width: 600px) {
    #menu {
        z-index: 100;
        align-items: center;
        height: 44px;
        padding-top: 0;
    }

    .mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 43px;
    }

    .menu-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: -8px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #000000;
        cursor: pointer;
    }

    .site-js .menu-toggle {
        display: inline-flex;
    }

    .menu-toggle-lines {
        position: relative;
        display: block;
        width: 22px;
        height: 16px;
    }

    .menu-toggle-lines span {
        position: absolute;
        left: 0;
        display: block;
        width: 22px;
        height: 1px;
        background: currentColor;
    }

    .menu-toggle-lines span:nth-child(1) {
        top: 0;
    }

    .menu-toggle-lines span:nth-child(2) {
        top: 7px;
    }

    .menu-toggle-lines span:nth-child(3) {
        top: 15px;
    }

    .menu-toggle-cross {
        display: none;
        font-family: Arial, sans-serif;
        font-size: 30px;
        line-height: 1;
    }

    #menu.is-open .menu-toggle-lines {
        display: none;
    }

    #menu.is-open .menu-toggle-cross {
        display: block;
    }

    .mobile-lang {
        text-align: right;
    }

    .menu-links {
        position: absolute;
        top: 44px;
        right: 0;
        left: 0;
        z-index: 101;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 18px 16px 20px;
        border-bottom: 1px solid #000000;
        background: #ffffff;
    }

    .site-js #menu .menu-links {
        display: none;
    }

    .site-js #menu.is-open .menu-links {
        display: flex !important;
    }

    .menu-links a {
        display: block;
        font-size: 16px;
        line-height: 26px;
    }

    #lang {
        display: none;
    }

    .m-content p[style*="margin-right: -"] {
        margin-right: 0 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
