/* MetallurgProm UX layer v1
   Loaded after the legacy theme stylesheet. Keep changes isolated and reversible. */

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10050;
    padding: 10px 14px;
    border-radius: 4px;
    background: var(--primary-dark, #263746);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .15s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

:where(a, button, input, select, textarea, [role="button"]):focus-visible {
    outline: 3px solid var(--accent, #d47a27);
    outline-offset: 3px;
}

.header.center {
    padding-bottom: 0;
}

.head-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 64px;
    padding: 10px 0;
    overflow: visible;
}

.head-menu li,
.head-menu li.add-ads,
.head-menu li.user-tools {
    float: none;
    margin-bottom: 0;
}

.head-menu li.logo-header {
    flex: 0 0 auto;
    margin-right: 8px;
}

.head-menu li.search-header {
    float: none;
    width: min(260px, 23vw);
    margin-left: auto;
}

.logo {
    margin-top: 0;
}

.logo-header a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.head-menu a,
.head-menu .show-login,
.head-menu .btn-menu {
    border-radius: 4px;
}

.head-menu > li > a:not(.publish),
.head-menu .show-login,
.head-menu .btn-menu {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
}

.head-menu > li > a:not(.publish):hover,
.head-menu .show-login:hover,
.head-menu .btn-menu:hover {
    background: var(--surface-alt, #f4f6f8);
}

.speedbar {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 8px 0;
    line-height: 1.45;
}

.page-header {
    margin-bottom: 20px;
}

.page-title-archive {
    margin: 0;
    padding: 6px 56px 14px 0;
    line-height: 1.2;
}

.page-title-archive::after {
    width: 72px;
    height: 4px;
    margin-top: 42px;
}

.taxonomy-description {
    padding: 12px 0 0;
}

.taxonomy-description p {
    margin: 0;
    line-height: 1.65;
}

.full h1 {
    margin: 6px 0 16px;
    font-size: clamp(27px, 2.4vw, 40px);
    line-height: 1.18;
    letter-spacing: -.015em;
}

.full-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 14px;
    margin-bottom: 20px;
    color: var(--text-muted, #6d7780);
}

.full-meta .main-item-date {
    margin: 0;
}

.article_img {
    margin: 0 0 24px;
}

.article_img .fullimg {
    width: 100%;
    height: auto;
    border-radius: 7px;
}

.photo_source {
    padding-top: 7px;
    color: var(--text-muted, #6d7780);
    font-size: 12px;
    line-height: 1.45;
}

.full-text {
    font-size: 17px;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.full-text p {
    margin: 0 0 1.2em;
    line-height: inherit;
}

.full-text h2,
.full-text h3,
.full-text h4,
.full-text h5 {
    line-height: 1.3;
    margin: 1.7em 0 .65em;
}

.full-text h2,
.full-text h2 a {
    font-size: clamp(23px, 1.8vw, 29px);
}

.full-text h3,
.full-text h3 a {
    font-size: clamp(20px, 1.5vw, 25px);
}

.full-text img:not(.emoji) {
    height: auto;
    border-radius: 5px;
}

.full-text table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.full-text a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.post-navigation {
    margin: 10px 0 0;
    border: 1px solid var(--border, #dfe3e6);
    border-radius: 7px;
    overflow: hidden;
}

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    width: auto;
    min-width: 0;
    padding: 18px;
}

.post-navigation .nav-next {
    border-left: 1px solid var(--border, #dfe3e6);
}

.post-navigation h4 {
    margin: 5px 0 0;
    line-height: 1.4;
}

.post-navigation a {
    display: block;
}

.comms-title {
    gap: 12px;
}

.add-comm-btn {
    min-height: 42px;
}

.feat-home-index-thumb img,
.feat-home-index-thumb-cover img,
.home-index-thumb img,
.home-index-thumb-compsub img,
.home-index-thumb-grid img,
.related-post-thumb img {
    transition-duration: .28s !important;
}

.feat-home-index-thumb-cover:hover img,
.feat-home-index-thumb:hover img,
.home-index-thumb-compsub:hover img,
.home-index-thumb-grid:hover img,
.home-index-thumb:hover img,
.img-all:hover img,
.related-post-thumb:hover img {
    transform: scale(1.04) !important;
}

.btn-menu {
    cursor: pointer;
    user-select: none;
}

body.ux-menu-open {
    overflow: hidden;
}

.side-panel {
    width: min(340px, 88vw);
    left: min(-340px, -88vw);
    box-shadow: 12px 0 30px rgba(0, 0, 0, .18);
    transition: left .25s ease;
}

.side-panel .mob-menu {
    min-height: 100%;
    padding-top: 54px;
    background: #fff;
}

.mobile-menu-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 0;
    border-radius: 50%;
    background: var(--surface-alt, #f4f6f8) !important;
    color: var(--text-primary, #263746) !important;
    line-height: 40px !important;
    font-size: 18px;
}

.mobile-menu-search {
    padding: 12px 14px 16px;
    border-bottom: 1px solid var(--border, #dfe3e6);
}

.mobile-menu-search .search-box,
.mobile-menu-search form {
    margin: 0;
}

.mobile-menu-search .search-field input {
    height: 44px;
    padding-right: 48px;
    background: #fff;
}

.mobile-menu-search .search-field button {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 !important;
    border-radius: 0 4px 4px 0;
    background: var(--primary, #315d7d) !important;
    color: #fff !important;
}

.side-panel .side-bt {
    padding-right: 14px;
    padding-left: 14px;
}

.side-panel .side-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

@media screen and (max-width: 1220px) {
    .head-menu li.logo-header {
        float: none;
        margin: 0 auto 0 0;
        text-align: left;
    }

    .head-menu li.search-header {
        width: min(300px, 34vw);
        margin-top: 0;
    }

    .header {
        height: auto;
    }
}

@media screen and (max-width: 950px) {
    .header.center {
        padding-bottom: 0;
    }

    .head-menu {
        min-height: 62px;
        padding: 8px 0;
    }

    .head-menu li.logo-header {
        margin-right: auto;
    }

    .head-menu .logo {
        width: auto;
        max-width: 140px;
        height: auto;
        padding-top: 0;
    }

    .head-menu li.btn-menu,
    .head-menu li.show-login,
    .head-menu li.home-fa,
    .head-menu li.user-tools {
        display: flex;
        align-items: center;
    }

    .speedbar {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .speedbar::-webkit-scrollbar {
        display: none;
    }

    .side-right {
        column-width: auto;
        column-count: 1;
    }
}

@media screen and (max-width: 760px) {
    .center {
        padding-right: 18px;
        padding-left: 18px;
    }

    .header {
        height: auto;
    }

    .head-menu {
        gap: 2px;
    }

    .head-menu .logo {
        max-width: 126px;
    }

    .head-menu li.home-fa {
        display: none;
    }

    .head-menu > li > a:not(.publish),
    .head-menu .show-login,
    .head-menu .btn-menu {
        padding: 0 8px;
    }

    .head-menu .show-login {
        font-size: 0;
    }

    .head-menu .show-login .fa {
        margin: 0;
        font-size: 18px;
    }

    .page-title-archive {
        font-size: 24px;
    }

    .full h1 {
        font-size: clamp(25px, 7.2vw, 32px);
    }

    .full-text {
        font-size: 16.5px;
        line-height: 1.68;
    }

    .post-navigation .nav-links {
        grid-template-columns: 1fr;
    }

    .post-navigation .nav-next {
        border-top: 1px solid var(--border, #dfe3e6);
        border-left: 0;
    }

    .side-right {
        margin-top: 22px;
        padding-top: 22px;
    }
}

@media screen and (max-width: 470px) {
    .head-menu .logo {
        max-width: 112px;
    }

    .head-menu li.user-tools {
        display: none;
    }

    .full-meta {
        gap: 6px 10px;
        font-size: 12px;
    }

    .comms-title {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

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