:root {
    --tw-navy: #1d2855;
    --tw-yellow: #fee260;
    --tw-catalog: #eff1f8;
    --tw-green: #066855;
}

.legacy-body { min-height: 100vh; background: #fff; }
.legacy-body button:focus-visible,
.legacy-body a:focus-visible { outline: 2px solid var(--tw-yellow); outline-offset: 2px; }
.legacy-header .top { gap: 8px; }
.legacy-logo { padding-left: 0; }
.legacy-logo img { display: block; width: 40px; height: 40px; }
.burger-black { display: flex; align-items: center; }
.burger-black span { margin-left: 10px; }
.fav-button-menu {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 7px;
    border-radius: 50%;
    background: #fff;
}
.fav-menu-block { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.spans-fav { margin-top: 2px; font: 11px/14px Roboto-Light, sans-serif; }
.header-link__count {
    position: absolute;
    right: -2px;
    top: -2px;
    min-width: 15px;
    padding: 0 3px;
    border-radius: 50px;
    background: var(--tw-yellow);
    color: #2b386d;
    font-size: 9px;
    line-height: 15px;
    text-align: center;
}
.favorite-block,
.personals-block,
.legacy-search-icon { display: block; width: 25px; height: 25px; background-position: center; background-repeat: no-repeat; background-size: contain; }
.favorite-block { background-image: url(/img/svg/favorite-menu.svg); }
.personals-block { background-image: url(/img/svg/person-menu.svg); }
.legacy-search-icon {
    width: 15px;
    height: 15px;
    border: 2px solid #2b386d;
    border-radius: 50%;
    position: relative;
}
.legacy-search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -6px; bottom: -3px; background: #2b386d; transform: rotate(45deg); }
.nav-link-cat { color: #fff; background: transparent; padding: 1rem 1rem 1.25rem; }
.nav-link-cat img { margin-left: 5px; filter: brightness(0) invert(1); }
.legacy-dropdown:hover .nav-link-cat { color: var(--tw-yellow); }
.legacy-dropdown.is-open .nav-link-cat { color: var(--tw-yellow); }
.legacy-dropdown.is-open .auto-nav-more-list { opacity: 1 !important; visibility: visible !important; }
.legacy-dropdown-all { margin-top: 8px !important; padding-top: 7px !important; border-top: 1px solid rgba(255,255,255,.2); }
.legacy-dropdown-all a { color: var(--tw-yellow) !important; font-family: Roboto-Bold, sans-serif; }

.legacy-catalog-section { padding: 4px 0 45px; background: var(--tw-catalog); }
.legacy-catalog-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 10px 5px 15px; }
.legacy-catalog-heading h1 { color: var(--tw-navy); font: 24px/1.25 Roboto-Bold, sans-serif; }
.legacy-catalog-heading span,
.legacy-search-result { color: #7d87a6; font: 12px/1.4 Roboto-Light, sans-serif; }
.legacy-search-result { padding: 0 5px 12px; }
.legacy-category-total { margin-left: auto; color: #1d2855; font: 12px/16px Roboto-Light, sans-serif; }
.catalog-element { position: relative; padding: 5px; }
.ob-block { position: relative; width: 100%; overflow: hidden; background: #dfe2ec; }
.gallery-trigger { padding: 0; border: 0; background: transparent; text-align: inherit; }
.gallery-trigger:hover { opacity: 1; }
.ob-back,
.ob-image,
.ob-image picture { display: block; width: 100%; }
.ob-image { aspect-ratio: 4 / 5; background: #e2e5ed; }
.ob-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ob-podtext a { display: block; margin: 0 7px; }
.ob-podtext .person-button { display: block; margin: 0 7px; cursor: help; }
.ob-podtext button { padding: 0; }
.ob-podtext button:hover,
.ob-podtext a:hover { opacity: .72; }
.is-loading { opacity: .45 !important; pointer-events: none; }
.legacy-empty { width: 100%; padding: 70px 20px; text-align: center; }
.legacy-empty h2 { margin-bottom: 8px; color: var(--tw-navy); font: 24px/1.3 Roboto-Bold, sans-serif; }
.legacy-empty p { margin-bottom: 22px; }
.legacy-favorites-page { min-height: 65vh; padding-top: 25px; }
.legacy-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 20px;
    border: 0;
    border-radius: 4px;
    background: #c5005e;
    color: #fff;
    font: 14px/1.2 Roboto-Regular, sans-serif;
}
.legacy-primary-button:disabled { opacity: .55; cursor: not-allowed; }
.legacy-flash { position: fixed; top: 125px; left: 50%; z-index: 1200; transform: translateX(-50%); padding: 10px 18px; border-radius: 4px; background: var(--tw-yellow); color: var(--tw-navy); box-shadow: 0 5px 20px rgba(0,0,0,.18); }
.legacy-seo-copy { padding-top: 35px; padding-bottom: 45px; color: #46506f; font: 15px/1.75 Roboto-Regular, sans-serif; user-select: text; }
.legacy-seo-copy p + div { margin-top: 20px; }
.legacy-footer-inner { display: flex; align-items: center; justify-content: center; text-align: center; }
.copi-a { display: flex; flex-direction: column; align-items: center; }

/* Full-screen gallery matching the old Fancybox behaviour. */
.fancybox-dialog {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: rgba(13, 13, 16, .97);
    overflow: hidden;
}
.fancybox-dialog::backdrop { background: rgba(0,0,0,.92); }
.fancybox-dialog[open] { display: grid; grid-template-rows: 1fr 96px; place-items: center; }
.fancybox-dialog figure { display: grid; place-items: center; width: calc(100vw - 150px); height: calc(100vh - 110px); margin: 0; }
.fancybox-dialog figure img { grid-area: 1/1; display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 125px); object-fit: contain; }
.fancybox-dialog figcaption { position: absolute; left: 50%; bottom: 103px; max-width: 70vw; transform: translateX(-50%); padding: 7px 12px; color: #ddd; background: rgba(0,0,0,.42); font-size: 12px; text-align: center; }
.fancybox-toolbar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding-left: 18px; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); }
.fancybox-counter { color: #ccc; font-size: 13px; }
.fancybox-close { width: 48px; height: 46px; color: #fff; background: rgba(30,30,30,.7); font-size: 32px; line-height: 1; }
.fancybox-arrow { position: absolute; z-index: 2; top: 50%; width: 62px; height: 84px; transform: translateY(-50%); color: #fff; background: rgba(0,0,0,.35); font: 56px/1 Roboto-Light, sans-serif; }
.fancybox-prev { left: 0; }
.fancybox-next { right: 0; }
.fancybox-thumbs { display: flex; justify-content: center; align-items: center; gap: 5px; width: 100%; height: 96px; padding: 7px 65px; overflow-x: auto; background: #17171a; }
.fancybox-thumbs button { flex: 0 0 70px; width: 70px; height: 80px; padding: 0; border: 2px solid transparent; background: #222; overflow: hidden; }
.fancybox-thumbs button.is-active { border-color: var(--tw-yellow); }
.fancybox-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.legacy-menu-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: clamp(35px, 6vw, 90px) max(6vw, 25px); border: 0; color: #fff; background: linear-gradient(to right, #24243e, #302b63, #0f0c29); }
.legacy-menu-dialog::backdrop { background: rgba(0,0,0,.45); }
.legacy-menu-dialog h2 { margin-bottom: 25px; font: clamp(25px, 4vw, 48px)/1.2 Roboto-Light, sans-serif; }
.legacy-menu-close { position: absolute; top: 15px; right: 25px; color: #fff; background: transparent; font-size: 40px; }
.legacy-menu-search { display: flex; max-width: 700px; margin-bottom: 30px; }
.legacy-menu-search input { flex: 1; min-width: 0; padding: 13px; border: 0; }
.legacy-menu-search button { padding: 13px 22px; background: var(--tw-yellow); color: var(--tw-navy); }
.legacy-menu-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 1000px; background: rgba(255,255,255,.16); }
.legacy-menu-links a { padding: 13px 15px; background: #24243e; }
.legacy-menu-links a:hover { color: var(--tw-yellow); }

.legacy-detail-page { padding: 25px 0 65px; background: var(--tw-catalog); }
.legacy-breadcrumbs { display: flex; gap: 9px; padding-bottom: 18px; color: #66708e; font-size: 12px; }
.legacy-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: clamp(25px, 5vw, 80px); align-items: start; }
.legacy-detail-photo { position: relative; display: block; width: 100%; padding: 0; border-radius: 5px; background: #e0e3ec; overflow: hidden; }
.legacy-detail-photo:hover { opacity: 1; }
.legacy-detail-photo img { display: block; width: 100%; max-height: 78vh; object-fit: contain; }
.legacy-detail-photo span { position: absolute; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 3px; color: #fff; background: rgba(15,12,41,.78); font-size: 12px; }
.legacy-detail-copy { padding-top: 10px; user-select: text; }
.legacy-author { margin-bottom: 6px; color: #74809e; font: 12px/1.4 Roboto-Light, sans-serif; }
.legacy-detail-copy h1 { margin-bottom: 20px; color: var(--tw-navy); font: clamp(27px, 3.2vw, 46px)/1.08 Roboto-Light, sans-serif; }
.legacy-detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.legacy-action-button { min-height: 42px; padding: 10px 14px; border: 1px solid #c7ccd9; border-radius: 4px; color: var(--tw-navy); background: #fff; }
.legacy-action-button.is-active { border-color: var(--tw-green); color: #fff; background: var(--tw-green); }
.legacy-action-button .ob-schet { color: inherit; font-size: inherit; }
.legacy-prose { margin: 25px 0; color: #46506f; line-height: 1.75; }
.legacy-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.legacy-tags a { padding: 5px 9px; border-radius: 4px; background: #fff; font-size: 12px; }
.legacy-number { margin-top: 25px; color: #7d87a6; font-size: 12px; }

.legacy-page-title { padding: 25px 0 30px; background: #fff; }
.legacy-page-breadcrumbs {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 10px 0;
    overflow-x: auto;
    color: var(--tw-navy);
    font: 12px/14px Roboto-Light, sans-serif;
    list-style: none;
    scrollbar-width: none;
    white-space: nowrap;
}
.legacy-page-breadcrumbs::-webkit-scrollbar { display: none; }
.legacy-page-breadcrumbs li { display: flex; color: var(--tw-navy); }
.legacy-page-breadcrumbs li + li { padding-left: .5rem; }
.legacy-page-breadcrumbs li + li::before { padding-right: .5rem; color: var(--tw-navy); content: ">"; }
.legacy-page-breadcrumbs a { color: var(--tw-navy); }
.legacy-page-h1 { margin: 0; color: var(--tw-navy); font: 34px/38px Roboto-Bold, sans-serif; }
.legacy-page-subtitle { margin: 10px 0 0; color: var(--tw-navy); font: 12px/16px Roboto-Light, sans-serif; }
.legacy-hub-page { min-height: 55vh; padding: 30px 0 65px; background: var(--tw-catalog); }
.legacy-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.legacy-hub-card { position: relative; display: flex; min-height: 112px; flex-direction: column; justify-content: space-between; padding: 20px 52px 17px 20px; border-radius: 5px; background: #fff; box-shadow: 0 2px 9px rgba(29,40,85,.06); transition: transform .2s ease, box-shadow .2s ease; }
.legacy-hub-card:hover { color: var(--tw-navy); transform: translateY(-2px); box-shadow: 0 7px 20px rgba(29,40,85,.12); }
.legacy-hub-card-title { color: var(--tw-navy); font: 17px/1.3 Roboto-Bold, sans-serif; }
.legacy-hub-card-meta { color: #8790aa; font: 11px/1.3 Roboto-Light, sans-serif; }
.legacy-hub-card-arrow { position: absolute; right: 20px; top: 50%; color: #c5005e; font-size: 24px; transform: translateY(-50%); }
.legacy-hub-card.has-image { display: block; min-height: 0; padding: 0; overflow: hidden; }
.legacy-hub-card-image { display: block; aspect-ratio: 16/10; overflow: hidden; background: #e9eaf0; }
.legacy-hub-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.legacy-hub-card.has-image:hover .legacy-hub-card-image img { transform: scale(1.025); }
.legacy-hub-card-body { position: relative; display: flex; min-height: 94px; flex-direction: column; justify-content: space-between; padding: 17px 52px 15px 20px; }
.legacy-hub-card-body .legacy-hub-card-arrow { right: 20px; }

@media (max-width: 991px) {
    .legacy-header .top { justify-content: space-between; }
    .legacy-logo { margin-right: auto; }
    .legacy-detail-grid { grid-template-columns: 1fr; }
    .legacy-menu-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legacy-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .legacy-flash { top: 78px; }
}

@media (max-width: 1199px) {
    .legacy-page-h1 { font-size: 30px; line-height: 34px; }
}

@media (max-width: 575px) {
    .container { width: 94%; }
    .top { padding: 8px 0; }
    .legacy-logo img { width: 31px; height: 31px; }
    #header .toggle-top { padding: 7px 9px; font-size: 13px; }
    #header .toggle-top span { margin-left: 6px; }
    .fav-menu-block { min-width: 38px; padding: 3px; }
    .fav-button-menu { width: 29px; height: 29px; padding: 7px; }
    .favorite-block { width: 12px; height: 12px; background-image: url(/img/svg/favorite-menu-12px.svg); }
    .personals-block { width: 12px; height: 12px; background-image: url(/img/svg/person-menu-12px.svg); }
    .spans-fav { font-size: 9px; }
    .header-link__count { right: -4px; top: -4px; }
    .legacy-catalog-heading h1 { font-size: 19px; }
    .legacy-catalog-heading { padding-top: 6px; }
    .catalog-element { flex: 0 0 100%; max-width: 100%; }
    .fancybox-dialog[open] { grid-template-rows: 1fr 78px; }
    .fancybox-dialog figure { width: 100vw; height: calc(100vh - 85px); }
    .fancybox-dialog figure img { max-height: calc(100vh - 95px); }
    .fancybox-dialog figcaption { bottom: 83px; max-width: 88vw; }
    .fancybox-arrow { width: 42px; height: 64px; font-size: 42px; }
    .fancybox-thumbs { height: 78px; padding: 5px 45px; }
    .fancybox-thumbs button { flex-basis: 58px; width: 58px; height: 66px; }
    .legacy-menu-links { grid-template-columns: 1fr; }
    .legacy-detail-page { padding-top: 15px; }
    .legacy-page-title { padding: 12px 0 22px; }
    .legacy-page-breadcrumbs { padding-top: 6px; }
    .legacy-page-h1 { font-size: 20px; line-height: 24px; }
    .legacy-category-total { display: none; }
    .legacy-hub-page { padding-top: 15px; }
    .legacy-hub-grid { grid-template-columns: 1fr; }
    .legacy-hub-card { min-height: 96px; }
}
