@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@700;800;900&display=swap');

@font-face{
  font-family:'Noto Sans ExtBd';
  src:local('Noto Sans ExtBd'), local('Noto Sans ExtraBold'), local('Noto Sans Extrabold');
  font-style:normal;
  font-weight:800;
  font-display:swap;
}

:root{
  --site-font:'Noto Sans ExtBd','Noto Sans',Arial,sans-serif;
  --site-font-weight:800;
  --sidebar:#08172d;
  --topbar:#081528;
  --page:#ffffff;
  --pagebg:#23374f;
  --panel:#10203a;
  --panel2:#132844;
  --ink:#10203a;
  --white:#ffffff;
  --orange:#ff7a1d;
  --orange2:#ff8a39;
  --line:rgba(255,255,255,.08);
  --shadow:0 16px 34px rgba(0,0,0,.22);
}

*{box-sizing:border-box}
*,*::before,*::after{font-family:inherit}
html,body{height:100%}

body{
  margin:0;
  background:var(--pagebg);
  color:var(--ink);
  font-family:var(--site-font);
  font-weight:var(--site-font-weight);
  font-synthesis:none;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button,input,textarea,select{
  font:inherit;
  font-family:var(--site-font);
  font-weight:var(--site-font-weight);
}

.app{
  min-height:100vh;
  width:100%;
  padding-left:246px;
}

/* =========================================================
   SIDEBAR (Стиль строго из article5)
   ========================================================= */
.sidebar{
  background:linear-gradient(180deg,#07162b 0%, #0b1c39 100%);
  color:#fff;
  box-shadow:none !important;
  position:fixed;
  top:0;
  left:0;
  bottom:0;
  width:246px;
  height:100vh;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.22) rgba(255,255,255,.04);
  z-index:1000;
}
.logo { display: block; padding: 15px; text-align: center; }
.sidebar-logo { max-width: 100%; height: auto; max-height: 100px; display: inline-block; }

.sidebar__content { padding: 8px 17px 0 18px; }
.sidebar__title { font-size: 13px; line-height: 1.05; text-transform: uppercase; margin-top: 11px; }
.sidebar__subtitle { font-size: 8px; line-height: 1.2; margin-top: 4px; text-transform: uppercase; opacity: .70; }
.field-label { display: block; margin: 10px 0 4px; font-size: 11px; }
.field {
  width: 100%; height: 16px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 2px;
  background: rgba(255, 255, 255, .02); color: #fff; padding: 0 8px; font-size: 10px; outline: none;
  box-sizing: border-box; /* Обязательно чтобы не вылезали за края */
}
.field:focus{ border-color:rgba(255,122,29,.80); box-shadow:0 0 0 3px rgba(255,122,29,.10); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; border: none; cursor: pointer;
  font-weight:var(--site-font-weight); transition: transform .18s ease, filter .18s ease; user-select: none;
}
.btn:hover { transform: translateY(-1px); filter: saturate(1.05); }

.btn--search {
  margin-top: 14px; width: 71px; height: 27px; border-radius: 2px; color: #fff; background: var(--orange);
  border: none; cursor: pointer; box-shadow: 0 8px 15px rgba(255, 122, 29, .22);
}

.btn--accent {
  height: 39px; padding: 0 14px 0 17px; border-radius: 4px; color: #fff;
  background: linear-gradient(180deg, var(--orange2), var(--orange));
  box-shadow: 0 12px 20px rgba(255, 122, 29, .18);
  margin-top: 15px;
}

.sidebar__knowledge { margin-top: 14px; padding-top: 16px; border-top: 2px solid rgba(255, 255, 255, .12); }
.sidebar__section-title { font-size: 11px; line-height: 1.08; text-transform: uppercase; margin-bottom: 10px; color: #fff; }
.sidebar__section-title:hover { color: var(--orange); }

.knowledge-list { list-style: none; margin: 0; padding: 0; }
.knowledge-list li { position: relative; padding-left: 12px; margin: 8px 0; font-size: 7.9px; line-height: 1.25; text-transform: uppercase; opacity: .70; }
.knowledge-list li::before { content: "•"; position: absolute; left: 0; top: 0; color: var(--orange); font-size: 11px; }
.knowledge-list li.is-active { opacity: 1; color: var(--orange); }
.knowledge-list li a:hover { color: var(--orange); }

/* =========================================================
   MAIN AND TOPBAR (Оригинал из index_lib)
   ========================================================= */
.page{background:var(--page); min-width:0; min-height:100vh; display:flex; flex-direction:column;}
.topbar{
  height:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px 0 12px;
  background:linear-gradient(180deg,rgba(8,21,40,.98) 0%, rgba(10,21,42,.98) 100%);
  color:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,.16), inset 0 -1px 0 rgba(255,255,255,.05);
  position:sticky;
  top:0;
  z-index:950;
  backdrop-filter:blur(8px);
}
.menu { display: flex; gap: 34px; text-transform: uppercase; font-size: 8.6px; font-weight:var(--site-font-weight); letter-spacing: .02em; }
.menu a { opacity: .98; }
.menu a.is-active, .menu a:hover { color: var(--orange); }
.lang { display: flex; align-items: center; gap: 5px; height: 16px; padding: 0 6px; border-radius: 2px; background: rgba(255, 255, 255, .06); font-size: 10px; }

/* Хедер Базы Знаний с изображением */
.hero--knowledge {
  position: relative;
  height: 320px;
  background: linear-gradient(135deg, rgba(9, 21, 40, 0.8) 0%, rgba(16, 32, 58, 0.9) 100%), url('assets/images/bearing.jpg');
  background-size: cover;
  background-position: center;
  margin-bottom: 50px;
  overflow: visible;
}
.hero--knowledge .hero__inner {
  padding: 50px 50px 0 50px;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}
.hero--knowledge h1 {
  margin: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1.1;
  font-weight:var(--site-font-weight);
  text-transform: uppercase;
  letter-spacing: .02em;
  max-width: 400px;
}
.hero--knowledge p {
  color: #fff;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 15px;
}

/* Строка поиска */
.search-container {
  position: absolute;
  bottom: -30px;
  left: 50px;
  right: 50px;
  height: 60px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  z-index: 10;
  overflow: hidden;
}
.search-container input {
  flex: 1;
  border: none;
  padding: 0 25px;
  font-size: 16px;
  outline: none;
  color: var(--ink);
}
.search-container button {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 0 50px;
  font-size: 16px;
  font-weight:var(--site-font-weight);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.search-container button:hover {
  background: var(--orange2);
}

/* Секция Архива с Миллиметровкой */
.bg-graph-paper {
  background-color: #ffffff;
  background-image: 
    linear-gradient(#eaebf0 1px, transparent 1px),
    linear-gradient(90deg, #eaebf0 1px, transparent 1px);
  background-size: 20px 20px;
  padding: 60px 50px 80px 50px;
  position: relative;
  flex-grow: 1;
}

.archive-header {
  font-size: 20px;
  margin: 0 0 35px 0;
  color: var(--ink);
  text-transform: uppercase;
  display: inline-block;
  position: relative;
}
.archive-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 3px;
  background: var(--orange);
}

/* Сетка карточек */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  position: relative;
  z-index: 2;
}

.archive-card {
  background: #fff;
  border: 1px solid #e2e5eb;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.archive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.archive-card__img {
  height: 150px;
  border-radius: 4px;
  margin-bottom: 18px;
  border: 1px solid #eef0f4;
  overflow: hidden;
  position: relative;
  background: #fdfdfd;
}
.archive-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.archive-card__date { font-size: 11px; color: #8a94a6; margin-bottom: 8px; }
.archive-card__title { font-size: 14px; font-weight:var(--site-font-weight); line-height: 1.3; color: var(--ink); text-transform: uppercase; margin-bottom: 20px; flex-grow: 1; }
.archive-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #f0f2f5; color: #505d73; padding: 4px 10px; border-radius: 4px; font-size: 9px; font-weight:var(--site-font-weight); text-transform: uppercase; letter-spacing: 0.05em; }

.stamp {
  position: absolute;
  bottom: 10px;
  right: -20px;
  width: 70px;
  height: 70px;
  border: 2px solid #2c3e62;
  color: #2c3e62;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight:var(--site-font-weight);
  transform: rotate(-15deg);
  opacity: 0.5;
  pointer-events: none;
}

/* CTA Баннер */
.cta-banner {
  position: relative; overflow: visible; min-height: 100px; border-radius: 12px;
  background: linear-gradient(180deg, #0d1e3a 0%, #10203a 100%); box-shadow: var(--shadow);
  padding: 25px 30px; color: #fff;
}
.cta-banner__content { position: relative; z-index: 2; max-width: 610px; }
.cta-banner h3 { margin: 0 0 10px; font-size: 18px; line-height: 1.15; font-weight:var(--site-font-weight); text-transform: uppercase; color: #fff; }
.cta-banner p { margin: 0 0 16px; max-width: 450px; font-size: 11px; line-height: 1.4; color: #fff; opacity: .95; }
.cta-banner__image-placeholder { position: absolute; right: 30px; bottom: 0; width: 200px; height: 100px; background: radial-gradient(circle at center, rgba(255,255,255,0.1), transparent); }

/* Подвал */
.footer{
  margin-top:0;
  background:#0b1c39;
  color:#fff;
  border-top:1px solid rgba(255,255,255,.10);
  position:relative;
  z-index:5;
}

.footer__inner{
  min-height:auto;
  padding:18px 28px 16px 18px;
  display:grid;
  grid-template-columns:1.35fr 1fr .75fr;
  gap:24px;
  align-items:center;
}

.footer__col{
  padding-top:0;
  font-size:12px;
  line-height:1.35;
}

.footer__col strong{
  display:block;
  margin-top:5px;
  font-weight:var(--site-font-weight);
}

.footer__title{
  margin-bottom:7px;
  font-weight:var(--site-font-weight);
}

.footer__nav{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.footer__nav a{
  opacity:.86;
  transition:color .18s ease, opacity .18s ease;
}

.footer__nav a:hover{
  color:var(--orange);
  opacity:1;
}

.footer__right{
  font-weight:var(--site-font-weight);
  text-align:right;
}

@media (max-width: 1300px) {
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .app{padding-left:0;}
  .sidebar{display:none;}
  .archive-grid { grid-template-columns: 1fr; }
  .hero--knowledge .hero__inner { padding: 30px; }
  .search-container { left: 30px; right: 30px; }
  .bg-graph-paper { padding: 50px 30px 60px 30px; }
}
.lang-switch {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.lang-switch {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.lang-switch__btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 105px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: none;
  z-index: 1000;
}

.lang-switch.is-open .lang-switch__menu {
  display: block;
}

.lang-switch__menu a {
  display: block;
  padding: 10px 14px;
  color: #003A5C;
  text-decoration: none;
  font-weight:var(--site-font-weight);
  white-space: nowrap;
}

.lang-switch__menu a:hover {
  background: #f1f5f8;
}

.lang-switch__menu a.is-current {
  display: none;
}

/* === Bearing XLSX search module === */
body.modal-open{
  overflow:hidden;
}

.bearing-search-status{
  margin-top:10px;
  font-size:10px;
  line-height:1.35;
  color:rgba(255,255,255,.74);
}

.bearing-search-status:empty{
  display:none;
}

.bearing-search-status.is-error{
  color:#ffd0d0;
}

.btn[disabled],
.btn--search:disabled{
  cursor:wait;
  opacity:.72;
  transform:none !important;
  box-shadow:none !important;
}

.bearing-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:none;
  align-items:center;
  justify-content:center;
  padding:26px 18px;
}

.bearing-modal.is-open{
  display:flex;
}

.bearing-modal__overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,122,29,.16), transparent 34%),
    rgba(7,15,28,.76);
  backdrop-filter:blur(6px);
}

.bearing-modal__window{
  position:relative;
  z-index:1;
  width:min(875px, calc(100vw - 32px));
  max-height:min(88vh, 860px);
  overflow:auto;
  border-radius:24px;
  background:#fff;
  color:#10203a;
  box-shadow:0 30px 80px rgba(0,0,0,.42);
  border:1px solid rgba(255,255,255,.34);
  animation:bearingModalIn .22s ease both;
}

@keyframes bearingModalIn{
  from{opacity:0; transform:translateY(12px) scale(.985)}
  to{opacity:1; transform:translateY(0) scale(1)}
}

.bearing-modal__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px 18px;
  background:linear-gradient(135deg,#08172d 0%, #10203a 62%, #183250 100%);
  color:#fff;
  position:sticky;
  top:0;
  z-index:2;
}

.bearing-modal__title{
  margin:0;
  font-size:24px;
  line-height:1.12;
  font-weight:var(--site-font-weight);
  text-transform:uppercase;
  letter-spacing:.01em;
}

.bearing-modal__subtitle{
  margin:7px 0 0;
  font-size:11px;
  line-height:1.35;
  opacity:.76;
}

.bearing-modal__close{
  flex:0 0 auto;
  width:38px;
  height:38px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.1);
  color:#fff;
  font-size:30px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .18s ease, transform .18s ease;
}

.bearing-modal__close:hover{
  background:rgba(255,122,29,.95);
  transform:rotate(90deg);
}

.bearing-modal__content{
  padding:24px;
}

.bearing-detail{
  display:grid;
  grid-template-columns:minmax(0,1fr) 238px;
  gap:22px;
  align-items:stretch;
}

.bearing-detail__table{
  display:grid;
  gap:9px;
}

.bearing-row{
  display:grid;
  grid-template-columns:minmax(160px, .95fr) minmax(90px, .75fr);
  gap:14px;
  align-items:center;
  min-height:42px;
  padding:10px 13px;
  border:1px solid #edf0f5;
  border-radius:13px;
  background:#f7f9fc;
}

.bearing-row__label{
  font-size:12px;
  line-height:1.15;
  text-transform:uppercase;
  color:#6a7688;
}

.bearing-row__value{
  font-size:18px;
  line-height:1.12;
  font-weight:var(--site-font-weight);
  color:#10203a;
  text-align:right;
  word-break:break-word;
}

.bearing-detail__image-card{
  min-height:250px;
  border-radius:20px;
  background:
    linear-gradient(180deg,#f7f9fc 0%,#eef2f7 100%);
  border:1px solid #e7ecf3;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  position:relative;
  overflow:hidden;
}

.bearing-detail__image-card::before{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,122,29,.18), transparent 68%);
  right:-80px;
  top:-80px;
}

.bearing-detail__img{
  position:relative;
  z-index:1;
  max-width:190px;
  max-height:230px;
  width:auto;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 14px 18px rgba(16,32,58,.18));
}

.bearing-image-placeholder{
  position:relative;
  z-index:1;
  padding:14px;
  border:1px dashed rgba(16,32,58,.25);
  border-radius:13px;
  color:#6a7688;
  font-size:12px;
  line-height:1.35;
  text-align:center;
}

.bearing-results{
  display:grid;
  gap:12px;
}

.bearing-results__hint{
  margin:0 0 6px;
  color:#5d697a;
  font-size:13px;
  line-height:1.4;
}

.bearing-results__item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:15px 16px;
  border:1px solid #e5ebf3;
  border-radius:17px;
  background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%);
  box-shadow:0 8px 18px rgba(16,32,58,.06);
}

.bearing-results__name{
  color:#10203a;
  font-size:16px;
  line-height:1.15;
  font-weight:var(--site-font-weight);
}

.bearing-results__params{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:9px;
}

.bearing-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:24px;
  padding:5px 9px;
  border-radius:999px;
  background:#eef2f7;
  color:#43536b;
  font-size:11px;
  line-height:1;
}

.bearing-chip strong{
  color:#10203a;
  font-weight:var(--site-font-weight);
}

.bearing-results__open{
  border:none;
  border-radius:999px;
  background:linear-gradient(180deg,var(--orange2),var(--orange));
  color:#fff;
  min-width:100px;
  height:34px;
  padding:0 16px;
  cursor:pointer;
  font-size:12px;
  font-weight:var(--site-font-weight);
  box-shadow:0 10px 18px rgba(255,122,29,.2);
  transition:transform .18s ease, filter .18s ease;
}

.bearing-results__open:hover{
  transform:translateY(-1px);
  filter:saturate(1.05);
}

@media (max-width:860px){
  .bearing-detail{
    grid-template-columns:1fr;
  }

  .bearing-detail__image-card{
    min-height:190px;
  }

  .bearing-modal__title{
    font-size:20px;
  }
}

@media (max-width:620px){
  .bearing-modal{
    padding:14px 10px;
  }

  .bearing-modal__top,
  .bearing-modal__content{
    padding:18px;
  }

  .bearing-row{
    grid-template-columns:1fr;
    gap:5px;
  }

  .bearing-row__value{
    text-align:left;
    font-size:17px;
  }

  .bearing-results__item{
    grid-template-columns:1fr;
  }

  .bearing-results__open{
    width:100%;
  }
}




@media (max-width:900px){
  .footer__inner{
    grid-template-columns:1fr;
    gap:12px;
  }

  .footer__right{
    text-align:left;
  }
}


/* === STANDARD SYSTEM FIXES FROM MAIN PAGE === */
.footer,
.footer__inner,
.footer__main,
.footer__bottom{
  background:#0b1c39 !important;
  background-color:#0b1c39 !important;
  background-image:none !important;
}

.sidebar{
  box-shadow:none !important;
}

/* =========================================================
   STANDARD FOOTER FROM MAIN PAGE
   ========================================================= */
.footer{
  margin-top:0 !important;
  background:#0b1c39 !important;
  color:#fff;
  border-top:0 !important;
  position:relative;
  z-index:5;
}

.footer__inner{
  min-height:0 !important;
  padding:20px 28px 16px 28px !important;
  display:block !important;
  background:#0b1c39 !important;
}

.footer__main{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  background:#0b1c39 !important;
}

.footer__brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-width:230px;
  color:#fff;
}

.footer__logo{
  width:54px;
  height:auto;
  flex:none;
}

.footer__brand span{
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.05;
  text-transform:uppercase;
}

.footer__brand small{
  color:rgba(255,255,255,.68);
  font-size:10px;
}

.footer__brand strong{
  color:#fff;
  font-size:13px;
  font-weight:var(--site-font-weight);
}

.footer__nav{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 18px !important;
  font-size:11px;
  line-height:1.2;
  text-transform:uppercase;
  color:rgba(255,255,255,.82);
}

.footer__nav a{
  color:rgba(255,255,255,.82);
  opacity:1;
  transition:color .18s ease, opacity .18s ease;
}

.footer__nav a:hover{
  color:var(--orange);
  opacity:1;
}

.footer__cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 16px;
  border-radius:999px;
  color:#fff;
  background:var(--orange);
  white-space:nowrap;
  font-size:11px;
  text-transform:uppercase;
  box-shadow:none;
}

.footer__cta:hover{
  background:var(--orange2);
}

.footer__bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.62);
  font-size:10px;
  line-height:1.35;
  background:#0b1c39 !important;
}

.footer__col{
  padding-top:0 !important;
}

@media (max-width:980px){
  .footer__main{
    align-items:flex-start;
    flex-direction:column;
  }

  .footer__nav{
    justify-content:flex-start;
  }

  .footer__bottom{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* === HARD STANDARD FIXES FROM MAIN PAGE === */
.footer,
.footer__inner,
.footer__main,
.footer__bottom{
  background:#0b1c39 !important;
  background-color:#0b1c39 !important;
  background-image:none !important;
}

.sidebar{
  box-shadow:none !important;
}
